Class Recommendation.Builder (2.33.0)

public static final class Recommendation.Builder extends GeneratedMessageV3.Builder<Recommendation.Builder> 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.v1beta1.Recommendation

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAdditionalImpact(Impact value)

public Recommendation.Builder addAdditionalImpact(Impact value)

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.v1beta1.Impact additional_impact = 6;

Parameter
NameDescription
valueImpact
Returns
TypeDescription
Recommendation.Builder

addAdditionalImpact(Impact.Builder builderForValue)

public Recommendation.Builder addAdditionalImpact(Impact.Builder builderForValue)

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.v1beta1.Impact additional_impact = 6;

Parameter
NameDescription
builderForValueImpact.Builder
Returns
TypeDescription
Recommendation.Builder

addAdditionalImpact(int index, Impact value)

public Recommendation.Builder addAdditionalImpact(int index, Impact value)

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.v1beta1.Impact additional_impact = 6;

Parameters
NameDescription
indexint
valueImpact
Returns
TypeDescription
Recommendation.Builder

addAdditionalImpact(int index, Impact.Builder builderForValue)

public Recommendation.Builder addAdditionalImpact(int index, Impact.Builder builderForValue)

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.v1beta1.Impact additional_impact = 6;

Parameters
NameDescription
indexint
builderForValueImpact.Builder
Returns
TypeDescription
Recommendation.Builder

addAdditionalImpactBuilder()

public Impact.Builder addAdditionalImpactBuilder()

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.v1beta1.Impact additional_impact = 6;

Returns
TypeDescription
Impact.Builder

addAdditionalImpactBuilder(int index)

public Impact.Builder addAdditionalImpactBuilder(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.v1beta1.Impact additional_impact = 6;

Parameter
NameDescription
indexint
Returns
TypeDescription
Impact.Builder

addAllAdditionalImpact(Iterable<? extends Impact> values)

public Recommendation.Builder addAllAdditionalImpact(Iterable<? extends Impact> values)

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.v1beta1.Impact additional_impact = 6;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.recommender.v1beta1.Impact>
Returns
TypeDescription
Recommendation.Builder

addAllAssociatedInsights(Iterable<? extends Recommendation.InsightReference> values)

public Recommendation.Builder addAllAssociatedInsights(Iterable<? extends Recommendation.InsightReference> values)

Insights that led to this recommendation.

repeated .google.cloud.recommender.v1beta1.Recommendation.InsightReference associated_insights = 14;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.recommender.v1beta1.Recommendation.InsightReference>
Returns
TypeDescription
Recommendation.Builder

addAssociatedInsights(Recommendation.InsightReference value)

public Recommendation.Builder addAssociatedInsights(Recommendation.InsightReference value)

Insights that led to this recommendation.

repeated .google.cloud.recommender.v1beta1.Recommendation.InsightReference associated_insights = 14;

Parameter
NameDescription
valueRecommendation.InsightReference
Returns
TypeDescription
Recommendation.Builder

addAssociatedInsights(Recommendation.InsightReference.Builder builderForValue)

public Recommendation.Builder addAssociatedInsights(Recommendation.InsightReference.Builder builderForValue)

Insights that led to this recommendation.

repeated .google.cloud.recommender.v1beta1.Recommendation.InsightReference associated_insights = 14;

Parameter
NameDescription
builderForValueRecommendation.InsightReference.Builder
Returns
TypeDescription
Recommendation.Builder

addAssociatedInsights(int index, Recommendation.InsightReference value)

public Recommendation.Builder addAssociatedInsights(int index, Recommendation.InsightReference value)

Insights that led to this recommendation.

repeated .google.cloud.recommender.v1beta1.Recommendation.InsightReference associated_insights = 14;

Parameters
NameDescription
indexint
valueRecommendation.InsightReference
Returns
TypeDescription
Recommendation.Builder

addAssociatedInsights(int index, Recommendation.InsightReference.Builder builderForValue)

public Recommendation.Builder addAssociatedInsights(int index, Recommendation.InsightReference.Builder builderForValue)

Insights that led to this recommendation.

repeated .google.cloud.recommender.v1beta1.Recommendation.InsightReference associated_insights = 14;

Parameters
NameDescription
indexint
builderForValueRecommendation.InsightReference.Builder
Returns
TypeDescription
Recommendation.Builder

addAssociatedInsightsBuilder()

public Recommendation.InsightReference.Builder addAssociatedInsightsBuilder()

Insights that led to this recommendation.

repeated .google.cloud.recommender.v1beta1.Recommendation.InsightReference associated_insights = 14;

Returns
TypeDescription
Recommendation.InsightReference.Builder

addAssociatedInsightsBuilder(int index)

public Recommendation.InsightReference.Builder addAssociatedInsightsBuilder(int index)

Insights that led to this recommendation.

repeated .google.cloud.recommender.v1beta1.Recommendation.InsightReference associated_insights = 14;

Parameter
NameDescription
indexint
Returns
TypeDescription
Recommendation.InsightReference.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Recommendation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Recommendation.Builder
Overrides

build()

public Recommendation build()
Returns
TypeDescription
Recommendation

buildPartial()

public Recommendation buildPartial()
Returns
TypeDescription
Recommendation

clear()

public Recommendation.Builder clear()
Returns
TypeDescription
Recommendation.Builder
Overrides

clearAdditionalImpact()

public Recommendation.Builder clearAdditionalImpact()

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.v1beta1.Impact additional_impact = 6;

Returns
TypeDescription
Recommendation.Builder

clearAssociatedInsights()

public Recommendation.Builder clearAssociatedInsights()

Insights that led to this recommendation.

repeated .google.cloud.recommender.v1beta1.Recommendation.InsightReference associated_insights = 14;

Returns
TypeDescription
Recommendation.Builder

clearContent()

public Recommendation.Builder clearContent()

Content of the recommendation describing recommended changes to resources.

.google.cloud.recommender.v1beta1.RecommendationContent content = 7;

Returns
TypeDescription
Recommendation.Builder

clearDescription()

public Recommendation.Builder clearDescription()

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

string description = 2;

Returns
TypeDescription
Recommendation.Builder

This builder for chaining.

clearEtag()

public Recommendation.Builder clearEtag()

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

string etag = 11;

Returns
TypeDescription
Recommendation.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Recommendation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Recommendation.Builder
Overrides

clearLastRefreshTime()

public Recommendation.Builder clearLastRefreshTime()

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

.google.protobuf.Timestamp last_refresh_time = 4;

Returns
TypeDescription
Recommendation.Builder

clearName()

public Recommendation.Builder clearName()

Name of recommendation.

string name = 1;

Returns
TypeDescription
Recommendation.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Recommendation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Recommendation.Builder
Overrides

clearPrimaryImpact()

public Recommendation.Builder clearPrimaryImpact()

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

.google.cloud.recommender.v1beta1.Impact primary_impact = 5;

Returns
TypeDescription
Recommendation.Builder

clearPriority()

public Recommendation.Builder clearPriority()

Recommendation's priority.

.google.cloud.recommender.v1beta1.Recommendation.Priority priority = 17;

Returns
TypeDescription
Recommendation.Builder

This builder for chaining.

clearRecommenderSubtype()

public Recommendation.Builder clearRecommenderSubtype()

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
TypeDescription
Recommendation.Builder

This builder for chaining.

clearStateInfo()

public Recommendation.Builder clearStateInfo()

Information for state. Contains state and metadata.

.google.cloud.recommender.v1beta1.RecommendationStateInfo state_info = 10;

Returns
TypeDescription
Recommendation.Builder

clearXorGroupId()

public Recommendation.Builder clearXorGroupId()

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.

string xor_group_id = 18;

Returns
TypeDescription
Recommendation.Builder

This builder for chaining.

clone()

public Recommendation.Builder clone()
Returns
TypeDescription
Recommendation.Builder
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.v1beta1.Impact additional_impact = 6;

Parameter
NameDescription
indexint
Returns
TypeDescription
Impact

getAdditionalImpactBuilder(int index)

public Impact.Builder getAdditionalImpactBuilder(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.v1beta1.Impact additional_impact = 6;

Parameter
NameDescription
indexint
Returns
TypeDescription
Impact.Builder

getAdditionalImpactBuilderList()

public List<Impact.Builder> getAdditionalImpactBuilderList()

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.v1beta1.Impact additional_impact = 6;

Returns
TypeDescription
List<Builder>

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.v1beta1.Impact additional_impact = 6;

Returns
TypeDescription
int

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.v1beta1.Impact additional_impact = 6;

Returns
TypeDescription
List<Impact>

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.v1beta1.Impact additional_impact = 6;

Parameter
NameDescription
indexint
Returns
TypeDescription
ImpactOrBuilder

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.v1beta1.Impact additional_impact = 6;

Returns
TypeDescription
List<? extends com.google.cloud.recommender.v1beta1.ImpactOrBuilder>

getAssociatedInsights(int index)

public Recommendation.InsightReference getAssociatedInsights(int index)

Insights that led to this recommendation.

repeated .google.cloud.recommender.v1beta1.Recommendation.InsightReference associated_insights = 14;

Parameter
NameDescription
indexint
Returns
TypeDescription
Recommendation.InsightReference

getAssociatedInsightsBuilder(int index)

public Recommendation.InsightReference.Builder getAssociatedInsightsBuilder(int index)

Insights that led to this recommendation.

repeated .google.cloud.recommender.v1beta1.Recommendation.InsightReference associated_insights = 14;

Parameter
NameDescription
indexint
Returns
TypeDescription
Recommendation.InsightReference.Builder

getAssociatedInsightsBuilderList()

public List<Recommendation.InsightReference.Builder> getAssociatedInsightsBuilderList()

Insights that led to this recommendation.

repeated .google.cloud.recommender.v1beta1.Recommendation.InsightReference associated_insights = 14;

Returns
TypeDescription
List<Builder>

getAssociatedInsightsCount()

public int getAssociatedInsightsCount()

Insights that led to this recommendation.

repeated .google.cloud.recommender.v1beta1.Recommendation.InsightReference associated_insights = 14;

Returns
TypeDescription
int

getAssociatedInsightsList()

public List<Recommendation.InsightReference> getAssociatedInsightsList()

Insights that led to this recommendation.

repeated .google.cloud.recommender.v1beta1.Recommendation.InsightReference associated_insights = 14;

Returns
TypeDescription
List<InsightReference>

getAssociatedInsightsOrBuilder(int index)

public Recommendation.InsightReferenceOrBuilder getAssociatedInsightsOrBuilder(int index)

Insights that led to this recommendation.

repeated .google.cloud.recommender.v1beta1.Recommendation.InsightReference associated_insights = 14;

Parameter
NameDescription
indexint
Returns
TypeDescription
Recommendation.InsightReferenceOrBuilder

getAssociatedInsightsOrBuilderList()

public List<? extends Recommendation.InsightReferenceOrBuilder> getAssociatedInsightsOrBuilderList()

Insights that led to this recommendation.

repeated .google.cloud.recommender.v1beta1.Recommendation.InsightReference associated_insights = 14;

Returns
TypeDescription
List<? extends com.google.cloud.recommender.v1beta1.Recommendation.InsightReferenceOrBuilder>

getContent()

public RecommendationContent getContent()

Content of the recommendation describing recommended changes to resources.

.google.cloud.recommender.v1beta1.RecommendationContent content = 7;

Returns
TypeDescription
RecommendationContent

The content.

getContentBuilder()

public RecommendationContent.Builder getContentBuilder()

Content of the recommendation describing recommended changes to resources.

.google.cloud.recommender.v1beta1.RecommendationContent content = 7;

Returns
TypeDescription
RecommendationContent.Builder

getContentOrBuilder()

public RecommendationContentOrBuilder getContentOrBuilder()

Content of the recommendation describing recommended changes to resources.

.google.cloud.recommender.v1beta1.RecommendationContent content = 7;

Returns
TypeDescription
RecommendationContentOrBuilder

getDefaultInstanceForType()

public Recommendation getDefaultInstanceForType()
Returns
TypeDescription
Recommendation

getDescription()

public String getDescription()

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

string description = 2;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

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

string description = 2;

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEtag()

public String getEtag()

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

string etag = 11;

Returns
TypeDescription
String

The etag.

getEtagBytes()

public ByteString getEtagBytes()

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

string etag = 11;

Returns
TypeDescription
ByteString

The bytes for etag.

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
TypeDescription
Timestamp

The lastRefreshTime.

getLastRefreshTimeBuilder()

public Timestamp.Builder getLastRefreshTimeBuilder()

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

.google.protobuf.Timestamp last_refresh_time = 4;

Returns
TypeDescription
Builder

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
TypeDescription
TimestampOrBuilder

getName()

public String getName()

Name of recommendation.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Name of recommendation.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getPrimaryImpact()

public Impact getPrimaryImpact()

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

.google.cloud.recommender.v1beta1.Impact primary_impact = 5;

Returns
TypeDescription
Impact

The primaryImpact.

getPrimaryImpactBuilder()

public Impact.Builder getPrimaryImpactBuilder()

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

.google.cloud.recommender.v1beta1.Impact primary_impact = 5;

Returns
TypeDescription
Impact.Builder

getPrimaryImpactOrBuilder()

public ImpactOrBuilder getPrimaryImpactOrBuilder()

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

.google.cloud.recommender.v1beta1.Impact primary_impact = 5;

Returns
TypeDescription
ImpactOrBuilder

getPriority()

public Recommendation.Priority getPriority()

Recommendation's priority.

.google.cloud.recommender.v1beta1.Recommendation.Priority priority = 17;

Returns
TypeDescription
Recommendation.Priority

The priority.

getPriorityValue()

public int getPriorityValue()

Recommendation's priority.

.google.cloud.recommender.v1beta1.Recommendation.Priority priority = 17;

Returns
TypeDescription
int

The enum numeric value on the wire for priority.

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
TypeDescription
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
TypeDescription
ByteString

The bytes for recommenderSubtype.

getStateInfo()

public RecommendationStateInfo getStateInfo()

Information for state. Contains state and metadata.

.google.cloud.recommender.v1beta1.RecommendationStateInfo state_info = 10;

Returns
TypeDescription
RecommendationStateInfo

The stateInfo.

getStateInfoBuilder()

public RecommendationStateInfo.Builder getStateInfoBuilder()

Information for state. Contains state and metadata.

.google.cloud.recommender.v1beta1.RecommendationStateInfo state_info = 10;

Returns
TypeDescription
RecommendationStateInfo.Builder

getStateInfoOrBuilder()

public RecommendationStateInfoOrBuilder getStateInfoOrBuilder()

Information for state. Contains state and metadata.

.google.cloud.recommender.v1beta1.RecommendationStateInfo state_info = 10;

Returns
TypeDescription
RecommendationStateInfoOrBuilder

getXorGroupId()

public String 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.

string xor_group_id = 18;

Returns
TypeDescription
String

The xorGroupId.

getXorGroupIdBytes()

public ByteString getXorGroupIdBytes()

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.

string xor_group_id = 18;

Returns
TypeDescription
ByteString

The bytes for xorGroupId.

hasContent()

public boolean hasContent()

Content of the recommendation describing recommended changes to resources.

.google.cloud.recommender.v1beta1.RecommendationContent content = 7;

Returns
TypeDescription
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
TypeDescription
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.v1beta1.Impact primary_impact = 5;

Returns
TypeDescription
boolean

Whether the primaryImpact field is set.

hasStateInfo()

public boolean hasStateInfo()

Information for state. Contains state and metadata.

.google.cloud.recommender.v1beta1.RecommendationStateInfo state_info = 10;

Returns
TypeDescription
boolean

Whether the stateInfo field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeContent(RecommendationContent value)

public Recommendation.Builder mergeContent(RecommendationContent value)

Content of the recommendation describing recommended changes to resources.

.google.cloud.recommender.v1beta1.RecommendationContent content = 7;

Parameter
NameDescription
valueRecommendationContent
Returns
TypeDescription
Recommendation.Builder

mergeFrom(Recommendation other)

public Recommendation.Builder mergeFrom(Recommendation other)
Parameter
NameDescription
otherRecommendation
Returns
TypeDescription
Recommendation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Recommendation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Recommendation.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Recommendation.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Recommendation.Builder
Overrides

mergeLastRefreshTime(Timestamp value)

public Recommendation.Builder mergeLastRefreshTime(Timestamp value)

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

.google.protobuf.Timestamp last_refresh_time = 4;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Recommendation.Builder

mergePrimaryImpact(Impact value)

public Recommendation.Builder mergePrimaryImpact(Impact value)

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

.google.cloud.recommender.v1beta1.Impact primary_impact = 5;

Parameter
NameDescription
valueImpact
Returns
TypeDescription
Recommendation.Builder

mergeStateInfo(RecommendationStateInfo value)

public Recommendation.Builder mergeStateInfo(RecommendationStateInfo value)

Information for state. Contains state and metadata.

.google.cloud.recommender.v1beta1.RecommendationStateInfo state_info = 10;

Parameter
NameDescription
valueRecommendationStateInfo
Returns
TypeDescription
Recommendation.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Recommendation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Recommendation.Builder
Overrides

removeAdditionalImpact(int index)

public Recommendation.Builder removeAdditionalImpact(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.v1beta1.Impact additional_impact = 6;

Parameter
NameDescription
indexint
Returns
TypeDescription
Recommendation.Builder

removeAssociatedInsights(int index)

public Recommendation.Builder removeAssociatedInsights(int index)

Insights that led to this recommendation.

repeated .google.cloud.recommender.v1beta1.Recommendation.InsightReference associated_insights = 14;

Parameter
NameDescription
indexint
Returns
TypeDescription
Recommendation.Builder

setAdditionalImpact(int index, Impact value)

public Recommendation.Builder setAdditionalImpact(int index, Impact value)

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.v1beta1.Impact additional_impact = 6;

Parameters
NameDescription
indexint
valueImpact
Returns
TypeDescription
Recommendation.Builder

setAdditionalImpact(int index, Impact.Builder builderForValue)

public Recommendation.Builder setAdditionalImpact(int index, Impact.Builder builderForValue)

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.v1beta1.Impact additional_impact = 6;

Parameters
NameDescription
indexint
builderForValueImpact.Builder
Returns
TypeDescription
Recommendation.Builder

setAssociatedInsights(int index, Recommendation.InsightReference value)

public Recommendation.Builder setAssociatedInsights(int index, Recommendation.InsightReference value)

Insights that led to this recommendation.

repeated .google.cloud.recommender.v1beta1.Recommendation.InsightReference associated_insights = 14;

Parameters
NameDescription
indexint
valueRecommendation.InsightReference
Returns
TypeDescription
Recommendation.Builder

setAssociatedInsights(int index, Recommendation.InsightReference.Builder builderForValue)

public Recommendation.Builder setAssociatedInsights(int index, Recommendation.InsightReference.Builder builderForValue)

Insights that led to this recommendation.

repeated .google.cloud.recommender.v1beta1.Recommendation.InsightReference associated_insights = 14;

Parameters
NameDescription
indexint
builderForValueRecommendation.InsightReference.Builder
Returns
TypeDescription
Recommendation.Builder

setContent(RecommendationContent value)

public Recommendation.Builder setContent(RecommendationContent value)

Content of the recommendation describing recommended changes to resources.

.google.cloud.recommender.v1beta1.RecommendationContent content = 7;

Parameter
NameDescription
valueRecommendationContent
Returns
TypeDescription
Recommendation.Builder

setContent(RecommendationContent.Builder builderForValue)

public Recommendation.Builder setContent(RecommendationContent.Builder builderForValue)

Content of the recommendation describing recommended changes to resources.

.google.cloud.recommender.v1beta1.RecommendationContent content = 7;

Parameter
NameDescription
builderForValueRecommendationContent.Builder
Returns
TypeDescription
Recommendation.Builder

setDescription(String value)

public Recommendation.Builder setDescription(String value)

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

string description = 2;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
Recommendation.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Recommendation.Builder setDescriptionBytes(ByteString value)

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

string description = 2;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
Recommendation.Builder

This builder for chaining.

setEtag(String value)

public Recommendation.Builder setEtag(String value)

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

string etag = 11;

Parameter
NameDescription
valueString

The etag to set.

Returns
TypeDescription
Recommendation.Builder

This builder for chaining.

setEtagBytes(ByteString value)

public Recommendation.Builder setEtagBytes(ByteString value)

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

string etag = 11;

Parameter
NameDescription
valueByteString

The bytes for etag to set.

Returns
TypeDescription
Recommendation.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Recommendation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Recommendation.Builder
Overrides

setLastRefreshTime(Timestamp value)

public Recommendation.Builder setLastRefreshTime(Timestamp value)

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

.google.protobuf.Timestamp last_refresh_time = 4;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Recommendation.Builder

setLastRefreshTime(Timestamp.Builder builderForValue)

public Recommendation.Builder setLastRefreshTime(Timestamp.Builder builderForValue)

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

.google.protobuf.Timestamp last_refresh_time = 4;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Recommendation.Builder

setName(String value)

public Recommendation.Builder setName(String value)

Name of recommendation.

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Recommendation.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Recommendation.Builder setNameBytes(ByteString value)

Name of recommendation.

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Recommendation.Builder

This builder for chaining.

setPrimaryImpact(Impact value)

public Recommendation.Builder setPrimaryImpact(Impact value)

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

.google.cloud.recommender.v1beta1.Impact primary_impact = 5;

Parameter
NameDescription
valueImpact
Returns
TypeDescription
Recommendation.Builder

setPrimaryImpact(Impact.Builder builderForValue)

public Recommendation.Builder setPrimaryImpact(Impact.Builder builderForValue)

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

.google.cloud.recommender.v1beta1.Impact primary_impact = 5;

Parameter
NameDescription
builderForValueImpact.Builder
Returns
TypeDescription
Recommendation.Builder

setPriority(Recommendation.Priority value)

public Recommendation.Builder setPriority(Recommendation.Priority value)

Recommendation's priority.

.google.cloud.recommender.v1beta1.Recommendation.Priority priority = 17;

Parameter
NameDescription
valueRecommendation.Priority

The priority to set.

Returns
TypeDescription
Recommendation.Builder

This builder for chaining.

setPriorityValue(int value)

public Recommendation.Builder setPriorityValue(int value)

Recommendation's priority.

.google.cloud.recommender.v1beta1.Recommendation.Priority priority = 17;

Parameter
NameDescription
valueint

The enum numeric value on the wire for priority to set.

Returns
TypeDescription
Recommendation.Builder

This builder for chaining.

setRecommenderSubtype(String value)

public Recommendation.Builder setRecommenderSubtype(String value)

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;

Parameter
NameDescription
valueString

The recommenderSubtype to set.

Returns
TypeDescription
Recommendation.Builder

This builder for chaining.

setRecommenderSubtypeBytes(ByteString value)

public Recommendation.Builder setRecommenderSubtypeBytes(ByteString value)

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;

Parameter
NameDescription
valueByteString

The bytes for recommenderSubtype to set.

Returns
TypeDescription
Recommendation.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Recommendation.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Recommendation.Builder
Overrides

setStateInfo(RecommendationStateInfo value)

public Recommendation.Builder setStateInfo(RecommendationStateInfo value)

Information for state. Contains state and metadata.

.google.cloud.recommender.v1beta1.RecommendationStateInfo state_info = 10;

Parameter
NameDescription
valueRecommendationStateInfo
Returns
TypeDescription
Recommendation.Builder

setStateInfo(RecommendationStateInfo.Builder builderForValue)

public Recommendation.Builder setStateInfo(RecommendationStateInfo.Builder builderForValue)

Information for state. Contains state and metadata.

.google.cloud.recommender.v1beta1.RecommendationStateInfo state_info = 10;

Parameter
NameDescription
builderForValueRecommendationStateInfo.Builder
Returns
TypeDescription
Recommendation.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Recommendation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Recommendation.Builder
Overrides

setXorGroupId(String value)

public Recommendation.Builder setXorGroupId(String value)

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.

string xor_group_id = 18;

Parameter
NameDescription
valueString

The xorGroupId to set.

Returns
TypeDescription
Recommendation.Builder

This builder for chaining.

setXorGroupIdBytes(ByteString value)

public Recommendation.Builder setXorGroupIdBytes(ByteString value)

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.

string xor_group_id = 18;

Parameter
NameDescription
valueByteString

The bytes for xorGroupId to set.

Returns
TypeDescription
Recommendation.Builder

This builder for chaining.