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

Represents the `Creative` and its corresponding preview URL. \*/

Generated from protobuf message `google.ads.admanager.v1.PreviewLineItemCreativeAssociationResponse.Preview`

## Namespace

Google \\ Ads \\ AdManager \\ V1 \\ PreviewLineItemCreativeAssociationResponse

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ preview_type` | `int` Represents the type of preview. |
| `↳ on_site_preview_url` | `string` The URL for previewing this creative. |
| `↳ native_style` | `string` The resource names of the `NativeStyle` for the preview. Only relevant when PreviewType is NATIVE. Format: `networks/{network_code}/nativeStyles/{native_style_id}` |

### getPreviewType

Represents the type of preview.

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

### setPreviewType

Represents the type of preview.

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

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

### getOnSitePreviewUrl

The URL for previewing this creative.

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

### setOnSitePreviewUrl

The URL for previewing this creative.

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

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

### getNativeStyle

The resource names of the `NativeStyle` for the preview.

Only relevant when PreviewType is NATIVE.
Format:
`networks/{network_code}/nativeStyles/{native_style_id}`

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

### setNativeStyle

The resource names of the `NativeStyle` for the preview.

Only relevant when PreviewType is NATIVE.
Format:
`networks/{network_code}/nativeStyles/{native_style_id}`

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

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