# Google Cloud Dialogflow V2 Client - Class EventInput (2.4.0)

2.4.0 (latest) 2.3.1 2.2.1 2.1.2 2.0.1 1.17.2 1.16.0 1.15.1 1.14.0 1.13.0 1.12.3 1.11.0 1.10.2 1.9.0 1.8.0 1.7.2 1.6.0 1.5.0 1.4.0 1.3.2 1.2.0 1.1.1 1.0.1 Reference documentation and code samples for the Google Cloud Dialogflow V2 Client class EventInput.

Events allow for matching intents by event name instead of the natural
language input. For instance, input `<event: { name: "welcome_event",
parameters: { name: "Sam" } }>` can trigger a personalized welcome response.

The parameter `name` may be used by the agent in the response:
`"Hello #welcome_event.name! What can I do for you today?"`.

Generated from protobuf message `google.cloud.dialogflow.v2.EventInput`

## Namespace

Google \\ Cloud \\ Dialogflow \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. The unique identifier of the event. |
| `↳ parameters` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` The collection of parameters associated with the event. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: \* \* MapKey type: string \* \* MapKey value: parameter name \* \* MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. \* \* MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value. |
| `↳ language_code` | `string` Required. The language of this query. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. This field is ignored when used in the context of a [WebhookResponse.followup_event_input](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.WebhookResponse#_Google_Cloud_Dialogflow_V2_WebhookResponse__getFollowupEventInput__) field, because the language was already defined in the originating detect intent request. |

### getName

Required. The unique identifier of the event.

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

### setName

Required. The unique identifier of the event.

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

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

### getParameters

The collection of parameters associated with the event.

Depending on your protocol or client library language, this is a
map, associative array, symbol table, dictionary, or JSON object
composed of a collection of (MapKey, MapValue) pairs:

- MapKey type: string
- MapKey value: parameter name
- MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map.
- MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct|null` |   |

### hasParameters

### clearParameters

### setParameters

The collection of parameters associated with the event.

Depending on your protocol or client library language, this is a
map, associative array, symbol table, dictionary, or JSON object
composed of a collection of (MapKey, MapValue) pairs:

- MapKey type: string
- MapKey value: parameter name
- MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map.
- MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` |

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

### getLanguageCode

Required. The language of this query. See [Language
Support](https://cloud.google.com/dialogflow/docs/reference/language)
for a list of the currently supported language codes. Note that queries in
the same session do not necessarily need to specify the same language.

This field is ignored when used in the context of a
[WebhookResponse.followup_event_input](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.WebhookResponse#_Google_Cloud_Dialogflow_V2_WebhookResponse__getFollowupEventInput__)
field, because the language was already defined in the originating detect
intent request.

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

### setLanguageCode

Required. The language of this query. See [Language
Support](https://cloud.google.com/dialogflow/docs/reference/language)
for a list of the currently supported language codes. Note that queries in
the same session do not necessarily need to specify the same language.

This field is ignored when used in the context of a
[WebhookResponse.followup_event_input](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.WebhookResponse#_Google_Cloud_Dialogflow_V2_WebhookResponse__getFollowupEventInput__)
field, because the language was already defined in the originating detect
intent request.

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

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