Package com.google.cloud.compute.v1
Class LocationPolicy.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
-
- com.google.cloud.compute.v1.LocationPolicy.Builder
-
- All Implemented Interfaces:
LocationPolicyOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- LocationPolicy
public static final class LocationPolicy.Builder extends com.google.protobuf.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 typegoogle.cloud.compute.v1.LocationPolicy
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description LocationPolicy.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)LocationPolicybuild()LocationPolicybuildPartial()LocationPolicy.Builderclear()LocationPolicy.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)LocationPolicy.BuilderclearLocations()LocationPolicy.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)LocationPolicy.BuilderclearTargetShape()Strategy for distributing VMs across zones in a region.LocationPolicy.Builderclone()booleancontainsLocations(String key)Location configurations mapped by location name.LocationPolicygetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()Map<String,LocationPolicyLocation>getLocations()Deprecated.intgetLocationsCount()Location configurations mapped by location name.Map<String,LocationPolicyLocation>getLocationsMap()Location configurations mapped by location name.LocationPolicyLocationgetLocationsOrDefault(String key, LocationPolicyLocation defaultValue)Location configurations mapped by location name.LocationPolicyLocationgetLocationsOrThrow(String key)Location configurations mapped by location name.Map<String,LocationPolicyLocation>getMutableLocations()Deprecated.StringgetTargetShape()Strategy for distributing VMs across zones in a region.com.google.protobuf.ByteStringgetTargetShapeBytes()Strategy for distributing VMs across zones in a region.booleanhasTargetShape()Strategy for distributing VMs across zones in a region.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()protected com.google.protobuf.MapFieldinternalGetMapField(int number)protected com.google.protobuf.MapFieldinternalGetMutableMapField(int number)booleanisInitialized()LocationPolicy.BuildermergeFrom(LocationPolicy other)LocationPolicy.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)LocationPolicy.BuildermergeFrom(com.google.protobuf.Message other)LocationPolicy.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)LocationPolicy.BuilderputAllLocations(Map<String,LocationPolicyLocation> values)Location configurations mapped by location name.LocationPolicy.BuilderputLocations(String key, LocationPolicyLocation value)Location configurations mapped by location name.LocationPolicy.BuilderremoveLocations(String key)Location configurations mapped by location name.LocationPolicy.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)LocationPolicy.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)LocationPolicy.BuildersetTargetShape(String value)Strategy for distributing VMs across zones in a region.LocationPolicy.BuildersetTargetShapeBytes(com.google.protobuf.ByteString value)Strategy for distributing VMs across zones in a region.LocationPolicy.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
-
internalGetMutableMapField
protected com.google.protobuf.MapField internalGetMutableMapField(int number)
- Overrides:
internalGetMutableMapFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
-
clear
public LocationPolicy.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
-
getDefaultInstanceForType
public LocationPolicy getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public LocationPolicy build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public LocationPolicy buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public LocationPolicy.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
-
setField
public LocationPolicy.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
-
clearField
public LocationPolicy.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
-
clearOneof
public LocationPolicy.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
-
setRepeatedField
public LocationPolicy.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
-
addRepeatedField
public LocationPolicy.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
-
mergeFrom
public LocationPolicy.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<LocationPolicy.Builder>
-
mergeFrom
public LocationPolicy.Builder mergeFrom(LocationPolicy other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
-
mergeFrom
public LocationPolicy.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<LocationPolicy.Builder>- Throws:
IOException
-
getLocationsCount
public int getLocationsCount()
Description copied from interface:LocationPolicyOrBuilderLocation 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;- Specified by:
getLocationsCountin interfaceLocationPolicyOrBuilder
-
containsLocations
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;- Specified by:
containsLocationsin interfaceLocationPolicyOrBuilder
-
getLocations
@Deprecated public Map<String,LocationPolicyLocation> getLocations()
Deprecated.UsegetLocationsMap()instead.- Specified by:
getLocationsin interfaceLocationPolicyOrBuilder
-
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;- Specified by:
getLocationsMapin interfaceLocationPolicyOrBuilder
-
getLocationsOrDefault
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;- Specified by:
getLocationsOrDefaultin interfaceLocationPolicyOrBuilder
-
getLocationsOrThrow
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;- Specified by:
getLocationsOrThrowin interfaceLocationPolicyOrBuilder
-
clearLocations
public LocationPolicy.Builder clearLocations()
-
removeLocations
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;
-
getMutableLocations
@Deprecated public Map<String,LocationPolicyLocation> getMutableLocations()
Deprecated.Use alternate mutation accessors instead.
-
putLocations
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;
-
putAllLocations
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;
-
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;- Specified by:
hasTargetShapein interfaceLocationPolicyOrBuilder- Returns:
- Whether the targetShape field is set.
-
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;- Specified by:
getTargetShapein interfaceLocationPolicyOrBuilder- Returns:
- The targetShape.
-
getTargetShapeBytes
public com.google.protobuf.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;- Specified by:
getTargetShapeBytesin interfaceLocationPolicyOrBuilder- Returns:
- The bytes for targetShape.
-
setTargetShape
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;- Parameters:
value- The targetShape to set.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
setTargetShapeBytes
public LocationPolicy.Builder setTargetShapeBytes(com.google.protobuf.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;- Parameters:
value- The bytes for targetShape to set.- Returns:
- This builder for chaining.
-
setUnknownFields
public final LocationPolicy.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
-
mergeUnknownFields
public final LocationPolicy.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
-
-