Class UsageResourceAllowanceSpec.Limit.Builder

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

public static final class UsageResourceAllowanceSpec.Limit.Builder extends com.google.protobuf.GeneratedMessage.Builder<UsageResourceAllowanceSpec.Limit.Builder> implements UsageResourceAllowanceSpec.LimitOrBuilder
 UsageResourceAllowance limitation.
 
Protobuf type google.cloud.batch.v1alpha.UsageResourceAllowanceSpec.Limit
  • 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<UsageResourceAllowanceSpec.Limit.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<UsageResourceAllowanceSpec.Limit.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<UsageResourceAllowanceSpec.Limit.Builder>
    • getDefaultInstanceForType

      public UsageResourceAllowanceSpec.Limit 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 UsageResourceAllowanceSpec.Limit buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

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

      public UsageResourceAllowanceSpec.Limit.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<UsageResourceAllowanceSpec.Limit.Builder>
      Throws:
      IOException
    • getDurationCase

      Specified by:
      getDurationCase in interface UsageResourceAllowanceSpec.LimitOrBuilder
    • clearDuration

    • hasCalendarPeriod

      public boolean hasCalendarPeriod()
       Optional. A CalendarPeriod represents the abstract concept of a time
       period that has a canonical start.
       
      .google.cloud.batch.v1alpha.CalendarPeriod calendar_period = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasCalendarPeriod in interface UsageResourceAllowanceSpec.LimitOrBuilder
      Returns:
      Whether the calendarPeriod field is set.
    • getCalendarPeriodValue

      public int getCalendarPeriodValue()
       Optional. A CalendarPeriod represents the abstract concept of a time
       period that has a canonical start.
       
      .google.cloud.batch.v1alpha.CalendarPeriod calendar_period = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCalendarPeriodValue in interface UsageResourceAllowanceSpec.LimitOrBuilder
      Returns:
      The enum numeric value on the wire for calendarPeriod.
    • setCalendarPeriodValue

      public UsageResourceAllowanceSpec.Limit.Builder setCalendarPeriodValue(int value)
       Optional. A CalendarPeriod represents the abstract concept of a time
       period that has a canonical start.
       
      .google.cloud.batch.v1alpha.CalendarPeriod calendar_period = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The enum numeric value on the wire for calendarPeriod to set.
      Returns:
      This builder for chaining.
    • getCalendarPeriod

      public CalendarPeriod getCalendarPeriod()
       Optional. A CalendarPeriod represents the abstract concept of a time
       period that has a canonical start.
       
      .google.cloud.batch.v1alpha.CalendarPeriod calendar_period = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCalendarPeriod in interface UsageResourceAllowanceSpec.LimitOrBuilder
      Returns:
      The calendarPeriod.
    • setCalendarPeriod

      public UsageResourceAllowanceSpec.Limit.Builder setCalendarPeriod(CalendarPeriod value)
       Optional. A CalendarPeriod represents the abstract concept of a time
       period that has a canonical start.
       
      .google.cloud.batch.v1alpha.CalendarPeriod calendar_period = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The calendarPeriod to set.
      Returns:
      This builder for chaining.
    • clearCalendarPeriod

      public UsageResourceAllowanceSpec.Limit.Builder clearCalendarPeriod()
       Optional. A CalendarPeriod represents the abstract concept of a time
       period that has a canonical start.
       
      .google.cloud.batch.v1alpha.CalendarPeriod calendar_period = 1 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • hasLimit

      public boolean hasLimit()
       Required. Limit value of a UsageResourceAllowance within its one
       duration.
      
       Limit cannot be a negative value. Default is 0.
       For example, you can set `limit` as 10000.0 with duration of the current
       month by setting `calendar_period` field as monthly. That means in your
       current month, 10000.0 is the core hour limitation that your resources
       are allowed to consume.
       
      optional double limit = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasLimit in interface UsageResourceAllowanceSpec.LimitOrBuilder
      Returns:
      Whether the limit field is set.
    • getLimit

      public double getLimit()
       Required. Limit value of a UsageResourceAllowance within its one
       duration.
      
       Limit cannot be a negative value. Default is 0.
       For example, you can set `limit` as 10000.0 with duration of the current
       month by setting `calendar_period` field as monthly. That means in your
       current month, 10000.0 is the core hour limitation that your resources
       are allowed to consume.
       
      optional double limit = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getLimit in interface UsageResourceAllowanceSpec.LimitOrBuilder
      Returns:
      The limit.
    • setLimit

      public UsageResourceAllowanceSpec.Limit.Builder setLimit(double value)
       Required. Limit value of a UsageResourceAllowance within its one
       duration.
      
       Limit cannot be a negative value. Default is 0.
       For example, you can set `limit` as 10000.0 with duration of the current
       month by setting `calendar_period` field as monthly. That means in your
       current month, 10000.0 is the core hour limitation that your resources
       are allowed to consume.
       
      optional double limit = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The limit to set.
      Returns:
      This builder for chaining.
    • clearLimit

       Required. Limit value of a UsageResourceAllowance within its one
       duration.
      
       Limit cannot be a negative value. Default is 0.
       For example, you can set `limit` as 10000.0 with duration of the current
       month by setting `calendar_period` field as monthly. That means in your
       current month, 10000.0 is the core hour limitation that your resources
       are allowed to consume.
       
      optional double limit = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.