Reference documentation and code samples for the Google Cloud Retail V2 Client class PredictResponse.
Response message for predict method.
Generated from protobuf message google.cloud.retail.v2.PredictResponse
Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ results |
array<Google\Cloud\Retail\V2\PredictResponse\PredictionResult>
A list of recommended products. The order represents the ranking (from the most relevant product to the least). |
↳ attribution_token |
string
A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance. |
↳ missing_ids |
array
IDs of products in the request that were missing from the inventory. |
↳ validate_only |
bool
True if the validateOnly property was set in the request. |
getResults
A list of recommended products. The order represents the ranking (from the most relevant product to the least).
Generated from protobuf field repeated .google.cloud.retail.v2.PredictResponse.PredictionResult results = 1;
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\RepeatedField |
|
setResults
A list of recommended products. The order represents the ranking (from the most relevant product to the least).
Generated from protobuf field repeated .google.cloud.retail.v2.PredictResponse.PredictionResult results = 1;
| Parameter | |
|---|---|
| Name | Description |
var |
array<Google\Cloud\Retail\V2\PredictResponse\PredictionResult>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAttributionToken
A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.
Generated from protobuf field string attribution_token = 2;
| Returns | |
|---|---|
| Type | Description |
string |
|
setAttributionToken
A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.
Generated from protobuf field string attribution_token = 2;
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getMissingIds
IDs of products in the request that were missing from the inventory.
Generated from protobuf field repeated string missing_ids = 3;
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\RepeatedField |
|
setMissingIds
IDs of products in the request that were missing from the inventory.
Generated from protobuf field repeated string missing_ids = 3;
| Parameter | |
|---|---|
| Name | Description |
var |
string[]
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getValidateOnly
True if the validateOnly property was set in the request.
Generated from protobuf field bool validate_only = 4;
| Returns | |
|---|---|
| Type | Description |
bool |
|
setValidateOnly
True if the validateOnly property was set in the request.
Generated from protobuf field bool validate_only = 4;
| Parameter | |
|---|---|
| Name | Description |
var |
bool
|
| Returns | |
|---|---|
| Type | Description |
$this |
|