Google Cloud Discovery Engine V1beta Client - Class RecommendationResult (0.11.3)

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

RecommendationResult represents a generic recommendation result with associated metadata.

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

Namespace

Google \ Cloud \ DiscoveryEngine \ V1beta \ RecommendResponse

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ id string

Resource ID of the recommended Document.

↳ document Google\Cloud\DiscoveryEngine\V1beta\Document

Set if returnDocument is set to true in RecommendRequest.params.

↳ metadata array|Google\Protobuf\Internal\MapField

Additional Document metadata or annotations. Possible values: * score: Recommendation score in double value. Is set if returnScore is set to true in RecommendRequest.params.

getId

Resource ID of the recommended Document.

Returns
Type Description
string

setId

Resource ID of the recommended Document.

Parameter
Name Description
var string
Returns
Type Description
$this

getDocument

Set if returnDocument is set to true in RecommendRequest.params.

Returns
Type Description
Google\Cloud\DiscoveryEngine\V1beta\Document|null

hasDocument

clearDocument

setDocument

Set if returnDocument is set to true in RecommendRequest.params.

Parameter
Name Description
var Google\Cloud\DiscoveryEngine\V1beta\Document
Returns
Type Description
$this

getMetadata

Additional Document metadata or annotations.

Possible values:

Returns
Type Description
Google\Protobuf\Internal\MapField

setMetadata

Additional Document metadata or annotations.

Possible values:

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this