Class PercentageAdjustment.Builder

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

public static final class PercentageAdjustment.Builder extends com.google.protobuf.GeneratedMessage.Builder<PercentageAdjustment.Builder> implements PercentageAdjustmentOrBuilder
 An adjustment that applies a flat markup or markdown to an entire bill.
 
Protobuf type google.cloud.channel.v1.PercentageAdjustment
  • 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<PercentageAdjustment.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<PercentageAdjustment.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<PercentageAdjustment.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public PercentageAdjustment.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<PercentageAdjustment.Builder>
      Throws:
      IOException
    • hasPercentage

      public boolean hasPercentage()
       The percentage of the bill to adjust.
       For example:
       Mark down by 1% => "-1.00"
       Mark up by 1%   => "1.00"
       Pass-Through    => "0.00"
       
      .google.type.Decimal percentage = 2;
      Specified by:
      hasPercentage in interface PercentageAdjustmentOrBuilder
      Returns:
      Whether the percentage field is set.
    • getPercentage

      public Decimal getPercentage()
       The percentage of the bill to adjust.
       For example:
       Mark down by 1% => "-1.00"
       Mark up by 1%   => "1.00"
       Pass-Through    => "0.00"
       
      .google.type.Decimal percentage = 2;
      Specified by:
      getPercentage in interface PercentageAdjustmentOrBuilder
      Returns:
      The percentage.
    • setPercentage

      public PercentageAdjustment.Builder setPercentage(Decimal value)
       The percentage of the bill to adjust.
       For example:
       Mark down by 1% => "-1.00"
       Mark up by 1%   => "1.00"
       Pass-Through    => "0.00"
       
      .google.type.Decimal percentage = 2;
    • setPercentage

      public PercentageAdjustment.Builder setPercentage(Decimal.Builder builderForValue)
       The percentage of the bill to adjust.
       For example:
       Mark down by 1% => "-1.00"
       Mark up by 1%   => "1.00"
       Pass-Through    => "0.00"
       
      .google.type.Decimal percentage = 2;
    • mergePercentage

      public PercentageAdjustment.Builder mergePercentage(Decimal value)
       The percentage of the bill to adjust.
       For example:
       Mark down by 1% => "-1.00"
       Mark up by 1%   => "1.00"
       Pass-Through    => "0.00"
       
      .google.type.Decimal percentage = 2;
    • clearPercentage

      public PercentageAdjustment.Builder clearPercentage()
       The percentage of the bill to adjust.
       For example:
       Mark down by 1% => "-1.00"
       Mark up by 1%   => "1.00"
       Pass-Through    => "0.00"
       
      .google.type.Decimal percentage = 2;
    • getPercentageBuilder

      public Decimal.Builder getPercentageBuilder()
       The percentage of the bill to adjust.
       For example:
       Mark down by 1% => "-1.00"
       Mark up by 1%   => "1.00"
       Pass-Through    => "0.00"
       
      .google.type.Decimal percentage = 2;
    • getPercentageOrBuilder

      public DecimalOrBuilder getPercentageOrBuilder()
       The percentage of the bill to adjust.
       For example:
       Mark down by 1% => "-1.00"
       Mark up by 1%   => "1.00"
       Pass-Through    => "0.00"
       
      .google.type.Decimal percentage = 2;
      Specified by:
      getPercentageOrBuilder in interface PercentageAdjustmentOrBuilder