Recommender V1 Client - Class Recommendation (2.0.2)

Reference documentation and code samples for the Recommender V1 Client class Recommendation.

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

Generated from protobuf message google.cloud.recommender.v1.Recommendation

Namespace

Google \ Cloud \ Recommender \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

Name of recommendation.

↳ description string

Free-form human readable summary in English. The maximum length is 500 characters.

↳ recommender_subtype 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"

↳ last_refresh_time Google\Protobuf\Timestamp

Last time this recommendation was refreshed by the system that created it in the first place.

↳ primary_impact Impact

The primary impact that this recommendation can have while trying to optimize for one category.

↳ additional_impact array<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.

↳ priority int

Recommendation's priority.

↳ content RecommendationContent

Content of the recommendation describing recommended changes to resources.

↳ state_info RecommendationStateInfo

Information for state. Contains state and metadata.

↳ etag string

Fingerprint of the Recommendation. Provides optimistic locking when updating states.

↳ associated_insights array<Recommendation\InsightReference>

Insights that led to this recommendation.

↳ xor_group_id 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.

getName

Name of recommendation.

Returns
Type Description
string

setName

Name of recommendation.

Parameter
Name Description
var string
Returns
Type Description
$this

getDescription

Free-form human readable summary in English. The maximum length is 500 characters.

Returns
Type Description
string

setDescription

Free-form human readable summary in English. The maximum length is 500 characters.

Parameter
Name Description
var string
Returns
Type Description
$this

getRecommenderSubtype

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
Type Description
string

setRecommenderSubtype

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"

Parameter
Name Description
var string
Returns
Type Description
$this

getLastRefreshTime

Last time this recommendation was refreshed by the system that created it in the first place.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasLastRefreshTime

clearLastRefreshTime

setLastRefreshTime

Last time this recommendation was refreshed by the system that created it in the first place.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getPrimaryImpact

The primary impact that this recommendation can have while trying to optimize for one category.

Returns
Type Description
Impact|null

hasPrimaryImpact

clearPrimaryImpact

setPrimaryImpact

The primary impact that this recommendation can have while trying to optimize for one category.

Parameter
Name Description
var Impact
Returns
Type Description
$this

getAdditionalImpact

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
Type Description
Google\Protobuf\Internal\RepeatedField

setAdditionalImpact

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

Parameter
Name Description
var array<Impact>
Returns
Type Description
$this

getPriority

Recommendation's priority.

Returns
Type Description
int

setPriority

Recommendation's priority.

Parameter
Name Description
var int
Returns
Type Description
$this

getContent

Content of the recommendation describing recommended changes to resources.

Returns
Type Description
RecommendationContent|null

hasContent

clearContent

setContent

Content of the recommendation describing recommended changes to resources.

Parameter
Name Description
var RecommendationContent
Returns
Type Description
$this

getStateInfo

Information for state. Contains state and metadata.

Returns
Type Description
RecommendationStateInfo|null

hasStateInfo

clearStateInfo

setStateInfo

Information for state. Contains state and metadata.

Parameter
Name Description
var RecommendationStateInfo
Returns
Type Description
$this

getEtag

Fingerprint of the Recommendation. Provides optimistic locking when updating states.

Returns
Type Description
string

setEtag

Fingerprint of the Recommendation. Provides optimistic locking when updating states.

Parameter
Name Description
var string
Returns
Type Description
$this

getAssociatedInsights

Insights that led to this recommendation.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setAssociatedInsights

Insights that led to this recommendation.

Parameter
Name Description
var array<Recommendation\InsightReference>
Returns
Type Description
$this

getXorGroupId

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
Type Description
string

setXorGroupId

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.

Parameter
Name Description
var string
Returns
Type Description
$this