# Google Cloud Tasks V2 Client - Class CreateQueueRequest (2.2.0)

2.2.0 (latest) 2.1.2 2.0.2 1.15.2 1.14.6 1.13.2 1.12.2 1.11.11 Reference documentation and code samples for the Google Cloud Tasks V2 Client class CreateQueueRequest.

Request message for
[CreateQueue](https://docs.cloud.google.com/php/docs/reference/cloud-tasks/latest/V2.Client.CloudTasksClient#_Google_Cloud_Tasks_V2_Client_CloudTasksClient__createQueue__).

Generated from protobuf message `google.cloud.tasks.v2.CreateQueueRequest`

## Namespace

Google \\ Cloud \\ Tasks \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The location name in which the queue will be created. For example: `projects/PROJECT_ID/locations/LOCATION_ID` The list of allowed locations can be obtained by calling Cloud Tasks' implementation of ListLocations. |
| `↳ queue` | `https://docs.cloud.google.com/php/docs/reference/cloud-tasks/latest/V2.Queue` Required. The queue to create. [Queue's name](https://docs.cloud.google.com/php/docs/reference/cloud-tasks/latest/V2.Queue#_Google_Cloud_Tasks_V2_Queue__getName__) cannot be the same as an existing queue. |

### getParent

Required. The location name in which the queue will be created.

For example: `projects/PROJECT_ID/locations/LOCATION_ID`
The list of allowed locations can be obtained by calling Cloud
Tasks' implementation of
ListLocations.

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

### setParent

Required. The location name in which the queue will be created.

For example: `projects/PROJECT_ID/locations/LOCATION_ID`
The list of allowed locations can be obtained by calling Cloud
Tasks' implementation of
ListLocations.

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

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

### getQueue

Required. The queue to create.

[Queue's name](https://docs.cloud.google.com/php/docs/reference/cloud-tasks/latest/V2.Queue#_Google_Cloud_Tasks_V2_Queue__getName__) cannot be the same as an
existing queue.

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

### hasQueue

### clearQueue

### setQueue

Required. The queue to create.

[Queue's name](https://docs.cloud.google.com/php/docs/reference/cloud-tasks/latest/V2.Queue#_Google_Cloud_Tasks_V2_Queue__getName__) cannot be the same as an
existing queue.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The location name in which the queue will be created. For example: `projects/PROJECT_ID/locations/LOCATION_ID` The list of allowed locations can be obtained by calling Cloud Tasks' implementation of ListLocations. Please see CloudTasksClient::locationName() for help formatting this field. |
| `queue` | `https://docs.cloud.google.com/php/docs/reference/cloud-tasks/latest/V2.Queue` Required. The queue to create. [Queue's name](https://docs.cloud.google.com/php/docs/reference/cloud-tasks/latest/V2.Queue#_Google_Cloud_Tasks_V2_Queue__getName__) cannot be the same as an existing queue. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-tasks/latest/V2.CreateQueueRequest` |   |