# Google Cloud Eventarc V1 Client - Class CreateChannelRequest (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 CreateChannelRequest.

The request message for the CreateChannel method.

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

## Namespace

Google \\ Cloud \\ Eventarc \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The parent collection in which to add this channel. |
| `↳ channel` | `Channel` Required. The channel to create. |
| `↳ channel_id` | `string` Required. The user-provided ID to be assigned to the channel. |
| `↳ validate_only` | `bool` Optional. If set, validate the request and preview the review, but do not post it. |

### getParent

Required. The parent collection in which to add this channel.

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

### setParent

Required. The parent collection in which to add this channel.

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

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

### getChannel

Required. The channel to create.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Channel|null` |   |

### hasChannel

### clearChannel

### setChannel

Required. The channel to create.

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

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

### getChannelId

Required. The user-provided ID to be assigned to the channel.

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

### setChannelId

Required. The user-provided ID to be assigned to the channel.

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

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

### getValidateOnly

Optional. If set, validate the request and preview the review, but do not
post it.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setValidateOnly

Optional. If set, validate the request and preview the review, but do not
post it.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The parent collection in which to add this channel. Please see EventarcClient::locationName() for help formatting this field. |
| `channel` | `Channel` Required. The channel to create. |
| `channelId` | `string` Required. The user-provided ID to be assigned to the channel. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-eventarc/latest/V1.CreateChannelRequest` |   |