Class CreativeAsset (0.62.0)

public final class CreativeAsset extends GeneratedMessage implements CreativeAssetOrBuilder

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

Protobuf type google.ads.admanager.v1.CreativeAsset

Static Fields

ASSET_BYTE_ARRAY_FIELD_NUMBER

public static final int ASSET_BYTE_ARRAY_FIELD_NUMBER
Field Value
Type Description
int

ASSET_FIELD_NUMBER

public static final int ASSET_FIELD_NUMBER
Field Value
Type Description
int

ASSET_URL_FIELD_NUMBER

public static final int ASSET_URL_FIELD_NUMBER
Field Value
Type Description
int

CLICK_TAGS_FIELD_NUMBER

public static final int CLICK_TAGS_FIELD_NUMBER
Field Value
Type Description
int

FILE_NAME_FIELD_NUMBER

public static final int FILE_NAME_FIELD_NUMBER
Field Value
Type Description
int

FILE_SIZE_FIELD_NUMBER

public static final int FILE_SIZE_FIELD_NUMBER
Field Value
Type Description
int

IMAGE_DENSITY_FIELD_NUMBER

public static final int IMAGE_DENSITY_FIELD_NUMBER
Field Value
Type Description
int

SIZE_FIELD_NUMBER

public static final int SIZE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static CreativeAsset getDefaultInstance()
Returns
Type Description
CreativeAsset

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static CreativeAsset.Builder newBuilder()
Returns
Type Description
CreativeAsset.Builder

newBuilder(CreativeAsset prototype)

public static CreativeAsset.Builder newBuilder(CreativeAsset prototype)
Parameter
Name Description
prototype CreativeAsset
Returns
Type Description
CreativeAsset.Builder

parseDelimitedFrom(InputStream input)

public static CreativeAsset parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CreativeAsset
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CreativeAsset parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CreativeAsset
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static CreativeAsset parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
CreativeAsset
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static CreativeAsset parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CreativeAsset
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static CreativeAsset parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
CreativeAsset
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static CreativeAsset parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CreativeAsset
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static CreativeAsset parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
CreativeAsset
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static CreativeAsset parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CreativeAsset
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static CreativeAsset parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
CreativeAsset
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static CreativeAsset parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CreativeAsset
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static CreativeAsset parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
CreativeAsset
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static CreativeAsset parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CreativeAsset
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<CreativeAsset> parser()
Returns
Type Description
Parser<CreativeAsset>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAsset()

public String getAsset()

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

optional string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The asset.

getAssetByteArray()

public ByteString 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.

optional bytes asset_byte_array = 2 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
ByteString

The assetByteArray.

getAssetBytes()

public ByteString getAssetBytes()

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

optional string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for asset.

getAssetUrl()

public String getAssetUrl()

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

optional string asset_url = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The assetUrl.

getAssetUrlBytes()

public ByteString getAssetUrlBytes()

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

optional string asset_url = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for assetUrl.

getClickTags(int index)

public ClickTag getClickTags(int index)

Output only. The click tags of the asset.

repeated .google.ads.admanager.v1.ClickTag click_tags = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
ClickTag

getClickTagsCount()

public int getClickTagsCount()

Output only. The click tags of the asset.

repeated .google.ads.admanager.v1.ClickTag click_tags = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getClickTagsList()

public List<ClickTag> getClickTagsList()

Output only. The click tags of the asset.

repeated .google.ads.admanager.v1.ClickTag click_tags = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<ClickTag>

getClickTagsOrBuilder(int index)

public ClickTagOrBuilder getClickTagsOrBuilder(int index)

Output only. The click tags of the asset.

repeated .google.ads.admanager.v1.ClickTag click_tags = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
ClickTagOrBuilder

getClickTagsOrBuilderList()

public List<? extends ClickTagOrBuilder> getClickTagsOrBuilderList()

Output only. The click tags of the asset.

repeated .google.ads.admanager.v1.ClickTag click_tags = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<? extends com.google.ads.admanager.v1.ClickTagOrBuilder>

getDefaultInstanceForType()

public CreativeAsset getDefaultInstanceForType()
Returns
Type Description
CreativeAsset

getFileName()

public String 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).

optional string file_name = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The fileName.

getFileNameBytes()

public ByteString getFileNameBytes()

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

optional string file_name = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for fileName.

getFileSize()

public long getFileSize()

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

optional int64 file_size = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The fileSize.

getImageDensity()

public AssetImageDensityEnum.AssetImageDensity 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.

optional .google.ads.admanager.v1.AssetImageDensityEnum.AssetImageDensity image_density = 8 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Returns
Type Description
AssetImageDensityEnum.AssetImageDensity

The imageDensity.

getImageDensityValue()

public int getImageDensityValue()

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.

optional .google.ads.admanager.v1.AssetImageDensityEnum.AssetImageDensity image_density = 8 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Returns
Type Description
int

The enum numeric value on the wire for imageDensity.

getParserForType()

public Parser<CreativeAsset> getParserForType()
Returns
Type Description
Parser<CreativeAsset>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSize()

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

.google.ads.admanager.v1.Size size = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Size

The size.

getSizeOrBuilder()

public SizeOrBuilder getSizeOrBuilder()

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.

.google.ads.admanager.v1.Size size = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
SizeOrBuilder

hasAsset()

public boolean hasAsset()

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

optional string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
boolean

Whether the asset field is set.

hasAssetByteArray()

public boolean hasAssetByteArray()

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.

optional bytes asset_byte_array = 2 [(.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
boolean

Whether the assetByteArray field is set.

hasAssetUrl()

public boolean hasAssetUrl()

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

optional string asset_url = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the assetUrl field is set.

hasFileName()

public boolean hasFileName()

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

optional string file_name = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the fileName field is set.

hasFileSize()

public boolean hasFileSize()

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

optional int64 file_size = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the fileSize field is set.

hasImageDensity()

public boolean hasImageDensity()

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.

optional .google.ads.admanager.v1.AssetImageDensityEnum.AssetImageDensity image_density = 8 [(.google.api.field_behavior) = NON_EMPTY_DEFAULT];

Returns
Type Description
boolean

Whether the imageDensity field is set.

hasSize()

public boolean hasSize()

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.

.google.ads.admanager.v1.Size size = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the size field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public CreativeAsset.Builder newBuilderForType()
Returns
Type Description
CreativeAsset.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected CreativeAsset.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
CreativeAsset.Builder
Overrides

toBuilder()

public CreativeAsset.Builder toBuilder()
Returns
Type Description
CreativeAsset.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException