Data types for nutrition data.

### Hydration

Each data point represents how much water a user drank in a single drink.

### REST

|---|---|
| **Name** | `com.google.hydration` |
| **OAuth permission scopes** | https://www.googleapis.com/auth/fitness.nutrition.read https://www.googleapis.com/auth/fitness.nutrition.write |
| **Fields (format---units)** | **volume** (`float`---liters) Volume of water consumed. |

### Android

|---|---|
| **Name** | `com.google.hydration` |
| **Data type object** | `TYPE_HYDRATION` |
| **Fields (format---units)** | **FIELD_VOLUME** (`float`---liters) Volume of liquid consumed. |

### Nutrition

Each data point represents what nutrients were consumed as part of a meal
or a food item. The data point contains several fields. The nutrients field is
required. And either one, or both, of the meal type and food item fields are required.

> [!NOTE]
> **Note:** If exact meal times are known, add these specific start and end times. If not, add the start and end times of the general time range the meal was eaten.

### REST

|---|---|
| **Name** | `com.google.nutrition` |
| **OAuth permission scopes** | https://www.googleapis.com/auth/fitness.nutrition.read https://www.googleapis.com/auth/fitness.nutrition.write |
| **Fields (format---units)** | |---| | **meal type** (`int`---enum) (optional field) What kind of meal the user ate. Accepted values <br /> ```restructuredtext "intVal": 1 // Unknown "intVal": 2 // Breakfast "intVal": 3 // Lunch "intVal": 4 // Dinner "intVal": 5 // Snack ``` | | **food item** (`string`---n/a) The specific food item for the entry. For example, "banana" or "porridge". | | **nutrients** (`Map<String>`---calories/grams) The nutritional breakdown of the food item eaten. Accepted values ```restructuredtext "key": "calories" // Calories in kcal "key": "fat.total" // Total fat in grams "key": "fat.saturated" // Saturated fat in grams "key": "fat.unsaturated" // Unsaturated fat in grams "key": "fat.polyunsaturated" // Polyunsaturated fat in grams "key": "fat.monounsaturated" // Monounsaturated fat in grams "key": "fat.trans" // Trans fat in grams "key": "cholesterol" // Cholesterol in milligrams "key": "sodium" // Sodium in milligrams "key": "potassium" // Potassium in milligrams "key": "carbs.total" // Total carbohydrates in grams "key": "dietary_fiber" //  Dietary fiber in grams "key": "sugar" // Amount of sugar in grams "key": "protein" // Protein amount in grams ``` | |

<br />

### Android

|---|---|
| **Name** | `com.google.nutrition` |
| **Data type object** | `TYPE_NUTRITION` |
| **Fields (format---units)** | |---| | **FIELD_MEAL_TYPE** (`int`---enum) (optional field) What kind of meal the user ate. Accepted values <br /> ``` MEAL_TYPE_UNKNOWN // Unknown MEAL_TYPE_BREAKFAST // Breakfast MEAL_TYPE_LUNCH // Lunch MEAL_TYPE_DINNER // Dinner MEAL_TYPE_SNACK // Snack ``` | | **FIELD_FOOD_ITEM** (`string`---free-form text) A description of the food for the entry. For example, "banana" or "porridge". | | **FIELD_NUTRIENTS** (`Map<String>`---kilocalories/grams/milligrams) The nutritional breakdown of the food item eaten. Accepted values ``` NUTRIENT_CALORIES // Calories in kcal NUTRIENT_TOTAL_FAT // Total fat in grams NUTRIENT_SATURATED_FAT // Saturated fat in grams NUTRIENT_UNSATURATED_FAT // Unsaturated fat in grams NUTRIENT_POLYUNSATURATED_FAT // Polyunsaturated fat in grams NUTRIENT_MONOUNSATURATED_FAT // Monounsaturated fat in grams NUTRIENT_TRANS_FAT // Trans fat in grams NUTRIENT_CHOLESTEROL // Cholesterol in milligrams NUTRIENT_SODIUM // Sodium in milligrams NUTRIENT_POTASSIUM // Potassium in milligrams NUTRIENT_TOTAL_CARBS // Total carbohydrates in grams NUTRIENT_DIETARY_FIBER //  Dietary fiber in grams NUTRIENT_SUGAR // Amount of sugar in grams NUTRIENT_PROTEIN // Protein amount in grams ``` | |

<br />