Send feedback
Class AdUnitTargeting (0.27.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version latestkeyboard_arrow_down
public final class AdUnitTargeting extends GeneratedMessageV3 implements AdUnitTargetingOrBuilder
Specifies an ad unit and (optionally) its descendants.
Protobuf type google.ads.admanager.v1.AdUnitTargeting
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
AD_UNIT_FIELD_NUMBER
public static final int AD_UNIT_FIELD_NUMBER
Field Value
Type
Description
int
INCLUDE_DESCENDANTS_FIELD_NUMBER
public static final int INCLUDE_DESCENDANTS_FIELD_NUMBER
Field Value
Type
Description
int
Static Methods
getDefaultInstance()
public static AdUnitTargeting getDefaultInstance ()
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
newBuilder()
public static AdUnitTargeting . Builder newBuilder ()
newBuilder(AdUnitTargeting prototype)
public static AdUnitTargeting . Builder newBuilder ( AdUnitTargeting prototype )
public static AdUnitTargeting parseDelimitedFrom ( InputStream input )
public static AdUnitTargeting parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(byte[] data)
public static AdUnitTargeting parseFrom ( byte [] data )
Parameter
Name
Description
data
byte []
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static AdUnitTargeting parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteString data)
public static AdUnitTargeting parseFrom ( ByteString data )
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static AdUnitTargeting parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
public static AdUnitTargeting parseFrom ( CodedInputStream input )
public static AdUnitTargeting parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
public static AdUnitTargeting parseFrom ( InputStream input )
public static AdUnitTargeting parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
parseFrom(ByteBuffer data)
public static AdUnitTargeting parseFrom ( ByteBuffer data )
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static AdUnitTargeting parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
parser()
public static Parser<AdUnitTargeting> parser ()
Methods
equals(Object obj)
public boolean equals ( Object obj )
Parameter
Name
Description
obj
Object
Overrides
getAdUnit()
public String getAdUnit ()
Optional. The resource name of this ad unit.
optional string ad_unit = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
Returns
Type
Description
String
The adUnit.
getAdUnitBytes()
public ByteString getAdUnitBytes ()
Optional. The resource name of this ad unit.
optional string ad_unit = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
Returns
Type
Description
ByteString
The bytes for adUnit.
getDefaultInstanceForType()
public AdUnitTargeting getDefaultInstanceForType ()
getIncludeDescendants()
public boolean getIncludeDescendants ()
Whether this ad unit's children should be targeted/excluded as well.
optional bool include_descendants = 1;
Returns
Type
Description
boolean
The includeDescendants.
getParserForType()
public Parser<AdUnitTargeting> getParserForType ()
Overrides
getSerializedSize()
public int getSerializedSize ()
Returns
Type
Description
int
Overrides
hasAdUnit()
public boolean hasAdUnit ()
Optional. The resource name of this ad unit.
optional string ad_unit = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
Returns
Type
Description
boolean
Whether the adUnit field is set.
hasIncludeDescendants()
public boolean hasIncludeDescendants ()
Whether this ad unit's children should be targeted/excluded as well.
optional bool include_descendants = 1;
Returns
Type
Description
boolean
Whether the includeDescendants field is set.
hashCode()
Returns
Type
Description
int
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
isInitialized()
public final boolean isInitialized ()
Overrides
newBuilderForType()
public AdUnitTargeting . Builder newBuilderForType ()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected AdUnitTargeting . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Returns
Type
Description
Object
Overrides
toBuilder()
public AdUnitTargeting . Builder toBuilder ()
writeTo(CodedOutputStream output)
public void writeTo ( CodedOutputStream output )
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-17 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-17 UTC."],[],[]]