- Resource: AdRule
- AdRuleStatus
- AdRuleFrequencyCapBehavior
- AdRuleSlot
- AdRuleSlotBehavior
- AdRuleSlotMidrollFrequencyType
- AdRuleSlotBumper
- Methods
Resource: AdRule
An AdRule contains data that the ad server will use to generate a playlist of video ads.
| JSON representation |
|---|
{ "name": string, "midrolls": [ { object ( |
| Fields | |
|---|---|
name |
Identifier. The resource name of the |
midrolls[] |
Required. This AdRule object's video mid-roll slots. This attribute is required, and there must be at least one mid-roll. |
displayName |
Required. The unique name of the AdRule. This attribute is required to create an ad rule and has a maximum length of 255 characters. |
priority |
Optional. The priority of the AdRule. This attribute is required and can range from 1 to 1000, with 1 being the highest possible priority. Changing an ad rule's priority can affect the priorities of other ad rules. For example, increasing an ad rule's priority from 5 to 1 will shift the ad rules that were previously in priority positions 1 through 4 down one. |
startTime |
Required. The start time of the AdRule. This attribute is required and must be a date in the future for new ad rules. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
endTime |
Optional. This end time of the AdRule. This attribute is required unless Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
endTimeUnlimited |
Optional. Specifies whether or not the AdRule has an end time. This attribute is optional and defaults to false. |
status |
Output only. The AdRuleStatus of the AdRule. This attribute is read-only and defaults to [AdRuleStatus.INACTIVE][]. |
frequencyCapBehavior |
Optional. The FrequencyCapBehavior of the AdRule. This attribute is optional and defaults to [FrequencyCapBehavior.DEFER][]. |
maxImpressionsPerLineItemPerStream |
Optional. This AdRule object's frequency cap for the maximum impressions per stream. This attribute is optional and defaults to 0. |
maxImpressionsPerLineItemPerPod |
Optional. This AdRule object's frequency cap for the maximum impressions per pod. This attribute is optional and defaults to 0. |
preroll |
Required. This AdRule object's pre-roll slot. This attribute is required. |
postroll |
Required. This AdRule object's post-roll slot. This attribute is required. |
targeting |
Required. The targeting of the |
AdRuleStatus
Represents the status of ad rules and ad rule slots.
| Enums | |
|---|---|
AD_RULE_STATUS_UNSPECIFIED |
Default value. This value is unused. |
ACTIVE |
Created and ready to be served. Is user-visible. |
DELETED |
Marked as deleted, not user-visible. |
INACTIVE |
Inactive, not user-visible. |
AdRuleFrequencyCapBehavior
Types of behavior for frequency caps within ad rules.
| Enums | |
|---|---|
AD_RULE_FREQUENCY_CAP_BEHAVIOR_UNSPECIFIED |
Default value. This value is unused. |
DEFER |
Defer frequency cap decisions to the next ad rule in priority order. |
TURN_OFF |
Turn off all frequency caps. |
TURN_ON |
Turn on at least one of the frequency caps. |
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.
| JSON representation |
|---|
{ "slotBehavior": enum ( |
| Fields | |
|---|---|
slotBehavior |
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. |
maxVideoAdDuration |
Optional. The maximum duration in milliseconds of video ads within this slot. This attribute is optional and defaults to 0. A duration in seconds with up to nine fractional digits, ending with ' |
videoMidrollFrequencyType |
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][]. |
videoMidrollFrequency |
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 seconds." |
bumper |
Optional. The AdRuleSlotBumper for this slot. This attribute is optional and defaults to [AdRuleSlotBumper.NONE][]. |
maxBumperDuration |
Optional. The maximum duration of bumper ads within this slot. This attribute is optional and defaults to 0. A duration in seconds with up to nine fractional digits, ending with ' |
maxPodDuration |
Optional. The maximum pod duration for this slot. This attribute is optional and defaults to 0. A duration in seconds with up to nine fractional digits, ending with ' |
podMaxAdCount |
Optional. The maximum number of ads allowed in a pod in this slot. This attribute is optional and defaults to 0. |
AdRuleSlotBehavior
The types of behaviors for ads within a BaseAdRuleSlot ad rule slot.
| Enums | |
|---|---|
AD_RULE_SLOT_BEHAVIOR_UNSPECIFIED |
Default value. This value is unused. |
ALWAYS_SHOW |
This ad rule always includes this slot's ads. |
DEFER |
Defer to lower priority rules. This ad rule doesn't specify guidelines for this slot's ads. |
NEVER_SHOW |
This ad rule never includes this slot's ads. |
AdRuleSlotMidrollFrequencyType
Frequency types for mid-roll BaseAdRuleSlot ad rule slots.
| Enums | |
|---|---|
AD_RULE_SLOT_MIDROLL_FREQUENCY_TYPE_UNSPECIFIED |
Default value. This value is unused. |
EVERY_N_CUEPOINTS |
MidrollFrequency is a cue point interval and is a single integer value, such as "5", which means "play a mid-roll every 5th cue point". |
EVERY_N_SECONDS |
MidrollFrequency is a time interval and mentioned as a single numeric value in seconds. For example, "100" would mean "play a mid-roll every 100 seconds". |
FIXED_CUE_POINTS |
Same as FIXED_TIME, except the values represent the ordinal cue points ("1,3,5", for example). |
FIXED_TIME |
MidrollFrequency is a comma-delimited list of points in time (in seconds) when an ad should play. For example, "100,300" would mean "play an ad at 100 seconds and 300 seconds". |
NONE |
The ad rule slot is not a mid-roll and MidrollFrequency should be ignored. |
REVERSE_MIDROLL_INDEX |
After all other frequency type is applied and the number of midrolls are settled, this slot setting will override the mid-roll defined by ReverseMidrollIndex. |
AdRuleSlotBumper
Types of bumper ads on an ad rule slot.
| Enums | |
|---|---|
AD_RULE_SLOT_BUMPER_UNSPECIFIED |
Default value. This value is unused. |
AFTER |
Show a bumper ad after the slot's other ads. |
BEFORE |
Show a bumper ad before the slot's other ads. |
BEFORE_AND_AFTER |
Show a bumper before and after the slot's other ads. |
NONE |
Do not show a bumper ad. |
Methods |
|
|---|---|
|
Activates a list of AdRule objects. |
|
Batch creates AdRule objects. |
|
Deactivates a list of AdRule objects. |
|
Deletes a list of AdRule objects. |
|
Batch updates AdRule objects. |
|
Creates a AdRule object. |
|
Retrieves an AdRule object. |
|
Lists AdRule objects. |
|
Updates a AdRule object. |