Google Cloud Retail V2 Client - Class PredictionResult (1.0.1)

Reference documentation and code samples for the Google Cloud Retail V2 Client class PredictionResult.

PredictionResult represents the recommendation prediction results.

Generated from protobuf message google.cloud.retail.v2.PredictResponse.PredictionResult

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ id
string

ID of the recommended product

↳ metadata
array|Google\Protobuf\Internal\MapField

Additional product metadata / annotations. Possible values: * product : JSON representation of the product. Is set if returnProduct is set to true in PredictRequest.params . * score : Prediction score in double value. Is set if returnScore is set to true in PredictRequest.params .

getId

ID of the recommended product

Generated from protobuf field string id = 1;

Returns
Type
Description
string

setId

ID of the recommended product

Generated from protobuf field string id = 1;

Parameter
Name
Description
var
string
Returns
Type
Description
$this

Additional product metadata / annotations.

Possible values:

  • product : JSON representation of the product. Is set if returnProduct is set to true in PredictRequest.params .
  • score : Prediction score in double value. Is set if returnScore is set to true in PredictRequest.params .

Generated from protobuf field map<string, .google.protobuf.Value> metadata = 2;

Returns
Type
Description
Google\Protobuf\Internal\MapField

Additional product metadata / annotations.

Possible values:

  • product : JSON representation of the product. Is set if returnProduct is set to true in PredictRequest.params .
  • score : Prediction score in double value. Is set if returnScore is set to true in PredictRequest.params .

Generated from protobuf field map<string, .google.protobuf.Value> metadata = 2;

Parameter
Name
Description
var
array|Google\Protobuf\Internal\MapField
Returns
Type
Description
$this
Design a Mobile Site
View Site in Mobile | Classic
Share by: