Google Cloud Recommendation Engine V1beta1 Client - Class PredictResponse (0.7.0)

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 \ V1beta1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ results array<Google\Cloud\RecommendationEngine\V1beta1\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
TypeDescription
Google\Protobuf\Internal\RepeatedField

setResults

A list of recommended items. The order represents the ranking (from the most relevant item to the least).

Parameter
NameDescription
var array<Google\Cloud\RecommendationEngine\V1beta1\PredictResponse\PredictionResult>
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var string
Returns
TypeDescription
$this

getItemsMissingInCatalog

IDs of items in the request that were missing from the catalog.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setItemsMissingInCatalog

IDs of items in the request that were missing from the catalog.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getDryRun

True if the dryRun property was set in the request.

Returns
TypeDescription
bool

setDryRun

True if the dryRun property was set in the request.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getMetadata

Additional domain specific prediction response metadata.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setMetadata

Additional domain specific prediction response metadata.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getNextPageToken

If empty, the list is complete. If nonempty, the token to pass to the next request's PredictRequest.page_token.

Returns
TypeDescription
string

setNextPageToken

If empty, the list is complete. If nonempty, the token to pass to the next request's PredictRequest.page_token.

Parameter
NameDescription
var string
Returns
TypeDescription
$this