Reference documentation and code samples for the Google Cloud Recommendation Engine V1beta1 Client class PredictResponse.
Response message for predict method.
Generated from protobuf message google.cloud.recommendationengine.v1beta1.PredictResponse
Namespace
Google \ Cloud \ RecommendationEngine \ V1beta1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ results |
array<PredictResponse\PredictionResult>
A list of recommended items. The order represents the ranking (from the most relevant item to the least). |
↳ recommendation_token |
string
A unique recommendation token. This should be included in the user event logs resulting from this recommendation, which enables accurate attribution of recommendation model performance. |
↳ items_missing_in_catalog |
array
IDs of items in the request that were missing from the catalog. |
↳ dry_run |
bool
True if the dryRun property was set in the request. |
↳ metadata |
array|Google\Protobuf\Internal\MapField
Additional domain specific prediction response metadata. |
↳ next_page_token |
string
If empty, the list is complete. If nonempty, the token to pass to the next request's PredictRequest.page_token. |
getResults
A list of recommended items. The order represents the ranking (from the most relevant item to the least).
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\RepeatedField |
|
setResults
A list of recommended items. The order represents the ranking (from the most relevant item to the least).
| Parameter | |
|---|---|
| Name | Description |
var |
array<PredictResponse\PredictionResult>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getRecommendationToken
A unique recommendation token. This should be included in the user event logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.
| Returns | |
|---|---|
| Type | Description |
string |
|
setRecommendationToken
A unique recommendation token. This should be included in the user event logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getItemsMissingInCatalog
IDs of items in the request that were missing from the catalog.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\RepeatedField |
|
setItemsMissingInCatalog
IDs of items in the request that were missing from the catalog.
| Parameter | |
|---|---|
| Name | Description |
var |
string[]
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getDryRun
True if the dryRun property was set in the request.
| Returns | |
|---|---|
| Type | Description |
bool |
|
setDryRun
True if the dryRun property was set in the request.
| Parameter | |
|---|---|
| Name | Description |
var |
bool
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getMetadata
Additional domain specific prediction response metadata.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\MapField |
|
setMetadata
Additional domain specific prediction response metadata.
| Parameter | |
|---|---|
| Name | Description |
var |
array|Google\Protobuf\Internal\MapField
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getNextPageToken
If empty, the list is complete. If nonempty, the token to pass to the next request's PredictRequest.page_token.
| Returns | |
|---|---|
| Type | Description |
string |
|
setNextPageToken
If empty, the list is complete. If nonempty, the token to pass to the next request's PredictRequest.page_token.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|