Class NutritionLog
Holds information about a user logged food. 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 be 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. Value representing the energy of the nutrition log. For nutrition logs created from an identified food, this field will be populated based on the referenced food. For anonymous food, this field will be populated manually.
Declaration
[JsonProperty("energy")]
public virtual EnergyQuantity Energy { get; set; }
Property Value
| Type | Description |
|---|---|
| EnergyQuantity |
EnergyFromFat
Optional. Value representing the energy from fat of the nutrition log. For nutrition logs created from an identified food, this field will be populated based on the referenced food. For anonymous food, this field will be populated manually.
Declaration
[JsonProperty("energyFromFat")]
public virtual EnergyQuantity EnergyFromFat { get; set; }
Property Value
| Type | Description |
|---|---|
| EnergyQuantity |
Food
Required. Represents the food ID.
Declaration
[JsonProperty("food")]
public virtual string Food { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
FoodDisplayName
Value representing the display name of the food. For nutrition logs created from an identified food, this field will be populated based on the referenced food. For anonymous food, this field will be populated manually.
Declaration
[JsonProperty("foodDisplayName")]
public virtual string FoodDisplayName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Interval
Required. Observed interval.
Declaration
[JsonProperty("interval")]
public virtual SessionTimeInterval Interval { get; set; }
Property Value
| Type | Description |
|---|---|
| SessionTimeInterval |
MealType
Optional. Value representing the meal type of the nutrition log.
Declaration
[JsonProperty("mealType")]
public virtual string MealType { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Nutrients
Optional. Value representing the nutrients of the nutrition log.
Declaration
[JsonProperty("nutrients")]
public virtual IList<NutrientQuantity> Nutrients { get; set; }
Property Value
| Type | Description |
|---|---|
| IList<NutrientQuantity> |
Serving
Optional. Value representing the nutrition log serving.
Declaration
[JsonProperty("serving")]
public virtual Serving Serving { get; set; }
Property Value
| Type | Description |
|---|---|
| Serving |
TotalCarbohydrate
Optional. Value representing the total carbohydrate of the nutrition log. For nutrition logs created from an identified food, this field will be populated based on the referenced food. For anonymous food, this field will be populated manually.
Declaration
[JsonProperty("totalCarbohydrate")]
public virtual WeightQuantity TotalCarbohydrate { get; set; }
Property Value
| Type | Description |
|---|---|
| WeightQuantity |
TotalFat
Optional. Value representing the total fat of the nutrition log. For nutrition logs created from an identified food, this field will be populated based on the referenced food. For anonymous food, this field will be populated manually.
Declaration
[JsonProperty("totalFat")]
public virtual WeightQuantity TotalFat { get; set; }
Property Value
| Type | Description |
|---|---|
| WeightQuantity |