Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class RecommendationResult.
RecommendationResult represents a generic recommendation result with associated metadata.
Generated from protobuf message google.cloud.discoveryengine.v1.RecommendResponse.RecommendationResult
Namespace
Google \ Cloud \ DiscoveryEngine \ V1 \ RecommendResponseMethods
__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\V1\Document
Set if |
↳ metadata |
array|Google\Protobuf\Internal\MapField
Additional Document metadata or annotations. Possible values: * * |
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\V1\Document|null |
hasDocument
clearDocument
setDocument
Set if returnDocument
is set to true in
RecommendRequest.params.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\DiscoveryEngine\V1\Document
|
Returns | |
---|---|
Type | Description |
$this |
getMetadata
Additional Document metadata or annotations.
Possible values:
score
: Recommendation score in double value. Is set ifreturnScore
is set to true in RecommendRequest.params.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\MapField |
setMetadata
Additional Document metadata or annotations.
Possible values:
score
: Recommendation score in double value. Is set ifreturnScore
is set to true in RecommendRequest.params.
Parameter | |
---|---|
Name | Description |
var |
array|Google\Protobuf\Internal\MapField
|
Returns | |
---|---|
Type | Description |
$this |