Class Location.Builder

public static final class Location.Builder extends GeneratedMessageV3.Builder<Location.Builder> implements LocationOrBuilder

A resource that represents Google Cloud Platform location.

Protobuf type google.cloud.location.Location

Implements

LocationOrBuilder

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Location.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Location.Builder
Overrides

build()

public Location build()
Returns
TypeDescription
Location

buildPartial()

public Location buildPartial()
Returns
TypeDescription
Location

clear()

public Location.Builder clear()
Returns
TypeDescription
Location.Builder
Overrides

clearDisplayName()

public Location.Builder clearDisplayName()

The friendly name for this location, typically a nearby city name. For example, "Tokyo".

string display_name = 5;

Returns
TypeDescription
Location.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Location.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Location.Builder
Overrides

clearLabels()

public Location.Builder clearLabels()
Returns
TypeDescription
Location.Builder

clearLocationId()

public Location.Builder clearLocationId()

The canonical id for this location. For example: "us-east1".

string location_id = 4;

Returns
TypeDescription
Location.Builder

This builder for chaining.

clearMetadata()

public Location.Builder clearMetadata()

Service-specific metadata. For example the available capacity at the given location.

.google.protobuf.Any metadata = 3;

Returns
TypeDescription
Location.Builder

clearName()

public Location.Builder clearName()

Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1"

string name = 1;

Returns
TypeDescription
Location.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Location.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Location.Builder
Overrides

clone()

public Location.Builder clone()
Returns
TypeDescription
Location.Builder
Overrides

containsLabels(String key)

public boolean containsLabels(String key)

Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"}

map<string, string> labels = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getDefaultInstanceForType()

public Location getDefaultInstanceForType()
Returns
TypeDescription
Location

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

The friendly name for this location, typically a nearby city name. For example, "Tokyo".

string display_name = 5;

Returns
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

The friendly name for this location, typically a nearby city name. For example, "Tokyo".

string display_name = 5;

Returns
TypeDescription
ByteString

The bytes for displayName.

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"}

map<string, string> labels = 2;

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"}

map<string, string> labels = 2;

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"}

map<string, string> labels = 2;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"}

map<string, string> labels = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getLocationId()

public String getLocationId()

The canonical id for this location. For example: "us-east1".

string location_id = 4;

Returns
TypeDescription
String

The locationId.

getLocationIdBytes()

public ByteString getLocationIdBytes()

The canonical id for this location. For example: "us-east1".

string location_id = 4;

Returns
TypeDescription
ByteString

The bytes for locationId.

getMetadata()

public Any getMetadata()

Service-specific metadata. For example the available capacity at the given location.

.google.protobuf.Any metadata = 3;

Returns
TypeDescription
Any

The metadata.

getMetadataBuilder()

public Any.Builder getMetadataBuilder()

Service-specific metadata. For example the available capacity at the given location.

.google.protobuf.Any metadata = 3;

Returns
TypeDescription
Builder

getMetadataOrBuilder()

public AnyOrBuilder getMetadataOrBuilder()

Service-specific metadata. For example the available capacity at the given location.

.google.protobuf.Any metadata = 3;

Returns
TypeDescription
AnyOrBuilder

getMutableLabels()

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getName()

public String getName()

Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1"

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1"

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

hasMetadata()

public boolean hasMetadata()

Service-specific metadata. For example the available capacity at the given location.

.google.protobuf.Any metadata = 3;

Returns
TypeDescription
boolean

Whether the metadata field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Location other)

public Location.Builder mergeFrom(Location other)
Parameter
NameDescription
otherLocation
Returns
TypeDescription
Location.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Location.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Location.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Location.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Location.Builder
Overrides

mergeMetadata(Any value)

public Location.Builder mergeMetadata(Any value)

Service-specific metadata. For example the available capacity at the given location.

.google.protobuf.Any metadata = 3;

Parameter
NameDescription
valueAny
Returns
TypeDescription
Location.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Location.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Location.Builder
Overrides

putAllLabels(Map<String,String> values)

public Location.Builder putAllLabels(Map<String,String> values)

Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"}

map<string, string> labels = 2;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
Location.Builder

putLabels(String key, String value)

public Location.Builder putLabels(String key, String value)

Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"}

map<string, string> labels = 2;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
Location.Builder

removeLabels(String key)

public Location.Builder removeLabels(String key)

Cross-service attributes for the location. For example {"cloud.googleapis.com/region": "us-east1"}

map<string, string> labels = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
Location.Builder

setDisplayName(String value)

public Location.Builder setDisplayName(String value)

The friendly name for this location, typically a nearby city name. For example, "Tokyo".

string display_name = 5;

Parameter
NameDescription
valueString

The displayName to set.

Returns
TypeDescription
Location.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Location.Builder setDisplayNameBytes(ByteString value)

The friendly name for this location, typically a nearby city name. For example, "Tokyo".

string display_name = 5;

Parameter
NameDescription
valueByteString

The bytes for displayName to set.

Returns
TypeDescription
Location.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Location.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Location.Builder
Overrides

setLocationId(String value)

public Location.Builder setLocationId(String value)

The canonical id for this location. For example: "us-east1".

string location_id = 4;

Parameter
NameDescription
valueString

The locationId to set.

Returns
TypeDescription
Location.Builder

This builder for chaining.

setLocationIdBytes(ByteString value)

public Location.Builder setLocationIdBytes(ByteString value)

The canonical id for this location. For example: "us-east1".

string location_id = 4;

Parameter
NameDescription
valueByteString

The bytes for locationId to set.

Returns
TypeDescription
Location.Builder

This builder for chaining.

setMetadata(Any value)

public Location.Builder setMetadata(Any value)

Service-specific metadata. For example the available capacity at the given location.

.google.protobuf.Any metadata = 3;

Parameter
NameDescription
valueAny
Returns
TypeDescription
Location.Builder

setMetadata(Any.Builder builderForValue)

public Location.Builder setMetadata(Any.Builder builderForValue)

Service-specific metadata. For example the available capacity at the given location.

.google.protobuf.Any metadata = 3;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Location.Builder

setName(String value)

public Location.Builder setName(String value)

Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1"

string name = 1;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Location.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Location.Builder setNameBytes(ByteString value)

Resource name for the location, which may vary between implementations. For example: "projects/example-project/locations/us-east1"

string name = 1;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Location.Builder

This builder for chaining.

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

public Location.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Location.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Location.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Location.Builder
Overrides