public static final class LocationPolicy.Builder extends GeneratedMessage.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
Inherited Members
com.google.protobuf.GeneratedMessage.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessage.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessage.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessage.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessage.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessage.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessage.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
com.google.protobuf.GeneratedMessage.Builder.setUnknownFieldsProto3(com.google.protobuf.UnknownFieldSet)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
build()
public LocationPolicy build()
buildPartial()
public LocationPolicy buildPartial()
clear()
public LocationPolicy.Builder clear()
Overrides
clearLocations()
public LocationPolicy.Builder clearLocations()
clearTargetShape()
public LocationPolicy.Builder clearTargetShape()
Strategy for distributing VMs across zones in a region.
Check the TargetShape enum for the list of possible values.
optional string target_shape = 338621299;
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 |
| Name |
Description |
key |
String
|
getDefaultInstanceForType()
public LocationPolicy getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getLocations() (deprecated)
public Map<String,LocationPolicyLocation> getLocations()
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 |
| Type |
Description |
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;
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;
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 |
| Name |
Description |
key |
String
|
getMutableLocations() (deprecated)
public Map<String,LocationPolicyLocation> getMutableLocations()
Use alternate mutation accessors instead.
getTargetShape()
public String getTargetShape()
Strategy for distributing VMs across zones in a region.
Check the TargetShape enum for the list of possible values.
optional string target_shape = 338621299;
| Returns |
| Type |
Description |
String |
The targetShape.
|
getTargetShapeBytes()
public ByteString getTargetShapeBytes()
Strategy for distributing VMs across zones in a region.
Check the TargetShape enum for the list of possible values.
optional string target_shape = 338621299;
| Returns |
| Type |
Description |
ByteString |
The bytes for targetShape.
|
hasTargetShape()
public boolean hasTargetShape()
Strategy for distributing VMs across zones in a region.
Check the TargetShape enum for the list of possible values.
optional string target_shape = 338621299;
| Returns |
| Type |
Description |
boolean |
Whether the targetShape field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
| Parameter |
| Name |
Description |
number |
int
|
| Returns |
| Type |
Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
Overrides
com.google.protobuf.GeneratedMessage.Builder.internalGetMapFieldReflection(int)
internalGetMutableMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
| Parameter |
| Name |
Description |
number |
int
|
| Returns |
| Type |
Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
Overrides
com.google.protobuf.GeneratedMessage.Builder.internalGetMutableMapFieldReflection(int)
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(LocationPolicy other)
public LocationPolicy.Builder mergeFrom(LocationPolicy other)
public LocationPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public LocationPolicy.Builder mergeFrom(Message other)
| Parameter |
| Name |
Description |
other |
Message
|
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;
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;
putLocationsBuilderIfAbsent(String key)
public LocationPolicyLocation.Builder putLocationsBuilderIfAbsent(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 |
| Name |
Description |
key |
String
|
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 |
| Name |
Description |
key |
String
|
setTargetShape(String value)
public LocationPolicy.Builder setTargetShape(String value)
Strategy for distributing VMs across zones in a region.
Check the TargetShape enum for the list of possible values.
optional string target_shape = 338621299;
| Parameter |
| Name |
Description |
value |
String
The targetShape to set.
|
setTargetShapeBytes(ByteString value)
public LocationPolicy.Builder setTargetShapeBytes(ByteString value)
Strategy for distributing VMs across zones in a region.
Check the TargetShape enum for the list of possible values.
optional string target_shape = 338621299;
| Parameter |
| Name |
Description |
value |
ByteString
The bytes for targetShape to set.
|