# Recommender V1 API - Class Google::Cloud::Recommender::V1::Recommendation (v1.8.0)

1.8.0 (latest) 1.7.0 1.6.1 1.5.0 1.4.1 1.3.0 1.2.1 1.1.0 1.0.1 0.18.0 0.17.2 0.16.0 0.15.0 0.14.0 0.13.1 0.12.0 0.11.0 0.10.0 0.9.0 0.8.6 Reference documentation and code samples for the Recommender V1 API class Google::Cloud::Recommender::V1::Recommendation.

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

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #additional_impact

    def additional_impact() -> ::Array<::Google::Cloud::Recommender::V1::Impact>

**Returns**

- (::Array\<[::Google::Cloud::Recommender::V1::Impact](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-Impact)\>) --- Optional set of additional impact that this recommendation may have when trying to optimize for the primary category. These may be positive or negative.

### #additional_impact=

    def additional_impact=(value) -> ::Array<::Google::Cloud::Recommender::V1::Impact>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Recommender::V1::Impact](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-Impact)\>) --- Optional set of additional impact that this recommendation may have when trying to optimize for the primary category. These may be positive or negative.
**Returns**

- (::Array\<[::Google::Cloud::Recommender::V1::Impact](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-Impact)\>) --- Optional set of additional impact that this recommendation may have when trying to optimize for the primary category. These may be positive or negative.

### #associated_insights

    def associated_insights() -> ::Array<::Google::Cloud::Recommender::V1::Recommendation::InsightReference>

**Returns**

- (::Array\<[::Google::Cloud::Recommender::V1::Recommendation::InsightReference](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-Recommendation-InsightReference)\>) --- Insights that led to this recommendation.

### #associated_insights=

    def associated_insights=(value) -> ::Array<::Google::Cloud::Recommender::V1::Recommendation::InsightReference>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Recommender::V1::Recommendation::InsightReference](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-Recommendation-InsightReference)\>) --- Insights that led to this recommendation.
**Returns**

- (::Array\<[::Google::Cloud::Recommender::V1::Recommendation::InsightReference](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-Recommendation-InsightReference)\>) --- Insights that led to this recommendation.

### #content

    def content() -> ::Google::Cloud::Recommender::V1::RecommendationContent

**Returns**

- ([::Google::Cloud::Recommender::V1::RecommendationContent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-RecommendationContent)) --- Content of the recommendation describing recommended changes to resources.

### #content=

    def content=(value) -> ::Google::Cloud::Recommender::V1::RecommendationContent

**Parameter**

- **value** ([::Google::Cloud::Recommender::V1::RecommendationContent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-RecommendationContent)) --- Content of the recommendation describing recommended changes to resources.
**Returns**

- ([::Google::Cloud::Recommender::V1::RecommendationContent](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-RecommendationContent)) --- Content of the recommendation describing recommended changes to resources.

### #description

    def description() -> ::String

**Returns**

- (::String) --- Free-form human readable summary in English. The maximum length is 500 characters.

### #description=

    def description=(value) -> ::String

**Parameter**

- **value** (::String) --- Free-form human readable summary in English. The maximum length is 500 characters.
**Returns**

- (::String) --- Free-form human readable summary in English. The maximum length is 500 characters.

### #etag

    def etag() -> ::String

**Returns**

- (::String) --- Fingerprint of the Recommendation. Provides optimistic locking when updating states.

### #etag=

    def etag=(value) -> ::String

**Parameter**

- **value** (::String) --- Fingerprint of the Recommendation. Provides optimistic locking when updating states.
**Returns**

- (::String) --- Fingerprint of the Recommendation. Provides optimistic locking when updating states.

### #last_refresh_time

    def last_refresh_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Protobuf-Timestamp)) --- Last time this recommendation was refreshed by the system that created it in the first place.

### #last_refresh_time=

    def last_refresh_time=(value) -> ::Google::Protobuf::Timestamp

**Parameter**

- **value** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Protobuf-Timestamp)) --- Last time this recommendation was refreshed by the system that created it in the first place.
**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Protobuf-Timestamp)) --- Last time this recommendation was refreshed by the system that created it in the first place.

### #name

    def name() -> ::String

**Returns**

- (::String) --- Identifier. Name of recommendation.

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- Identifier. Name of recommendation.
**Returns**

- (::String) --- Identifier. Name of recommendation.

### #primary_impact

    def primary_impact() -> ::Google::Cloud::Recommender::V1::Impact

**Returns**

- ([::Google::Cloud::Recommender::V1::Impact](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-Impact)) --- The primary impact that this recommendation can have while trying to optimize for one category.

### #primary_impact=

    def primary_impact=(value) -> ::Google::Cloud::Recommender::V1::Impact

**Parameter**

- **value** ([::Google::Cloud::Recommender::V1::Impact](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-Impact)) --- The primary impact that this recommendation can have while trying to optimize for one category.
**Returns**

- ([::Google::Cloud::Recommender::V1::Impact](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-Impact)) --- The primary impact that this recommendation can have while trying to optimize for one category.

### #priority

    def priority() -> ::Google::Cloud::Recommender::V1::Recommendation::Priority

**Returns**

- ([::Google::Cloud::Recommender::V1::Recommendation::Priority](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-Recommendation-Priority)) --- Recommendation's priority.

### #priority=

    def priority=(value) -> ::Google::Cloud::Recommender::V1::Recommendation::Priority

**Parameter**

- **value** ([::Google::Cloud::Recommender::V1::Recommendation::Priority](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-Recommendation-Priority)) --- Recommendation's priority.
**Returns**

- ([::Google::Cloud::Recommender::V1::Recommendation::Priority](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-Recommendation-Priority)) --- Recommendation's priority.

### #recommender_subtype

    def recommender_subtype() -> ::String

**Returns**

- (::String) --- 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"

### #recommender_subtype=

    def recommender_subtype=(value) -> ::String

**Parameter**

- **value** (::String) --- 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"
**Returns**

- (::String) --- 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"

### #state_info

    def state_info() -> ::Google::Cloud::Recommender::V1::RecommendationStateInfo

**Returns**

- ([::Google::Cloud::Recommender::V1::RecommendationStateInfo](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-RecommendationStateInfo)) --- Information for state. Contains state and metadata.

### #state_info=

    def state_info=(value) -> ::Google::Cloud::Recommender::V1::RecommendationStateInfo

**Parameter**

- **value** ([::Google::Cloud::Recommender::V1::RecommendationStateInfo](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-RecommendationStateInfo)) --- Information for state. Contains state and metadata.
**Returns**

- ([::Google::Cloud::Recommender::V1::RecommendationStateInfo](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-recommender-v1/latest/Google-Cloud-Recommender-V1-RecommendationStateInfo)) --- Information for state. Contains state and metadata.

### #target_resources

    def target_resources() -> ::Array<::String>

**Returns**

- (::Array\<::String\>) --- Fully qualified resource names that this recommendation is targeting.

### #target_resources=

    def target_resources=(value) -> ::Array<::String>

**Parameter**

- **value** (::Array\<::String\>) --- Fully qualified resource names that this recommendation is targeting.
**Returns**

- (::Array\<::String\>) --- Fully qualified resource names that this recommendation is targeting.

### #xor_group_id

    def xor_group_id() -> ::String

**Returns**

- (::String) --- 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.

### #xor_group_id=

    def xor_group_id=(value) -> ::String

**Parameter**

- **value** (::String) --- 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.
**Returns**

- (::String) --- 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.