Class Insight (2.35.0)

public final class Insight extends 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.v1.Insight

Implements

InsightOrBuilder

Static Fields

ASSOCIATED_RECOMMENDATIONS_FIELD_NUMBER

public static final int ASSOCIATED_RECOMMENDATIONS_FIELD_NUMBER
Field Value
TypeDescription
int

CATEGORY_FIELD_NUMBER

public static final int CATEGORY_FIELD_NUMBER
Field Value
TypeDescription
int

CONTENT_FIELD_NUMBER

public static final int CONTENT_FIELD_NUMBER
Field Value
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

ETAG_FIELD_NUMBER

public static final int ETAG_FIELD_NUMBER
Field Value
TypeDescription
int

INSIGHT_SUBTYPE_FIELD_NUMBER

public static final int INSIGHT_SUBTYPE_FIELD_NUMBER
Field Value
TypeDescription
int

LAST_REFRESH_TIME_FIELD_NUMBER

public static final int LAST_REFRESH_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

OBSERVATION_PERIOD_FIELD_NUMBER

public static final int OBSERVATION_PERIOD_FIELD_NUMBER
Field Value
TypeDescription
int

SEVERITY_FIELD_NUMBER

public static final int SEVERITY_FIELD_NUMBER
Field Value
TypeDescription
int

STATE_INFO_FIELD_NUMBER

public static final int STATE_INFO_FIELD_NUMBER
Field Value
TypeDescription
int

TARGET_RESOURCES_FIELD_NUMBER

public static final int TARGET_RESOURCES_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Insight getDefaultInstance()
Returns
TypeDescription
Insight

getDescriptor()

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

newBuilder()

public static Insight.Builder newBuilder()
Returns
TypeDescription
Insight.Builder

newBuilder(Insight prototype)

public static Insight.Builder newBuilder(Insight prototype)
Parameter
NameDescription
prototypeInsight
Returns
TypeDescription
Insight.Builder

parseDelimitedFrom(InputStream input)

public static Insight parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Insight
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Insight parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Insight
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Insight parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Insight
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Insight parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Insight
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Insight parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Insight
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Insight parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Insight
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Insight parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Insight
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Insight parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Insight
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Insight parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Insight
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Insight parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Insight
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Insight parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Insight
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Insight parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Insight
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Insight> parser()
Returns
TypeDescription
Parser<Insight>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAssociatedRecommendations(int index)

public Insight.RecommendationReference getAssociatedRecommendations(int index)

Recommendations derived from this insight.

repeated .google.cloud.recommender.v1.Insight.RecommendationReference associated_recommendations = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
Insight.RecommendationReference

getAssociatedRecommendationsCount()

public int getAssociatedRecommendationsCount()

Recommendations derived from this insight.

repeated .google.cloud.recommender.v1.Insight.RecommendationReference associated_recommendations = 8;

Returns
TypeDescription
int

getAssociatedRecommendationsList()

public List<Insight.RecommendationReference> getAssociatedRecommendationsList()

Recommendations derived from this insight.

repeated .google.cloud.recommender.v1.Insight.RecommendationReference associated_recommendations = 8;

Returns
TypeDescription
List<RecommendationReference>

getAssociatedRecommendationsOrBuilder(int index)

public Insight.RecommendationReferenceOrBuilder getAssociatedRecommendationsOrBuilder(int index)

Recommendations derived from this insight.

repeated .google.cloud.recommender.v1.Insight.RecommendationReference associated_recommendations = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
Insight.RecommendationReferenceOrBuilder

getAssociatedRecommendationsOrBuilderList()

public List<? extends Insight.RecommendationReferenceOrBuilder> getAssociatedRecommendationsOrBuilderList()

Recommendations derived from this insight.

repeated .google.cloud.recommender.v1.Insight.RecommendationReference associated_recommendations = 8;

Returns
TypeDescription
List<? extends com.google.cloud.recommender.v1.Insight.RecommendationReferenceOrBuilder>

getCategory()

public Insight.Category getCategory()

Category being targeted by the insight.

.google.cloud.recommender.v1.Insight.Category category = 7;

Returns
TypeDescription
Insight.Category

The category.

getCategoryValue()

public int getCategoryValue()

Category being targeted by the insight.

.google.cloud.recommender.v1.Insight.Category category = 7;

Returns
TypeDescription
int

The enum numeric value on the wire for category.

getContent()

public Struct getContent()

A struct of custom fields to explain the insight. Example: "grantedPermissionsCount": "1000"

.google.protobuf.Struct content = 3;

Returns
TypeDescription
Struct

The content.

getContentOrBuilder()

public StructOrBuilder getContentOrBuilder()

A struct of custom fields to explain the insight. Example: "grantedPermissionsCount": "1000"

.google.protobuf.Struct content = 3;

Returns
TypeDescription
StructOrBuilder

getDefaultInstanceForType()

public Insight getDefaultInstanceForType()
Returns
TypeDescription
Insight

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.

getEtag()

public String getEtag()

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

string etag = 11;

Returns
TypeDescription
String

The etag.

getEtagBytes()

public ByteString getEtagBytes()

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

string etag = 11;

Returns
TypeDescription
ByteString

The bytes for etag.

getInsightSubtype()

public String getInsightSubtype()

Insight subtype. Insight content schema will be stable for a given subtype.

string insight_subtype = 10;

Returns
TypeDescription
String

The insightSubtype.

getInsightSubtypeBytes()

public ByteString getInsightSubtypeBytes()

Insight subtype. Insight content schema will be stable for a given subtype.

string insight_subtype = 10;

Returns
TypeDescription
ByteString

The bytes for insightSubtype.

getLastRefreshTime()

public Timestamp getLastRefreshTime()

Timestamp of the latest data used to generate the insight.

.google.protobuf.Timestamp last_refresh_time = 4;

Returns
TypeDescription
Timestamp

The lastRefreshTime.

getLastRefreshTimeOrBuilder()

public TimestampOrBuilder getLastRefreshTimeOrBuilder()

Timestamp of the latest data used to generate the insight.

.google.protobuf.Timestamp last_refresh_time = 4;

Returns
TypeDescription
TimestampOrBuilder

getName()

public String getName()

Name of the insight.

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Name of the insight.

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getObservationPeriod()

public 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;

Returns
TypeDescription
Duration

The observationPeriod.

getObservationPeriodOrBuilder()

public 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;

Returns
TypeDescription
DurationOrBuilder

getParserForType()

public Parser<Insight> getParserForType()
Returns
TypeDescription
Parser<Insight>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSeverity()

public Insight.Severity getSeverity()

Insight's severity.

.google.cloud.recommender.v1.Insight.Severity severity = 15;

Returns
TypeDescription
Insight.Severity

The severity.

getSeverityValue()

public int getSeverityValue()

Insight's severity.

.google.cloud.recommender.v1.Insight.Severity severity = 15;

Returns
TypeDescription
int

The enum numeric value on the wire for severity.

getStateInfo()

public InsightStateInfo getStateInfo()

Information state and metadata.

.google.cloud.recommender.v1.InsightStateInfo state_info = 6;

Returns
TypeDescription
InsightStateInfo

The stateInfo.

getStateInfoOrBuilder()

public InsightStateInfoOrBuilder getStateInfoOrBuilder()

Information state and metadata.

.google.cloud.recommender.v1.InsightStateInfo state_info = 6;

Returns
TypeDescription
InsightStateInfoOrBuilder

getTargetResources(int index)

public String getTargetResources(int index)

Fully qualified resource names that this insight is targeting.

repeated string target_resources = 9;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The targetResources at the given index.

getTargetResourcesBytes(int index)

public ByteString getTargetResourcesBytes(int index)

Fully qualified resource names that this insight is targeting.

repeated string target_resources = 9;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the targetResources at the given index.

getTargetResourcesCount()

public int getTargetResourcesCount()

Fully qualified resource names that this insight is targeting.

repeated string target_resources = 9;

Returns
TypeDescription
int

The count of targetResources.

getTargetResourcesList()

public ProtocolStringList getTargetResourcesList()

Fully qualified resource names that this insight is targeting.

repeated string target_resources = 9;

Returns
TypeDescription
ProtocolStringList

A list containing the targetResources.

hasContent()

public boolean hasContent()

A struct of custom fields to explain the insight. Example: "grantedPermissionsCount": "1000"

.google.protobuf.Struct content = 3;

Returns
TypeDescription
boolean

Whether the content field is set.

hasLastRefreshTime()

public boolean hasLastRefreshTime()

Timestamp of the latest data used to generate the insight.

.google.protobuf.Timestamp last_refresh_time = 4;

Returns
TypeDescription
boolean

Whether the lastRefreshTime field is set.

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;

Returns
TypeDescription
boolean

Whether the observationPeriod field is set.

hasStateInfo()

public boolean hasStateInfo()

Information state and metadata.

.google.cloud.recommender.v1.InsightStateInfo state_info = 6;

Returns
TypeDescription
boolean

Whether the stateInfo field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Insight.Builder newBuilderForType()
Returns
TypeDescription
Insight.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Insight.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Insight.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Insight.Builder toBuilder()
Returns
TypeDescription
Insight.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException