Class AllocationPolicy.LocationPolicy.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<AllocationPolicy.LocationPolicy.Builder>
com.google.cloud.batch.v1alpha.AllocationPolicy.LocationPolicy.Builder
All Implemented Interfaces:
AllocationPolicy.LocationPolicyOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
AllocationPolicy.LocationPolicy

public static final class AllocationPolicy.LocationPolicy.Builder extends com.google.protobuf.GeneratedMessage.Builder<AllocationPolicy.LocationPolicy.Builder> implements AllocationPolicy.LocationPolicyOrBuilder
Protobuf type google.cloud.batch.v1alpha.AllocationPolicy.LocationPolicy
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<AllocationPolicy.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.GeneratedMessage.Builder<AllocationPolicy.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.GeneratedMessage.Builder<AllocationPolicy.LocationPolicy.Builder>
    • getDefaultInstanceForType

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

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

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

      public AllocationPolicy.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<AllocationPolicy.LocationPolicy.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<AllocationPolicy.LocationPolicy.Builder>
    • mergeFrom

      public AllocationPolicy.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<AllocationPolicy.LocationPolicy.Builder>
      Throws:
      IOException
    • getAllowedLocationsList

      public com.google.protobuf.ProtocolStringList getAllowedLocationsList()
       A list of allowed location names represented by internal URLs.
      
       Each location can be a region or a zone.
       Only one region or multiple zones in one region is supported now.
       For example,
       ["regions/us-central1"] allow VMs in any zones in region us-central1.
       ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs
       in zones us-central1-a and us-central1-c.
      
       Mixing locations from different regions would cause errors.
       For example,
       ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b",
       "zones/us-west1-a"] contains locations from two distinct regions:
       us-central1 and us-west1. This combination will trigger an error.
       
      repeated string allowed_locations = 1;
      Specified by:
      getAllowedLocationsList in interface AllocationPolicy.LocationPolicyOrBuilder
      Returns:
      A list containing the allowedLocations.
    • getAllowedLocationsCount

      public int getAllowedLocationsCount()
       A list of allowed location names represented by internal URLs.
      
       Each location can be a region or a zone.
       Only one region or multiple zones in one region is supported now.
       For example,
       ["regions/us-central1"] allow VMs in any zones in region us-central1.
       ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs
       in zones us-central1-a and us-central1-c.
      
       Mixing locations from different regions would cause errors.
       For example,
       ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b",
       "zones/us-west1-a"] contains locations from two distinct regions:
       us-central1 and us-west1. This combination will trigger an error.
       
      repeated string allowed_locations = 1;
      Specified by:
      getAllowedLocationsCount in interface AllocationPolicy.LocationPolicyOrBuilder
      Returns:
      The count of allowedLocations.
    • getAllowedLocations

      public String getAllowedLocations(int index)
       A list of allowed location names represented by internal URLs.
      
       Each location can be a region or a zone.
       Only one region or multiple zones in one region is supported now.
       For example,
       ["regions/us-central1"] allow VMs in any zones in region us-central1.
       ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs
       in zones us-central1-a and us-central1-c.
      
       Mixing locations from different regions would cause errors.
       For example,
       ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b",
       "zones/us-west1-a"] contains locations from two distinct regions:
       us-central1 and us-west1. This combination will trigger an error.
       
      repeated string allowed_locations = 1;
      Specified by:
      getAllowedLocations in interface AllocationPolicy.LocationPolicyOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The allowedLocations at the given index.
    • getAllowedLocationsBytes

      public com.google.protobuf.ByteString getAllowedLocationsBytes(int index)
       A list of allowed location names represented by internal URLs.
      
       Each location can be a region or a zone.
       Only one region or multiple zones in one region is supported now.
       For example,
       ["regions/us-central1"] allow VMs in any zones in region us-central1.
       ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs
       in zones us-central1-a and us-central1-c.
      
       Mixing locations from different regions would cause errors.
       For example,
       ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b",
       "zones/us-west1-a"] contains locations from two distinct regions:
       us-central1 and us-west1. This combination will trigger an error.
       
      repeated string allowed_locations = 1;
      Specified by:
      getAllowedLocationsBytes in interface AllocationPolicy.LocationPolicyOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the allowedLocations at the given index.
    • setAllowedLocations

      public AllocationPolicy.LocationPolicy.Builder setAllowedLocations(int index, String value)
       A list of allowed location names represented by internal URLs.
      
       Each location can be a region or a zone.
       Only one region or multiple zones in one region is supported now.
       For example,
       ["regions/us-central1"] allow VMs in any zones in region us-central1.
       ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs
       in zones us-central1-a and us-central1-c.
      
       Mixing locations from different regions would cause errors.
       For example,
       ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b",
       "zones/us-west1-a"] contains locations from two distinct regions:
       us-central1 and us-west1. This combination will trigger an error.
       
      repeated string allowed_locations = 1;
      Parameters:
      index - The index to set the value at.
      value - The allowedLocations to set.
      Returns:
      This builder for chaining.
    • addAllowedLocations

      public AllocationPolicy.LocationPolicy.Builder addAllowedLocations(String value)
       A list of allowed location names represented by internal URLs.
      
       Each location can be a region or a zone.
       Only one region or multiple zones in one region is supported now.
       For example,
       ["regions/us-central1"] allow VMs in any zones in region us-central1.
       ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs
       in zones us-central1-a and us-central1-c.
      
       Mixing locations from different regions would cause errors.
       For example,
       ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b",
       "zones/us-west1-a"] contains locations from two distinct regions:
       us-central1 and us-west1. This combination will trigger an error.
       
      repeated string allowed_locations = 1;
      Parameters:
      value - The allowedLocations to add.
      Returns:
      This builder for chaining.
    • addAllAllowedLocations

      public AllocationPolicy.LocationPolicy.Builder addAllAllowedLocations(Iterable<String> values)
       A list of allowed location names represented by internal URLs.
      
       Each location can be a region or a zone.
       Only one region or multiple zones in one region is supported now.
       For example,
       ["regions/us-central1"] allow VMs in any zones in region us-central1.
       ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs
       in zones us-central1-a and us-central1-c.
      
       Mixing locations from different regions would cause errors.
       For example,
       ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b",
       "zones/us-west1-a"] contains locations from two distinct regions:
       us-central1 and us-west1. This combination will trigger an error.
       
      repeated string allowed_locations = 1;
      Parameters:
      values - The allowedLocations to add.
      Returns:
      This builder for chaining.
    • clearAllowedLocations

      public AllocationPolicy.LocationPolicy.Builder clearAllowedLocations()
       A list of allowed location names represented by internal URLs.
      
       Each location can be a region or a zone.
       Only one region or multiple zones in one region is supported now.
       For example,
       ["regions/us-central1"] allow VMs in any zones in region us-central1.
       ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs
       in zones us-central1-a and us-central1-c.
      
       Mixing locations from different regions would cause errors.
       For example,
       ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b",
       "zones/us-west1-a"] contains locations from two distinct regions:
       us-central1 and us-west1. This combination will trigger an error.
       
      repeated string allowed_locations = 1;
      Returns:
      This builder for chaining.
    • addAllowedLocationsBytes

      public AllocationPolicy.LocationPolicy.Builder addAllowedLocationsBytes(com.google.protobuf.ByteString value)
       A list of allowed location names represented by internal URLs.
      
       Each location can be a region or a zone.
       Only one region or multiple zones in one region is supported now.
       For example,
       ["regions/us-central1"] allow VMs in any zones in region us-central1.
       ["zones/us-central1-a", "zones/us-central1-c"] only allow VMs
       in zones us-central1-a and us-central1-c.
      
       Mixing locations from different regions would cause errors.
       For example,
       ["regions/us-central1", "zones/us-central1-a", "zones/us-central1-b",
       "zones/us-west1-a"] contains locations from two distinct regions:
       us-central1 and us-west1. This combination will trigger an error.
       
      repeated string allowed_locations = 1;
      Parameters:
      value - The bytes of the allowedLocations to add.
      Returns:
      This builder for chaining.
    • getDeniedLocationsList

      public com.google.protobuf.ProtocolStringList getDeniedLocationsList()
       A list of denied location names.
      
       Not yet implemented.
       
      repeated string denied_locations = 2;
      Specified by:
      getDeniedLocationsList in interface AllocationPolicy.LocationPolicyOrBuilder
      Returns:
      A list containing the deniedLocations.
    • getDeniedLocationsCount

      public int getDeniedLocationsCount()
       A list of denied location names.
      
       Not yet implemented.
       
      repeated string denied_locations = 2;
      Specified by:
      getDeniedLocationsCount in interface AllocationPolicy.LocationPolicyOrBuilder
      Returns:
      The count of deniedLocations.
    • getDeniedLocations

      public String getDeniedLocations(int index)
       A list of denied location names.
      
       Not yet implemented.
       
      repeated string denied_locations = 2;
      Specified by:
      getDeniedLocations in interface AllocationPolicy.LocationPolicyOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The deniedLocations at the given index.
    • getDeniedLocationsBytes

      public com.google.protobuf.ByteString getDeniedLocationsBytes(int index)
       A list of denied location names.
      
       Not yet implemented.
       
      repeated string denied_locations = 2;
      Specified by:
      getDeniedLocationsBytes in interface AllocationPolicy.LocationPolicyOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the deniedLocations at the given index.
    • setDeniedLocations

      public AllocationPolicy.LocationPolicy.Builder setDeniedLocations(int index, String value)
       A list of denied location names.
      
       Not yet implemented.
       
      repeated string denied_locations = 2;
      Parameters:
      index - The index to set the value at.
      value - The deniedLocations to set.
      Returns:
      This builder for chaining.
    • addDeniedLocations

      public AllocationPolicy.LocationPolicy.Builder addDeniedLocations(String value)
       A list of denied location names.
      
       Not yet implemented.
       
      repeated string denied_locations = 2;
      Parameters:
      value - The deniedLocations to add.
      Returns:
      This builder for chaining.
    • addAllDeniedLocations

      public AllocationPolicy.LocationPolicy.Builder addAllDeniedLocations(Iterable<String> values)
       A list of denied location names.
      
       Not yet implemented.
       
      repeated string denied_locations = 2;
      Parameters:
      values - The deniedLocations to add.
      Returns:
      This builder for chaining.
    • clearDeniedLocations

      public AllocationPolicy.LocationPolicy.Builder clearDeniedLocations()
       A list of denied location names.
      
       Not yet implemented.
       
      repeated string denied_locations = 2;
      Returns:
      This builder for chaining.
    • addDeniedLocationsBytes

      public AllocationPolicy.LocationPolicy.Builder addDeniedLocationsBytes(com.google.protobuf.ByteString value)
       A list of denied location names.
      
       Not yet implemented.
       
      repeated string denied_locations = 2;
      Parameters:
      value - The bytes of the deniedLocations to add.
      Returns:
      This builder for chaining.