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

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
NameDescription
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 / 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
TypeDescription
string

setId

Resource ID of the recommended Document.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDocument

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

Returns
TypeDescription
Google\Cloud\DiscoveryEngine\V1beta\Document|null

hasDocument

clearDocument

setDocument

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

Parameter
NameDescription
var Google\Cloud\DiscoveryEngine\V1beta\Document
Returns
TypeDescription
$this

getMetadata

Additional Document metadata / annotations.

Possible values:

  • score: Recommendation score in double value. Is set if returnScore is set to true in RecommendRequest.params.
Returns
TypeDescription
Google\Protobuf\Internal\MapField

setMetadata

Additional Document metadata / annotations.

Possible values:

  • score: Recommendation score in double value. Is set if returnScore is set to true in RecommendRequest.params.
Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this