public interface NutritionLogOrBuilder extends MessageOrBuilderImplements
MessageOrBuilderMethods
getEnergy()
public abstract EnergyQuantity getEnergy() Optional. The total energy of the food, measured in kilocalories (kcal).
.google.devicesandservices.health.v4.EnergyQuantity energy = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
EnergyQuantity |
The energy. |
getEnergyFromFat()
public abstract EnergyQuantity getEnergyFromFat() Optional. The energy from fat, measured in kilocalories (kcal).
.google.devicesandservices.health.v4.EnergyQuantity energy_from_fat = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
EnergyQuantity |
The energyFromFat. |
getEnergyFromFatOrBuilder()
public abstract EnergyQuantityOrBuilder getEnergyFromFatOrBuilder() Optional. The energy from fat, measured in kilocalories (kcal).
.google.devicesandservices.health.v4.EnergyQuantity energy_from_fat = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
EnergyQuantityOrBuilder |
|
getEnergyOrBuilder()
public abstract EnergyQuantityOrBuilder getEnergyOrBuilder() Optional. The total energy of the food, measured in kilocalories (kcal).
.google.devicesandservices.health.v4.EnergyQuantity energy = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
EnergyQuantityOrBuilder |
|
getFood()
public abstract String getFood() Optional. The resource name of the Food item. Required when creating a
nutrition log from an identified food. For anonymous food logs, use the
food_display_name field instead.
string food = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
String |
The food. |
getFoodBytes()
public abstract ByteString getFoodBytes() Optional. The resource name of the Food item. Required when creating a
nutrition log from an identified food. For anonymous food logs, use the
food_display_name field instead.
string food = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for food. |
getFoodDisplayName()
public abstract String getFoodDisplayName()The display name of the food. For identified food logs, this is populated automatically from the referenced food.
string food_display_name = 16;
| Returns | |
|---|---|
| Type | Description |
String |
The foodDisplayName. |
getFoodDisplayNameBytes()
public abstract ByteString getFoodDisplayNameBytes()The display name of the food. For identified food logs, this is populated automatically from the referenced food.
string food_display_name = 16;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for foodDisplayName. |
getInterval()
public abstract SessionTimeInterval getInterval()Required. The time window when the food was logged.
.google.devicesandservices.health.v4.SessionTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
SessionTimeInterval |
The interval. |
getIntervalOrBuilder()
public abstract SessionTimeIntervalOrBuilder getIntervalOrBuilder()Required. The time window when the food was logged.
.google.devicesandservices.health.v4.SessionTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
SessionTimeIntervalOrBuilder |
|
getMealType()
public abstract MealType getMealType() Optional. The meal category. One of BREAKFAST, LUNCH, DINNER, or
SNACK.
.google.devicesandservices.health.v4.MealType meal_type = 13 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
MealType |
The mealType. |
getMealTypeValue()
public abstract int getMealTypeValue() Optional. The meal category. One of BREAKFAST, LUNCH, DINNER, or
SNACK.
.google.devicesandservices.health.v4.MealType meal_type = 13 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
The enum numeric value on the wire for mealType. |
getNutrients(int index)
public abstract NutrientQuantity getNutrients(int index)Optional. An array of individual nutrient values for the nutrition log.
repeated .google.devicesandservices.health.v4.NutrientQuantity nutrients = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
NutrientQuantity |
|
getNutrientsCount()
public abstract int getNutrientsCount()Optional. An array of individual nutrient values for the nutrition log.
repeated .google.devicesandservices.health.v4.NutrientQuantity nutrients = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
|
getNutrientsList()
public abstract List<NutrientQuantity> getNutrientsList()Optional. An array of individual nutrient values for the nutrition log.
repeated .google.devicesandservices.health.v4.NutrientQuantity nutrients = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
List<NutrientQuantity> |
|
getNutrientsOrBuilder(int index)
public abstract NutrientQuantityOrBuilder getNutrientsOrBuilder(int index)Optional. An array of individual nutrient values for the nutrition log.
repeated .google.devicesandservices.health.v4.NutrientQuantity nutrients = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
NutrientQuantityOrBuilder |
|
getNutrientsOrBuilderList()
public abstract List<? extends NutrientQuantityOrBuilder> getNutrientsOrBuilderList()Optional. An array of individual nutrient values for the nutrition log.
repeated .google.devicesandservices.health.v4.NutrientQuantity nutrients = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
List<? extends com.google.devicesandservices.health.v4.NutrientQuantityOrBuilder> |
|
getServing()
public abstract NutritionLog.Serving getServing()Optional. The serving information for the logged food.
.google.devicesandservices.health.v4.NutritionLog.Serving serving = 14 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
NutritionLog.Serving |
The serving. |
getServingOrBuilder()
public abstract NutritionLog.ServingOrBuilder getServingOrBuilder()Optional. The serving information for the logged food.
.google.devicesandservices.health.v4.NutritionLog.Serving serving = 14 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
NutritionLog.ServingOrBuilder |
|
getTotalCarbohydrate()
public abstract WeightQuantity getTotalCarbohydrate()Optional. The total carbohydrate content, measured in grams.
.google.devicesandservices.health.v4.WeightQuantity total_carbohydrate = 7 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
WeightQuantity |
The totalCarbohydrate. |
getTotalCarbohydrateOrBuilder()
public abstract WeightQuantityOrBuilder getTotalCarbohydrateOrBuilder()Optional. The total carbohydrate content, measured in grams.
.google.devicesandservices.health.v4.WeightQuantity total_carbohydrate = 7 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
WeightQuantityOrBuilder |
|
getTotalFat()
public abstract WeightQuantity getTotalFat()Optional. The total fat content, measured in grams.
.google.devicesandservices.health.v4.WeightQuantity total_fat = 8 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
WeightQuantity |
The totalFat. |
getTotalFatOrBuilder()
public abstract WeightQuantityOrBuilder getTotalFatOrBuilder()Optional. The total fat content, measured in grams.
.google.devicesandservices.health.v4.WeightQuantity total_fat = 8 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
WeightQuantityOrBuilder |
|
hasEnergy()
public abstract boolean hasEnergy() Optional. The total energy of the food, measured in kilocalories (kcal).
.google.devicesandservices.health.v4.EnergyQuantity energy = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the energy field is set. |
hasEnergyFromFat()
public abstract boolean hasEnergyFromFat() Optional. The energy from fat, measured in kilocalories (kcal).
.google.devicesandservices.health.v4.EnergyQuantity energy_from_fat = 5 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the energyFromFat field is set. |
hasInterval()
public abstract boolean hasInterval()Required. The time window when the food was logged.
.google.devicesandservices.health.v4.SessionTimeInterval interval = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the interval field is set. |
hasServing()
public abstract boolean hasServing()Optional. The serving information for the logged food.
.google.devicesandservices.health.v4.NutritionLog.Serving serving = 14 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the serving field is set. |
hasTotalCarbohydrate()
public abstract boolean hasTotalCarbohydrate()Optional. The total carbohydrate content, measured in grams.
.google.devicesandservices.health.v4.WeightQuantity total_carbohydrate = 7 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the totalCarbohydrate field is set. |
hasTotalFat()
public abstract boolean hasTotalFat()Optional. The total fat content, measured in grams.
.google.devicesandservices.health.v4.WeightQuantity total_fat = 8 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the totalFat field is set. |