# Google Cloud Retail V2 Client - Class ConversationalSearchSpec (2.5.3)

2.5.3 (latest) 2.5.2 2.4.0 2.3.1 2.2.1 2.1.3 2.0.0 1.7.0 1.6.4 1.5.0 1.4.2 1.3.1 1.2.1 1.1.1 1.0.1 Reference documentation and code samples for the Google Cloud Retail V2 Client class ConversationalSearchSpec.

This field specifies all conversational related parameters addition to
traditional retail search.

Generated from protobuf message `google.cloud.retail.v2.SearchRequest.ConversationalSearchSpec`

## Namespace

Google \\ Cloud \\ Retail \\ V2 \\ SearchRequest

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ followup_conversation_requested` | `bool` This field specifies whether the customer would like to do conversational search. If this field is set to true, conversational related extra information will be returned from server side, including follow-up question, answer options, etc. |
| `↳ conversation_id` | `string` This field specifies the conversation id, which maintains the state of the conversation between client side and server side. Use the value from the previous ConversationalSearchResult.conversation_id. For the initial request, this should be empty. |
| `↳ user_answer` | `https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.SearchRequest.ConversationalSearchSpec.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. |

### getFollowupConversationRequested

This field specifies whether the customer would like to do conversational
search. If this field is set to true, conversational related extra
information will be returned from server side, including follow-up
question, answer options, etc.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setFollowupConversationRequested

This field specifies whether the customer would like to do conversational
search. If this field is set to true, conversational related extra
information will be returned from server side, including follow-up
question, answer options, etc.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getConversationId

This field specifies the conversation id, which maintains the state of
the conversation between client side and server side. Use the value from
the previous ConversationalSearchResult.conversation_id. For the
initial request, this should be empty.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setConversationId

This field specifies the conversation id, which maintains the state of
the conversation between client side and server side. Use the value from
the previous ConversationalSearchResult.conversation_id. For the
initial request, this should be empty.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUserAnswer

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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.SearchRequest.ConversationalSearchSpec.UserAnswer|null` |   |

### hasUserAnswer

### clearUserAnswer

### setUserAnswer

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-retail/latest/V2.SearchRequest.ConversationalSearchSpec.UserAnswer` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |