Google Cloud Discovery Engine V1beta Client - Class RecommendResponse (0.3.0)

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

Response message for Recommend method.

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

Namespace

Google \ Cloud \ DiscoveryEngine \ V1beta

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

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

setResults

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

Parameter
NameDescription
var array<Google\Cloud\DiscoveryEngine\V1beta\RecommendResponse\RecommendationResult>
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var string
Returns
TypeDescription
$this

getMissingIds

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

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setMissingIds

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

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getValidateOnly

True if RecommendRequest.validate_only was set.

Returns
TypeDescription
bool

setValidateOnly

True if RecommendRequest.validate_only was set.

Parameter
NameDescription
var bool
Returns
TypeDescription
$this