Class Weight (0.2.0)

public final class Weight extends GeneratedMessage implements WeightOrBuilder

Body weight measurement.

Protobuf type google.devicesandservices.health.v4.Weight

Implements

WeightOrBuilder

Static Fields

NOTES_FIELD_NUMBER

public static final int NOTES_FIELD_NUMBER
Field Value
Type Description
int

SAMPLE_TIME_FIELD_NUMBER

public static final int SAMPLE_TIME_FIELD_NUMBER
Field Value
Type Description
int

WEIGHT_GRAMS_FIELD_NUMBER

public static final int WEIGHT_GRAMS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Weight getDefaultInstance()
Returns
Type Description
Weight

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static Weight.Builder newBuilder()
Returns
Type Description
Weight.Builder

newBuilder(Weight prototype)

public static Weight.Builder newBuilder(Weight prototype)
Parameter
Name Description
prototype Weight
Returns
Type Description
Weight.Builder

parseDelimitedFrom(InputStream input)

public static Weight parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Weight
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Weight parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Weight
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Weight parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Weight
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Weight parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Weight
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Weight parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Weight
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Weight parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Weight
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Weight parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Weight
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Weight parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Weight
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Weight parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Weight
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Weight parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Weight
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Weight parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Weight
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Weight parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Weight
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Weight> parser()
Returns
Type Description
Parser<Weight>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public Weight getDefaultInstanceForType()
Returns
Type Description
Weight

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.

getParserForType()

public Parser<Weight> getParserForType()
Returns
Type Description
Parser<Weight>
Overrides

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.

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Weight.Builder newBuilderForType()
Returns
Type Description
Weight.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected Weight.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Weight.Builder
Overrides

toBuilder()

public Weight.Builder toBuilder()
Returns
Type Description
Weight.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException