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

Represents the dimensions of an AdUnit, LineItem, or Creative.

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

## Namespace

Google \\ Ads \\ AdManager \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ width` | `int` Required. The width of the Creative, [AdUnit](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.AdUnit.md.txt), or LineItem. |
| `↳ height` | `int` Required. The height of the Creative, [AdUnit](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.AdUnit.md.txt), or LineItem. |
| `↳ size_type` | `int` Required. The SizeType of the Creative, [AdUnit](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.AdUnit.md.txt), or LineItem. |

### getWidth

Required. The width of the Creative,
[AdUnit](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.AdUnit.md.txt), or LineItem.

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

### setWidth

Required. The width of the Creative,
[AdUnit](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.AdUnit.md.txt), or LineItem.

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

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

### getHeight

Required. The height of the Creative,
[AdUnit](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.AdUnit.md.txt), or LineItem.

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

### setHeight

Required. The height of the Creative,
[AdUnit](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.AdUnit.md.txt), or LineItem.

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

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

### getSizeType

Required. The SizeType of the Creative,
[AdUnit](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.AdUnit.md.txt), or LineItem.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [SizeType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.SizeTypeEnum.SizeType.md.txt). |

### setSizeType

Required. The SizeType of the Creative,
[AdUnit](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.AdUnit.md.txt), or LineItem.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [SizeType](https://docs.cloud.google.com/php/docs/reference/ad-manager/latest/V1.SizeTypeEnum.SizeType.md.txt). |

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