Class Price.Builder

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

public static final class Price.Builder extends com.google.protobuf.GeneratedMessage.Builder<Price.Builder> implements PriceOrBuilder
 Represents the price of the Offer.
 
Protobuf type google.cloud.channel.v1.Price
  • 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<Price.Builder>
    • clear

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

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

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

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

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

      public Price.Builder mergeFrom(Price other)
    • isInitialized

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

      public Price.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<Price.Builder>
      Throws:
      IOException
    • hasBasePrice

      public boolean hasBasePrice()
       Base price.
       
      .google.type.Money base_price = 1;
      Specified by:
      hasBasePrice in interface PriceOrBuilder
      Returns:
      Whether the basePrice field is set.
    • getBasePrice

      public Money getBasePrice()
       Base price.
       
      .google.type.Money base_price = 1;
      Specified by:
      getBasePrice in interface PriceOrBuilder
      Returns:
      The basePrice.
    • setBasePrice

      public Price.Builder setBasePrice(Money value)
       Base price.
       
      .google.type.Money base_price = 1;
    • setBasePrice

      public Price.Builder setBasePrice(Money.Builder builderForValue)
       Base price.
       
      .google.type.Money base_price = 1;
    • mergeBasePrice

      public Price.Builder mergeBasePrice(Money value)
       Base price.
       
      .google.type.Money base_price = 1;
    • clearBasePrice

      public Price.Builder clearBasePrice()
       Base price.
       
      .google.type.Money base_price = 1;
    • getBasePriceBuilder

      public Money.Builder getBasePriceBuilder()
       Base price.
       
      .google.type.Money base_price = 1;
    • getBasePriceOrBuilder

      public MoneyOrBuilder getBasePriceOrBuilder()
       Base price.
       
      .google.type.Money base_price = 1;
      Specified by:
      getBasePriceOrBuilder in interface PriceOrBuilder
    • getDiscount

      public double getDiscount()
       Discount percentage, represented as decimal.
       For example, a 20% discount will be represent as 0.2.
       
      double discount = 2;
      Specified by:
      getDiscount in interface PriceOrBuilder
      Returns:
      The discount.
    • setDiscount

      public Price.Builder setDiscount(double value)
       Discount percentage, represented as decimal.
       For example, a 20% discount will be represent as 0.2.
       
      double discount = 2;
      Parameters:
      value - The discount to set.
      Returns:
      This builder for chaining.
    • clearDiscount

      public Price.Builder clearDiscount()
       Discount percentage, represented as decimal.
       For example, a 20% discount will be represent as 0.2.
       
      double discount = 2;
      Returns:
      This builder for chaining.
    • hasEffectivePrice

      public boolean hasEffectivePrice()
       Effective Price after applying the discounts.
       
      .google.type.Money effective_price = 3;
      Specified by:
      hasEffectivePrice in interface PriceOrBuilder
      Returns:
      Whether the effectivePrice field is set.
    • getEffectivePrice

      public Money getEffectivePrice()
       Effective Price after applying the discounts.
       
      .google.type.Money effective_price = 3;
      Specified by:
      getEffectivePrice in interface PriceOrBuilder
      Returns:
      The effectivePrice.
    • setEffectivePrice

      public Price.Builder setEffectivePrice(Money value)
       Effective Price after applying the discounts.
       
      .google.type.Money effective_price = 3;
    • setEffectivePrice

      public Price.Builder setEffectivePrice(Money.Builder builderForValue)
       Effective Price after applying the discounts.
       
      .google.type.Money effective_price = 3;
    • mergeEffectivePrice

      public Price.Builder mergeEffectivePrice(Money value)
       Effective Price after applying the discounts.
       
      .google.type.Money effective_price = 3;
    • clearEffectivePrice

      public Price.Builder clearEffectivePrice()
       Effective Price after applying the discounts.
       
      .google.type.Money effective_price = 3;
    • getEffectivePriceBuilder

      public Money.Builder getEffectivePriceBuilder()
       Effective Price after applying the discounts.
       
      .google.type.Money effective_price = 3;
    • getEffectivePriceOrBuilder

      public MoneyOrBuilder getEffectivePriceOrBuilder()
       Effective Price after applying the discounts.
       
      .google.type.Money effective_price = 3;
      Specified by:
      getEffectivePriceOrBuilder in interface PriceOrBuilder
    • hasPricePeriod

      public boolean hasPricePeriod()
       The time period with respect to which base and effective prices are
       defined.
       Example: 1 month, 6 months, 1 year, etc.
       
      .google.cloud.channel.v1.Period price_period = 6;
      Specified by:
      hasPricePeriod in interface PriceOrBuilder
      Returns:
      Whether the pricePeriod field is set.
    • getPricePeriod

      public Period getPricePeriod()
       The time period with respect to which base and effective prices are
       defined.
       Example: 1 month, 6 months, 1 year, etc.
       
      .google.cloud.channel.v1.Period price_period = 6;
      Specified by:
      getPricePeriod in interface PriceOrBuilder
      Returns:
      The pricePeriod.
    • setPricePeriod

      public Price.Builder setPricePeriod(Period value)
       The time period with respect to which base and effective prices are
       defined.
       Example: 1 month, 6 months, 1 year, etc.
       
      .google.cloud.channel.v1.Period price_period = 6;
    • setPricePeriod

      public Price.Builder setPricePeriod(Period.Builder builderForValue)
       The time period with respect to which base and effective prices are
       defined.
       Example: 1 month, 6 months, 1 year, etc.
       
      .google.cloud.channel.v1.Period price_period = 6;
    • mergePricePeriod

      public Price.Builder mergePricePeriod(Period value)
       The time period with respect to which base and effective prices are
       defined.
       Example: 1 month, 6 months, 1 year, etc.
       
      .google.cloud.channel.v1.Period price_period = 6;
    • clearPricePeriod

      public Price.Builder clearPricePeriod()
       The time period with respect to which base and effective prices are
       defined.
       Example: 1 month, 6 months, 1 year, etc.
       
      .google.cloud.channel.v1.Period price_period = 6;
    • getPricePeriodBuilder

      public Period.Builder getPricePeriodBuilder()
       The time period with respect to which base and effective prices are
       defined.
       Example: 1 month, 6 months, 1 year, etc.
       
      .google.cloud.channel.v1.Period price_period = 6;
    • getPricePeriodOrBuilder

      public PeriodOrBuilder getPricePeriodOrBuilder()
       The time period with respect to which base and effective prices are
       defined.
       Example: 1 month, 6 months, 1 year, etc.
       
      .google.cloud.channel.v1.Period price_period = 6;
      Specified by:
      getPricePeriodOrBuilder in interface PriceOrBuilder
    • getExternalPriceUri

      public String getExternalPriceUri()
       Link to external price list, such as link to Google Voice rate card.
       
      string external_price_uri = 4;
      Specified by:
      getExternalPriceUri in interface PriceOrBuilder
      Returns:
      The externalPriceUri.
    • getExternalPriceUriBytes

      public com.google.protobuf.ByteString getExternalPriceUriBytes()
       Link to external price list, such as link to Google Voice rate card.
       
      string external_price_uri = 4;
      Specified by:
      getExternalPriceUriBytes in interface PriceOrBuilder
      Returns:
      The bytes for externalPriceUri.
    • setExternalPriceUri

      public Price.Builder setExternalPriceUri(String value)
       Link to external price list, such as link to Google Voice rate card.
       
      string external_price_uri = 4;
      Parameters:
      value - The externalPriceUri to set.
      Returns:
      This builder for chaining.
    • clearExternalPriceUri

      public Price.Builder clearExternalPriceUri()
       Link to external price list, such as link to Google Voice rate card.
       
      string external_price_uri = 4;
      Returns:
      This builder for chaining.
    • setExternalPriceUriBytes

      public Price.Builder setExternalPriceUriBytes(com.google.protobuf.ByteString value)
       Link to external price list, such as link to Google Voice rate card.
       
      string external_price_uri = 4;
      Parameters:
      value - The bytes for externalPriceUri to set.
      Returns:
      This builder for chaining.
    • getDiscountComponentsList

      public List<DiscountComponent> getDiscountComponentsList()
       Breakdown of the discount into its components.
       This will be empty if there is no discount present.
       
      repeated .google.cloud.channel.v1.DiscountComponent discount_components = 5;
      Specified by:
      getDiscountComponentsList in interface PriceOrBuilder
    • getDiscountComponentsCount

      public int getDiscountComponentsCount()
       Breakdown of the discount into its components.
       This will be empty if there is no discount present.
       
      repeated .google.cloud.channel.v1.DiscountComponent discount_components = 5;
      Specified by:
      getDiscountComponentsCount in interface PriceOrBuilder
    • getDiscountComponents

      public DiscountComponent getDiscountComponents(int index)
       Breakdown of the discount into its components.
       This will be empty if there is no discount present.
       
      repeated .google.cloud.channel.v1.DiscountComponent discount_components = 5;
      Specified by:
      getDiscountComponents in interface PriceOrBuilder
    • setDiscountComponents

      public Price.Builder setDiscountComponents(int index, DiscountComponent value)
       Breakdown of the discount into its components.
       This will be empty if there is no discount present.
       
      repeated .google.cloud.channel.v1.DiscountComponent discount_components = 5;
    • setDiscountComponents

      public Price.Builder setDiscountComponents(int index, DiscountComponent.Builder builderForValue)
       Breakdown of the discount into its components.
       This will be empty if there is no discount present.
       
      repeated .google.cloud.channel.v1.DiscountComponent discount_components = 5;
    • addDiscountComponents

      public Price.Builder addDiscountComponents(DiscountComponent value)
       Breakdown of the discount into its components.
       This will be empty if there is no discount present.
       
      repeated .google.cloud.channel.v1.DiscountComponent discount_components = 5;
    • addDiscountComponents

      public Price.Builder addDiscountComponents(int index, DiscountComponent value)
       Breakdown of the discount into its components.
       This will be empty if there is no discount present.
       
      repeated .google.cloud.channel.v1.DiscountComponent discount_components = 5;
    • addDiscountComponents

      public Price.Builder addDiscountComponents(DiscountComponent.Builder builderForValue)
       Breakdown of the discount into its components.
       This will be empty if there is no discount present.
       
      repeated .google.cloud.channel.v1.DiscountComponent discount_components = 5;
    • addDiscountComponents

      public Price.Builder addDiscountComponents(int index, DiscountComponent.Builder builderForValue)
       Breakdown of the discount into its components.
       This will be empty if there is no discount present.
       
      repeated .google.cloud.channel.v1.DiscountComponent discount_components = 5;
    • addAllDiscountComponents

      public Price.Builder addAllDiscountComponents(Iterable<? extends DiscountComponent> values)
       Breakdown of the discount into its components.
       This will be empty if there is no discount present.
       
      repeated .google.cloud.channel.v1.DiscountComponent discount_components = 5;
    • clearDiscountComponents

      public Price.Builder clearDiscountComponents()
       Breakdown of the discount into its components.
       This will be empty if there is no discount present.
       
      repeated .google.cloud.channel.v1.DiscountComponent discount_components = 5;
    • removeDiscountComponents

      public Price.Builder removeDiscountComponents(int index)
       Breakdown of the discount into its components.
       This will be empty if there is no discount present.
       
      repeated .google.cloud.channel.v1.DiscountComponent discount_components = 5;
    • getDiscountComponentsBuilder

      public DiscountComponent.Builder getDiscountComponentsBuilder(int index)
       Breakdown of the discount into its components.
       This will be empty if there is no discount present.
       
      repeated .google.cloud.channel.v1.DiscountComponent discount_components = 5;
    • getDiscountComponentsOrBuilder

      public DiscountComponentOrBuilder getDiscountComponentsOrBuilder(int index)
       Breakdown of the discount into its components.
       This will be empty if there is no discount present.
       
      repeated .google.cloud.channel.v1.DiscountComponent discount_components = 5;
      Specified by:
      getDiscountComponentsOrBuilder in interface PriceOrBuilder
    • getDiscountComponentsOrBuilderList

      public List<? extends DiscountComponentOrBuilder> getDiscountComponentsOrBuilderList()
       Breakdown of the discount into its components.
       This will be empty if there is no discount present.
       
      repeated .google.cloud.channel.v1.DiscountComponent discount_components = 5;
      Specified by:
      getDiscountComponentsOrBuilderList in interface PriceOrBuilder
    • addDiscountComponentsBuilder

      public DiscountComponent.Builder addDiscountComponentsBuilder()
       Breakdown of the discount into its components.
       This will be empty if there is no discount present.
       
      repeated .google.cloud.channel.v1.DiscountComponent discount_components = 5;
    • addDiscountComponentsBuilder

      public DiscountComponent.Builder addDiscountComponentsBuilder(int index)
       Breakdown of the discount into its components.
       This will be empty if there is no discount present.
       
      repeated .google.cloud.channel.v1.DiscountComponent discount_components = 5;
    • getDiscountComponentsBuilderList

      public List<DiscountComponent.Builder> getDiscountComponentsBuilderList()
       Breakdown of the discount into its components.
       This will be empty if there is no discount present.
       
      repeated .google.cloud.channel.v1.DiscountComponent discount_components = 5;