public static final class NutritionLogRollupValue.WeightQuantityRollup.Builder extends GeneratedMessage.Builder<NutritionLogRollupValue.WeightQuantityRollup.Builder> implements NutritionLogRollupValue.WeightQuantityRollupOrBuilderRollup for the weight.
Protobuf type
google.devicesandservices.health.v4.NutritionLogRollupValue.WeightQuantityRollup
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > NutritionLogRollupValue.WeightQuantityRollup.BuilderStatic 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 |
|
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 |
|
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 |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
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 |
|
| 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 |
|
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 |
doubleThe 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 |
WeightUnitThe 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 |
intThe enum numeric value on the wire for userProvidedUnitLast to set. |
| Returns | |
|---|---|
| Type | Description |
NutritionLogRollupValue.WeightQuantityRollup.Builder |
This builder for chaining. |