Class 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 type google.cloud.compute.v1.LocationPolicy
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
      • clear

        public LocationPolicy.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
      • getDefaultInstanceForType

        public LocationPolicy getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public LocationPolicy build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public LocationPolicy buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public LocationPolicy.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
      • setField

        public LocationPolicy.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                               Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
      • clearField

        public LocationPolicy.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
      • clearOneof

        public LocationPolicy.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
      • setRepeatedField

        public LocationPolicy.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                       int index,
                                                       Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
      • addRepeatedField

        public LocationPolicy.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                       Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
      • mergeFrom

        public LocationPolicy.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<LocationPolicy.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.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:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<LocationPolicy.Builder>
        Throws:
        IOException
      • getLocationsCount

        public int getLocationsCount()
        Description copied from interface: LocationPolicyOrBuilder
         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:
        getLocationsCount in interface LocationPolicyOrBuilder
      • 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:
        containsLocations in interface LocationPolicyOrBuilder
      • 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:
        getLocationsMap in interface LocationPolicyOrBuilder
      • 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:
        getLocationsOrThrow in interface LocationPolicyOrBuilder
      • 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;
      • 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:
        hasTargetShape in interface LocationPolicyOrBuilder
        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:
        getTargetShape in interface LocationPolicyOrBuilder
        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:
        getTargetShapeBytes in interface LocationPolicyOrBuilder
        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:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>
      • mergeUnknownFields

        public final LocationPolicy.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<LocationPolicy.Builder>