public final class Recommendation extends GeneratedMessageV3 implements RecommendationOrBuilder
A recommendation along with a suggested action. E.g., a rightsizing
recommendation for an underutilized VM, IAM role recommendations, etc
Protobuf type google.cloud.recommender.v1.Recommendation
Fields
ADDITIONAL_IMPACT_FIELD_NUMBER
public static final int ADDITIONAL_IMPACT_FIELD_NUMBER
Field Value
ASSOCIATED_INSIGHTS_FIELD_NUMBER
public static final int ASSOCIATED_INSIGHTS_FIELD_NUMBER
Field Value
CONTENT_FIELD_NUMBER
public static final int CONTENT_FIELD_NUMBER
Field Value
DESCRIPTION_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER
Field Value
ETAG_FIELD_NUMBER
public static final int ETAG_FIELD_NUMBER
Field Value
LAST_REFRESH_TIME_FIELD_NUMBER
public static final int LAST_REFRESH_TIME_FIELD_NUMBER
Field Value
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value
PRIMARY_IMPACT_FIELD_NUMBER
public static final int PRIMARY_IMPACT_FIELD_NUMBER
Field Value
RECOMMENDER_SUBTYPE_FIELD_NUMBER
public static final int RECOMMENDER_SUBTYPE_FIELD_NUMBER
Field Value
STATE_INFO_FIELD_NUMBER
public static final int STATE_INFO_FIELD_NUMBER
Field Value
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getAdditionalImpact(int index)
public Impact getAdditionalImpact(int index)
Optional set of additional impact that this recommendation may have when
trying to optimize for the primary category. These may be positive
or negative.
repeated .google.cloud.recommender.v1.Impact additional_impact = 6;
Parameter
Returns
getAdditionalImpactCount()
public int getAdditionalImpactCount()
Optional set of additional impact that this recommendation may have when
trying to optimize for the primary category. These may be positive
or negative.
repeated .google.cloud.recommender.v1.Impact additional_impact = 6;
Returns
getAdditionalImpactList()
public List<Impact> getAdditionalImpactList()
Optional set of additional impact that this recommendation may have when
trying to optimize for the primary category. These may be positive
or negative.
repeated .google.cloud.recommender.v1.Impact additional_impact = 6;
Returns
getAdditionalImpactOrBuilder(int index)
public ImpactOrBuilder getAdditionalImpactOrBuilder(int index)
Optional set of additional impact that this recommendation may have when
trying to optimize for the primary category. These may be positive
or negative.
repeated .google.cloud.recommender.v1.Impact additional_impact = 6;
Parameter
Returns
getAdditionalImpactOrBuilderList()
public List<? extends ImpactOrBuilder> getAdditionalImpactOrBuilderList()
Optional set of additional impact that this recommendation may have when
trying to optimize for the primary category. These may be positive
or negative.
repeated .google.cloud.recommender.v1.Impact additional_impact = 6;
Returns
Type | Description |
List<? extends com.google.cloud.recommender.v1.ImpactOrBuilder> | |
getAssociatedInsights(int index)
public Recommendation.InsightReference getAssociatedInsights(int index)
Insights that led to this recommendation.
repeated .google.cloud.recommender.v1.Recommendation.InsightReference associated_insights = 14;
Parameter
Returns
getAssociatedInsightsCount()
public int getAssociatedInsightsCount()
Insights that led to this recommendation.
repeated .google.cloud.recommender.v1.Recommendation.InsightReference associated_insights = 14;
Returns
getAssociatedInsightsList()
public List<Recommendation.InsightReference> getAssociatedInsightsList()
Insights that led to this recommendation.
repeated .google.cloud.recommender.v1.Recommendation.InsightReference associated_insights = 14;
Returns
getAssociatedInsightsOrBuilder(int index)
public Recommendation.InsightReferenceOrBuilder getAssociatedInsightsOrBuilder(int index)
Insights that led to this recommendation.
repeated .google.cloud.recommender.v1.Recommendation.InsightReference associated_insights = 14;
Parameter
Returns
getAssociatedInsightsOrBuilderList()
public List<? extends Recommendation.InsightReferenceOrBuilder> getAssociatedInsightsOrBuilderList()
Insights that led to this recommendation.
repeated .google.cloud.recommender.v1.Recommendation.InsightReference associated_insights = 14;
Returns
Type | Description |
List<? extends com.google.cloud.recommender.v1.Recommendation.InsightReferenceOrBuilder> | |
getContent()
public RecommendationContent getContent()
Content of the recommendation describing recommended changes to resources.
.google.cloud.recommender.v1.RecommendationContent content = 7;
Returns
getContentOrBuilder()
public RecommendationContentOrBuilder getContentOrBuilder()
Content of the recommendation describing recommended changes to resources.
.google.cloud.recommender.v1.RecommendationContent content = 7;
Returns
getDefaultInstance()
public static Recommendation getDefaultInstance()
Returns
getDefaultInstanceForType()
public Recommendation getDefaultInstanceForType()
Returns
getDescription()
public String getDescription()
Free-form human readable summary in English. The maximum length is 500
characters.
string description = 2;
Returns
Type | Description |
String | The description.
|
getDescriptionBytes()
public ByteString getDescriptionBytes()
Free-form human readable summary in English. The maximum length is 500
characters.
string description = 2;
Returns
Type | Description |
ByteString | The bytes for description.
|
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
getEtag()
Fingerprint of the Recommendation. Provides optimistic locking when
updating states.
string etag = 11;
Returns
Type | Description |
String | The etag.
|
getEtagBytes()
public ByteString getEtagBytes()
Fingerprint of the Recommendation. Provides optimistic locking when
updating states.
string etag = 11;
Returns
getLastRefreshTime()
public Timestamp getLastRefreshTime()
Last time this recommendation was refreshed by the system that created it
in the first place.
.google.protobuf.Timestamp last_refresh_time = 4;
Returns
getLastRefreshTimeOrBuilder()
public TimestampOrBuilder getLastRefreshTimeOrBuilder()
Last time this recommendation was refreshed by the system that created it
in the first place.
.google.protobuf.Timestamp last_refresh_time = 4;
Returns
getName()
Name of recommendation.
string name = 1;
Returns
Type | Description |
String | The name.
|
getNameBytes()
public ByteString getNameBytes()
Name of recommendation.
string name = 1;
Returns
getParserForType()
public Parser<Recommendation> getParserForType()
Returns
Overrides
getPrimaryImpact()
public Impact getPrimaryImpact()
The primary impact that this recommendation can have while trying to
optimize for one category.
.google.cloud.recommender.v1.Impact primary_impact = 5;
Returns
Type | Description |
Impact | The primaryImpact.
|
getPrimaryImpactOrBuilder()
public ImpactOrBuilder getPrimaryImpactOrBuilder()
The primary impact that this recommendation can have while trying to
optimize for one category.
.google.cloud.recommender.v1.Impact primary_impact = 5;
Returns
getRecommenderSubtype()
public String 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"
string recommender_subtype = 12;
Returns
Type | Description |
String | The recommenderSubtype.
|
getRecommenderSubtypeBytes()
public ByteString getRecommenderSubtypeBytes()
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"
string recommender_subtype = 12;
Returns
Type | Description |
ByteString | The bytes for recommenderSubtype.
|
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getStateInfo()
public RecommendationStateInfo getStateInfo()
Information for state. Contains state and metadata.
.google.cloud.recommender.v1.RecommendationStateInfo state_info = 10;
Returns
getStateInfoOrBuilder()
public RecommendationStateInfoOrBuilder getStateInfoOrBuilder()
Information for state. Contains state and metadata.
.google.cloud.recommender.v1.RecommendationStateInfo state_info = 10;
Returns
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hasContent()
public boolean hasContent()
Content of the recommendation describing recommended changes to resources.
.google.cloud.recommender.v1.RecommendationContent content = 7;
Returns
Type | Description |
boolean | Whether the content field is set.
|
hasLastRefreshTime()
public boolean hasLastRefreshTime()
Last time this recommendation was refreshed by the system that created it
in the first place.
.google.protobuf.Timestamp last_refresh_time = 4;
Returns
Type | Description |
boolean | Whether the lastRefreshTime field is set.
|
hasPrimaryImpact()
public boolean hasPrimaryImpact()
The primary impact that this recommendation can have while trying to
optimize for one category.
.google.cloud.recommender.v1.Impact primary_impact = 5;
Returns
Type | Description |
boolean | Whether the primaryImpact field is set.
|
hasStateInfo()
public boolean hasStateInfo()
Information for state. Contains state and metadata.
.google.cloud.recommender.v1.RecommendationStateInfo state_info = 10;
Returns
Type | Description |
boolean | Whether the stateInfo field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilder()
public static Recommendation.Builder newBuilder()
Returns
newBuilder(Recommendation prototype)
public static Recommendation.Builder newBuilder(Recommendation prototype)
Parameter
Returns
newBuilderForType()
public Recommendation.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Recommendation.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
public static Recommendation parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static Recommendation parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static Recommendation parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Recommendation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static Recommendation parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Recommendation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Recommendation parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static Recommendation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Recommendation parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static Recommendation parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static Recommendation parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Recommendation parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<Recommendation> parser()
Returns
toBuilder()
public Recommendation.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions