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.MessageEnergy burned as part of an activity, excluding the basal energy burn.
- interval¶
Required. Observed interval
- class google.devicesandservices.health_v4.types.ActiveEnergyBurnedRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents the result of the rollup of active energy burned.
- class google.devicesandservices.health_v4.types.ActiveMinutes(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRecord of active minutes in a given time interval.
- interval¶
Required. Observed interval.
- 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.MessageActive minutes at a given activity level.
- activity_level¶
Required. The level of activity.
- class ActivityLevel(value)[source]¶
Bases:
proto.enums.EnumActivity 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.MessageRepresents 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.
- class ActiveMinutesRollupByActivityLevel(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageActive minutes by activity level.
- activity_level¶
The level of activity.
- class google.devicesandservices.health_v4.types.ActiveZoneMinutes(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRecord of active zone minutes in a given time interval.
- interval¶
Required. Observed interval.
- heart_rate_zone¶
Required. Heart rate zone in which the active zone minutes have been earned, in the given time interval.
- 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
- class HeartRateZone(value)[source]¶
Bases:
proto.enums.EnumRepresents 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.MessageRepresents 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
- class google.devicesandservices.health_v4.types.ActivityLevel(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageInternal type to capture activity level during a certain time interval.
- interval¶
Required. Observed interval.
- activity_level_type¶
Required. Activity level type in the given time interval.
- class ActivityLevelType(value)[source]¶
Bases:
proto.enums.EnumRepresents 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.MessageRepresents 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.
- class ActivityLevelRollupByActivityLevelType(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents the total duration in a specific activity level type.
- activity_level_type¶
Activity level type.
- total_duration¶
Total duration in the activity level type.
- class google.devicesandservices.health_v4.types.Altitude(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageCaptures the altitude gain (i.e. deltas), and not level above sea, for a user in millimeters.
- interval¶
Required. Observed interval.
- class google.devicesandservices.health_v4.types.AltitudeRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents the result of the rollup of the user’s altitude.
- class google.devicesandservices.health_v4.types.BasalEnergyBurned(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageNumber of calories burned due to basal metabolic rate (BMR) over a period of time.
- interval¶
Required. Observed interval.
- class google.devicesandservices.health_v4.types.BatchDeleteDataPointsOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageMetadata for a batch delete data points operation.
- failed_requests¶
The key in this map is the index of the request in the
requestsfield 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.MessageRequest 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/stepsusers/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
namesmust match this field.- Type
- class google.devicesandservices.health_v4.types.BatchDeleteDataPointsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageResponse 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.MessageRepresents a blood glucose level measurement. LINT: LEGACY_NAMES
- sample_time¶
Required. The time at which blood glucose was measured.
- 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
- measurement_source¶
Optional. Source of the measurement.
- meal_type¶
Optional. Meal type of the measurement.
- measurement_timing¶
Optional. Timing of the measurement.
- specimen¶
Optional. Type of body fluid used to measure the blood glucose.
- class MealType(value)[source]¶
Bases:
proto.enums.EnumMeal 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.EnumThe 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.EnumTiming 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.EnumType 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.MessageRepresents the result of the rollup of the blood glucose data type. LINT: LEGACY_NAMES
- class google.devicesandservices.health_v4.types.BodyFat(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageBody fat measurement.
- sample_time¶
Required. The time at which body fat was measured.
- class google.devicesandservices.health_v4.types.BodyFatRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents the result of the rollup of the body fat data type.
- class google.devicesandservices.health_v4.types.CaloriesInHeartRateZoneRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents 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.
- class CaloriesInHeartRateZoneValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents the amount of kilocalories burned in a specific heart rate zone.
- heart_rate_zone¶
The heart rate zone.
- class google.devicesandservices.health_v4.types.CivilDateTime(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageCivil 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.MessageCounterpart of [google.type.Interval][google.type.Interval], but using [CivilDateTime][google.devicesandservices.health.v4.CivilDateTime].
- start¶
Required. The inclusive start of the range.
- end¶
Required. The exclusive end of the range.
- class google.devicesandservices.health_v4.types.CoreBodyTemperature(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageCore 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.
- temperature_celsius¶
Required. The core body temperature in Celsius.
This field is a member of oneof
_temperature_celsius.- Type
- measurement_location¶
Optional. The location of the core body temperature measurement.
- class MeasurementLocation(value)[source]¶
Bases:
proto.enums.EnumMeasurement 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.MessageRepresents 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
- class google.devicesandservices.health_v4.types.CreateDataPointOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageMetadata for a create data point operation.
- class google.devicesandservices.health_v4.types.CreateDataPointRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest 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
- data_point¶
Required. The data point to create.
- class google.devicesandservices.health_v4.types.CreateSubscriberMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents metadata for creating a subscriber.
- class google.devicesandservices.health_v4.types.CreateSubscriberPayload(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessagePayload 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
CreateSubscribercall. See CreateSubscriber RPC documentation for verification details.- Type
- 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
secretwithin this message is crucial for endpoint verification and for securing webhook notifications.
- 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
- subscriber¶
Required. The subscriber to create.
- class google.devicesandservices.health_v4.types.CreateSubscriptionPayload(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessagePayload for creating a subscription.
- user¶
Required. Immutable. The resource name of the user for whom this subscription is active. Format:
users/{user}where{user}is the publichealthUserIdas returned by theGetIdentityaction in the profile PAPI (seegoogle.devicesandservices.health.v4main.HealthProfileService.GetIdentity).- Type
- class google.devicesandservices.health_v4.types.CreateSubscriptionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest 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
- 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
- subscription¶
Required. The subscription to create.
- class google.devicesandservices.health_v4.types.DailyHeartRateVariability(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents the daily heart rate variability data type.
At least one of the following fields must be set:
average_heart_rate_variability_millisecondsnon_rem_heart_rate_beats_per_minuteentropydeep_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
- 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
- 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
- class google.devicesandservices.health_v4.types.DailyHeartRateZones(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageUser’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.MessageThe heart rate zone.
- heart_rate_zone_type¶
Required. The heart rate zone type.
- class google.devicesandservices.health_v4.types.DailyOxygenSaturation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA 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
- 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
- class google.devicesandservices.health_v4.types.DailyRespiratoryRate(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA 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
- class google.devicesandservices.health_v4.types.DailyRestingHeartRate(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageMeasures 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
- daily_resting_heart_rate_metadata¶
Optional. Metadata for the daily resting heart rate.
- class DailyRestingHeartRateMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageMetadata for the daily resting heart rate.
- calculation_method¶
Required. The method used to calculate the resting heart rate.
- class CalculationMethod(value)[source]¶
Bases:
proto.enums.EnumThe 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.MessageRequest 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/stepsusers/me/dataTypes/distance
For a list of the supported data types see the [DailyRollupDataPoint value][google.devicesandservices.health.v4.DailyRollupDataPoint] union field.
- Type
- 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-minutesandtotal-caloriesis 14 days. The maximum range for all other data types is 90 days.
- window_size_days¶
Optional. Aggregation window size, in number of days. Defaults to 1 if not specified.
- Type
- 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
- page_token¶
Optional. The
next_page_tokenfrom 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
- 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 valueusers/me/dataSourceFamilies/google-wearables- tracker devicesusers/me/dataSourceFamilies/google-sources- Google first party sources
- Type
- class google.devicesandservices.health_v4.types.DailyRollUpDataPointsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageResponse 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.MessageValue 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
stepsdata type, or when requested explicitly using thestepsrollup type identifier.This field is a member of oneof
value.
- floors¶
Returned by default when rolling up data points from the
floorsdata type, or when requested explicitly using thefloorsrollup type identifier.This field is a member of oneof
value.
- heart_rate¶
Returned by default when rolling up data points from the
heart-ratedata type, or when requested explicitly using theheart-raterollup type identifier.This field is a member of oneof
value.
- resting_heart_rate_personal_range¶
Returned by default when rolling up data points from the
daily-resting-heart-ratedata type, or when requested explicitly using theresting-heart-rate-personal-rangerollup type identifier.This field is a member of oneof
value.
- heart_rate_variability_personal_range¶
Returned by default when rolling up data points from the
daily-heart-rate-variabilitydata type, or when requested explicitly using theheart-rate-variability-personal-rangerollup type identifier.This field is a member of oneof
value.
- weight¶
Returned by default when rolling up data points from the
weightdata type, or when requested explicitly using theweightrollup type identifier.This field is a member of oneof
value.
- altitude¶
Returned by default when rolling up data points from the
altitudedata type, or when requested explicitly using thealtituderollup type identifier.This field is a member of oneof
value.
- distance¶
Returned by default when rolling up data points from the
distancedata type, or when requested explicitly using thedistancerollup type identifier.This field is a member of oneof
value.
- body_fat¶
Returned by default when rolling up data points from the
body-fatdata type, or when requested explicitly using thebody-fatrollup type identifier.This field is a member of oneof
value.
- total_calories¶
Returned by default when rolling up data points from the
total-caloriesdata type, or when requested explicitly using thetotal-caloriesrollup type identifier.This field is a member of oneof
value.
- active_zone_minutes¶
Returned by default when rolling up data points from the
active-zone-minutesdata type, or when requested explicitly using theactive-zone-minutesrollup type identifier.This field is a member of oneof
value.
- sedentary_period¶
Returned by default when rolling up data points from the
sedentary-perioddata type, or when requested explicitly using thesedentary-periodrollup type identifier.This field is a member of oneof
value.
- run_vo2_max¶
Returned by default when rolling up data points from the
run-vo2-maxdata type, or when requested explicitly using therun-vo2-maxrollup type identifier.This field is a member of oneof
value.
- calories_in_heart_rate_zone¶
Returned by default when rolling up data points from the
calories-in-heart-rate-zonedata type, or when requested explicitly using thecalories-in-heart-rate-zonerollup type identifier.This field is a member of oneof
value.
- activity_level¶
Returned by default when rolling up data points from the
activity-leveldata type, or when requested explicitly using theactivity-levelrollup type identifier.This field is a member of oneof
value.
- nutrition_log¶
Returned by default when rolling up data points from the
nutrition-logdata type, or when requested explicitly using thenutrition-logrollup type identifier.This field is a member of oneof
value.
- hydration_log¶
Returned by default when rolling up data points from the
hydration-logdata type, or when requested explicitly using thehydration-logrollup type identifier.This field is a member of oneof
value.
- time_in_heart_rate_zone¶
Returned by default when rolling up data points from the
time-in-heart-rate-zonedata type, or when requested explicitly using thetime-in-heart-rate-zonerollup type identifier.This field is a member of oneof
value.
- active_minutes¶
Returned by default when rolling up data points from the
active-minutesdata type, or when requested explicitly using theactive-minutesrollup type identifier.This field is a member of oneof
value.
- swim_lengths_data¶
Returned by default when rolling up data points from the
swim-lengths-datadata type, or when requested explicitly using theswim-lengths-datarollup type identifier.This field is a member of oneof
value.
- core_body_temperature¶
Returned by default when rolling up data points from the
core-body-temperaturedata type, or when requested explicitly using thecore-body-temperaturerollup type identifier.This field is a member of oneof
value.
- active_energy_burned¶
Returned by default when rolling up data points from the
active-energy-burneddata type.This field is a member of oneof
value.
- blood_glucose¶
Returned by default when rolling up data points from the
blood-glucosedata type.This field is a member of oneof
value.
- civil_start_time¶
Start time of the window this value aggregates over
- civil_end_time¶
End time of the window this value aggregates over
- class google.devicesandservices.health_v4.types.DailySleepTemperatureDerivations(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageProvides 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
- class google.devicesandservices.health_v4.types.DailyVO2Max(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageContains 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
- estimated¶
Optional. An estimated field is added to indicate when the confidence has decreased sufficiently to consider the value an estimation.
- Type
- cardio_fitness_level¶
Optional. Represents the user’s cardio fitness level based on their VO2 max.
- vo2_max_covariance¶
Optional. The covariance of the VO2 max value.
This field is a member of oneof
_vo2_max_covariance.- Type
- class CardioFitnessLevel(value)[source]¶
Bases:
proto.enums.EnumThe 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.MessageA 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
stepsinterval data type collection.This field is a member of oneof
data.
- floors¶
Optional. Data for points in the
floorsinterval data type collection.This field is a member of oneof
data.
- heart_rate¶
Optional. Data for points in the
heart-ratesample data type collection.This field is a member of oneof
data.
- sleep¶
Optional. Data for points in the
sleepsession data type collection.This field is a member of oneof
data.
- daily_resting_heart_rate¶
Optional. Data for points in the
daily-resting-heart-ratedaily data type collection.This field is a member of oneof
data.
- daily_heart_rate_variability¶
Optional. Data for points in the
daily-heart-rate-variabilitydaily data type collection.This field is a member of oneof
data.
- exercise¶
Optional. Data for points in the
exercisesession data type collection.This field is a member of oneof
data.
- weight¶
Optional. Data for points in the
weightsample data type collection.This field is a member of oneof
data.
- altitude¶
Optional. Data for points in the
altitudeinterval data type collection.This field is a member of oneof
data.
- distance¶
Optional. Data for points in the
distanceinterval data type collection.This field is a member of oneof
data.
- body_fat¶
Optional. Data for points in the
body-fatsample data type collection.This field is a member of oneof
data.
- active_zone_minutes¶
Optional. Data for points in the
active-zone-minutesinterval data type collection, measured in minutes.This field is a member of oneof
data.
- heart_rate_variability¶
Optional. Data for points in the
heart-rate-variabilitysample data type collection.This field is a member of oneof
data.
- daily_sleep_temperature_derivations¶
Optional. Data for points in the
daily-sleep-temperature-derivationsdaily data type collection.This field is a member of oneof
data.
- sedentary_period¶
Optional. Data for points in the
sedentary-periodinterval data type collection.This field is a member of oneof
data.
- run_vo2_max¶
Optional. Data for points in the
run-vo2-maxsample data type collection.This field is a member of oneof
data.
- oxygen_saturation¶
Optional. Data for points in the
oxygen-saturationsample data type collection.This field is a member of oneof
data.
- daily_oxygen_saturation¶
Optional. Data for points in the
daily-oxygen-saturationdaily data type collection.This field is a member of oneof
data.
- activity_level¶
Optional. Data for points in the
activity-leveldaily data type collection.This field is a member of oneof
data.
- vo2_max¶
Optional. Data for points in the
vo2-maxsample data type collection.This field is a member of oneof
data.
- daily_vo2_max¶
Optional. Data for points in the
daily-vo2-maxdaily data type collection.This field is a member of oneof
data.
- nutrition_log¶
Optional. Data for points in the
nutrition-logsession data type collection.This field is a member of oneof
data.
- irregular_rhythm_notification¶
Optional. Data for points in the
irregular-rhythm-notificationsession data type collection.This field is a member of oneof
data.
- electrocardiogram¶
Optional. Data for points in the
electrocardiogramsession data type collection.This field is a member of oneof
data.
- daily_heart_rate_zones¶
Optional. Data for points in the
daily-heart-rate-zonesdaily data type collection.This field is a member of oneof
data.
- hydration_log¶
Optional. Data for points in the
hydration-logsession data type collection.This field is a member of oneof
data.
- time_in_heart_rate_zone¶
Optional. Data for points in the
time-in-heart-rate-zoneinterval data type collection.This field is a member of oneof
data.
- active_minutes¶
Optional. Data for points in the
active-minutesinterval data type collection.This field is a member of oneof
data.
- respiratory_rate_sleep_summary¶
Optional. Data for points in the
respiratory-rate-sleep-summarysample data type collection.This field is a member of oneof
data.
- daily_respiratory_rate¶
Optional. Data for points in the
daily-respiratory-ratedaily data type collection.This field is a member of oneof
data.
- swim_lengths_data¶
Optional. Data for points in the
swim-lengths-datainterval data type collection.This field is a member of oneof
data.
- height¶
Optional. Data for points in the
heightsample data type collection.This field is a member of oneof
data.
- basal_energy_burned¶
Optional. Data for points in the
basal-energy-burnedinterval data type collection.This field is a member of oneof
data.
- core_body_temperature¶
Optional. Data for points in the
core-body-temperaturesample data type collection.This field is a member of oneof
data.
- active_energy_burned¶
Optional. Data for points in the
active-energy-burnedinterval data type collection.This field is a member of oneof
data.
- food_measurement_unit¶
Optional. The food measurement unit details.
This field is a member of oneof
data.
- blood_glucose¶
Optional. Data for points in the
blood-glucosesample data type collection.This field is a member of oneof
data.
- 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-567890abcdefThe
{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-caloriesfor thetotal_caloriesfield.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
- data_source¶
Optional. Data source information for the metric
- class google.devicesandservices.health_v4.types.DataSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageData 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.
- 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.
- application¶
Output only. Captures metadata for the application that provided this data.
- platform¶
Output only. Captures the platform that uploaded the data.
- class Application(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageOptional 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
- 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
- class Device(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageCaptures metadata about the device that recorded the measurement.
- form_factor¶
Optional. Captures the form factor of the device.
- class FormFactor(value)[source]¶
Bases:
proto.enums.EnumForm 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.EnumThe 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.EnumThe 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.MessageRepresents 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.
- class google.devicesandservices.health_v4.types.DeleteSubscriberMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents metadata for deleting a subscriber.
- class google.devicesandservices.health_v4.types.DeleteSubscriberRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for DeleteSubscriber.
- class google.devicesandservices.health_v4.types.DeleteSubscriptionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest 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-456The {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
- class google.devicesandservices.health_v4.types.Distance(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageDistance traveled over an interval of time.
- interval¶
Required. Observed interval.
- class google.devicesandservices.health_v4.types.DistanceRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageResult of the rollup of the user’s distance.
- class google.devicesandservices.health_v4.types.Electrocardiogram(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents 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_offsetandend_utc_offsetwill 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_timeandend_timeof the interval are equal, representing the reading time.
- 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
- result_classification¶
Optional. The result classification of the ECG reading.
- 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
- 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
- lead_number¶
Optional. The number of leads used for ECG reading.
This field is a member of oneof
_lead_number.- Type
- 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, anddevice_model.
- class ResultClassification(value)[source]¶
Bases:
proto.enums.EnumThe 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.MessageAuthorization 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-SIGNATUREHTTP 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
CreateSubscriberandUpdateSubscribercalls, and will be sent in theAuthorizationheader for all subsequent webhook notifications to this endpoint.- Type
- class google.devicesandservices.health_v4.types.EnergyQuantity(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents the energy quantity.
- kcal¶
Required. Value representing the energy in kilocalories.
This field is a member of oneof
_kcal.- Type
- user_provided_unit¶
Optional. Value representing the user provided unit.
- class google.devicesandservices.health_v4.types.EnergyUnit(value)[source]¶
Bases:
proto.enums.EnumEnum 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.MessageAn exercise that stores information about a physical activity.
- interval¶
Required. Observed exercise interval
- exercise_type¶
Required. The type of activity performed during an exercise.
- 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 ( )
- exercise_metadata¶
Optional. Additional exercise metadata.
- active_duration¶
Optional. Duration excluding pauses.
- update_time¶
Output only. This is the timestamp of the last update to the exercise.
- create_time¶
Output only. Represents the timestamp of the creation of the exercise.
- class ExerciseEvent(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents instantaneous events that happen during an exercise, such as start, stop, pause, split.
- event_time¶
Required. Exercise event time
- event_utc_offset¶
Required. Exercise event time offset from UTC
- exercise_event_type¶
Required. The type of the event, such as start, stop, pause, resume.
- class ExerciseEventType(value)[source]¶
Bases:
proto.enums.EnumThe 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.MessageAdditional exercise metadata.
- class ExerciseType(value)[source]¶
Bases:
proto.enums.EnumThe 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.MessageRepresents 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
- start_utc_offset¶
Required. Lap start time offset from UTC
- end_time¶
Required. Lap end time
- end_utc_offset¶
Required. Lap end time offset from UTC
- active_duration¶
Output only. Lap time excluding the pauses.
- metrics_summary¶
Required. Summary metrics for this split.
- split_type¶
Required. Method used to split the exercise laps. Users may manually mark the lap as complete even if the tracking is automatic.
- class SplitType(value)[source]¶
Bases:
proto.enums.EnumThe 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.MessageRepresents 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/2026443605080188808The
{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
- class google.devicesandservices.health_v4.types.ExportExerciseTcxResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents a Response for exporting exercise data in TCX format.
- class google.devicesandservices.health_v4.types.Floors(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageGained elevation measured in floors over the time interval
- interval¶
Required. Observed interval
- class google.devicesandservices.health_v4.types.FloorsRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents the result of the rollup of the user’s floors.
- class google.devicesandservices.health_v4.types.Food(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents a food item.
- access_level¶
Required. The access level of the food.
- 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
- meal_type¶
Optional. The meal type associated with this food.
- 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.
- total_carbohydrate¶
Optional. Value representing the total carbohydrate of the food for the default serving.
- total_fat¶
Optional. Value representing the total fat of the food for the default serving.
- energy_min¶
Optional. Value representing the minimum energy of the food for the default serving.
- energy_avg¶
Optional. Value representing the average energy of the food for the default serving.
- energy_max¶
Optional. Value representing the maximum energy of the food for the default serving.
- default_serving¶
Required. Value representing the default serving of the food.
- 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.MessageRepresents 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
- food_measurement_unit_display_name¶
Output only. Legacy measurement unit for serving size in singular form (e.g. “piece”, “gram”).
- Type
- food_measurement_unit_display_name_plural¶
Output only. Legacy measurement unit for serving size in plural form (e.g. “pieces”, “grams”).
- Type
- class google.devicesandservices.health_v4.types.FoodAccessLevel(value)[source]¶
Bases:
proto.enums.EnumEnum 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.MessageRepresents a food measurement unit.
- display_name¶
Required. The display name of the food measurement unit (e.g., “gram”, “piece”).
- Type
- class google.devicesandservices.health_v4.types.GetDataPointRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest for getting a single data point
- class google.devicesandservices.health_v4.types.GetIdentityRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for getting Identity details.
- class google.devicesandservices.health_v4.types.GetIrnProfileRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for getting IRN Profile details.
- name¶
Required. The resource name of the IRN Profile. Format:
users/{user}/irnProfileExample:users/1234567890/irnProfileorusers/me/irnProfileThe {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 literalmecan also be used to refer to the authenticated user.- Type
- class google.devicesandservices.health_v4.types.GetPairedDeviceRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for getting a Device.
- class google.devicesandservices.health_v4.types.GetProfileRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for getting Profile details.
- class google.devicesandservices.health_v4.types.GetSettingsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for getting Settings details.
- class google.devicesandservices.health_v4.types.HeartRate(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA heart rate measurement.
- sample_time¶
Required. Observation time
- beats_per_minute¶
Required. The heart rate value in beats per minute.
This field is a member of oneof
_beats_per_minute.- Type
- metadata¶
Optional. Metadata about the heart rate sample.
- class HeartRateMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageHeart rate metadata.
- motion_context¶
Optional. Indicates the user’s level of activity when the heart rate sample was measured
- sensor_location¶
Optional. Indicates the location of the sensor that measured the heart rate.
- class MotionContext(value)[source]¶
Bases:
proto.enums.EnumThe 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.EnumThe 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.MessageRepresents 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
- class google.devicesandservices.health_v4.types.HeartRateVariability(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageCaptures 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.
- 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
- class google.devicesandservices.health_v4.types.HeartRateVariabilityPersonalRangeRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents the result of the rollup of the user’s daily heart rate variability personal range.
- class google.devicesandservices.health_v4.types.HeartRateZoneType(value)[source]¶
Bases:
proto.enums.EnumThe 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.MessageBody height measurement.
- sample_time¶
Required. The time at which the height was recorded.
- class google.devicesandservices.health_v4.types.HydrationLog(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageHolds information about a user logged hydration.
- interval¶
Required. Observed interval.
- amount_consumed¶
Required. Amount of liquid (ex. water) consumed.
- class google.devicesandservices.health_v4.types.HydrationLogRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents the result of the rollup of the hydration log data type.
- amount_consumed¶
Rollup for amount consumed.
- class VolumeQuantityRollup(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRollup for volume quantity.
- milliliters_sum¶
Required. The sum of volume in milliliters.
This field is a member of oneof
_milliliters_sum.- Type
- user_provided_unit_last¶
Optional. The user provided unit on the last element.
- class google.devicesandservices.health_v4.types.Identity(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents details about the Google user’s identity.
- 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
- 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
- class google.devicesandservices.health_v4.types.IrnProfile(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageIrregular 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}/irnProfileExample:users/1234567890/irnProfileorusers/me/irnProfileThe {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 literalmecan also be used to refer to the authenticated user.- Type
- enrollment_status¶
Required. Whether or not the user is currently enrolled in having their data processed for IRN alerts.
- Type
- update_time¶
Output only. The timestamp of the last piece of analyzable data synced by the user.
- class google.devicesandservices.health_v4.types.IrregularRhythmNotification(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents 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.
- 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, anddevice_model.
- class AlertWindow(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageAn 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.
- start_utc_offset¶
Required. The UTC offset of the user’s timezone when the analysis window started.
- end_time¶
Required. The end time of the analysis window.
- end_utc_offset¶
Required. The UTC offset of the user’s timezone when the analysis window ended.
- 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
- 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
- positive¶
Optional. Flag indicating whether the window was positive for AFib or not. A
truevalue indicates that AFib was detected in this window. Afalsevalue means AFib was not detected, but does not guarantee the absence of AFib.- Type
- 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.MessageA single heart beat measurement.
- physical_time¶
Required. The time of the heart beat measurement.
- utc_offset¶
Required. The UTC offset of the user’s timezone when the heart beat measurement occurred.
- civil_time¶
Output only. The civil time in the timezone the subject is in at the time of the observation.
- class google.devicesandservices.health_v4.types.ListDataPointsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest 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/stepsusers/me/dataTypes/weight
For a list of the supported data types see the [DataPoint data][google.devicesandservices.health.v4.DataPoint] union field.
- Type
- 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
exerciseandsleepthe default page size is 25. The maximum page size forexerciseandsleepis 25.- Type
- 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_timeSupported comparison operators:
>=,<Timestamp literal expected in RFC-3339 format
Supported logical operators:
ANDExample:
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_timeSupported comparison operators:
>=,<Date with optional time literal expected in ISO 8601
YYYY-MM-DD[THH:mm:ss]formatSupported logical operators:
ANDExample:
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_timeSupported comparison operators:
>=,<Timestamp literal expected in RFC-3339 format
Supported logical operators:
ANDExample:
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_timeSupported comparison operators:
>=,<Date with optional time literal expected in ISO 8601
YYYY-MM-DD[THH:mm:ss]formatSupported logical operators:
ANDExample:
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}.dateSupported comparison operators:
>=,<Date literal expected in ISO 8601
YYYY-MM-DDformatSupported logical operators:
ANDExample:
daily_heart_rate_variability.date < "2024-08-15"
Session civil start time (Excluding Sleep and ECG):
Pattern:
{session_data_type}.interval.civil_start_timeSupported comparison operators:
>=,<Date with optional time literal expected in ISO 8601
YYYY-MM-DD[THH:mm:ss]formatSupported logical operators:
ANDExample:
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_timeSupported 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_timeSupported comparison operators:
>=,<Timestamp literal expected in RFC-3339 format
Supported logical operators:
AND,ORExample:
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_timeSupported comparison operators:
>=,<Date with optional time literal expected in ISO 8601
YYYY-MM-DD[THH:mm:ss]formatSupported logical operators:
AND,ORExample:
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
- class google.devicesandservices.health_v4.types.ListDataPointsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageResponse containing raw data points matching the query
- data_points¶
Data points matching the query
- Type
MutableSequence[google.devicesandservices.health_v4.types.DataPoint]
- class google.devicesandservices.health_v4.types.ListPairedDevicesRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for listing Devices.
- 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
- class google.devicesandservices.health_v4.types.ListPairedDevicesResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageResponse message for ListPairedDevices.
- paired_devices¶
The paired devices of the user.
- Type
MutableSequence[google.devicesandservices.health_v4.types.PairedDevice]
- class google.devicesandservices.health_v4.types.ListSubscribersRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for ListSubscribers.
- parent¶
Required. The parent, which owns this collection of subscribers. Format: projects/{project}
- Type
- 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
- class google.devicesandservices.health_v4.types.ListSubscribersResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageResponse 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_tokento retrieve the next page. If this field is omitted, there are no subsequent pages.- Type
- class google.devicesandservices.health_v4.types.ListSubscriptionsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest 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
- 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:
userdata_type
The
useridentifier (e.g.,user1inusers/user1) refers to the publichealthUserIdExample: user = “users/user1” Example: user = “users/user1” OR user = “users/user2” Example: user = “users/user1” AND (data_type = “sleep” OR data_type = “weight”)
- Type
- 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
- class google.devicesandservices.health_v4.types.ListSubscriptionsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageResponse message for ListSubscriptions.
- subscriptions¶
The subscriptions from the specified subscriber.
- Type
MutableSequence[google.devicesandservices.health_v4.types.Subscription]
- class google.devicesandservices.health_v4.types.MealType(value)[source]¶
Bases:
proto.enums.EnumEnum 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.MessageSoftware as Medical Device (SaMD) metadata. Used to construct the Unique Device Identifier (UDI).
- firmware_version¶
Output only. The firmware version running on the compatible device used to collect the data.
- Type
- class google.devicesandservices.health_v4.types.MetricsSummary(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageSummary 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
- distance_millimeters¶
Optional. Total distance covered by the user during the exercise.
This field is a member of oneof
_distance_millimeters.- Type
- steps¶
Optional. Total steps taken during the exercise.
This field is a member of oneof
_steps.- Type
- 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
- 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
- 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
- elevation_gain_millimeters¶
Optional. Total elevation gain during the exercise.
This field is a member of oneof
_elevation_gain_millimeters.- Type
- active_zone_minutes¶
Optional. Total active zone minutes for the exercise.
This field is a member of oneof
_active_zone_minutes.- Type
- 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
- 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
- heart_rate_zone_durations¶
Optional. Time spent in each heart rate zone.
- mobility_metrics¶
Optional. Mobility workouts specific metrics. Only present in the advanced running exercises.
- class MobilityMetrics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageMobility 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
- 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
- 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
- avg_vertical_ratio¶
Optional. Vertical oscillation/stride length between [5.0, 11.0].
This field is a member of oneof
_avg_vertical_ratio.- Type
- 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
- class TimeInHeartRateZones(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageTime spent in each heart rate zone.
- light_time¶
Optional. Time spent in light heart rate zone.
- moderate_time¶
Optional. Time spent in moderate heart rate zone.
- vigorous_time¶
Optional. Time spent in vigorous heart rate zone.
- peak_time¶
Optional. Time spent in peak heart rate zone.
- class google.devicesandservices.health_v4.types.Nutrient(value)[source]¶
Bases:
proto.enums.EnumHolds 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.MessageRepresents the quantity of a nutrient.
- quantity¶
Required. Value representing the quantity of the nutrient.
- nutrient¶
Required. Value representing the nutrient.
- class google.devicesandservices.health_v4.types.NutritionLog(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageHolds information about a user logged food.
There are two ways of creating a nutrition log based on the food type:
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_namewill be populated based on the referenced food.Anonymous food: Using the
food_display_namefield and setting thenutrients,energy,energy_from_fat,total_carbohydrate,total_fatfields manually.
The identified food is preferred over the anonymous food. Nutrition logs created from anonymous food are not be editable.
- interval¶
Required. Observed interval.
- 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.
- 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.
- 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.
- 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.
- meal_type¶
Optional. Value representing the meal type of the nutrition log.
- serving¶
Optional. Value representing the nutrition log serving.
- 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
- class Serving(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents different properties and information about the serving of a specific food.
- class google.devicesandservices.health_v4.types.NutritionLogRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents 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.
- energy_from_fat¶
Value Energy from fat rollup.
- total_carbohydrate¶
Total carbohydrate rollup.
- total_fat¶
Total fat rollup.
- class EnergyQuantityRollup(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRollup for the energy quantity.
- kcal_sum¶
Required. The sum of the energy in kilocalories.
This field is a member of oneof
_kcal_sum.- Type
- user_provided_unit_last¶
Optional. The user provided unit on the last element.
- class NutrientQuantityRollup(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageNutrient quantity rollup.
- quantity¶
Required. Aggregated nutrient weight.
- nutrient¶
Required. Aggregated nutrient.
- class WeightQuantityRollup(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRollup for the weight.
- grams_sum¶
Required. The sum of the weight in grams.
This field is a member of oneof
_grams_sum.- Type
- user_provided_unit_last¶
Optional. The user provided unit on the last element.
- class google.devicesandservices.health_v4.types.ObservationSampleTime(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents a sample time of an observed data point.
- physical_time¶
Required. The time of the observation.
- utc_offset¶
Required. The offset of the user’s local time during the observation relative to the Coordinated Universal Time (UTC).
- civil_time¶
Output only. The civil time in the timezone the subject is in at the time of the observation.
- class google.devicesandservices.health_v4.types.ObservationTimeInterval(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents a time interval of an observed data point.
- start_time¶
Required. Observed interval start time.
- 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).
- end_time¶
Required. Observed interval end time.
- 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).
- 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
- 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
- class google.devicesandservices.health_v4.types.OxygenSaturation(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageCaptures the user’s instantaneous oxygen saturation percentage (SpO2).
- sample_time¶
Required. The time at which oxygen saturation was measured.
- class google.devicesandservices.health_v4.types.PairedDevice(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageUser’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/123orusers/me/pairedDevices/123- Type
- device_type¶
Output only. The device type. Supported: TRACKER | SCALE
- battery_status¶
Output only. The battery status of the device. Supported: High | Medium | Low | Empty
- Type
- last_sync_time¶
Output only. The time of last sync with the Fitbit mobile application.
- 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.EnumThe 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.MessageProfile details.
- name¶
Identifier. The resource name of this Profile resource.
Format:
users/{user}/profileExample:users/1234567890/profileorusers/me/profileThe {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 literalmecan also be used to refer to the authenticated user.- Type
- age¶
Optional. The age in years based on the user’s birth date. Updates to this field are currently not supported.
- Type
- 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.readonlyhttps://www.googleapis.com/auth/googlehealth.activity_and_fitness
This field is a member of oneof
_user_configured_walking_stride_length_mm.- Type
- 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.readonlyhttps://www.googleapis.com/auth/googlehealth.activity_and_fitness
This field is a member of oneof
_user_configured_running_stride_length_mm.- Type
- 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.readonlyhttps://www.googleapis.com/auth/googlehealth.activity_and_fitness
This field is a member of oneof
_auto_walking_stride_length_mm.- Type
- 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.readonlyhttps://www.googleapis.com/auth/googlehealth.activity_and_fitness
This field is a member of oneof
_auto_running_stride_length_mm.- Type
- class google.devicesandservices.health_v4.types.ReconcileDataPointsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest 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/stepsusers/me/dataTypes/heart-rate
For a list of the supported data types see the [DataPoint data][google.devicesandservices.health.v4.DataPoint] union field.
- Type
- 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
exerciseandsleepthe default page size is 25. The maximum page size forexerciseandsleepis 25.- Type
- 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
- 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 valueusers/me/dataSourceFamilies/google-wearables- tracker devicesusers/me/dataSourceFamilies/google-sources- Google first party sources
- Type
- class google.devicesandservices.health_v4.types.ReconcileDataPointsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageResponse containing the list of reconciled DataPoints.
- data_points¶
Data points matching the query
- Type
MutableSequence[google.devicesandservices.health_v4.types.ReconciledDataPoint]
- class google.devicesandservices.health_v4.types.ReconciledDataPoint(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA 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
stepsinterval data type collection.This field is a member of oneof
data.
- floors¶
Data for points in the
floorsinterval data type collection.This field is a member of oneof
data.
- heart_rate¶
Data for points in the
heart-ratesample data type collection.This field is a member of oneof
data.
- sleep¶
Data for points in the
sleepsession data type collection.This field is a member of oneof
data.
- daily_resting_heart_rate¶
Data for points in the
daily-resting-heart-ratedaily data type collection.This field is a member of oneof
data.
- daily_heart_rate_variability¶
Data for points in the
daily-heart-rate-variabilitydaily data type collection.This field is a member of oneof
data.
- exercise¶
Data for points in the
exercisesession data type collection.This field is a member of oneof
data.
- weight¶
Data for points in the
weightsample data type collection.This field is a member of oneof
data.
- altitude¶
Data for points in the
altitudeinterval data type collection.This field is a member of oneof
data.
- distance¶
Data for points in the
distanceinterval data type collection.This field is a member of oneof
data.
- body_fat¶
Data for points in the
body-fatsample data type collection.This field is a member of oneof
data.
- active_zone_minutes¶
Data for points in the
active-zone-minutesinterval data type collection, measured in minutes.This field is a member of oneof
data.
- heart_rate_variability¶
Data for points in the
heart-rate-variabilitysample data type collection.This field is a member of oneof
data.
- daily_sleep_temperature_derivations¶
Data for points in the
daily-sleep-temperature-derivationsdaily data type collection.This field is a member of oneof
data.
- sedentary_period¶
Data for points in the
sedentary-periodinterval data type collection.This field is a member of oneof
data.
- run_vo2_max¶
Data for points in the
run-vo2-maxsample data type collection.This field is a member of oneof
data.
- oxygen_saturation¶
Data for points in the
oxygen-saturationsample data type collection.This field is a member of oneof
data.
- daily_oxygen_saturation¶
Data for points in the
daily-oxygen-saturationdaily data type collection.This field is a member of oneof
data.
- activity_level¶
Data for points in the
activity-leveldaily data type collection.This field is a member of oneof
data.
- vo2_max¶
Data for points in the
vo2-maxsample data type collection.This field is a member of oneof
data.
- daily_vo2_max¶
Data for points in the
daily-vo2-maxdaily data type collection.This field is a member of oneof
data.
- nutrition_log¶
Data for points in the
nutrition-logsession data type collection.This field is a member of oneof
data.
- daily_heart_rate_zones¶
Data for points in the
daily-heart-rate-zonesdaily data type collection.This field is a member of oneof
data.
- hydration_log¶
Data for points in the
hydration-logsession data type collection.This field is a member of oneof
data.
- time_in_heart_rate_zone¶
Data for points in the
time-in-heart-rate-zoneinterval data type collection.This field is a member of oneof
data.
- active_minutes¶
Data for points in the
active-minutesinterval data type collection.This field is a member of oneof
data.
- respiratory_rate_sleep_summary¶
Data for points in the
respiratory-rate-sleep-summarysample data type collection.This field is a member of oneof
data.
- daily_respiratory_rate¶
Data for points in the
daily-respiratory-ratedaily data type collection.This field is a member of oneof
data.
- swim_lengths_data¶
Data for points in the
swim-lengths-datainterval data type collection.This field is a member of oneof
data.
- height¶
Data for points in the
heightsample data type collection.This field is a member of oneof
data.
- basal_energy_burned¶
Data for points in the
basal-energy-burnedinterval data type collection.This field is a member of oneof
data.
- core_body_temperature¶
Data for points in the
core-body-temperaturesample data type collection.This field is a member of oneof
data.
- active_energy_burned¶
Data for points in the
active-energy-burnedinterval data type collection.This field is a member of oneof
data.
- blood_glucose¶
Data for points in the
blood-glucosesample data type collection.This field is a member of oneof
data.
- 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-567890abcdefThe
{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-caloriesfor thetotal_caloriesfield.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
- class google.devicesandservices.health_v4.types.RespiratoryRateSleepSummary(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRecords 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.
- deep_sleep_stats¶
Optional. Respiratory rate statistics for deep sleep.
- light_sleep_stats¶
Optional. Respiratory rate statistics for light sleep.
- rem_sleep_stats¶
Optional. Respiratory rate statistics for REM sleep.
- full_sleep_stats¶
Required. Full respiratory rate statistics.
- class RespiratoryRateSleepSummaryStatistics(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRespiratory 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
- class google.devicesandservices.health_v4.types.RestingHeartRatePersonalRangeRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents the rollup value for the daily resting heart rate data type.
- class google.devicesandservices.health_v4.types.RollUpDataPointsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest 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/stepsusers/me/dataTypes/distance
For a list of the supported data types see the [RollupDataPoint value][google.devicesandservices.health.v4.RollupDataPoint] union field.
- Type
- 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-minutesandtotal-caloriesis 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.
- 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
- 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
- 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 valueusers/me/dataSourceFamilies/google-wearables- tracker devicesusers/me/dataSourceFamilies/google-sources- Google first party sources
- Type
- class google.devicesandservices.health_v4.types.RollUpDataPointsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageResponse 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]
- class google.devicesandservices.health_v4.types.RollupDataPoint(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageValue 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
stepsdata type, or when requested explicitly using thestepsrollup type identifier.This field is a member of oneof
value.
- floors¶
Returned by default when rolling up data points from the
floorsdata type, or when requested explicitly using thefloorsrollup type identifier.This field is a member of oneof
value.
- heart_rate¶
Returned by default when rolling up data points from the
heart-ratedata type, or when requested explicitly using theheart-raterollup type identifier.This field is a member of oneof
value.
- weight¶
Returned by default when rolling up data points from the
weightdata type, or when requested explicitly using theweightrollup type identifier.This field is a member of oneof
value.
- altitude¶
Returned by default when rolling up data points from the
altitudedata type, or when requested explicitly using thealtituderollup type identifier.This field is a member of oneof
value.
- distance¶
Returned by default when rolling up data points from the
distancedata type, or when requested explicitly using thedistancerollup type identifier.This field is a member of oneof
value.
- body_fat¶
Returned by default when rolling up data points from the
body-fatdata type, or when requested explicitly using thebody-fatrollup type identifier.This field is a member of oneof
value.
- total_calories¶
Returned by default when rolling up data points from the
total-caloriesdata type, or when requested explicitly using thetotal-caloriesrollup type identifier.This field is a member of oneof
value.
- active_zone_minutes¶
Returned by default when rolling up data points from the
active-zone-minutesdata type, or when requested explicitly using theactive-zone-minutesrollup type identifier.This field is a member of oneof
value.
- sedentary_period¶
Returned by default when rolling up data points from the
sedentary-perioddata type, or when requested explicitly using thesedentary-periodrollup type identifier.This field is a member of oneof
value.
- run_vo2_max¶
Returned by default when rolling up data points from the
run-vo2-maxdata type, or when requested explicitly using therun-vo2-maxrollup type identifier.This field is a member of oneof
value.
- calories_in_heart_rate_zone¶
Returned by default when rolling up data points from the
calories-in-heart-rate-zonedata type, or when requested explicitly using thecalories-in-heart-rate-zonerollup type identifier.This field is a member of oneof
value.
- activity_level¶
Returned by default when rolling up data points from the
activity-leveldata type, or when requested explicitly using theactivity-levelrollup type identifier.This field is a member of oneof
value.
- nutrition_log¶
Returned by default when rolling up data points from the
nutrition-logdata type, or when requested explicitly using thenutrition-logrollup type identifier.This field is a member of oneof
value.
- hydration_log¶
Returned by default when rolling up data points from the
hydration-logdata type, or when requested explicitly using thehydration-logrollup type identifier.This field is a member of oneof
value.
- time_in_heart_rate_zone¶
Returned by default when rolling up data points from the
time-in-heart-rate-zonedata type, or when requested explicitly using thetime-in-heart-rate-zonerollup type identifier.This field is a member of oneof
value.
- active_minutes¶
Returned by default when rolling up data points from the
active-minutesdata type, or when requested explicitly using theactive-minutesrollup type identifier.This field is a member of oneof
value.
- swim_lengths_data¶
Returned by default when rolling up data points from the
swim-lengths-datadata type, or when requested explicitly using theswim-lengths-datarollup type identifier.This field is a member of oneof
value.
- core_body_temperature¶
Returned by default when rolling up data points from the
core-body-temperaturedata type, or when requested explicitly using thecore-body-temperaturerollup type identifier.This field is a member of oneof
value.
- active_energy_burned¶
Returned by default when rolling up data points from the
active-energy-burneddata type.This field is a member of oneof
value.
- blood_glucose¶
Returned by default when rolling up data points from the
blood-glucosedata type.This field is a member of oneof
value.
- start_time¶
Start time of the window this value aggregates over
- end_time¶
End time of the window this value aggregates over
- class google.devicesandservices.health_v4.types.RunVO2Max(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageVO2 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.
- class google.devicesandservices.health_v4.types.RunVO2MaxRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents 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
- class google.devicesandservices.health_v4.types.SedentaryPeriod(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageSedentaryPeriod data represents the periods of time that the user was sedentary (i.e. not moving while wearing the device).
- interval¶
Required. Observed interval.
- class google.devicesandservices.health_v4.types.SedentaryPeriodRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents the result of the rollup of the user’s sedentary periods.
- duration_sum¶
The total time user spent sedentary during the interval.
- class google.devicesandservices.health_v4.types.SessionTimeInterval(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents a time interval of session data point, which bundles multiple observed metrics together.
- start_time¶
Required. The start time of the observed session.
- 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).
- end_time¶
Required. The end time of the observed session.
- 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).
- civil_start_time¶
Output only. Session start time in civil time in the timezone the subject is in at the start of the session.
- civil_end_time¶
Output only. Session end time in civil time in the timezone the subject is in at the end of the session.
- class google.devicesandservices.health_v4.types.Settings(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageSettings details.
- name¶
Identifier. The resource name of this Settings resource.
Format:
users/{user}/settingsExample:users/1234567890/settingsorusers/me/settingsThe {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 literalmecan also be used to refer to the authenticated user.- Type
- auto_stride_enabled¶
Optional. True if the user’s stride length is determined automatically. Updates to this field are currently not supported.
- Type
- distance_unit¶
Optional. The measurement unit defined in the user’s account settings. Updates to this field are currently not supported.
- glucose_unit¶
Optional. The measurement unit defined in the user’s account settings.
- height_unit¶
Optional. The measurement unit defined in the user’s account settings.
- language_locale¶
Optional. The locale defined in the user’s account settings. Updates to this field are currently not supported.
- Type
- utc_offset¶
Optional. The user’s timezone offset relative to UTC. Updates to this field are currently not supported.
- 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.
- 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.
- swim_unit¶
Optional. The measurement unit defined in the user’s account settings.
- temperature_unit¶
Optional. The measurement unit defined in the user’s account settings.
- 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
- weight_unit¶
Optional. The measurement unit defined in the user’s account settings.
- water_unit¶
Optional. The measurement unit defined in the user’s account settings.
- 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
- class DistanceUnit(value)[source]¶
Bases:
proto.enums.EnumThe 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.EnumThe 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.EnumThe 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.EnumThe 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.EnumThe 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.EnumThe 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.EnumThe 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.EnumThe 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.MessageA sleep session possibly including stages.
- interval¶
Required. Observed sleep interval.
- type_¶
Optional. SleepType: classic or stages.
- 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.
- summary¶
Output only. Sleep summary: metrics and stages summary.
- create_time¶
Output only. Creation time of this sleep observation.
- update_time¶
Output only. Last update time of this sleep observation.
- class OutOfBedSegment(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageA time interval to represent an out-of-bed segment.
- start_time¶
Required. Segment tart time.
- 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).
- end_time¶
Required. Segment end time.
- 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).
- class SleepMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageAdditional information about how the sleep was processed.
- stages_status¶
Output only. Sleep stages algorithm processing status.
- manually_edited¶
Output only. Some sleeps autodetected by algorithms can be manually edited by users.
- Type
- class StagesState(value)[source]¶
Bases:
proto.enums.EnumSleep 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.MessageSleep stage segment.
- start_time¶
Required. Sleep stage start time.
- 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).
- end_time¶
Required. Sleep stage end time.
- 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_¶
Required. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.
- create_time¶
Output only. Creation time of this sleep stages segment.
- update_time¶
Output only. Last update time of this sleep stages segment.
- class SleepStageType(value)[source]¶
Bases:
proto.enums.EnumSleep 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.MessageSleep 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
- 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
- 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
- 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
- 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
- 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.MessageTotal duration and segment count for a stage.
- type_¶
Output only. Sleep stage type: AWAKE, DEEP, REM, LIGHT etc.
- class SleepType(value)[source]¶
Bases:
proto.enums.EnumSleep 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.MessageStep count over the time interval.
- interval¶
Required. Observed interval.
- class google.devicesandservices.health_v4.types.StepsRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents the result of the rollup of the steps data type.
- 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
- 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
- create_time¶
Output only. The time at which the subscriber was created.
- update_time¶
Output only. The time at which the subscriber was last updated.
- 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.
- state¶
Output only. The state of the subscriber.
- class State(value)[source]¶
Bases:
proto.enums.EnumThe 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.MessageConfiguration 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.
- class SubscriptionCreatePolicy(value)[source]¶
Bases:
proto.enums.EnumPolicy 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 anAUTOMATICpolicy for that data type, provided the user has granted the necessary consents.This means you do not need to call
CreateSubscriptionfor each user; notifications are managed automatically based on user consents. AsSubscriptionresources are not stored, they cannot be retrieved or managed throughGetSubscription,ListSubscriptions,UpdateSubscription, orDeleteSubscription.- 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.MessageA 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-456The {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
- 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]
- class google.devicesandservices.health_v4.types.SwimLengthsData(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageSwim lengths data over the time interval.
- interval¶
Required. Observed interval.
- swim_stroke_type¶
Required. Swim stroke type.
- stroke_count¶
Required. Number of strokes in the lap.
This field is a member of oneof
_stroke_count.- Type
- class SwimStrokeType(value)[source]¶
Bases:
proto.enums.EnumSwim 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.MessageRepresents the result of the rollup of the swim lengths data type.
- class google.devicesandservices.health_v4.types.TimeInHeartRateZone(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageTime in heart rate zone record. It’s an interval spent in specific heart rate zone.
- interval¶
Required. Observed interval.
- heart_rate_zone_type¶
Required. Heart rate zone type.
- class google.devicesandservices.health_v4.types.TimeInHeartRateZoneRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents 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.
- class TimeInHeartRateZoneValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents the total time spent in a specific heart rate zone.
- heart_rate_zone¶
The heart rate zone.
- duration¶
The total time spent in the specified heart rate zone.
- class google.devicesandservices.health_v4.types.TotalCaloriesRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents the result of the rollup of the user’s total calories.
- class google.devicesandservices.health_v4.types.UpdateDataPointOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageMetadata for an update data point operation.
- class google.devicesandservices.health_v4.types.UpdateDataPointRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest to update an identifiable data point.
- data_point¶
Required. The data point to update
The data point’s
namefield is used to identify the data point to update.Format:
users/{user}/dataTypes/{data_type}/dataPoints/{data_point}
- class google.devicesandservices.health_v4.types.UpdateProfileRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for updating Profile details.
- profile¶
Required. Profile details.
- update_mask¶
Optional. The list of fields to be updated.
- class google.devicesandservices.health_v4.types.UpdateSettingsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for updating Settings details.
- settings¶
Required. Settings details
- update_mask¶
Optional. The list of fields to be updated.
- class google.devicesandservices.health_v4.types.UpdateSubscriberMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents metadata for updating a subscriber.
- class google.devicesandservices.health_v4.types.UpdateSubscriberRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest 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.
- 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
- class google.devicesandservices.health_v4.types.UpdateSubscriptionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRequest message for UpdateSubscription.
- subscription¶
Required. The subscription to update. The subscription’s
namefield is used to identify the subscription to update. Format: projects/{project}/subscribers/{subscriber}/subscriptions/{subscription}
- update_mask¶
Optional. The list of fields to update.
- class google.devicesandservices.health_v4.types.User(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents 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.
- class google.devicesandservices.health_v4.types.VO2Max(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageVO2 max measurement.
- sample_time¶
Required. The time at which VO2 max was measured.
- 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
- measurement_method¶
Optional. The method used to measure the VO2 max value.
- class MeasurementMethod(value)[source]¶
Bases:
proto.enums.EnumMeasurement 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.MessageRepresents the volume quantity.
- milliliters¶
Required. Value representing the volume in milliliters.
This field is a member of oneof
_milliliters.- Type
- 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.
- class google.devicesandservices.health_v4.types.VolumeUnit(value)[source]¶
Bases:
proto.enums.EnumEnum 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.MessageLog 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.MessageBody weight measurement.
- sample_time¶
Required. The time at which the weight was measured
- class google.devicesandservices.health_v4.types.WeightQuantity(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents the weight quantity.
- grams¶
Required. Value representing the weight in grams.
This field is a member of oneof
_grams.- Type
- user_provided_unit¶
Optional. Value representing the user provided unit.
- class google.devicesandservices.health_v4.types.WeightRollupValue(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.MessageRepresents the result of the rollup of the weight data type.
- class google.devicesandservices.health_v4.types.WeightUnit(value)[source]¶
Bases:
proto.enums.EnumEnum 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.