Class AdRuleSlot (0.54.0)

public final class AdRuleSlot extends GeneratedMessage implements AdRuleSlotOrBuilder

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.

Protobuf type google.ads.admanager.v1.AdRuleSlot

Implements

AdRuleSlotOrBuilder

Static Fields

BUMPER_FIELD_NUMBER

public static final int BUMPER_FIELD_NUMBER
Field Value
Type Description
int

MAX_BUMPER_DURATION_FIELD_NUMBER

public static final int MAX_BUMPER_DURATION_FIELD_NUMBER
Field Value
Type Description
int

MAX_POD_DURATION_FIELD_NUMBER

public static final int MAX_POD_DURATION_FIELD_NUMBER
Field Value
Type Description
int

MAX_VIDEO_AD_DURATION_FIELD_NUMBER

public static final int MAX_VIDEO_AD_DURATION_FIELD_NUMBER
Field Value
Type Description
int

POD_MAX_AD_COUNT_FIELD_NUMBER

public static final int POD_MAX_AD_COUNT_FIELD_NUMBER
Field Value
Type Description
int

SLOT_BEHAVIOR_FIELD_NUMBER

public static final int SLOT_BEHAVIOR_FIELD_NUMBER
Field Value
Type Description
int

VIDEO_MIDROLL_FREQUENCY_FIELD_NUMBER

public static final int VIDEO_MIDROLL_FREQUENCY_FIELD_NUMBER
Field Value
Type Description
int

VIDEO_MIDROLL_FREQUENCY_TYPE_FIELD_NUMBER

public static final int VIDEO_MIDROLL_FREQUENCY_TYPE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static AdRuleSlot getDefaultInstance()
Returns
Type Description
AdRuleSlot

getDescriptor()

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

newBuilder()

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

newBuilder(AdRuleSlot prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getBumper()

public AdRuleSlotBumperEnum.AdRuleSlotBumper getBumper()

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

optional .google.ads.admanager.v1.AdRuleSlotBumperEnum.AdRuleSlotBumper bumper = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AdRuleSlotBumperEnum.AdRuleSlotBumper

The bumper.

getBumperValue()

public int getBumperValue()

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

optional .google.ads.admanager.v1.AdRuleSlotBumperEnum.AdRuleSlotBumper bumper = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for bumper.

getDefaultInstanceForType()

public AdRuleSlot getDefaultInstanceForType()
Returns
Type Description
AdRuleSlot

getMaxBumperDuration()

public Duration getMaxBumperDuration()

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

optional .google.protobuf.Duration max_bumper_duration = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Duration

The maxBumperDuration.

getMaxBumperDurationOrBuilder()

public DurationOrBuilder getMaxBumperDurationOrBuilder()

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

optional .google.protobuf.Duration max_bumper_duration = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DurationOrBuilder

getMaxPodDuration()

public Duration getMaxPodDuration()

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

optional .google.protobuf.Duration max_pod_duration = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Duration

The maxPodDuration.

getMaxPodDurationOrBuilder()

public DurationOrBuilder getMaxPodDurationOrBuilder()

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

optional .google.protobuf.Duration max_pod_duration = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DurationOrBuilder

getMaxVideoAdDuration()

public Duration getMaxVideoAdDuration()

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

optional .google.protobuf.Duration max_video_ad_duration = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Duration

The maxVideoAdDuration.

getMaxVideoAdDurationOrBuilder()

public DurationOrBuilder getMaxVideoAdDurationOrBuilder()

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

optional .google.protobuf.Duration max_video_ad_duration = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DurationOrBuilder

getParserForType()

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

getPodMaxAdCount()

public int getPodMaxAdCount()

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

optional int32 pod_max_ad_count = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The podMaxAdCount.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSlotBehavior()

public AdRuleSlotBehaviorEnum.AdRuleSlotBehavior 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.

optional .google.ads.admanager.v1.AdRuleSlotBehaviorEnum.AdRuleSlotBehavior slot_behavior = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AdRuleSlotBehaviorEnum.AdRuleSlotBehavior

The slotBehavior.

getSlotBehaviorValue()

public int getSlotBehaviorValue()

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.

optional .google.ads.admanager.v1.AdRuleSlotBehaviorEnum.AdRuleSlotBehavior slot_behavior = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for slotBehavior.

getVideoMidrollFrequency()

public String 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."

optional string video_midroll_frequency = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The videoMidrollFrequency.

getVideoMidrollFrequencyBytes()

public ByteString getVideoMidrollFrequencyBytes()

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."

optional string video_midroll_frequency = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for videoMidrollFrequency.

getVideoMidrollFrequencyType()

public AdRuleSlotMidrollFrequencyTypeEnum.AdRuleSlotMidrollFrequencyType 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][].

optional .google.ads.admanager.v1.AdRuleSlotMidrollFrequencyTypeEnum.AdRuleSlotMidrollFrequencyType video_midroll_frequency_type = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AdRuleSlotMidrollFrequencyTypeEnum.AdRuleSlotMidrollFrequencyType

The videoMidrollFrequencyType.

getVideoMidrollFrequencyTypeValue()

public int getVideoMidrollFrequencyTypeValue()

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][].

optional .google.ads.admanager.v1.AdRuleSlotMidrollFrequencyTypeEnum.AdRuleSlotMidrollFrequencyType video_midroll_frequency_type = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for videoMidrollFrequencyType.

hasBumper()

public boolean hasBumper()

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

optional .google.ads.admanager.v1.AdRuleSlotBumperEnum.AdRuleSlotBumper bumper = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the bumper field is set.

hasMaxBumperDuration()

public boolean hasMaxBumperDuration()

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

optional .google.protobuf.Duration max_bumper_duration = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the maxBumperDuration field is set.

hasMaxPodDuration()

public boolean hasMaxPodDuration()

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

optional .google.protobuf.Duration max_pod_duration = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the maxPodDuration field is set.

hasMaxVideoAdDuration()

public boolean hasMaxVideoAdDuration()

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

optional .google.protobuf.Duration max_video_ad_duration = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the maxVideoAdDuration field is set.

hasPodMaxAdCount()

public boolean hasPodMaxAdCount()

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

optional int32 pod_max_ad_count = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the podMaxAdCount field is set.

hasSlotBehavior()

public boolean hasSlotBehavior()

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.

optional .google.ads.admanager.v1.AdRuleSlotBehaviorEnum.AdRuleSlotBehavior slot_behavior = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the slotBehavior field is set.

hasVideoMidrollFrequency()

public boolean hasVideoMidrollFrequency()

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."

optional string video_midroll_frequency = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the videoMidrollFrequency field is set.

hasVideoMidrollFrequencyType()

public boolean hasVideoMidrollFrequencyType()

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][].

optional .google.ads.admanager.v1.AdRuleSlotMidrollFrequencyTypeEnum.AdRuleSlotMidrollFrequencyType video_midroll_frequency_type = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

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

newBuilderForType(AbstractMessage.BuilderParent parent)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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