Represents an Insight.
Package
@google-cloud/recommenderConstructors
(constructor)(properties)
constructor(properties?: google.cloud.recommender.v1beta1.IInsight);
Constructs a new Insight.
Parameter | |
---|---|
Name | Description |
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 | |
---|---|
Name | Description |
properties |
IInsight
Properties to set |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
length |
number
Message length if known beforehand |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
message |
IInsight
Insight message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
Returns | |
---|---|
Type | Description |
$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 | |
---|---|
Name | Description |
message |
IInsight
Insight message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
Returns | |
---|---|
Type | Description |
$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 | |
---|---|
Name | Description |
object |
{ [k: string]: any }
Plain object |
Returns | |
---|---|
Type | Description |
Insight |
Insight |
getTypeUrl(typeUrlPrefix)
public static getTypeUrl(typeUrlPrefix?: string): string;
Gets the default type url for Insight
Parameter | |
---|---|
Name | Description |
typeUrlPrefix |
string
your custom typeUrlPrefix(default "type.googleapis.com") |
Returns | |
---|---|
Type | Description |
string |
The default type url |
toJSON()
public toJSON(): { [k: string]: any };
Converts this Insight to JSON.
Returns | |
---|---|
Type | Description |
{ [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 | |
---|---|
Name | Description |
message |
Insight
Insight |
options |
$protobuf.IConversionOptions
Conversion options |
Returns | |
---|---|
Type | Description |
{ [k: string]: any } |
Plain object |
verify(message)
public static verify(message: { [k: string]: any }): (string|null);
Verifies an Insight message.
Parameter | |
---|---|
Name | Description |
message |
{ [k: string]: any }
Plain object to verify |
Returns | |
---|---|
Type | Description |
(string|null) |
|