Interface WeightOrBuilder (2.40.0)

public interface WeightOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getAmountMicros()

public abstract long getAmountMicros()

Required. The weight represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 kg = 1000000 micros). This field can also be set as infinity by setting to -1. This field only support -1 and positive value.

optional int64 amount_micros = 1;

Returns
Type Description
long

The amountMicros.

getUnit()

public abstract Weight.WeightUnit getUnit()

Required. The weight unit. Acceptable values are: kg and lb

.google.shopping.type.Weight.WeightUnit unit = 2;

Returns
Type Description
Weight.WeightUnit

The unit.

getUnitValue()

public abstract int getUnitValue()

Required. The weight unit. Acceptable values are: kg and lb

.google.shopping.type.Weight.WeightUnit unit = 2;

Returns
Type Description
int

The enum numeric value on the wire for unit.

hasAmountMicros()

public abstract boolean hasAmountMicros()

Required. The weight represented as a number in micros (1 million micros is an equivalent to one's currency standard unit, for example, 1 kg = 1000000 micros). This field can also be set as infinity by setting to -1. This field only support -1 and positive value.

optional int64 amount_micros = 1;

Returns
Type Description
boolean

Whether the amountMicros field is set.