# Interface NutritionLogRollupValue.EnergyQuantityRollupOrBuilder (0.2.0)

    public static interface NutritionLogRollupValue.EnergyQuantityRollupOrBuilder extends MessageOrBuilder

## Implements

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

## Methods

### getKcalSum()

    public abstract double getKcalSum()

Required. The sum of the energy in kilocalories.

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

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

### getUserProvidedUnitLast()

    public abstract EnergyUnit getUserProvidedUnitLast()

Optional. The user provided unit on the last element.

`
.google.devicesandservices.health.v4.EnergyUnit 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.EnergyUnit` | The userProvidedUnitLast. |

### getUserProvidedUnitLastValue()

    public abstract int getUserProvidedUnitLastValue()

Optional. The user provided unit on the last element.

`
.google.devicesandservices.health.v4.EnergyUnit 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. |

### hasKcalSum()

    public abstract boolean hasKcalSum()

Required. The sum of the energy in kilocalories.

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

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