Class PricingExpression.TierRate.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<PricingExpression.TierRate.Builder>
com.google.cloud.billing.v1.PricingExpression.TierRate.Builder
All Implemented Interfaces:
PricingExpression.TierRateOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
PricingExpression.TierRate

public static final class PricingExpression.TierRate.Builder extends com.google.protobuf.GeneratedMessage.Builder<PricingExpression.TierRate.Builder> implements PricingExpression.TierRateOrBuilder
 The price rate indicating starting usage and its corresponding price.
 
Protobuf type google.cloud.billing.v1.PricingExpression.TierRate
  • 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<PricingExpression.TierRate.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<PricingExpression.TierRate.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<PricingExpression.TierRate.Builder>
    • getDefaultInstanceForType

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

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

      public PricingExpression.TierRate.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<PricingExpression.TierRate.Builder>
      Throws:
      IOException
    • getStartUsageAmount

      public double getStartUsageAmount()
       Usage is priced at this rate only after this amount.
       Example: start_usage_amount of 10 indicates that the usage will be priced
       at the unit_price after the first 10 usage_units.
       
      double start_usage_amount = 1;
      Specified by:
      getStartUsageAmount in interface PricingExpression.TierRateOrBuilder
      Returns:
      The startUsageAmount.
    • setStartUsageAmount

      public PricingExpression.TierRate.Builder setStartUsageAmount(double value)
       Usage is priced at this rate only after this amount.
       Example: start_usage_amount of 10 indicates that the usage will be priced
       at the unit_price after the first 10 usage_units.
       
      double start_usage_amount = 1;
      Parameters:
      value - The startUsageAmount to set.
      Returns:
      This builder for chaining.
    • clearStartUsageAmount

      public PricingExpression.TierRate.Builder clearStartUsageAmount()
       Usage is priced at this rate only after this amount.
       Example: start_usage_amount of 10 indicates that the usage will be priced
       at the unit_price after the first 10 usage_units.
       
      double start_usage_amount = 1;
      Returns:
      This builder for chaining.
    • hasUnitPrice

      public boolean hasUnitPrice()
       The price per unit of usage.
       Example: unit_price of amount $10 indicates that each unit will cost $10.
       
      .google.type.Money unit_price = 2;
      Specified by:
      hasUnitPrice in interface PricingExpression.TierRateOrBuilder
      Returns:
      Whether the unitPrice field is set.
    • getUnitPrice

      public Money getUnitPrice()
       The price per unit of usage.
       Example: unit_price of amount $10 indicates that each unit will cost $10.
       
      .google.type.Money unit_price = 2;
      Specified by:
      getUnitPrice in interface PricingExpression.TierRateOrBuilder
      Returns:
      The unitPrice.
    • setUnitPrice

      public PricingExpression.TierRate.Builder setUnitPrice(Money value)
       The price per unit of usage.
       Example: unit_price of amount $10 indicates that each unit will cost $10.
       
      .google.type.Money unit_price = 2;
    • setUnitPrice

      public PricingExpression.TierRate.Builder setUnitPrice(Money.Builder builderForValue)
       The price per unit of usage.
       Example: unit_price of amount $10 indicates that each unit will cost $10.
       
      .google.type.Money unit_price = 2;
    • mergeUnitPrice

      public PricingExpression.TierRate.Builder mergeUnitPrice(Money value)
       The price per unit of usage.
       Example: unit_price of amount $10 indicates that each unit will cost $10.
       
      .google.type.Money unit_price = 2;
    • clearUnitPrice

      public PricingExpression.TierRate.Builder clearUnitPrice()
       The price per unit of usage.
       Example: unit_price of amount $10 indicates that each unit will cost $10.
       
      .google.type.Money unit_price = 2;
    • getUnitPriceBuilder

      public Money.Builder getUnitPriceBuilder()
       The price per unit of usage.
       Example: unit_price of amount $10 indicates that each unit will cost $10.
       
      .google.type.Money unit_price = 2;
    • getUnitPriceOrBuilder

      public MoneyOrBuilder getUnitPriceOrBuilder()
       The price per unit of usage.
       Example: unit_price of amount $10 indicates that each unit will cost $10.
       
      .google.type.Money unit_price = 2;
      Specified by:
      getUnitPriceOrBuilder in interface PricingExpression.TierRateOrBuilder