Reference documentation and code samples for the Google Cloud Retail V2 Client class UserAnswer.
This field specifies the current user answer during the conversational filtering search. This can be either user selected from suggested answers or user input plain text.
Generated from protobuf message google.cloud.retail.v2.ConversationalSearchRequest.UserAnswer
Namespace
Google \ Cloud \ Retail \ V2 \ ConversationalSearchRequestMethods
__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 |
UserAnswer\SelectedAnswer
Optional. This field specifies the selected answer during the conversational search. This should be a subset of ConversationalSearchResponse.followup_question.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
Optional. This field specifies the selected answer during the conversational search. This should be a subset of ConversationalSearchResponse.followup_question.suggested_answers.
Returns | |
---|---|
Type | Description |
UserAnswer\SelectedAnswer|null |
hasSelectedAnswer
setSelectedAnswer
Optional. This field specifies the selected answer during the conversational search. This should be a subset of ConversationalSearchResponse.followup_question.suggested_answers.
Parameter | |
---|---|
Name | Description |
var |
UserAnswer\SelectedAnswer
|
Returns | |
---|---|
Type | Description |
$this |
getType
Returns | |
---|---|
Type | Description |
string |