Reference documentation and code samples for the Google Cloud Retail V2 Client class UserAnswer.
This field specifies the current user answer during the conversational search. This can be either user selected from suggested answers or user input plain text.
Generated from protobuf message google.cloud.retail.v2.SearchRequest.ConversationalSearchSpec.UserAnswer
Namespace
Google \ Cloud \ Retail \ V2 \ SearchRequest \ ConversationalSearchSpecMethods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ text_answer |
string
This field specifies the incremental input text from the user during the conversational search. |
↳ selected_answer |
Google\Cloud\Retail\V2\SearchRequest\ConversationalSearchSpec\UserAnswer\SelectedAnswer
This field specifies the selected attributes during the conversational search. This should be a subset of ConversationalSearchResult.suggested_answers. |
getTextAnswer
This field specifies the incremental input text from the user during the conversational search.
Returns | |
---|---|
Type | Description |
string |
hasTextAnswer
setTextAnswer
This field specifies the incremental input text from the user during the conversational search.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getSelectedAnswer
This field specifies the selected attributes during the conversational search. This should be a subset of ConversationalSearchResult.suggested_answers.
Returns | |
---|---|
Type | Description |
Google\Cloud\Retail\V2\SearchRequest\ConversationalSearchSpec\UserAnswer\SelectedAnswer|null |
hasSelectedAnswer
setSelectedAnswer
This field specifies the selected attributes during the conversational search. This should be a subset of ConversationalSearchResult.suggested_answers.
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Retail\V2\SearchRequest\ConversationalSearchSpec\UserAnswer\SelectedAnswer
|
Returns | |
---|---|
Type | Description |
$this |
getType
Returns | |
---|---|
Type | Description |
string |