Class BreakTemplate (0.58.0)

public final class BreakTemplate extends GeneratedMessage implements BreakTemplateOrBuilder

A BreakTemplate defines what kinds of ads show at which positions within a pod. Break templates are made up of AdSpot objects. A break template must have a single ad spot that has flexible set to true.

Protobuf type google.ads.admanager.v1.BreakTemplate

Static Fields

AD_BREAK_OPTIMIZATION_TYPE_FIELD_NUMBER

public static final int AD_BREAK_OPTIMIZATION_TYPE_FIELD_NUMBER
Field Value
Type Description
int

AD_TAG_NAME_FIELD_NUMBER

public static final int AD_TAG_NAME_FIELD_NUMBER
Field Value
Type Description
int

BREAK_TEMPLATE_MEMBERS_FIELD_NUMBER

public static final int BREAK_TEMPLATE_MEMBERS_FIELD_NUMBER
Field Value
Type Description
int

CUSTOM_TEMPLATE_FIELD_NUMBER

public static final int CUSTOM_TEMPLATE_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

FILL_ORDER_DIRECTION_TYPE_FIELD_NUMBER

public static final int FILL_ORDER_DIRECTION_TYPE_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static BreakTemplate getDefaultInstance()
Returns
Type Description
BreakTemplate

getDescriptor()

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

newBuilder()

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

newBuilder(BreakTemplate prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getAdBreakOptimizationType()

public AdBreakOptimizationTypeEnum.AdBreakOptimizationType getAdBreakOptimizationType()

Optional. The optimization type of the pod. This field is optional and defaults to [AdBreakOptimizationType.REVENUE][].

optional .google.ads.admanager.v1.AdBreakOptimizationTypeEnum.AdBreakOptimizationType ad_break_optimization_type = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AdBreakOptimizationTypeEnum.AdBreakOptimizationType

The adBreakOptimizationType.

getAdBreakOptimizationTypeValue()

public int getAdBreakOptimizationTypeValue()

Optional. The optimization type of the pod. This field is optional and defaults to [AdBreakOptimizationType.REVENUE][].

optional .google.ads.admanager.v1.AdBreakOptimizationTypeEnum.AdBreakOptimizationType ad_break_optimization_type = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for adBreakOptimizationType.

getAdTagName()

public String getAdTagName()

Optional. Name of the BreakTemplate. The name is case insensitive and can be referenced in ad tags. This value is required if customTemplate is true, and cannot be set otherwise. You can use alphanumeric characters and symbols other than the following: ", ', =, !, +, #, ,, ~, ;, ^, (, ), <, >, [, ], the white space character.

optional string ad_tag_name = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The adTagName.

getAdTagNameBytes()

public ByteString getAdTagNameBytes()

Optional. Name of the BreakTemplate. The name is case insensitive and can be referenced in ad tags. This value is required if customTemplate is true, and cannot be set otherwise. You can use alphanumeric characters and symbols other than the following: ", ', =, !, +, #, ,, ~, ;, ^, (, ), <, >, [, ], the white space character.

optional string ad_tag_name = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for adTagName.

getBreakTemplateMembers(int index)

public BreakTemplateMember getBreakTemplateMembers(int index)

Optional. The list of the BreakTemplateMember objects in the order in which they should appear in the ad pod. Each BreakTemplateMember has a reference to an AdSpot, which defines what kinds of ads can appear at that position, as well as other metadata that defines how each ad spot should be filled.

repeated .google.ads.admanager.v1.BreakTemplateMember break_template_members = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
BreakTemplateMember

getBreakTemplateMembersCount()

public int getBreakTemplateMembersCount()

Optional. The list of the BreakTemplateMember objects in the order in which they should appear in the ad pod. Each BreakTemplateMember has a reference to an AdSpot, which defines what kinds of ads can appear at that position, as well as other metadata that defines how each ad spot should be filled.

repeated .google.ads.admanager.v1.BreakTemplateMember break_template_members = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getBreakTemplateMembersList()

public List<BreakTemplateMember> getBreakTemplateMembersList()

Optional. The list of the BreakTemplateMember objects in the order in which they should appear in the ad pod. Each BreakTemplateMember has a reference to an AdSpot, which defines what kinds of ads can appear at that position, as well as other metadata that defines how each ad spot should be filled.

repeated .google.ads.admanager.v1.BreakTemplateMember break_template_members = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<BreakTemplateMember>

getBreakTemplateMembersOrBuilder(int index)

public BreakTemplateMemberOrBuilder getBreakTemplateMembersOrBuilder(int index)

Optional. The list of the BreakTemplateMember objects in the order in which they should appear in the ad pod. Each BreakTemplateMember has a reference to an AdSpot, which defines what kinds of ads can appear at that position, as well as other metadata that defines how each ad spot should be filled.

repeated .google.ads.admanager.v1.BreakTemplateMember break_template_members = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
BreakTemplateMemberOrBuilder

getBreakTemplateMembersOrBuilderList()

public List<? extends BreakTemplateMemberOrBuilder> getBreakTemplateMembersOrBuilderList()

Optional. The list of the BreakTemplateMember objects in the order in which they should appear in the ad pod. Each BreakTemplateMember has a reference to an AdSpot, which defines what kinds of ads can appear at that position, as well as other metadata that defines how each ad spot should be filled.

repeated .google.ads.admanager.v1.BreakTemplateMember break_template_members = 5 [(.google.api.field_behavior) = OPTIONAL];

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

getCustomTemplate()

public boolean getCustomTemplate()

Optional. Whether this is a custom template. Custom templates get created outside of the ad rule workflow and can be referenced in ad tags. Only custom templates can have names and display names.

optional bool custom_template = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The customTemplate.

getDefaultInstanceForType()

public BreakTemplate getDefaultInstanceForType()
Returns
Type Description
BreakTemplate

getDisplayName()

public String getDisplayName()

Optional. Descriptive name for the BreakTemplate. This value is optional if customTemplate is true, and cannot be set otherwise.

optional string display_name = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Optional. Descriptive name for the BreakTemplate. This value is optional if customTemplate is true, and cannot be set otherwise.

optional string display_name = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for displayName.

getFillOrderDirectionType()

public AdRuleFillOrderDirectionEnum.AdRuleFillOrderDirection getFillOrderDirectionType()

Optional. The fill order direction of the pod. This value is required if adBreakOptimizationType is equal to [AdBreakOptimizationType.POSITION][] and should otherwise be unset.

optional .google.ads.admanager.v1.AdRuleFillOrderDirectionEnum.AdRuleFillOrderDirection fill_order_direction_type = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AdRuleFillOrderDirectionEnum.AdRuleFillOrderDirection

The fillOrderDirectionType.

getFillOrderDirectionTypeValue()

public int getFillOrderDirectionTypeValue()

Optional. The fill order direction of the pod. This value is required if adBreakOptimizationType is equal to [AdBreakOptimizationType.POSITION][] and should otherwise be unset.

optional .google.ads.admanager.v1.AdRuleFillOrderDirectionEnum.AdRuleFillOrderDirection fill_order_direction_type = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for fillOrderDirectionType.

getName()

public String getName()

Identifier. The resource name of the BreakTemplate. Format: networks/{network_code}/breakTemplates/{break_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 BreakTemplate. Format: networks/{network_code}/breakTemplates/{break_template_id}

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

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasAdBreakOptimizationType()

public boolean hasAdBreakOptimizationType()

Optional. The optimization type of the pod. This field is optional and defaults to [AdBreakOptimizationType.REVENUE][].

optional .google.ads.admanager.v1.AdBreakOptimizationTypeEnum.AdBreakOptimizationType ad_break_optimization_type = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the adBreakOptimizationType field is set.

hasAdTagName()

public boolean hasAdTagName()

Optional. Name of the BreakTemplate. The name is case insensitive and can be referenced in ad tags. This value is required if customTemplate is true, and cannot be set otherwise. You can use alphanumeric characters and symbols other than the following: ", ', =, !, +, #, ,, ~, ;, ^, (, ), <, >, [, ], the white space character.

optional string ad_tag_name = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the adTagName field is set.

hasCustomTemplate()

public boolean hasCustomTemplate()

Optional. Whether this is a custom template. Custom templates get created outside of the ad rule workflow and can be referenced in ad tags. Only custom templates can have names and display names.

optional bool custom_template = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the customTemplate field is set.

hasDisplayName()

public boolean hasDisplayName()

Optional. Descriptive name for the BreakTemplate. This value is optional if customTemplate is true, and cannot be set otherwise.

optional string display_name = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the displayName field is set.

hasFillOrderDirectionType()

public boolean hasFillOrderDirectionType()

Optional. The fill order direction of the pod. This value is required if adBreakOptimizationType is equal to [AdBreakOptimizationType.POSITION][] and should otherwise be unset.

optional .google.ads.admanager.v1.AdRuleFillOrderDirectionEnum.AdRuleFillOrderDirection fill_order_direction_type = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the fillOrderDirectionType 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 BreakTemplate.Builder newBuilderForType()
Returns
Type Description
BreakTemplate.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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