Class Insight (2.57.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
Type Description
int

CATEGORY_FIELD_NUMBER

public static final int CATEGORY_FIELD_NUMBER
Field Value
Type Description
int

CONTENT_FIELD_NUMBER

public static final int CONTENT_FIELD_NUMBER
Field Value
Type Description
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

ETAG_FIELD_NUMBER

public static final int ETAG_FIELD_NUMBER
Field Value
Type Description
int

INSIGHT_SUBTYPE_FIELD_NUMBER

public static final int INSIGHT_SUBTYPE_FIELD_NUMBER
Field Value
Type Description
int

LAST_REFRESH_TIME_FIELD_NUMBER

public static final int LAST_REFRESH_TIME_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

OBSERVATION_PERIOD_FIELD_NUMBER

public static final int OBSERVATION_PERIOD_FIELD_NUMBER
Field Value
Type Description
int

SEVERITY_FIELD_NUMBER

public static final int SEVERITY_FIELD_NUMBER
Field Value
Type Description
int

STATE_INFO_FIELD_NUMBER

public static final int STATE_INFO_FIELD_NUMBER
Field Value
Type Description
int

TARGET_RESOURCES_FIELD_NUMBER

public static final int TARGET_RESOURCES_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Insight getDefaultInstance()
Returns
Type Description
Insight

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static Insight.Builder newBuilder()
Returns
Type Description
Insight.Builder

newBuilder(Insight prototype)

public static Insight.Builder newBuilder(Insight prototype)
Parameter
Name Description
prototype Insight
Returns
Type Description
Insight.Builder

parseDelimitedFrom(InputStream input)

public static Insight parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Insight
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Insight parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Insight
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Insight parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Insight
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Insight parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Insight
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Insight parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Insight
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Insight parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Insight
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Insight parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Insight
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Insight parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Insight
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Insight parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Insight
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Insight parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Insight
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Insight parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Insight
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Insight parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Insight
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Insight> parser()
Returns
Type Description
Parser<Insight>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
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
Name Description
index int
Returns
Type Description
Insight.RecommendationReference

getAssociatedRecommendationsCount()

public int getAssociatedRecommendationsCount()

Recommendations derived from this insight.

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

Returns
Type Description
int

getAssociatedRecommendationsList()

public List<Insight.RecommendationReference> getAssociatedRecommendationsList()

Recommendations derived from this insight.

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

Returns
Type Description
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
Name Description
index int
Returns
Type Description
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
Type Description
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
Type Description
Insight.Category

The category.

getCategoryValue()

public int getCategoryValue()

Category being targeted by the insight.

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

Returns
Type Description
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
Type Description
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
Type Description
StructOrBuilder

getDefaultInstanceForType()

public Insight getDefaultInstanceForType()
Returns
Type Description
Insight

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.

getEtag()

public String getEtag()

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

string etag = 11;

Returns
Type Description
String

The etag.

getEtagBytes()

public ByteString getEtagBytes()

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

string etag = 11;

Returns
Type Description
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
Type Description
String

The insightSubtype.

getInsightSubtypeBytes()

public ByteString getInsightSubtypeBytes()

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

string insight_subtype = 10;

Returns
Type Description
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
Type Description
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
Type Description
TimestampOrBuilder

getName()

public String getName()

Name of the insight.

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Name of the insight.

string name = 1;

Returns
Type Description
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
Type Description
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
Type Description
DurationOrBuilder

getParserForType()

public Parser<Insight> getParserForType()
Returns
Type Description
Parser<Insight>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSeverity()

public Insight.Severity getSeverity()

Insight's severity.

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

Returns
Type Description
Insight.Severity

The severity.

getSeverityValue()

public int getSeverityValue()

Insight's severity.

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

Returns
Type Description
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
Type Description
InsightStateInfo

The stateInfo.

getStateInfoOrBuilder()

public InsightStateInfoOrBuilder getStateInfoOrBuilder()

Information state and metadata.

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

Returns
Type Description
InsightStateInfoOrBuilder

getTargetResources(int index)

public String getTargetResources(int index)

Fully qualified resource names that this insight is targeting.

repeated string target_resources = 9;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

Returns
Type Description
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
Type Description
int

The count of targetResources.

getTargetResourcesList()

public ProtocolStringList getTargetResourcesList()

Fully qualified resource names that this insight is targeting.

repeated string target_resources = 9;

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
boolean

Whether the observationPeriod field is set.

hasStateInfo()

public boolean hasStateInfo()

Information state and metadata.

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

Returns
Type Description
boolean

Whether the stateInfo field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Insight.Builder newBuilderForType()
Returns
Type Description
Insight.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Insight.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Insight.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Insight.Builder toBuilder()
Returns
Type Description
Insight.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException