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

Describes a slot that a creative is expected to fill. This is used in
forecasting and to validate that the correct creatives are associated with
the line item.

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

## Namespace

Google \\ Ads \\ AdManager \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ size` | `https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.Size` Required. The size that the creative is expected to have. |
| `↳ companions` | `array<https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.CreativePlaceholderCompanion>` Optional. The companions that the creative is expected to have. This attribute can only be set if the line item it belongs to has an [EnvironmentType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.EnvironmentTypeEnum.EnvironmentType) of [VIDEO_PLAYER](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.EnvironmentTypeEnum.EnvironmentType#_Google_Ads_AdManager_V1_EnvironmentTypeEnum_EnvironmentType__VIDEO_PLAYER) or [roadblockingType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.LineItem#_Google_Ads_AdManager_V1_LineItem__getRoadblockingType__) of [CREATIVE_SET](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.RoadblockingTypeEnum.RoadblockingType#_Google_Ads_AdManager_V1_RoadblockingTypeEnum_RoadblockingType__CREATIVE_SET). |
| `↳ expected_creative_count` | `int` Optional. Non-empty default. Expected number of creatives that will be uploaded corresponding to this creative placeholder. This estimate is used to improve the accuracy of forecasting; for example, if label frequency capping limits the number of times a creative may be served. By default, the expected creative count is set to 1. |
| `↳ applied_labels` | `array<https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.AppliedLabel>` Optional. Set of labels applied directly to this CreativePlaceholder. |
| `↳ amp_only` | `bool` Optional. Non-empty default. Indicates if the expected creative of this placeholder has an AMP only variant. This is used to improve the accuracy of forecasting and has no effect on serving. By default, the value is false. |
| `↳ creative_targeting_display_name` | `string` Optional. The display name of the creative targeting that this CreativePlaceholder represents. |

### getSize

Required. The size that the creative is expected to have.

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

### hasSize

### clearSize

### setSize

Required. The size that the creative is expected to have.

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

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

### getCompanions

Optional. The companions that the creative is expected to have. This
attribute can only be set if the line item it belongs to has an
[EnvironmentType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.EnvironmentTypeEnum.EnvironmentType)
of
[VIDEO_PLAYER](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.EnvironmentTypeEnum.EnvironmentType#_Google_Ads_AdManager_V1_EnvironmentTypeEnum_EnvironmentType__VIDEO_PLAYER)
or [roadblockingType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.LineItem#_Google_Ads_AdManager_V1_LineItem__getRoadblockingType__)
of
[CREATIVE_SET](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.RoadblockingTypeEnum.RoadblockingType#_Google_Ads_AdManager_V1_RoadblockingTypeEnum_RoadblockingType__CREATIVE_SET).

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

### setCompanions

Optional. The companions that the creative is expected to have. This
attribute can only be set if the line item it belongs to has an
[EnvironmentType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.EnvironmentTypeEnum.EnvironmentType)
of
[VIDEO_PLAYER](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.EnvironmentTypeEnum.EnvironmentType#_Google_Ads_AdManager_V1_EnvironmentTypeEnum_EnvironmentType__VIDEO_PLAYER)
or [roadblockingType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.LineItem#_Google_Ads_AdManager_V1_LineItem__getRoadblockingType__)
of
[CREATIVE_SET](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.RoadblockingTypeEnum.RoadblockingType#_Google_Ads_AdManager_V1_RoadblockingTypeEnum_RoadblockingType__CREATIVE_SET).

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

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

### getExpectedCreativeCount

Optional. Non-empty default. Expected number of creatives that will be
uploaded corresponding to this creative placeholder. This estimate is used
to improve the accuracy of forecasting; for example, if label frequency
capping limits the number of times a creative may be served. By default,
the expected creative count is set to 1.

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

### hasExpectedCreativeCount

### clearExpectedCreativeCount

### setExpectedCreativeCount

Optional. Non-empty default. Expected number of creatives that will be
uploaded corresponding to this creative placeholder. This estimate is used
to improve the accuracy of forecasting; for example, if label frequency
capping limits the number of times a creative may be served. By default,
the expected creative count is set to 1.

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

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

### getAppliedLabels

Optional. Set of labels applied directly to this CreativePlaceholder.

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

### setAppliedLabels

Optional. Set of labels applied directly to this CreativePlaceholder.

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

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

### getAmpOnly

Optional. Non-empty default. Indicates if the expected creative of this
placeholder has an AMP only variant. This is used to improve the accuracy
of forecasting and has no effect on serving. By default, the value is
false.

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

### hasAmpOnly

### clearAmpOnly

### setAmpOnly

Optional. Non-empty default. Indicates if the expected creative of this
placeholder has an AMP only variant. This is used to improve the accuracy
of forecasting and has no effect on serving. By default, the value is
false.

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

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

### getCreativeTargetingDisplayName

Optional. The display name of the creative targeting that this
CreativePlaceholder represents.

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

### hasCreativeTargetingDisplayName

### clearCreativeTargetingDisplayName

### setCreativeTargetingDisplayName

Optional. The display name of the creative targeting that this
CreativePlaceholder represents.

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

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