public static final class LocationPolicy.Builder extends GeneratedMessage.Builder<LocationPolicy.Builder> implements LocationPolicyOrBuilderConfiguration 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
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > LocationPolicy.BuilderImplements
LocationPolicyOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllZones(Iterable<? extends LocationPolicyZoneConfiguration> values)
public LocationPolicy.Builder addAllZones(Iterable<? extends LocationPolicyZoneConfiguration> values)The bulkInsert operation applies any preferences set in the locations field to the specific zones listed in the zones field if the same zones are specified in both fields.
repeated .google.cloud.compute.v1.LocationPolicyZoneConfiguration zones = 116085319;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.cloud.compute.v1.LocationPolicyZoneConfiguration> |
| Returns | |
|---|---|
| Type | Description |
LocationPolicy.Builder |
|
addZones(LocationPolicyZoneConfiguration value)
public LocationPolicy.Builder addZones(LocationPolicyZoneConfiguration value)The bulkInsert operation applies any preferences set in the locations field to the specific zones listed in the zones field if the same zones are specified in both fields.
repeated .google.cloud.compute.v1.LocationPolicyZoneConfiguration zones = 116085319;
| Parameter | |
|---|---|
| Name | Description |
value |
LocationPolicyZoneConfiguration |
| Returns | |
|---|---|
| Type | Description |
LocationPolicy.Builder |
|
addZones(LocationPolicyZoneConfiguration.Builder builderForValue)
public LocationPolicy.Builder addZones(LocationPolicyZoneConfiguration.Builder builderForValue)The bulkInsert operation applies any preferences set in the locations field to the specific zones listed in the zones field if the same zones are specified in both fields.
repeated .google.cloud.compute.v1.LocationPolicyZoneConfiguration zones = 116085319;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
LocationPolicyZoneConfiguration.Builder |
| Returns | |
|---|---|
| Type | Description |
LocationPolicy.Builder |
|
addZones(int index, LocationPolicyZoneConfiguration value)
public LocationPolicy.Builder addZones(int index, LocationPolicyZoneConfiguration value)The bulkInsert operation applies any preferences set in the locations field to the specific zones listed in the zones field if the same zones are specified in both fields.
repeated .google.cloud.compute.v1.LocationPolicyZoneConfiguration zones = 116085319;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
LocationPolicyZoneConfiguration |
| Returns | |
|---|---|
| Type | Description |
LocationPolicy.Builder |
|
addZones(int index, LocationPolicyZoneConfiguration.Builder builderForValue)
public LocationPolicy.Builder addZones(int index, LocationPolicyZoneConfiguration.Builder builderForValue)The bulkInsert operation applies any preferences set in the locations field to the specific zones listed in the zones field if the same zones are specified in both fields.
repeated .google.cloud.compute.v1.LocationPolicyZoneConfiguration zones = 116085319;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
LocationPolicyZoneConfiguration.Builder |
| Returns | |
|---|---|
| Type | Description |
LocationPolicy.Builder |
|
addZonesBuilder()
public LocationPolicyZoneConfiguration.Builder addZonesBuilder()The bulkInsert operation applies any preferences set in the locations field to the specific zones listed in the zones field if the same zones are specified in both fields.
repeated .google.cloud.compute.v1.LocationPolicyZoneConfiguration zones = 116085319;
| Returns | |
|---|---|
| Type | Description |
LocationPolicyZoneConfiguration.Builder |
|
addZonesBuilder(int index)
public LocationPolicyZoneConfiguration.Builder addZonesBuilder(int index)The bulkInsert operation applies any preferences set in the locations field to the specific zones listed in the zones field if the same zones are specified in both fields.
repeated .google.cloud.compute.v1.LocationPolicyZoneConfiguration zones = 116085319;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
LocationPolicyZoneConfiguration.Builder |
|
build()
public LocationPolicy build()| Returns | |
|---|---|
| Type | Description |
LocationPolicy |
|
buildPartial()
public LocationPolicy buildPartial()| Returns | |
|---|---|
| Type | Description |
LocationPolicy |
|
clear()
public LocationPolicy.Builder clear()| Returns | |
|---|---|
| Type | Description |
LocationPolicy.Builder |
|
clearLocations()
public LocationPolicy.Builder clearLocations()| Returns | |
|---|---|
| Type | Description |
LocationPolicy.Builder |
|
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;
| Returns | |
|---|---|
| Type | Description |
LocationPolicy.Builder |
This builder for chaining. |
clearZones()
public LocationPolicy.Builder clearZones()The bulkInsert operation applies any preferences set in the locations field to the specific zones listed in the zones field if the same zones are specified in both fields.
repeated .google.cloud.compute.v1.LocationPolicyZoneConfiguration zones = 116085319;
| Returns | |
|---|---|
| Type | Description |
LocationPolicy.Builder |
|
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. The bulkInsert operation doesn't create instances in an AI zone, even if an AI zone is available in the specified region. For example, if you set a DENY preference for us-central1-a, Compute Engine will consider us-central1-b and us-central1-c for instance creation, but not us-central1-ai1a. Also, you can't use the locations[] configuration to allow instance creation in an AI zone. To include an AI zone in bulkInsert operations, use the locationPolicy.zones[] field.
map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
getDefaultInstanceForType()
public LocationPolicy getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
LocationPolicy |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getLocations() (deprecated)
public Map<String,LocationPolicyLocation> getLocations()Use #getLocationsMap() instead.
| Returns | |
|---|---|
| Type | Description |
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. The bulkInsert operation doesn't create instances in an AI zone, even if an AI zone is available in the specified region. For example, if you set a DENY preference for us-central1-a, Compute Engine will consider us-central1-b and us-central1-c for instance creation, but not us-central1-ai1a. Also, you can't use the locations[] configuration to allow instance creation in an AI zone. To include an AI zone in bulkInsert operations, use the locationPolicy.zones[] field.
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. The bulkInsert operation doesn't create instances in an AI zone, even if an AI zone is available in the specified region. For example, if you set a DENY preference for us-central1-a, Compute Engine will consider us-central1-b and us-central1-c for instance creation, but not us-central1-ai1a. Also, you can't use the locations[] configuration to allow instance creation in an AI zone. To include an AI zone in bulkInsert operations, use the locationPolicy.zones[] field.
map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;
| Returns | |
|---|---|
| Type | Description |
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. The bulkInsert operation doesn't create instances in an AI zone, even if an AI zone is available in the specified region. For example, if you set a DENY preference for us-central1-a, Compute Engine will consider us-central1-b and us-central1-c for instance creation, but not us-central1-ai1a. Also, you can't use the locations[] configuration to allow instance creation in an AI zone. To include an AI zone in bulkInsert operations, use the locationPolicy.zones[] field.
map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;
| Parameters | |
|---|---|
| Name | Description |
key |
String |
defaultValue |
LocationPolicyLocation |
| Returns | |
|---|---|
| Type | Description |
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. The bulkInsert operation doesn't create instances in an AI zone, even if an AI zone is available in the specified region. For example, if you set a DENY preference for us-central1-a, Compute Engine will consider us-central1-b and us-central1-c for instance creation, but not us-central1-ai1a. Also, you can't use the locations[] configuration to allow instance creation in an AI zone. To include an AI zone in bulkInsert operations, use the locationPolicy.zones[] field.
map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
LocationPolicyLocation |
|
getMutableLocations() (deprecated)
public Map<String,LocationPolicyLocation> getMutableLocations()Use alternate mutation accessors instead.
| Returns | |
|---|---|
| Type | Description |
Map<String,LocationPolicyLocation> |
|
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. |
getZones(int index)
public LocationPolicyZoneConfiguration getZones(int index)The bulkInsert operation applies any preferences set in the locations field to the specific zones listed in the zones field if the same zones are specified in both fields.
repeated .google.cloud.compute.v1.LocationPolicyZoneConfiguration zones = 116085319;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
LocationPolicyZoneConfiguration |
|
getZonesBuilder(int index)
public LocationPolicyZoneConfiguration.Builder getZonesBuilder(int index)The bulkInsert operation applies any preferences set in the locations field to the specific zones listed in the zones field if the same zones are specified in both fields.
repeated .google.cloud.compute.v1.LocationPolicyZoneConfiguration zones = 116085319;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
LocationPolicyZoneConfiguration.Builder |
|
getZonesBuilderList()
public List<LocationPolicyZoneConfiguration.Builder> getZonesBuilderList()The bulkInsert operation applies any preferences set in the locations field to the specific zones listed in the zones field if the same zones are specified in both fields.
repeated .google.cloud.compute.v1.LocationPolicyZoneConfiguration zones = 116085319;
| Returns | |
|---|---|
| Type | Description |
List<Builder> |
|
getZonesCount()
public int getZonesCount()The bulkInsert operation applies any preferences set in the locations field to the specific zones listed in the zones field if the same zones are specified in both fields.
repeated .google.cloud.compute.v1.LocationPolicyZoneConfiguration zones = 116085319;
| Returns | |
|---|---|
| Type | Description |
int |
|
getZonesList()
public List<LocationPolicyZoneConfiguration> getZonesList()The bulkInsert operation applies any preferences set in the locations field to the specific zones listed in the zones field if the same zones are specified in both fields.
repeated .google.cloud.compute.v1.LocationPolicyZoneConfiguration zones = 116085319;
| Returns | |
|---|---|
| Type | Description |
List<LocationPolicyZoneConfiguration> |
|
getZonesOrBuilder(int index)
public LocationPolicyZoneConfigurationOrBuilder getZonesOrBuilder(int index)The bulkInsert operation applies any preferences set in the locations field to the specific zones listed in the zones field if the same zones are specified in both fields.
repeated .google.cloud.compute.v1.LocationPolicyZoneConfiguration zones = 116085319;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
LocationPolicyZoneConfigurationOrBuilder |
|
getZonesOrBuilderList()
public List<? extends LocationPolicyZoneConfigurationOrBuilder> getZonesOrBuilderList()The bulkInsert operation applies any preferences set in the locations field to the specific zones listed in the zones field if the same zones are specified in both fields.
repeated .google.cloud.compute.v1.LocationPolicyZoneConfiguration zones = 116085319;
| Returns | |
|---|---|
| Type | Description |
List<? extends com.google.cloud.compute.v1.LocationPolicyZoneConfigurationOrBuilder> |
|
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()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
internalGetMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)| Parameter | |
|---|---|
| Name | Description |
number |
int |
| Returns | |
|---|---|
| Type | Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
internalGetMutableMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)| Parameter | |
|---|---|
| Name | Description |
number |
int |
| Returns | |
|---|---|
| Type | Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(LocationPolicy other)
public LocationPolicy.Builder mergeFrom(LocationPolicy other)| Parameter | |
|---|---|
| Name | Description |
other |
LocationPolicy |
| Returns | |
|---|---|
| Type | Description |
LocationPolicy.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public LocationPolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
LocationPolicy.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public LocationPolicy.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
LocationPolicy.Builder |
|
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. The bulkInsert operation doesn't create instances in an AI zone, even if an AI zone is available in the specified region. For example, if you set a DENY preference for us-central1-a, Compute Engine will consider us-central1-b and us-central1-c for instance creation, but not us-central1-ai1a. Also, you can't use the locations[] configuration to allow instance creation in an AI zone. To include an AI zone in bulkInsert operations, use the locationPolicy.zones[] field.
map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;
| Parameter | |
|---|---|
| Name | Description |
values |
Map<String,LocationPolicyLocation> |
| Returns | |
|---|---|
| Type | Description |
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. The bulkInsert operation doesn't create instances in an AI zone, even if an AI zone is available in the specified region. For example, if you set a DENY preference for us-central1-a, Compute Engine will consider us-central1-b and us-central1-c for instance creation, but not us-central1-ai1a. Also, you can't use the locations[] configuration to allow instance creation in an AI zone. To include an AI zone in bulkInsert operations, use the locationPolicy.zones[] field.
map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;
| Parameters | |
|---|---|
| Name | Description |
key |
String |
value |
LocationPolicyLocation |
| Returns | |
|---|---|
| Type | Description |
LocationPolicy.Builder |
|
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. The bulkInsert operation doesn't create instances in an AI zone, even if an AI zone is available in the specified region. For example, if you set a DENY preference for us-central1-a, Compute Engine will consider us-central1-b and us-central1-c for instance creation, but not us-central1-ai1a. Also, you can't use the locations[] configuration to allow instance creation in an AI zone. To include an AI zone in bulkInsert operations, use the locationPolicy.zones[] field.
map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
LocationPolicyLocation.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. The bulkInsert operation doesn't create instances in an AI zone, even if an AI zone is available in the specified region. For example, if you set a DENY preference for us-central1-a, Compute Engine will consider us-central1-b and us-central1-c for instance creation, but not us-central1-ai1a. Also, you can't use the locations[] configuration to allow instance creation in an AI zone. To include an AI zone in bulkInsert operations, use the locationPolicy.zones[] field.
map<string, .google.cloud.compute.v1.LocationPolicyLocation> locations = 413423454;
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
LocationPolicy.Builder |
|
removeZones(int index)
public LocationPolicy.Builder removeZones(int index)The bulkInsert operation applies any preferences set in the locations field to the specific zones listed in the zones field if the same zones are specified in both fields.
repeated .google.cloud.compute.v1.LocationPolicyZoneConfiguration zones = 116085319;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
LocationPolicy.Builder |
|
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 |
StringThe targetShape to set. |
| Returns | |
|---|---|
| Type | Description |
LocationPolicy.Builder |
This builder for chaining. |
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 |
ByteStringThe bytes for targetShape to set. |
| Returns | |
|---|---|
| Type | Description |
LocationPolicy.Builder |
This builder for chaining. |
setZones(int index, LocationPolicyZoneConfiguration value)
public LocationPolicy.Builder setZones(int index, LocationPolicyZoneConfiguration value)The bulkInsert operation applies any preferences set in the locations field to the specific zones listed in the zones field if the same zones are specified in both fields.
repeated .google.cloud.compute.v1.LocationPolicyZoneConfiguration zones = 116085319;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
LocationPolicyZoneConfiguration |
| Returns | |
|---|---|
| Type | Description |
LocationPolicy.Builder |
|
setZones(int index, LocationPolicyZoneConfiguration.Builder builderForValue)
public LocationPolicy.Builder setZones(int index, LocationPolicyZoneConfiguration.Builder builderForValue)The bulkInsert operation applies any preferences set in the locations field to the specific zones listed in the zones field if the same zones are specified in both fields.
repeated .google.cloud.compute.v1.LocationPolicyZoneConfiguration zones = 116085319;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
LocationPolicyZoneConfiguration.Builder |
| Returns | |
|---|---|
| Type | Description |
LocationPolicy.Builder |
|