Class CreativeTemplate (0.39.0)

public final class CreativeTemplate extends GeneratedMessageV3 implements CreativeTemplateOrBuilder

A template that can be used to create a [TemplateCreative][].

Protobuf type google.ads.admanager.v1.CreativeTemplate

Static Fields

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

INTERSTITIAL_FIELD_NUMBER

public static final int INTERSTITIAL_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

NATIVE_ELIGIBLE_FIELD_NUMBER

public static final int NATIVE_ELIGIBLE_FIELD_NUMBER
Field Value
Type Description
int

NATIVE_VIDEO_ELIGIBLE_FIELD_NUMBER

public static final int NATIVE_VIDEO_ELIGIBLE_FIELD_NUMBER
Field Value
Type Description
int

SAFE_FRAME_COMPATIBLE_FIELD_NUMBER

public static final int SAFE_FRAME_COMPATIBLE_FIELD_NUMBER
Field Value
Type Description
int

SNIPPET_FIELD_NUMBER

public static final int SNIPPET_FIELD_NUMBER
Field Value
Type Description
int

STATUS_FIELD_NUMBER

public static final int STATUS_FIELD_NUMBER
Field Value
Type Description
int

TYPE_FIELD_NUMBER

public static final int TYPE_FIELD_NUMBER
Field Value
Type Description
int

VARIABLES_FIELD_NUMBER

public static final int VARIABLES_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static CreativeTemplate getDefaultInstance()
Returns
Type Description
CreativeTemplate

getDescriptor()

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

newBuilder()

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

newBuilder(CreativeTemplate prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public CreativeTemplate getDefaultInstanceForType()
Returns
Type Description
CreativeTemplate

getDescription()

public String getDescription()

Optional. The description of the creative template.

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

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. The description of the creative template.

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

Returns
Type Description
ByteString

The bytes for description.

getDisplayName()

public String getDisplayName()

Required. The display name of the creative template. This has a maximum length of 255 characters.

optional string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The display name of the creative template. This has a maximum length of 255 characters.

optional string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for displayName.

getInterstitial()

public boolean getInterstitial()

Optional. True if this creative template produces out-of-page creatives. Creative templates with this setting enabled must include the viewed impression macro.

optional bool interstitial = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The interstitial.

getName()

public String getName()

Identifier. The resource name of the creative template. Format: networks/{network_code}/creativeTemplates/{creative_template_id}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The resource name of the creative template. Format: networks/{network_code}/creativeTemplates/{creative_template_id}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getNativeEligible()

public boolean getNativeEligible()

Optional. True if this creative template produces native-eligible creatives.

optional bool native_eligible = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The nativeEligible.

getNativeVideoEligible()

public boolean getNativeVideoEligible()

Optional. True if this creative template produces native video-eligible creatives.

optional bool native_video_eligible = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The nativeVideoEligible.

getParserForType()

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

getSafeFrameCompatible()

public boolean getSafeFrameCompatible()

Optional. Whether the Creative produced is compatible for SafeFrame rendering. This attribute defaults to True.

optional bool safe_frame_compatible = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The safeFrameCompatible.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSnippet()

public String getSnippet()

Required. The code snippet of the creative template, with placeholders for the associated variables.

optional string snippet = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The snippet.

getSnippetBytes()

public ByteString getSnippetBytes()

Required. The code snippet of the creative template, with placeholders for the associated variables.

optional string snippet = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for snippet.

getStatus()

public CreativeTemplateStatusEnum.CreativeTemplateStatus getStatus()

Output only. The status of the creative template. This attribute is assigned by Google.

optional .google.ads.admanager.v1.CreativeTemplateStatusEnum.CreativeTemplateStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CreativeTemplateStatusEnum.CreativeTemplateStatus

The status.

getStatusValue()

public int getStatusValue()

Output only. The status of the creative template. This attribute is assigned by Google.

optional .google.ads.admanager.v1.CreativeTemplateStatusEnum.CreativeTemplateStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for status.

getType()

public CreativeTemplateTypeEnum.CreativeTemplateType getType()

Optional. The type of the creative template. Users can only create or update CreativeTemplateType.CUSTOM templates.

optional .google.ads.admanager.v1.CreativeTemplateTypeEnum.CreativeTemplateType type = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CreativeTemplateTypeEnum.CreativeTemplateType

The type.

getTypeValue()

public int getTypeValue()

Optional. The type of the creative template. Users can only create or update CreativeTemplateType.CUSTOM templates.

optional .google.ads.admanager.v1.CreativeTemplateTypeEnum.CreativeTemplateType type = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for type.

getVariables(int index)

public CreativeTemplateVariable getVariables(int index)

Required. The list of creative template variables.

repeated .google.ads.admanager.v1.CreativeTemplateVariable variables = 14 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
CreativeTemplateVariable

getVariablesCount()

public int getVariablesCount()

Required. The list of creative template variables.

repeated .google.ads.admanager.v1.CreativeTemplateVariable variables = 14 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

getVariablesList()

public List<CreativeTemplateVariable> getVariablesList()

Required. The list of creative template variables.

repeated .google.ads.admanager.v1.CreativeTemplateVariable variables = 14 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<CreativeTemplateVariable>

getVariablesOrBuilder(int index)

public CreativeTemplateVariableOrBuilder getVariablesOrBuilder(int index)

Required. The list of creative template variables.

repeated .google.ads.admanager.v1.CreativeTemplateVariable variables = 14 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
CreativeTemplateVariableOrBuilder

getVariablesOrBuilderList()

public List<? extends CreativeTemplateVariableOrBuilder> getVariablesOrBuilderList()

Required. The list of creative template variables.

repeated .google.ads.admanager.v1.CreativeTemplateVariable variables = 14 [(.google.api.field_behavior) = REQUIRED];

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

hasDescription()

public boolean hasDescription()

Optional. The description of the creative template.

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

Returns
Type Description
boolean

Whether the description field is set.

hasDisplayName()

public boolean hasDisplayName()

Required. The display name of the creative template. This has a maximum length of 255 characters.

optional string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the displayName field is set.

hasInterstitial()

public boolean hasInterstitial()

Optional. True if this creative template produces out-of-page creatives. Creative templates with this setting enabled must include the viewed impression macro.

optional bool interstitial = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the interstitial field is set.

hasNativeEligible()

public boolean hasNativeEligible()

Optional. True if this creative template produces native-eligible creatives.

optional bool native_eligible = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the nativeEligible field is set.

hasNativeVideoEligible()

public boolean hasNativeVideoEligible()

Optional. True if this creative template produces native video-eligible creatives.

optional bool native_video_eligible = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the nativeVideoEligible field is set.

hasSafeFrameCompatible()

public boolean hasSafeFrameCompatible()

Optional. Whether the Creative produced is compatible for SafeFrame rendering. This attribute defaults to True.

optional bool safe_frame_compatible = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the safeFrameCompatible field is set.

hasSnippet()

public boolean hasSnippet()

Required. The code snippet of the creative template, with placeholders for the associated variables.

optional string snippet = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the snippet field is set.

hasStatus()

public boolean hasStatus()

Output only. The status of the creative template. This attribute is assigned by Google.

optional .google.ads.admanager.v1.CreativeTemplateStatusEnum.CreativeTemplateStatus status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the status field is set.

hasType()

public boolean hasType()

Optional. The type of the creative template. Users can only create or update CreativeTemplateType.CUSTOM templates.

optional .google.ads.admanager.v1.CreativeTemplateTypeEnum.CreativeTemplateType type = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the type field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected CreativeTemplate.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
CreativeTemplate.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

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