Class LocationPolicy.Builder (1.7.2)

public static final class LocationPolicy.Builder extends GeneratedMessageV3.Builder<LocationPolicy.Builder> implements LocationPolicyOrBuilder

Configuration for location policy among multiple possible locations (e.g. preferences for zone selection among zones in a single region).

Protobuf type google.cloud.compute.v1.LocationPolicy

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public LocationPolicy build()
Returns
TypeDescription
LocationPolicy

buildPartial()

public LocationPolicy buildPartial()
Returns
TypeDescription
LocationPolicy

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearLocations()

public LocationPolicy.Builder clearLocations()
Returns
TypeDescription
LocationPolicy.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

containsLocations(String key)

public boolean containsLocations(String key)

Location configurations mapped by location name. Currently only zone names are supported and must be represented as valid internal URLs, such as zones/us-central1-a.

map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getDefaultInstanceForType()

public LocationPolicy getDefaultInstanceForType()
Returns
TypeDescription
LocationPolicy

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getLocations()

public Map<String,LocationPolicyLocation> getLocations()

Use #getLocationsMap() instead.

Returns
TypeDescription
Map<String,LocationPolicyLocation>

getLocationsCount()

public int getLocationsCount()

Location configurations mapped by location name. Currently only zone names are supported and must be represented as valid internal URLs, such as zones/us-central1-a.

map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;

Returns
TypeDescription
int

getLocationsMap()

public Map<String,LocationPolicyLocation> getLocationsMap()

Location configurations mapped by location name. Currently only zone names are supported and must be represented as valid internal URLs, such as zones/us-central1-a.

map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;

Returns
TypeDescription
Map<String,LocationPolicyLocation>

getLocationsOrDefault(String key, LocationPolicyLocation defaultValue)

public LocationPolicyLocation getLocationsOrDefault(String key, LocationPolicyLocation defaultValue)

Location configurations mapped by location name. Currently only zone names are supported and must be represented as valid internal URLs, such as zones/us-central1-a.

map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;

Parameters
NameDescription
keyString
defaultValueLocationPolicyLocation
Returns
TypeDescription
LocationPolicyLocation

getLocationsOrThrow(String key)

public LocationPolicyLocation getLocationsOrThrow(String key)

Location configurations mapped by location name. Currently only zone names are supported and must be represented as valid internal URLs, such as zones/us-central1-a.

map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;

Parameter
NameDescription
keyString
Returns
TypeDescription
LocationPolicyLocation

getMutableLocations()

public Map<String,LocationPolicyLocation> getMutableLocations()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,LocationPolicyLocation>

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(LocationPolicy other)

public LocationPolicy.Builder mergeFrom(LocationPolicy other)
Parameter
NameDescription
otherLocationPolicy
Returns
TypeDescription
LocationPolicy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllLocations(Map<String,LocationPolicyLocation> values)

public LocationPolicy.Builder putAllLocations(Map<String,LocationPolicyLocation> values)

Location configurations mapped by location name. Currently only zone names are supported and must be represented as valid internal URLs, such as zones/us-central1-a.

map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;

Parameter
NameDescription
valuesMap<String,LocationPolicyLocation>
Returns
TypeDescription
LocationPolicy.Builder

putLocations(String key, LocationPolicyLocation value)

public LocationPolicy.Builder putLocations(String key, LocationPolicyLocation value)

Location configurations mapped by location name. Currently only zone names are supported and must be represented as valid internal URLs, such as zones/us-central1-a.

map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;

Parameters
NameDescription
keyString
valueLocationPolicyLocation
Returns
TypeDescription
LocationPolicy.Builder

removeLocations(String key)

public LocationPolicy.Builder removeLocations(String key)

Location configurations mapped by location name. Currently only zone names are supported and must be represented as valid internal URLs, such as zones/us-central1-a.

map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;

Parameter
NameDescription
keyString
Returns
TypeDescription
LocationPolicy.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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