Class Weight.Builder (0.2.0)

public static final class Weight.Builder extends GeneratedMessage.Builder<Weight.Builder> implements WeightOrBuilder

Body weight measurement.

Protobuf type google.devicesandservices.health.v4.Weight

Implements

WeightOrBuilder

Static 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
Overrides

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
Overrides

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
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

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
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

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

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 String

The 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 ByteString

The 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 double

The weightGrams to set.

Returns
Type Description
Weight.Builder

This builder for chaining.