public static final class NutrientQuantity.Builder extends GeneratedMessage.Builder<NutrientQuantity.Builder> implements NutrientQuantityOrBuilderRepresents the quantity of a nutrient.
Protobuf type google.devicesandservices.health.v4.NutrientQuantity
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > NutrientQuantity.BuilderImplements
NutrientQuantityOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public NutrientQuantity build()| Returns | |
|---|---|
| Type | Description |
NutrientQuantity |
|
buildPartial()
public NutrientQuantity buildPartial()| Returns | |
|---|---|
| Type | Description |
NutrientQuantity |
|
clear()
public NutrientQuantity.Builder clear()| Returns | |
|---|---|
| Type | Description |
NutrientQuantity.Builder |
|
clearNutrient()
public NutrientQuantity.Builder clearNutrient()Required. Value representing the nutrient.
.google.devicesandservices.health.v4.Nutrient nutrient = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
NutrientQuantity.Builder |
This builder for chaining. |
clearQuantity()
public NutrientQuantity.Builder clearQuantity()Required. Value representing the quantity of the nutrient.
.google.devicesandservices.health.v4.WeightQuantity quantity = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
NutrientQuantity.Builder |
|
getDefaultInstanceForType()
public NutrientQuantity getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
NutrientQuantity |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getNutrient()
public Nutrient getNutrient()Required. Value representing the nutrient.
.google.devicesandservices.health.v4.Nutrient nutrient = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
Nutrient |
The nutrient. |
getNutrientValue()
public int getNutrientValue()Required. Value representing the nutrient.
.google.devicesandservices.health.v4.Nutrient nutrient = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
int |
The enum numeric value on the wire for nutrient. |
getQuantity()
public WeightQuantity getQuantity()Required. Value representing the quantity of the nutrient.
.google.devicesandservices.health.v4.WeightQuantity quantity = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
WeightQuantity |
The quantity. |
getQuantityBuilder()
public WeightQuantity.Builder getQuantityBuilder()Required. Value representing the quantity of the nutrient.
.google.devicesandservices.health.v4.WeightQuantity quantity = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
WeightQuantity.Builder |
|
getQuantityOrBuilder()
public WeightQuantityOrBuilder getQuantityOrBuilder()Required. Value representing the quantity of the nutrient.
.google.devicesandservices.health.v4.WeightQuantity quantity = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
WeightQuantityOrBuilder |
|
hasQuantity()
public boolean hasQuantity()Required. Value representing the quantity of the nutrient.
.google.devicesandservices.health.v4.WeightQuantity quantity = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the quantity field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(NutrientQuantity other)
public NutrientQuantity.Builder mergeFrom(NutrientQuantity other)| Parameter | |
|---|---|
| Name | Description |
other |
NutrientQuantity |
| Returns | |
|---|---|
| Type | Description |
NutrientQuantity.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public NutrientQuantity.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
NutrientQuantity.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public NutrientQuantity.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
NutrientQuantity.Builder |
|
mergeQuantity(WeightQuantity value)
public NutrientQuantity.Builder mergeQuantity(WeightQuantity value)Required. Value representing the quantity of the nutrient.
.google.devicesandservices.health.v4.WeightQuantity quantity = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
WeightQuantity |
| Returns | |
|---|---|
| Type | Description |
NutrientQuantity.Builder |
|
setNutrient(Nutrient value)
public NutrientQuantity.Builder setNutrient(Nutrient value)Required. Value representing the nutrient.
.google.devicesandservices.health.v4.Nutrient nutrient = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
NutrientThe nutrient to set. |
| Returns | |
|---|---|
| Type | Description |
NutrientQuantity.Builder |
This builder for chaining. |
setNutrientValue(int value)
public NutrientQuantity.Builder setNutrientValue(int value)Required. Value representing the nutrient.
.google.devicesandservices.health.v4.Nutrient nutrient = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
intThe enum numeric value on the wire for nutrient to set. |
| Returns | |
|---|---|
| Type | Description |
NutrientQuantity.Builder |
This builder for chaining. |
setQuantity(WeightQuantity value)
public NutrientQuantity.Builder setQuantity(WeightQuantity value)Required. Value representing the quantity of the nutrient.
.google.devicesandservices.health.v4.WeightQuantity quantity = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
WeightQuantity |
| Returns | |
|---|---|
| Type | Description |
NutrientQuantity.Builder |
|
setQuantity(WeightQuantity.Builder builderForValue)
public NutrientQuantity.Builder setQuantity(WeightQuantity.Builder builderForValue)Required. Value representing the quantity of the nutrient.
.google.devicesandservices.health.v4.WeightQuantity quantity = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
WeightQuantity.Builder |
| Returns | |
|---|---|
| Type | Description |
NutrientQuantity.Builder |
|