Google Ads Ad Manager V1 Client - Class CreativeAsset (0.15.0)

Reference documentation and code samples for the Google Ads Ad Manager V1 Client class CreativeAsset.

A CreativeAsset is an asset that can be used in creatives.

Generated from protobuf message google.ads.admanager.v1.CreativeAsset

Namespace

Google \ Ads \ AdManager \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ asset string

Required. The resource name of the asset. This attribute is generated by Google upon creation. Format: networks/{network_code}/assets/{asset}

↳ asset_byte_array string

Input only. The content of the asset as a byte array. This attribute is required when creating the creative that contains this asset if asset is not provided. When updating the content, pass a new byte array, and set asset to null. Otherwise, this field can be null. The asset_byte_array will be null when the creative is retrieved.

↳ file_name string

Optional. The file name of the asset. This attribute is required when creating a new asset (e.g. when asset_byte_array is not null).

↳ file_size int|string

Output only. The file size of the asset in bytes.

↳ asset_url string

Output only. A URL where the asset can be previewed.

↳ size Size

Optional. The size of the asset. Note that this may not always reflect the actual physical size of the asset, but may reflect the expected size.

↳ click_tags array<ClickTag>

Output only. The click tags of the asset.

↳ image_density int

Non-empty default. The display density of the image. This is the ratio between a dimension in pixels of the image and the dimension in pixels that it should occupy in device-independent pixels when displayed. This attribute defaults to ONE_TO_ONE.

getAsset

Required. The resource name of the asset. This attribute is generated by Google upon creation. Format: networks/{network_code}/assets/{asset}

Returns
Type Description
string

hasAsset

clearAsset

setAsset

Required. The resource name of the asset. This attribute is generated by Google upon creation. Format: networks/{network_code}/assets/{asset}

Parameter
Name Description
var string
Returns
Type Description
$this

getAssetByteArray

Input only. The content of the asset as a byte array. This attribute is required when creating the creative that contains this asset if asset is not provided.

When updating the content, pass a new byte array, and set asset to null. Otherwise, this field can be null. The asset_byte_array will be null when the creative is retrieved.

Returns
Type Description
string

hasAssetByteArray

clearAssetByteArray

setAssetByteArray

Input only. The content of the asset as a byte array. This attribute is required when creating the creative that contains this asset if asset is not provided.

When updating the content, pass a new byte array, and set asset to null. Otherwise, this field can be null. The asset_byte_array will be null when the creative is retrieved.

Parameter
Name Description
var string
Returns
Type Description
$this

getFileName

Optional. The file name of the asset.

This attribute is required when creating a new asset (e.g. when asset_byte_array is not null).

Returns
Type Description
string

hasFileName

clearFileName

setFileName

Optional. The file name of the asset.

This attribute is required when creating a new asset (e.g. when asset_byte_array is not null).

Parameter
Name Description
var string
Returns
Type Description
$this

getFileSize

Output only. The file size of the asset in bytes.

Returns
Type Description
int|string

hasFileSize

clearFileSize

setFileSize

Output only. The file size of the asset in bytes.

Parameter
Name Description
var int|string
Returns
Type Description
$this

getAssetUrl

Output only. A URL where the asset can be previewed.

Returns
Type Description
string

hasAssetUrl

clearAssetUrl

setAssetUrl

Output only. A URL where the asset can be previewed.

Parameter
Name Description
var string
Returns
Type Description
$this

getSize

Optional. The size of the asset.

Note that this may not always reflect the actual physical size of the asset, but may reflect the expected size.

Returns
Type Description
Size|null

hasSize

clearSize

setSize

Optional. The size of the asset.

Note that this may not always reflect the actual physical size of the asset, but may reflect the expected size.

Parameter
Name Description
var Size
Returns
Type Description
$this

getClickTags

Output only. The click tags of the asset.

Returns
Type Description
Google\Protobuf\RepeatedField<ClickTag>

setClickTags

Output only. The click tags of the asset.

Parameter
Name Description
var array<ClickTag>
Returns
Type Description
$this

getImageDensity

Non-empty default. The display density of the image.

This is the ratio between a dimension in pixels of the image and the dimension in pixels that it should occupy in device-independent pixels when displayed. This attribute defaults to ONE_TO_ONE.

Returns
Type Description
int

hasImageDensity

clearImageDensity

setImageDensity

Non-empty default. The display density of the image.

This is the ratio between a dimension in pixels of the image and the dimension in pixels that it should occupy in device-independent pixels when displayed. This attribute defaults to ONE_TO_ONE.

Parameter
Name Description
var int
Returns
Type Description
$this