Class GeoTargeting.Builder (0.44.0)

public static final class GeoTargeting.Builder extends GeneratedMessage.Builder<GeoTargeting.Builder> implements GeoTargetingOrBuilder

Represents a list of targeted and excluded geos.

Protobuf type google.ads.admanager.v1.GeoTargeting

Static Methods

getDescriptor()

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

Methods

addAllExcludedGeos(Iterable<String> values)

public GeoTargeting.Builder addAllExcludedGeos(Iterable<String> values)

Optional. A list of geo resource names that should be excluded.

repeated string excluded_geos = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
values Iterable<String>

The excludedGeos to add.

Returns
Type Description
GeoTargeting.Builder

This builder for chaining.

addAllTargetedGeos(Iterable<String> values)

public GeoTargeting.Builder addAllTargetedGeos(Iterable<String> values)

Optional. A list of geo resource names that should be targeted/included.

repeated string targeted_geos = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
values Iterable<String>

The targetedGeos to add.

Returns
Type Description
GeoTargeting.Builder

This builder for chaining.

addExcludedGeos(String value)

public GeoTargeting.Builder addExcludedGeos(String value)

Optional. A list of geo resource names that should be excluded.

repeated string excluded_geos = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The excludedGeos to add.

Returns
Type Description
GeoTargeting.Builder

This builder for chaining.

addExcludedGeosBytes(ByteString value)

public GeoTargeting.Builder addExcludedGeosBytes(ByteString value)

Optional. A list of geo resource names that should be excluded.

repeated string excluded_geos = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes of the excludedGeos to add.

Returns
Type Description
GeoTargeting.Builder

This builder for chaining.

addTargetedGeos(String value)

public GeoTargeting.Builder addTargetedGeos(String value)

Optional. A list of geo resource names that should be targeted/included.

repeated string targeted_geos = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The targetedGeos to add.

Returns
Type Description
GeoTargeting.Builder

This builder for chaining.

addTargetedGeosBytes(ByteString value)

public GeoTargeting.Builder addTargetedGeosBytes(ByteString value)

Optional. A list of geo resource names that should be targeted/included.

repeated string targeted_geos = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes of the targetedGeos to add.

Returns
Type Description
GeoTargeting.Builder

This builder for chaining.

build()

public GeoTargeting build()
Returns
Type Description
GeoTargeting

buildPartial()

public GeoTargeting buildPartial()
Returns
Type Description
GeoTargeting

clear()

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

clearExcludedGeos()

public GeoTargeting.Builder clearExcludedGeos()

Optional. A list of geo resource names that should be excluded.

repeated string excluded_geos = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
GeoTargeting.Builder

This builder for chaining.

clearTargetedGeos()

public GeoTargeting.Builder clearTargetedGeos()

Optional. A list of geo resource names that should be targeted/included.

repeated string targeted_geos = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
GeoTargeting.Builder

This builder for chaining.

getDefaultInstanceForType()

public GeoTargeting getDefaultInstanceForType()
Returns
Type Description
GeoTargeting

getDescriptorForType()

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

getExcludedGeos(int index)

public String getExcludedGeos(int index)

Optional. A list of geo resource names that should be excluded.

repeated string excluded_geos = 4 [(.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 excludedGeos at the given index.

getExcludedGeosBytes(int index)

public ByteString getExcludedGeosBytes(int index)

Optional. A list of geo resource names that should be excluded.

repeated string excluded_geos = 4 [(.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 excludedGeos at the given index.

getExcludedGeosCount()

public int getExcludedGeosCount()

Optional. A list of geo resource names that should be excluded.

repeated string excluded_geos = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
int

The count of excludedGeos.

getExcludedGeosList()

public ProtocolStringList getExcludedGeosList()

Optional. A list of geo resource names that should be excluded.

repeated string excluded_geos = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ProtocolStringList

A list containing the excludedGeos.

getTargetedGeos(int index)

public String getTargetedGeos(int index)

Optional. A list of geo resource names that should be targeted/included.

repeated string targeted_geos = 3 [(.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 targetedGeos at the given index.

getTargetedGeosBytes(int index)

public ByteString getTargetedGeosBytes(int index)

Optional. A list of geo resource names that should be targeted/included.

repeated string targeted_geos = 3 [(.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 targetedGeos at the given index.

getTargetedGeosCount()

public int getTargetedGeosCount()

Optional. A list of geo resource names that should be targeted/included.

repeated string targeted_geos = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
int

The count of targetedGeos.

getTargetedGeosList()

public ProtocolStringList getTargetedGeosList()

Optional. A list of geo resource names that should be targeted/included.

repeated string targeted_geos = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ProtocolStringList

A list containing the targetedGeos.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(GeoTargeting other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setExcludedGeos(int index, String value)

public GeoTargeting.Builder setExcludedGeos(int index, String value)

Optional. A list of geo resource names that should be excluded.

repeated string excluded_geos = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameters
Name Description
index int

The index to set the value at.

value String

The excludedGeos to set.

Returns
Type Description
GeoTargeting.Builder

This builder for chaining.

setTargetedGeos(int index, String value)

public GeoTargeting.Builder setTargetedGeos(int index, String value)

Optional. A list of geo resource names that should be targeted/included.

repeated string targeted_geos = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameters
Name Description
index int

The index to set the value at.

value String

The targetedGeos to set.

Returns
Type Description
GeoTargeting.Builder

This builder for chaining.