public static final class EnergyQuantity.Builder extends GeneratedMessage.Builder<EnergyQuantity.Builder> implements EnergyQuantityOrBuilderRepresents the energy quantity.
Protobuf type google.devicesandservices.health.v4.EnergyQuantity
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > EnergyQuantity.BuilderImplements
EnergyQuantityOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public EnergyQuantity build()| Returns | |
|---|---|
| Type | Description |
EnergyQuantity |
|
buildPartial()
public EnergyQuantity buildPartial()| Returns | |
|---|---|
| Type | Description |
EnergyQuantity |
|
clear()
public EnergyQuantity.Builder clear()| Returns | |
|---|---|
| Type | Description |
EnergyQuantity.Builder |
|
clearKcal()
public EnergyQuantity.Builder clearKcal()Required. Value representing the energy in kilocalories.
optional double kcal = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
EnergyQuantity.Builder |
This builder for chaining. |
clearUserProvidedUnit()
public EnergyQuantity.Builder clearUserProvidedUnit()Optional. Value representing the user provided unit.
.google.devicesandservices.health.v4.EnergyUnit user_provided_unit = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
EnergyQuantity.Builder |
This builder for chaining. |
getDefaultInstanceForType()
public EnergyQuantity getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
EnergyQuantity |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getKcal()
public double getKcal()Required. Value representing the energy in kilocalories.
optional double kcal = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
double |
The kcal. |
getUserProvidedUnit()
public EnergyUnit getUserProvidedUnit()Optional. Value representing the user provided unit.
.google.devicesandservices.health.v4.EnergyUnit user_provided_unit = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
EnergyUnit |
The userProvidedUnit. |
getUserProvidedUnitValue()
public int getUserProvidedUnitValue()Optional. Value representing the user provided unit.
.google.devicesandservices.health.v4.EnergyUnit user_provided_unit = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
The enum numeric value on the wire for userProvidedUnit. |
hasKcal()
public boolean hasKcal()Required. Value representing the energy in kilocalories.
optional double kcal = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the kcal field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(EnergyQuantity other)
public EnergyQuantity.Builder mergeFrom(EnergyQuantity other)| Parameter | |
|---|---|
| Name | Description |
other |
EnergyQuantity |
| Returns | |
|---|---|
| Type | Description |
EnergyQuantity.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public EnergyQuantity.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
EnergyQuantity.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public EnergyQuantity.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
EnergyQuantity.Builder |
|
setKcal(double value)
public EnergyQuantity.Builder setKcal(double value)Required. Value representing the energy in kilocalories.
optional double kcal = 1 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
doubleThe kcal to set. |
| Returns | |
|---|---|
| Type | Description |
EnergyQuantity.Builder |
This builder for chaining. |
setUserProvidedUnit(EnergyUnit value)
public EnergyQuantity.Builder setUserProvidedUnit(EnergyUnit value)Optional. Value representing the user provided unit.
.google.devicesandservices.health.v4.EnergyUnit user_provided_unit = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
EnergyUnitThe userProvidedUnit to set. |
| Returns | |
|---|---|
| Type | Description |
EnergyQuantity.Builder |
This builder for chaining. |
setUserProvidedUnitValue(int value)
public EnergyQuantity.Builder setUserProvidedUnitValue(int value)Optional. Value representing the user provided unit.
.google.devicesandservices.health.v4.EnergyUnit user_provided_unit = 2 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
intThe enum numeric value on the wire for userProvidedUnit to set. |
| Returns | |
|---|---|
| Type | Description |
EnergyQuantity.Builder |
This builder for chaining. |