Class NutritionLogRollupValue.WeightQuantityRollup.Builder (0.2.0)

public static final class NutritionLogRollupValue.WeightQuantityRollup.Builder extends GeneratedMessage.Builder<NutritionLogRollupValue.WeightQuantityRollup.Builder> implements NutritionLogRollupValue.WeightQuantityRollupOrBuilder

Rollup for the weight.

Protobuf type google.devicesandservices.health.v4.NutritionLogRollupValue.WeightQuantityRollup

Static Methods

getDescriptor()

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

Methods

build()

public NutritionLogRollupValue.WeightQuantityRollup build()
Returns
Type Description
NutritionLogRollupValue.WeightQuantityRollup

buildPartial()

public NutritionLogRollupValue.WeightQuantityRollup buildPartial()
Returns
Type Description
NutritionLogRollupValue.WeightQuantityRollup

clear()

public NutritionLogRollupValue.WeightQuantityRollup.Builder clear()
Returns
Type Description
NutritionLogRollupValue.WeightQuantityRollup.Builder
Overrides

clearGramsSum()

public NutritionLogRollupValue.WeightQuantityRollup.Builder clearGramsSum()

Required. The sum of the weight in grams.

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

Returns
Type Description
NutritionLogRollupValue.WeightQuantityRollup.Builder

This builder for chaining.

clearUserProvidedUnitLast()

public NutritionLogRollupValue.WeightQuantityRollup.Builder clearUserProvidedUnitLast()

Optional. The user provided unit on the last element.

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

Returns
Type Description
NutritionLogRollupValue.WeightQuantityRollup.Builder

This builder for chaining.

getDefaultInstanceForType()

public NutritionLogRollupValue.WeightQuantityRollup getDefaultInstanceForType()
Returns
Type Description
NutritionLogRollupValue.WeightQuantityRollup

getDescriptorForType()

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

getGramsSum()

public double getGramsSum()

Required. The sum of the weight in grams.

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

Returns
Type Description
double

The gramsSum.

getUserProvidedUnitLast()

public WeightUnit getUserProvidedUnitLast()

Optional. The user provided unit on the last element.

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

Returns
Type Description
WeightUnit

The userProvidedUnitLast.

getUserProvidedUnitLastValue()

public int getUserProvidedUnitLastValue()

Optional. The user provided unit on the last element.

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

Returns
Type Description
int

The enum numeric value on the wire for userProvidedUnitLast.

hasGramsSum()

public boolean hasGramsSum()

Required. The sum of the weight in grams.

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

Returns
Type Description
boolean

Whether the gramsSum field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(NutritionLogRollupValue.WeightQuantityRollup other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setGramsSum(double value)

public NutritionLogRollupValue.WeightQuantityRollup.Builder setGramsSum(double value)

Required. The sum of the weight in grams.

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

Parameter
Name Description
value double

The gramsSum to set.

Returns
Type Description
NutritionLogRollupValue.WeightQuantityRollup.Builder

This builder for chaining.

setUserProvidedUnitLast(WeightUnit value)

public NutritionLogRollupValue.WeightQuantityRollup.Builder setUserProvidedUnitLast(WeightUnit value)

Optional. The user provided unit on the last element.

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

Parameter
Name Description
value WeightUnit

The userProvidedUnitLast to set.

Returns
Type Description
NutritionLogRollupValue.WeightQuantityRollup.Builder

This builder for chaining.

setUserProvidedUnitLastValue(int value)

public NutritionLogRollupValue.WeightQuantityRollup.Builder setUserProvidedUnitLastValue(int value)

Optional. The user provided unit on the last element.

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

Parameter
Name Description
value int

The enum numeric value on the wire for userProvidedUnitLast to set.

Returns
Type Description
NutritionLogRollupValue.WeightQuantityRollup.Builder

This builder for chaining.