pub struct PublicModifiedSleepModel {Show 32 fields
pub app_sleep_phase_5_min: Option<String>,
pub average_breath: Option<f64>,
pub average_heart_rate: Option<f64>,
pub average_hrv: Option<i64>,
pub awake_time: Option<i64>,
pub bedtime_end: LocalizedDateTime,
pub bedtime_start: LocalizedDateTime,
pub day: IsoDate,
pub deep_sleep_duration: Option<i64>,
pub efficiency: Option<i64>,
pub heart_rate: Option<PublicSample>,
pub hrv: Option<PublicSample>,
pub id: X,
pub latency: Option<i64>,
pub light_sleep_duration: Option<i64>,
pub low_battery_alert: bool,
pub lowest_heart_rate: Option<i64>,
pub movement_30_sec: Option<String>,
pub period: i64,
pub readiness: Option<PublicReadiness>,
pub readiness_score_delta: Option<i64>,
pub rem_sleep_duration: Option<i64>,
pub restless_periods: Option<i64>,
pub ring_id: Option<String>,
pub sleep_algorithm_version: Option<PublicSleepAlgorithmVersion>,
pub sleep_analysis_reason: Option<PublicSleepAnalysisReason>,
pub sleep_phase_30_sec: Option<String>,
pub sleep_phase_5_min: Option<String>,
pub sleep_score_delta: Option<i64>,
pub time_in_bed: i64,
pub total_sleep_duration: Option<i64>,
pub type_: Option<PublicSleepType>,
}Expand description
PublicModifiedSleepModel
JSON schema
{
"title": "PublicModifiedSleepModel",
"type": "object",
"required": [
"bedtime_end",
"bedtime_start",
"day",
"id",
"low_battery_alert",
"period",
"time_in_bed"
],
"properties": {
"app_sleep_phase_5_min": {
"title": "App Sleep Phase 5 Min",
"description": "\n 5-minute sleep phase classification for the period aligned with what is shown in the app\n where every character corresponds to:\n '1' = deep sleep,\n '2' = light sleep,\n '3' = REM sleep\n '4' = awake.\n Example: \"444423323441114\".\n NOTE: This field will be removed in the future after a transition period.\n ",
"type": [
"string",
"null"
]
},
"average_breath": {
"title": "",
"description": "Average breathing rate during sleep as breaths/minute.",
"type": [
"number",
"null"
]
},
"average_heart_rate": {
"title": "",
"description": "Average heart rate during sleep as beats/minute. NOTE: this is the average calculated by ecore (based on 30-second samples) which is different from what is shown in the app. The app shows the average of aggregated 5-minute heart rate samples.",
"type": [
"number",
"null"
]
},
"average_hrv": {
"title": "",
"description": "Average heart rate variability during sleep.",
"type": [
"integer",
"null"
]
},
"awake_time": {
"title": "",
"description": "Duration spent awake in seconds.",
"type": [
"integer",
"null"
]
},
"bedtime_end": {
"$ref": "#/components/schemas/LocalizedDateTime"
},
"bedtime_start": {
"$ref": "#/components/schemas/LocalizedDateTime"
},
"day": {
"$ref": "#/components/schemas/ISODate"
},
"deep_sleep_duration": {
"title": "",
"description": "Duration spent in deep sleep in seconds.",
"type": [
"integer",
"null"
]
},
"efficiency": {
"title": "",
"description": "Sleep efficiency rating in range [1, 100].",
"type": [
"integer",
"null"
]
},
"heart_rate": {
"title": "",
"description": "Object containing heart rate samples.",
"oneOf": [
{
"type": "null"
},
{
"allOf": [
{
"$ref": "#/components/schemas/PublicSample"
}
]
}
]
},
"hrv": {
"title": "",
"description": "Object containing heart rate variability samples.",
"oneOf": [
{
"type": "null"
},
{
"allOf": [
{
"$ref": "#/components/schemas/PublicSample"
}
]
}
]
},
"id": {
"title": "",
"description": "Unique identifier of the object.",
"type": "string",
"minLength": 1
},
"latency": {
"title": "",
"description": "Sleep latency in seconds. This is the time it took for the user to fall asleep after going to bed.",
"type": [
"integer",
"null"
]
},
"light_sleep_duration": {
"title": "",
"description": "Duration spent in light sleep in seconds.",
"type": [
"integer",
"null"
]
},
"low_battery_alert": {
"title": "",
"description": "Flag indicating if a low battery alert occurred.",
"type": "boolean"
},
"lowest_heart_rate": {
"title": "",
"description": "Lowest heart rate during sleep. NOTE: this is the value calculated by ecore (based on 30-second samples) which is different from what is shown in the app. The app shows the minimum of aggregated 5-minute heart rate samples.",
"type": [
"integer",
"null"
]
},
"movement_30_sec": {
"title": "",
"description": "30-second movement classification for the period where every character corresponds to:\n'1' = no motion,\n'2' = restless,\n'3' = tossing and turning\n'4' = active\nExample: \"1143222134\".",
"type": [
"string",
"null"
]
},
"period": {
"title": "",
"description": "ECore sleep period identifier.",
"type": "integer"
},
"readiness": {
"title": "",
"description": "Object containing the readiness details.",
"oneOf": [
{
"type": "null"
},
{
"allOf": [
{
"$ref": "#/components/schemas/PublicReadiness"
}
]
}
]
},
"readiness_score_delta": {
"title": "",
"description": "Effect on readiness score caused by this sleep period.",
"type": [
"integer",
"null"
]
},
"rem_sleep_duration": {
"title": "",
"description": "Duration spent in REM sleep in seconds.",
"type": [
"integer",
"null"
]
},
"restless_periods": {
"title": "",
"description": "Number of restless periods during sleep.",
"type": [
"integer",
"null"
]
},
"ring_id": {
"title": "Ring Id",
"description": "Encrypted identifier of the ring that produced this sleep data.",
"type": [
"string",
"null"
]
},
"sleep_algorithm_version": {
"title": "",
"description": "Version of the sleep algorithm used to calculate the sleep data.",
"oneOf": [
{
"type": "null"
},
{
"allOf": [
{
"$ref": "#/components/schemas/PublicSleepAlgorithmVersion"
}
]
}
]
},
"sleep_analysis_reason": {
"title": "",
"description": "The reason for the creation or update of the latest version of this sleep.",
"oneOf": [
{
"type": "null"
},
{
"allOf": [
{
"$ref": "#/components/schemas/PublicSleepAnalysisReason"
}
]
}
]
},
"sleep_phase_30_sec": {
"title": "",
"description": "30-second sleep phase classification for the period where every character corresponds to:\n'1' = deep sleep,\n'2' = light sleep,\n'3' = REM sleep\n'4' = awake.\nExample: \"444423323441114\".",
"type": [
"string",
"null"
]
},
"sleep_phase_5_min": {
"title": "",
"description": "5-minute sleep phase classification for the period where every character corresponds to:\n'1' = deep sleep,\n'2' = light sleep,\n'3' = REM sleep\n'4' = awake.\nExample: \"444423323441114\".",
"type": [
"string",
"null"
]
},
"sleep_score_delta": {
"title": "",
"description": "Effect on sleep score caused by this sleep period.",
"type": [
"integer",
"null"
]
},
"time_in_bed": {
"title": "",
"description": "Duration spent in bed in seconds.",
"type": "integer"
},
"total_sleep_duration": {
"title": "",
"description": "Total sleep duration in seconds.",
"type": [
"integer",
"null"
]
},
"type": {
"title": "",
"description": "Type of the sleep period.",
"oneOf": [
{
"type": "null"
},
{
"allOf": [
{
"$ref": "#/components/schemas/PublicSleepType"
}
]
}
]
}
},
"x-cloud-only": true,
"x-collection": "publicsleepmodel",
"x-owner": "sleep-squad"
}Fields§
§app_sleep_phase_5_min: Option<String>5-minute sleep phase classification for the period aligned with what is shown in the app where every character corresponds to: ‘1’ = deep sleep, ‘2’ = light sleep, ‘3’ = REM sleep ‘4’ = awake. Example: “444423323441114”. NOTE: This field will be removed in the future after a transition period.
average_breath: Option<f64>Average breathing rate during sleep as breaths/minute.
average_heart_rate: Option<f64>Average heart rate during sleep as beats/minute. NOTE: this is the average calculated by ecore (based on 30-second samples) which is different from what is shown in the app. The app shows the average of aggregated 5-minute heart rate samples.
average_hrv: Option<i64>Average heart rate variability during sleep.
awake_time: Option<i64>Duration spent awake in seconds.
bedtime_end: LocalizedDateTime§bedtime_start: LocalizedDateTime§day: IsoDate§deep_sleep_duration: Option<i64>Duration spent in deep sleep in seconds.
efficiency: Option<i64>Sleep efficiency rating in range [1, 100].
heart_rate: Option<PublicSample>Object containing heart rate samples.
hrv: Option<PublicSample>Object containing heart rate variability samples.
id: XUnique identifier of the object.
latency: Option<i64>Sleep latency in seconds. This is the time it took for the user to fall asleep after going to bed.
light_sleep_duration: Option<i64>Duration spent in light sleep in seconds.
low_battery_alert: boolFlag indicating if a low battery alert occurred.
lowest_heart_rate: Option<i64>Lowest heart rate during sleep. NOTE: this is the value calculated by ecore (based on 30-second samples) which is different from what is shown in the app. The app shows the minimum of aggregated 5-minute heart rate samples.
movement_30_sec: Option<String>30-second movement classification for the period where every character corresponds to: ‘1’ = no motion, ‘2’ = restless, ‘3’ = tossing and turning ‘4’ = active Example: “1143222134”.
period: i64ECore sleep period identifier.
readiness: Option<PublicReadiness>Object containing the readiness details.
readiness_score_delta: Option<i64>Effect on readiness score caused by this sleep period.
rem_sleep_duration: Option<i64>Duration spent in REM sleep in seconds.
restless_periods: Option<i64>Number of restless periods during sleep.
ring_id: Option<String>Encrypted identifier of the ring that produced this sleep data.
sleep_algorithm_version: Option<PublicSleepAlgorithmVersion>Version of the sleep algorithm used to calculate the sleep data.
sleep_analysis_reason: Option<PublicSleepAnalysisReason>The reason for the creation or update of the latest version of this sleep.
sleep_phase_30_sec: Option<String>30-second sleep phase classification for the period where every character corresponds to: ‘1’ = deep sleep, ‘2’ = light sleep, ‘3’ = REM sleep ‘4’ = awake. Example: “444423323441114”.
sleep_phase_5_min: Option<String>5-minute sleep phase classification for the period where every character corresponds to: ‘1’ = deep sleep, ‘2’ = light sleep, ‘3’ = REM sleep ‘4’ = awake. Example: “444423323441114”.
sleep_score_delta: Option<i64>Effect on sleep score caused by this sleep period.
time_in_bed: i64Duration spent in bed in seconds.
total_sleep_duration: Option<i64>Total sleep duration in seconds.
type_: Option<PublicSleepType>Type of the sleep period.
Trait Implementations§
Source§impl Clone for PublicModifiedSleepModel
impl Clone for PublicModifiedSleepModel
Source§fn clone(&self) -> PublicModifiedSleepModel
fn clone(&self) -> PublicModifiedSleepModel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more