As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Devicesandservices Health v4 API

class google.devicesandservices.health_v4.types.ActiveEnergyBurned(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Energy burned as part of an activity, excluding the basal energy burn.

interval

Required. Observed interval

Type

google.devicesandservices.health_v4.types.ObservationTimeInterval

kcal

Required. Energy burned during an activity, measured in kilocalories.

This field is a member of oneof _kcal.

Type

float

class google.devicesandservices.health_v4.types.ActiveEnergyBurnedRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the result of the rollup of active energy burned.

kcal_sum

Output only. Sum of the active energy burned in kilocalories.

This field is a member of oneof _kcal_sum.

Type

float

class google.devicesandservices.health_v4.types.ActiveMinutes(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Record of active minutes in a given time interval.

interval

Required. Observed interval.

Type

google.devicesandservices.health_v4.types.ObservationTimeInterval

active_minutes_by_activity_level

Required. Active minutes by activity level. At most one record per activity level is allowed.

Type

MutableSequence[google.devicesandservices.health_v4.types.ActiveMinutes.ActiveMinutesByActivityLevel]

class ActiveMinutesByActivityLevel(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Active minutes at a given activity level.

activity_level

Required. The level of activity.

Type

google.devicesandservices.health_v4.types.ActiveMinutes.ActivityLevel

active_minutes

Required. Number of whole minutes spent in activity.

This field is a member of oneof _active_minutes.

Type

int

class ActivityLevel(value)[source]

Bases: proto.enums.Enum

Activity level.

Values:
ACTIVITY_LEVEL_UNSPECIFIED (0):

Activity level is unspecified.

LIGHT (1):

Light activity level.

MODERATE (2):

Moderate activity level.

VIGOROUS (3):

Vigorous activity level.

class google.devicesandservices.health_v4.types.ActiveMinutesRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the result of the rollup of the active minutes data type.

active_minutes_rollup_by_activity_level

Active minutes by activity level. At most one record per activity level is allowed.

Type

MutableSequence[google.devicesandservices.health_v4.types.ActiveMinutesRollupValue.ActiveMinutesRollupByActivityLevel]

class ActiveMinutesRollupByActivityLevel(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Active minutes by activity level.

activity_level

The level of activity.

Type

google.devicesandservices.health_v4.types.ActiveMinutes.ActivityLevel

active_minutes_sum

Number of whole minutes spent in activity.

This field is a member of oneof _active_minutes_sum.

Type

int

class google.devicesandservices.health_v4.types.ActiveZoneMinutes(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Record of active zone minutes in a given time interval.

interval

Required. Observed interval.

Type

google.devicesandservices.health_v4.types.ObservationTimeInterval

heart_rate_zone

Required. Heart rate zone in which the active zone minutes have been earned, in the given time interval.

Type

google.devicesandservices.health_v4.types.ActiveZoneMinutes.HeartRateZone

active_zone_minutes

Required. Number of Active Zone Minutes earned in the given time interval. Note: active_zone_minutes equals to 1 for low intensity (fat burn) zones or 2 for high intensity zones (cardio, peak).

This field is a member of oneof _active_zone_minutes.

Type

int

class HeartRateZone(value)[source]

Bases: proto.enums.Enum

Represents different heart rate zones.

Values:
HEART_RATE_ZONE_UNSPECIFIED (0):

Unspecified heart rate zone.

FAT_BURN (1):

The fat burn heart rate zone.

CARDIO (2):

The cardio heart rate zone.

PEAK (3):

The peak heart rate zone.

class google.devicesandservices.health_v4.types.ActiveZoneMinutesRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the result of the rollup of the active zone minutes data type.

sum_in_cardio_heart_zone

Active zone minutes in HeartRateZone.CARDIO.

This field is a member of oneof _sum_in_cardio_heart_zone.

Type

int

sum_in_peak_heart_zone

Active zone minutes in HeartRateZone.PEAK.

This field is a member of oneof _sum_in_peak_heart_zone.

Type

int

sum_in_fat_burn_heart_zone

Active zone minutes in HeartRateZone.FAT_BURN.

This field is a member of oneof _sum_in_fat_burn_heart_zone.

Type

int

class google.devicesandservices.health_v4.types.ActivityLevel(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Internal type to capture activity level during a certain time interval.

interval

Required. Observed interval.

Type

google.devicesandservices.health_v4.types.ObservationTimeInterval

activity_level_type

Required. Activity level type in the given time interval.

Type

google.devicesandservices.health_v4.types.ActivityLevel.ActivityLevelType

class ActivityLevelType(value)[source]

Bases: proto.enums.Enum

Represents different activity level types.

Values:
ACTIVITY_LEVEL_TYPE_UNSPECIFIED (0):

Unspecified activity level type.

SEDENTARY (1):

Sedentary activity level.

LIGHTLY_ACTIVE (2):

Lightly active activity level.

MODERATELY_ACTIVE (3):

Moderately active activity level.

VERY_ACTIVE (4):

Very active activity level.

class google.devicesandservices.health_v4.types.ActivityLevelRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the result of the rollup of the activity level data type.

activity_level_rollups_by_activity_level_type

List of total durations in each activity level type.

Type

MutableSequence[google.devicesandservices.health_v4.types.ActivityLevelRollupValue.ActivityLevelRollupByActivityLevelType]

class ActivityLevelRollupByActivityLevelType(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the total duration in a specific activity level type.

activity_level_type

Activity level type.

Type

google.devicesandservices.health_v4.types.ActivityLevel.ActivityLevelType

total_duration

Total duration in the activity level type.

Type

google.protobuf.duration_pb2.Duration

class google.devicesandservices.health_v4.types.Altitude(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Captures the altitude gain (i.e. deltas), and not level above sea, for a user in millimeters.

interval

Required. Observed interval.

Type

google.devicesandservices.health_v4.types.ObservationTimeInterval

gain_millimeters

Required. Altitude gain in millimeters over the observed interval.

This field is a member of oneof _gain_millimeters.

Type

int

class google.devicesandservices.health_v4.types.AltitudeRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the result of the rollup of the user’s altitude.

gain_millimeters_sum

Sum of the altitude gain in millimeters.

This field is a member of oneof _gain_millimeters_sum.

Type

int

class google.devicesandservices.health_v4.types.BasalEnergyBurned(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Number of calories burned due to basal metabolic rate (BMR) over a period of time.

interval

Required. Observed interval.

Type

google.devicesandservices.health_v4.types.ObservationTimeInterval

kcal

Required. Number of calories burned due to basal metabolic rate in kilocalories over the observed interval.

This field is a member of oneof _kcal.

Type

float

class google.devicesandservices.health_v4.types.BatchDeleteDataPointsOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metadata for a batch delete data points operation.

failed_requests

The key in this map is the index of the request in the requests field in the batch request.

Type

MutableMapping[int, google.rpc.status_pb2.Status]

class FailedRequestsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class google.devicesandservices.health_v4.types.BatchDeleteDataPointsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request to delete a batch of identifiable data points.

parent

Optional. Parent (data type) for the Data Point collection Format: users/me/dataTypes/{data_type}, e.g.:

  • users/me/dataTypes/steps

  • users/me/dataTypes/-

For a list of the supported data types see the [DataPoint data][google.devicesandservices.health.v4.DataPoint] union field.

Deleting data points across multiple data type collections is supported following https://aip.dev/159.

If this is set, the parent of all of the data points specified in names must match this field.

Type

str

names

Required. The names of the DataPoints to delete. A maximum of 10000 data points can be deleted in a single request.

Type

MutableSequence[str]

class google.devicesandservices.health_v4.types.BatchDeleteDataPointsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response containing the list of possibly soft-deleted DataPoints.

data_points

The list of soft-deleted DataPoints, if the data type supports only soft deletion.

Type

MutableSequence[google.devicesandservices.health_v4.types.DataPoint]

class google.devicesandservices.health_v4.types.BloodGlucose(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents a blood glucose level measurement. LINT: LEGACY_NAMES

sample_time

Required. The time at which blood glucose was measured.

Type

google.devicesandservices.health_v4.types.ObservationSampleTime

blood_glucose_milligrams_per_deciliter

Required. Blood glucose level concentration in mg/dL.

This field is a member of oneof _blood_glucose_milligrams_per_deciliter.

Type

float

measurement_source

Optional. Source of the measurement.

Type

google.devicesandservices.health_v4.types.BloodGlucose.MeasurementSource

meal_type

Optional. Meal type of the measurement.

Type

google.devicesandservices.health_v4.types.BloodGlucose.MealType

measurement_timing

Optional. Timing of the measurement.

Type

google.devicesandservices.health_v4.types.BloodGlucose.MeasurementTiming

specimen

Optional. Type of body fluid used to measure the blood glucose.

Type

google.devicesandservices.health_v4.types.BloodGlucose.Specimen

notes

Optional. Standard free-form notes captured at manual logging.

Type

str

class MealType(value)[source]

Bases: proto.enums.Enum

Meal type associated with the measurement.

Values:
MEAL_TYPE_UNSPECIFIED (0):

Unspecified meal type.

BREAKFAST (1):

Breakfast.

LUNCH (2):

Lunch.

DINNER (3):

Dinner.

SNACK (4):

Snack.

class MeasurementSource(value)[source]

Bases: proto.enums.Enum

The clinical method or tool used to measure the blood glucose level.

Values:
MEASUREMENT_SOURCE_UNSPECIFIED (0):

Unspecified measurement source.

SELF_MONITORING_BLOOD_GLUCOSE (1):

Self-monitoring of blood glucose (Blood glucose meter)

CONTINUOUS_GLUCOSE_MONITORING (2):

Continuous glucose monitoring device

LAB_TEST (3):

Laboratory test

class MeasurementTiming(value)[source]

Bases: proto.enums.Enum

Timing of the measurement.

Values:
MEASUREMENT_TIMING_UNSPECIFIED (0):

Unspecified measurement timing.

AFTER_MEAL (1):

Measurement taken after meal.

BEFORE_MEAL (2):

Measurement taken before meal.

FASTING (3):

Measurement taken while fasting.

GENERAL (4):

General measurement (not associated with a meal or time of day).

BEFORE_BED (5):

Measurement taken before bed.

OVER_NIGHT (6):

Measurement taken over night.

class Specimen(value)[source]

Bases: proto.enums.Enum

Type of body fluid used to measure the blood glucose.

Values:
SPECIMEN_UNSPECIFIED (0):

Unspecified specimen.

CAPILLARY_BLOOD (1):

Capillary blood.

INTERSTITIAL_FLUID (2):

Interstitial fluid.

PLASMA (3):

Plasma.

SERUM (4):

Serum.

TEARS (5):

Tears.

WHOLE_BLOOD (6):

Whole blood.

class google.devicesandservices.health_v4.types.BloodGlucoseRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the result of the rollup of the blood glucose data type. LINT: LEGACY_NAMES

blood_glucose_milligrams_per_deciliter_avg

Average blood glucose level in mg/dL.

This field is a member of oneof _blood_glucose_milligrams_per_deciliter_avg.

Type

float

class google.devicesandservices.health_v4.types.BodyFat(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Body fat measurement.

sample_time

Required. The time at which body fat was measured.

Type

google.devicesandservices.health_v4.types.ObservationSampleTime

percentage

Required. Body fat percentage, in range [0, 100].

This field is a member of oneof _percentage.

Type

float

class google.devicesandservices.health_v4.types.BodyFatRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the result of the rollup of the body fat data type.

body_fat_percentage_avg

Average body fat percentage.

This field is a member of oneof _body_fat_percentage_avg.

Type

float

class google.devicesandservices.health_v4.types.CaloriesInHeartRateZoneRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the result of the rollup of the calories in heart rate zone data type.

calories_in_heart_rate_zones

List of calories burned in each heart rate zone.

Type

MutableSequence[google.devicesandservices.health_v4.types.CaloriesInHeartRateZoneRollupValue.CaloriesInHeartRateZoneValue]

class CaloriesInHeartRateZoneValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the amount of kilocalories burned in a specific heart rate zone.

heart_rate_zone

The heart rate zone.

Type

google.devicesandservices.health_v4.types.HeartRateZoneType

kcal

The amount of kilocalories burned in the specified heart rate zone.

This field is a member of oneof _kcal.

Type

float

class google.devicesandservices.health_v4.types.CivilDateTime(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Civil time representation similar to [google.type.DateTime][google.type.DateTime], but ensures that neither the timezone nor the UTC offset can be set to avoid confusion between civil and physical time queries.

date

Required. Calendar date.

Type

google.type.date_pb2.Date

time

Optional. Time of day. Defaults to the start of the day, at midnight if omitted.

Type

google.type.timeofday_pb2.TimeOfDay

class google.devicesandservices.health_v4.types.CivilTimeInterval(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Counterpart of [google.type.Interval][google.type.Interval], but using [CivilDateTime][google.devicesandservices.health.v4.CivilDateTime].

start

Required. The inclusive start of the range.

Type

google.devicesandservices.health_v4.types.CivilDateTime

end

Required. The exclusive end of the range.

Type

google.devicesandservices.health_v4.types.CivilDateTime

class google.devicesandservices.health_v4.types.CoreBodyTemperature(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Core body temperature measurement, distinct from peripheral body temperature, reflects the temperature of the body’s internal organs.

sample_time

Required. The time at which core body temperature was measured.

Type

google.devicesandservices.health_v4.types.ObservationSampleTime

temperature_celsius

Required. The core body temperature in Celsius.

This field is a member of oneof _temperature_celsius.

Type

float

measurement_location

Optional. The location of the core body temperature measurement.

Type

google.devicesandservices.health_v4.types.CoreBodyTemperature.MeasurementLocation

id

Optional. The unique identifier of the core body temperature measurement.

Type

str

class MeasurementLocation(value)[source]

Bases: proto.enums.Enum

Measurement location for core body temperature.

Values:
MEASUREMENT_LOCATION_UNSPECIFIED (0):

Measurement location is unspecified.

OTHER (1):

Other measurement location.

ARMPIT (2):

Armpit measurement location.

BODY (3):

Body measurement location.

EAR (4):

Ear measurement location.

FINGER (5):

Finger measurement location.

GASTRO_INTESTINAL (6):

Gastro-intestinal measurement location.

MOUTH (7):

Mouth measurement location.

RECTUM (8):

Rectum measurement location.

TOE (9):

Toe measurement location.

EAR_DRUM (10):

Ear drum measurement location.

TEMPORAL_ARTERY (11):

Temporal artery measurement location.

FOREHEAD (12):

Forehead measurement location.

URINARY_BLADDER (13):

Urinary bladder measurement location.

NASAL (14):

Nasal measurement location.

NASOPHARYNGEAL (15):

Nasopharyngeal measurement location.

WRIST (16):

Wrist measurement location.

VAGINA (17):

Vagina measurement location.

class google.devicesandservices.health_v4.types.CoreBodyTemperatureRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the result of the rollup of the core body temperature data type.

temperature_celsius_avg

Average core body temperature in Celsius.

This field is a member of oneof _temperature_celsius_avg.

Type

float

temperature_celsius_max

Maximum core body temperature in Celsius.

This field is a member of oneof _temperature_celsius_max.

Type

float

temperature_celsius_min

Minimum core body temperature in Celsius.

This field is a member of oneof _temperature_celsius_min.

Type

float

class google.devicesandservices.health_v4.types.CreateDataPointOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metadata for a create data point operation.

class google.devicesandservices.health_v4.types.CreateDataPointRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request to create an identifiable data point.

parent

Required. The parent resource name where the data point will be created. Format: users/{user}/dataTypes/{data_type}

Type

str

data_point

Required. The data point to create.

Type

google.devicesandservices.health_v4.types.DataPoint

class google.devicesandservices.health_v4.types.CreateSubscriberMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents metadata for creating a subscriber.

class google.devicesandservices.health_v4.types.CreateSubscriberPayload(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Payload for creating a subscriber.

endpoint_uri

Required. The full HTTPS URI where update notifications will be sent. The URI must be a valid URL and use HTTPS as the scheme. This endpoint will be verified during the CreateSubscriber call. See CreateSubscriber RPC documentation for verification details.

Type

str

subscriber_configs

Optional. Configuration for the subscriber.

Type

MutableSequence[google.devicesandservices.health_v4.types.SubscriberConfig]

endpoint_authorization

Required. Authorization mechanism for the subscriber endpoint. The secret within this message is crucial for endpoint verification and for securing webhook notifications.

Type

google.devicesandservices.health_v4.types.EndpointAuthorization

class google.devicesandservices.health_v4.types.CreateSubscriberRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

– Messages – Request message for CreateSubscriber.

parent

Required. The parent resource where this subscriber will be created. Format: projects/{project} Example: projects/my-project-123

Type

str

subscriber

Required. The subscriber to create.

Type

google.devicesandservices.health_v4.types.CreateSubscriberPayload

subscriber_id

Optional. The ID to use for the subscriber, which will become the final component of the subscriber’s resource name.

This value should be 4-36 characters, and valid characters are /a-z/.

Type

str

class google.devicesandservices.health_v4.types.CreateSubscriptionPayload(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Payload for creating a subscription.

data_types

Optional. Data types subscribed to.

Type

MutableSequence[str]

user

Required. Immutable. The resource name of the user for whom this subscription is active. Format: users/{user} where {user} is the public healthUserId as returned by the GetIdentity action in the profile PAPI (see google.devicesandservices.health.v4main.HealthProfileService.GetIdentity).

Type

str

class google.devicesandservices.health_v4.types.CreateSubscriptionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for CreateSubscription.

parent

Required. The parent subscriber. Format: projects/{project}/subscribers/{subscriber} The {subscriber} ID is user-settable (4-36 characters, matching /a-z/) if provided during creation, or system-generated otherwise.

Type

str

subscription_id

Optional. The {subscription_id} is user-settable (4-36 chars, matching /a-z/) or system-generated otherwise. If provided, the ID must be unique within the parent subscriber.

Type

str

subscription

Required. The subscription to create.

Type

google.devicesandservices.health_v4.types.CreateSubscriptionPayload

class google.devicesandservices.health_v4.types.DailyHeartRateVariability(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the daily heart rate variability data type.

At least one of the following fields must be set:

  • average_heart_rate_variability_milliseconds

  • non_rem_heart_rate_beats_per_minute

  • entropy

  • deep_sleep_root_mean_square_of_successive_differences_milliseconds

date

Required. Date (in the user’s timezone) of heart rate variability measurement.

Type

google.type.date_pb2.Date

average_heart_rate_variability_milliseconds

Optional. A user’s average heart rate variability calculated using the root mean square of successive differences (RMSSD) in times between heartbeats.

This field is a member of oneof _average_heart_rate_variability_milliseconds.

Type

float

non_rem_heart_rate_beats_per_minute

Optional. Non-REM heart rate

This field is a member of oneof _non_rem_heart_rate_beats_per_minute.

Type

int

entropy

Optional. The Shanon entropy of heartbeat intervals. Entropy quantifies randomness or disorder in a system. High entropy indicates high HRV. Entropy is measured from the histogram of time interval between successive heart beats values measured during sleep.

This field is a member of oneof _entropy.

Type

float

deep_sleep_root_mean_square_of_successive_differences_milliseconds

Optional. The root mean square of successive differences (RMSSD) value during deep sleep.

This field is a member of oneof _deep_sleep_root_mean_square_of_successive_differences_milliseconds.

Type

float

class google.devicesandservices.health_v4.types.DailyHeartRateZones(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

User’s heart rate zone thresholds based on the Karvonen algorithm for a specific day.

date

Required. Date (in user’s timezone) of the heart rate zones record.

Type

google.type.date_pb2.Date

heart_rate_zones

Required. The heart rate zones.

Type

MutableSequence[google.devicesandservices.health_v4.types.DailyHeartRateZones.HeartRateZone]

class HeartRateZone(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

The heart rate zone.

heart_rate_zone_type

Required. The heart rate zone type.

Type

google.devicesandservices.health_v4.types.HeartRateZoneType

min_beats_per_minute

Required. Minimum heart rate for this zone in beats per minute.

This field is a member of oneof _min_beats_per_minute.

Type

int

max_beats_per_minute

Required. Maximum heart rate for this zone in beats per minute.

This field is a member of oneof _max_beats_per_minute.

Type

int

class google.devicesandservices.health_v4.types.DailyOxygenSaturation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A daily oxygen saturation (SpO2) record. Represents the user’s daily oxygen saturation summary, typically calculated during sleep.

date

Required. Date (in user’s timezone) of the daily oxygen saturation record.

Type

google.type.date_pb2.Date

average_percentage

Required. The average value of the oxygen saturation samples during the sleep.

This field is a member of oneof _average_percentage.

Type

float

lower_bound_percentage

Required. The lower bound of the confidence interval of oxygen saturation samples during sleep.

This field is a member of oneof _lower_bound_percentage.

Type

float

upper_bound_percentage

Required. The upper bound of the confidence interval of oxygen saturation samples during sleep.

This field is a member of oneof _upper_bound_percentage.

Type

float

standard_deviation_percentage

Optional. Standard deviation of the daily oxygen saturation averages from the past 7-30 days.

This field is a member of oneof _standard_deviation_percentage.

Type

float

class google.devicesandservices.health_v4.types.DailyRespiratoryRate(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A daily average respiratory rate (breaths per minute) for a day of the year. One data point per day calculated for the main sleep.

date

Required. The date on which the respiratory rate was measured.

Type

google.type.date_pb2.Date

breaths_per_minute

Required. The average number of breaths taken per minute.

This field is a member of oneof _breaths_per_minute.

Type

float

class google.devicesandservices.health_v4.types.DailyRestingHeartRate(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Measures the daily resting heart rate for a user, calculated using the all day heart rate measurements.

date

Required. Date (in the user’s timezone) of the resting heart rate measurement.

Type

google.type.date_pb2.Date

beats_per_minute

Required. The resting heart rate value in beats per minute.

This field is a member of oneof _beats_per_minute.

Type

int

daily_resting_heart_rate_metadata

Optional. Metadata for the daily resting heart rate.

Type

google.devicesandservices.health_v4.types.DailyRestingHeartRate.DailyRestingHeartRateMetadata

class DailyRestingHeartRateMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metadata for the daily resting heart rate.

calculation_method

Required. The method used to calculate the resting heart rate.

Type

google.devicesandservices.health_v4.types.DailyRestingHeartRate.DailyRestingHeartRateMetadata.CalculationMethod

class CalculationMethod(value)[source]

Bases: proto.enums.Enum

The method used to calculate the resting heart rate.

Values:
CALCULATION_METHOD_UNSPECIFIED (0):

The calculation method is unspecified.

WITH_SLEEP (1):

The resting heart rate is calculated using the sleep data.

ONLY_WITH_AWAKE_DATA (2):

The resting heart rate is calculated using only awake data.

class google.devicesandservices.health_v4.types.DailyRollUpDataPointsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request to roll up data points by civil time intervals.

parent

Required. Parent data type of the Data Point collection.

Format: users/{user}/dataTypes/{data_type}, e.g.:

  • users/me/dataTypes/steps

  • users/me/dataTypes/distance

For a list of the supported data types see the [DailyRollupDataPoint value][google.devicesandservices.health.v4.DailyRollupDataPoint] union field.

Type

str

range_

Required. Closed-open range of data points that will be rolled up. The start time must be aligned with the aggregation window. The maximum range for calories-in-heart-rate-zone, heart-rate, active-minutes and total-calories is 14 days. The maximum range for all other data types is 90 days.

Type

google.devicesandservices.health_v4.types.CivilTimeInterval

window_size_days

Optional. Aggregation window size, in number of days. Defaults to 1 if not specified.

Type

int

page_size

Optional. The maximum number of data points to return. If unspecified, at most 1440 data points will be returned. The maximum page size is 10000; values above that will be truncated accordingly.

Type

int

page_token

Optional. The next_page_token from a previous request, if any. All other request fields need to be the same as in the initial request when the page token is specified.

Type

str

data_source_family

Optional. The data source family name to roll up. If empty, data points from all available data sources will be rolled up.

Format: users/me/dataSourceFamilies/{data_source_family}

The supported values are:

  • users/me/dataSourceFamilies/all-sources - default value

  • users/me/dataSourceFamilies/google-wearables - tracker devices

  • users/me/dataSourceFamilies/google-sources - Google first party sources

Type

str

class google.devicesandservices.health_v4.types.DailyRollUpDataPointsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response containing the list of rolled up data points.

rollup_data_points

Values for each aggregation time window.

Type

MutableSequence[google.devicesandservices.health_v4.types.DailyRollupDataPoint]

class google.devicesandservices.health_v4.types.DailyRollupDataPoint(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Value of a daily rollup for a single civil time interval (aggregation window) of reconciled data points from all data sources, excluding those data points that are identified as recorded by wearables in intervals when they were not actually worn.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

steps

Returned by default when rolling up data points from the steps data type, or when requested explicitly using the steps rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.StepsRollupValue

floors

Returned by default when rolling up data points from the floors data type, or when requested explicitly using the floors rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.FloorsRollupValue

heart_rate

Returned by default when rolling up data points from the heart-rate data type, or when requested explicitly using the heart-rate rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.HeartRateRollupValue

resting_heart_rate_personal_range

Returned by default when rolling up data points from the daily-resting-heart-rate data type, or when requested explicitly using the resting-heart-rate-personal-range rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.RestingHeartRatePersonalRangeRollupValue

heart_rate_variability_personal_range

Returned by default when rolling up data points from the daily-heart-rate-variability data type, or when requested explicitly using the heart-rate-variability-personal-range rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.HeartRateVariabilityPersonalRangeRollupValue

weight

Returned by default when rolling up data points from the weight data type, or when requested explicitly using the weight rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.WeightRollupValue

altitude

Returned by default when rolling up data points from the altitude data type, or when requested explicitly using the altitude rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.AltitudeRollupValue

distance

Returned by default when rolling up data points from the distance data type, or when requested explicitly using the distance rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.DistanceRollupValue

body_fat

Returned by default when rolling up data points from the body-fat data type, or when requested explicitly using the body-fat rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.BodyFatRollupValue

total_calories

Returned by default when rolling up data points from the total-calories data type, or when requested explicitly using the total-calories rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.TotalCaloriesRollupValue

active_zone_minutes

Returned by default when rolling up data points from the active-zone-minutes data type, or when requested explicitly using the active-zone-minutes rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.ActiveZoneMinutesRollupValue

sedentary_period

Returned by default when rolling up data points from the sedentary-period data type, or when requested explicitly using the sedentary-period rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.SedentaryPeriodRollupValue

run_vo2_max

Returned by default when rolling up data points from the run-vo2-max data type, or when requested explicitly using the run-vo2-max rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.RunVO2MaxRollupValue

calories_in_heart_rate_zone

Returned by default when rolling up data points from the calories-in-heart-rate-zone data type, or when requested explicitly using the calories-in-heart-rate-zone rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.CaloriesInHeartRateZoneRollupValue

activity_level

Returned by default when rolling up data points from the activity-level data type, or when requested explicitly using the activity-level rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.ActivityLevelRollupValue

nutrition_log

Returned by default when rolling up data points from the nutrition-log data type, or when requested explicitly using the nutrition-log rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.NutritionLogRollupValue

hydration_log

Returned by default when rolling up data points from the hydration-log data type, or when requested explicitly using the hydration-log rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.HydrationLogRollupValue

time_in_heart_rate_zone

Returned by default when rolling up data points from the time-in-heart-rate-zone data type, or when requested explicitly using the time-in-heart-rate-zone rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.TimeInHeartRateZoneRollupValue

active_minutes

Returned by default when rolling up data points from the active-minutes data type, or when requested explicitly using the active-minutes rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.ActiveMinutesRollupValue

swim_lengths_data

Returned by default when rolling up data points from the swim-lengths-data data type, or when requested explicitly using the swim-lengths-data rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.SwimLengthsDataRollupValue

core_body_temperature

Returned by default when rolling up data points from the core-body-temperature data type, or when requested explicitly using the core-body-temperature rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.CoreBodyTemperatureRollupValue

active_energy_burned

Returned by default when rolling up data points from the active-energy-burned data type.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.ActiveEnergyBurnedRollupValue

blood_glucose

Returned by default when rolling up data points from the blood-glucose data type.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.BloodGlucoseRollupValue

civil_start_time

Start time of the window this value aggregates over

Type

google.devicesandservices.health_v4.types.CivilDateTime

civil_end_time

End time of the window this value aggregates over

Type

google.devicesandservices.health_v4.types.CivilDateTime

class google.devicesandservices.health_v4.types.DailySleepTemperatureDerivations(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Provides derived sleep temperature values, calculated from skin or internal device temperature readings during sleep.

date

Required. Date for which the sleep temperature derivations are calculated.

Type

google.type.date_pb2.Date

nightly_temperature_celsius

Required. The user’s nightly skin temperature. It is the mean of skin temperature samples taken from the user’s sleep.

This field is a member of oneof _nightly_temperature_celsius.

Type

float

baseline_temperature_celsius

Optional. The user’s baseline skin temperature. It is the median of the user’s nightly skin temperature over the past 30 days.

This field is a member of oneof _baseline_temperature_celsius.

Type

float

relative_nightly_stddev_30d_celsius

Optional. The standard deviation of the user’s relative nightly skin temperature (temperature - baseline) over the past 30 days.

This field is a member of oneof _relative_nightly_stddev_30d_celsius.

Type

float

class google.devicesandservices.health_v4.types.DailyVO2Max(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Contains a daily summary of the user’s VO2 max (cardio fitness score), which is the maximum rate of oxygen the body can use during exercise.

date

Required. The date for which the Daily VO2 max was measured.

Type

google.type.date_pb2.Date

vo2_max

Required. Daily VO2 max value measured as in ml consumed oxygen / kg of body weight / min.

This field is a member of oneof _vo2_max.

Type

float

estimated

Optional. An estimated field is added to indicate when the confidence has decreased sufficiently to consider the value an estimation.

Type

bool

cardio_fitness_level

Optional. Represents the user’s cardio fitness level based on their VO2 max.

Type

google.devicesandservices.health_v4.types.DailyVO2Max.CardioFitnessLevel

vo2_max_covariance

Optional. The covariance of the VO2 max value.

This field is a member of oneof _vo2_max_covariance.

Type

float

class CardioFitnessLevel(value)[source]

Bases: proto.enums.Enum

The cardio fitness level categories.

Values:
CARDIO_FITNESS_LEVEL_UNSPECIFIED (0):

Unspecified cardio fitness level.

POOR (1):

Poor cardio fitness level.

FAIR (2):

Fair cardio fitness level.

AVERAGE (3):

Average cardio fitness level.

GOOD (4):

Good cardio fitness level.

VERY_GOOD (5):

Very good cardio fitness level.

EXCELLENT (6):

Excellent cardio fitness level.

class google.devicesandservices.health_v4.types.DataPoint(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A computed or recorded metric.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

steps

Optional. Data for points in the steps interval data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.Steps

floors

Optional. Data for points in the floors interval data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.Floors

heart_rate

Optional. Data for points in the heart-rate sample data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.HeartRate

sleep

Optional. Data for points in the sleep session data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.Sleep

daily_resting_heart_rate

Optional. Data for points in the daily-resting-heart-rate daily data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.DailyRestingHeartRate

daily_heart_rate_variability

Optional. Data for points in the daily-heart-rate-variability daily data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.DailyHeartRateVariability

exercise

Optional. Data for points in the exercise session data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.Exercise

weight

Optional. Data for points in the weight sample data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.Weight

altitude

Optional. Data for points in the altitude interval data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.Altitude

distance

Optional. Data for points in the distance interval data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.Distance

body_fat

Optional. Data for points in the body-fat sample data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.BodyFat

active_zone_minutes

Optional. Data for points in the active-zone-minutes interval data type collection, measured in minutes.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.ActiveZoneMinutes

heart_rate_variability

Optional. Data for points in the heart-rate-variability sample data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.HeartRateVariability

daily_sleep_temperature_derivations

Optional. Data for points in the daily-sleep-temperature-derivations daily data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.DailySleepTemperatureDerivations

sedentary_period

Optional. Data for points in the sedentary-period interval data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.SedentaryPeriod

run_vo2_max

Optional. Data for points in the run-vo2-max sample data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.RunVO2Max

oxygen_saturation

Optional. Data for points in the oxygen-saturation sample data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.OxygenSaturation

daily_oxygen_saturation

Optional. Data for points in the daily-oxygen-saturation daily data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.DailyOxygenSaturation

activity_level

Optional. Data for points in the activity-level daily data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.ActivityLevel

vo2_max

Optional. Data for points in the vo2-max sample data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.VO2Max

daily_vo2_max

Optional. Data for points in the daily-vo2-max daily data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.DailyVO2Max

nutrition_log

Optional. Data for points in the nutrition-log session data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.NutritionLog

irregular_rhythm_notification

Optional. Data for points in the irregular-rhythm-notification session data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.IrregularRhythmNotification

electrocardiogram

Optional. Data for points in the electrocardiogram session data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.Electrocardiogram

daily_heart_rate_zones

Optional. Data for points in the daily-heart-rate-zones daily data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.DailyHeartRateZones

hydration_log

Optional. Data for points in the hydration-log session data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.HydrationLog

food

Optional. The food details.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.Food

time_in_heart_rate_zone

Optional. Data for points in the time-in-heart-rate-zone interval data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.TimeInHeartRateZone

active_minutes

Optional. Data for points in the active-minutes interval data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.ActiveMinutes

respiratory_rate_sleep_summary

Optional. Data for points in the respiratory-rate-sleep-summary sample data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.RespiratoryRateSleepSummary

daily_respiratory_rate

Optional. Data for points in the daily-respiratory-rate daily data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.DailyRespiratoryRate

swim_lengths_data

Optional. Data for points in the swim-lengths-data interval data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.SwimLengthsData

height

Optional. Data for points in the height sample data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.Height

basal_energy_burned

Optional. Data for points in the basal-energy-burned interval data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.BasalEnergyBurned

core_body_temperature

Optional. Data for points in the core-body-temperature sample data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.CoreBodyTemperature

active_energy_burned

Optional. Data for points in the active-energy-burned interval data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.ActiveEnergyBurned

food_measurement_unit

Optional. The food measurement unit details.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.FoodMeasurementUnit

blood_glucose

Optional. Data for points in the blood-glucose sample data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.BloodGlucose

name

Identifier. Data point name, only supported for the subset of identifiable data types. For the majority of the data types, individual data points do not need to be identified and this field would be empty.

Format: users/{user}/dataTypes/{data_type}/dataPoints/{data_point}

Example: users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef

The {user} ID is a system-generated identifier, as described in [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id].

The {data_type} ID corresponds to the kebab-case version of the field names in the [DataPoint data][google.devicesandservices.health.v4.DataPoint] union field, e.g. total-calories for the total_calories field.

The {data_point} ID can be client-provided or system-generated. If client-provided, it must be a string of 4-63 characters, containing only lowercase letters, numbers, and hyphens.

Type

str

data_source

Optional. Data source information for the metric

Type

google.devicesandservices.health_v4.types.DataSource

class google.devicesandservices.health_v4.types.DataSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Data Source definition to track the origin of data.

Each health data point, regardless of the complexity or data model (whether a simple step count or a detailed sleep session) must retain information about its source of origin (e.g. the device or app that collected it).

recording_method

Optional. Captures how the data was recorded.

Type

google.devicesandservices.health_v4.types.DataSource.RecordingMethod

device

Optional. Captures metadata for raw data points originating from devices. We expect this data source to be used for data points written on device sync.

Type

google.devicesandservices.health_v4.types.DataSource.Device

application

Output only. Captures metadata for the application that provided this data.

Type

google.devicesandservices.health_v4.types.DataSource.Application

platform

Output only. Captures the platform that uploaded the data.

Type

google.devicesandservices.health_v4.types.DataSource.Platform

class Application(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Optional metadata for the application that provided this data.

package_name

Output only. A unique identifier for the mobile application that was the source of the data.

This is typically the application’s package name on Android (e.g., com.google.fitbit) or the bundle ID on iOS. This field is informational and helps trace data origin. This field is system-populated when the data is uploaded from the Fitbit mobile application, Health Connect or Health Kit.

Type

str

web_client_id

Output only. The client ID of the application that recorded the data.

This ID is a legacy Fitbit API client ID, which is different from a Google OAuth client ID. Example format: ABC123. This field is system-populated and used for tracing data from legacy Fitbit API integrations. This field is system-populated when the data is uploaded from a legacy Fitbit API integration.

Type

str

google_web_client_id

Output only. The Google OAuth 2.0 client ID of the web application or service that recorded the data.

This is the client ID used during the Google OAuth flow to obtain user credentials. This field is system-populated when the data is uploaded from Google Web API.

Type

str

class Device(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Captures metadata about the device that recorded the measurement.

form_factor

Optional. Captures the form factor of the device.

Type

google.devicesandservices.health_v4.types.DataSource.Device.FormFactor

manufacturer

Optional. An optional manufacturer of the device.

Type

str

display_name

Optional. An optional name for the device.

Type

str

class FormFactor(value)[source]

Bases: proto.enums.Enum

Form factor of the device, e.g. phone, watch, band, etc.

Values:
FORM_FACTOR_UNSPECIFIED (0):

The form factor is unspecified.

FITNESS_BAND (1):

The device is a fitness band.

WATCH (2):

The device is a watch.

PHONE (3):

The device is a phone.

RING (4):

The device is a ring.

CHEST_STRAP (5):

The device is a chest strap.

SCALE (6):

The device is a scale.

TABLET (7):

The device is a tablet.

HEAD_MOUNTED (8):

The device is a head mounted device.

SMART_DISPLAY (9):

The device is a smart display.

class Platform(value)[source]

Bases: proto.enums.Enum

The platform that uploaded the data. Additional values may be added in the future. Clients should be prepared to handle unknown values gracefully.

Values:
PLATFORM_UNSPECIFIED (0):

The platform is unspecified.

FITBIT (1):

The data was uploaded from Fitbit.

HEALTH_CONNECT (2):

The data was uploaded from Health Connect.

HEALTH_KIT (3):

The data was uploaded from Health Kit.

FIT (4):

The data was uploaded from Google Fit.

FITBIT_WEB_API (5):

The data was uploaded from Fitbit legacy Web API.

NEST (6):

The data was uploaded from Nest devices.

GOOGLE_WEB_API (7):

The data was uploaded from Google Health API.

GOOGLE_PARTNER_INTEGRATION (8):

The data was uploaded from Google Partner Integrations.

class RecordingMethod(value)[source]

Bases: proto.enums.Enum

The method by which the data was recorded.

Values:
RECORDING_METHOD_UNSPECIFIED (0):

The recording method is unspecified.

MANUAL (1):

The data was manually entered by the user.

PASSIVELY_MEASURED (2):

The data was passively measured by a device.

DERIVED (3):

The data was derived from other data, e.g., by an algorithm in the backend.

ACTIVELY_MEASURED (4):

The data was actively measured by a device.

UNKNOWN (5):

The recording method is unknown. This is set when the data is uploaded from a third party app that does not provide this information.

class google.devicesandservices.health_v4.types.DataType(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents a type of health data a user can have data points recorded for. It matches the parent resource of collection containing data points of the given type.

Clients currently do not need to interact with this resource directly.

name

Identifier. The resource name of the data type.

Format: users/{user}/dataTypes/{data_type}

See [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name] for examples and possible values.

Type

str

class google.devicesandservices.health_v4.types.DeleteSubscriberMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents metadata for deleting a subscriber.

class google.devicesandservices.health_v4.types.DeleteSubscriberRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for DeleteSubscriber.

name

Required. The name of the subscriber to delete. Format: projects/{project}/subscribers/{subscriber} Example: projects/my-project/subscribers/my-subscriber-123 The {subscriber} ID is user-settable (4-36 characters, matching /a-z/) or system-generated if not provided during creation.

Type

str

force

Optional. If set to true, any child resources (e.g., subscriptions) will also be deleted. If false (default) and child resources exist, the request will fail.

Type

bool

class google.devicesandservices.health_v4.types.DeleteSubscriptionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for DeleteSubscription.

name

Required. The resource name of the subscription to delete. Format: projects/{project}/subscribers/{subscriber}/subscriptions/{subscription} Example: projects/my-project/subscribers/my-subscriber-123/subscriptions/my-subscription-456 The {subscriber} ID is user-settable (4-36 characters, matching /a-z/) if provided during creation, or system-generated otherwise. The {subscription} ID is user-settable (4-36 characters, matching /a-z/) or system-generated if not provided during creation.

Type

str

class google.devicesandservices.health_v4.types.Distance(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Distance traveled over an interval of time.

interval

Required. Observed interval.

Type

google.devicesandservices.health_v4.types.ObservationTimeInterval

millimeters

Required. Distance in millimeters over the observed interval.

This field is a member of oneof _millimeters.

Type

int

class google.devicesandservices.health_v4.types.DistanceRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Result of the rollup of the user’s distance.

millimeters_sum

Sum of the distance in millimeters.

This field is a member of oneof _millimeters_sum.

Type

int

class google.devicesandservices.health_v4.types.Electrocardiogram(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents an Electrocardiogram (ECG) measurement session. This data type is based on SaMD feature and any changes to it may require additional review.

interval

Required. Observed interval.

NOTE: Historical ECG data lacks timezone offsets, so start_utc_offset and end_utc_offset will be missing or default to zero. As a result, the civil time fields within this interval will default to UTC. It is recommended to use physical time fields instead for accurate time referencing.

NOTE: The start_time and end_time of the interval are equal, representing the reading time.

Type

google.devicesandservices.health_v4.types.SessionTimeInterval

beats_per_minute_avg

Optional. Average heart rate recorded during ECG reading in beats per minute.

This field is a member of oneof _beats_per_minute_avg.

Type

int

result_classification

Optional. The result classification of the ECG reading.

Type

google.devicesandservices.health_v4.types.Electrocardiogram.ResultClassification

waveform_samples

Optional. An array of voltage values representing lead I ECG values. Each sample represents voltage difference in ECG graph. The first value in array corresponds to the start of the reading.

Type

MutableSequence[int]

sampling_frequency_hertz

Optional. The sampling frequency of waveform samples in hertz.

This field is a member of oneof _sampling_frequency_hertz.

Type

int

millivolts_scaling_factor

Optional. The factor by which to divide waveform samples to get voltage in millivolts: millivolts = waveform_sample / millivolts_scaling_factor.

This field is a member of oneof _millivolts_scaling_factor.

Type

int

lead_number

Optional. The number of leads used for ECG reading.

This field is a member of oneof _lead_number.

Type

int

medical_device_info

Output only. The meta information for the compatible device used to conduct the measurement.

ECG measurements typically populate firmware_version, feature_version, and device_model.

Type

google.devicesandservices.health_v4.types.MedicalDeviceInfo

class ResultClassification(value)[source]

Bases: proto.enums.Enum

The classification of the ECG reading rhythm.

Values:
RESULT_CLASSIFICATION_UNSPECIFIED (0):

Unspecified result classification.

NORMAL_SINUS_RHYTHM (1):

Heart rhythm appears normal. Corresponds to result “Normal Sinus Rhythm”.

ATRIAL_FIBRILLATION (2):

Signs of Atrial Fibrillation detected. Corresponds to result “Atrial Fibrillation”.

INCONCLUSIVE (3):

The reading is inconclusive as it could not be classified. Corresponds to result “Inconclusive”.

INCONCLUSIVE_HIGH_HEART_RATE (4):

The reading is inconclusive as it could not be classified because heart rate is high (>120bpm). Corresponds to result “Inconclusive: High heart rate”.

INCONCLUSIVE_LOW_HEART_RATE (5):

The reading is inconclusive as it could not be classified because heart rate is low (<50bpm). Corresponds to result “Inconclusive: Low heart rate”.

UNREADABLE (6):

The reading is unreadable.

NOT_ANALYZED (7):

The reading was not analyzed.

class google.devicesandservices.health_v4.types.EndpointAuthorization(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Authorization mechanism for a subscriber endpoint. For all requests sent by the Webhooks service, the JSON payload is cryptographically signed. The signature is delivered in the GOOGLE-HEALTH-API-SIGNATURE HTTP header. This is an ECDSA (NIST P256) signature of the JSON payload. Clients must verify this signature using Google Health API’s public key to confirm the payload was sent by the Health API.

secret

Required. Input only. Provides a client-provided secret that will be sent with each notification to the subscriber endpoint using the “Authorization” header. The value must include the authorization scheme, e.g., “Bearer ” or “Basic “, as it will be used as the full Authorization header value. This secret is used by the API to test the endpoint during CreateSubscriber and UpdateSubscriber calls, and will be sent in the Authorization header for all subsequent webhook notifications to this endpoint.

Type

str

secret_set

Output only. Whether the secret is set.

Type

bool

class google.devicesandservices.health_v4.types.EnergyQuantity(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the energy quantity.

kcal

Required. Value representing the energy in kilocalories.

This field is a member of oneof _kcal.

Type

float

user_provided_unit

Optional. Value representing the user provided unit.

Type

google.devicesandservices.health_v4.types.EnergyUnit

class google.devicesandservices.health_v4.types.EnergyUnit(value)[source]

Bases: proto.enums.Enum

Enum representing the unit of energy.

Values:
ENERGY_UNIT_UNSPECIFIED (0):

Unspecified energy unit.

JOULE (1):

Value representing joule.

KILOJOULE (2):

Value representing kilojoule.

KILOCALORIE (3):

Value representing kilocalorie.

SMALL_CALORIE (4):

Value representing small calorie.

CALORIE (5):

Value representing calorie.

class google.devicesandservices.health_v4.types.Exercise(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

An exercise that stores information about a physical activity.

interval

Required. Observed exercise interval

Type

google.devicesandservices.health_v4.types.SessionTimeInterval

exercise_type

Required. The type of activity performed during an exercise.

Type

google.devicesandservices.health_v4.types.Exercise.ExerciseType

splits

Optional. The default split is 1 km or 1 mile. - if the movement distance is less than the

default, then there are no splits

  • if the movement distance is greater than or

equal to the default,

then we have splits

Type

MutableSequence[google.devicesandservices.health_v4.types.Exercise.SplitSummary]

exercise_events

Optional. Exercise events that happen during an exercise, such as pause & restarts.

Type

MutableSequence[google.devicesandservices.health_v4.types.Exercise.ExerciseEvent]

split_summaries

Optional. Laps or splits recorded within an exercise. Laps could be split based on distance or other criteria (duration, etc.) Laps should not be overlapping with each other.

Type

MutableSequence[google.devicesandservices.health_v4.types.Exercise.SplitSummary]

metrics_summary

Required. Summary metrics for this exercise ( )

Type

google.devicesandservices.health_v4.types.MetricsSummary

exercise_metadata

Optional. Additional exercise metadata.

Type

google.devicesandservices.health_v4.types.Exercise.ExerciseMetadata

display_name

Required. Exercise display name.

Type

str

active_duration

Optional. Duration excluding pauses.

Type

google.protobuf.duration_pb2.Duration

notes

Optional. Standard free-form notes captured at manual logging.

Type

str

update_time

Output only. This is the timestamp of the last update to the exercise.

Type

google.protobuf.timestamp_pb2.Timestamp

create_time

Output only. Represents the timestamp of the creation of the exercise.

Type

google.protobuf.timestamp_pb2.Timestamp

class ExerciseEvent(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents instantaneous events that happen during an exercise, such as start, stop, pause, split.

event_time

Required. Exercise event time

Type

google.protobuf.timestamp_pb2.Timestamp

event_utc_offset

Required. Exercise event time offset from UTC

Type

google.protobuf.duration_pb2.Duration

exercise_event_type

Required. The type of the event, such as start, stop, pause, resume.

Type

google.devicesandservices.health_v4.types.Exercise.ExerciseEvent.ExerciseEventType

class ExerciseEventType(value)[source]

Bases: proto.enums.Enum

The type of the event, such as start, stop, pause, resume.

Values:
EXERCISE_EVENT_TYPE_UNSPECIFIED (0):

Exercise event type is unspecified.

START (1):

Exercise start event.

STOP (2):

Exercise stop event.

PAUSE (3):

Exercise pause event.

RESUME (4):

Exercise resume event.

AUTO_PAUSE (5):

Exercise auto-pause event.

AUTO_RESUME (6):

Exercise auto-resume event.

class ExerciseMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Additional exercise metadata.

pool_length_millimeters

Optional. Pool length in millimeters. Only present in the swimming exercises.

This field is a member of oneof _pool_length_millimeters.

Type

int

has_gps

Optional. Whether the exercise had GPS tracking.

Type

bool

class ExerciseType(value)[source]

Bases: proto.enums.Enum

The type of activity performed during an exercise.

Values:
EXERCISE_TYPE_UNSPECIFIED (0):

Exercise type is unspecified.

RUNNING (1):

Running type.

WALKING (2):

Walking type.

BIKING (3):

Biking type.

SWIMMING (4):

Swimming type.

HIKING (5):

Hiking type.

YOGA (6):

Yoga type.

PILATES (7):

Pilates type.

WORKOUT (8):

Workout type.

HIIT (9):

HIIT type.

WEIGHTLIFTING (10):

Weightlifting type.

STRENGTH_TRAINING (11):

Strength training type.

OTHER (12):

Other type.

class SplitSummary(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents splits or laps recorded within an exercise. Lap events partition a workout into segments based on criteria like distance, time, or calories.

start_time

Required. Lap start time

Type

google.protobuf.timestamp_pb2.Timestamp

start_utc_offset

Required. Lap start time offset from UTC

Type

google.protobuf.duration_pb2.Duration

end_time

Required. Lap end time

Type

google.protobuf.timestamp_pb2.Timestamp

end_utc_offset

Required. Lap end time offset from UTC

Type

google.protobuf.duration_pb2.Duration

active_duration

Output only. Lap time excluding the pauses.

Type

google.protobuf.duration_pb2.Duration

metrics_summary

Required. Summary metrics for this split.

Type

google.devicesandservices.health_v4.types.MetricsSummary

split_type

Required. Method used to split the exercise laps. Users may manually mark the lap as complete even if the tracking is automatic.

Type

google.devicesandservices.health_v4.types.Exercise.SplitSummary.SplitType

class SplitType(value)[source]

Bases: proto.enums.Enum

The type of the split, such as manual, duration, distance, calories.

Values:
SPLIT_TYPE_UNSPECIFIED (0):

Split type is unspecified.

MANUAL (1):

Manual split.

DURATION (2):

Split by duration.

DISTANCE (3):

Split by distance.

CALORIES (4):

Split by calories.

class google.devicesandservices.health_v4.types.ExportExerciseTcxRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents a request to export exercise data in TCX format.

name

Required. The resource name of the exercise data point to export.

Format: users/{user}/dataTypes/exercise/dataPoints/{data_point} Example: users/me/dataTypes/exercise/dataPoints/2026443605080188808

The {user} is the alias "me" currently. Future versions may support user IDs. The {data_point} ID maps to the exercise ID, which is a long integer.

Type

str

partial_data

Optional. Indicates whether to include the TCX data points when the GPS data is not available. If not specified, defaults to false and partial data will not be included.

Type

bool

class google.devicesandservices.health_v4.types.ExportExerciseTcxResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents a Response for exporting exercise data in TCX format.

tcx_data

Contains the exported TCX data.

This field is intended for gRPC clients, as media download integration is not supported for gRPC. HTTP clients should instead use the alt=media query parameter to download the raw binary TCX file.

Type

str

class google.devicesandservices.health_v4.types.Floors(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Gained elevation measured in floors over the time interval

interval

Required. Observed interval

Type

google.devicesandservices.health_v4.types.ObservationTimeInterval

count

Required. Number of floors in the recorded interval

This field is a member of oneof _count.

Type

int

class google.devicesandservices.health_v4.types.FloorsRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the result of the rollup of the user’s floors.

count_sum

Sum of the floors count.

This field is a member of oneof _count_sum.

Type

int

class google.devicesandservices.health_v4.types.Food(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents a food item.

display_name

Required. The display name of the food.

Type

str

brand

Optional. The brand of the food.

Type

str

access_level

Required. The access level of the food.

Type

google.devicesandservices.health_v4.types.FoodAccessLevel

description

Optional. The description of the food.

Type

str

language_code

Optional. The language code where the food is available in format xx-XX. Supported values are defined in [Settings.food_language_code][google.devicesandservices.health.v4.Settings.food_language_code].

Type

str

meal_type

Optional. The meal type associated with this food.

Type

google.devicesandservices.health_v4.types.MealType

nutrients

Optional. Value representing the nutrients of the food for the default serving.

Type

MutableSequence[google.devicesandservices.health_v4.types.NutrientQuantity]

energy_from_fat

Optional. Value representing the energy from fat of the food for the default serving.

Type

google.devicesandservices.health_v4.types.EnergyQuantity

total_carbohydrate

Optional. Value representing the total carbohydrate of the food for the default serving.

Type

google.devicesandservices.health_v4.types.WeightQuantity

total_fat

Optional. Value representing the total fat of the food for the default serving.

Type

google.devicesandservices.health_v4.types.WeightQuantity

energy_min

Optional. Value representing the minimum energy of the food for the default serving.

Type

google.devicesandservices.health_v4.types.EnergyQuantity

energy_avg

Optional. Value representing the average energy of the food for the default serving.

Type

google.devicesandservices.health_v4.types.EnergyQuantity

energy_max

Optional. Value representing the maximum energy of the food for the default serving.

Type

google.devicesandservices.health_v4.types.EnergyQuantity

default_serving

Required. Value representing the default serving of the food.

Type

google.devicesandservices.health_v4.types.Food.FoodServing

servings

Optional. The serving of the food.

Type

MutableSequence[google.devicesandservices.health_v4.types.Food.FoodServing]

class FoodServing(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents different properties and information about the serving of a specific food.

amount

Optional. Amount of food consumed, fractional values are supported.

This field is a member of oneof _amount.

Type

float

food_measurement_unit

Required. Food measurement unit

Type

str

food_measurement_unit_display_name

Output only. Legacy measurement unit for serving size in singular form (e.g. “piece”, “gram”).

Type

str

food_measurement_unit_display_name_plural

Output only. Legacy measurement unit for serving size in plural form (e.g. “pieces”, “grams”).

Type

str

multiplier

Optional. Value representing the multiplier used to compute the energy when using this serving instead of the default serving.

Type

float

class google.devicesandservices.health_v4.types.FoodAccessLevel(value)[source]

Bases: proto.enums.Enum

Enum representing the access level of a food item.

Values:
FOOD_ACCESS_LEVEL_UNSPECIFIED (0):

Unspecified food access level.

FOOD_ACCESS_LEVEL_PUBLIC (1):

Public food access level.

FOOD_ACCESS_LEVEL_PRIVATE (2):

Private food access level.

class google.devicesandservices.health_v4.types.FoodMeasurementUnit(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents a food measurement unit.

display_name

Required. The display name of the food measurement unit (e.g., “gram”, “piece”).

Type

str

plural_display_name

Optional. The plural display name of the food measurement unit (e.g., “grams”, “pieces”).

Type

str

class google.devicesandservices.health_v4.types.GetDataPointRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for getting a single data point

name

Required. The name of the data point to retrieve.

Format: users/{user}/dataTypes/{data_type}/dataPoints/{data_point}

See [DataPoint.name][google.devicesandservices.health.v4.DataPoint.name] for examples and possible values.

Type

str

class google.devicesandservices.health_v4.types.GetIdentityRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for getting Identity details.

name

Required. The resource name of the Identity. Format: users/me/identity

Type

str

class google.devicesandservices.health_v4.types.GetIrnProfileRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for getting IRN Profile details.

name

Required. The resource name of the IRN Profile. Format: users/{user}/irnProfile Example: users/1234567890/irnProfile or users/me/irnProfile The {user} ID is a system-generated Google Health API user ID, a string of 1-63 characters consisting of lowercase and uppercase letters, numbers, and hyphens. The literal me can also be used to refer to the authenticated user.

Type

str

class google.devicesandservices.health_v4.types.GetPairedDeviceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for getting a Device.

name

Required. The name of the device to retrieve. Format: users/{user}/devices/{device}

Type

str

class google.devicesandservices.health_v4.types.GetProfileRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for getting Profile details.

name

Required. The name of the Profile. Format: users/me/profile.

Type

str

class google.devicesandservices.health_v4.types.GetSettingsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for getting Settings details.

name

Required. The name of the Settings. Format: users/me/settings.

Type

str

class google.devicesandservices.health_v4.types.HeartRate(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A heart rate measurement.

sample_time

Required. Observation time

Type

google.devicesandservices.health_v4.types.ObservationSampleTime

beats_per_minute

Required. The heart rate value in beats per minute.

This field is a member of oneof _beats_per_minute.

Type

int

metadata

Optional. Metadata about the heart rate sample.

Type

google.devicesandservices.health_v4.types.HeartRate.HeartRateMetadata

class HeartRateMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Heart rate metadata.

motion_context

Optional. Indicates the user’s level of activity when the heart rate sample was measured

Type

google.devicesandservices.health_v4.types.HeartRate.HeartRateMetadata.MotionContext

sensor_location

Optional. Indicates the location of the sensor that measured the heart rate.

Type

google.devicesandservices.health_v4.types.HeartRate.HeartRateMetadata.SensorLocation

class MotionContext(value)[source]

Bases: proto.enums.Enum

The user’s level of activity when the heart rate sample was measured.

Values:
MOTION_CONTEXT_UNSPECIFIED (0):

The default value when no data is available.

ACTIVE (1):

The user is active.

SEDENTARY (2):

The user is inactive.

class SensorLocation(value)[source]

Bases: proto.enums.Enum

The location of the sensor that measured the heart rate.

Values:
SENSOR_LOCATION_UNSPECIFIED (0):

The default value when no data is available.

CHEST (1):

Chest sensor.

WRIST (2):

Wrist sensor.

FINGER (3):

Finger sensor.

HAND (4):

Hand sensor.

EAR_LOBE (5):

Ear lobe sensor.

FOOT (6):

Foot sensor.

class google.devicesandservices.health_v4.types.HeartRateRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the result of the rollup of the heart rate data type.

beats_per_minute_avg

The average heart rate value in the interval.

This field is a member of oneof _beats_per_minute_avg.

Type

float

beats_per_minute_max

The maximum heart rate value in the interval.

This field is a member of oneof _beats_per_minute_max.

Type

float

beats_per_minute_min

The minimum heart rate value in the interval.

This field is a member of oneof _beats_per_minute_min.

Type

float

class google.devicesandservices.health_v4.types.HeartRateVariability(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Captures user’s heart rate variability (HRV) as measured by the root mean square of successive differences (RMSSD) between normal heartbeats or by standard deviation of the inter-beat intervals (SDNN).

sample_time

Required. The time of the heart rate variability measurement.

Type

google.devicesandservices.health_v4.types.ObservationSampleTime

root_mean_square_of_successive_differences_milliseconds

Optional. The root mean square of successive differences between normal heartbeats. This is a measure of heart rate variability used by Google Health.

This field is a member of oneof _root_mean_square_of_successive_differences_milliseconds.

Type

float

standard_deviation_milliseconds

Optional. The standard deviation of the heart rate variability measurement.

This field is a member of oneof _standard_deviation_milliseconds.

Type

float

class google.devicesandservices.health_v4.types.HeartRateVariabilityPersonalRangeRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the result of the rollup of the user’s daily heart rate variability personal range.

average_heart_rate_variability_milliseconds_min

The lower bound of the user’s average heart rate variability personal range.

This field is a member of oneof _average_heart_rate_variability_milliseconds_min.

Type

float

average_heart_rate_variability_milliseconds_max

The upper bound of the user’s average heart rate variability personal range.

This field is a member of oneof _average_heart_rate_variability_milliseconds_max.

Type

float

class google.devicesandservices.health_v4.types.HeartRateZoneType(value)[source]

Bases: proto.enums.Enum

The heart rate zone type.

Values:
HEART_RATE_ZONE_TYPE_UNSPECIFIED (0):

Unspecified heart rate zone.

LIGHT (1):

The light heart rate zone.

MODERATE (2):

The moderate heart rate zone.

VIGOROUS (3):

The vigorous heart rate zone.

PEAK (4):

The peak heart rate zone.

class google.devicesandservices.health_v4.types.Height(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Body height measurement.

sample_time

Required. The time at which the height was recorded.

Type

google.devicesandservices.health_v4.types.ObservationSampleTime

height_millimeters

Required. Height of the user in millimeters.

This field is a member of oneof _height_millimeters.

Type

int

class google.devicesandservices.health_v4.types.HydrationLog(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Holds information about a user logged hydration.

interval

Required. Observed interval.

Type

google.devicesandservices.health_v4.types.SessionTimeInterval

amount_consumed

Required. Amount of liquid (ex. water) consumed.

Type

google.devicesandservices.health_v4.types.VolumeQuantity

class google.devicesandservices.health_v4.types.HydrationLogRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the result of the rollup of the hydration log data type.

amount_consumed

Rollup for amount consumed.

Type

google.devicesandservices.health_v4.types.HydrationLogRollupValue.VolumeQuantityRollup

class VolumeQuantityRollup(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Rollup for volume quantity.

milliliters_sum

Required. The sum of volume in milliliters.

This field is a member of oneof _milliliters_sum.

Type

float

user_provided_unit_last

Optional. The user provided unit on the last element.

Type

google.devicesandservices.health_v4.types.VolumeUnit

class google.devicesandservices.health_v4.types.Identity(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents details about the Google user’s identity.

name

Identifier. The resource name of this Identity resource. Format: users/me/identity

Type

str

legacy_user_id

Output only. The legacy Fitbit User identifier. This is the Fitbit ID used in the legacy Fitbit APIs (v1-v3). It can be referenced by clients migrating from the legacy Fitbit APIs to map their existing identifiers to the new Google user ID.

It must not be used for any other purpose. It is not of any use for new clients using only the Google Health APIs.

Valid values are strings of 1-63 characters, and valid characters are lowercase and uppercase letters, numbers, and hyphens.

Type

str

health_user_id

Output only. The Google User Identifier in the Google Health APIs. It matches the {user} resource ID segment in the resource name paths, e.g. users/{user}/dataTypes/steps.

Valid values are strings of 1-63 characters, and valid characters are lowercase and uppercase letters, numbers, and hyphens.

Type

str

class google.devicesandservices.health_v4.types.IrnProfile(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Irregular Rhythm Notifications (IRN) Profile details.

The Irregular Rhythm Notifications (IRN) feature checks for signs of atrial fibrillation (AFib). The IrnProfile details include information about the user’s onboarding status, enrollment status, and the last update time of analyzable data for this feature.

name

Identifier. The resource name of this IrnProfile resource.

Format: users/{user}/irnProfile Example: users/1234567890/irnProfile or users/me/irnProfile The {user} ID is a system-generated Google Health API user ID, a string of 1-63 characters consisting of lowercase and uppercase letters, numbers, and hyphens. The literal me can also be used to refer to the authenticated user.

Type

str

onboarding_status

Required. Whether or not the user has onboarded onto the IRN feature.

Type

bool

enrollment_status

Required. Whether or not the user is currently enrolled in having their data processed for IRN alerts.

Type

bool

update_time

Output only. The timestamp of the last piece of analyzable data synced by the user.

Type

google.protobuf.timestamp_pb2.Timestamp

class google.devicesandservices.health_v4.types.IrregularRhythmNotification(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents an Irregular Rhythm Notification alert, indicating a potential sign of atrial fibrillation (AFib). This data type is based on SaMD feature and any changes to it may require additional review.

interval

Required. Observed interval.

Type

google.devicesandservices.health_v4.types.SessionTimeInterval

alert_windows

Optional. The overlapping analysis windows that were used to evaluate rhythm for potential AFib, containing specific information about the user’s heart rhythm.

Type

MutableSequence[google.devicesandservices.health_v4.types.IrregularRhythmNotification.AlertWindow]

medical_device_info

Output only. The meta information for the compatible device used to conduct the measurement.

Irregular Rhythm Notification measurements typically populate algorithm_version, service_version, and device_model.

Type

google.devicesandservices.health_v4.types.MedicalDeviceInfo

class AlertWindow(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

An analysis window evaluated for AFib.

Note: The current version of the algorithm will only produce alerts if all windows are positive. So anything returned from the API will always have the positive bit set to true. Internally, windows can be negative, however. We never save “inconclusive” windows (they aren’t produced by the algorithm).

start_time

Required. Observed interval. The start time of the analysis window.

Type

google.protobuf.timestamp_pb2.Timestamp

start_utc_offset

Required. The UTC offset of the user’s timezone when the analysis window started.

Type

google.protobuf.duration_pb2.Duration

end_time

Required. The end time of the analysis window.

Type

google.protobuf.timestamp_pb2.Timestamp

end_utc_offset

Required. The UTC offset of the user’s timezone when the analysis window ended.

Type

google.protobuf.duration_pb2.Duration

civil_start_time

Output only. Observed interval start time in civil time in the timezone the subject is in at the start of the observed interval

Type

google.devicesandservices.health_v4.types.CivilDateTime

civil_end_time

Output only. Observed interval end time in civil time in the timezone the subject is in at the end of the observed interval

Type

google.devicesandservices.health_v4.types.CivilDateTime

positive

Optional. Flag indicating whether the window was positive for AFib or not. A true value indicates that AFib was detected in this window. A false value means AFib was not detected, but does not guarantee the absence of AFib.

Type

bool

heart_beats

Optional. All heart beats in the interval contained in this analysis window.

Type

MutableSequence[google.devicesandservices.health_v4.types.IrregularRhythmNotification.HeartBeat]

class HeartBeat(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A single heart beat measurement.

physical_time

Required. The time of the heart beat measurement.

Type

google.protobuf.timestamp_pb2.Timestamp

utc_offset

Required. The UTC offset of the user’s timezone when the heart beat measurement occurred.

Type

google.protobuf.duration_pb2.Duration

civil_time

Output only. The civil time in the timezone the subject is in at the time of the observation.

Type

google.devicesandservices.health_v4.types.CivilDateTime

beats_per_minute

Required. The beats-per-minute value extrapolated from the time before the following heart beat. This is calculated as 60000 / rr, where rr is the gap between heart beats in milliseconds (IBI - Interbeat Interval).

This field is a member of oneof _beats_per_minute.

Type

int

class google.devicesandservices.health_v4.types.ListDataPointsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request for listing raw data points

parent

Required. Parent data type of the Data Point collection.

Format: users/me/dataTypes/{data_type}, e.g.:

  • users/me/dataTypes/steps

  • users/me/dataTypes/weight

For a list of the supported data types see the [DataPoint data][google.devicesandservices.health.v4.DataPoint] union field.

Type

str

page_size

Optional. The maximum number of data points to return. If unspecified, at most 1440 data points will be returned. The maximum page size is 10000; values above that will be truncated accordingly. For exercise and sleep the default page size is 25. The maximum page size for exercise and sleep is 25.

Type

int

page_token

Optional. The next_page_token from a previous request, if any.

Type

str

filter

Optional. Filter expression following https://google.aip.dev/160.

A time range (either physical or civil) can be specified.

The supported filter fields are:

  • Interval start time:

    • Pattern: {interval_data_type}.interval.start_time

    • Supported comparison operators: >=, <

    • Timestamp literal expected in RFC-3339 format

    • Supported logical operators: AND

    • Example:

      • steps.interval.start_time >= "2023-11-24T00:00:00Z" AND steps.interval.start_time < "2023-11-25T00:00:00Z"

      • distance.interval.start_time >= "2024-08-14T12:34:56Z"

  • Interval civil start time:

    • Pattern: {interval_data_type}.interval.civil_start_time

    • Supported comparison operators: >=, <

    • Date with optional time literal expected in ISO 8601 YYYY-MM-DD[THH:mm:ss] format

    • Supported logical operators: AND

    • Example:

      • steps.interval.civil_start_time >= "2023-11-24" AND steps.interval.civil_start_time < "2023-11-25"

      • distance.interval.civil_start_time >= "2024-08-14T12:34:56"

  • Sample observation physical time:

    • Pattern: {sample_data_type}.sample_time.physical_time

    • Supported comparison operators: >=, <

    • Timestamp literal expected in RFC-3339 format

    • Supported logical operators: AND

    • Example:

      • weight.sample_time.physical_time >= "2023-11-24T00:00:00Z" AND weight.sample_time.physical_time < "2023-11-25T00:00:00Z"

      • weight.sample_time.physical_time >= "2024-08-14T12:34:56Z"

  • Sample observation civil time:

    • Pattern: {sample_data_type}.sample_time.civil_time

    • Supported comparison operators: >=, <

    • Date with optional time literal expected in ISO 8601 YYYY-MM-DD[THH:mm:ss] format

    • Supported logical operators: AND

    • Example:

      • weight.sample_time.civil_time >= "2023-11-24" AND weight.sample_time.civil_time < "2023-11-25"

      • weight.sample_time.civil_time >= "2024-08-14T12:34:56"

  • Daily summary date:

    • Pattern: {daily_summary_data_type}.date

    • Supported comparison operators: >=, <

    • Date literal expected in ISO 8601 YYYY-MM-DD format

    • Supported logical operators: AND

    • Example:

      • daily_heart_rate_variability.date < "2024-08-15"

  • Session civil start time (Excluding Sleep and ECG):

    • Pattern: {session_data_type}.interval.civil_start_time

    • Supported comparison operators: >=, <

    • Date with optional time literal expected in ISO 8601 YYYY-MM-DD[THH:mm:ss] format

    • Supported logical operators: AND

    • Example:

      • exercise.interval.civil_start_time >= "2023-11-24" AND exercise.interval.civil_start_time < "2023-11-25"

      • exercise.interval.civil_start_time >= "2024-08-14T12:34:56"

  • Session start time (ECG specific):

    • Pattern: electrocardiogram.interval.start_time

    • Supported comparison operators: >=

    • Timestamp literal expected in RFC-3339 format

    • Example:

      • electrocardiogram.interval.start_time >= "2024-08-14T12:34:56Z"

    • Note: Only filtering by start time is supported for ECG. Filtering by end time (e.g., electrocardiogram.interval.end_time) is not supported.

  • Session end time (Sleep specific):

    • Pattern: sleep.interval.end_time

    • Supported comparison operators: >=, <

    • Timestamp literal expected in RFC-3339 format

    • Supported logical operators: AND, OR

    • Example:

      • sleep.interval.end_time >= "2023-11-24T00:00:00Z" AND sleep.interval.end_time < "2023-11-25T00:00:00Z"

  • Session civil end time (Sleep specific):

    • Pattern: sleep.interval.civil_end_time

    • Supported comparison operators: >=, <

    • Date with optional time literal expected in ISO 8601 YYYY-MM-DD[THH:mm:ss] format

    • Supported logical operators: AND, OR

    • Example:

      • sleep.interval.civil_end_time >= "2023-11-24" AND sleep.interval.civil_end_time < "2023-11-25"

Data points in the response will be ordered by the interval start time in descending order.

Type

str

class google.devicesandservices.health_v4.types.ListDataPointsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response containing raw data points matching the query

data_points

Data points matching the query

Type

MutableSequence[google.devicesandservices.health_v4.types.DataPoint]

next_page_token

Next page token, empty if the response is complete

Type

str

class google.devicesandservices.health_v4.types.ListPairedDevicesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for listing Devices.

parent

Required. The parent, which owns this collection of devices. Format: users/{user}

Type

str

page_size

Optional. The maximum number of devices to return. The service may return fewer than this value. If unspecified, at most 5 devices will be returned. The maximum value is 100. values above 100 will be coerced to 100.

Type

int

page_token

Optional. A page token, received from a previous ListPairedDevices call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListPairedDevices must match the call that provided the page token.

Type

str

class google.devicesandservices.health_v4.types.ListPairedDevicesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for ListPairedDevices.

paired_devices

The paired devices of the user.

Type

MutableSequence[google.devicesandservices.health_v4.types.PairedDevice]

next_page_token

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

Type

str

class google.devicesandservices.health_v4.types.ListSubscribersRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ListSubscribers.

parent

Required. The parent, which owns this collection of subscribers. Format: projects/{project}

Type

str

page_size

Optional. The maximum number of subscribers to return. The service may return fewer than this value. If unspecified, at most 50 subscribers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

Type

int

page_token

Optional. A page token, received from a previous ListSubscribers call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListSubscribers must match the call that provided the page token.

Type

str

class google.devicesandservices.health_v4.types.ListSubscribersResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for ListSubscribers.

subscribers

Subscribers from the specified project.

Type

MutableSequence[google.devicesandservices.health_v4.types.Subscriber]

next_page_token

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

Type

str

total_size

The total number of subscribers matching the request.

Type

int

class google.devicesandservices.health_v4.types.ListSubscriptionsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for ListSubscriptions.

parent

Required. The parent subscriber. Format: projects/{project}/subscribers/{subscriber} The {subscriber} ID is user-settable (4-36 characters, matching /a-z/) if provided during creation, or system-generated otherwise.

Type

str

filter

Optional. A filter to apply to the list of subscriptions. The filter syntax is described in https://google.aip.dev/160. The filter can be applied to the following fields:

  • user

  • data_type

The user identifier (e.g., user1 in users/user1) refers to the public healthUserId

Example: user = “users/user1” Example: user = “users/user1” OR user = “users/user2” Example: user = “users/user1” AND (data_type = “sleep” OR data_type = “weight”)

Type

str

page_size

Optional. The maximum number of subscriptions to return. The service may return fewer than this value. If unspecified, at most 50 subscriptions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

Type

int

page_token

Optional. A page token, received from a previous ListSubscriptions call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListSubscriptions must match the call that provided the page token.

Type

str

class google.devicesandservices.health_v4.types.ListSubscriptionsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for ListSubscriptions.

subscriptions

The subscriptions from the specified subscriber.

Type

MutableSequence[google.devicesandservices.health_v4.types.Subscription]

next_page_token

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

Type

str

class google.devicesandservices.health_v4.types.MealType(value)[source]

Bases: proto.enums.Enum

Enum representing the meal type.

Values:
MEAL_TYPE_UNSPECIFIED (0):

Unspecified meal type.

BEFORE_BREAKFAST (1):

Value representing a meal before breakfast.

BREAKFAST (2):

Value representing a breakfast.

BEFORE_LUNCH (3):

Value representing a morning snack.

LUNCH (4):

Value representing a lunch.

BEFORE_DINNER (5):

Value representing an afternoon snack.

DINNER (6):

Value representing dinner.

AFTER_DINNER (7):

Value representing an evening snack.

SNACK (8):

Value representing any meal outside of the usual three meals per day.

ANYTIME (9):

Value representing any time (legacy NA).

class google.devicesandservices.health_v4.types.MedicalDeviceInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Software as Medical Device (SaMD) metadata. Used to construct the Unique Device Identifier (UDI).

algorithm_version

Output only. The algorithm version used by the feature.

Type

str

service_version

Output only. The service version used by the feature.

Type

str

firmware_version

Output only. The firmware version running on the compatible device used to collect the data.

Type

str

feature_version

Output only. The version of the feature/app running on the device.

Type

str

device_model

Output only. The model name or device type of the compatible device used to collect the data.

Type

str

class google.devicesandservices.health_v4.types.MetricsSummary(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Summary metrics for an exercise.

calories_kcal

Optional. Total calories burned by the user during the exercise.

This field is a member of oneof _calories_kcal.

Type

float

distance_millimeters

Optional. Total distance covered by the user during the exercise.

This field is a member of oneof _distance_millimeters.

Type

float

steps

Optional. Total steps taken during the exercise.

This field is a member of oneof _steps.

Type

int

average_speed_millimeters_per_second

Optional. Average speed in millimeters per second.

This field is a member of oneof _average_speed_millimeters_per_second.

Type

float

average_pace_seconds_per_meter

Optional. Average pace in seconds per meter.

This field is a member of oneof _average_pace_seconds_per_meter.

Type

float

average_heart_rate_beats_per_minute

Optional. Average heart rate during the exercise.

This field is a member of oneof _average_heart_rate_beats_per_minute.

Type

int

elevation_gain_millimeters

Optional. Total elevation gain during the exercise.

This field is a member of oneof _elevation_gain_millimeters.

Type

float

active_zone_minutes

Optional. Total active zone minutes for the exercise.

This field is a member of oneof _active_zone_minutes.

Type

int

run_vo2_max

Optional. Run VO2 max value for the exercise. Only present in the running exercises at the top level as in the summary of the whole exercise.

This field is a member of oneof _run_vo2_max.

Type

float

total_swim_lengths

Optional. Number of full pool lengths completed during the exercise. Only present in the swimming exercises at the top level as in the summary of the whole exercise.

This field is a member of oneof _total_swim_lengths.

Type

float

heart_rate_zone_durations

Optional. Time spent in each heart rate zone.

Type

google.devicesandservices.health_v4.types.MetricsSummary.TimeInHeartRateZones

mobility_metrics

Optional. Mobility workouts specific metrics. Only present in the advanced running exercises.

Type

google.devicesandservices.health_v4.types.MetricsSummary.MobilityMetrics

class MobilityMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Mobility workouts specific metrics

avg_cadence_steps_per_minute

Optional. Cadence is a measure of the frequency of your foot strikes. Steps / min in real time during workout.

This field is a member of oneof _avg_cadence_steps_per_minute.

Type

float

avg_stride_length_millimeters

Optional. Stride length is a measure of the distance covered by a single stride

This field is a member of oneof _avg_stride_length_millimeters.

Type

int

avg_vertical_oscillation_millimeters

Optional. Distance off the ground your center of mass moves with each stride while running

This field is a member of oneof _avg_vertical_oscillation_millimeters.

Type

int

avg_vertical_ratio

Optional. Vertical oscillation/stride length between [5.0, 11.0].

This field is a member of oneof _avg_vertical_ratio.

Type

float

avg_ground_contact_time_duration

Optional. The ground contact time for a particular stride is the amount of time for which the foot was in contact with the ground on that stride

Type

google.protobuf.duration_pb2.Duration

class TimeInHeartRateZones(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Time spent in each heart rate zone.

light_time

Optional. Time spent in light heart rate zone.

Type

google.protobuf.duration_pb2.Duration

moderate_time

Optional. Time spent in moderate heart rate zone.

Type

google.protobuf.duration_pb2.Duration

vigorous_time

Optional. Time spent in vigorous heart rate zone.

Type

google.protobuf.duration_pb2.Duration

peak_time

Optional. Time spent in peak heart rate zone.

Type

google.protobuf.duration_pb2.Duration

class google.devicesandservices.health_v4.types.Nutrient(value)[source]

Bases: proto.enums.Enum

Holds information about a user logged food.

Values:
NUTRIENT_UNSPECIFIED (0):

Unspecified nutrient.

BIOTIN (1):

Value representing biotin nutrient.

CAFFEINE (2):

Value representing caffeine nutrient.

CALCIUM (3):

Value representing calcium nutrient.

CHLORIDE (4):

Value representing chloride nutrient.

CARBOHYDRATES (5):

Value representing carbohydrates nutrient.

CHOLESTEROL (6):

Value representing cholesterol nutrient.

CHROMIUM (7):

Value representing chromium nutrient.

COPPER (8):

Value representing copper nutrient.

DIETARY_FIBER (9):

Value representing dietary fiber nutrient.

FOLIC_ACID (10):

Value representing folic acid nutrient.

IODINE (11):

Value representing iodine nutrient.

IRON (12):

Value representing iron nutrient.

MAGNESIUM (13):

Value representing magnesium nutrient.

MANGANESE (14):

Value representing manganese nutrient.

MOLYBDENUM (15):

Value representing molybdenum nutrient.

MONOUNSATURATED_FAT (16):

Value representing monounsaturated fat nutrient.

NIACIN (17):

Value representing niacin nutrient.

PANTOTHENIC_ACID (18):

Value representing pantothenic acid nutrient.

PHOSPHORUS (19):

Value representing phosphorus nutrient.

POLYUNSATURATED_FAT (20):

Value representing polyunsaturated fat nutrient.

POTASSIUM (21):

Value representing potassium nutrient.

PROTEIN (22):

Value representing protein nutrient.

RIBOFLAVIN (23):

Value representing riboflavin nutrient.

SATURATED_FAT (24):

Value representing saturated fat nutrient.

SELENIUM (25):

Value representing selenium nutrient.

SODIUM (26):

Value representing sodium nutrient.

SUGAR (27):

Value representing sugar nutrient.

THIAMIN (28):

Value representing thiamin nutrient.

TRANS_FAT (29):

Value representing trans fat nutrient.

UNSATURATED_FAT (30):

Value representing unsaturated fat nutrient.

VITAMIN_A (31):

Value representing vitamin A nutrient.

VITAMIN_B12 (32):

Value representing vitamin B12 nutrient.

VITAMIN_B6 (33):

Value representing vitamin B6 nutrient.

VITAMIN_C (34):

Value representing vitamin C nutrient.

VITAMIN_D (35):

Value representing vitamin D nutrient.

VITAMIN_E (36):

Value representing vitamin E nutrient.

VITAMIN_K (37):

Value representing vitamin K nutrient.

ZINC (38):

Value representing zinc nutrient.

FOLATE (39):

Value representing folate nutrient.

class google.devicesandservices.health_v4.types.NutrientQuantity(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the quantity of a nutrient.

quantity

Required. Value representing the quantity of the nutrient.

Type

google.devicesandservices.health_v4.types.WeightQuantity

nutrient

Required. Value representing the nutrient.

Type

google.devicesandservices.health_v4.types.Nutrient

class google.devicesandservices.health_v4.types.NutritionLog(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

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.

interval

Required. Observed interval.

Type

google.devicesandservices.health_v4.types.SessionTimeInterval

nutrients

Optional. Value representing the nutrients of the nutrition log.

Type

MutableSequence[google.devicesandservices.health_v4.types.NutrientQuantity]

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.

Type

google.devicesandservices.health_v4.types.EnergyQuantity

energy_from_fat

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.

Type

google.devicesandservices.health_v4.types.EnergyQuantity

total_carbohydrate

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.

Type

google.devicesandservices.health_v4.types.WeightQuantity

total_fat

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.

Type

google.devicesandservices.health_v4.types.WeightQuantity

meal_type

Optional. Value representing the meal type of the nutrition log.

Type

google.devicesandservices.health_v4.types.MealType

serving

Optional. Value representing the nutrition log serving.

Type

google.devicesandservices.health_v4.types.NutritionLog.Serving

food

Required. Represents the food ID.

Type

str

food_display_name

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.

Type

str

class Serving(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents different properties and information about the serving of a specific food.

amount

Optional. Amount of food consumed, fractional values are supported.

This field is a member of oneof _amount.

Type

float

food_measurement_unit

Required. Food measurement unit

Type

str

food_measurement_unit_display_name

Output only. Legacy measurement unit for serving size in singular form (e.g. “piece”, “gram”).

Type

str

class google.devicesandservices.health_v4.types.NutritionLogRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the result of the rollup of the nutrition log data type.

nutrients

List of the nutrient roll-ups by the nutrient type.

Type

MutableSequence[google.devicesandservices.health_v4.types.NutritionLogRollupValue.NutrientQuantityRollup]

energy

Energy rollup.

Type

google.devicesandservices.health_v4.types.NutritionLogRollupValue.EnergyQuantityRollup

energy_from_fat

Value Energy from fat rollup.

Type

google.devicesandservices.health_v4.types.NutritionLogRollupValue.EnergyQuantityRollup

total_carbohydrate

Total carbohydrate rollup.

Type

google.devicesandservices.health_v4.types.NutritionLogRollupValue.WeightQuantityRollup

total_fat

Total fat rollup.

Type

google.devicesandservices.health_v4.types.NutritionLogRollupValue.WeightQuantityRollup

class EnergyQuantityRollup(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Rollup for the energy quantity.

kcal_sum

Required. The sum of the energy in kilocalories.

This field is a member of oneof _kcal_sum.

Type

float

user_provided_unit_last

Optional. The user provided unit on the last element.

Type

google.devicesandservices.health_v4.types.EnergyUnit

class NutrientQuantityRollup(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Nutrient quantity rollup.

quantity

Required. Aggregated nutrient weight.

Type

google.devicesandservices.health_v4.types.NutritionLogRollupValue.WeightQuantityRollup

nutrient

Required. Aggregated nutrient.

Type

google.devicesandservices.health_v4.types.Nutrient

class WeightQuantityRollup(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Rollup for the weight.

grams_sum

Required. The sum of the weight in grams.

This field is a member of oneof _grams_sum.

Type

float

user_provided_unit_last

Optional. The user provided unit on the last element.

Type

google.devicesandservices.health_v4.types.WeightUnit

class google.devicesandservices.health_v4.types.ObservationSampleTime(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents a sample time of an observed data point.

physical_time

Required. The time of the observation.

Type

google.protobuf.timestamp_pb2.Timestamp

utc_offset

Required. The offset of the user’s local time during the observation relative to the Coordinated Universal Time (UTC).

Type

google.protobuf.duration_pb2.Duration

civil_time

Output only. The civil time in the timezone the subject is in at the time of the observation.

Type

google.devicesandservices.health_v4.types.CivilDateTime

class google.devicesandservices.health_v4.types.ObservationTimeInterval(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents a time interval of an observed data point.

start_time

Required. Observed interval start time.

Type

google.protobuf.timestamp_pb2.Timestamp

start_utc_offset

Required. The offset of the user’s local time at the start of the observation relative to the Coordinated Universal Time (UTC).

Type

google.protobuf.duration_pb2.Duration

end_time

Required. Observed interval end time.

Type

google.protobuf.timestamp_pb2.Timestamp

end_utc_offset

Required. The offset of the user’s local time at the end of the observation relative to the Coordinated Universal Time (UTC).

Type

google.protobuf.duration_pb2.Duration

civil_start_time

Output only. Observed interval start time in civil time in the timezone the subject is in at the start of the observed interval

Type

google.devicesandservices.health_v4.types.CivilDateTime

civil_end_time

Output only. Observed interval end time in civil time in the timezone the subject is in at the end of the observed interval

Type

google.devicesandservices.health_v4.types.CivilDateTime

class google.devicesandservices.health_v4.types.OxygenSaturation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Captures the user’s instantaneous oxygen saturation percentage (SpO2).

sample_time

Required. The time at which oxygen saturation was measured.

Type

google.devicesandservices.health_v4.types.ObservationSampleTime

percentage

Required. The oxygen saturation percentage. Valid values are from 0 to 100.

This field is a member of oneof _percentage.

Type

float

class google.devicesandservices.health_v4.types.PairedDevice(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

User’s Paired 1P Device

The PairedDevice details include information about the device type, battery status, battery level, last sync time, device version, mac address, and features.

name

Identifier. The resource name of this Device resource.

Format: users/{user}/pairedDevices/{paired_device} Example: users/1234567890/pairedDevices/123 or users/me/pairedDevices/123

Type

str

device_type

Output only. The device type. Supported: TRACKER | SCALE

Type

google.devicesandservices.health_v4.types.PairedDevice.DeviceType

battery_status

Output only. The battery status of the device. Supported: High | Medium | Low | Empty

Type

str

battery_level

Output only. The battery level of the device.

Type

int

last_sync_time

Output only. The time of last sync with the Fitbit mobile application.

Type

google.protobuf.timestamp_pb2.Timestamp

device_version

Output only. The product name of the device

Type

str

mac_address

Output only. Mac ID number of the device.

Type

str

features

Output only. Lists of unique features supported by the device.

Comprehensive list of supported features:

Fitness Tracking

  • ACTIVE_MINUTES: Legacy active minutes.

  • AUTOSTRIDE: Automatic stride length calculation.

  • BIKE_ONBOARDING: Cycling UI support.

  • CALORIES: Daily burned calories.

  • DISTANCE: Daily distance tracking.

  • ELEVATION: Floors climbed.

  • INACTIVITY_ALERTS: Reminders to move.

  • SEDENTARY_TIME: Tracks inactive time.

  • STEPS: Daily steps.

  • SWIM: Swim tracking (laps/strokes).

  • AUTORUN: Automatic run detection.

  • ACTIVE_ZONE_MINUTES: Active Zone Minutes (AZM).

Heart Rate & Health

  • HEART_RATE: Continuous heart rate (PPG).

  • BAT_SIGNAL: High/Low Heart Rate Alerts.

Advanced Sensors

  • SPO2: Blood oxygen saturation.

  • NIGHTTIME_OXYGEN_SATURATION: Sleep SpO2.

  • ESTIMATED_OXYGEN_VARIATION: Estimated Oxygen Variation.

  • EDA: Electrodermal Activity (stress).

  • SKIN_TEMPERATURE: Skin temperature variation.

  • INTERNAL_DEVICE_TEMPERATURE: Internal device temperature.

Sleep & Wellness

  • SLEEP: Basic sleep tracking.

  • SMART_SLEEP: Advanced sleep tracking (stages/score).

  • BEDTIME_REMINDER: Bedtime reminders.

  • SOUNDSCAPE: Snore and noise detection.

Advanced Workouts

  • WB: Custom Workout Builder.

  • AUTOCUES: Auto Cues / Auto Lap.

  • DWR_RUN: Daily Run Recommendations.

  • ADVANCED_RUNNING: Advanced Running Dynamics (e.g., GCT, VO).

GPS & Location

  • GPS: Built-in GPS.

  • CONNECTED_GPS: Connected GPS (uses phone).

  • LOCATION_HINT: Location helper.

Payments & NFC

  • PAYMENTS: NFC payments (Fitbit Pay/Google Wallet).

  • FELICA: FeliCa support (Japan payments/transit).

Activity Detection

  • GROK: SmartTrack automatic activity detection.

  • RETRO_AR: Retroactive Activity Recognition prompts.

Smart Features & UI

  • ALARMS: Silent alarms.

  • BLE_MUSIC_CONTROL: BLE music control.

  • MUSIC: Direct music storage/control.

  • YOUTUBE_MUSIC_SUPPORTED: YouTube Music support.

  • GALLERY: App Gallery.

  • TUTORIAL_SUPPORTED: On-screen tutorials.

  • SMILEY_EMOTE: Legacy Zip face.

  • MOBILE_TO_DEVICE_DEEPLINK: Mobile to device settings deep link.

  • HIDE_GALLERY: Option to hide Gallery.

  • HIDE_GOAL_SELECTION: Option to hide goal selection.

  • DIGITAL_WARRANTY_SUPPORTED: Digital warranty display.

  • DIRECT_DEVICE_SETTINGS_SUPPORTED: Direct device settings management.

Gym HR Broadcasting

  • ASPEN_SUPPORTED: Broadcast HR to gym equipment.

  • ASPEN_REMOTE_UI_SUPPORTED: Remote UI for HR sharing.

Privacy & Security

  • FINITE_IMPROBABILITY: BLE Resolvable Private Address (RPA) privacy.

  • DOMAIN_KEY_SYNC: Domain key synchronization.

BLE Protocol

  • BONDING: Secure BLE bonding.

  • ADVERTISES_SERIAL: Advertises serial number.

  • STATUS_CHARACTERISTIC: BLE Status Characteristic.

  • TRACKER_CHANNEL_CHARACTERISTIC: BLE Tracker Channel Characteristic.

  • PING_CHARACTERISTIC: BLE Ping Characteristic.

Cellular & Wi-Fi

  • MOBILE_DATA: LTE cellular support.

  • SINGLE_AP_WIFI: Single AP Wi-Fi.

  • MULTI_AP_WIFI: Multi AP Wi-Fi.

  • WIFI_FWUP: Firmware updates over Wi-Fi.

Data Sync & Transfer

  • APP_SYNC: Background app sync.

  • LIVE_DATA: Real-time data streaming.

  • EVENT_BASED_SYNC_SUPPORTED: Event-based sync.

  • TIME_SERVICE: Time synchronization service.

  • REMOTE_FILE_PROVIDER: Remote file transfer.

  • DIRECT_COMMS_ALARMS: Direct communication for alarms.

  • DIRECT_COMMS_EXERCISE: Direct communication for exercise.

  • DIRECT_COMMS_BATTERY_ALERTS: Direct communication for battery alerts.

Google Integrations

  • PARROT_TREE_SUPPORTED: Find My Device support.

Type

MutableSequence[str]

class DeviceType(value)[source]

Bases: proto.enums.Enum

The type of device.

Values:
DEVICE_TYPE_UNSPECIFIED (0):

Device type is not specified.

TRACKER (1):

Device type is tracker.

SCALE (2):

Device type is scale.

class google.devicesandservices.health_v4.types.Profile(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Profile details.

name

Identifier. The resource name of this Profile resource.

Format: users/{user}/profile Example: users/1234567890/profile or users/me/profile The {user} ID is a system-generated Google Health API user ID, a string of 1-63 characters consisting of lowercase and uppercase letters, numbers, and hyphens. The literal me can also be used to refer to the authenticated user.

Type

str

age

Optional. The age in years based on the user’s birth date. Updates to this field are currently not supported.

Type

int

membership_start_date

Output only. The date the user created their account. Updates to this field are currently not supported.

Type

google.type.date_pb2.Date

user_configured_walking_stride_length_mm

Optional. The user’s user configured walking stride length, in millimeters.

The user must consent to one of the following access scopes to access this field:

https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly

  • https://www.googleapis.com/auth/googlehealth.activity_and_fitness

This field is a member of oneof _user_configured_walking_stride_length_mm.

Type

int

user_configured_running_stride_length_mm

Optional. The user’s user configured running stride length, in millimeters.

The user must consent to one of the following access scopes to access this field:

https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly

  • https://www.googleapis.com/auth/googlehealth.activity_and_fitness

This field is a member of oneof _user_configured_running_stride_length_mm.

Type

int

auto_walking_stride_length_mm

Output only. The automatically calculated walking stride length, in millimeters.

The user must consent to one of the following access scopes to access this field:

https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly

  • https://www.googleapis.com/auth/googlehealth.activity_and_fitness

This field is a member of oneof _auto_walking_stride_length_mm.

Type

int

auto_running_stride_length_mm

Output only. The automatically calculated running stride length, in millimeters.

The user must consent to one of the following access scopes to access this field:

https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly

  • https://www.googleapis.com/auth/googlehealth.activity_and_fitness

This field is a member of oneof _auto_running_stride_length_mm.

Type

int

class google.devicesandservices.health_v4.types.ReconcileDataPointsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request to reconcile data points from multiple data sources.

parent

Required. Parent data type of the Data Point collection.

Format: users/me/dataTypes/{data_type}, e.g.:

  • users/me/dataTypes/steps

  • users/me/dataTypes/heart-rate

For a list of the supported data types see the [DataPoint data][google.devicesandservices.health.v4.DataPoint] union field.

Type

str

page_size

Optional. The maximum number of data points to return. If unspecified, at most 1440 data points will be returned. The maximum page size is 10000; values above that will be truncated accordingly. For exercise and sleep the default page size is 25. The maximum page size for exercise and sleep is 25.

Type

int

page_token

Optional. The next_page_token from a previous request, if any.

Type

str

filter

Optional. Filter expression based on https://aip.dev/160.

A time range, either physical or civil, can be specified. See the [ListDataPointsRequest.filter][google.devicesandservices.health.v4.ListDataPointsRequest.filter] for the supported fields and syntax.

Type

str

data_source_family

Optional. The data source family name to reconcile.

If empty, data points from all data sources will be reconciled.

Format: users/me/dataSourceFamilies/{data_source_family}

The supported values are:

  • users/me/dataSourceFamilies/all-sources - default value

  • users/me/dataSourceFamilies/google-wearables - tracker devices

  • users/me/dataSourceFamilies/google-sources - Google first party sources

Type

str

class google.devicesandservices.health_v4.types.ReconcileDataPointsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response containing the list of reconciled DataPoints.

data_points

Data points matching the query

Type

MutableSequence[google.devicesandservices.health_v4.types.ReconciledDataPoint]

next_page_token

Next page token, empty if the response is complete

Type

str

class google.devicesandservices.health_v4.types.ReconciledDataPoint(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A reconciled computed or recorded metric.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

steps

Data for points in the steps interval data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.Steps

floors

Data for points in the floors interval data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.Floors

heart_rate

Data for points in the heart-rate sample data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.HeartRate

sleep

Data for points in the sleep session data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.Sleep

daily_resting_heart_rate

Data for points in the daily-resting-heart-rate daily data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.DailyRestingHeartRate

daily_heart_rate_variability

Data for points in the daily-heart-rate-variability daily data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.DailyHeartRateVariability

exercise

Data for points in the exercise session data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.Exercise

weight

Data for points in the weight sample data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.Weight

altitude

Data for points in the altitude interval data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.Altitude

distance

Data for points in the distance interval data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.Distance

body_fat

Data for points in the body-fat sample data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.BodyFat

active_zone_minutes

Data for points in the active-zone-minutes interval data type collection, measured in minutes.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.ActiveZoneMinutes

heart_rate_variability

Data for points in the heart-rate-variability sample data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.HeartRateVariability

daily_sleep_temperature_derivations

Data for points in the daily-sleep-temperature-derivations daily data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.DailySleepTemperatureDerivations

sedentary_period

Data for points in the sedentary-period interval data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.SedentaryPeriod

run_vo2_max

Data for points in the run-vo2-max sample data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.RunVO2Max

oxygen_saturation

Data for points in the oxygen-saturation sample data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.OxygenSaturation

daily_oxygen_saturation

Data for points in the daily-oxygen-saturation daily data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.DailyOxygenSaturation

activity_level

Data for points in the activity-level daily data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.ActivityLevel

vo2_max

Data for points in the vo2-max sample data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.VO2Max

daily_vo2_max

Data for points in the daily-vo2-max daily data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.DailyVO2Max

nutrition_log

Data for points in the nutrition-log session data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.NutritionLog

daily_heart_rate_zones

Data for points in the daily-heart-rate-zones daily data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.DailyHeartRateZones

hydration_log

Data for points in the hydration-log session data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.HydrationLog

time_in_heart_rate_zone

Data for points in the time-in-heart-rate-zone interval data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.TimeInHeartRateZone

active_minutes

Data for points in the active-minutes interval data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.ActiveMinutes

respiratory_rate_sleep_summary

Data for points in the respiratory-rate-sleep-summary sample data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.RespiratoryRateSleepSummary

daily_respiratory_rate

Data for points in the daily-respiratory-rate daily data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.DailyRespiratoryRate

swim_lengths_data

Data for points in the swim-lengths-data interval data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.SwimLengthsData

height

Data for points in the height sample data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.Height

basal_energy_burned

Data for points in the basal-energy-burned interval data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.BasalEnergyBurned

core_body_temperature

Data for points in the core-body-temperature sample data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.CoreBodyTemperature

active_energy_burned

Data for points in the active-energy-burned interval data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.ActiveEnergyBurned

blood_glucose

Data for points in the blood-glucose sample data type collection.

This field is a member of oneof data.

Type

google.devicesandservices.health_v4.types.BloodGlucose

data_point_name

Identifier. Data point name, only supported for the subset of identifiable data types. For the majority of the data types, individual data points do not need to be identified and this field would be empty.

Format: users/{user}/dataTypes/{data_type}/dataPoints/{data_point}

Example: users/abcd1234/dataTypes/sleep/dataPoints/a1b2c3d4-e5f6-7890-1234-567890abcdef

The {user} ID is a system-generated identifier, as described in [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id].

The {data_type} ID corresponds to the kebab-case version of the field names in the [DataPoint data][google.devicesandservices.health.v4.DataPoint] union field, e.g. total-calories for the total_calories field.

The {data_point} ID can be client-provided or system-generated. If client-provided, it must be a string of 4-63 characters, containing only lowercase letters, numbers, and hyphens.

Type

str

class google.devicesandservices.health_v4.types.RespiratoryRateSleepSummary(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Records respiratory rate details during sleep. Can have multiple per day if the user sleeps multiple times.

sample_time

Required. The time at which respiratory rate was measured.

Type

google.devicesandservices.health_v4.types.ObservationSampleTime

deep_sleep_stats

Optional. Respiratory rate statistics for deep sleep.

Type

google.devicesandservices.health_v4.types.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics

light_sleep_stats

Optional. Respiratory rate statistics for light sleep.

Type

google.devicesandservices.health_v4.types.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics

rem_sleep_stats

Optional. Respiratory rate statistics for REM sleep.

Type

google.devicesandservices.health_v4.types.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics

full_sleep_stats

Required. Full respiratory rate statistics.

Type

google.devicesandservices.health_v4.types.RespiratoryRateSleepSummary.RespiratoryRateSleepSummaryStatistics

class RespiratoryRateSleepSummaryStatistics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Respiratory rate statistics for a given sleep stage.

breaths_per_minute

Required. Average breaths per minute.

This field is a member of oneof _breaths_per_minute.

Type

float

standard_deviation

Optional. Standard deviation of the respiratory rate during sleep.

This field is a member of oneof _standard_deviation.

Type

float

signal_to_noise

Optional. How trustworthy the data is for the computation.

This field is a member of oneof _signal_to_noise.

Type

float

class google.devicesandservices.health_v4.types.RestingHeartRatePersonalRangeRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the rollup value for the daily resting heart rate data type.

beats_per_minute_min

The lower bound of the user’s daily resting heart rate personal range.

This field is a member of oneof _beats_per_minute_min.

Type

float

beats_per_minute_max

The upper bound of the user’s daily resting heart rate personal range.

This field is a member of oneof _beats_per_minute_max.

Type

float

class google.devicesandservices.health_v4.types.RollUpDataPointsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request to roll up data points by physical time intervals.

parent

Required. Parent data type of the Data Point collection.

Format: users/{user}/dataTypes/{data_type}, e.g.:

  • users/me/dataTypes/steps

  • users/me/dataTypes/distance

For a list of the supported data types see the [RollupDataPoint value][google.devicesandservices.health.v4.RollupDataPoint] union field.

Type

str

range_

Required. Closed-open range of data points that will be rolled up. The maximum range for calories-in-heart-rate-zone, heart-rate, active-minutes and total-calories is 14 days. The maximum range for all other data types is 90 days.

Type

google.type.interval_pb2.Interval

window_size

Required. The size of the time window to group data points into before applying the aggregation functions.

Type

google.protobuf.duration_pb2.Duration

page_size

Optional. The maximum number of data points to return. If unspecified, at most 1440 data points will be returned. The maximum page size is 10000; values above that will be truncated accordingly.

Type

int

page_token

Optional. The next_page_token from a previous request, if any. All other request fields need to be the same as in the initial request when the page token is specified.

Type

str

data_source_family

Optional. The data source family name to roll up.

If empty, data points from all available data sources will be rolled up.

Format: users/me/dataSourceFamilies/{data_source_family}

The supported values are:

  • users/me/dataSourceFamilies/all-sources - default value

  • users/me/dataSourceFamilies/google-wearables - tracker devices

  • users/me/dataSourceFamilies/google-sources - Google first party sources

Type

str

class google.devicesandservices.health_v4.types.RollUpDataPointsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response containing the list of rolled up data points.

rollup_data_points

Values for each aggregation time window.

Type

MutableSequence[google.devicesandservices.health_v4.types.RollupDataPoint]

next_page_token

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

Type

str

class google.devicesandservices.health_v4.types.RollupDataPoint(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Value of a rollup for a single physical time interval (aggregation window) of reconciled data points from all data sources, excluding those data points that are identified as recorded by wearables in intervals when they were not actually worn.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

steps

Returned by default when rolling up data points from the steps data type, or when requested explicitly using the steps rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.StepsRollupValue

floors

Returned by default when rolling up data points from the floors data type, or when requested explicitly using the floors rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.FloorsRollupValue

heart_rate

Returned by default when rolling up data points from the heart-rate data type, or when requested explicitly using the heart-rate rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.HeartRateRollupValue

weight

Returned by default when rolling up data points from the weight data type, or when requested explicitly using the weight rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.WeightRollupValue

altitude

Returned by default when rolling up data points from the altitude data type, or when requested explicitly using the altitude rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.AltitudeRollupValue

distance

Returned by default when rolling up data points from the distance data type, or when requested explicitly using the distance rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.DistanceRollupValue

body_fat

Returned by default when rolling up data points from the body-fat data type, or when requested explicitly using the body-fat rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.BodyFatRollupValue

total_calories

Returned by default when rolling up data points from the total-calories data type, or when requested explicitly using the total-calories rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.TotalCaloriesRollupValue

active_zone_minutes

Returned by default when rolling up data points from the active-zone-minutes data type, or when requested explicitly using the active-zone-minutes rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.ActiveZoneMinutesRollupValue

sedentary_period

Returned by default when rolling up data points from the sedentary-period data type, or when requested explicitly using the sedentary-period rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.SedentaryPeriodRollupValue

run_vo2_max

Returned by default when rolling up data points from the run-vo2-max data type, or when requested explicitly using the run-vo2-max rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.RunVO2MaxRollupValue

calories_in_heart_rate_zone

Returned by default when rolling up data points from the calories-in-heart-rate-zone data type, or when requested explicitly using the calories-in-heart-rate-zone rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.CaloriesInHeartRateZoneRollupValue

activity_level

Returned by default when rolling up data points from the activity-level data type, or when requested explicitly using the activity-level rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.ActivityLevelRollupValue

nutrition_log

Returned by default when rolling up data points from the nutrition-log data type, or when requested explicitly using the nutrition-log rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.NutritionLogRollupValue

hydration_log

Returned by default when rolling up data points from the hydration-log data type, or when requested explicitly using the hydration-log rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.HydrationLogRollupValue

time_in_heart_rate_zone

Returned by default when rolling up data points from the time-in-heart-rate-zone data type, or when requested explicitly using the time-in-heart-rate-zone rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.TimeInHeartRateZoneRollupValue

active_minutes

Returned by default when rolling up data points from the active-minutes data type, or when requested explicitly using the active-minutes rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.ActiveMinutesRollupValue

swim_lengths_data

Returned by default when rolling up data points from the swim-lengths-data data type, or when requested explicitly using the swim-lengths-data rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.SwimLengthsDataRollupValue

core_body_temperature

Returned by default when rolling up data points from the core-body-temperature data type, or when requested explicitly using the core-body-temperature rollup type identifier.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.CoreBodyTemperatureRollupValue

active_energy_burned

Returned by default when rolling up data points from the active-energy-burned data type.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.ActiveEnergyBurnedRollupValue

blood_glucose

Returned by default when rolling up data points from the blood-glucose data type.

This field is a member of oneof value.

Type

google.devicesandservices.health_v4.types.BloodGlucoseRollupValue

start_time

Start time of the window this value aggregates over

Type

google.protobuf.timestamp_pb2.Timestamp

end_time

End time of the window this value aggregates over

Type

google.protobuf.timestamp_pb2.Timestamp

class google.devicesandservices.health_v4.types.RunVO2Max(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

VO2 max value calculated based on the user’s running activity. Value stored in ml/kg/min.

sample_time

Required. The time at which the metric was measured.

Type

google.devicesandservices.health_v4.types.ObservationSampleTime

run_vo2_max

Required. Run VO2 max value in ml/kg/min.

This field is a member of oneof _run_vo2_max.

Type

float

class google.devicesandservices.health_v4.types.RunVO2MaxRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the result of the rollup of the user’s daily heart rate variability personal range.

rate_min

Minimum value of run VO2 max in the interval..

This field is a member of oneof _rate_min.

Type

float

rate_max

Maximum value of run VO2 max in the interval.

This field is a member of oneof _rate_max.

Type

float

rate_avg

Average value of run VO2 max in the interval.

This field is a member of oneof _rate_avg.

Type

float

class google.devicesandservices.health_v4.types.SedentaryPeriod(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

SedentaryPeriod data represents the periods of time that the user was sedentary (i.e. not moving while wearing the device).

interval

Required. Observed interval.

Type

google.devicesandservices.health_v4.types.ObservationTimeInterval

class google.devicesandservices.health_v4.types.SedentaryPeriodRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the result of the rollup of the user’s sedentary periods.

duration_sum

The total time user spent sedentary during the interval.

Type

google.protobuf.duration_pb2.Duration

class google.devicesandservices.health_v4.types.SessionTimeInterval(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents a time interval of session data point, which bundles multiple observed metrics together.

start_time

Required. The start time of the observed session.

Type

google.protobuf.timestamp_pb2.Timestamp

start_utc_offset

Required. The offset of the user’s local time at the start of the session relative to the Coordinated Universal Time (UTC).

Type

google.protobuf.duration_pb2.Duration

end_time

Required. The end time of the observed session.

Type

google.protobuf.timestamp_pb2.Timestamp

end_utc_offset

Required. The offset of the user’s local time at the end of the session relative to the Coordinated Universal Time (UTC).

Type

google.protobuf.duration_pb2.Duration

civil_start_time

Output only. Session start time in civil time in the timezone the subject is in at the start of the session.

Type

google.devicesandservices.health_v4.types.CivilDateTime

civil_end_time

Output only. Session end time in civil time in the timezone the subject is in at the end of the session.

Type

google.devicesandservices.health_v4.types.CivilDateTime

class google.devicesandservices.health_v4.types.Settings(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Settings details.

name

Identifier. The resource name of this Settings resource.

Format: users/{user}/settings Example: users/1234567890/settings or users/me/settings The {user} ID is a system-generated Google Health API user ID, a string of 1-63 characters consisting of lowercase and uppercase letters, numbers, and hyphens. The literal me can also be used to refer to the authenticated user.

Type

str

auto_stride_enabled

Optional. True if the user’s stride length is determined automatically. Updates to this field are currently not supported.

Type

bool

distance_unit

Optional. The measurement unit defined in the user’s account settings. Updates to this field are currently not supported.

Type

google.devicesandservices.health_v4.types.Settings.DistanceUnit

glucose_unit

Optional. The measurement unit defined in the user’s account settings.

Type

google.devicesandservices.health_v4.types.Settings.GlucoseUnit

height_unit

Optional. The measurement unit defined in the user’s account settings.

Type

google.devicesandservices.health_v4.types.Settings.HeightUnit

language_locale

Optional. The locale defined in the user’s account settings. Updates to this field are currently not supported.

Type

str

utc_offset

Optional. The user’s timezone offset relative to UTC. Updates to this field are currently not supported.

Type

google.protobuf.duration_pb2.Duration

stride_length_walking_type

Optional. The stride length type defined in the user’s account settings for walking.

Updates to this field are currently not supported.

Type

google.devicesandservices.health_v4.types.Settings.StrideLengthType

stride_length_running_type

Optional. The stride length type defined in the user’s account settings for running.

Updates to this field are currently not supported.

Type

google.devicesandservices.health_v4.types.Settings.StrideLengthType

swim_unit

Optional. The measurement unit defined in the user’s account settings.

Type

google.devicesandservices.health_v4.types.Settings.SwimUnit

temperature_unit

Optional. The measurement unit defined in the user’s account settings.

Type

google.devicesandservices.health_v4.types.Settings.TemperatureUnit

time_zone

Optional. The timezone defined in the user’s account settings. This follows the IANA Time Zone Database.

Updates to this field are currently not supported.

Type

str

weight_unit

Optional. The measurement unit defined in the user’s account settings.

Type

google.devicesandservices.health_v4.types.Settings.WeightUnit

water_unit

Optional. The measurement unit defined in the user’s account settings.

Type

google.devicesandservices.health_v4.types.Settings.WaterUnit

food_language_code

Output only. The food language code derived from the user’s food database. Possible values: 'en-US', 'en-GB', 'de-DE', 'es-ES', 'fr-FR', 'zh-CN', 'zh-TW', 'ja-JP', 'en-AU', 'en-CA', 'it-IT', 'ko-KR', 'es-MX', 'en-IN', 'en-SG', 'en-PH', 'en-IE', 'fr-CA'.

Updates to this field are currently not supported.

Type

str

class DistanceUnit(value)[source]

Bases: proto.enums.Enum

The measurement unit defined in the user’s account settings.

Values:
DISTANCE_UNIT_UNSPECIFIED (0):

Distance unit is not specified.

DISTANCE_UNIT_MILES (1):

Distance unit is miles.

DISTANCE_UNIT_KILOMETERS (2):

Distance unit is kilometers.

class GlucoseUnit(value)[source]

Bases: proto.enums.Enum

The measurement unit defined in the user’s account settings.

Values:
GLUCOSE_UNIT_UNSPECIFIED (0):

Glucose unit is not specified.

GLUCOSE_UNIT_MG_DL (1):

Glucose unit is mg/dL.

GLUCOSE_UNIT_MMOL_L (2):

Glucose unit is mmol/l.

class HeightUnit(value)[source]

Bases: proto.enums.Enum

The measurement unit defined in the user’s account settings.

Values:
HEIGHT_UNIT_UNSPECIFIED (0):

Height unit is not specified.

HEIGHT_UNIT_INCHES (1):

Height unit is inches.

HEIGHT_UNIT_CENTIMETERS (2):

Height unit is cm.

class StrideLengthType(value)[source]

Bases: proto.enums.Enum

The stride length type defined in the user’s account settings. Specifies if the user’s stride length is determined automatically (default) or manually as defined in the user’s account settings.

Values:
STRIDE_LENGTH_TYPE_UNSPECIFIED (0):

Stride length type is not specified.

STRIDE_LENGTH_TYPE_DEFAULT (1):

Stride length type is computed based on the user’s gender and height.

STRIDE_LENGTH_TYPE_MANUAL (2):

Stride length type is manually set by the user.

STRIDE_LENGTH_TYPE_AUTO (3):

Stride length type is determined automatically.

class SwimUnit(value)[source]

Bases: proto.enums.Enum

The swim unit defined in the user’s account settings.

Values:
SWIM_UNIT_UNSPECIFIED (0):

Swim unit is not specified.

SWIM_UNIT_METERS (1):

Swim unit is meters.

SWIM_UNIT_YARDS (2):

Swim unit is yards.

class TemperatureUnit(value)[source]

Bases: proto.enums.Enum

The measurement unit defined in the user’s account settings.

Values:
TEMPERATURE_UNIT_UNSPECIFIED (0):

Temperature unit is not specified.

TEMPERATURE_UNIT_CELSIUS (1):

Temperature unit is Celsius.

TEMPERATURE_UNIT_FAHRENHEIT (2):

Temperature unit is Fahrenheit.

class WaterUnit(value)[source]

Bases: proto.enums.Enum

The water measurement unit defined in the user’s account settings.

Values:
WATER_UNIT_UNSPECIFIED (0):

Water unit is not specified.

WATER_UNIT_ML (1):

Water unit is milliliters.

WATER_UNIT_FL_OZ (2):

Water unit is fluid ounces.

WATER_UNIT_CUP (3):

Water unit is cups.

class WeightUnit(value)[source]

Bases: proto.enums.Enum

The measurement unit defined in the user’s account settings.

Values:
WEIGHT_UNIT_UNSPECIFIED (0):

Weight unit is not specified.

WEIGHT_UNIT_POUNDS (1):

Weight unit is pounds.

WEIGHT_UNIT_STONE (2):

Weight unit is stones.

WEIGHT_UNIT_KILOGRAMS (3):

Weight unit is kilograms.

class google.devicesandservices.health_v4.types.Sleep(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A sleep session possibly including stages.

interval

Required. Observed sleep interval.

Type

google.devicesandservices.health_v4.types.SessionTimeInterval

type_

Optional. SleepType: classic or stages.

Type

google.devicesandservices.health_v4.types.Sleep.SleepType

stages

Optional. List of non-overlapping contiguous sleep stage segments that cover the sleep period.

Type

MutableSequence[google.devicesandservices.health_v4.types.Sleep.SleepStage]

out_of_bed_segments

Optional. “Out of bed” segments that can overlap with sleep stages.

Type

MutableSequence[google.devicesandservices.health_v4.types.Sleep.OutOfBedSegment]

metadata

Optional. Sleep metadata: processing, main, manually edited, stages status.

Type

google.devicesandservices.health_v4.types.Sleep.SleepMetadata

summary

Output only. Sleep summary: metrics and stages summary.

Type

google.devicesandservices.health_v4.types.Sleep.SleepSummary

create_time

Output only. Creation time of this sleep observation.

Type

google.protobuf.timestamp_pb2.Timestamp

update_time

Output only. Last update time of this sleep observation.

Type

google.protobuf.timestamp_pb2.Timestamp

class OutOfBedSegment(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A time interval to represent an out-of-bed segment.

start_time

Required. Segment tart time.

Type

google.protobuf.timestamp_pb2.Timestamp

start_utc_offset

Required. The offset of the user’s local time at the start of the segment relative to the Coordinated Universal Time (UTC).

Type

google.protobuf.duration_pb2.Duration

end_time

Required. Segment end time.

Type

google.protobuf.timestamp_pb2.Timestamp

end_utc_offset

Required. The offset of the user’s local time at the end of the segment relative to the Coordinated Universal Time (UTC).

Type

google.protobuf.duration_pb2.Duration

class SleepMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Additional information about how the sleep was processed.

stages_status

Output only. Sleep stages algorithm processing status.

Type

google.devicesandservices.health_v4.types.Sleep.SleepMetadata.StagesState

processed

Output only. Sleep and sleep stages algorithms finished processing.

Type

bool

nap

Output only. Naps are sleeps without stages and relatively short durations.

Type

bool

manually_edited

Output only. Some sleeps autodetected by algorithms can be manually edited by users.

Type

bool

external_id

Optional. Sleep identifier relevant in the context of the data source.

Type

str

class StagesState(value)[source]

Bases: proto.enums.Enum

Sleep stages algorithm processing status.

Values:
STAGES_STATE_UNSPECIFIED (0):

Output only. Sleep stages status is unspecified.

REJECTED_COVERAGE (1):

Output only. Sleep stages cannot be computed due to low RR coverage.

REJECTED_MAX_GAP (2):

Output only. Sleep stages cannot be computed due to the large middle gap (2h).

REJECTED_START_GAP (3):

Output only. Sleep stages cannot be computed due to the large start gap (1h).

REJECTED_END_GAP (4):

Output only. Sleep stages cannot be computed due to the large end gap (1h).

REJECTED_NAP (5):

Output only. Sleep stages cannot be computed because the sleep log is a nap (has < 3h duration).

REJECTED_SERVER (6):

Output only. Sleep stages cannot be computed because input data is not available (PPGV2, wake magnitude, etc).

TIMEOUT (7):

Output only. Sleep stages cannot be computed due to server timeout.

SUCCEEDED (8):

Output only. Sleep stages successfully computed.

PROCESSING_INTERNAL_ERROR (9):

Output only. Sleep stages cannot be computed due to server internal error.

class SleepStage(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Sleep stage segment.

start_time

Required. Sleep stage start time.

Type

google.protobuf.timestamp_pb2.Timestamp

start_utc_offset

Required. The offset of the user’s local time at the start of the sleep stage relative to the Coordinated Universal Time (UTC).

Type

google.protobuf.duration_pb2.Duration

end_time

Required. Sleep stage end time.

Type

google.protobuf.timestamp_pb2.Timestamp

end_utc_offset

Required. The offset of the user’s local time at the end of the sleep stage relative to the Coordinated Universal Time (UTC).

Type

google.protobuf.duration_pb2.Duration

type_

Required. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.

Type

google.devicesandservices.health_v4.types.Sleep.SleepStageType

create_time

Output only. Creation time of this sleep stages segment.

Type

google.protobuf.timestamp_pb2.Timestamp

update_time

Output only. Last update time of this sleep stages segment.

Type

google.protobuf.timestamp_pb2.Timestamp

class SleepStageType(value)[source]

Bases: proto.enums.Enum

Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.

Values:
SLEEP_STAGE_TYPE_UNSPECIFIED (0):

The default unset value.

AWAKE (1):

Sleep stage AWAKE.

LIGHT (2):

Sleep stage LIGHT.

DEEP (3):

Sleep stage DEEP.

REM (4):

Sleep stage REM.

ASLEEP (5):

Sleep stage ASLEEP.

RESTLESS (6):

Sleep stage RESTLESS.

class SleepSummary(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Sleep summary: metrics and stages summary.

minutes_in_sleep_period

Output only. Delta between wake time and bedtime. It is the sum of all stages.

This field is a member of oneof _minutes_in_sleep_period.

Type

int

minutes_after_wake_up

Output only. Minutes after wake up calculated by restlessness algorithm.

This field is a member of oneof _minutes_after_wake_up.

Type

int

minutes_to_fall_asleep

Output only. Minutes to fall asleep calculated by restlessness algorithm.

This field is a member of oneof _minutes_to_fall_asleep.

Type

int

minutes_asleep

Output only. Total number of minutes asleep. For classic sleep it is the sum of ASLEEP stages (excluding AWAKE and RESTLESS). For “stages” sleep it is the sum of LIGHT, REM and DEEP stages (excluding AWAKE).

This field is a member of oneof _minutes_asleep.

Type

int

minutes_awake

Output only. Total number of minutes awake. It is a sum of all AWAKE stages.

This field is a member of oneof _minutes_awake.

Type

int

stages_summary

Output only. List of summaries (total duration and segment count) per each sleep stage type.

Type

MutableSequence[google.devicesandservices.health_v4.types.Sleep.SleepSummary.StageSummary]

class StageSummary(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Total duration and segment count for a stage.

type_

Output only. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.

Type

google.devicesandservices.health_v4.types.Sleep.SleepStageType

minutes

Output only. Total duration in minutes of a sleep stage.

This field is a member of oneof _minutes.

Type

int

count

Output only. Number of sleep stages segments.

This field is a member of oneof _count.

Type

int

class SleepType(value)[source]

Bases: proto.enums.Enum

Sleep type: classic or stages.

Values:
SLEEP_TYPE_UNSPECIFIED (0):

Sleep type is unspecified.

CLASSIC (1):

Classic sleep is a sleep with 3 stages types: AWAKE, RESTLESS and ASLEEP.

STAGES (2):

On top of “classic” sleep stages an additional processing pass can calculate stages more precisely, overwriting the prior stages with AWAKE, LIGHT, REM and DEEP.

class google.devicesandservices.health_v4.types.Steps(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Step count over the time interval.

interval

Required. Observed interval.

Type

google.devicesandservices.health_v4.types.ObservationTimeInterval

count

Required. Number of steps in the recorded interval.

This field is a member of oneof _count.

Type

int

class google.devicesandservices.health_v4.types.StepsRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the result of the rollup of the steps data type.

count_sum

Total number of steps in the interval.

This field is a member of oneof _count_sum.

Type

int

class google.devicesandservices.health_v4.types.Subscriber(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

– Resource Messages – A subscriber receives notifications from Google Health API.

name

Identifier. The resource name of the Subscriber. Format: projects/{project}/subscribers/{subscriber} The {project} ID is a Google Cloud Project ID or Project Number. The {subscriber} ID is user-settable (4-36 characters, matching /a-z/) if provided during creation, or system-generated otherwise (e.g., a UUID). Example (User-settable subscriber ID): projects/my-project/subscribers/my-sub-123 Example (System-generated subscriber ID): projects/my-project/subscribers/a1b2c3d4-e5f6-7890-1234-567890abcdef

Type

str

endpoint_uri

Required. The full HTTPS URI where update notifications will be sent. The URI must be a valid URL and use HTTPS as the scheme. This endpoint will be verified during CreateSubscriber and UpdateSubscriber calls. See RPC documentation for verification details.

Type

str

create_time

Output only. The time at which the subscriber was created.

Type

google.protobuf.timestamp_pb2.Timestamp

update_time

Output only. The time at which the subscriber was last updated.

Type

google.protobuf.timestamp_pb2.Timestamp

subscriber_configs

Optional. Configuration for the subscriber.

Type

MutableSequence[google.devicesandservices.health_v4.types.SubscriberConfig]

endpoint_authorization

Required. Authorization mechanism for a subscriber endpoint. This is required to ensure the endpoint can be verified.

Type

google.devicesandservices.health_v4.types.EndpointAuthorization

state

Output only. The state of the subscriber.

Type

google.devicesandservices.health_v4.types.Subscriber.State

class State(value)[source]

Bases: proto.enums.Enum

The state of the subscriber.

Values:
STATE_UNSPECIFIED (0):

Represents an unspecified subscriber state.

UNVERIFIED (1):

Represents an unverified subscriber. This is the initial state of the subscriber when it is created. The backend will verify the subscriber’s endpoint_uri.

ACTIVE (2):

Represents an active subscriber. The endpoint has been verified.

INACTIVE (3):

Represents an inactive subscriber.

class google.devicesandservices.health_v4.types.SubscriberConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Configuration for a subscriber. A notification is sent to a subscription ONLY if the subscriber has a config for the data type.

data_types

Required. See Google Health API data types for the list of supported data types. Values should be in kebab-case.

Type

MutableSequence[str]

subscription_create_policy

Required. Policy for subscription creation.

Type

google.devicesandservices.health_v4.types.SubscriberConfig.SubscriptionCreatePolicy

class SubscriptionCreatePolicy(value)[source]

Bases: proto.enums.Enum

Policy for subscription creation.

Values:
SUBSCRIPTION_CREATE_POLICY_UNSPECIFIED (0):

Represents an unspecified policy.

AUTOMATIC (1):

When using AUTOMATIC, individual subscriptions are not created or stored. Instead, eligibility for notifications is computed dynamically. When a data update occurs for a given data type, notifications are sent to all subscribers with an AUTOMATIC policy for that data type, provided the user has granted the necessary consents.

This means you do not need to call CreateSubscription for each user; notifications are managed automatically based on user consents. As Subscription resources are not stored, they cannot be retrieved or managed through GetSubscription, ListSubscriptions, UpdateSubscription, or DeleteSubscription.

MANUAL (2):

Requires subscriptions to be created manually for new users. The developer needs to call CreateSubscription for new users.

class google.devicesandservices.health_v4.types.Subscription(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A subscription to a data collection for a specific user, to be delivered to a subscriber.

name

Identifier. The resource name of the Subscription. Format: projects/{project}/subscribers/{subscriber}/subscriptions/{subscription} Example: projects/my-project/subscribers/my-subscriber-123/subscriptions/my-subscription-456 The {project} ID is mandatory (6-30 characters, matching /[a-z][a-z0-9-]{6,30}/) The {subscriber} ID is user-settable (4-36 characters, matching /a-z/) if provided during creation, or system-generated otherwise. The {subscription} ID is user-settable (4-36 chars, matching /a-z/) or system-generated otherwise.

Type

str

data_types

Optional. Data types subscribed to. A subscriber will only receive notifications for data types that are declared here. A subscription can only subscribe to the data types of the subscriber. Supported data types are: “altitude”, “distance”, “floors”, “sleep”, “steps”, “weight”.

Type

MutableSequence[str]

user

Immutable. The resource name of the user for whom this subscription is active. Format: users/{user} where {user} is the public healthUserId as returned by the GetIdentity action in the profile PAPI (see google.devicesandservices.health.v4main.HealthProfileService.GetIdentity).

Type

str

class google.devicesandservices.health_v4.types.SwimLengthsData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Swim lengths data over the time interval.

interval

Required. Observed interval.

Type

google.devicesandservices.health_v4.types.ObservationTimeInterval

swim_stroke_type

Required. Swim stroke type.

Type

google.devicesandservices.health_v4.types.SwimLengthsData.SwimStrokeType

stroke_count

Required. Number of strokes in the lap.

This field is a member of oneof _stroke_count.

Type

int

class SwimStrokeType(value)[source]

Bases: proto.enums.Enum

Swim stroke type.

Values:
SWIM_STROKE_TYPE_UNSPECIFIED (0):

Swim stroke type is unspecified.

FREESTYLE (1):

Freestyle swim stroke type.

BACKSTROKE (2):

Backstroke swim stroke type.

BREASTSTROKE (3):

Breaststroke swim stroke type.

BUTTERFLY (4):

Butterfly swim stroke type.

class google.devicesandservices.health_v4.types.SwimLengthsDataRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the result of the rollup of the swim lengths data type.

stroke_count_sum

Total number of swim strokes in the interval.

This field is a member of oneof _stroke_count_sum.

Type

int

class google.devicesandservices.health_v4.types.TimeInHeartRateZone(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Time in heart rate zone record. It’s an interval spent in specific heart rate zone.

interval

Required. Observed interval.

Type

google.devicesandservices.health_v4.types.ObservationTimeInterval

heart_rate_zone_type

Required. Heart rate zone type.

Type

google.devicesandservices.health_v4.types.HeartRateZoneType

class google.devicesandservices.health_v4.types.TimeInHeartRateZoneRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the result of the rollup of the time in heart rate zone data type.

time_in_heart_rate_zones

List of time spent in each heart rate zone.

Type

MutableSequence[google.devicesandservices.health_v4.types.TimeInHeartRateZoneRollupValue.TimeInHeartRateZoneValue]

class TimeInHeartRateZoneValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the total time spent in a specific heart rate zone.

heart_rate_zone

The heart rate zone.

Type

google.devicesandservices.health_v4.types.HeartRateZoneType

duration

The total time spent in the specified heart rate zone.

Type

google.protobuf.duration_pb2.Duration

class google.devicesandservices.health_v4.types.TotalCaloriesRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the result of the rollup of the user’s total calories.

kcal_sum

Sum of the total calories in kilocalories.

This field is a member of oneof _kcal_sum.

Type

float

class google.devicesandservices.health_v4.types.UpdateDataPointOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Metadata for an update data point operation.

class google.devicesandservices.health_v4.types.UpdateDataPointRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request to update an identifiable data point.

data_point

Required. The data point to update

The data point’s name field is used to identify the data point to update.

Format: users/{user}/dataTypes/{data_type}/dataPoints/{data_point}

Type

google.devicesandservices.health_v4.types.DataPoint

class google.devicesandservices.health_v4.types.UpdateProfileRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for updating Profile details.

profile

Required. Profile details.

Type

google.devicesandservices.health_v4.types.Profile

update_mask

Optional. The list of fields to be updated.

Type

google.protobuf.field_mask_pb2.FieldMask

class google.devicesandservices.health_v4.types.UpdateSettingsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for updating Settings details.

settings

Required. Settings details

Type

google.devicesandservices.health_v4.types.Settings

update_mask

Optional. The list of fields to be updated.

Type

google.protobuf.field_mask_pb2.FieldMask

class google.devicesandservices.health_v4.types.UpdateSubscriberMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents metadata for updating a subscriber.

class google.devicesandservices.health_v4.types.UpdateSubscriberRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for UpdateSubscriber.

subscriber

Required. The subscriber resource to update. Its ‘name’ field is mapped to the URI, and the value of the ‘name’ field should be of the form: “projects/{project}/subscribers/{subscriber_id}”. The remaining fields of the Subscriber object represent the new values for the corresponding fields in the existing subscriber resource.

Type

google.devicesandservices.health_v4.types.Subscriber

update_mask

Optional. A field mask that specifies which fields of the Subscriber message are to be updated. This allows for partial updates. Supported fields:

  • endpoint_uri

  • subscriber_configs

  • endpoint_authorization

Type

google.protobuf.field_mask_pb2.FieldMask

class google.devicesandservices.health_v4.types.UpdateSubscriptionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for UpdateSubscription.

subscription

Required. The subscription to update. The subscription’s name field is used to identify the subscription to update. Format: projects/{project}/subscribers/{subscriber}/subscriptions/{subscription}

Type

google.devicesandservices.health_v4.types.Subscription

update_mask

Optional. The list of fields to update.

Type

google.protobuf.field_mask_pb2.FieldMask

class google.devicesandservices.health_v4.types.User(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents a user in the Google Health API. It matches the parent resource of collections owned by the user.

Clients currently do not need to interact with this resource directly.

name

Identifier. The resource name of the user.

The {user} ID is a system-generated identifier, as described in [Identity.health_user_id][google.devicesandservices.health.v4.Identity.health_user_id].

Format: users/{user}

Type

str

class google.devicesandservices.health_v4.types.VO2Max(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

VO2 max measurement.

sample_time

Required. The time at which VO2 max was measured.

Type

google.devicesandservices.health_v4.types.ObservationSampleTime

vo2_max

Required. VO2 max value measured as in ml consumed oxygen / kg of body weight / min.

This field is a member of oneof _vo2_max.

Type

float

measurement_method

Optional. The method used to measure the VO2 max value.

Type

google.devicesandservices.health_v4.types.VO2Max.MeasurementMethod

class MeasurementMethod(value)[source]

Bases: proto.enums.Enum

Measurement method used to measure the VO2 max value.

Values:
MEASUREMENT_METHOD_UNSPECIFIED (0):

Unspecified measurement method.

FITBIT_RUN (1):

Fitbit specific, measures VO2 max rate during a run.

GOOGLE_DEMOGRAPHIC (2):

Google specific, measures VO2 max rate for a user based on their demographic data.

COOPER_TEST (3):

Run as far as possible for 12 minutes. Distance correlated with age and gender translates to a VO2 max value.

HEART_RATE_RATIO (4):

Maximum heart rate divided by the resting heart rate, with a multiplier applied. Does not require any exercise.

METABOLIC_CART (5):

Measured by a medical device called metabolic cart.

MULTISTAGE_FITNESS_TEST (6):

Continuous 20m back-and-forth runs with increasing difficulty, until exhaustion.

ROCKPORT_FITNESS_TEST (7):

Measured using walking exercise.

MAX_EXERCISE (8):

Healthkit specific, measures VO2 max rate by monitoring exercise to the user’s physical limit. Similar to COOPER_TEST or MULTISTAGE_FITNESS_TEST.

PREDICTION_SUB_MAX_EXERCISE (9):

Healthkit specific, estimates VO2 max rate based on low-intensity exercise. Similar to ROCKPORT_FITNESS_TEST.

PREDICTION_NON_EXERCISE (10):

Healthkit specific, estimates VO2 max rate without any exercise. Similar to HEART_RATE_RATIO.

OTHER (11):

Use when the method is not covered in this enum.

class google.devicesandservices.health_v4.types.VolumeQuantity(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the volume quantity.

milliliters

Required. Value representing the volume in milliliters.

This field is a member of oneof _milliliters.

Type

float

user_provided_unit

Optional. Value representing the user provided unit, used only for user-facing input and display purposes. In the API format, all volume quantities are converted to milliliters.

Type

google.devicesandservices.health_v4.types.VolumeUnit

class google.devicesandservices.health_v4.types.VolumeUnit(value)[source]

Bases: proto.enums.Enum

Enum representing the unit of volume.

Values:
VOLUME_UNIT_UNSPECIFIED (0):

Unspecified volume unit.

CUP_IMPERIAL (1):

Cup (imperial)

CUP_US (2):

Cup (US)

FLUID_OUNCE_IMPERIAL (3):

Fluid ounce (imperial)

FLUID_OUNCE_US (4):

Fluid ounce (US)

LITER (5):

Liter

MILLILITER (6):

Milliliter

PINT_IMPERIAL (7):

Pint (imperial)

PINT_US (8):

Pint (US)

class google.devicesandservices.health_v4.types.WebhookNotificationCloudLog(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Log message for a webhook notification sent by the Google Health API to a subscriber’s endpoint. Includes the HTTP response received from the endpoint.

http_response

Required. Represents the HTTP response. This message includes the status code, reason phrase, headers, and body.

Type

google.rpc.http_pb2.HttpResponse

class google.devicesandservices.health_v4.types.Weight(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Body weight measurement.

sample_time

Required. The time at which the weight was measured

Type

google.devicesandservices.health_v4.types.ObservationSampleTime

weight_grams

Required. Weight of a user in grams.

This field is a member of oneof _weight_grams.

Type

float

notes

Optional. Standard free-form notes captured at manual logging.

Type

str

class google.devicesandservices.health_v4.types.WeightQuantity(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the weight quantity.

grams

Required. Value representing the weight in grams.

This field is a member of oneof _grams.

Type

float

user_provided_unit

Optional. Value representing the user provided unit.

Type

google.devicesandservices.health_v4.types.WeightUnit

class google.devicesandservices.health_v4.types.WeightRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents the result of the rollup of the weight data type.

weight_grams_avg

Average weight in grams.

This field is a member of oneof _weight_grams_avg.

Type

float

class google.devicesandservices.health_v4.types.WeightUnit(value)[source]

Bases: proto.enums.Enum

Enum representing the unit of weight.

Values:
WEIGHT_UNIT_UNSPECIFIED (0):

Unspecified weight unit.

GRAM (1):

Value representing gram.

KILOGRAM (2):

Value representing kilogram.

OUNCE (3):

Value representing ounce.

POUND (4):

Value representing pound.

STONE (5):

Value representing stone.

MILLIGRAM (6):

Value representing milligram.

MICROGRAM (7):

Value representing microgram.

NANOGRAM (8):

Value representing nanogram.