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
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.
Generated from protobuf field string suggestion = 1;
Returns | |
---|---|
Type | Description |
string |
setSuggestion
The suggestion for the query.
Generated from protobuf field string suggestion = 1;
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.
Generated from protobuf field map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2;
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.
Generated from protobuf field map<string, .google.cloud.retail.v2.CustomAttribute> attributes = 2;
Parameter | |
---|---|
Name | Description |
var |
array|Google\Protobuf\Internal\MapField
|
Returns | |
---|---|
Type | Description |
$this |