Class 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.GeneratedMessageV3.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 Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public PricePhase.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<PricePhase.Builder>
      • setField

        public PricePhase.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                           Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<PricePhase.Builder>
      • clearField

        public PricePhase.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<PricePhase.Builder>
      • clearOneof

        public PricePhase.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<PricePhase.Builder>
      • setRepeatedField

        public PricePhase.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                   int index,
                                                   Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<PricePhase.Builder>
      • addRepeatedField

        public PricePhase.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                   Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<PricePhase.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>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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;
      • 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;
      • 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;
      • setUnknownFields

        public final PricePhase.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<PricePhase.Builder>
      • mergeUnknownFields

        public final PricePhase.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<PricePhase.Builder>