Class Recommendation

  • All Implemented Interfaces:
    RecommendationOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class Recommendation
    extends com.google.protobuf.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
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Name of recommendation.
         
        string name = 1;
        Specified by:
        getNameBytes in interface RecommendationOrBuilder
        Returns:
        The bytes for name.
      • getDescription

        public String getDescription()
         Free-form human readable summary in English. The maximum length is 500
         characters.
         
        string description = 2;
        Specified by:
        getDescription in interface RecommendationOrBuilder
        Returns:
        The description.
      • getDescriptionBytes

        public com.google.protobuf.ByteString getDescriptionBytes()
         Free-form human readable summary in English. The maximum length is 500
         characters.
         
        string description = 2;
        Specified by:
        getDescriptionBytes in interface RecommendationOrBuilder
        Returns:
        The bytes for description.
      • 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;
        Specified by:
        getRecommenderSubtype in interface RecommendationOrBuilder
        Returns:
        The recommenderSubtype.
      • getRecommenderSubtypeBytes

        public com.google.protobuf.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;
        Specified by:
        getRecommenderSubtypeBytes in interface RecommendationOrBuilder
        Returns:
        The bytes for recommenderSubtype.
      • 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;
        Specified by:
        hasLastRefreshTime in interface RecommendationOrBuilder
        Returns:
        Whether the lastRefreshTime field is set.
      • getLastRefreshTime

        public com.google.protobuf.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;
        Specified by:
        getLastRefreshTime in interface RecommendationOrBuilder
        Returns:
        The lastRefreshTime.
      • getLastRefreshTimeOrBuilder

        public com.google.protobuf.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;
        Specified by:
        getLastRefreshTimeOrBuilder in interface RecommendationOrBuilder
      • 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;
        Specified by:
        hasPrimaryImpact in interface RecommendationOrBuilder
        Returns:
        Whether the primaryImpact field is set.
      • 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;
        Specified by:
        getPrimaryImpact in interface RecommendationOrBuilder
        Returns:
        The primaryImpact.
      • 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;
        Specified by:
        getAdditionalImpactList in interface RecommendationOrBuilder
      • 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;
        Specified by:
        getAdditionalImpactOrBuilderList in interface RecommendationOrBuilder
      • 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;
        Specified by:
        getAdditionalImpactCount in interface RecommendationOrBuilder
      • getAdditionalImpact

        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;
        Specified by:
        getAdditionalImpact in interface RecommendationOrBuilder
      • getAdditionalImpactOrBuilder

        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;
        Specified by:
        getAdditionalImpactOrBuilder in interface RecommendationOrBuilder
      • getPriorityValue

        public int getPriorityValue()
         Recommendation's priority.
         
        .google.cloud.recommender.v1.Recommendation.Priority priority = 17;
        Specified by:
        getPriorityValue in interface RecommendationOrBuilder
        Returns:
        The enum numeric value on the wire for priority.
      • hasContent

        public boolean hasContent()
         Content of the recommendation describing recommended changes to resources.
         
        .google.cloud.recommender.v1.RecommendationContent content = 7;
        Specified by:
        hasContent in interface RecommendationOrBuilder
        Returns:
        Whether the content field is set.
      • getContent

        public RecommendationContent getContent()
         Content of the recommendation describing recommended changes to resources.
         
        .google.cloud.recommender.v1.RecommendationContent content = 7;
        Specified by:
        getContent in interface RecommendationOrBuilder
        Returns:
        The content.
      • hasStateInfo

        public boolean hasStateInfo()
         Information for state. Contains state and metadata.
         
        .google.cloud.recommender.v1.RecommendationStateInfo state_info = 10;
        Specified by:
        hasStateInfo in interface RecommendationOrBuilder
        Returns:
        Whether the stateInfo field is set.
      • getEtag

        public String getEtag()
         Fingerprint of the Recommendation. Provides optimistic locking when
         updating states.
         
        string etag = 11;
        Specified by:
        getEtag in interface RecommendationOrBuilder
        Returns:
        The etag.
      • getEtagBytes

        public com.google.protobuf.ByteString getEtagBytes()
         Fingerprint of the Recommendation. Provides optimistic locking when
         updating states.
         
        string etag = 11;
        Specified by:
        getEtagBytes in interface RecommendationOrBuilder
        Returns:
        The bytes for etag.
      • getAssociatedInsightsCount

        public int getAssociatedInsightsCount()
         Insights that led to this recommendation.
         
        repeated .google.cloud.recommender.v1.Recommendation.InsightReference associated_insights = 14;
        Specified by:
        getAssociatedInsightsCount in interface RecommendationOrBuilder
      • 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;
        Specified by:
        getXorGroupId in interface RecommendationOrBuilder
        Returns:
        The xorGroupId.
      • getXorGroupIdBytes

        public com.google.protobuf.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;
        Specified by:
        getXorGroupIdBytes in interface RecommendationOrBuilder
        Returns:
        The bytes for xorGroupId.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static Recommendation parseFrom​(ByteBuffer data)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Recommendation parseFrom​(ByteBuffer data,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Recommendation parseFrom​(com.google.protobuf.ByteString data)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Recommendation parseFrom​(com.google.protobuf.ByteString data,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Recommendation parseFrom​(byte[] data)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Recommendation parseFrom​(byte[] data,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static Recommendation parseFrom​(com.google.protobuf.CodedInputStream input,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws IOException
        Throws:
        IOException
      • newBuilderForType

        public Recommendation.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public Recommendation.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected Recommendation.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static Recommendation getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<Recommendation> parser()
      • getParserForType

        public com.google.protobuf.Parser<Recommendation> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public Recommendation getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder