Class PricePhase.Builder

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

public static final class PricePhase.Builder extends com.google.protobuf.GeneratedMessage.Builder<PricePhase.Builder> implements PricePhaseOrBuilder
 Specifies the price by the duration of months.
 For example, a 20% discount for the first six months, then a 10% discount
 starting on the seventh month.
 
Protobuf type google.cloud.channel.v1.PricePhase
  • 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<PricePhase.Builder>
    • clear

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

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

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

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

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

      public PricePhase.Builder mergeFrom(PricePhase other)
    • isInitialized

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

      public PricePhase.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<PricePhase.Builder>
      Throws:
      IOException
    • getPeriodTypeValue

      public int getPeriodTypeValue()
       Defines the phase period type.
       
      .google.cloud.channel.v1.PeriodType period_type = 1;
      Specified by:
      getPeriodTypeValue in interface PricePhaseOrBuilder
      Returns:
      The enum numeric value on the wire for periodType.
    • setPeriodTypeValue

      public PricePhase.Builder setPeriodTypeValue(int value)
       Defines the phase period type.
       
      .google.cloud.channel.v1.PeriodType period_type = 1;
      Parameters:
      value - The enum numeric value on the wire for periodType to set.
      Returns:
      This builder for chaining.
    • getPeriodType

      public PeriodType getPeriodType()
       Defines the phase period type.
       
      .google.cloud.channel.v1.PeriodType period_type = 1;
      Specified by:
      getPeriodType in interface PricePhaseOrBuilder
      Returns:
      The periodType.
    • setPeriodType

      public PricePhase.Builder setPeriodType(PeriodType value)
       Defines the phase period type.
       
      .google.cloud.channel.v1.PeriodType period_type = 1;
      Parameters:
      value - The periodType to set.
      Returns:
      This builder for chaining.
    • clearPeriodType

      public PricePhase.Builder clearPeriodType()
       Defines the phase period type.
       
      .google.cloud.channel.v1.PeriodType period_type = 1;
      Returns:
      This builder for chaining.
    • getFirstPeriod

      public int getFirstPeriod()
       Defines first period for the phase.
       
      int32 first_period = 2;
      Specified by:
      getFirstPeriod in interface PricePhaseOrBuilder
      Returns:
      The firstPeriod.
    • setFirstPeriod

      public PricePhase.Builder setFirstPeriod(int value)
       Defines first period for the phase.
       
      int32 first_period = 2;
      Parameters:
      value - The firstPeriod to set.
      Returns:
      This builder for chaining.
    • clearFirstPeriod

      public PricePhase.Builder clearFirstPeriod()
       Defines first period for the phase.
       
      int32 first_period = 2;
      Returns:
      This builder for chaining.
    • getLastPeriod

      public int getLastPeriod()
       Defines first period for the phase.
       
      int32 last_period = 3;
      Specified by:
      getLastPeriod in interface PricePhaseOrBuilder
      Returns:
      The lastPeriod.
    • setLastPeriod

      public PricePhase.Builder setLastPeriod(int value)
       Defines first period for the phase.
       
      int32 last_period = 3;
      Parameters:
      value - The lastPeriod to set.
      Returns:
      This builder for chaining.
    • clearLastPeriod

      public PricePhase.Builder clearLastPeriod()
       Defines first period for the phase.
       
      int32 last_period = 3;
      Returns:
      This builder for chaining.
    • hasPrice

      public boolean hasPrice()
       Price of the phase. Present if there are no price tiers.
       
      .google.cloud.channel.v1.Price price = 4;
      Specified by:
      hasPrice in interface PricePhaseOrBuilder
      Returns:
      Whether the price field is set.
    • getPrice

      public Price getPrice()
       Price of the phase. Present if there are no price tiers.
       
      .google.cloud.channel.v1.Price price = 4;
      Specified by:
      getPrice in interface PricePhaseOrBuilder
      Returns:
      The price.
    • setPrice

      public PricePhase.Builder setPrice(Price value)
       Price of the phase. Present if there are no price tiers.
       
      .google.cloud.channel.v1.Price price = 4;
    • setPrice

      public PricePhase.Builder setPrice(Price.Builder builderForValue)
       Price of the phase. Present if there are no price tiers.
       
      .google.cloud.channel.v1.Price price = 4;
    • mergePrice

      public PricePhase.Builder mergePrice(Price value)
       Price of the phase. Present if there are no price tiers.
       
      .google.cloud.channel.v1.Price price = 4;
    • clearPrice

      public PricePhase.Builder clearPrice()
       Price of the phase. Present if there are no price tiers.
       
      .google.cloud.channel.v1.Price price = 4;
    • getPriceBuilder

      public Price.Builder getPriceBuilder()
       Price of the phase. Present if there are no price tiers.
       
      .google.cloud.channel.v1.Price price = 4;
    • getPriceOrBuilder

      public PriceOrBuilder getPriceOrBuilder()
       Price of the phase. Present if there are no price tiers.
       
      .google.cloud.channel.v1.Price price = 4;
      Specified by:
      getPriceOrBuilder in interface PricePhaseOrBuilder
    • getPriceTiersList

      public List<PriceTier> getPriceTiersList()
       Price by the resource tiers.
       
      repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;
      Specified by:
      getPriceTiersList in interface PricePhaseOrBuilder
    • getPriceTiersCount

      public int getPriceTiersCount()
       Price by the resource tiers.
       
      repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;
      Specified by:
      getPriceTiersCount in interface PricePhaseOrBuilder
    • getPriceTiers

      public PriceTier getPriceTiers(int index)
       Price by the resource tiers.
       
      repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;
      Specified by:
      getPriceTiers in interface PricePhaseOrBuilder
    • setPriceTiers

      public PricePhase.Builder setPriceTiers(int index, PriceTier value)
       Price by the resource tiers.
       
      repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;
    • setPriceTiers

      public PricePhase.Builder setPriceTiers(int index, PriceTier.Builder builderForValue)
       Price by the resource tiers.
       
      repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;
    • addPriceTiers

      public PricePhase.Builder addPriceTiers(PriceTier value)
       Price by the resource tiers.
       
      repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;
    • addPriceTiers

      public PricePhase.Builder addPriceTiers(int index, PriceTier value)
       Price by the resource tiers.
       
      repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;
    • addPriceTiers

      public PricePhase.Builder addPriceTiers(PriceTier.Builder builderForValue)
       Price by the resource tiers.
       
      repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;
    • addPriceTiers

      public PricePhase.Builder addPriceTiers(int index, PriceTier.Builder builderForValue)
       Price by the resource tiers.
       
      repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;
    • addAllPriceTiers

      public PricePhase.Builder addAllPriceTiers(Iterable<? extends PriceTier> values)
       Price by the resource tiers.
       
      repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;
    • clearPriceTiers

      public PricePhase.Builder clearPriceTiers()
       Price by the resource tiers.
       
      repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;
    • removePriceTiers

      public PricePhase.Builder removePriceTiers(int index)
       Price by the resource tiers.
       
      repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;
    • getPriceTiersBuilder

      public PriceTier.Builder getPriceTiersBuilder(int index)
       Price by the resource tiers.
       
      repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;
    • getPriceTiersOrBuilder

      public PriceTierOrBuilder getPriceTiersOrBuilder(int index)
       Price by the resource tiers.
       
      repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;
      Specified by:
      getPriceTiersOrBuilder in interface PricePhaseOrBuilder
    • getPriceTiersOrBuilderList

      public List<? extends PriceTierOrBuilder> getPriceTiersOrBuilderList()
       Price by the resource tiers.
       
      repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;
      Specified by:
      getPriceTiersOrBuilderList in interface PricePhaseOrBuilder
    • addPriceTiersBuilder

      public PriceTier.Builder addPriceTiersBuilder()
       Price by the resource tiers.
       
      repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;
    • addPriceTiersBuilder

      public PriceTier.Builder addPriceTiersBuilder(int index)
       Price by the resource tiers.
       
      repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;
    • getPriceTiersBuilderList

      public List<PriceTier.Builder> getPriceTiersBuilderList()
       Price by the resource tiers.
       
      repeated .google.cloud.channel.v1.PriceTier price_tiers = 5;