0.16.0 (latest) 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 CreativeWrapper.

A `CreativeWrapper` allows the wrapping of HTML snippets to be served along
with Creative objects.

`CreativeWrapper` must be associated with a
[LabelType.CREATIVE_WRAPPER](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.LabelTypeEnum.LabelType#_Google_Ads_AdManager_V1_LabelTypeEnum_LabelType__CREATIVE_WRAPPER)
label and applied to ad units by
[AdUnit.appliedLabels](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.AdUnit#_Google_Ads_AdManager_V1_AdUnit__getAppliedLabels__).

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

## Namespace

Google \\ Ads \\ AdManager \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Identifier. The resource name of the `CreativeWrapper`. Format: `networks/{network_code}/creativeWrappers/{creative_wrapper_id}` |
| `↳ label` | `string` Required. Immutable. The resource name of the [Label](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Label). Format:`networks/{network_code}/label/{label_id}` |
| `↳ creative_wrapper_type` | `int` Required. The `creative_wrapper_type`. If the `creative_wrapper_type` is [CreativeWrapperType.VIDEO_TRACKING_URL](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CreativeWrapperTypeEnum.CreativeWrapperType#_Google_Ads_AdManager_V1_CreativeWrapperTypeEnum_CreativeWrapperType__VIDEO_TRACKING_URL), the `video_tracking_urls` field must be set. If the `creative_wrapper_type` is [CreativeWrapperType.HTML](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CreativeWrapperTypeEnum.CreativeWrapperType#_Google_Ads_AdManager_V1_CreativeWrapperTypeEnum_CreativeWrapperType__HTML), either the header or footer field must be set. |
| `↳ header_creative` | `string` Output only. The resource name of the [Creative](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Creative). Format: `networks/{network_code}/creative/{creative_id}` |
| `↳ footer_creative` | `string` Output only. The resource name of the [Creative](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Creative). Format: `networks/{network_code}/creative/{creative_id}` |
| `↳ html_header` | `string` Optional. The header HTML snippet that this `CreativeWrapper` delivers. |
| `↳ html_footer` | `string` Optional. The footer HTML snippet that this `CreativeWrapper` delivers. |
| `↳ amp_header` | `string` Optional. The header AMP snippet that this `CreativeWrapper` delivers. |
| `↳ amp_footer` | `string` Optional. The footer AMP snippet that this `CreativeWrapper` delivers. |
| `↳ video_tracking_urls` | `array<https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.VideoTrackingUrl>` Optional. The video tracking URLs that this `CreativeWrapper` delivers. This field is required if the `creative_wrapper_type` is [CreativeWrapperType.VIDEO_TRACKING_URL](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CreativeWrapperTypeEnum.CreativeWrapperType#_Google_Ads_AdManager_V1_CreativeWrapperTypeEnum_CreativeWrapperType__VIDEO_TRACKING_URL) and ignored otherwise. |
| `↳ third_party_data_declaration` | `https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.ThirdPartyDataDeclaration` Optional. The `ThirdPartyDataDeclaration` for this creative wrapper. The third party companies that are associated with this `CreativeWrapper` and are present in the `html_header` or `html_footer`. This field is only applicable when the `creative_wrapper_type` is [CreativeWrapperType.HTML](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CreativeWrapperTypeEnum.CreativeWrapperType#_Google_Ads_AdManager_V1_CreativeWrapperTypeEnum_CreativeWrapperType__HTML). |
| `↳ ordering` | `int` Optional. If there are multiple wrappers for a [Creative](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Creative), then ordering defines the order in which the HTML snippets are rendered. |
| `↳ status` | `int` Output only. The status of the `CreativeWrapper`. |

### getName

Identifier. The resource name of the `CreativeWrapper`.

Format: `networks/{network_code}/creativeWrappers/{creative_wrapper_id}`

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

### setName

Identifier. The resource name of the `CreativeWrapper`.

Format: `networks/{network_code}/creativeWrappers/{creative_wrapper_id}`

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

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

### getLabel

Required. Immutable. The resource name of the
[Label](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Label).

Format:`networks/{network_code}/label/{label_id}`

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

### setLabel

Required. Immutable. The resource name of the
[Label](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Label).

Format:`networks/{network_code}/label/{label_id}`

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

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

### getCreativeWrapperType

Required. The `creative_wrapper_type`. If the `creative_wrapper_type` is
[CreativeWrapperType.VIDEO_TRACKING_URL](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CreativeWrapperTypeEnum.CreativeWrapperType#_Google_Ads_AdManager_V1_CreativeWrapperTypeEnum_CreativeWrapperType__VIDEO_TRACKING_URL),
the `video_tracking_urls` field must be set. If the `creative_wrapper_type`
is
[CreativeWrapperType.HTML](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CreativeWrapperTypeEnum.CreativeWrapperType#_Google_Ads_AdManager_V1_CreativeWrapperTypeEnum_CreativeWrapperType__HTML),
either the header or footer field must be set.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### hasCreativeWrapperType

### clearCreativeWrapperType

### setCreativeWrapperType

Required. The `creative_wrapper_type`. If the `creative_wrapper_type` is
[CreativeWrapperType.VIDEO_TRACKING_URL](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CreativeWrapperTypeEnum.CreativeWrapperType#_Google_Ads_AdManager_V1_CreativeWrapperTypeEnum_CreativeWrapperType__VIDEO_TRACKING_URL),
the `video_tracking_urls` field must be set. If the `creative_wrapper_type`
is
[CreativeWrapperType.HTML](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CreativeWrapperTypeEnum.CreativeWrapperType#_Google_Ads_AdManager_V1_CreativeWrapperTypeEnum_CreativeWrapperType__HTML),
either the header or footer field must be set.

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

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

### getHeaderCreative

Output only. The resource name of the
[Creative](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Creative). Format:
`networks/{network_code}/creative/{creative_id}`

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

### hasHeaderCreative

### clearHeaderCreative

### setHeaderCreative

Output only. The resource name of the
[Creative](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Creative). Format:
`networks/{network_code}/creative/{creative_id}`

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

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

### getFooterCreative

Output only. The resource name of the
[Creative](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Creative). Format:
`networks/{network_code}/creative/{creative_id}`

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

### hasFooterCreative

### clearFooterCreative

### setFooterCreative

Output only. The resource name of the
[Creative](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Creative). Format:
`networks/{network_code}/creative/{creative_id}`

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

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

### getHtmlHeader

Optional. The header HTML snippet that this `CreativeWrapper` delivers.

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

### hasHtmlHeader

### clearHtmlHeader

### setHtmlHeader

Optional. The header HTML snippet that this `CreativeWrapper` delivers.

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

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

### getHtmlFooter

Optional. The footer HTML snippet that this `CreativeWrapper` delivers.

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

### hasHtmlFooter

### clearHtmlFooter

### setHtmlFooter

Optional. The footer HTML snippet that this `CreativeWrapper` delivers.

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

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

### getAmpHeader

Optional. The header AMP snippet that this `CreativeWrapper` delivers.

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

### hasAmpHeader

### clearAmpHeader

### setAmpHeader

Optional. The header AMP snippet that this `CreativeWrapper` delivers.

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

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

### getAmpFooter

Optional. The footer AMP snippet that this `CreativeWrapper` delivers.

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

### hasAmpFooter

### clearAmpFooter

### setAmpFooter

Optional. The footer AMP snippet that this `CreativeWrapper` delivers.

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

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

### getVideoTrackingUrls

Optional. The video tracking URLs that this `CreativeWrapper` delivers.

This field is required if the `creative_wrapper_type` is
[CreativeWrapperType.VIDEO_TRACKING_URL](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CreativeWrapperTypeEnum.CreativeWrapperType#_Google_Ads_AdManager_V1_CreativeWrapperTypeEnum_CreativeWrapperType__VIDEO_TRACKING_URL)
and ignored otherwise.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.VideoTrackingUrl>` |   |

### setVideoTrackingUrls

Optional. The video tracking URLs that this `CreativeWrapper` delivers.

This field is required if the `creative_wrapper_type` is
[CreativeWrapperType.VIDEO_TRACKING_URL](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CreativeWrapperTypeEnum.CreativeWrapperType#_Google_Ads_AdManager_V1_CreativeWrapperTypeEnum_CreativeWrapperType__VIDEO_TRACKING_URL)
and ignored otherwise.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.VideoTrackingUrl>` |

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

### getThirdPartyDataDeclaration

Optional. The `ThirdPartyDataDeclaration` for this creative wrapper.

The third party companies that are associated with this `CreativeWrapper`
and are present in the `html_header` or `html_footer`. This field is only
applicable when the `creative_wrapper_type` is
[CreativeWrapperType.HTML](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CreativeWrapperTypeEnum.CreativeWrapperType#_Google_Ads_AdManager_V1_CreativeWrapperTypeEnum_CreativeWrapperType__HTML).

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

### hasThirdPartyDataDeclaration

### clearThirdPartyDataDeclaration

### setThirdPartyDataDeclaration

Optional. The `ThirdPartyDataDeclaration` for this creative wrapper.

The third party companies that are associated with this `CreativeWrapper`
and are present in the `html_header` or `html_footer`. This field is only
applicable when the `creative_wrapper_type` is
[CreativeWrapperType.HTML](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CreativeWrapperTypeEnum.CreativeWrapperType#_Google_Ads_AdManager_V1_CreativeWrapperTypeEnum_CreativeWrapperType__HTML).

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

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

### getOrdering

Optional. If there are multiple wrappers for a
[Creative](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Creative), then ordering
defines the order in which the HTML snippets are rendered.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### hasOrdering

### clearOrdering

### setOrdering

Optional. If there are multiple wrappers for a
[Creative](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Creative), then ordering
defines the order in which the HTML snippets are rendered.

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

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

### getStatus

Output only. The status of the `CreativeWrapper`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### hasStatus

### clearStatus

### setStatus

Output only. The status of the `CreativeWrapper`.

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

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