# Google Cloud Billing V1 Client - Class CreateBillingAccountRequest (2.2.2)

2.2.2 (latest) 2.2.1 2.1.3 2.0.1 1.9.8 1.8.0 1.7.5 1.6.0 1.5.6 Reference documentation and code samples for the Google Cloud Billing V1 Client class CreateBillingAccountRequest.

Request message for `CreateBillingAccount`.

Generated from protobuf message `google.cloud.billing.v1.CreateBillingAccountRequest`

## Namespace

Google \\ Cloud \\ Billing \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ billing_account` | `https://docs.cloud.google.com/php/docs/reference/cloud-billing/latest/V1.BillingAccount` Required. The billing account resource to create. Currently CreateBillingAccount only supports subaccount creation, so any created billing accounts must be under a provided parent billing account. |
| `↳ parent` | `string` Optional. The parent to create a billing account from. Format: - `billingAccounts/{billing_account_id}`, for example, `billingAccounts/012345-567890-ABCDEF` |

### getBillingAccount

Required. The billing account resource to create.

Currently CreateBillingAccount only supports subaccount creation, so
any created billing accounts must be under a provided parent billing
account.

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

### hasBillingAccount

### clearBillingAccount

### setBillingAccount

Required. The billing account resource to create.

Currently CreateBillingAccount only supports subaccount creation, so
any created billing accounts must be under a provided parent billing
account.

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

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

### getParent

Optional. The parent to create a billing account from.

Format:

- `billingAccounts/{billing_account_id}`, for example, `billingAccounts/012345-567890-ABCDEF`

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

### setParent

Optional. The parent to create a billing account from.

Format:

- `billingAccounts/{billing_account_id}`, for example, `billingAccounts/012345-567890-ABCDEF`

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

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

### static::build

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `billingAccount` | `https://docs.cloud.google.com/php/docs/reference/cloud-billing/latest/V1.BillingAccount` Required. The billing account resource to create. Currently CreateBillingAccount only supports subaccount creation, so any created billing accounts must be under a provided parent billing account. |

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

### static::buildFromBillingAccountParent

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `billingAccount` | `https://docs.cloud.google.com/php/docs/reference/cloud-billing/latest/V1.BillingAccount` Required. The billing account resource to create. Currently CreateBillingAccount only supports subaccount creation, so any created billing accounts must be under a provided parent billing account. |
| `parent` | `string` Optional. The parent to create a billing account from. Format: - `billingAccounts/{billing_account_id}`, for example, `billingAccounts/012345-567890-ABCDEF` |

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