public static final class Weight.Builder extends GeneratedMessage.Builder<Weight.Builder> implements WeightOrBuilderBody weight measurement.
Protobuf type google.devicesandservices.health.v4.Weight
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > Weight.BuilderImplements
WeightOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public Weight build()| Returns | |
|---|---|
| Type | Description |
Weight |
|
buildPartial()
public Weight buildPartial()| Returns | |
|---|---|
| Type | Description |
Weight |
|
clear()
public Weight.Builder clear()| Returns | |
|---|---|
| Type | Description |
Weight.Builder |
|
clearNotes()
public Weight.Builder clearNotes()Optional. Standard free-form notes captured at manual logging.
string notes = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
Weight.Builder |
This builder for chaining. |
clearSampleTime()
public Weight.Builder clearSampleTime()Required. The time at which the weight was measured
.google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
Weight.Builder |
|
clearWeightGrams()
public Weight.Builder clearWeightGrams()Required. Weight of a user in grams.
optional double weight_grams = 3 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
Weight.Builder |
This builder for chaining. |
getDefaultInstanceForType()
public Weight getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
Weight |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getNotes()
public String getNotes()Optional. Standard free-form notes captured at manual logging.
string notes = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
String |
The notes. |
getNotesBytes()
public ByteString getNotesBytes()Optional. Standard free-form notes captured at manual logging.
string notes = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for notes. |
getSampleTime()
public ObservationSampleTime getSampleTime()Required. The time at which the weight was measured
.google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
ObservationSampleTime |
The sampleTime. |
getSampleTimeBuilder()
public ObservationSampleTime.Builder getSampleTimeBuilder()Required. The time at which the weight was measured
.google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
ObservationSampleTime.Builder |
|
getSampleTimeOrBuilder()
public ObservationSampleTimeOrBuilder getSampleTimeOrBuilder()Required. The time at which the weight was measured
.google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
ObservationSampleTimeOrBuilder |
|
getWeightGrams()
public double getWeightGrams()Required. Weight of a user in grams.
optional double weight_grams = 3 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
double |
The weightGrams. |
hasSampleTime()
public boolean hasSampleTime()Required. The time at which the weight was measured
.google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the sampleTime field is set. |
hasWeightGrams()
public boolean hasWeightGrams()Required. Weight of a user in grams.
optional double weight_grams = 3 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the weightGrams field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(Weight other)
public Weight.Builder mergeFrom(Weight other)| Parameter | |
|---|---|
| Name | Description |
other |
Weight |
| Returns | |
|---|---|
| Type | Description |
Weight.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Weight.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Weight.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public Weight.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
Weight.Builder |
|
mergeSampleTime(ObservationSampleTime value)
public Weight.Builder mergeSampleTime(ObservationSampleTime value)Required. The time at which the weight was measured
.google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
ObservationSampleTime |
| Returns | |
|---|---|
| Type | Description |
Weight.Builder |
|
setNotes(String value)
public Weight.Builder setNotes(String value)Optional. Standard free-form notes captured at manual logging.
string notes = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe notes to set. |
| Returns | |
|---|---|
| Type | Description |
Weight.Builder |
This builder for chaining. |
setNotesBytes(ByteString value)
public Weight.Builder setNotesBytes(ByteString value)Optional. Standard free-form notes captured at manual logging.
string notes = 4 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for notes to set. |
| Returns | |
|---|---|
| Type | Description |
Weight.Builder |
This builder for chaining. |
setSampleTime(ObservationSampleTime value)
public Weight.Builder setSampleTime(ObservationSampleTime value)Required. The time at which the weight was measured
.google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
ObservationSampleTime |
| Returns | |
|---|---|
| Type | Description |
Weight.Builder |
|
setSampleTime(ObservationSampleTime.Builder builderForValue)
public Weight.Builder setSampleTime(ObservationSampleTime.Builder builderForValue)Required. The time at which the weight was measured
.google.devicesandservices.health.v4.ObservationSampleTime sample_time = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
ObservationSampleTime.Builder |
| Returns | |
|---|---|
| Type | Description |
Weight.Builder |
|
setWeightGrams(double value)
public Weight.Builder setWeightGrams(double value)Required. Weight of a user in grams.
optional double weight_grams = 3 [(.google.api.field_behavior) = REQUIRED];
| Parameter | |
|---|---|
| Name | Description |
value |
doubleThe weightGrams to set. |
| Returns | |
|---|---|
| Type | Description |
Weight.Builder |
This builder for chaining. |