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

Defines the Automated Agent to connect to a conversation.

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

## Namespace

Google \\ Cloud \\ Dialogflow \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ agent` | `string` Required. ID of the Dialogflow agent environment to use. This project needs to either be the same project as the conversation or you need to grant `service-<Conversation Project Number>\@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API Service Agent` role in this project. - For ES agents, use format: `projects/<Project ID>/locations/<Location ID>/agent/environments/<Environment ID or '-'>`. If environment is not specified, the default `draft` environment is used. Refer to [DetectIntentRequest](https://docs.cloud.google.com/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.DetectIntentRequest) for more details. - For CX agents, use format `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/environments/<Environment ID or '-'>`. If environment is not specified, the default `draft` environment is used. |
| `↳ session_ttl` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Optional. Configure lifetime of the Dialogflow session. By default, a Dialogflow CX session remains active and its data is stored for 30 minutes after the last request is sent for the session. This value should be no longer than 1 day. |

### getAgent

Required. ID of the Dialogflow agent environment to use.

This project needs to either be the same project as the conversation or you
need to grant `service-<Conversation Project
Number>\@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API
Service Agent` role in this project.

- For ES agents, use format: `projects/<Project ID>/locations/<Location
  ID>/agent/environments/<Environment ID or '-'>`. If environment is not specified, the default `draft` environment is used. Refer to [DetectIntentRequest](https://docs.cloud.google.com/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.DetectIntentRequest) for more details.
- For CX agents, use format `projects/<Project ID>/locations/<Location
  ID>/agents/<Agent ID>/environments/<Environment ID
  or '-'>`. If environment is not specified, the default `draft` environment is used.

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

### setAgent

Required. ID of the Dialogflow agent environment to use.

This project needs to either be the same project as the conversation or you
need to grant `service-<Conversation Project
Number>\@gcp-sa-dialogflow.iam.gserviceaccount.com` the `Dialogflow API
Service Agent` role in this project.

- For ES agents, use format: `projects/<Project ID>/locations/<Location
  ID>/agent/environments/<Environment ID or '-'>`. If environment is not specified, the default `draft` environment is used. Refer to [DetectIntentRequest](https://docs.cloud.google.com/dialogflow/docs/reference/rpc/google.cloud.dialogflow.v2#google.cloud.dialogflow.v2.DetectIntentRequest) for more details.
- For CX agents, use format `projects/<Project ID>/locations/<Location
  ID>/agents/<Agent ID>/environments/<Environment ID
  or '-'>`. If environment is not specified, the default `draft` environment is used.

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

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

### getSessionTtl

Optional. Configure lifetime of the Dialogflow session.

By default, a Dialogflow CX session remains active and its data is stored
for 30 minutes after the last request is sent for the session.
This value should be no longer than 1 day.

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

### hasSessionTtl

### clearSessionTtl

### setSessionTtl

Optional. Configure lifetime of the Dialogflow session.

By default, a Dialogflow CX session remains active and its data is stored
for 30 minutes after the last request is sent for the session.
This value should be no longer than 1 day.

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

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