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

Represents a connection for SIP Trunk.

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

## Namespace

Google \\ Cloud \\ Dialogflow \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ connection_id` | `string` Output only. The unique identifier of the SIP Trunk connection. |
| `↳ state` | `int` Output only. State of the connection. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. When the connection status changed. |
| `↳ error_details` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.Connection.ErrorDetails` Output only. The error details for the connection. Only populated when authentication errors occur. |

### getConnectionId

Output only. The unique identifier of the SIP Trunk connection.

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

### setConnectionId

Output only. The unique identifier of the SIP Trunk connection.

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

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

### getState

Output only. State of the connection.

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

### setState

Output only. State of the connection.

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

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

### getUpdateTime

Output only. When the connection status changed.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. When the connection status changed.

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

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

### getErrorDetails

Output only. The error details for the connection. Only populated when
authentication errors occur.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.Connection.ErrorDetails|null` |   |

### hasErrorDetails

### clearErrorDetails

### setErrorDetails

Output only. The error details for the connection. Only populated when
authentication errors occur.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow/latest/V2.Connection.ErrorDetails` |

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