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 CreateCapacityCommitmentRequest.

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

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. Resource name of the parent reservation. E.g., `projects/myproject/locations/US` |
| `↳ capacity_commitment` | `https://docs.cloud.google.com/php/docs/reference/cloud-bigquery-reservation/latest/V1.CapacityCommitment` Content of the capacity commitment to create. |
| `↳ enforce_single_admin_project_per_org` | `bool` If true, fail the request if another project in the organization has a capacity commitment. |
| `↳ capacity_commitment_id` | `string` The optional capacity commitment ID. Capacity commitment name will be generated automatically if this field is empty. This field must only contain lower case alphanumeric characters or dashes. The first and last character cannot be a dash. Max length is 64 characters. NOTE: this ID won't be kept if the capacity commitment is split or merged. |

### getParent

Required. Resource name of the parent reservation. E.g.,
`projects/myproject/locations/US`

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

### setParent

Required. Resource name of the parent reservation. E.g.,
`projects/myproject/locations/US`

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

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

### getCapacityCommitment

Content of the capacity commitment to create.

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

### hasCapacityCommitment

### clearCapacityCommitment

### setCapacityCommitment

Content of the capacity commitment to create.

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

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

### getEnforceSingleAdminProjectPerOrg

If true, fail the request if another project in the organization has a
capacity commitment.

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

### setEnforceSingleAdminProjectPerOrg

If true, fail the request if another project in the organization has a
capacity commitment.

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

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

### getCapacityCommitmentId

The optional capacity commitment ID. Capacity commitment name will be
generated automatically if this field is empty.

This field must only contain lower case alphanumeric characters or dashes.
The first and last character cannot be a dash. Max length is 64 characters.
NOTE: this ID won't be kept if the capacity commitment is split or merged.

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

### setCapacityCommitmentId

The optional capacity commitment ID. Capacity commitment name will be
generated automatically if this field is empty.

This field must only contain lower case alphanumeric characters or dashes.
The first and last character cannot be a dash. Max length is 64 characters.
NOTE: this ID won't be kept if the capacity commitment is split or merged.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. Resource name of the parent reservation. E.g., `projects/myproject/locations/US` Please see ReservationServiceClient::locationName() for help formatting this field. |
| `capacityCommitment` | `https://docs.cloud.google.com/php/docs/reference/cloud-bigquery-reservation/latest/V1.CapacityCommitment` Content of the capacity commitment to create. |

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