Reference documentation and code samples for the Google Ads Ad Manager V1 Client class BreakTemplate.
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.
Generated from protobuf message google.ads.admanager.v1.BreakTemplate
Namespace
Google \ Ads \ AdManager \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
Identifier. The resource name of the |
↳ custom_template |
bool
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. |
↳ ad_tag_name |
string
Optional. Name of the |
↳ display_name |
string
Optional. Descriptive name for the BreakTemplate. This value is optional if customTemplate is true, and cannot be set otherwise. |
↳ break_template_members |
array<BreakTemplateMember>
Optional. The list of the |
↳ ad_break_optimization_type |
int
Optional. The optimization type of the pod. This field is optional and defaults to AdBreakOptimizationType.REVENUE. |
↳ fill_order_direction_type |
int
Optional. The fill order direction of the pod. This value is required if |
getName
Identifier. The resource name of the BreakTemplate.
Format: networks/{network_code}/breakTemplates/{break_template_id}
| Returns | |
|---|---|
| Type | Description |
string |
|
setName
Identifier. The resource name of the BreakTemplate.
Format: networks/{network_code}/breakTemplates/{break_template_id}
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
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.
| Returns | |
|---|---|
| Type | Description |
bool |
|
hasCustomTemplate
clearCustomTemplate
setCustomTemplate
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.
| Parameter | |
|---|---|
| Name | Description |
var |
bool
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
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.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasAdTagName
clearAdTagName
setAdTagName
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.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getDisplayName
Optional. Descriptive name for the BreakTemplate. This value is optional if customTemplate is true, and cannot be set otherwise.
| Returns | |
|---|---|
| Type | Description |
string |
|
hasDisplayName
clearDisplayName
setDisplayName
Optional. Descriptive name for the BreakTemplate. This value is optional if customTemplate is true, and cannot be set otherwise.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getBreakTemplateMembers
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.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\RepeatedField<BreakTemplateMember> |
|
setBreakTemplateMembers
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.
| Parameter | |
|---|---|
| Name | Description |
var |
array<BreakTemplateMember>
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getAdBreakOptimizationType
Optional. The optimization type of the pod. This field is optional and defaults to AdBreakOptimizationType.REVENUE.
| Returns | |
|---|---|
| Type | Description |
int |
|
hasAdBreakOptimizationType
clearAdBreakOptimizationType
setAdBreakOptimizationType
Optional. The optimization type of the pod. This field is optional and defaults to AdBreakOptimizationType.REVENUE.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
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.
| Returns | |
|---|---|
| Type | Description |
int |
|
hasFillOrderDirectionType
clearFillOrderDirectionType
setFillOrderDirectionType
Optional. The fill order direction of the pod. This value is required if
adBreakOptimizationType is equal to
AdBreakOptimizationType.POSITION and should otherwise be unset.
| Parameter | |
|---|---|
| Name | Description |
var |
int
|
| Returns | |
|---|---|
| Type | Description |
$this |
|