public static final class AdUnitSize.Builder extends GeneratedMessage.Builder<AdUnitSize.Builder> implements AdUnitSizeOrBuilderRepresents the size, environment, and companions of an ad in an ad unit.
Protobuf type google.ads.admanager.v1.AdUnitSize
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > AdUnitSize.BuilderImplements
AdUnitSizeOrBuilderStatic 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 |
|
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 |
|
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
optional .google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
AdUnitSize.Builder |
This builder for chaining. |
clearSize()
public AdUnitSize.Builder clearSize()Required. The Size of the AdUnit.
optional .google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
AdUnitSize.Builder |
|
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 |
|
getEnvironmentType()
public EnvironmentTypeEnum.EnvironmentType getEnvironmentType()Required. The EnvironmentType of the AdUnit
optional .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
optional .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.
optional .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.
optional .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.
optional .google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
SizeOrBuilder |
|
hasEnvironmentType()
public boolean hasEnvironmentType()Required. The EnvironmentType of the AdUnit
optional .google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the environmentType field is set. |
hasSize()
public boolean hasSize()Required. The Size of the AdUnit.
optional .google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the size field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
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 |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public AdUnitSize.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
AdUnitSize.Builder |
|
mergeSize(Size value)
public AdUnitSize.Builder mergeSize(Size value)Required. The Size of the AdUnit.
optional .google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
Size |
| Returns | |
|---|---|
| Type | Description |
AdUnitSize.Builder |
|
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
optional .google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
EnvironmentTypeEnum.EnvironmentTypeThe 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
optional .google.ads.admanager.v1.EnvironmentTypeEnum.EnvironmentType environment_type = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
intThe enum numeric value on the wire for environmentType to set. |
| Returns | |
|---|---|
| Type | Description |
AdUnitSize.Builder |
This builder for chaining. |
setSize(Size value)
public AdUnitSize.Builder setSize(Size value)Required. The Size of the AdUnit.
optional .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.
optional .google.ads.admanager.v1.Size size = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Size.Builder |
| Returns | |
|---|---|
| Type | Description |
AdUnitSize.Builder |
|