Class AdUnitTargeting.Builder (0.27.0)

public static final class AdUnitTargeting.Builder extends GeneratedMessageV3.Builder<AdUnitTargeting.Builder> implements AdUnitTargetingOrBuilder

Specifies an ad unit and (optionally) its descendants.

Protobuf type google.ads.admanager.v1.AdUnitTargeting

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public AdUnitTargeting build()
Returns
Type Description
AdUnitTargeting

buildPartial()

public AdUnitTargeting buildPartial()
Returns
Type Description
AdUnitTargeting

clear()

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

clearAdUnit()

public AdUnitTargeting.Builder clearAdUnit()

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
AdUnitTargeting.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearIncludeDescendants()

public AdUnitTargeting.Builder clearIncludeDescendants()

Whether this ad unit's children should be targeted/excluded as well.

optional bool include_descendants = 1;

Returns
Type Description
AdUnitTargeting.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public AdUnitTargeting.Builder clone()
Returns
Type Description
AdUnitTargeting.Builder
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()
Returns
Type Description
AdUnitTargeting

getDescriptorForType()

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

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.

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.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AdUnitTargeting other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAdUnit(String value)

public AdUnitTargeting.Builder setAdUnit(String value)

Optional. The resource name of this ad unit.

optional string ad_unit = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The adUnit to set.

Returns
Type Description
AdUnitTargeting.Builder

This builder for chaining.

setAdUnitBytes(ByteString value)

public AdUnitTargeting.Builder setAdUnitBytes(ByteString value)

Optional. The resource name of this ad unit.

optional string ad_unit = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for adUnit to set.

Returns
Type Description
AdUnitTargeting.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setIncludeDescendants(boolean value)

public AdUnitTargeting.Builder setIncludeDescendants(boolean value)

Whether this ad unit's children should be targeted/excluded as well.

optional bool include_descendants = 1;

Parameter
Name Description
value boolean

The includeDescendants to set.

Returns
Type Description
AdUnitTargeting.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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