# Google Cloud Eventarc V1 Client - Class ChannelConnection (2.3.1)

2.3.1 (latest) 2.3.0 2.2.1 2.1.5 2.0.1 1.3.5 1.2.2 1.1.1 1.0.5 Reference documentation and code samples for the Google Cloud Eventarc V1 Client class ChannelConnection.

A representation of the ChannelConnection resource.

A ChannelConnection is a resource which event providers create during the
activation process to establish a connection between the provider and the
subscriber channel.

Generated from protobuf message `google.cloud.eventarc.v1.ChannelConnection`

## Namespace

Google \\ Cloud \\ Eventarc \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. The name of the connection. |
| `↳ uid` | `string` Output only. Server assigned ID of the resource. The server guarantees uniqueness and immutability until deleted. |
| `↳ channel` | `string` Required. The name of the connected subscriber Channel. This is a weak reference to avoid cross project and cross accounts references. This must be in `projects/{project}/location/{location}/channels/{channel_id}` format. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The creation time. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The last-modified time. |
| `↳ activation_token` | `string` Input only. Activation token for the channel. The token will be used during the creation of ChannelConnection to bind the channel with the provider project. This field will not be stored in the provider resource. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. Resource labels. |

### getName

Required. The name of the connection.

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

### setName

Required. The name of the connection.

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

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

### getUid

Output only. Server assigned ID of the resource.

The server guarantees uniqueness and immutability until deleted.

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

### setUid

Output only. Server assigned ID of the resource.

The server guarantees uniqueness and immutability until deleted.

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

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

### getChannel

Required. The name of the connected subscriber Channel.

This is a weak reference to avoid cross project and cross accounts
references. This must be in
`projects/{project}/location/{location}/channels/{channel_id}` format.

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

### setChannel

Required. The name of the connected subscriber Channel.

This is a weak reference to avoid cross project and cross accounts
references. This must be in
`projects/{project}/location/{location}/channels/{channel_id}` format.

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

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

### getCreateTime

Output only. The creation time.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The creation time.

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

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

### getUpdateTime

Output only. The last-modified time.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The last-modified time.

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

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

### getActivationToken

Input only. Activation token for the channel. The token will be used
during the creation of ChannelConnection to bind the channel with the
provider project. This field will not be stored in the provider resource.

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

### setActivationToken

Input only. Activation token for the channel. The token will be used
during the creation of ChannelConnection to bind the channel with the
provider project. This field will not be stored in the provider resource.

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

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

### getLabels

Optional. Resource labels.

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

### setLabels

Optional. Resource labels.

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

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