Google Ads Ad Manager V1 Client - Class AdRuleSlot (0.8.0)

Reference documentation and code samples for the Google Ads Ad Manager V1 Client class AdRuleSlot.

Simple object representing an ad slot within an AdRule. Ad rule slots contain information about the types/number of ads to display, as well as additional information on how the ad server will generate playlists.

Generated from protobuf message google.ads.admanager.v1.AdRuleSlot

Namespace

Google \ Ads \ AdManager \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ slot_behavior int

Optional. The AdRuleSlotBehavior for video ads for this slot. This attribute is optional and defaults to AdRuleSlotBehavior.DEFER. Indicates whether video ads are allowed for this slot, or if the decision is deferred to alower-priority ad rule.

↳ max_video_ad_duration Google\Protobuf\Duration

Optional. The maximum duration in milliseconds of video ads within this slot. This attribute is optional and defaults to 0.

↳ video_midroll_frequency_type int

Optional. The frequency type for video ads in this ad rule slot. This attribute is required for mid-rolls, but if this is not a mid-roll, the value is set to AdRuleSlotMidrollFrequencyType.NONE.

↳ video_midroll_frequency string

Optional. The mid-roll frequency of this ad rule slot for video ads. This attribute is required for mid-rolls, but if MidrollFrequencyType is set to AdRuleSlotMidrollFrequencyType.NONE, this value should be ignored. For example, if this slot has a frequency type of AdRuleSlotMidrollFrequencyType.EVERY_N_SECONDS and # videoMidrollFrequency = "60", this would mean "play a mid-roll every 60 seconds."

↳ bumper int

Optional. The AdRuleSlotBumper for this slot. This attribute is optional and defaults to AdRuleSlotBumper.NONE.

↳ max_bumper_duration Google\Protobuf\Duration

Optional. The maximum duration of bumper ads within this slot. This attribute is optional and defaults to 0.

↳ max_pod_duration Google\Protobuf\Duration

Optional. The maximum pod duration for this slot. This attribute is optional and defaults to 0.

↳ pod_max_ad_count int

Optional. The maximum number of ads allowed in a pod in this slot. This attribute is optional and defaults to 0.

getSlotBehavior

Optional. The AdRuleSlotBehavior for video ads for this slot. This attribute is optional and defaults to AdRuleSlotBehavior.DEFER.

Indicates whether video ads are allowed for this slot, or if the decision is deferred to alower-priority ad rule.

Returns
Type Description
int

hasSlotBehavior

clearSlotBehavior

setSlotBehavior

Optional. The AdRuleSlotBehavior for video ads for this slot. This attribute is optional and defaults to AdRuleSlotBehavior.DEFER.

Indicates whether video ads are allowed for this slot, or if the decision is deferred to alower-priority ad rule.

Parameter
Name Description
var int
Returns
Type Description
$this

getMaxVideoAdDuration

Optional. The maximum duration in milliseconds of video ads within this slot. This attribute is optional and defaults to 0.

Returns
Type Description
Google\Protobuf\Duration|null

hasMaxVideoAdDuration

clearMaxVideoAdDuration

setMaxVideoAdDuration

Optional. The maximum duration in milliseconds of video ads within this slot. This attribute is optional and defaults to 0.

Parameter
Name Description
var Google\Protobuf\Duration
Returns
Type Description
$this

getVideoMidrollFrequencyType

Optional. The frequency type for video ads in this ad rule slot. This attribute is required for mid-rolls, but if this is not a mid-roll, the value is set to AdRuleSlotMidrollFrequencyType.NONE.

Returns
Type Description
int

hasVideoMidrollFrequencyType

clearVideoMidrollFrequencyType

setVideoMidrollFrequencyType

Optional. The frequency type for video ads in this ad rule slot. This attribute is required for mid-rolls, but if this is not a mid-roll, the value is set to AdRuleSlotMidrollFrequencyType.NONE.

Parameter
Name Description
var int
Returns
Type Description
$this

getVideoMidrollFrequency

Optional. The mid-roll frequency of this ad rule slot for video ads. This attribute is required for mid-rolls, but if MidrollFrequencyType is set to AdRuleSlotMidrollFrequencyType.NONE, this value should be ignored. For example, if this slot has a frequency type of AdRuleSlotMidrollFrequencyType.EVERY_N_SECONDS and

videoMidrollFrequency = "60", this would mean "play a mid-roll every 60

seconds."

Returns
Type Description
string

hasVideoMidrollFrequency

clearVideoMidrollFrequency

setVideoMidrollFrequency

Optional. The mid-roll frequency of this ad rule slot for video ads. This attribute is required for mid-rolls, but if MidrollFrequencyType is set to AdRuleSlotMidrollFrequencyType.NONE, this value should be ignored. For example, if this slot has a frequency type of AdRuleSlotMidrollFrequencyType.EVERY_N_SECONDS and

videoMidrollFrequency = "60", this would mean "play a mid-roll every 60

seconds."

Parameter
Name Description
var string
Returns
Type Description
$this

getBumper

Optional. The AdRuleSlotBumper for this slot. This attribute is optional and defaults to AdRuleSlotBumper.NONE.

Returns
Type Description
int

hasBumper

clearBumper

setBumper

Optional. The AdRuleSlotBumper for this slot. This attribute is optional and defaults to AdRuleSlotBumper.NONE.

Parameter
Name Description
var int
Returns
Type Description
$this

getMaxBumperDuration

Optional. The maximum duration of bumper ads within this slot. This attribute is optional and defaults to 0.

Returns
Type Description
Google\Protobuf\Duration|null

hasMaxBumperDuration

clearMaxBumperDuration

setMaxBumperDuration

Optional. The maximum duration of bumper ads within this slot. This attribute is optional and defaults to 0.

Parameter
Name Description
var Google\Protobuf\Duration
Returns
Type Description
$this

getMaxPodDuration

Optional. The maximum pod duration for this slot. This attribute is optional and defaults to 0.

Returns
Type Description
Google\Protobuf\Duration|null

hasMaxPodDuration

clearMaxPodDuration

setMaxPodDuration

Optional. The maximum pod duration for this slot. This attribute is optional and defaults to 0.

Parameter
Name Description
var Google\Protobuf\Duration
Returns
Type Description
$this

getPodMaxAdCount

Optional. The maximum number of ads allowed in a pod in this slot. This attribute is optional and defaults to 0.

Returns
Type Description
int

hasPodMaxAdCount

clearPodMaxAdCount

setPodMaxAdCount

Optional. The maximum number of ads allowed in a pod in this slot. This attribute is optional and defaults to 0.

Parameter
Name Description
var int
Returns
Type Description
$this