Class protos.google.cloud.recommender.v1beta1.Insight (6.1.1)

Represents an Insight.

Package

@google-cloud/recommender

Constructors

(constructor)(properties)

constructor(properties?: google.cloud.recommender.v1beta1.IInsight);

Constructs a new Insight.

Parameter
NameDescription
properties IInsight

Properties to set

Properties

associatedRecommendations

public associatedRecommendations: google.cloud.recommender.v1beta1.Insight.IRecommendationReference[];

Insight associatedRecommendations.

category

public category: (google.cloud.recommender.v1beta1.Insight.Category|keyof typeof google.cloud.recommender.v1beta1.Insight.Category);

Insight category.

content

public content?: (google.protobuf.IStruct|null);

Insight content.

description

public description: string;

Insight description.

etag

public etag: string;

Insight etag.

insightSubtype

public insightSubtype: string;

Insight insightSubtype.

lastRefreshTime

public lastRefreshTime?: (google.protobuf.ITimestamp|null);

Insight lastRefreshTime.

name

public name: string;

Insight name.

observationPeriod

public observationPeriod?: (google.protobuf.IDuration|null);

Insight observationPeriod.

severity

public severity: (google.cloud.recommender.v1beta1.Insight.Severity|keyof typeof google.cloud.recommender.v1beta1.Insight.Severity);

Insight severity.

stateInfo

public stateInfo?: (google.cloud.recommender.v1beta1.IInsightStateInfo|null);

Insight stateInfo.

targetResources

public targetResources: string[];

Insight targetResources.

Methods

create(properties)

public static create(properties?: google.cloud.recommender.v1beta1.IInsight): google.cloud.recommender.v1beta1.Insight;

Creates a new Insight instance using the specified properties.

Parameter
NameDescription
properties IInsight

Properties to set

Returns
TypeDescription
Insight

Insight instance

decode(reader, length)

public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.recommender.v1beta1.Insight;

Decodes an Insight message from the specified reader or buffer.

Parameters
NameDescription
reader (Reader|Uint8Array)

Reader or buffer to decode from

length number

Message length if known beforehand

Returns
TypeDescription
Insight

Insight

decodeDelimited(reader)

public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.recommender.v1beta1.Insight;

Decodes an Insight message from the specified reader or buffer, length delimited.

Parameter
NameDescription
reader (Reader|Uint8Array)

Reader or buffer to decode from

Returns
TypeDescription
Insight

Insight

encode(message, writer)

public static encode(message: google.cloud.recommender.v1beta1.IInsight, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified Insight message. Does not implicitly messages.

Parameters
NameDescription
message IInsight

Insight message or plain object to encode

writer $protobuf.Writer

Writer to encode to

Returns
TypeDescription
$protobuf.Writer

Writer

encodeDelimited(message, writer)

public static encodeDelimited(message: google.cloud.recommender.v1beta1.IInsight, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified Insight message, length delimited. Does not implicitly messages.

Parameters
NameDescription
message IInsight

Insight message or plain object to encode

writer $protobuf.Writer

Writer to encode to

Returns
TypeDescription
$protobuf.Writer

Writer

fromObject(object)

public static fromObject(object: { [k: string]: any }): google.cloud.recommender.v1beta1.Insight;

Creates an Insight message from a plain object. Also converts values to their respective internal types.

Parameter
NameDescription
object { [k: string]: any }

Plain object

Returns
TypeDescription
Insight

Insight

getTypeUrl(typeUrlPrefix)

public static getTypeUrl(typeUrlPrefix?: string): string;

Gets the default type url for Insight

Parameter
NameDescription
typeUrlPrefix string

your custom typeUrlPrefix(default "type.googleapis.com")

Returns
TypeDescription
string

The default type url

toJSON()

public toJSON(): { [k: string]: any };

Converts this Insight to JSON.

Returns
TypeDescription
{ [k: string]: any }

JSON object

toObject(message, options)

public static toObject(message: google.cloud.recommender.v1beta1.Insight, options?: $protobuf.IConversionOptions): { [k: string]: any };

Creates a plain object from an Insight message. Also converts values to other types if specified.

Parameters
NameDescription
message Insight

Insight

options $protobuf.IConversionOptions

Conversion options

Returns
TypeDescription
{ [k: string]: any }

Plain object

verify(message)

public static verify(message: { [k: string]: any }): (string|null);

Verifies an Insight message.

Parameter
NameDescription
message { [k: string]: any }

Plain object to verify

Returns
TypeDescription
(string|null)

null if valid, otherwise the reason why it is not