Class Amount.Builder (0.1.0)

public static final class Amount.Builder extends GeneratedMessageV3.Builder<Amount.Builder> implements AmountOrBuilder

Represents an amount of money in a specific currency.

Protobuf type google.cloud.gkerecommender.v1.Amount

Implements

AmountOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Amount.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Amount.Builder
Overrides

build()

public Amount build()
Returns
Type Description
Amount

buildPartial()

public Amount buildPartial()
Returns
Type Description
Amount

clear()

public Amount.Builder clear()
Returns
Type Description
Amount.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public Amount.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Amount.Builder
Overrides

clearNanos()

public Amount.Builder clearNanos()

Output only. Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If units is positive, nanos must be positive or zero. If units is zero, nanos can be positive, zero, or negative. If units is negative, nanos must be negative or zero. For example $-1.75 is represented as units=-1 and nanos=-750,000,000.

int32 nanos = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Amount.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Amount.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Amount.Builder
Overrides

clearUnits()

public Amount.Builder clearUnits()

Output only. The whole units of the amount. For example if currencyCode is "USD", then 1 unit is one US dollar.

int64 units = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Amount.Builder

This builder for chaining.

clone()

public Amount.Builder clone()
Returns
Type Description
Amount.Builder
Overrides

getDefaultInstanceForType()

public Amount getDefaultInstanceForType()
Returns
Type Description
Amount

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getNanos()

public int getNanos()

Output only. Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If units is positive, nanos must be positive or zero. If units is zero, nanos can be positive, zero, or negative. If units is negative, nanos must be negative or zero. For example $-1.75 is represented as units=-1 and nanos=-750,000,000.

int32 nanos = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The nanos.

getUnits()

public long getUnits()

Output only. The whole units of the amount. For example if currencyCode is "USD", then 1 unit is one US dollar.

int64 units = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The units.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Amount other)

public Amount.Builder mergeFrom(Amount other)
Parameter
Name Description
other Amount
Returns
Type Description
Amount.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Amount.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Amount.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Amount.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Amount.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Amount.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Amount.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public Amount.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Amount.Builder
Overrides

setNanos(int value)

public Amount.Builder setNanos(int value)

Output only. Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If units is positive, nanos must be positive or zero. If units is zero, nanos can be positive, zero, or negative. If units is negative, nanos must be negative or zero. For example $-1.75 is represented as units=-1 and nanos=-750,000,000.

int32 nanos = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The nanos to set.

Returns
Type Description
Amount.Builder

This builder for chaining.

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

public Amount.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Amount.Builder
Overrides

setUnits(long value)

public Amount.Builder setUnits(long value)

Output only. The whole units of the amount. For example if currencyCode is "USD", then 1 unit is one US dollar.

int64 units = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value long

The units to set.

Returns
Type Description
Amount.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Amount.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Amount.Builder
Overrides