Represents a PredictionResult.
Package
@google-cloud/retailConstructors
(constructor)(properties)
constructor(properties?: google.cloud.retail.v2.PredictResponse.IPredictionResult);
Constructs a new PredictionResult.
Parameter | |
---|---|
Name | Description |
properties |
IPredictionResult
Properties to set |
Properties
id
public id: string;
PredictionResult id.
metadata
public metadata: { [k: string]: google.protobuf.IValue };
PredictionResult metadata.
Methods
create(properties)
public static create(properties?: google.cloud.retail.v2.PredictResponse.IPredictionResult): google.cloud.retail.v2.PredictResponse.PredictionResult;
Creates a new PredictionResult instance using the specified properties.
Parameter | |
---|---|
Name | Description |
properties |
IPredictionResult
Properties to set |
Returns | |
---|---|
Type | Description |
PredictionResult |
PredictionResult instance |
decode(reader, length)
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.retail.v2.PredictResponse.PredictionResult;
Decodes a PredictionResult 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 |
PredictionResult |
PredictionResult |
decodeDelimited(reader)
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.retail.v2.PredictResponse.PredictionResult;
Decodes a PredictionResult message from the specified reader or buffer, length delimited.
Parameter | |
---|---|
Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
Returns | |
---|---|
Type | Description |
PredictionResult |
PredictionResult |
encode(message, writer)
public static encode(message: google.cloud.retail.v2.PredictResponse.IPredictionResult, writer?: $protobuf.Writer): $protobuf.Writer;
Encodes the specified PredictionResult message. Does not implicitly messages.
Parameters | |
---|---|
Name | Description |
message |
IPredictionResult
PredictionResult 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.retail.v2.PredictResponse.IPredictionResult, writer?: $protobuf.Writer): $protobuf.Writer;
Encodes the specified PredictionResult message, length delimited. Does not implicitly messages.
Parameters | |
---|---|
Name | Description |
message |
IPredictionResult
PredictionResult message or plain object |