# Google Cloud Contact Center Insights V1 Client - Class UserInput (2.4.2)

2.4.2 (latest) 2.4.1 2.3.3 2.2.1 2.1.1 2.0.1 1.9.5 1.8.0 1.7.1 1.6.2 1.5.0 1.4.1 1.3.0 1.2.1 1.1.0 1.0.3 Reference documentation and code samples for the Google Cloud Contact Center Insights V1 Client class UserInput.

Explicit input used for generating the answer

Generated from protobuf message `google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput`

## Namespace

Google \\ Cloud \\ ContactCenterInsights \\ V1 \\ RuntimeAnnotation

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ query` | `string` Query text. Article Search uses this to store the input query used to generate the search results. |
| `↳ generator_name` | `string` The resource name of associated generator. Format: `projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>` |
| `↳ query_source` | `int` Query source for the answer. |

### getQuery

Query text. Article Search uses this to store the input query used
to generate the search results.

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

### setQuery

Query text. Article Search uses this to store the input query used
to generate the search results.

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

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

### getGeneratorName

The resource name of associated generator. Format:
`projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>`

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

### setGeneratorName

The resource name of associated generator. Format:
`projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>`

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

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

### getQuerySource

Query source for the answer.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [QuerySource](https://docs.cloud.google.com/php/docs/reference/cloud-contact-center-insights/latest/V1.RuntimeAnnotation.UserInput.QuerySource). |

### setQuerySource

Query source for the answer.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [QuerySource](https://docs.cloud.google.com/php/docs/reference/cloud-contact-center-insights/latest/V1.RuntimeAnnotation.UserInput.QuerySource). |

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