Class GeoTargeting.Builder (0.27.0)

public static final class GeoTargeting.Builder extends GeneratedMessageV3.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.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

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.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

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.

clone()

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

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final GeoTargeting.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
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.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

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.

setUnknownFields(UnknownFieldSet unknownFields)

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