Google Cloud Retail V2 Client - Class CompletionResult (2.0.0-RC1)

Reference documentation and code samples for the Google Cloud Retail V2 Client class CompletionResult.

Resource that represents completion results.

Generated from protobuf message google.cloud.retail.v2.CompleteQueryResponse.CompletionResult

Namespace

Google \ Cloud \ Retail \ V2 \ CompleteQueryResponse

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ suggestion string

The suggestion for the query.

↳ attributes array|Google\Protobuf\Internal\MapField

Custom attributes for the suggestion term. * For "user-data", the attributes are additional custom attributes ingested through BigQuery. * For "cloud-retail", the attributes are product attributes generated by Cloud Retail. It requires UserEvent.product_details is imported properly.

getSuggestion

The suggestion for the query.

Returns
Type Description
string

setSuggestion

The suggestion for the query.

Parameter
Name Description
var string
Returns
Type Description
$this

getAttributes

Custom attributes for the suggestion term.

  • For "user-data", the attributes are additional custom attributes ingested through BigQuery.
  • For "cloud-retail", the attributes are product attributes generated by Cloud Retail. It requires UserEvent.product_details is imported properly.
Returns
Type Description
Google\Protobuf\Internal\MapField

setAttributes

Custom attributes for the suggestion term.

  • For "user-data", the attributes are additional custom attributes ingested through BigQuery.
  • For "cloud-retail", the attributes are product attributes generated by Cloud Retail. It requires UserEvent.product_details is imported properly.
Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this