Class CustomCreativeAsset.Builder (0.62.0)

public static final class CustomCreativeAsset.Builder extends GeneratedMessage.Builder<CustomCreativeAsset.Builder> implements CustomCreativeAssetOrBuilder

A CustomCreativeAsset is an association between a CustomCreative and an asset. Any assets that are associated with a creative can be inserted into its HTML snippet.

Protobuf type google.ads.admanager.v1.CustomCreativeAsset

Static Methods

getDescriptor()

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

Methods

build()

public CustomCreativeAsset build()
Returns
Type Description
CustomCreativeAsset

buildPartial()

public CustomCreativeAsset buildPartial()
Returns
Type Description
CustomCreativeAsset

clear()

public CustomCreativeAsset.Builder clear()
Returns
Type Description
CustomCreativeAsset.Builder
Overrides

clearAsset()

public CustomCreativeAsset.Builder clearAsset()

Required. The asset. To view the asset, use CreativeAsset.asset_url.

.google.ads.admanager.v1.CreativeAsset asset = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CustomCreativeAsset.Builder

clearMacroName()

public CustomCreativeAsset.Builder clearMacroName()

Optional. The name by which the associated asset will be referenced. For example, if the value is "foo", then the asset can be inserted into an HTML snippet using the macro: "%%FILE:foo%%".

optional string macro_name = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CustomCreativeAsset.Builder

This builder for chaining.

getAsset()

public CreativeAsset getAsset()

Required. The asset. To view the asset, use CreativeAsset.asset_url.

.google.ads.admanager.v1.CreativeAsset asset = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CreativeAsset

The asset.

getAssetBuilder()

public CreativeAsset.Builder getAssetBuilder()

Required. The asset. To view the asset, use CreativeAsset.asset_url.

.google.ads.admanager.v1.CreativeAsset asset = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CreativeAsset.Builder

getAssetOrBuilder()

public CreativeAssetOrBuilder getAssetOrBuilder()

Required. The asset. To view the asset, use CreativeAsset.asset_url.

.google.ads.admanager.v1.CreativeAsset asset = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
CreativeAssetOrBuilder

getDefaultInstanceForType()

public CustomCreativeAsset getDefaultInstanceForType()
Returns
Type Description
CustomCreativeAsset

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getMacroName()

public String getMacroName()

Optional. The name by which the associated asset will be referenced. For example, if the value is "foo", then the asset can be inserted into an HTML snippet using the macro: "%%FILE:foo%%".

optional string macro_name = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The macroName.

getMacroNameBytes()

public ByteString getMacroNameBytes()

Optional. The name by which the associated asset will be referenced. For example, if the value is "foo", then the asset can be inserted into an HTML snippet using the macro: "%%FILE:foo%%".

optional string macro_name = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for macroName.

hasAsset()

public boolean hasAsset()

Required. The asset. To view the asset, use CreativeAsset.asset_url.

.google.ads.admanager.v1.CreativeAsset asset = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the asset field is set.

hasMacroName()

public boolean hasMacroName()

Optional. The name by which the associated asset will be referenced. For example, if the value is "foo", then the asset can be inserted into an HTML snippet using the macro: "%%FILE:foo%%".

optional string macro_name = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the macroName field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeAsset(CreativeAsset value)

public CustomCreativeAsset.Builder mergeAsset(CreativeAsset value)

Required. The asset. To view the asset, use CreativeAsset.asset_url.

.google.ads.admanager.v1.CreativeAsset asset = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value CreativeAsset
Returns
Type Description
CustomCreativeAsset.Builder

mergeFrom(CustomCreativeAsset other)

public CustomCreativeAsset.Builder mergeFrom(CustomCreativeAsset other)
Parameter
Name Description
other CustomCreativeAsset
Returns
Type Description
CustomCreativeAsset.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CustomCreativeAsset.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
CustomCreativeAsset.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public CustomCreativeAsset.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
CustomCreativeAsset.Builder
Overrides

setAsset(CreativeAsset value)

public CustomCreativeAsset.Builder setAsset(CreativeAsset value)

Required. The asset. To view the asset, use CreativeAsset.asset_url.

.google.ads.admanager.v1.CreativeAsset asset = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value CreativeAsset
Returns
Type Description
CustomCreativeAsset.Builder

setAsset(CreativeAsset.Builder builderForValue)

public CustomCreativeAsset.Builder setAsset(CreativeAsset.Builder builderForValue)

Required. The asset. To view the asset, use CreativeAsset.asset_url.

.google.ads.admanager.v1.CreativeAsset asset = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue CreativeAsset.Builder
Returns
Type Description
CustomCreativeAsset.Builder

setMacroName(String value)

public CustomCreativeAsset.Builder setMacroName(String value)

Optional. The name by which the associated asset will be referenced. For example, if the value is "foo", then the asset can be inserted into an HTML snippet using the macro: "%%FILE:foo%%".

optional string macro_name = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The macroName to set.

Returns
Type Description
CustomCreativeAsset.Builder

This builder for chaining.

setMacroNameBytes(ByteString value)

public CustomCreativeAsset.Builder setMacroNameBytes(ByteString value)

Optional. The name by which the associated asset will be referenced. For example, if the value is "foo", then the asset can be inserted into an HTML snippet using the macro: "%%FILE:foo%%".

optional string macro_name = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for macroName to set.

Returns
Type Description
CustomCreativeAsset.Builder

This builder for chaining.