Class NutritionLog
Holds information about food logged by a user. There are two ways of creating a nutrition log based on the food
type: 1. Identified food: Using the food field, which is a reference to a Food resource. In this case fields
nutrients, energy, energy_from_fat, total_carbohydrate, total_fat, food_display_name will be
populated based on the referenced food. 2. Anonymous food: Using the food_display_name field and setting the
nutrients, energy, energy_from_fat, total_carbohydrate, total_fat fields manually. The identified food
is preferred over the anonymous food. Nutrition logs created from anonymous food are not editable.
Implements
Inherited Members
Namespace: Google.Apis.GoogleHealthAPI.v4.Data
Assembly: Google.Apis.GoogleHealthAPI.v4.dll
Syntax
public class NutritionLog : IDirectResponseSchema
Properties
ETag
The ETag of the item.
Declaration
public virtual string ETag { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Energy
Optional. The total energy of the food, measured in kilocalories (kcal).
Declaration
[JsonProperty("energy")]
public virtual EnergyQuantity Energy { get; set; }
Property Value
| Type | Description |
|---|---|
| EnergyQuantity |
EnergyFromFat
Optional. The energy from fat, measured in kilocalories (kcal).
Declaration
[JsonProperty("energyFromFat")]
public virtual EnergyQuantity EnergyFromFat { get; set; }
Property Value
| Type | Description |
|---|---|
| EnergyQuantity |
Food
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.
Declaration
[JsonProperty("food")]
public virtual string Food { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
FoodDisplayName
The display name of the food. For identified food logs, this is populated automatically from the referenced food.
Declaration
[JsonProperty("foodDisplayName")]
public virtual string FoodDisplayName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Interval
Required. The time window when the food was logged.
Declaration
[JsonProperty("interval")]
public virtual SessionTimeInterval Interval { get; set; }
Property Value
| Type | Description |
|---|---|
| SessionTimeInterval |
MealType
Optional. The meal category. One of BREAKFAST, LUNCH, DINNER, or SNACK.
Declaration
[JsonProperty("mealType")]
public virtual string MealType { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Nutrients
Optional. An array of individual nutrient values for the nutrition log.
Declaration
[JsonProperty("nutrients")]
public virtual IList<NutrientQuantity> Nutrients { get; set; }
Property Value
| Type | Description |
|---|---|
| IList<NutrientQuantity> |
Serving
Optional. The serving information for the logged food.
Declaration
[JsonProperty("serving")]
public virtual Serving Serving { get; set; }
Property Value
| Type | Description |
|---|---|
| Serving |
TotalCarbohydrate
Optional. The total carbohydrate content, measured in grams.
Declaration
[JsonProperty("totalCarbohydrate")]
public virtual WeightQuantity TotalCarbohydrate { get; set; }
Property Value
| Type | Description |
|---|---|
| WeightQuantity |
TotalFat
Optional. The total fat content, measured in grams.
Declaration
[JsonProperty("totalFat")]
public virtual WeightQuantity TotalFat { get; set; }
Property Value
| Type | Description |
|---|---|
| WeightQuantity |