# Interface NutritionLogRollupValue.WeightQuantityRollupOrBuilder (0.2.0)

    public static interface NutritionLogRollupValue.WeightQuantityRollupOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getGramsSum()

    public abstract double getGramsSum()

Required. The sum of the weight in grams.

`optional double grams_sum = 1 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The gramsSum. |

### getUserProvidedUnitLast()

    public abstract WeightUnit getUserProvidedUnitLast()

Optional. The user provided unit on the last element.

`
.google.devicesandservices.health.v4.WeightUnit user_provided_unit_last = 2 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-health/latest/com.google.devicesandservices.health.v4.WeightUnit` | The userProvidedUnitLast. |

### getUserProvidedUnitLastValue()

    public abstract int getUserProvidedUnitLastValue()

Optional. The user provided unit on the last element.

`
.google.devicesandservices.health.v4.WeightUnit user_provided_unit_last = 2 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for userProvidedUnitLast. |

### hasGramsSum()

    public abstract boolean hasGramsSum()

Required. The sum of the weight in grams.

`optional double grams_sum = 1 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the gramsSum field is set. |