Class AdUnitSize (0.4.0)

public final class AdUnitSize extends GeneratedMessageV3 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 Fields

COMPANIONS_FIELD_NUMBER

public static final int COMPANIONS_FIELD_NUMBER
Field Value
Type Description
int

ENVIRONMENT_TYPE_FIELD_NUMBER

public static final int ENVIRONMENT_TYPE_FIELD_NUMBER
Field Value
Type Description
int

SIZE_FIELD_NUMBER

public static final int SIZE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static AdUnitSize getDefaultInstance()
Returns
Type Description
AdUnitSize

getDescriptor()

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

newBuilder()

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

newBuilder(AdUnitSize prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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

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

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.

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public AdUnitSize.Builder newBuilderForType()
Returns
Type Description
AdUnitSize.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AdUnitSize.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
AdUnitSize.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

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