Class AdUnitTargeting.Builder (0.44.0)

public static final class AdUnitTargeting.Builder extends GeneratedMessage.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

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.

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.

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 GeneratedMessage.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

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.

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.