Class PercentageAdjustment.Builder (3.17.0)

public static final class PercentageAdjustment.Builder extends GeneratedMessageV3.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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public PercentageAdjustment.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
PercentageAdjustment.Builder
Overrides

build()

public PercentageAdjustment build()
Returns
TypeDescription
PercentageAdjustment

buildPartial()

public PercentageAdjustment buildPartial()
Returns
TypeDescription
PercentageAdjustment

clear()

public PercentageAdjustment.Builder clear()
Returns
TypeDescription
PercentageAdjustment.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public PercentageAdjustment.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
PercentageAdjustment.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public PercentageAdjustment.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
PercentageAdjustment.Builder
Overrides

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;

Returns
TypeDescription
PercentageAdjustment.Builder

clone()

public PercentageAdjustment.Builder clone()
Returns
TypeDescription
PercentageAdjustment.Builder
Overrides

getDefaultInstanceForType()

public PercentageAdjustment getDefaultInstanceForType()
Returns
TypeDescription
PercentageAdjustment

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

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;

Returns
TypeDescription
com.google.type.Decimal

The percentage.

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;

Returns
TypeDescription
com.google.type.Decimal.Builder

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;

Returns
TypeDescription
com.google.type.DecimalOrBuilder

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;

Returns
TypeDescription
boolean

Whether the percentage field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(PercentageAdjustment other)

public PercentageAdjustment.Builder mergeFrom(PercentageAdjustment other)
Parameter
NameDescription
otherPercentageAdjustment
Returns
TypeDescription
PercentageAdjustment.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public PercentageAdjustment.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PercentageAdjustment.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public PercentageAdjustment.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
PercentageAdjustment.Builder
Overrides

mergePercentage(Decimal value)

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;

Parameter
NameDescription
valuecom.google.type.Decimal
Returns
TypeDescription
PercentageAdjustment.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final PercentageAdjustment.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
PercentageAdjustment.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public PercentageAdjustment.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
PercentageAdjustment.Builder
Overrides

setPercentage(Decimal value)

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;

Parameter
NameDescription
valuecom.google.type.Decimal
Returns
TypeDescription
PercentageAdjustment.Builder

setPercentage(Decimal.Builder builderForValue)

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;

Parameter
NameDescription
builderForValuecom.google.type.Decimal.Builder
Returns
TypeDescription
PercentageAdjustment.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public PercentageAdjustment.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
PercentageAdjustment.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final PercentageAdjustment.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
PercentageAdjustment.Builder
Overrides