2.11.0 (latest) 2.10.3 2.7.0 2.6.2 2.5.0 2.4.0 2.3.0 2.2.1 2.1.2 2.0.2 1.3.5 1.2.3 1.1.2 1.0.3 Reference documentation and code samples for the Google BigQuery Reservation V1 Client class CreateAssignmentRequest.

The request for
[ReservationService.CreateAssignment](https://docs.cloud.google.com/php/docs/reference/cloud-bigquery-reservation/latest/V1.Client.ReservationServiceClient#_Google_Cloud_BigQuery_Reservation_V1_Client_ReservationServiceClient__createAssignment__).

Note: "bigquery.reservationAssignments.create" permission is required on the
related assignee.

Generated from protobuf message `google.cloud.bigquery.reservation.v1.CreateAssignmentRequest`

## Namespace

Google \\ Cloud \\ BigQuery \\ Reservation \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The parent resource name of the assignment E.g. `projects/myproject/locations/US/reservations/team1-prod` |
| `↳ assignment` | `https://docs.cloud.google.com/php/docs/reference/cloud-bigquery-reservation/latest/V1.Assignment` Assignment resource to create. |
| `↳ assignment_id` | `string` The optional assignment ID. Assignment name will be generated automatically if this field is empty. This field must only contain lower case alphanumeric characters or dashes. Max length is 64 characters. |

### getParent

Required. The parent resource name of the assignment
E.g. `projects/myproject/locations/US/reservations/team1-prod`

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

### setParent

Required. The parent resource name of the assignment
E.g. `projects/myproject/locations/US/reservations/team1-prod`

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

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

### getAssignment

Assignment resource to create.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-bigquery-reservation/latest/V1.Assignment|null` |   |

### hasAssignment

### clearAssignment

### setAssignment

Assignment resource to create.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-bigquery-reservation/latest/V1.Assignment` |

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

### getAssignmentId

The optional assignment ID. Assignment name will be generated automatically
if this field is empty.

This field must only contain lower case alphanumeric characters or dashes.
Max length is 64 characters.

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

### setAssignmentId

The optional assignment ID. Assignment name will be generated automatically
if this field is empty.

This field must only contain lower case alphanumeric characters or dashes.
Max length is 64 characters.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The parent resource name of the assignment E.g. `projects/myproject/locations/US/reservations/team1-prod` Please see ReservationServiceClient::reservationName() for help formatting this field. |
| `assignment` | `https://docs.cloud.google.com/php/docs/reference/cloud-bigquery-reservation/latest/V1.Assignment` Assignment resource to create. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-bigquery-reservation/latest/V1.CreateAssignmentRequest` |   |