# Google Cloud Dialogflow V2 Client - Class SessionEntityType (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 SessionEntityType.

A session represents a conversation between a Dialogflow agent and an
end-user. You can create special entities, called session entities, during a
session. Session entities can extend or replace custom entity types and only
exist during the session that they were created for. All session data,
including session entities, is stored by Dialogflow for 20 minutes.

For more information, see the [session entity
guide](https://cloud.google.com/dialogflow/docs/entities-session).

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

## 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 this session entity type. Format: `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`, or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`. If `Environment ID` is not specified, we assume default 'draft' environment. If `User ID` is not specified, we assume default '-' user. `<Entity Type Display Name>` must be the display name of an existing entity type in the same agent that will be overridden or supplemented. |
| `↳ entity_override_mode` | `int` Required. Indicates whether the additional data should override or supplement the custom entity type definition. |
| `↳ entities` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.EntityType.Entity>` Required. The collection of entities associated with this session entity type. |

### getName

Required. The unique identifier of this session entity type. Format:
`projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
Display Name>`, or `projects/<Project ID>/agent/environments/<Environment
ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
Name>`.

If `Environment ID` is not specified, we assume default 'draft'
environment. If `User ID` is not specified, we assume default '-' user.
`<Entity Type Display Name>` must be the display name of an existing entity
type in the same agent that will be overridden or supplemented.

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

### setName

Required. The unique identifier of this session entity type. Format:
`projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
Display Name>`, or `projects/<Project ID>/agent/environments/<Environment
ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
Name>`.

If `Environment ID` is not specified, we assume default 'draft'
environment. If `User ID` is not specified, we assume default '-' user.
`<Entity Type Display Name>` must be the display name of an existing entity
type in the same agent that will be overridden or supplemented.

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

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

### getEntityOverrideMode

Required. Indicates whether the additional data should override or
supplement the custom entity type definition.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [EntityOverrideMode](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.SessionEntityType.EntityOverrideMode). |

### setEntityOverrideMode

Required. Indicates whether the additional data should override or
supplement the custom entity type definition.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [EntityOverrideMode](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.SessionEntityType.EntityOverrideMode). |

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

### getEntities

Required. The collection of entities associated with this session entity
type.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.EntityType.Entity>` |   |

### setEntities

Required. The collection of entities associated with this session entity
type.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.EntityType.Entity>` |

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