Class AdSpot (0.54.0)

public final class AdSpot extends GeneratedMessage implements AdSpotOrBuilder

An AdSpot is a targetable entity used in the creation of AdRule objects. A ad spot contains a variable number of ads and has constraints (ad duration, reservation type, etc) on the ads that can appear in it.

Protobuf type google.ads.admanager.v1.AdSpot

Implements

AdSpotOrBuilder

Static Fields

ALLOWED_LINE_ITEM_TYPES_FIELD_NUMBER

public static final int ALLOWED_LINE_ITEM_TYPES_FIELD_NUMBER
Field Value
Type Description
int

BACKFILL_BLOCKED_FIELD_NUMBER

public static final int BACKFILL_BLOCKED_FIELD_NUMBER
Field Value
Type Description
int

CANONICAL_DISPLAY_NAME_FIELD_NUMBER

public static final int CANONICAL_DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

CUSTOM_SPOT_FIELD_NUMBER

public static final int CUSTOM_SPOT_FIELD_NUMBER
Field Value
Type Description
int

DISPLAY_NAME_FIELD_NUMBER

public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
Type Description
int

FLEXIBLE_FIELD_NUMBER

public static final int FLEXIBLE_FIELD_NUMBER
Field Value
Type Description
int

INVENTORY_SHARING_BLOCKED_FIELD_NUMBER

public static final int INVENTORY_SHARING_BLOCKED_FIELD_NUMBER
Field Value
Type Description
int

MAX_ADS_FIELD_NUMBER

public static final int MAX_ADS_FIELD_NUMBER
Field Value
Type Description
int

MAX_AD_DURATION_FIELD_NUMBER

public static final int MAX_AD_DURATION_FIELD_NUMBER
Field Value
Type Description
int

MAX_DURATION_FIELD_NUMBER

public static final int MAX_DURATION_FIELD_NUMBER
Field Value
Type Description
int

MIN_AD_DURATION_FIELD_NUMBER

public static final int MIN_AD_DURATION_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

TARGETING_TYPE_FIELD_NUMBER

public static final int TARGETING_TYPE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static AdSpot getDefaultInstance()
Returns
Type Description
AdSpot

getDescriptor()

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

newBuilder()

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

newBuilder(AdSpot prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getAllowedLineItemTypes(int index)

public LineItemTypeEnum.LineItemType getAllowedLineItemTypes(int index)

Optional. The set of line item types that may appear in the ad spot. This field is optional and defaults to an empty set, which means that all types are allowed. Note, backfill reservation types are controlled by the backfillBlocked field.

repeated .google.ads.admanager.v1.LineItemTypeEnum.LineItemType allowed_line_item_types = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
LineItemTypeEnum.LineItemType

The allowedLineItemTypes at the given index.

getAllowedLineItemTypesCount()

public int getAllowedLineItemTypesCount()

Optional. The set of line item types that may appear in the ad spot. This field is optional and defaults to an empty set, which means that all types are allowed. Note, backfill reservation types are controlled by the backfillBlocked field.

repeated .google.ads.admanager.v1.LineItemTypeEnum.LineItemType allowed_line_item_types = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of allowedLineItemTypes.

getAllowedLineItemTypesList()

public List<LineItemTypeEnum.LineItemType> getAllowedLineItemTypesList()

Optional. The set of line item types that may appear in the ad spot. This field is optional and defaults to an empty set, which means that all types are allowed. Note, backfill reservation types are controlled by the backfillBlocked field.

repeated .google.ads.admanager.v1.LineItemTypeEnum.LineItemType allowed_line_item_types = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<LineItemType>

A list containing the allowedLineItemTypes.

getAllowedLineItemTypesValue(int index)

public int getAllowedLineItemTypesValue(int index)

Optional. The set of line item types that may appear in the ad spot. This field is optional and defaults to an empty set, which means that all types are allowed. Note, backfill reservation types are controlled by the backfillBlocked field.

repeated .google.ads.admanager.v1.LineItemTypeEnum.LineItemType allowed_line_item_types = 10 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
int

The enum numeric value on the wire of allowedLineItemTypes at the given index.

getAllowedLineItemTypesValueList()

public List<Integer> getAllowedLineItemTypesValueList()

Optional. The set of line item types that may appear in the ad spot. This field is optional and defaults to an empty set, which means that all types are allowed. Note, backfill reservation types are controlled by the backfillBlocked field.

repeated .google.ads.admanager.v1.LineItemTypeEnum.LineItemType allowed_line_item_types = 10 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Integer>

A list containing the enum numeric values on the wire for allowedLineItemTypes.

getBackfillBlocked()

public boolean getBackfillBlocked()

Optional. Whether backfill is blocked in this ad spot. This field is optional and defaults to false.

optional bool backfill_blocked = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The backfillBlocked.

getCanonicalDisplayName()

public String getCanonicalDisplayName()

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

optional string canonical_display_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The canonicalDisplayName.

getCanonicalDisplayNameBytes()

public ByteString getCanonicalDisplayNameBytes()

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

optional string canonical_display_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for canonicalDisplayName.

getCustomSpot()

public boolean getCustomSpot()

Optional. Whether this ad spot is a custom spot. This field is optional and defaults to false. Custom spots can be reused and targeted in the targeting picker.

optional bool custom_spot = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The customSpot.

getDefaultInstanceForType()

public AdSpot getDefaultInstanceForType()
Returns
Type Description
AdSpot

getDisplayName()

public String getDisplayName()

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

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

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

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

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

Returns
Type Description
ByteString

The bytes for displayName.

getFlexible()

public boolean getFlexible()

Optional. Whether this ad spot is a flexible spot. This field is optional and defaults to false. Flexible spots are allowed to have no max number of ads.

optional bool flexible = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The flexible.

getInventorySharingBlocked()

public boolean getInventorySharingBlocked()

Optional. Whether inventory sharing is blocked in this ad spot. This field is optional and defaults to false.

optional bool inventory_sharing_blocked = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The inventorySharingBlocked.

getMaxAdDuration()

public Duration getMaxAdDuration()

Required. The maximum allowed duration for ads in the AdSpot. This field is required and must be greater than min_ad_duration.

optional .google.protobuf.Duration max_ad_duration = 13 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Duration

The maxAdDuration.

getMaxAdDurationOrBuilder()

public DurationOrBuilder getMaxAdDurationOrBuilder()

Required. The maximum allowed duration for ads in the AdSpot. This field is required and must be greater than min_ad_duration.

optional .google.protobuf.Duration max_ad_duration = 13 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
DurationOrBuilder

getMaxAds()

public int getMaxAds()

Optional. The maximum number of ads allowed in the AdSpot. This field is optional and defaults to 0. A value of 0 means that there is no maximum for the number of ads in the ad spot. No max ads is only supported for ad spots that have flexible set to true.

optional int32 max_ads = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The maxAds.

getMaxDuration()

public Duration getMaxDuration()

Optional. The maximum total duration for this AdSpot. This field is optional, defaults to 0, and supports precision to the nearest second.

optional .google.protobuf.Duration max_duration = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Duration

The maxDuration.

getMaxDurationOrBuilder()

public DurationOrBuilder getMaxDurationOrBuilder()

Optional. The maximum total duration for this AdSpot. This field is optional, defaults to 0, and supports precision to the nearest second.

optional .google.protobuf.Duration max_duration = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DurationOrBuilder

getMinAdDuration()

public Duration getMinAdDuration()

Optional. The minimum allowed duration for ads in the AdSpot. This field is optional and defaults to 0.

optional .google.protobuf.Duration min_ad_duration = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Duration

The minAdDuration.

getMinAdDurationOrBuilder()

public DurationOrBuilder getMinAdDurationOrBuilder()

Optional. The minimum allowed duration for ads in the AdSpot. This field is optional and defaults to 0.

optional .google.protobuf.Duration min_ad_duration = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DurationOrBuilder

getName()

public String getName()

Identifier. The resource name of the AdSpot. Format: networks/{network_code}/adSpots/{ad_spot_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 AdSpot. Format: networks/{network_code}/adSpots/{ad_spot_id}

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

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getTargetingType()

public AdSpotTargetingTypeEnum.AdSpotTargetingType getTargetingType()

Optional. The AdSpot TargetingType determines how this ad spot can be targeted. This field is required.

optional .google.ads.admanager.v1.AdSpotTargetingTypeEnum.AdSpotTargetingType targeting_type = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AdSpotTargetingTypeEnum.AdSpotTargetingType

The targetingType.

getTargetingTypeValue()

public int getTargetingTypeValue()

Optional. The AdSpot TargetingType determines how this ad spot can be targeted. This field is required.

optional .google.ads.admanager.v1.AdSpotTargetingTypeEnum.AdSpotTargetingType targeting_type = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for targetingType.

hasBackfillBlocked()

public boolean hasBackfillBlocked()

Optional. Whether backfill is blocked in this ad spot. This field is optional and defaults to false.

optional bool backfill_blocked = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the backfillBlocked field is set.

hasCanonicalDisplayName()

public boolean hasCanonicalDisplayName()

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

optional string canonical_display_name = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the canonicalDisplayName field is set.

hasCustomSpot()

public boolean hasCustomSpot()

Optional. Whether this ad spot is a custom spot. This field is optional and defaults to false. Custom spots can be reused and targeted in the targeting picker.

optional bool custom_spot = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the customSpot field is set.

hasDisplayName()

public boolean hasDisplayName()

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

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

Returns
Type Description
boolean

Whether the displayName field is set.

hasFlexible()

public boolean hasFlexible()

Optional. Whether this ad spot is a flexible spot. This field is optional and defaults to false. Flexible spots are allowed to have no max number of ads.

optional bool flexible = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the flexible field is set.

hasInventorySharingBlocked()

public boolean hasInventorySharingBlocked()

Optional. Whether inventory sharing is blocked in this ad spot. This field is optional and defaults to false.

optional bool inventory_sharing_blocked = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the inventorySharingBlocked field is set.

hasMaxAdDuration()

public boolean hasMaxAdDuration()

Required. The maximum allowed duration for ads in the AdSpot. This field is required and must be greater than min_ad_duration.

optional .google.protobuf.Duration max_ad_duration = 13 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the maxAdDuration field is set.

hasMaxAds()

public boolean hasMaxAds()

Optional. The maximum number of ads allowed in the AdSpot. This field is optional and defaults to 0. A value of 0 means that there is no maximum for the number of ads in the ad spot. No max ads is only supported for ad spots that have flexible set to true.

optional int32 max_ads = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the maxAds field is set.

hasMaxDuration()

public boolean hasMaxDuration()

Optional. The maximum total duration for this AdSpot. This field is optional, defaults to 0, and supports precision to the nearest second.

optional .google.protobuf.Duration max_duration = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the maxDuration field is set.

hasMinAdDuration()

public boolean hasMinAdDuration()

Optional. The minimum allowed duration for ads in the AdSpot. This field is optional and defaults to 0.

optional .google.protobuf.Duration min_ad_duration = 12 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the minAdDuration field is set.

hasTargetingType()

public boolean hasTargetingType()

Optional. The AdSpot TargetingType determines how this ad spot can be targeted. This field is required.

optional .google.ads.admanager.v1.AdSpotTargetingTypeEnum.AdSpotTargetingType targeting_type = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

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

newBuilderForType(AbstractMessage.BuilderParent parent)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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