Class: Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Recommendation

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/recommender_v1/classes.rb,
lib/google/apis/recommender_v1/representations.rb,
lib/google/apis/recommender_v1/representations.rb

Overview

A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRecommenderV1Recommendation

Returns a new instance of GoogleCloudRecommenderV1Recommendation.



710
711
712
# File 'lib/google/apis/recommender_v1/classes.rb', line 710

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#additional_impactArray<Google::Apis::RecommenderV1::GoogleCloudRecommenderV1Impact>

Optional set of additional impact that this recommendation may have when trying to optimize for the primary category. These may be positive or negative. Corresponds to the JSON property additionalImpact



636
637
638
# File 'lib/google/apis/recommender_v1/classes.rb', line 636

def additional_impact
  @additional_impact
end

#associated_insightsArray<Google::Apis::RecommenderV1::GoogleCloudRecommenderV1RecommendationInsightReference>

Insights that led to this recommendation. Corresponds to the JSON property associatedInsights



641
642
643
# File 'lib/google/apis/recommender_v1/classes.rb', line 641

def associated_insights
  @associated_insights
end

#contentGoogle::Apis::RecommenderV1::GoogleCloudRecommenderV1RecommendationContent

Contains what resources are changing and how they are changing. Corresponds to the JSON property content



646
647
648
# File 'lib/google/apis/recommender_v1/classes.rb', line 646

def content
  @content
end

#descriptionString

Free-form human readable summary in English. The maximum length is 500 characters. Corresponds to the JSON property description

Returns:

  • (String)


652
653
654
# File 'lib/google/apis/recommender_v1/classes.rb', line 652

def description
  @description
end

#etagString

Fingerprint of the Recommendation. Provides optimistic locking when updating states. Corresponds to the JSON property etag

Returns:

  • (String)


658
659
660
# File 'lib/google/apis/recommender_v1/classes.rb', line 658

def etag
  @etag
end

#last_refresh_timeString

Last time this recommendation was refreshed by the system that created it in the first place. Corresponds to the JSON property lastRefreshTime

Returns:

  • (String)


664
665
666
# File 'lib/google/apis/recommender_v1/classes.rb', line 664

def last_refresh_time
  @last_refresh_time
end

#nameString

Identifier. Name of recommendation. Corresponds to the JSON property name

Returns:

  • (String)


669
670
671
# File 'lib/google/apis/recommender_v1/classes.rb', line 669

def name
  @name
end

#primary_impactGoogle::Apis::RecommenderV1::GoogleCloudRecommenderV1Impact

Contains the impact a recommendation can have for a given category. Corresponds to the JSON property primaryImpact



674
675
676
# File 'lib/google/apis/recommender_v1/classes.rb', line 674

def primary_impact
  @primary_impact
end

#priorityString

Recommendation's priority. Corresponds to the JSON property priority

Returns:

  • (String)


679
680
681
# File 'lib/google/apis/recommender_v1/classes.rb', line 679

def priority
  @priority
end

#recommender_subtypeString

Contains an identifier for a subtype of recommendations produced for the same recommender. Subtype is a function of content and impact, meaning a new subtype might be added when significant changes to content or primary_impact.category are introduced. See the Recommenders section to see a list of subtypes for a given Recommender. Examples: For recommender = "google. iam.policy.Recommender", recommender_subtype can be one of "REMOVE_ROLE"/" REPLACE_ROLE" Corresponds to the JSON property recommenderSubtype

Returns:

  • (String)


690
691
692
# File 'lib/google/apis/recommender_v1/classes.rb', line 690

def recommender_subtype
  @recommender_subtype
end

#state_infoGoogle::Apis::RecommenderV1::GoogleCloudRecommenderV1RecommendationStateInfo

Information for state. Contains state and metadata. Corresponds to the JSON property stateInfo



695
696
697
# File 'lib/google/apis/recommender_v1/classes.rb', line 695

def state_info
  @state_info
end

#target_resourcesArray<String>

Fully qualified resource names that this recommendation is targeting. Corresponds to the JSON property targetResources

Returns:

  • (Array<String>)


700
701
702
# File 'lib/google/apis/recommender_v1/classes.rb', line 700

def target_resources
  @target_resources
end

#xor_group_idString

Corresponds to a mutually exclusive group ID within a recommender. A non-empty ID indicates that the recommendation belongs to a mutually exclusive group. This means that only one recommendation within the group is suggested to be applied. Corresponds to the JSON property xorGroupId

Returns:

  • (String)


708
709
710
# File 'lib/google/apis/recommender_v1/classes.rb', line 708

def xor_group_id
  @xor_group_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
# File 'lib/google/apis/recommender_v1/classes.rb', line 715

def update!(**args)
  @additional_impact = args[:additional_impact] if args.key?(:additional_impact)
  @associated_insights = args[:associated_insights] if args.key?(:associated_insights)
  @content = args[:content] if args.key?(:content)
  @description = args[:description] if args.key?(:description)
  @etag = args[:etag] if args.key?(:etag)
  @last_refresh_time = args[:last_refresh_time] if args.key?(:last_refresh_time)
  @name = args[:name] if args.key?(:name)
  @primary_impact = args[:primary_impact] if args.key?(:primary_impact)
  @priority = args[:priority] if args.key?(:priority)
  @recommender_subtype = args[:recommender_subtype] if args.key?(:recommender_subtype)
  @state_info = args[:state_info] if args.key?(:state_info)
  @target_resources = args[:target_resources] if args.key?(:target_resources)
  @xor_group_id = args[:xor_group_id] if args.key?(:xor_group_id)
end