Google Cloud Discovery Engine V1 Client - Class RecommendResponse (1.3.1)

Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class RecommendResponse.

Response message for Recommend method.

Generated from protobuf message google.cloud.discoveryengine.v1.RecommendResponse

Namespace

Google \ Cloud \ DiscoveryEngine \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ results array<RecommendResponse\RecommendationResult>

A list of recommended Documents. The order represents the ranking (from the most relevant Document 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 documents in the request that were missing from the default Branch associated with the requested ServingConfig.

↳ validate_only bool

True if RecommendRequest.validate_only was set.

getResults

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

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setResults

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

Parameter
Name Description
var array<RecommendResponse\RecommendationResult>
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.

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.

Parameter
Name Description
var string
Returns
Type Description
$this

getMissingIds

IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setMissingIds

IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.

Parameter
Name Description
var string[]
Returns
Type Description
$this

getValidateOnly

Returns
Type Description
bool

setValidateOnly

Parameter
Name Description
var bool
Returns
Type Description
$this