Class InventoryTargeting (0.27.0)

public final class InventoryTargeting extends GeneratedMessageV3 implements InventoryTargetingOrBuilder

Targeted ad units and AU placements are applied with logical OR. Example:

(au:1 OR au:2 OR au_placement:5) AND (NOT (au:3))

Protobuf type google.ads.admanager.v1.InventoryTargeting

Static Fields

EXCLUDED_AD_UNITS_FIELD_NUMBER

public static final int EXCLUDED_AD_UNITS_FIELD_NUMBER
Field Value
Type Description
int

TARGETED_AD_UNITS_FIELD_NUMBER

public static final int TARGETED_AD_UNITS_FIELD_NUMBER
Field Value
Type Description
int

TARGETED_PLACEMENTS_FIELD_NUMBER

public static final int TARGETED_PLACEMENTS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static InventoryTargeting getDefaultInstance()
Returns
Type Description
InventoryTargeting

getDescriptor()

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

newBuilder()

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

newBuilder(InventoryTargeting prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public InventoryTargeting getDefaultInstanceForType()
Returns
Type Description
InventoryTargeting

getExcludedAdUnits(int index)

public AdUnitTargeting getExcludedAdUnits(int index)

Optional. A list of ad units that should be excluded.

Excluded AUs take precedence over targeted AUs. In fact an AU can be excluded only if one of its ancestors is targeted. Subsequently child AUs of an excluded AU can not be targeted (except via a placement).

repeated .google.ads.admanager.v1.AdUnitTargeting excluded_ad_units = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AdUnitTargeting

getExcludedAdUnitsCount()

public int getExcludedAdUnitsCount()

Optional. A list of ad units that should be excluded.

Excluded AUs take precedence over targeted AUs. In fact an AU can be excluded only if one of its ancestors is targeted. Subsequently child AUs of an excluded AU can not be targeted (except via a placement).

repeated .google.ads.admanager.v1.AdUnitTargeting excluded_ad_units = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getExcludedAdUnitsList()

public List<AdUnitTargeting> getExcludedAdUnitsList()

Optional. A list of ad units that should be excluded.

Excluded AUs take precedence over targeted AUs. In fact an AU can be excluded only if one of its ancestors is targeted. Subsequently child AUs of an excluded AU can not be targeted (except via a placement).

repeated .google.ads.admanager.v1.AdUnitTargeting excluded_ad_units = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<AdUnitTargeting>

getExcludedAdUnitsOrBuilder(int index)

public AdUnitTargetingOrBuilder getExcludedAdUnitsOrBuilder(int index)

Optional. A list of ad units that should be excluded.

Excluded AUs take precedence over targeted AUs. In fact an AU can be excluded only if one of its ancestors is targeted. Subsequently child AUs of an excluded AU can not be targeted (except via a placement).

repeated .google.ads.admanager.v1.AdUnitTargeting excluded_ad_units = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AdUnitTargetingOrBuilder

getExcludedAdUnitsOrBuilderList()

public List<? extends AdUnitTargetingOrBuilder> getExcludedAdUnitsOrBuilderList()

Optional. A list of ad units that should be excluded.

Excluded AUs take precedence over targeted AUs. In fact an AU can be excluded only if one of its ancestors is targeted. Subsequently child AUs of an excluded AU can not be targeted (except via a placement).

repeated .google.ads.admanager.v1.AdUnitTargeting excluded_ad_units = 2 [(.google.api.field_behavior) = OPTIONAL];

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

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getTargetedAdUnits(int index)

public AdUnitTargeting getTargetedAdUnits(int index)

Optional. A list of ad units that should be targeted/included.

repeated .google.ads.admanager.v1.AdUnitTargeting targeted_ad_units = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AdUnitTargeting

getTargetedAdUnitsCount()

public int getTargetedAdUnitsCount()

Optional. A list of ad units that should be targeted/included.

repeated .google.ads.admanager.v1.AdUnitTargeting targeted_ad_units = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getTargetedAdUnitsList()

public List<AdUnitTargeting> getTargetedAdUnitsList()

Optional. A list of ad units that should be targeted/included.

repeated .google.ads.admanager.v1.AdUnitTargeting targeted_ad_units = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<AdUnitTargeting>

getTargetedAdUnitsOrBuilder(int index)

public AdUnitTargetingOrBuilder getTargetedAdUnitsOrBuilder(int index)

Optional. A list of ad units that should be targeted/included.

repeated .google.ads.admanager.v1.AdUnitTargeting targeted_ad_units = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AdUnitTargetingOrBuilder

getTargetedAdUnitsOrBuilderList()

public List<? extends AdUnitTargetingOrBuilder> getTargetedAdUnitsOrBuilderList()

Optional. A list of ad units that should be targeted/included.

repeated .google.ads.admanager.v1.AdUnitTargeting targeted_ad_units = 1 [(.google.api.field_behavior) = OPTIONAL];

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

getTargetedPlacements(int index)

public String getTargetedPlacements(int index)

Optional. The resource names of the placements that should be targeted/included.

repeated string targeted_placements = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The targetedPlacements at the given index.

getTargetedPlacementsBytes(int index)

public ByteString getTargetedPlacementsBytes(int index)

Optional. The resource names of the placements that should be targeted/included.

repeated string targeted_placements = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the targetedPlacements at the given index.

getTargetedPlacementsCount()

public int getTargetedPlacementsCount()

Optional. The resource names of the placements that should be targeted/included.

repeated string targeted_placements = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
int

The count of targetedPlacements.

getTargetedPlacementsList()

public ProtocolStringList getTargetedPlacementsList()

Optional. The resource names of the placements that should be targeted/included.

repeated string targeted_placements = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ProtocolStringList

A list containing the targetedPlacements.

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 InventoryTargeting.Builder newBuilderForType()
Returns
Type Description
InventoryTargeting.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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