Interface WeightQuantityOrBuilder (0.2.0)

public interface WeightQuantityOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getGrams()

public abstract double getGrams()

Required. Value representing the weight in grams.

optional double grams = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
double

The grams.

getUserProvidedUnit()

public abstract WeightUnit getUserProvidedUnit()

Optional. Value representing the user provided unit.

.google.devicesandservices.health.v4.WeightUnit user_provided_unit = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
WeightUnit

The userProvidedUnit.

getUserProvidedUnitValue()

public abstract int getUserProvidedUnitValue()

Optional. Value representing the user provided unit.

.google.devicesandservices.health.v4.WeightUnit user_provided_unit = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for userProvidedUnit.

hasGrams()

public abstract boolean hasGrams()

Required. Value representing the weight in grams.

optional double grams = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the grams field is set.