0.17.0 (latest) 0.16.0 0.15.1 0.14.1 0.8.0 0.7.0 0.6.2 0.5.0 0.4.1 0.3.1 0.2.0 0.1.3 Reference documentation and code samples for the Google Ads Ad Manager V1 Client class CreateAdUnitRequest.

Request object for `CreateAdUnit` method.

Generated from protobuf message `google.ads.admanager.v1.CreateAdUnitRequest`

## Namespace

Google \\ Ads \\ AdManager \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The parent resource where this `AdUnit` will be created. Format: `networks/{network_code}` |
| `↳ ad_unit` | `AdUnit` Required. The `AdUnit` to create. |

### getParent

Required. The parent resource where this `AdUnit` will be created.

Format: `networks/{network_code}`

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

### setParent

Required. The parent resource where this `AdUnit` will be created.

Format: `networks/{network_code}`

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

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

### getAdUnit

Required. The `AdUnit` to create.

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

### hasAdUnit

### clearAdUnit

### setAdUnit

Required. The `AdUnit` to create.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The parent resource where this `AdUnit` will be created. Format: `networks/{network_code}` Please see AdUnitServiceClient::networkName() for help formatting this field. |
| `adUnit` | `AdUnit` Required. The `AdUnit` to create. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `CreateAdUnitRequest` |   |