Class Insight

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

    public final class Insight
    extends com.google.protobuf.GeneratedMessageV3
    implements InsightOrBuilder
     An insight along with the information used to derive the insight. The insight
     may have associated recommendations as well.
     
    Protobuf type google.cloud.recommender.v1beta1.Insight
    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
      • getName

        public String getName()
         Name of the insight.
         
        string name = 1;
        Specified by:
        getName in interface InsightOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Name of the insight.
         
        string name = 1;
        Specified by:
        getNameBytes in interface InsightOrBuilder
        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 InsightOrBuilder
        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 InsightOrBuilder
        Returns:
        The bytes for description.
      • getTargetResourcesList

        public com.google.protobuf.ProtocolStringList getTargetResourcesList()
         Fully qualified resource names that this insight is targeting.
         
        repeated string target_resources = 9;
        Specified by:
        getTargetResourcesList in interface InsightOrBuilder
        Returns:
        A list containing the targetResources.
      • getTargetResourcesCount

        public int getTargetResourcesCount()
         Fully qualified resource names that this insight is targeting.
         
        repeated string target_resources = 9;
        Specified by:
        getTargetResourcesCount in interface InsightOrBuilder
        Returns:
        The count of targetResources.
      • getTargetResources

        public String getTargetResources​(int index)
         Fully qualified resource names that this insight is targeting.
         
        repeated string target_resources = 9;
        Specified by:
        getTargetResources in interface InsightOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The targetResources at the given index.
      • getTargetResourcesBytes

        public com.google.protobuf.ByteString getTargetResourcesBytes​(int index)
         Fully qualified resource names that this insight is targeting.
         
        repeated string target_resources = 9;
        Specified by:
        getTargetResourcesBytes in interface InsightOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the targetResources at the given index.
      • getInsightSubtype

        public String getInsightSubtype()
         Insight subtype. Insight content schema will be stable for a given subtype.
         
        string insight_subtype = 10;
        Specified by:
        getInsightSubtype in interface InsightOrBuilder
        Returns:
        The insightSubtype.
      • getInsightSubtypeBytes

        public com.google.protobuf.ByteString getInsightSubtypeBytes()
         Insight subtype. Insight content schema will be stable for a given subtype.
         
        string insight_subtype = 10;
        Specified by:
        getInsightSubtypeBytes in interface InsightOrBuilder
        Returns:
        The bytes for insightSubtype.
      • hasContent

        public boolean hasContent()
         A struct of custom fields to explain the insight.
         Example: "grantedPermissionsCount": "1000"
         
        .google.protobuf.Struct content = 3;
        Specified by:
        hasContent in interface InsightOrBuilder
        Returns:
        Whether the content field is set.
      • getContent

        public com.google.protobuf.Struct getContent()
         A struct of custom fields to explain the insight.
         Example: "grantedPermissionsCount": "1000"
         
        .google.protobuf.Struct content = 3;
        Specified by:
        getContent in interface InsightOrBuilder
        Returns:
        The content.
      • getContentOrBuilder

        public com.google.protobuf.StructOrBuilder getContentOrBuilder()
         A struct of custom fields to explain the insight.
         Example: "grantedPermissionsCount": "1000"
         
        .google.protobuf.Struct content = 3;
        Specified by:
        getContentOrBuilder in interface InsightOrBuilder
      • hasLastRefreshTime

        public boolean hasLastRefreshTime()
         Timestamp of the latest data used to generate the insight.
         
        .google.protobuf.Timestamp last_refresh_time = 4;
        Specified by:
        hasLastRefreshTime in interface InsightOrBuilder
        Returns:
        Whether the lastRefreshTime field is set.
      • getLastRefreshTime

        public com.google.protobuf.Timestamp getLastRefreshTime()
         Timestamp of the latest data used to generate the insight.
         
        .google.protobuf.Timestamp last_refresh_time = 4;
        Specified by:
        getLastRefreshTime in interface InsightOrBuilder
        Returns:
        The lastRefreshTime.
      • getLastRefreshTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getLastRefreshTimeOrBuilder()
         Timestamp of the latest data used to generate the insight.
         
        .google.protobuf.Timestamp last_refresh_time = 4;
        Specified by:
        getLastRefreshTimeOrBuilder in interface InsightOrBuilder
      • hasObservationPeriod

        public boolean hasObservationPeriod()
         Observation period that led to the insight. The source data used to
         generate the insight ends at last_refresh_time and begins at
         (last_refresh_time - observation_period).
         
        .google.protobuf.Duration observation_period = 5;
        Specified by:
        hasObservationPeriod in interface InsightOrBuilder
        Returns:
        Whether the observationPeriod field is set.
      • getObservationPeriod

        public com.google.protobuf.Duration getObservationPeriod()
         Observation period that led to the insight. The source data used to
         generate the insight ends at last_refresh_time and begins at
         (last_refresh_time - observation_period).
         
        .google.protobuf.Duration observation_period = 5;
        Specified by:
        getObservationPeriod in interface InsightOrBuilder
        Returns:
        The observationPeriod.
      • getObservationPeriodOrBuilder

        public com.google.protobuf.DurationOrBuilder getObservationPeriodOrBuilder()
         Observation period that led to the insight. The source data used to
         generate the insight ends at last_refresh_time and begins at
         (last_refresh_time - observation_period).
         
        .google.protobuf.Duration observation_period = 5;
        Specified by:
        getObservationPeriodOrBuilder in interface InsightOrBuilder
      • hasStateInfo

        public boolean hasStateInfo()
         Information state and metadata.
         
        .google.cloud.recommender.v1beta1.InsightStateInfo state_info = 6;
        Specified by:
        hasStateInfo in interface InsightOrBuilder
        Returns:
        Whether the stateInfo field is set.
      • getStateInfo

        public InsightStateInfo getStateInfo()
         Information state and metadata.
         
        .google.cloud.recommender.v1beta1.InsightStateInfo state_info = 6;
        Specified by:
        getStateInfo in interface InsightOrBuilder
        Returns:
        The stateInfo.
      • getCategoryValue

        public int getCategoryValue()
         Category being targeted by the insight.
         
        .google.cloud.recommender.v1beta1.Insight.Category category = 7;
        Specified by:
        getCategoryValue in interface InsightOrBuilder
        Returns:
        The enum numeric value on the wire for category.
      • getCategory

        public Insight.Category getCategory()
         Category being targeted by the insight.
         
        .google.cloud.recommender.v1beta1.Insight.Category category = 7;
        Specified by:
        getCategory in interface InsightOrBuilder
        Returns:
        The category.
      • getSeverityValue

        public int getSeverityValue()
         Insight's severity.
         
        .google.cloud.recommender.v1beta1.Insight.Severity severity = 15;
        Specified by:
        getSeverityValue in interface InsightOrBuilder
        Returns:
        The enum numeric value on the wire for severity.
      • getSeverity

        public Insight.Severity getSeverity()
         Insight's severity.
         
        .google.cloud.recommender.v1beta1.Insight.Severity severity = 15;
        Specified by:
        getSeverity in interface InsightOrBuilder
        Returns:
        The severity.
      • getEtag

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

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

        public int getAssociatedRecommendationsCount()
         Recommendations derived from this insight.
         
        repeated .google.cloud.recommender.v1beta1.Insight.RecommendationReference associated_recommendations = 8;
        Specified by:
        getAssociatedRecommendationsCount in interface InsightOrBuilder
      • 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 Insight parseFrom​(ByteBuffer data)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

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

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

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

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

        public static Insight getDefaultInstance()
      • parser

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

        public com.google.protobuf.Parser<Insight> 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 Insight getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder