public final class WeightQuantity extends GeneratedMessage implements WeightQuantityOrBuilderRepresents the weight quantity.
Protobuf type google.devicesandservices.health.v4.WeightQuantity
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessage > WeightQuantityImplements
WeightQuantityOrBuilderStatic Fields
GRAMS_FIELD_NUMBER
public static final int GRAMS_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
USER_PROVIDED_UNIT_FIELD_NUMBER
public static final int USER_PROVIDED_UNIT_FIELD_NUMBER| Field Value | |
|---|---|
| Type | Description |
int |
|
Static Methods
getDefaultInstance()
public static WeightQuantity getDefaultInstance()| Returns | |
|---|---|
| Type | Description |
WeightQuantity |
|
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
newBuilder()
public static WeightQuantity.Builder newBuilder()| Returns | |
|---|---|
| Type | Description |
WeightQuantity.Builder |
|
newBuilder(WeightQuantity prototype)
public static WeightQuantity.Builder newBuilder(WeightQuantity prototype)| Parameter | |
|---|---|
| Name | Description |
prototype |
WeightQuantity |
| Returns | |
|---|---|
| Type | Description |
WeightQuantity.Builder |
|
parseDelimitedFrom(InputStream input)
public static WeightQuantity parseDelimitedFrom(InputStream input)| Parameter | |
|---|---|
| Name | Description |
input |
InputStream |
| Returns | |
|---|---|
| Type | Description |
WeightQuantity |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static WeightQuantity parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
InputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
WeightQuantity |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(byte[] data)
public static WeightQuantity parseFrom(byte[] data)| Parameter | |
|---|---|
| Name | Description |
data |
byte[] |
| Returns | |
|---|---|
| Type | Description |
WeightQuantity |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static WeightQuantity parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
data |
byte[] |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
WeightQuantity |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(ByteString data)
public static WeightQuantity parseFrom(ByteString data)| Parameter | |
|---|---|
| Name | Description |
data |
ByteString |
| Returns | |
|---|---|
| Type | Description |
WeightQuantity |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static WeightQuantity parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
data |
ByteString |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
WeightQuantity |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(CodedInputStream input)
public static WeightQuantity parseFrom(CodedInputStream input)| Parameter | |
|---|---|
| Name | Description |
input |
CodedInputStream |
| Returns | |
|---|---|
| Type | Description |
WeightQuantity |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static WeightQuantity parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
WeightQuantity |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(InputStream input)
public static WeightQuantity parseFrom(InputStream input)| Parameter | |
|---|---|
| Name | Description |
input |
InputStream |
| Returns | |
|---|---|
| Type | Description |
WeightQuantity |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static WeightQuantity parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
InputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
WeightQuantity |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
parseFrom(ByteBuffer data)
public static WeightQuantity parseFrom(ByteBuffer data)| Parameter | |
|---|---|
| Name | Description |
data |
ByteBuffer |
| Returns | |
|---|---|
| Type | Description |
WeightQuantity |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static WeightQuantity parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
data |
ByteBuffer |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
WeightQuantity |
|
| Exceptions | |
|---|---|
| Type | Description |
InvalidProtocolBufferException |
|
parser()
public static Parser<WeightQuantity> parser()| Returns | |
|---|---|
| Type | Description |
Parser<WeightQuantity> |
|
Methods
equals(Object obj)
public boolean equals(Object obj)| Parameter | |
|---|---|
| Name | Description |
obj |
Object |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
getDefaultInstanceForType()
public WeightQuantity getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
WeightQuantity |
|
getGrams()
public double getGrams()Required. Value representing the weight in grams.
optional double grams = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
double |
The grams. |
getParserForType()
public Parser<WeightQuantity> getParserForType()| Returns | |
|---|---|
| Type | Description |
Parser<WeightQuantity> |
|
getSerializedSize()
public int getSerializedSize()| Returns | |
|---|---|
| Type | Description |
int |
|
getUserProvidedUnit()
public WeightUnit getUserProvidedUnit()Optional. Value representing the user provided unit.
.google.devicesandservices.health.v4.WeightUnit user_provided_unit = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
WeightUnit |
The userProvidedUnit. |
getUserProvidedUnitValue()
public int getUserProvidedUnitValue()Optional. Value representing the user provided unit.
.google.devicesandservices.health.v4.WeightUnit user_provided_unit = 2 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
The enum numeric value on the wire for userProvidedUnit. |
hasGrams()
public boolean hasGrams()Required. Value representing the weight in grams.
optional double grams = 1 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the grams field is set. |
hashCode()
public int hashCode()| Returns | |
|---|---|
| Type | Description |
int |
|
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
newBuilderForType()
public WeightQuantity.Builder newBuilderForType()| Returns | |
|---|---|
| Type | Description |
WeightQuantity.Builder |
|
newBuilderForType(AbstractMessage.BuilderParent parent)
protected WeightQuantity.Builder newBuilderForType(AbstractMessage.BuilderParent parent)| Parameter | |
|---|---|
| Name | Description |
parent |
BuilderParent |
| Returns | |
|---|---|
| Type | Description |
WeightQuantity.Builder |
|
toBuilder()
public WeightQuantity.Builder toBuilder()| Returns | |
|---|---|
| Type | Description |
WeightQuantity.Builder |
|
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)| Parameter | |
|---|---|
| Name | Description |
output |
CodedOutputStream |
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|