Recommender V1 Client - Class Recommendation (1.9.1)

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
NameDescription
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 Google\Cloud\Recommender\V1\Impact

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

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

↳ priority int

Recommendation's priority.

↳ content Google\Cloud\Recommender\V1\RecommendationContent

Content of the recommendation describing recommended changes to resources.

↳ state_info Google\Cloud\Recommender\V1\RecommendationStateInfo

Information for state. Contains state and metadata.

↳ etag string

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

↳ associated_insights array<Google\Cloud\Recommender\V1\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
TypeDescription
string

setName

Name of recommendation.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDescription

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

Returns
TypeDescription
string

setDescription

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

Parameter
NameDescription
var string
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var string
Returns
TypeDescription
$this

getLastRefreshTime

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

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasLastRefreshTime

clearLastRefreshTime

setLastRefreshTime

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

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getPrimaryImpact

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

Returns
TypeDescription
Google\Cloud\Recommender\V1\Impact|null

hasPrimaryImpact

clearPrimaryImpact

setPrimaryImpact

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

Parameter
NameDescription
var Google\Cloud\Recommender\V1\Impact
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var array<Google\Cloud\Recommender\V1\Impact>
Returns
TypeDescription
$this

getPriority

Recommendation's priority.

Returns
TypeDescription
int

setPriority

Recommendation's priority.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getContent

Content of the recommendation describing recommended changes to resources.

Returns
TypeDescription
Google\Cloud\Recommender\V1\RecommendationContent|null

hasContent

clearContent

setContent

Content of the recommendation describing recommended changes to resources.

Parameter
NameDescription
var Google\Cloud\Recommender\V1\RecommendationContent
Returns
TypeDescription
$this

getStateInfo

Information for state. Contains state and metadata.

Returns
TypeDescription
Google\Cloud\Recommender\V1\RecommendationStateInfo|null

hasStateInfo

clearStateInfo

setStateInfo

Information for state. Contains state and metadata.

Parameter
NameDescription
var Google\Cloud\Recommender\V1\RecommendationStateInfo
Returns
TypeDescription
$this

getEtag

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

Returns
TypeDescription
string

setEtag

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getAssociatedInsights

Insights that led to this recommendation.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setAssociatedInsights

Insights that led to this recommendation.

Parameter
NameDescription
var array<Google\Cloud\Recommender\V1\Recommendation\InsightReference>
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var string
Returns
TypeDescription
$this