Class ResourceAllowance.Builder

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

public static final class ResourceAllowance.Builder extends com.google.protobuf.GeneratedMessage.Builder<ResourceAllowance.Builder> implements ResourceAllowanceOrBuilder
 The Resource Allowance description for Cloud Batch.
 Only one Resource Allowance is supported now under a specific location and
 project.
 
Protobuf type google.cloud.batch.v1alpha.ResourceAllowance
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<ResourceAllowance.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<ResourceAllowance.Builder>
    • internalGetFieldAccessorTable

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

      public ResourceAllowance.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<ResourceAllowance.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<ResourceAllowance.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public ResourceAllowance.Builder mergeFrom(ResourceAllowance other)
    • isInitialized

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

      public ResourceAllowance.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<ResourceAllowance.Builder>
      Throws:
      IOException
    • getResourceAllowanceCase

      public ResourceAllowance.ResourceAllowanceCase getResourceAllowanceCase()
      Specified by:
      getResourceAllowanceCase in interface ResourceAllowanceOrBuilder
    • clearResourceAllowance

      public ResourceAllowance.Builder clearResourceAllowance()
    • hasUsageResourceAllowance

      public boolean hasUsageResourceAllowance()
       The detail of usage resource allowance.
       
      .google.cloud.batch.v1alpha.UsageResourceAllowance usage_resource_allowance = 4;
      Specified by:
      hasUsageResourceAllowance in interface ResourceAllowanceOrBuilder
      Returns:
      Whether the usageResourceAllowance field is set.
    • getUsageResourceAllowance

      public UsageResourceAllowance getUsageResourceAllowance()
       The detail of usage resource allowance.
       
      .google.cloud.batch.v1alpha.UsageResourceAllowance usage_resource_allowance = 4;
      Specified by:
      getUsageResourceAllowance in interface ResourceAllowanceOrBuilder
      Returns:
      The usageResourceAllowance.
    • setUsageResourceAllowance

      public ResourceAllowance.Builder setUsageResourceAllowance(UsageResourceAllowance value)
       The detail of usage resource allowance.
       
      .google.cloud.batch.v1alpha.UsageResourceAllowance usage_resource_allowance = 4;
    • setUsageResourceAllowance

      public ResourceAllowance.Builder setUsageResourceAllowance(UsageResourceAllowance.Builder builderForValue)
       The detail of usage resource allowance.
       
      .google.cloud.batch.v1alpha.UsageResourceAllowance usage_resource_allowance = 4;
    • mergeUsageResourceAllowance

      public ResourceAllowance.Builder mergeUsageResourceAllowance(UsageResourceAllowance value)
       The detail of usage resource allowance.
       
      .google.cloud.batch.v1alpha.UsageResourceAllowance usage_resource_allowance = 4;
    • clearUsageResourceAllowance

      public ResourceAllowance.Builder clearUsageResourceAllowance()
       The detail of usage resource allowance.
       
      .google.cloud.batch.v1alpha.UsageResourceAllowance usage_resource_allowance = 4;
    • getUsageResourceAllowanceBuilder

      public UsageResourceAllowance.Builder getUsageResourceAllowanceBuilder()
       The detail of usage resource allowance.
       
      .google.cloud.batch.v1alpha.UsageResourceAllowance usage_resource_allowance = 4;
    • getUsageResourceAllowanceOrBuilder

      public UsageResourceAllowanceOrBuilder getUsageResourceAllowanceOrBuilder()
       The detail of usage resource allowance.
       
      .google.cloud.batch.v1alpha.UsageResourceAllowance usage_resource_allowance = 4;
      Specified by:
      getUsageResourceAllowanceOrBuilder in interface ResourceAllowanceOrBuilder
    • getName

      public String getName()
       Identifier. ResourceAllowance name.
       For example:
       "projects/123456/locations/us-central1/resourceAllowances/resource-allowance-1".
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getName in interface ResourceAllowanceOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Identifier. ResourceAllowance name.
       For example:
       "projects/123456/locations/us-central1/resourceAllowances/resource-allowance-1".
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getNameBytes in interface ResourceAllowanceOrBuilder
      Returns:
      The bytes for name.
    • setName

      public ResourceAllowance.Builder setName(String value)
       Identifier. ResourceAllowance name.
       For example:
       "projects/123456/locations/us-central1/resourceAllowances/resource-allowance-1".
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public ResourceAllowance.Builder clearName()
       Identifier. ResourceAllowance name.
       For example:
       "projects/123456/locations/us-central1/resourceAllowances/resource-allowance-1".
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Returns:
      This builder for chaining.
    • setNameBytes

      public ResourceAllowance.Builder setNameBytes(com.google.protobuf.ByteString value)
       Identifier. ResourceAllowance name.
       For example:
       "projects/123456/locations/us-central1/resourceAllowances/resource-allowance-1".
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getUid

      public String getUid()
       Output only. A system generated unique ID (in UUID4 format) for the
       ResourceAllowance.
       
      string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
      Specified by:
      getUid in interface ResourceAllowanceOrBuilder
      Returns:
      The uid.
    • getUidBytes

      public com.google.protobuf.ByteString getUidBytes()
       Output only. A system generated unique ID (in UUID4 format) for the
       ResourceAllowance.
       
      string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
      Specified by:
      getUidBytes in interface ResourceAllowanceOrBuilder
      Returns:
      The bytes for uid.
    • setUid

      public ResourceAllowance.Builder setUid(String value)
       Output only. A system generated unique ID (in UUID4 format) for the
       ResourceAllowance.
       
      string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
      Parameters:
      value - The uid to set.
      Returns:
      This builder for chaining.
    • clearUid

      public ResourceAllowance.Builder clearUid()
       Output only. A system generated unique ID (in UUID4 format) for the
       ResourceAllowance.
       
      string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
      Returns:
      This builder for chaining.
    • setUidBytes

      public ResourceAllowance.Builder setUidBytes(com.google.protobuf.ByteString value)
       Output only. A system generated unique ID (in UUID4 format) for the
       ResourceAllowance.
       
      string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { ... }
      Parameters:
      value - The bytes for uid to set.
      Returns:
      This builder for chaining.
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. Time when the ResourceAllowance was created.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface ResourceAllowanceOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. Time when the ResourceAllowance was created.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface ResourceAllowanceOrBuilder
      Returns:
      The createTime.
    • setCreateTime

      public ResourceAllowance.Builder setCreateTime(com.google.protobuf.Timestamp value)
       Output only. Time when the ResourceAllowance was created.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCreateTime

      public ResourceAllowance.Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. Time when the ResourceAllowance was created.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeCreateTime

      public ResourceAllowance.Builder mergeCreateTime(com.google.protobuf.Timestamp value)
       Output only. Time when the ResourceAllowance was created.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCreateTime

      public ResourceAllowance.Builder clearCreateTime()
       Output only. Time when the ResourceAllowance was created.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
       Output only. Time when the ResourceAllowance was created.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. Time when the ResourceAllowance was created.
       
      .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface ResourceAllowanceOrBuilder
    • getLabelsCount

      public int getLabelsCount()
      Description copied from interface: ResourceAllowanceOrBuilder
       Optional. Labels are attributes that can be set and used by both the
       user and by Batch. Labels must meet the following constraints:
      
       * Keys and values can contain only lowercase letters, numeric characters,
       underscores, and dashes.
       * All characters must use UTF-8 encoding, and international characters are
       allowed.
       * Keys must start with a lowercase letter or international character.
       * Each resource is limited to a maximum of 64 labels.
      
       Both keys and values are additionally constrained to be <= 128 bytes.
       
      map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsCount in interface ResourceAllowanceOrBuilder
    • containsLabels

      public boolean containsLabels(String key)
       Optional. Labels are attributes that can be set and used by both the
       user and by Batch. Labels must meet the following constraints:
      
       * Keys and values can contain only lowercase letters, numeric characters,
       underscores, and dashes.
       * All characters must use UTF-8 encoding, and international characters are
       allowed.
       * Keys must start with a lowercase letter or international character.
       * Each resource is limited to a maximum of 64 labels.
      
       Both keys and values are additionally constrained to be <= 128 bytes.
       
      map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      containsLabels in interface ResourceAllowanceOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface ResourceAllowanceOrBuilder
    • getLabelsMap

      public Map<String,String> getLabelsMap()
       Optional. Labels are attributes that can be set and used by both the
       user and by Batch. Labels must meet the following constraints:
      
       * Keys and values can contain only lowercase letters, numeric characters,
       underscores, and dashes.
       * All characters must use UTF-8 encoding, and international characters are
       allowed.
       * Keys must start with a lowercase letter or international character.
       * Each resource is limited to a maximum of 64 labels.
      
       Both keys and values are additionally constrained to be <= 128 bytes.
       
      map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsMap in interface ResourceAllowanceOrBuilder
    • getLabelsOrDefault

      public String getLabelsOrDefault(String key, String defaultValue)
       Optional. Labels are attributes that can be set and used by both the
       user and by Batch. Labels must meet the following constraints:
      
       * Keys and values can contain only lowercase letters, numeric characters,
       underscores, and dashes.
       * All characters must use UTF-8 encoding, and international characters are
       allowed.
       * Keys must start with a lowercase letter or international character.
       * Each resource is limited to a maximum of 64 labels.
      
       Both keys and values are additionally constrained to be <= 128 bytes.
       
      map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsOrDefault in interface ResourceAllowanceOrBuilder
    • getLabelsOrThrow

      public String getLabelsOrThrow(String key)
       Optional. Labels are attributes that can be set and used by both the
       user and by Batch. Labels must meet the following constraints:
      
       * Keys and values can contain only lowercase letters, numeric characters,
       underscores, and dashes.
       * All characters must use UTF-8 encoding, and international characters are
       allowed.
       * Keys must start with a lowercase letter or international character.
       * Each resource is limited to a maximum of 64 labels.
      
       Both keys and values are additionally constrained to be <= 128 bytes.
       
      map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsOrThrow in interface ResourceAllowanceOrBuilder
    • clearLabels

      public ResourceAllowance.Builder clearLabels()
    • removeLabels

      public ResourceAllowance.Builder removeLabels(String key)
       Optional. Labels are attributes that can be set and used by both the
       user and by Batch. Labels must meet the following constraints:
      
       * Keys and values can contain only lowercase letters, numeric characters,
       underscores, and dashes.
       * All characters must use UTF-8 encoding, and international characters are
       allowed.
       * Keys must start with a lowercase letter or international character.
       * Each resource is limited to a maximum of 64 labels.
      
       Both keys and values are additionally constrained to be <= 128 bytes.
       
      map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
    • getMutableLabels

      @Deprecated public Map<String,String> getMutableLabels()
      Deprecated.
      Use alternate mutation accessors instead.
    • putLabels

      public ResourceAllowance.Builder putLabels(String key, String value)
       Optional. Labels are attributes that can be set and used by both the
       user and by Batch. Labels must meet the following constraints:
      
       * Keys and values can contain only lowercase letters, numeric characters,
       underscores, and dashes.
       * All characters must use UTF-8 encoding, and international characters are
       allowed.
       * Keys must start with a lowercase letter or international character.
       * Each resource is limited to a maximum of 64 labels.
      
       Both keys and values are additionally constrained to be <= 128 bytes.
       
      map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
    • putAllLabels

      public ResourceAllowance.Builder putAllLabels(Map<String,String> values)
       Optional. Labels are attributes that can be set and used by both the
       user and by Batch. Labels must meet the following constraints:
      
       * Keys and values can contain only lowercase letters, numeric characters,
       underscores, and dashes.
       * All characters must use UTF-8 encoding, and international characters are
       allowed.
       * Keys must start with a lowercase letter or international character.
       * Each resource is limited to a maximum of 64 labels.
      
       Both keys and values are additionally constrained to be <= 128 bytes.
       
      map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
    • getNotificationsList

      public List<Notification> getNotificationsList()
       Optional. Notification configurations.
       
      repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getNotificationsList in interface ResourceAllowanceOrBuilder
    • getNotificationsCount

      public int getNotificationsCount()
       Optional. Notification configurations.
       
      repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getNotificationsCount in interface ResourceAllowanceOrBuilder
    • getNotifications

      public Notification getNotifications(int index)
       Optional. Notification configurations.
       
      repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getNotifications in interface ResourceAllowanceOrBuilder
    • setNotifications

      public ResourceAllowance.Builder setNotifications(int index, Notification value)
       Optional. Notification configurations.
       
      repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];
    • setNotifications

      public ResourceAllowance.Builder setNotifications(int index, Notification.Builder builderForValue)
       Optional. Notification configurations.
       
      repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addNotifications

      public ResourceAllowance.Builder addNotifications(Notification value)
       Optional. Notification configurations.
       
      repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addNotifications

      public ResourceAllowance.Builder addNotifications(int index, Notification value)
       Optional. Notification configurations.
       
      repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addNotifications

      public ResourceAllowance.Builder addNotifications(Notification.Builder builderForValue)
       Optional. Notification configurations.
       
      repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addNotifications

      public ResourceAllowance.Builder addNotifications(int index, Notification.Builder builderForValue)
       Optional. Notification configurations.
       
      repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addAllNotifications

      public ResourceAllowance.Builder addAllNotifications(Iterable<? extends Notification> values)
       Optional. Notification configurations.
       
      repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];
    • clearNotifications

      public ResourceAllowance.Builder clearNotifications()
       Optional. Notification configurations.
       
      repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];
    • removeNotifications

      public ResourceAllowance.Builder removeNotifications(int index)
       Optional. Notification configurations.
       
      repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];
    • getNotificationsBuilder

      public Notification.Builder getNotificationsBuilder(int index)
       Optional. Notification configurations.
       
      repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];
    • getNotificationsOrBuilder

      public NotificationOrBuilder getNotificationsOrBuilder(int index)
       Optional. Notification configurations.
       
      repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getNotificationsOrBuilder in interface ResourceAllowanceOrBuilder
    • getNotificationsOrBuilderList

      public List<? extends NotificationOrBuilder> getNotificationsOrBuilderList()
       Optional. Notification configurations.
       
      repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getNotificationsOrBuilderList in interface ResourceAllowanceOrBuilder
    • addNotificationsBuilder

      public Notification.Builder addNotificationsBuilder()
       Optional. Notification configurations.
       
      repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addNotificationsBuilder

      public Notification.Builder addNotificationsBuilder(int index)
       Optional. Notification configurations.
       
      repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];
    • getNotificationsBuilderList

      public List<Notification.Builder> getNotificationsBuilderList()
       Optional. Notification configurations.
       
      repeated .google.cloud.batch.v1alpha.Notification notifications = 6 [(.google.api.field_behavior) = OPTIONAL];