Class AdSpot.Builder (0.54.0)

public static final class AdSpot.Builder extends GeneratedMessage.Builder<AdSpot.Builder> 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 Methods

getDescriptor()

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

Methods

addAllAllowedLineItemTypes(Iterable<? extends LineItemTypeEnum.LineItemType> values)

public AdSpot.Builder addAllAllowedLineItemTypes(Iterable<? extends LineItemTypeEnum.LineItemType> values)

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
values Iterable<? extends com.google.ads.admanager.v1.LineItemTypeEnum.LineItemType>

The allowedLineItemTypes to add.

Returns
Type Description
AdSpot.Builder

This builder for chaining.

addAllAllowedLineItemTypesValue(Iterable<Integer> values)

public AdSpot.Builder addAllAllowedLineItemTypesValue(Iterable<Integer> values)

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
values Iterable<Integer>

The enum numeric values on the wire for allowedLineItemTypes to add.

Returns
Type Description
AdSpot.Builder

This builder for chaining.

addAllowedLineItemTypes(LineItemTypeEnum.LineItemType value)

public AdSpot.Builder addAllowedLineItemTypes(LineItemTypeEnum.LineItemType value)

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
value LineItemTypeEnum.LineItemType

The allowedLineItemTypes to add.

Returns
Type Description
AdSpot.Builder

This builder for chaining.

addAllowedLineItemTypesValue(int value)

public AdSpot.Builder addAllowedLineItemTypesValue(int value)

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
value int

The enum numeric value on the wire for allowedLineItemTypes to add.

Returns
Type Description
AdSpot.Builder

This builder for chaining.

build()

public AdSpot build()
Returns
Type Description
AdSpot

buildPartial()

public AdSpot buildPartial()
Returns
Type Description
AdSpot

clear()

public AdSpot.Builder clear()
Returns
Type Description
AdSpot.Builder
Overrides

clearAllowedLineItemTypes()

public AdSpot.Builder clearAllowedLineItemTypes()

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
AdSpot.Builder

This builder for chaining.

clearBackfillBlocked()

public AdSpot.Builder clearBackfillBlocked()

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
AdSpot.Builder

This builder for chaining.

clearCanonicalDisplayName()

public AdSpot.Builder clearCanonicalDisplayName()

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
AdSpot.Builder

This builder for chaining.

clearCustomSpot()

public AdSpot.Builder clearCustomSpot()

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
AdSpot.Builder

This builder for chaining.

clearDisplayName()

public AdSpot.Builder clearDisplayName()

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
AdSpot.Builder

This builder for chaining.

clearFlexible()

public AdSpot.Builder clearFlexible()

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
AdSpot.Builder

This builder for chaining.

clearInventorySharingBlocked()

public AdSpot.Builder clearInventorySharingBlocked()

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
AdSpot.Builder

This builder for chaining.

clearMaxAdDuration()

public AdSpot.Builder clearMaxAdDuration()

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
AdSpot.Builder

clearMaxAds()

public AdSpot.Builder clearMaxAds()

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
AdSpot.Builder

This builder for chaining.

clearMaxDuration()

public AdSpot.Builder clearMaxDuration()

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
AdSpot.Builder

clearMinAdDuration()

public AdSpot.Builder clearMinAdDuration()

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
AdSpot.Builder

clearName()

public AdSpot.Builder clearName()

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
AdSpot.Builder

This builder for chaining.

clearTargetingType()

public AdSpot.Builder clearTargetingType()

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
AdSpot.Builder

This builder for chaining.

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

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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.

getMaxAdDurationBuilder()

public Duration.Builder getMaxAdDurationBuilder()

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
Builder

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.

getMaxDurationBuilder()

public Duration.Builder getMaxDurationBuilder()

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
Builder

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.

getMinAdDurationBuilder()

public Duration.Builder getMinAdDurationBuilder()

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
Builder

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.

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.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AdSpot other)

public AdSpot.Builder mergeFrom(AdSpot other)
Parameter
Name Description
other AdSpot
Returns
Type Description
AdSpot.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AdSpot.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AdSpot.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public AdSpot.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
AdSpot.Builder
Overrides

mergeMaxAdDuration(Duration value)

public AdSpot.Builder mergeMaxAdDuration(Duration value)

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];

Parameter
Name Description
value Duration
Returns
Type Description
AdSpot.Builder

mergeMaxDuration(Duration value)

public AdSpot.Builder mergeMaxDuration(Duration value)

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];

Parameter
Name Description
value Duration
Returns
Type Description
AdSpot.Builder

mergeMinAdDuration(Duration value)

public AdSpot.Builder mergeMinAdDuration(Duration value)

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];

Parameter
Name Description
value Duration
Returns
Type Description
AdSpot.Builder

setAllowedLineItemTypes(int index, LineItemTypeEnum.LineItemType value)

public AdSpot.Builder setAllowedLineItemTypes(int index, LineItemTypeEnum.LineItemType value)

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];

Parameters
Name Description
index int

The index to set the value at.

value LineItemTypeEnum.LineItemType

The allowedLineItemTypes to set.

Returns
Type Description
AdSpot.Builder

This builder for chaining.

setAllowedLineItemTypesValue(int index, int value)

public AdSpot.Builder setAllowedLineItemTypesValue(int index, int value)

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];

Parameters
Name Description
index int

The index to set the value at.

value int

The enum numeric value on the wire for allowedLineItemTypes to set.

Returns
Type Description
AdSpot.Builder

This builder for chaining.

setBackfillBlocked(boolean value)

public AdSpot.Builder setBackfillBlocked(boolean value)

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];

Parameter
Name Description
value boolean

The backfillBlocked to set.

Returns
Type Description
AdSpot.Builder

This builder for chaining.

setCanonicalDisplayName(String value)

public AdSpot.Builder setCanonicalDisplayName(String value)

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];

Parameter
Name Description
value String

The canonicalDisplayName to set.

Returns
Type Description
AdSpot.Builder

This builder for chaining.

setCanonicalDisplayNameBytes(ByteString value)

public AdSpot.Builder setCanonicalDisplayNameBytes(ByteString value)

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];

Parameter
Name Description
value ByteString

The bytes for canonicalDisplayName to set.

Returns
Type Description
AdSpot.Builder

This builder for chaining.

setCustomSpot(boolean value)

public AdSpot.Builder setCustomSpot(boolean value)

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];

Parameter
Name Description
value boolean

The customSpot to set.

Returns
Type Description
AdSpot.Builder

This builder for chaining.

setDisplayName(String value)

public AdSpot.Builder setDisplayName(String value)

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];

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
AdSpot.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public AdSpot.Builder setDisplayNameBytes(ByteString value)

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];

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
AdSpot.Builder

This builder for chaining.

setFlexible(boolean value)

public AdSpot.Builder setFlexible(boolean value)

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];

Parameter
Name Description
value boolean

The flexible to set.

Returns
Type Description
AdSpot.Builder

This builder for chaining.

setInventorySharingBlocked(boolean value)

public AdSpot.Builder setInventorySharingBlocked(boolean value)

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];

Parameter
Name Description
value boolean

The inventorySharingBlocked to set.

Returns
Type Description
AdSpot.Builder

This builder for chaining.

setMaxAdDuration(Duration value)

public AdSpot.Builder setMaxAdDuration(Duration value)

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];

Parameter
Name Description
value Duration
Returns
Type Description
AdSpot.Builder

setMaxAdDuration(Duration.Builder builderForValue)

public AdSpot.Builder setMaxAdDuration(Duration.Builder builderForValue)

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];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
AdSpot.Builder

setMaxAds(int value)

public AdSpot.Builder setMaxAds(int value)

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];

Parameter
Name Description
value int

The maxAds to set.

Returns
Type Description
AdSpot.Builder

This builder for chaining.

setMaxDuration(Duration value)

public AdSpot.Builder setMaxDuration(Duration value)

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];

Parameter
Name Description
value Duration
Returns
Type Description
AdSpot.Builder

setMaxDuration(Duration.Builder builderForValue)

public AdSpot.Builder setMaxDuration(Duration.Builder builderForValue)

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];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
AdSpot.Builder

setMinAdDuration(Duration value)

public AdSpot.Builder setMinAdDuration(Duration value)

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];

Parameter
Name Description
value Duration
Returns
Type Description
AdSpot.Builder

setMinAdDuration(Duration.Builder builderForValue)

public AdSpot.Builder setMinAdDuration(Duration.Builder builderForValue)

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];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
AdSpot.Builder

setName(String value)

public AdSpot.Builder setName(String value)

Identifier. The resource name of the AdSpot. Format: networks/{network_code}/adSpots/{ad_spot_id}

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
AdSpot.Builder

This builder for chaining.

setNameBytes(ByteString value)

public AdSpot.Builder setNameBytes(ByteString value)

Identifier. The resource name of the AdSpot. Format: networks/{network_code}/adSpots/{ad_spot_id}

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
AdSpot.Builder

This builder for chaining.

setTargetingType(AdSpotTargetingTypeEnum.AdSpotTargetingType value)

public AdSpot.Builder setTargetingType(AdSpotTargetingTypeEnum.AdSpotTargetingType value)

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];

Parameter
Name Description
value AdSpotTargetingTypeEnum.AdSpotTargetingType

The targetingType to set.

Returns
Type Description
AdSpot.Builder

This builder for chaining.

setTargetingTypeValue(int value)

public AdSpot.Builder setTargetingTypeValue(int value)

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];

Parameter
Name Description
value int

The enum numeric value on the wire for targetingType to set.

Returns
Type Description
AdSpot.Builder

This builder for chaining.