Class PriceTier.Builder

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

public static final class PriceTier.Builder extends com.google.protobuf.GeneratedMessage.Builder<PriceTier.Builder> implements PriceTierOrBuilder
 Defines price at resource tier level.
 For example, an offer with following definition :

 * Tier 1: Provide 25% discount for all seats between 1 and 25.
 * Tier 2: Provide 10% discount for all seats between 26 and 100.
 * Tier 3: Provide flat 15% discount for all seats above 100.

 Each of these tiers is represented as a PriceTier.
 
Protobuf type google.cloud.channel.v1.PriceTier
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    First resource for which the tier price applies.
    Last resource for which the tier price applies.
    Price of the tier.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    int
    First resource for which the tier price applies.
    int
    Last resource for which the tier price applies.
    Price of the tier.
    Price of the tier.
    Price of the tier.
    boolean
    Price of the tier.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    Price of the tier.
    setFirstResource(int value)
    First resource for which the tier price applies.
    setLastResource(int value)
    Last resource for which the tier price applies.
    setPrice(Price value)
    Price of the tier.
    setPrice(Price.Builder builderForValue)
    Price of the tier.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • 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<PriceTier.Builder>
    • clear

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

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

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

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

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

      public PriceTier.Builder mergeFrom(PriceTier other)
    • isInitialized

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

      public PriceTier.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<PriceTier.Builder>
      Throws:
      IOException
    • getFirstResource

      public int getFirstResource()
       First resource for which the tier price applies.
       
      int32 first_resource = 1;
      Specified by:
      getFirstResource in interface PriceTierOrBuilder
      Returns:
      The firstResource.
    • setFirstResource

      public PriceTier.Builder setFirstResource(int value)
       First resource for which the tier price applies.
       
      int32 first_resource = 1;
      Parameters:
      value - The firstResource to set.
      Returns:
      This builder for chaining.
    • clearFirstResource

      public PriceTier.Builder clearFirstResource()
       First resource for which the tier price applies.
       
      int32 first_resource = 1;
      Returns:
      This builder for chaining.
    • getLastResource

      public int getLastResource()
       Last resource for which the tier price applies.
       
      int32 last_resource = 2;
      Specified by:
      getLastResource in interface PriceTierOrBuilder
      Returns:
      The lastResource.
    • setLastResource

      public PriceTier.Builder setLastResource(int value)
       Last resource for which the tier price applies.
       
      int32 last_resource = 2;
      Parameters:
      value - The lastResource to set.
      Returns:
      This builder for chaining.
    • clearLastResource

      public PriceTier.Builder clearLastResource()
       Last resource for which the tier price applies.
       
      int32 last_resource = 2;
      Returns:
      This builder for chaining.
    • hasPrice

      public boolean hasPrice()
       Price of the tier.
       
      .google.cloud.channel.v1.Price price = 3;
      Specified by:
      hasPrice in interface PriceTierOrBuilder
      Returns:
      Whether the price field is set.
    • getPrice

      public Price getPrice()
       Price of the tier.
       
      .google.cloud.channel.v1.Price price = 3;
      Specified by:
      getPrice in interface PriceTierOrBuilder
      Returns:
      The price.
    • setPrice

      public PriceTier.Builder setPrice(Price value)
       Price of the tier.
       
      .google.cloud.channel.v1.Price price = 3;
    • setPrice

      public PriceTier.Builder setPrice(Price.Builder builderForValue)
       Price of the tier.
       
      .google.cloud.channel.v1.Price price = 3;
    • mergePrice

      public PriceTier.Builder mergePrice(Price value)
       Price of the tier.
       
      .google.cloud.channel.v1.Price price = 3;
    • clearPrice

      public PriceTier.Builder clearPrice()
       Price of the tier.
       
      .google.cloud.channel.v1.Price price = 3;
    • getPriceBuilder

      public Price.Builder getPriceBuilder()
       Price of the tier.
       
      .google.cloud.channel.v1.Price price = 3;
    • getPriceOrBuilder

      public PriceOrBuilder getPriceOrBuilder()
       Price of the tier.
       
      .google.cloud.channel.v1.Price price = 3;
      Specified by:
      getPriceOrBuilder in interface PriceTierOrBuilder