Class AdUnitSize.Builder (0.13.0)

public static final class AdUnitSize.Builder extends GeneratedMessageV3.Builder<AdUnitSize.Builder> implements AdUnitSizeOrBuilder

Represents the size, environment, and companions of an ad in an ad unit.

Protobuf type google.ads.admanager.v1.AdUnitSize

Implements

AdUnitSizeOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllCompanions(Iterable<? extends Size> values)

public AdUnitSize.Builder addAllCompanions(Iterable<? extends Size> values)

The companions for this ad unit size. Companions are only valid if the environment is VIDEO_PLAYER.

repeated .google.ads.admanager.v1.Size companions = 3;

Parameter
Name Description
values Iterable<? extends com.google.ads.admanager.v1.Size>
Returns
Type Description
AdUnitSize.Builder

addCompanions(Size value)

public AdUnitSize.Builder addCompanions(Size value)

The companions for this ad unit size. Companions are only valid if the environment is VIDEO_PLAYER.

repeated .google.ads.admanager.v1.Size companions = 3;

Parameter
Name Description
value Size
Returns
Type Description
AdUnitSize.Builder

addCompanions(Size.Builder builderForValue)

public AdUnitSize.Builder addCompanions(Size.Builder builderForValue)

The companions for this ad unit size. Companions are only valid if the environment is VIDEO_PLAYER.

repeated .google.ads.admanager.v1.Size companions = 3;

Parameter
Name Description
builderForValue Size.Builder
Returns
Type Description
AdUnitSize.Builder

addCompanions(int index, Size value)

public AdUnitSize.Builder addCompanions(int index, Size value)

The companions for this ad unit size. Companions are only valid if the environment is VIDEO_PLAYER.

repeated .google.ads.admanager.v1.Size companions = 3;

Parameters
Name Description
index int
value Size
Returns
Type Description
AdUnitSize.Builder

addCompanions(int index, Size.Builder builderForValue)

public AdUnitSize.Builder addCompanions(int index, Size.Builder builderForValue)

The companions for this ad unit size. Companions are only valid if the environment is VIDEO_PLAYER.

repeated .google.ads.admanager.v1.Size companions = 3;

Parameters
Name Description
index int
builderForValue Size.Builder
Returns
Type Description
AdUnitSize.Builder

addCompanionsBuilder()

public Size.Builder addCompanionsBuilder()

The companions for this ad unit size. Companions are only valid if the environment is VIDEO_PLAYER.

repeated .google.ads.admanager.v1.Size companions = 3;

Returns
Type Description
Size.Builder

addCompanionsBuilder(int index)

public Size.Builder addCompanionsBuilder(int index)

The companions for this ad unit size. Companions are only valid if the environment is VIDEO_PLAYER.

repeated .google.ads.admanager.v1.Size companions = 3;

Parameter
Name Description
index int
Returns
Type Description
Size.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AdUnitSize.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AdUnitSize.Builder
Overrides

build()

public AdUnitSize build()
Returns
Type Description
AdUnitSize

buildPartial()

public AdUnitSize buildPartial()
Returns
Type Description
AdUnitSize

clear()

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

clearCompanions()

public AdUnitSize.Builder clearCompanions()

The companions for this ad unit size. Companions are only valid if the environment is VIDEO_PLAYER.

repeated .google.ads.admanager.v1.Size companions = 3;

Returns
Type Description
AdUnitSize.Builder

clearEnvironmentType()

public AdUnitSize.Builder clearEnvironmentType()

Required. The EnvironmentType of the AdUnit

.google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AdUnitSize.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public AdUnitSize.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
AdUnitSize.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public AdUnitSize.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
AdUnitSize.Builder
Overrides

clearSize()

public AdUnitSize.Builder clearSize()

Required. The Size of the AdUnit.

.google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AdUnitSize.Builder

clone()

public AdUnitSize.Builder clone()
Returns
Type Description
AdUnitSize.Builder
Overrides

getCompanions(int index)

public Size getCompanions(int index)

The companions for this ad unit size. Companions are only valid if the environment is VIDEO_PLAYER.

repeated .google.ads.admanager.v1.Size companions = 3;

Parameter
Name Description
index int
Returns
Type Description
Size

getCompanionsBuilder(int index)

public Size.Builder getCompanionsBuilder(int index)

The companions for this ad unit size. Companions are only valid if the environment is VIDEO_PLAYER.

repeated .google.ads.admanager.v1.Size companions = 3;

Parameter
Name Description
index int
Returns
Type Description
Size.Builder

getCompanionsBuilderList()

public List<Size.Builder> getCompanionsBuilderList()

The companions for this ad unit size. Companions are only valid if the environment is VIDEO_PLAYER.

repeated .google.ads.admanager.v1.Size companions = 3;

Returns
Type Description
List<Builder>

getCompanionsCount()

public int getCompanionsCount()

The companions for this ad unit size. Companions are only valid if the environment is VIDEO_PLAYER.

repeated .google.ads.admanager.v1.Size companions = 3;

Returns
Type Description
int

getCompanionsList()

public List<Size> getCompanionsList()

The companions for this ad unit size. Companions are only valid if the environment is VIDEO_PLAYER.

repeated .google.ads.admanager.v1.Size companions = 3;

Returns
Type Description
List<Size>

getCompanionsOrBuilder(int index)

public SizeOrBuilder getCompanionsOrBuilder(int index)

The companions for this ad unit size. Companions are only valid if the environment is VIDEO_PLAYER.

repeated .google.ads.admanager.v1.Size companions = 3;

Parameter
Name Description
index int
Returns
Type Description
SizeOrBuilder

getCompanionsOrBuilderList()

public List<? extends SizeOrBuilder> getCompanionsOrBuilderList()

The companions for this ad unit size. Companions are only valid if the environment is VIDEO_PLAYER.

repeated .google.ads.admanager.v1.Size companions = 3;

Returns
Type Description
List<? extends com.google.ads.admanager.v1.SizeOrBuilder>

getDefaultInstanceForType()

public AdUnitSize getDefaultInstanceForType()
Returns
Type Description
AdUnitSize

getDescriptorForType()

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

getEnvironmentType()

public EnvironmentTypeEnum.EnvironmentType getEnvironmentType()

Required. The EnvironmentType of the AdUnit

.google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
EnvironmentTypeEnum.EnvironmentType

The environmentType.

getEnvironmentTypeValue()

public int getEnvironmentTypeValue()

Required. The EnvironmentType of the AdUnit

.google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for environmentType.

getSize()

public Size getSize()

Required. The Size of the AdUnit.

.google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Size

The size.

getSizeBuilder()

public Size.Builder getSizeBuilder()

Required. The Size of the AdUnit.

.google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Size.Builder

getSizeOrBuilder()

public SizeOrBuilder getSizeOrBuilder()

Required. The Size of the AdUnit.

.google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
SizeOrBuilder

hasSize()

public boolean hasSize()

Required. The Size of the AdUnit.

.google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the size field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AdUnitSize other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeSize(Size value)

public AdUnitSize.Builder mergeSize(Size value)

Required. The Size of the AdUnit.

.google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Size
Returns
Type Description
AdUnitSize.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AdUnitSize.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AdUnitSize.Builder
Overrides

removeCompanions(int index)

public AdUnitSize.Builder removeCompanions(int index)

The companions for this ad unit size. Companions are only valid if the environment is VIDEO_PLAYER.

repeated .google.ads.admanager.v1.Size companions = 3;

Parameter
Name Description
index int
Returns
Type Description
AdUnitSize.Builder

setCompanions(int index, Size value)

public AdUnitSize.Builder setCompanions(int index, Size value)

The companions for this ad unit size. Companions are only valid if the environment is VIDEO_PLAYER.

repeated .google.ads.admanager.v1.Size companions = 3;

Parameters
Name Description
index int
value Size
Returns
Type Description
AdUnitSize.Builder

setCompanions(int index, Size.Builder builderForValue)

public AdUnitSize.Builder setCompanions(int index, Size.Builder builderForValue)

The companions for this ad unit size. Companions are only valid if the environment is VIDEO_PLAYER.

repeated .google.ads.admanager.v1.Size companions = 3;

Parameters
Name Description
index int
builderForValue Size.Builder
Returns
Type Description
AdUnitSize.Builder

setEnvironmentType(EnvironmentTypeEnum.EnvironmentType value)

public AdUnitSize.Builder setEnvironmentType(EnvironmentTypeEnum.EnvironmentType value)

Required. The EnvironmentType of the AdUnit

.google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value EnvironmentTypeEnum.EnvironmentType

The environmentType to set.

Returns
Type Description
AdUnitSize.Builder

This builder for chaining.

setEnvironmentTypeValue(int value)

public AdUnitSize.Builder setEnvironmentTypeValue(int value)

Required. The EnvironmentType of the AdUnit

.google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

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

Returns
Type Description
AdUnitSize.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public AdUnitSize.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AdUnitSize.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public AdUnitSize.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
AdUnitSize.Builder
Overrides

setSize(Size value)

public AdUnitSize.Builder setSize(Size value)

Required. The Size of the AdUnit.

.google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Size
Returns
Type Description
AdUnitSize.Builder

setSize(Size.Builder builderForValue)

public AdUnitSize.Builder setSize(Size.Builder builderForValue)

Required. The Size of the AdUnit.

.google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue Size.Builder
Returns
Type Description
AdUnitSize.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final AdUnitSize.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AdUnitSize.Builder
Overrides