Skip to main content

oura_toolkit_api/
lib.rs

1// @generated by `just gen-rust` (progenitor) from the overlaid + down-converted Oura
2// OpenAPI spec. DO NOT hand-edit — regenerate with `just gen-rust`. See issue #6.
3
4#[allow(unused_imports)]
5use progenitor_client::{encode_path, ClientHooks, OperationInfo, RequestBuilderExt};
6#[allow(unused_imports)]
7pub use progenitor_client::{ByteStream, ClientInfo, Error, ResponseValue};
8#[doc = r" Types used as operation parameters and responses."]
9#[allow(clippy::all)]
10pub mod types {
11    #[doc = r" Error types."]
12    pub mod error {
13        #[doc = r" Error from a `TryFrom` or `FromStr` implementation."]
14        pub struct ConversionError(::std::borrow::Cow<'static, str>);
15        impl ::std::error::Error for ConversionError {}
16        impl ::std::fmt::Display for ConversionError {
17            fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
18                ::std::fmt::Display::fmt(&self.0, f)
19            }
20        }
21
22        impl ::std::fmt::Debug for ConversionError {
23            fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
24                ::std::fmt::Debug::fmt(&self.0, f)
25            }
26        }
27
28        impl From<&'static str> for ConversionError {
29            fn from(value: &'static str) -> Self {
30                Self(value.into())
31            }
32        }
33
34        impl From<String> for ConversionError {
35            fn from(value: String) -> Self {
36                Self(value.into())
37            }
38        }
39    }
40
41    #[doc = "`ArrayUnionFloatNoneTypeBits64`"]
42    #[doc = r""]
43    #[doc = r" <details><summary>JSON schema</summary>"]
44    #[doc = r""]
45    #[doc = r" ```json"]
46    #[doc = "{"]
47    #[doc = "  \"title\": \"ArrayNullableFloatBits64\","]
48    #[doc = "  \"type\": \"array\","]
49    #[doc = "  \"items\": {"]
50    #[doc = "    \"type\": ["]
51    #[doc = "      \"number\","]
52    #[doc = "      \"null\""]
53    #[doc = "    ]"]
54    #[doc = "  }"]
55    #[doc = "}"]
56    #[doc = r" ```"]
57    #[doc = r" </details>"]
58    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
59    #[serde(transparent)]
60    pub struct ArrayUnionFloatNoneTypeBits64(pub ::std::vec::Vec<::std::option::Option<f64>>);
61    impl ::std::ops::Deref for ArrayUnionFloatNoneTypeBits64 {
62        type Target = ::std::vec::Vec<::std::option::Option<f64>>;
63        fn deref(&self) -> &::std::vec::Vec<::std::option::Option<f64>> {
64            &self.0
65        }
66    }
67
68    impl ::std::convert::From<ArrayUnionFloatNoneTypeBits64>
69        for ::std::vec::Vec<::std::option::Option<f64>>
70    {
71        fn from(value: ArrayUnionFloatNoneTypeBits64) -> Self {
72            value.0
73        }
74    }
75
76    impl ::std::convert::From<::std::vec::Vec<::std::option::Option<f64>>>
77        for ArrayUnionFloatNoneTypeBits64
78    {
79        fn from(value: ::std::vec::Vec<::std::option::Option<f64>>) -> Self {
80            Self(value)
81        }
82    }
83
84    #[doc = "`CreateWebhookSubscriptionRequest`"]
85    #[doc = r""]
86    #[doc = r" <details><summary>JSON schema</summary>"]
87    #[doc = r""]
88    #[doc = r" ```json"]
89    #[doc = "{"]
90    #[doc = "  \"title\": \"CreateWebhookSubscriptionRequest\","]
91    #[doc = "  \"type\": \"object\","]
92    #[doc = "  \"required\": ["]
93    #[doc = "    \"callback_url\","]
94    #[doc = "    \"data_type\","]
95    #[doc = "    \"event_type\","]
96    #[doc = "    \"verification_token\""]
97    #[doc = "  ],"]
98    #[doc = "  \"properties\": {"]
99    #[doc = "    \"callback_url\": {"]
100    #[doc = "      \"title\": \"Callback Url\","]
101    #[doc = "      \"type\": \"string\""]
102    #[doc = "    },"]
103    #[doc = "    \"data_type\": {"]
104    #[doc = "      \"$ref\": \"#/components/schemas/ExtApiV2DataType\""]
105    #[doc = "    },"]
106    #[doc = "    \"event_type\": {"]
107    #[doc = "      \"$ref\": \"#/components/schemas/WebhookOperation\""]
108    #[doc = "    },"]
109    #[doc = "    \"verification_token\": {"]
110    #[doc = "      \"title\": \"Verification Token\","]
111    #[doc = "      \"type\": \"string\""]
112    #[doc = "    }"]
113    #[doc = "  }"]
114    #[doc = "}"]
115    #[doc = r" ```"]
116    #[doc = r" </details>"]
117    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
118    pub struct CreateWebhookSubscriptionRequest {
119        pub callback_url: ::std::string::String,
120        pub data_type: ExtApiV2DataType,
121        pub event_type: WebhookOperation,
122        pub verification_token: ::std::string::String,
123    }
124
125    #[doc = "`DailyResilienceModel`"]
126    #[doc = r""]
127    #[doc = r" <details><summary>JSON schema</summary>"]
128    #[doc = r""]
129    #[doc = r" ```json"]
130    #[doc = "{"]
131    #[doc = "  \"title\": \"DailyResilienceModel\","]
132    #[doc = "  \"type\": \"object\","]
133    #[doc = "  \"required\": ["]
134    #[doc = "    \"contributors\","]
135    #[doc = "    \"day\","]
136    #[doc = "    \"id\","]
137    #[doc = "    \"level\""]
138    #[doc = "  ],"]
139    #[doc = "  \"properties\": {"]
140    #[doc = "    \"contributors\": {"]
141    #[doc = "      \"$ref\": \"#/components/schemas/ResilienceContributors\""]
142    #[doc = "    },"]
143    #[doc = "    \"day\": {"]
144    #[doc = "      \"title\": \"Day\","]
145    #[doc = "      \"description\": \"Day when the resilience record was recorded.\","]
146    #[doc = "      \"type\": \"string\","]
147    #[doc = "      \"format\": \"date\""]
148    #[doc = "    },"]
149    #[doc = "    \"id\": {"]
150    #[doc = "      \"title\": \"Id\","]
151    #[doc = "      \"type\": \"string\""]
152    #[doc = "    },"]
153    #[doc = "    \"level\": {"]
154    #[doc = "      \"$ref\": \"#/components/schemas/LongTermResilienceLevel\""]
155    #[doc = "    }"]
156    #[doc = "  }"]
157    #[doc = "}"]
158    #[doc = r" ```"]
159    #[doc = r" </details>"]
160    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
161    pub struct DailyResilienceModel {
162        pub contributors: ResilienceContributors,
163        #[doc = "Day when the resilience record was recorded."]
164        pub day: ::chrono::naive::NaiveDate,
165        pub id: ::std::string::String,
166        pub level: LongTermResilienceLevel,
167    }
168
169    #[doc = "An EnhancedTagModel maps an ASSATag. An ASSATag in ExtAPIV2 is called a EnhancedTag\nAn EnhancedTagModel will be populated by data from an ASSATag\nThe fields in the EnhancedTagModel map to fields in an ASSATag"]
170    #[doc = r""]
171    #[doc = r" <details><summary>JSON schema</summary>"]
172    #[doc = r""]
173    #[doc = r" ```json"]
174    #[doc = "{"]
175    #[doc = "  \"title\": \"EnhancedTagModel\","]
176    #[doc = "  \"description\": \"An EnhancedTagModel maps an ASSATag. An ASSATag in ExtAPIV2 is called a EnhancedTag\\nAn EnhancedTagModel will be populated by data from an ASSATag\\nThe fields in the EnhancedTagModel map to fields in an ASSATag\","]
177    #[doc = "  \"type\": \"object\","]
178    #[doc = "  \"required\": ["]
179    #[doc = "    \"id\","]
180    #[doc = "    \"start_day\","]
181    #[doc = "    \"start_time\""]
182    #[doc = "  ],"]
183    #[doc = "  \"properties\": {"]
184    #[doc = "    \"comment\": {"]
185    #[doc = "      \"title\": \"Comment\","]
186    #[doc = "      \"description\": \"Additional freeform text on the tag.\","]
187    #[doc = "      \"type\": ["]
188    #[doc = "        \"string\","]
189    #[doc = "        \"null\""]
190    #[doc = "      ]"]
191    #[doc = "    },"]
192    #[doc = "    \"custom_name\": {"]
193    #[doc = "      \"title\": \"Custom Name\","]
194    #[doc = "      \"description\": \"The name of the tag if the tag_type_code is `custom`.\","]
195    #[doc = "      \"type\": ["]
196    #[doc = "        \"string\","]
197    #[doc = "        \"null\""]
198    #[doc = "      ]"]
199    #[doc = "    },"]
200    #[doc = "    \"end_day\": {"]
201    #[doc = "      \"title\": \"End Day\","]
202    #[doc = "      \"description\": \"Day of the tag's end for events with duration or `NULL` if there is no duration.\","]
203    #[doc = "      \"type\": ["]
204    #[doc = "        \"string\","]
205    #[doc = "        \"null\""]
206    #[doc = "      ],"]
207    #[doc = "      \"format\": \"date\""]
208    #[doc = "    },"]
209    #[doc = "    \"end_time\": {"]
210    #[doc = "      \"description\": \"Timestamp of the tag's end for events with duration or `NULL` if there is no duration.\","]
211    #[doc = "      \"oneOf\": ["]
212    #[doc = "        {"]
213    #[doc = "          \"type\": \"null\""]
214    #[doc = "        },"]
215    #[doc = "        {"]
216    #[doc = "          \"allOf\": ["]
217    #[doc = "            {"]
218    #[doc = "              \"$ref\": \"#/components/schemas/LocalDateTime\""]
219    #[doc = "            }"]
220    #[doc = "          ]"]
221    #[doc = "        }"]
222    #[doc = "      ]"]
223    #[doc = "    },"]
224    #[doc = "    \"id\": {"]
225    #[doc = "      \"title\": \"Id\","]
226    #[doc = "      \"type\": \"string\""]
227    #[doc = "    },"]
228    #[doc = "    \"start_day\": {"]
229    #[doc = "      \"title\": \"Start Day\","]
230    #[doc = "      \"description\": \"Day of the tag (if no duration) or the start day of the tag (with duration).\","]
231    #[doc = "      \"type\": \"string\","]
232    #[doc = "      \"format\": \"date\""]
233    #[doc = "    },"]
234    #[doc = "    \"start_time\": {"]
235    #[doc = "      \"$ref\": \"#/components/schemas/LocalDateTime\""]
236    #[doc = "    },"]
237    #[doc = "    \"tag_type_code\": {"]
238    #[doc = "      \"title\": \"Tag Type Code\","]
239    #[doc = "      \"description\": \"The unique code of the selected tag type, `NULL` for text-only tags, or `custom` for custom tag types.\","]
240    #[doc = "      \"type\": ["]
241    #[doc = "        \"string\","]
242    #[doc = "        \"null\""]
243    #[doc = "      ]"]
244    #[doc = "    }"]
245    #[doc = "  }"]
246    #[doc = "}"]
247    #[doc = r" ```"]
248    #[doc = r" </details>"]
249    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
250    pub struct EnhancedTagModel {
251        #[doc = "Additional freeform text on the tag."]
252        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
253        pub comment: ::std::option::Option<::std::string::String>,
254        #[doc = "The name of the tag if the tag_type_code is `custom`."]
255        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
256        pub custom_name: ::std::option::Option<::std::string::String>,
257        #[doc = "Day of the tag's end for events with duration or `NULL` if there is no duration."]
258        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
259        pub end_day: ::std::option::Option<::chrono::naive::NaiveDate>,
260        #[doc = "Timestamp of the tag's end for events with duration or `NULL` if there is no duration."]
261        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
262        pub end_time: ::std::option::Option<LocalDateTime>,
263        pub id: ::std::string::String,
264        #[doc = "Day of the tag (if no duration) or the start day of the tag (with duration)."]
265        pub start_day: ::chrono::naive::NaiveDate,
266        pub start_time: LocalDateTime,
267        #[doc = "The unique code of the selected tag type, `NULL` for text-only tags, or `custom` for custom tag types."]
268        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
269        pub tag_type_code: ::std::option::Option<::std::string::String>,
270    }
271
272    #[doc = "Data types that partners can subscribe to via ExtApiV2 webhooks."]
273    #[doc = r""]
274    #[doc = r" <details><summary>JSON schema</summary>"]
275    #[doc = r""]
276    #[doc = r" ```json"]
277    #[doc = "{"]
278    #[doc = "  \"title\": \"ExtApiV2DataType\","]
279    #[doc = "  \"description\": \"Data types that partners can subscribe to via ExtApiV2 webhooks.\","]
280    #[doc = "  \"type\": \"string\","]
281    #[doc = "  \"enum\": ["]
282    #[doc = "    \"tag\","]
283    #[doc = "    \"enhanced_tag\","]
284    #[doc = "    \"workout\","]
285    #[doc = "    \"session\","]
286    #[doc = "    \"sleep\","]
287    #[doc = "    \"daily_sleep\","]
288    #[doc = "    \"daily_readiness\","]
289    #[doc = "    \"daily_activity\","]
290    #[doc = "    \"daily_spo2\","]
291    #[doc = "    \"sleep_time\","]
292    #[doc = "    \"rest_mode_period\","]
293    #[doc = "    \"ring_configuration\","]
294    #[doc = "    \"daily_stress\","]
295    #[doc = "    \"daily_cardiovascular_age\","]
296    #[doc = "    \"daily_resilience\","]
297    #[doc = "    \"vo2_max\""]
298    #[doc = "  ]"]
299    #[doc = "}"]
300    #[doc = r" ```"]
301    #[doc = r" </details>"]
302    #[derive(
303        :: serde :: Deserialize,
304        :: serde :: Serialize,
305        Clone,
306        Copy,
307        Debug,
308        Eq,
309        Hash,
310        Ord,
311        PartialEq,
312        PartialOrd,
313    )]
314    pub enum ExtApiV2DataType {
315        #[serde(rename = "tag")]
316        Tag,
317        #[serde(rename = "enhanced_tag")]
318        EnhancedTag,
319        #[serde(rename = "workout")]
320        Workout,
321        #[serde(rename = "session")]
322        Session,
323        #[serde(rename = "sleep")]
324        Sleep,
325        #[serde(rename = "daily_sleep")]
326        DailySleep,
327        #[serde(rename = "daily_readiness")]
328        DailyReadiness,
329        #[serde(rename = "daily_activity")]
330        DailyActivity,
331        #[serde(rename = "daily_spo2")]
332        DailySpo2,
333        #[serde(rename = "sleep_time")]
334        SleepTime,
335        #[serde(rename = "rest_mode_period")]
336        RestModePeriod,
337        #[serde(rename = "ring_configuration")]
338        RingConfiguration,
339        #[serde(rename = "daily_stress")]
340        DailyStress,
341        #[serde(rename = "daily_cardiovascular_age")]
342        DailyCardiovascularAge,
343        #[serde(rename = "daily_resilience")]
344        DailyResilience,
345        #[serde(rename = "vo2_max")]
346        Vo2Max,
347    }
348
349    impl ::std::fmt::Display for ExtApiV2DataType {
350        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
351            match *self {
352                Self::Tag => f.write_str("tag"),
353                Self::EnhancedTag => f.write_str("enhanced_tag"),
354                Self::Workout => f.write_str("workout"),
355                Self::Session => f.write_str("session"),
356                Self::Sleep => f.write_str("sleep"),
357                Self::DailySleep => f.write_str("daily_sleep"),
358                Self::DailyReadiness => f.write_str("daily_readiness"),
359                Self::DailyActivity => f.write_str("daily_activity"),
360                Self::DailySpo2 => f.write_str("daily_spo2"),
361                Self::SleepTime => f.write_str("sleep_time"),
362                Self::RestModePeriod => f.write_str("rest_mode_period"),
363                Self::RingConfiguration => f.write_str("ring_configuration"),
364                Self::DailyStress => f.write_str("daily_stress"),
365                Self::DailyCardiovascularAge => f.write_str("daily_cardiovascular_age"),
366                Self::DailyResilience => f.write_str("daily_resilience"),
367                Self::Vo2Max => f.write_str("vo2_max"),
368            }
369        }
370    }
371
372    impl ::std::str::FromStr for ExtApiV2DataType {
373        type Err = self::error::ConversionError;
374        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
375            match value {
376                "tag" => Ok(Self::Tag),
377                "enhanced_tag" => Ok(Self::EnhancedTag),
378                "workout" => Ok(Self::Workout),
379                "session" => Ok(Self::Session),
380                "sleep" => Ok(Self::Sleep),
381                "daily_sleep" => Ok(Self::DailySleep),
382                "daily_readiness" => Ok(Self::DailyReadiness),
383                "daily_activity" => Ok(Self::DailyActivity),
384                "daily_spo2" => Ok(Self::DailySpo2),
385                "sleep_time" => Ok(Self::SleepTime),
386                "rest_mode_period" => Ok(Self::RestModePeriod),
387                "ring_configuration" => Ok(Self::RingConfiguration),
388                "daily_stress" => Ok(Self::DailyStress),
389                "daily_cardiovascular_age" => Ok(Self::DailyCardiovascularAge),
390                "daily_resilience" => Ok(Self::DailyResilience),
391                "vo2_max" => Ok(Self::Vo2Max),
392                _ => Err("invalid value".into()),
393            }
394        }
395    }
396
397    impl ::std::convert::TryFrom<&str> for ExtApiV2DataType {
398        type Error = self::error::ConversionError;
399        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
400            value.parse()
401        }
402    }
403
404    impl ::std::convert::TryFrom<&::std::string::String> for ExtApiV2DataType {
405        type Error = self::error::ConversionError;
406        fn try_from(
407            value: &::std::string::String,
408        ) -> ::std::result::Result<Self, self::error::ConversionError> {
409            value.parse()
410        }
411    }
412
413    impl ::std::convert::TryFrom<::std::string::String> for ExtApiV2DataType {
414        type Error = self::error::ConversionError;
415        fn try_from(
416            value: ::std::string::String,
417        ) -> ::std::result::Result<Self, self::error::ConversionError> {
418            value.parse()
419        }
420    }
421
422    #[doc = "`HttpValidationError`"]
423    #[doc = r""]
424    #[doc = r" <details><summary>JSON schema</summary>"]
425    #[doc = r""]
426    #[doc = r" ```json"]
427    #[doc = "{"]
428    #[doc = "  \"title\": \"HTTPValidationError\","]
429    #[doc = "  \"type\": \"object\","]
430    #[doc = "  \"properties\": {"]
431    #[doc = "    \"detail\": {"]
432    #[doc = "      \"title\": \"Detail\","]
433    #[doc = "      \"type\": \"array\","]
434    #[doc = "      \"items\": {"]
435    #[doc = "        \"$ref\": \"#/components/schemas/ValidationError\""]
436    #[doc = "      }"]
437    #[doc = "    }"]
438    #[doc = "  }"]
439    #[doc = "}"]
440    #[doc = r" ```"]
441    #[doc = r" </details>"]
442    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
443    pub struct HttpValidationError {
444        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
445        pub detail: ::std::vec::Vec<ValidationError>,
446    }
447
448    impl ::std::default::Default for HttpValidationError {
449        fn default() -> Self {
450            Self {
451                detail: Default::default(),
452            }
453        }
454    }
455
456    #[doc = "`IsoDate`"]
457    #[doc = r""]
458    #[doc = r" <details><summary>JSON schema</summary>"]
459    #[doc = r""]
460    #[doc = r" ```json"]
461    #[doc = "{"]
462    #[doc = "  \"type\": \"string\""]
463    #[doc = "}"]
464    #[doc = r" ```"]
465    #[doc = r" </details>"]
466    #[derive(
467        :: serde :: Deserialize,
468        :: serde :: Serialize,
469        Clone,
470        Debug,
471        Eq,
472        Hash,
473        Ord,
474        PartialEq,
475        PartialOrd,
476    )]
477    #[serde(transparent)]
478    pub struct IsoDate(pub ::std::string::String);
479    impl ::std::ops::Deref for IsoDate {
480        type Target = ::std::string::String;
481        fn deref(&self) -> &::std::string::String {
482            &self.0
483        }
484    }
485
486    impl ::std::convert::From<IsoDate> for ::std::string::String {
487        fn from(value: IsoDate) -> Self {
488            value.0
489        }
490    }
491
492    impl ::std::convert::From<::std::string::String> for IsoDate {
493        fn from(value: ::std::string::String) -> Self {
494            Self(value)
495        }
496    }
497
498    impl ::std::str::FromStr for IsoDate {
499        type Err = ::std::convert::Infallible;
500        fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
501            Ok(Self(value.to_string()))
502        }
503    }
504
505    impl ::std::fmt::Display for IsoDate {
506        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
507            self.0.fmt(f)
508        }
509    }
510
511    #[doc = "`LocalDateTime`"]
512    #[doc = r""]
513    #[doc = r" <details><summary>JSON schema</summary>"]
514    #[doc = r""]
515    #[doc = r" ```json"]
516    #[doc = "{"]
517    #[doc = "  \"type\": \"string\""]
518    #[doc = "}"]
519    #[doc = r" ```"]
520    #[doc = r" </details>"]
521    #[derive(
522        :: serde :: Deserialize,
523        :: serde :: Serialize,
524        Clone,
525        Debug,
526        Eq,
527        Hash,
528        Ord,
529        PartialEq,
530        PartialOrd,
531    )]
532    #[serde(transparent)]
533    pub struct LocalDateTime(pub ::std::string::String);
534    impl ::std::ops::Deref for LocalDateTime {
535        type Target = ::std::string::String;
536        fn deref(&self) -> &::std::string::String {
537            &self.0
538        }
539    }
540
541    impl ::std::convert::From<LocalDateTime> for ::std::string::String {
542        fn from(value: LocalDateTime) -> Self {
543            value.0
544        }
545    }
546
547    impl ::std::convert::From<::std::string::String> for LocalDateTime {
548        fn from(value: ::std::string::String) -> Self {
549            Self(value)
550        }
551    }
552
553    impl ::std::str::FromStr for LocalDateTime {
554        type Err = ::std::convert::Infallible;
555        fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
556            Ok(Self(value.to_string()))
557        }
558    }
559
560    impl ::std::fmt::Display for LocalDateTime {
561        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
562            self.0.fmt(f)
563        }
564    }
565
566    #[doc = "`LocalizedDateTime`"]
567    #[doc = r""]
568    #[doc = r" <details><summary>JSON schema</summary>"]
569    #[doc = r""]
570    #[doc = r" ```json"]
571    #[doc = "{"]
572    #[doc = "  \"type\": \"string\""]
573    #[doc = "}"]
574    #[doc = r" ```"]
575    #[doc = r" </details>"]
576    #[derive(
577        :: serde :: Deserialize,
578        :: serde :: Serialize,
579        Clone,
580        Debug,
581        Eq,
582        Hash,
583        Ord,
584        PartialEq,
585        PartialOrd,
586    )]
587    #[serde(transparent)]
588    pub struct LocalizedDateTime(pub ::std::string::String);
589    impl ::std::ops::Deref for LocalizedDateTime {
590        type Target = ::std::string::String;
591        fn deref(&self) -> &::std::string::String {
592            &self.0
593        }
594    }
595
596    impl ::std::convert::From<LocalizedDateTime> for ::std::string::String {
597        fn from(value: LocalizedDateTime) -> Self {
598            value.0
599        }
600    }
601
602    impl ::std::convert::From<::std::string::String> for LocalizedDateTime {
603        fn from(value: ::std::string::String) -> Self {
604            Self(value)
605        }
606    }
607
608    impl ::std::str::FromStr for LocalizedDateTime {
609        type Err = ::std::convert::Infallible;
610        fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
611            Ok(Self(value.to_string()))
612        }
613    }
614
615    impl ::std::fmt::Display for LocalizedDateTime {
616        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
617            self.0.fmt(f)
618        }
619    }
620
621    #[doc = "`LocationItem`"]
622    #[doc = r""]
623    #[doc = r" <details><summary>JSON schema</summary>"]
624    #[doc = r""]
625    #[doc = r" ```json"]
626    #[doc = "{"]
627    #[doc = "  \"anyOf\": ["]
628    #[doc = "    {"]
629    #[doc = "      \"type\": \"string\""]
630    #[doc = "    },"]
631    #[doc = "    {"]
632    #[doc = "      \"type\": \"integer\""]
633    #[doc = "    }"]
634    #[doc = "  ]"]
635    #[doc = "}"]
636    #[doc = r" ```"]
637    #[doc = r" </details>"]
638    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
639    #[serde(untagged)]
640    pub enum LocationItem {
641        String(::std::string::String),
642        Integer(i64),
643    }
644
645    impl ::std::fmt::Display for LocationItem {
646        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
647            match self {
648                Self::String(x) => x.fmt(f),
649                Self::Integer(x) => x.fmt(f),
650            }
651        }
652    }
653
654    impl ::std::convert::From<i64> for LocationItem {
655        fn from(value: i64) -> Self {
656            Self::Integer(value)
657        }
658    }
659
660    #[doc = "Possible long term resilience level values."]
661    #[doc = r""]
662    #[doc = r" <details><summary>JSON schema</summary>"]
663    #[doc = r""]
664    #[doc = r" ```json"]
665    #[doc = "{"]
666    #[doc = "  \"title\": \"LongTermResilienceLevel\","]
667    #[doc = "  \"description\": \"Possible long term resilience level values.\","]
668    #[doc = "  \"type\": \"string\","]
669    #[doc = "  \"enum\": ["]
670    #[doc = "    \"limited\","]
671    #[doc = "    \"adequate\","]
672    #[doc = "    \"solid\","]
673    #[doc = "    \"strong\","]
674    #[doc = "    \"exceptional\""]
675    #[doc = "  ]"]
676    #[doc = "}"]
677    #[doc = r" ```"]
678    #[doc = r" </details>"]
679    #[derive(
680        :: serde :: Deserialize,
681        :: serde :: Serialize,
682        Clone,
683        Copy,
684        Debug,
685        Eq,
686        Hash,
687        Ord,
688        PartialEq,
689        PartialOrd,
690    )]
691    pub enum LongTermResilienceLevel {
692        #[serde(rename = "limited")]
693        Limited,
694        #[serde(rename = "adequate")]
695        Adequate,
696        #[serde(rename = "solid")]
697        Solid,
698        #[serde(rename = "strong")]
699        Strong,
700        #[serde(rename = "exceptional")]
701        Exceptional,
702    }
703
704    impl ::std::fmt::Display for LongTermResilienceLevel {
705        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
706            match *self {
707                Self::Limited => f.write_str("limited"),
708                Self::Adequate => f.write_str("adequate"),
709                Self::Solid => f.write_str("solid"),
710                Self::Strong => f.write_str("strong"),
711                Self::Exceptional => f.write_str("exceptional"),
712            }
713        }
714    }
715
716    impl ::std::str::FromStr for LongTermResilienceLevel {
717        type Err = self::error::ConversionError;
718        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
719            match value {
720                "limited" => Ok(Self::Limited),
721                "adequate" => Ok(Self::Adequate),
722                "solid" => Ok(Self::Solid),
723                "strong" => Ok(Self::Strong),
724                "exceptional" => Ok(Self::Exceptional),
725                _ => Err("invalid value".into()),
726            }
727        }
728    }
729
730    impl ::std::convert::TryFrom<&str> for LongTermResilienceLevel {
731        type Error = self::error::ConversionError;
732        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
733            value.parse()
734        }
735    }
736
737    impl ::std::convert::TryFrom<&::std::string::String> for LongTermResilienceLevel {
738        type Error = self::error::ConversionError;
739        fn try_from(
740            value: &::std::string::String,
741        ) -> ::std::result::Result<Self, self::error::ConversionError> {
742            value.parse()
743        }
744    }
745
746    impl ::std::convert::TryFrom<::std::string::String> for LongTermResilienceLevel {
747        type Error = self::error::ConversionError;
748        fn try_from(
749            value: ::std::string::String,
750        ) -> ::std::result::Result<Self, self::error::ConversionError> {
751            value.parse()
752        }
753    }
754
755    #[doc = "`MultiDocumentResponseDailyResilienceModel`"]
756    #[doc = r""]
757    #[doc = r" <details><summary>JSON schema</summary>"]
758    #[doc = r""]
759    #[doc = r" ```json"]
760    #[doc = "{"]
761    #[doc = "  \"title\": \"MultiDocumentResponse[DailyResilienceModel]\","]
762    #[doc = "  \"type\": \"object\","]
763    #[doc = "  \"required\": ["]
764    #[doc = "    \"data\","]
765    #[doc = "    \"next_token\""]
766    #[doc = "  ],"]
767    #[doc = "  \"properties\": {"]
768    #[doc = "    \"data\": {"]
769    #[doc = "      \"title\": \"Data\","]
770    #[doc = "      \"type\": \"array\","]
771    #[doc = "      \"items\": {"]
772    #[doc = "        \"$ref\": \"#/components/schemas/DailyResilienceModel\""]
773    #[doc = "      }"]
774    #[doc = "    },"]
775    #[doc = "    \"next_token\": {"]
776    #[doc = "      \"title\": \"Next Token\","]
777    #[doc = "      \"type\": ["]
778    #[doc = "        \"string\","]
779    #[doc = "        \"null\""]
780    #[doc = "      ]"]
781    #[doc = "    }"]
782    #[doc = "  }"]
783    #[doc = "}"]
784    #[doc = r" ```"]
785    #[doc = r" </details>"]
786    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
787    pub struct MultiDocumentResponseDailyResilienceModel {
788        pub data: ::std::vec::Vec<DailyResilienceModel>,
789        pub next_token: ::std::option::Option<::std::string::String>,
790    }
791
792    #[doc = "`MultiDocumentResponseEnhancedTagModel`"]
793    #[doc = r""]
794    #[doc = r" <details><summary>JSON schema</summary>"]
795    #[doc = r""]
796    #[doc = r" ```json"]
797    #[doc = "{"]
798    #[doc = "  \"title\": \"MultiDocumentResponse[EnhancedTagModel]\","]
799    #[doc = "  \"type\": \"object\","]
800    #[doc = "  \"required\": ["]
801    #[doc = "    \"data\","]
802    #[doc = "    \"next_token\""]
803    #[doc = "  ],"]
804    #[doc = "  \"properties\": {"]
805    #[doc = "    \"data\": {"]
806    #[doc = "      \"title\": \"Data\","]
807    #[doc = "      \"type\": \"array\","]
808    #[doc = "      \"items\": {"]
809    #[doc = "        \"$ref\": \"#/components/schemas/EnhancedTagModel\""]
810    #[doc = "      }"]
811    #[doc = "    },"]
812    #[doc = "    \"next_token\": {"]
813    #[doc = "      \"title\": \"Next Token\","]
814    #[doc = "      \"type\": ["]
815    #[doc = "        \"string\","]
816    #[doc = "        \"null\""]
817    #[doc = "      ]"]
818    #[doc = "    }"]
819    #[doc = "  }"]
820    #[doc = "}"]
821    #[doc = r" ```"]
822    #[doc = r" </details>"]
823    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
824    pub struct MultiDocumentResponseEnhancedTagModel {
825        pub data: ::std::vec::Vec<EnhancedTagModel>,
826        pub next_token: ::std::option::Option<::std::string::String>,
827    }
828
829    #[doc = "`MultiDocumentResponsePublicDailyActivity`"]
830    #[doc = r""]
831    #[doc = r" <details><summary>JSON schema</summary>"]
832    #[doc = r""]
833    #[doc = r" ```json"]
834    #[doc = "{"]
835    #[doc = "  \"title\": \"MultiDocumentResponse[PublicDailyActivity]\","]
836    #[doc = "  \"type\": \"object\","]
837    #[doc = "  \"required\": ["]
838    #[doc = "    \"data\","]
839    #[doc = "    \"next_token\""]
840    #[doc = "  ],"]
841    #[doc = "  \"properties\": {"]
842    #[doc = "    \"data\": {"]
843    #[doc = "      \"title\": \"Data\","]
844    #[doc = "      \"type\": \"array\","]
845    #[doc = "      \"items\": {"]
846    #[doc = "        \"$ref\": \"#/components/schemas/PublicDailyActivity\""]
847    #[doc = "      }"]
848    #[doc = "    },"]
849    #[doc = "    \"next_token\": {"]
850    #[doc = "      \"title\": \"Next Token\","]
851    #[doc = "      \"type\": ["]
852    #[doc = "        \"string\","]
853    #[doc = "        \"null\""]
854    #[doc = "      ]"]
855    #[doc = "    }"]
856    #[doc = "  }"]
857    #[doc = "}"]
858    #[doc = r" ```"]
859    #[doc = r" </details>"]
860    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
861    pub struct MultiDocumentResponsePublicDailyActivity {
862        pub data: ::std::vec::Vec<PublicDailyActivity>,
863        pub next_token: ::std::option::Option<::std::string::String>,
864    }
865
866    #[doc = "`MultiDocumentResponsePublicDailyCardiovascularAge`"]
867    #[doc = r""]
868    #[doc = r" <details><summary>JSON schema</summary>"]
869    #[doc = r""]
870    #[doc = r" ```json"]
871    #[doc = "{"]
872    #[doc = "  \"title\": \"MultiDocumentResponse[PublicDailyCardiovascularAge]\","]
873    #[doc = "  \"type\": \"object\","]
874    #[doc = "  \"required\": ["]
875    #[doc = "    \"data\","]
876    #[doc = "    \"next_token\""]
877    #[doc = "  ],"]
878    #[doc = "  \"properties\": {"]
879    #[doc = "    \"data\": {"]
880    #[doc = "      \"title\": \"Data\","]
881    #[doc = "      \"type\": \"array\","]
882    #[doc = "      \"items\": {"]
883    #[doc = "        \"$ref\": \"#/components/schemas/PublicDailyCardiovascularAge\""]
884    #[doc = "      }"]
885    #[doc = "    },"]
886    #[doc = "    \"next_token\": {"]
887    #[doc = "      \"title\": \"Next Token\","]
888    #[doc = "      \"type\": ["]
889    #[doc = "        \"string\","]
890    #[doc = "        \"null\""]
891    #[doc = "      ]"]
892    #[doc = "    }"]
893    #[doc = "  }"]
894    #[doc = "}"]
895    #[doc = r" ```"]
896    #[doc = r" </details>"]
897    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
898    pub struct MultiDocumentResponsePublicDailyCardiovascularAge {
899        pub data: ::std::vec::Vec<PublicDailyCardiovascularAge>,
900        pub next_token: ::std::option::Option<::std::string::String>,
901    }
902
903    #[doc = "`MultiDocumentResponsePublicDailyReadiness`"]
904    #[doc = r""]
905    #[doc = r" <details><summary>JSON schema</summary>"]
906    #[doc = r""]
907    #[doc = r" ```json"]
908    #[doc = "{"]
909    #[doc = "  \"title\": \"MultiDocumentResponse[PublicDailyReadiness]\","]
910    #[doc = "  \"type\": \"object\","]
911    #[doc = "  \"required\": ["]
912    #[doc = "    \"data\","]
913    #[doc = "    \"next_token\""]
914    #[doc = "  ],"]
915    #[doc = "  \"properties\": {"]
916    #[doc = "    \"data\": {"]
917    #[doc = "      \"title\": \"Data\","]
918    #[doc = "      \"type\": \"array\","]
919    #[doc = "      \"items\": {"]
920    #[doc = "        \"$ref\": \"#/components/schemas/PublicDailyReadiness\""]
921    #[doc = "      }"]
922    #[doc = "    },"]
923    #[doc = "    \"next_token\": {"]
924    #[doc = "      \"title\": \"Next Token\","]
925    #[doc = "      \"type\": ["]
926    #[doc = "        \"string\","]
927    #[doc = "        \"null\""]
928    #[doc = "      ]"]
929    #[doc = "    }"]
930    #[doc = "  }"]
931    #[doc = "}"]
932    #[doc = r" ```"]
933    #[doc = r" </details>"]
934    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
935    pub struct MultiDocumentResponsePublicDailyReadiness {
936        pub data: ::std::vec::Vec<PublicDailyReadiness>,
937        pub next_token: ::std::option::Option<::std::string::String>,
938    }
939
940    #[doc = "`MultiDocumentResponsePublicDailySleep`"]
941    #[doc = r""]
942    #[doc = r" <details><summary>JSON schema</summary>"]
943    #[doc = r""]
944    #[doc = r" ```json"]
945    #[doc = "{"]
946    #[doc = "  \"title\": \"MultiDocumentResponse[PublicDailySleep]\","]
947    #[doc = "  \"type\": \"object\","]
948    #[doc = "  \"required\": ["]
949    #[doc = "    \"data\","]
950    #[doc = "    \"next_token\""]
951    #[doc = "  ],"]
952    #[doc = "  \"properties\": {"]
953    #[doc = "    \"data\": {"]
954    #[doc = "      \"title\": \"Data\","]
955    #[doc = "      \"type\": \"array\","]
956    #[doc = "      \"items\": {"]
957    #[doc = "        \"$ref\": \"#/components/schemas/PublicDailySleep\""]
958    #[doc = "      }"]
959    #[doc = "    },"]
960    #[doc = "    \"next_token\": {"]
961    #[doc = "      \"title\": \"Next Token\","]
962    #[doc = "      \"type\": ["]
963    #[doc = "        \"string\","]
964    #[doc = "        \"null\""]
965    #[doc = "      ]"]
966    #[doc = "    }"]
967    #[doc = "  }"]
968    #[doc = "}"]
969    #[doc = r" ```"]
970    #[doc = r" </details>"]
971    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
972    pub struct MultiDocumentResponsePublicDailySleep {
973        pub data: ::std::vec::Vec<PublicDailySleep>,
974        pub next_token: ::std::option::Option<::std::string::String>,
975    }
976
977    #[doc = "`MultiDocumentResponsePublicDailySpO2`"]
978    #[doc = r""]
979    #[doc = r" <details><summary>JSON schema</summary>"]
980    #[doc = r""]
981    #[doc = r" ```json"]
982    #[doc = "{"]
983    #[doc = "  \"title\": \"MultiDocumentResponse[PublicDailySpO2]\","]
984    #[doc = "  \"type\": \"object\","]
985    #[doc = "  \"required\": ["]
986    #[doc = "    \"data\","]
987    #[doc = "    \"next_token\""]
988    #[doc = "  ],"]
989    #[doc = "  \"properties\": {"]
990    #[doc = "    \"data\": {"]
991    #[doc = "      \"title\": \"Data\","]
992    #[doc = "      \"type\": \"array\","]
993    #[doc = "      \"items\": {"]
994    #[doc = "        \"$ref\": \"#/components/schemas/PublicDailySpO2\""]
995    #[doc = "      }"]
996    #[doc = "    },"]
997    #[doc = "    \"next_token\": {"]
998    #[doc = "      \"title\": \"Next Token\","]
999    #[doc = "      \"type\": ["]
1000    #[doc = "        \"string\","]
1001    #[doc = "        \"null\""]
1002    #[doc = "      ]"]
1003    #[doc = "    }"]
1004    #[doc = "  }"]
1005    #[doc = "}"]
1006    #[doc = r" ```"]
1007    #[doc = r" </details>"]
1008    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1009    pub struct MultiDocumentResponsePublicDailySpO2 {
1010        pub data: ::std::vec::Vec<PublicDailySpO2>,
1011        pub next_token: ::std::option::Option<::std::string::String>,
1012    }
1013
1014    #[doc = "`MultiDocumentResponsePublicDailyStress`"]
1015    #[doc = r""]
1016    #[doc = r" <details><summary>JSON schema</summary>"]
1017    #[doc = r""]
1018    #[doc = r" ```json"]
1019    #[doc = "{"]
1020    #[doc = "  \"title\": \"MultiDocumentResponse[PublicDailyStress]\","]
1021    #[doc = "  \"type\": \"object\","]
1022    #[doc = "  \"required\": ["]
1023    #[doc = "    \"data\","]
1024    #[doc = "    \"next_token\""]
1025    #[doc = "  ],"]
1026    #[doc = "  \"properties\": {"]
1027    #[doc = "    \"data\": {"]
1028    #[doc = "      \"title\": \"Data\","]
1029    #[doc = "      \"type\": \"array\","]
1030    #[doc = "      \"items\": {"]
1031    #[doc = "        \"$ref\": \"#/components/schemas/PublicDailyStress\""]
1032    #[doc = "      }"]
1033    #[doc = "    },"]
1034    #[doc = "    \"next_token\": {"]
1035    #[doc = "      \"title\": \"Next Token\","]
1036    #[doc = "      \"type\": ["]
1037    #[doc = "        \"string\","]
1038    #[doc = "        \"null\""]
1039    #[doc = "      ]"]
1040    #[doc = "    }"]
1041    #[doc = "  }"]
1042    #[doc = "}"]
1043    #[doc = r" ```"]
1044    #[doc = r" </details>"]
1045    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1046    pub struct MultiDocumentResponsePublicDailyStress {
1047        pub data: ::std::vec::Vec<PublicDailyStress>,
1048        pub next_token: ::std::option::Option<::std::string::String>,
1049    }
1050
1051    #[doc = "`MultiDocumentResponsePublicModifiedSleepModel`"]
1052    #[doc = r""]
1053    #[doc = r" <details><summary>JSON schema</summary>"]
1054    #[doc = r""]
1055    #[doc = r" ```json"]
1056    #[doc = "{"]
1057    #[doc = "  \"title\": \"MultiDocumentResponse[PublicModifiedSleepModel]\","]
1058    #[doc = "  \"type\": \"object\","]
1059    #[doc = "  \"required\": ["]
1060    #[doc = "    \"data\","]
1061    #[doc = "    \"next_token\""]
1062    #[doc = "  ],"]
1063    #[doc = "  \"properties\": {"]
1064    #[doc = "    \"data\": {"]
1065    #[doc = "      \"title\": \"Data\","]
1066    #[doc = "      \"type\": \"array\","]
1067    #[doc = "      \"items\": {"]
1068    #[doc = "        \"$ref\": \"#/components/schemas/PublicModifiedSleepModel\""]
1069    #[doc = "      }"]
1070    #[doc = "    },"]
1071    #[doc = "    \"next_token\": {"]
1072    #[doc = "      \"title\": \"Next Token\","]
1073    #[doc = "      \"type\": ["]
1074    #[doc = "        \"string\","]
1075    #[doc = "        \"null\""]
1076    #[doc = "      ]"]
1077    #[doc = "    }"]
1078    #[doc = "  }"]
1079    #[doc = "}"]
1080    #[doc = r" ```"]
1081    #[doc = r" </details>"]
1082    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1083    pub struct MultiDocumentResponsePublicModifiedSleepModel {
1084        pub data: ::std::vec::Vec<PublicModifiedSleepModel>,
1085        pub next_token: ::std::option::Option<::std::string::String>,
1086    }
1087
1088    #[doc = "`MultiDocumentResponsePublicRestModePeriod`"]
1089    #[doc = r""]
1090    #[doc = r" <details><summary>JSON schema</summary>"]
1091    #[doc = r""]
1092    #[doc = r" ```json"]
1093    #[doc = "{"]
1094    #[doc = "  \"title\": \"MultiDocumentResponse[PublicRestModePeriod]\","]
1095    #[doc = "  \"type\": \"object\","]
1096    #[doc = "  \"required\": ["]
1097    #[doc = "    \"data\","]
1098    #[doc = "    \"next_token\""]
1099    #[doc = "  ],"]
1100    #[doc = "  \"properties\": {"]
1101    #[doc = "    \"data\": {"]
1102    #[doc = "      \"title\": \"Data\","]
1103    #[doc = "      \"type\": \"array\","]
1104    #[doc = "      \"items\": {"]
1105    #[doc = "        \"$ref\": \"#/components/schemas/PublicRestModePeriod\""]
1106    #[doc = "      }"]
1107    #[doc = "    },"]
1108    #[doc = "    \"next_token\": {"]
1109    #[doc = "      \"title\": \"Next Token\","]
1110    #[doc = "      \"type\": ["]
1111    #[doc = "        \"string\","]
1112    #[doc = "        \"null\""]
1113    #[doc = "      ]"]
1114    #[doc = "    }"]
1115    #[doc = "  }"]
1116    #[doc = "}"]
1117    #[doc = r" ```"]
1118    #[doc = r" </details>"]
1119    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1120    pub struct MultiDocumentResponsePublicRestModePeriod {
1121        pub data: ::std::vec::Vec<PublicRestModePeriod>,
1122        pub next_token: ::std::option::Option<::std::string::String>,
1123    }
1124
1125    #[doc = "`MultiDocumentResponsePublicRingConfiguration`"]
1126    #[doc = r""]
1127    #[doc = r" <details><summary>JSON schema</summary>"]
1128    #[doc = r""]
1129    #[doc = r" ```json"]
1130    #[doc = "{"]
1131    #[doc = "  \"title\": \"MultiDocumentResponse[PublicRingConfiguration]\","]
1132    #[doc = "  \"type\": \"object\","]
1133    #[doc = "  \"required\": ["]
1134    #[doc = "    \"data\","]
1135    #[doc = "    \"next_token\""]
1136    #[doc = "  ],"]
1137    #[doc = "  \"properties\": {"]
1138    #[doc = "    \"data\": {"]
1139    #[doc = "      \"title\": \"Data\","]
1140    #[doc = "      \"type\": \"array\","]
1141    #[doc = "      \"items\": {"]
1142    #[doc = "        \"$ref\": \"#/components/schemas/PublicRingConfiguration\""]
1143    #[doc = "      }"]
1144    #[doc = "    },"]
1145    #[doc = "    \"next_token\": {"]
1146    #[doc = "      \"title\": \"Next Token\","]
1147    #[doc = "      \"type\": ["]
1148    #[doc = "        \"string\","]
1149    #[doc = "        \"null\""]
1150    #[doc = "      ]"]
1151    #[doc = "    }"]
1152    #[doc = "  }"]
1153    #[doc = "}"]
1154    #[doc = r" ```"]
1155    #[doc = r" </details>"]
1156    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1157    pub struct MultiDocumentResponsePublicRingConfiguration {
1158        pub data: ::std::vec::Vec<PublicRingConfiguration>,
1159        pub next_token: ::std::option::Option<::std::string::String>,
1160    }
1161
1162    #[doc = "`MultiDocumentResponsePublicSession`"]
1163    #[doc = r""]
1164    #[doc = r" <details><summary>JSON schema</summary>"]
1165    #[doc = r""]
1166    #[doc = r" ```json"]
1167    #[doc = "{"]
1168    #[doc = "  \"title\": \"MultiDocumentResponse[PublicSession]\","]
1169    #[doc = "  \"type\": \"object\","]
1170    #[doc = "  \"required\": ["]
1171    #[doc = "    \"data\","]
1172    #[doc = "    \"next_token\""]
1173    #[doc = "  ],"]
1174    #[doc = "  \"properties\": {"]
1175    #[doc = "    \"data\": {"]
1176    #[doc = "      \"title\": \"Data\","]
1177    #[doc = "      \"type\": \"array\","]
1178    #[doc = "      \"items\": {"]
1179    #[doc = "        \"$ref\": \"#/components/schemas/PublicSession\""]
1180    #[doc = "      }"]
1181    #[doc = "    },"]
1182    #[doc = "    \"next_token\": {"]
1183    #[doc = "      \"title\": \"Next Token\","]
1184    #[doc = "      \"type\": ["]
1185    #[doc = "        \"string\","]
1186    #[doc = "        \"null\""]
1187    #[doc = "      ]"]
1188    #[doc = "    }"]
1189    #[doc = "  }"]
1190    #[doc = "}"]
1191    #[doc = r" ```"]
1192    #[doc = r" </details>"]
1193    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1194    pub struct MultiDocumentResponsePublicSession {
1195        pub data: ::std::vec::Vec<PublicSession>,
1196        pub next_token: ::std::option::Option<::std::string::String>,
1197    }
1198
1199    #[doc = "`MultiDocumentResponsePublicSleepTime`"]
1200    #[doc = r""]
1201    #[doc = r" <details><summary>JSON schema</summary>"]
1202    #[doc = r""]
1203    #[doc = r" ```json"]
1204    #[doc = "{"]
1205    #[doc = "  \"title\": \"MultiDocumentResponse[PublicSleepTime]\","]
1206    #[doc = "  \"type\": \"object\","]
1207    #[doc = "  \"required\": ["]
1208    #[doc = "    \"data\","]
1209    #[doc = "    \"next_token\""]
1210    #[doc = "  ],"]
1211    #[doc = "  \"properties\": {"]
1212    #[doc = "    \"data\": {"]
1213    #[doc = "      \"title\": \"Data\","]
1214    #[doc = "      \"type\": \"array\","]
1215    #[doc = "      \"items\": {"]
1216    #[doc = "        \"$ref\": \"#/components/schemas/PublicSleepTime\""]
1217    #[doc = "      }"]
1218    #[doc = "    },"]
1219    #[doc = "    \"next_token\": {"]
1220    #[doc = "      \"title\": \"Next Token\","]
1221    #[doc = "      \"type\": ["]
1222    #[doc = "        \"string\","]
1223    #[doc = "        \"null\""]
1224    #[doc = "      ]"]
1225    #[doc = "    }"]
1226    #[doc = "  }"]
1227    #[doc = "}"]
1228    #[doc = r" ```"]
1229    #[doc = r" </details>"]
1230    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1231    pub struct MultiDocumentResponsePublicSleepTime {
1232        pub data: ::std::vec::Vec<PublicSleepTime>,
1233        pub next_token: ::std::option::Option<::std::string::String>,
1234    }
1235
1236    #[doc = "`MultiDocumentResponsePublicVo2Max`"]
1237    #[doc = r""]
1238    #[doc = r" <details><summary>JSON schema</summary>"]
1239    #[doc = r""]
1240    #[doc = r" ```json"]
1241    #[doc = "{"]
1242    #[doc = "  \"title\": \"MultiDocumentResponse[PublicVO2Max]\","]
1243    #[doc = "  \"type\": \"object\","]
1244    #[doc = "  \"required\": ["]
1245    #[doc = "    \"data\","]
1246    #[doc = "    \"next_token\""]
1247    #[doc = "  ],"]
1248    #[doc = "  \"properties\": {"]
1249    #[doc = "    \"data\": {"]
1250    #[doc = "      \"title\": \"Data\","]
1251    #[doc = "      \"type\": \"array\","]
1252    #[doc = "      \"items\": {"]
1253    #[doc = "        \"$ref\": \"#/components/schemas/PublicVO2Max\""]
1254    #[doc = "      }"]
1255    #[doc = "    },"]
1256    #[doc = "    \"next_token\": {"]
1257    #[doc = "      \"title\": \"Next Token\","]
1258    #[doc = "      \"type\": ["]
1259    #[doc = "        \"string\","]
1260    #[doc = "        \"null\""]
1261    #[doc = "      ]"]
1262    #[doc = "    }"]
1263    #[doc = "  }"]
1264    #[doc = "}"]
1265    #[doc = r" ```"]
1266    #[doc = r" </details>"]
1267    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1268    pub struct MultiDocumentResponsePublicVo2Max {
1269        pub data: ::std::vec::Vec<PublicVo2Max>,
1270        pub next_token: ::std::option::Option<::std::string::String>,
1271    }
1272
1273    #[doc = "`MultiDocumentResponsePublicWorkout`"]
1274    #[doc = r""]
1275    #[doc = r" <details><summary>JSON schema</summary>"]
1276    #[doc = r""]
1277    #[doc = r" ```json"]
1278    #[doc = "{"]
1279    #[doc = "  \"title\": \"MultiDocumentResponse[PublicWorkout]\","]
1280    #[doc = "  \"type\": \"object\","]
1281    #[doc = "  \"required\": ["]
1282    #[doc = "    \"data\","]
1283    #[doc = "    \"next_token\""]
1284    #[doc = "  ],"]
1285    #[doc = "  \"properties\": {"]
1286    #[doc = "    \"data\": {"]
1287    #[doc = "      \"title\": \"Data\","]
1288    #[doc = "      \"type\": \"array\","]
1289    #[doc = "      \"items\": {"]
1290    #[doc = "        \"$ref\": \"#/components/schemas/PublicWorkout\""]
1291    #[doc = "      }"]
1292    #[doc = "    },"]
1293    #[doc = "    \"next_token\": {"]
1294    #[doc = "      \"title\": \"Next Token\","]
1295    #[doc = "      \"type\": ["]
1296    #[doc = "        \"string\","]
1297    #[doc = "        \"null\""]
1298    #[doc = "      ]"]
1299    #[doc = "    }"]
1300    #[doc = "  }"]
1301    #[doc = "}"]
1302    #[doc = r" ```"]
1303    #[doc = r" </details>"]
1304    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1305    pub struct MultiDocumentResponsePublicWorkout {
1306        pub data: ::std::vec::Vec<PublicWorkout>,
1307        pub next_token: ::std::option::Option<::std::string::String>,
1308    }
1309
1310    #[doc = "`MultiDocumentResponseTagModel`"]
1311    #[doc = r""]
1312    #[doc = r" <details><summary>JSON schema</summary>"]
1313    #[doc = r""]
1314    #[doc = r" ```json"]
1315    #[doc = "{"]
1316    #[doc = "  \"title\": \"MultiDocumentResponse[TagModel]\","]
1317    #[doc = "  \"type\": \"object\","]
1318    #[doc = "  \"required\": ["]
1319    #[doc = "    \"data\","]
1320    #[doc = "    \"next_token\""]
1321    #[doc = "  ],"]
1322    #[doc = "  \"properties\": {"]
1323    #[doc = "    \"data\": {"]
1324    #[doc = "      \"title\": \"Data\","]
1325    #[doc = "      \"type\": \"array\","]
1326    #[doc = "      \"items\": {"]
1327    #[doc = "        \"$ref\": \"#/components/schemas/TagModel\""]
1328    #[doc = "      }"]
1329    #[doc = "    },"]
1330    #[doc = "    \"next_token\": {"]
1331    #[doc = "      \"title\": \"Next Token\","]
1332    #[doc = "      \"type\": ["]
1333    #[doc = "        \"string\","]
1334    #[doc = "        \"null\""]
1335    #[doc = "      ]"]
1336    #[doc = "    }"]
1337    #[doc = "  }"]
1338    #[doc = "}"]
1339    #[doc = r" ```"]
1340    #[doc = r" </details>"]
1341    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1342    pub struct MultiDocumentResponseTagModel {
1343        pub data: ::std::vec::Vec<TagModel>,
1344        pub next_token: ::std::option::Option<::std::string::String>,
1345    }
1346
1347    #[doc = "`PersonalInfoResponse`"]
1348    #[doc = r""]
1349    #[doc = r" <details><summary>JSON schema</summary>"]
1350    #[doc = r""]
1351    #[doc = r" ```json"]
1352    #[doc = "{"]
1353    #[doc = "  \"title\": \"PersonalInfoResponse\","]
1354    #[doc = "  \"type\": \"object\","]
1355    #[doc = "  \"required\": ["]
1356    #[doc = "    \"id\""]
1357    #[doc = "  ],"]
1358    #[doc = "  \"properties\": {"]
1359    #[doc = "    \"age\": {"]
1360    #[doc = "      \"title\": \"Age\","]
1361    #[doc = "      \"type\": ["]
1362    #[doc = "        \"integer\","]
1363    #[doc = "        \"null\""]
1364    #[doc = "      ]"]
1365    #[doc = "    },"]
1366    #[doc = "    \"biological_sex\": {"]
1367    #[doc = "      \"title\": \"Biological Sex\","]
1368    #[doc = "      \"type\": ["]
1369    #[doc = "        \"string\","]
1370    #[doc = "        \"null\""]
1371    #[doc = "      ]"]
1372    #[doc = "    },"]
1373    #[doc = "    \"email\": {"]
1374    #[doc = "      \"title\": \"Email\","]
1375    #[doc = "      \"type\": ["]
1376    #[doc = "        \"string\","]
1377    #[doc = "        \"null\""]
1378    #[doc = "      ]"]
1379    #[doc = "    },"]
1380    #[doc = "    \"height\": {"]
1381    #[doc = "      \"title\": \"Height\","]
1382    #[doc = "      \"type\": ["]
1383    #[doc = "        \"number\","]
1384    #[doc = "        \"null\""]
1385    #[doc = "      ]"]
1386    #[doc = "    },"]
1387    #[doc = "    \"id\": {"]
1388    #[doc = "      \"title\": \"Id\","]
1389    #[doc = "      \"type\": \"string\""]
1390    #[doc = "    },"]
1391    #[doc = "    \"weight\": {"]
1392    #[doc = "      \"title\": \"Weight\","]
1393    #[doc = "      \"type\": ["]
1394    #[doc = "        \"number\","]
1395    #[doc = "        \"null\""]
1396    #[doc = "      ]"]
1397    #[doc = "    }"]
1398    #[doc = "  }"]
1399    #[doc = "}"]
1400    #[doc = r" ```"]
1401    #[doc = r" </details>"]
1402    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1403    pub struct PersonalInfoResponse {
1404        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1405        pub age: ::std::option::Option<i64>,
1406        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1407        pub biological_sex: ::std::option::Option<::std::string::String>,
1408        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1409        pub email: ::std::option::Option<::std::string::String>,
1410        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1411        pub height: ::std::option::Option<f64>,
1412        pub id: ::std::string::String,
1413        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1414        pub weight: ::std::option::Option<f64>,
1415    }
1416
1417    #[doc = "Object defining activity score contributors."]
1418    #[doc = r""]
1419    #[doc = r" <details><summary>JSON schema</summary>"]
1420    #[doc = r""]
1421    #[doc = r" ```json"]
1422    #[doc = "{"]
1423    #[doc = "  \"title\": \"PublicActivityContributors\","]
1424    #[doc = "  \"description\": \"Object defining activity score contributors.\","]
1425    #[doc = "  \"type\": \"object\","]
1426    #[doc = "  \"properties\": {"]
1427    #[doc = "    \"meet_daily_targets\": {"]
1428    #[doc = "      \"title\": \"\","]
1429    #[doc = "      \"description\": \"Contribution of meeting previous 7-day daily activity targets in range [1, 100].\","]
1430    #[doc = "      \"type\": ["]
1431    #[doc = "        \"integer\","]
1432    #[doc = "        \"null\""]
1433    #[doc = "      ]"]
1434    #[doc = "    },"]
1435    #[doc = "    \"move_every_hour\": {"]
1436    #[doc = "      \"title\": \"\","]
1437    #[doc = "      \"description\": \"Contribution of previous 24-hour inactivity alerts in range [1, 100].\","]
1438    #[doc = "      \"type\": ["]
1439    #[doc = "        \"integer\","]
1440    #[doc = "        \"null\""]
1441    #[doc = "      ]"]
1442    #[doc = "    },"]
1443    #[doc = "    \"recovery_time\": {"]
1444    #[doc = "      \"title\": \"\","]
1445    #[doc = "      \"description\": \"Contribution of previous 7-day recovery time in range [1, 100].\","]
1446    #[doc = "      \"type\": ["]
1447    #[doc = "        \"integer\","]
1448    #[doc = "        \"null\""]
1449    #[doc = "      ]"]
1450    #[doc = "    },"]
1451    #[doc = "    \"stay_active\": {"]
1452    #[doc = "      \"title\": \"\","]
1453    #[doc = "      \"description\": \"Contribution of previous 24-hour activity in range [1, 100].\","]
1454    #[doc = "      \"type\": ["]
1455    #[doc = "        \"integer\","]
1456    #[doc = "        \"null\""]
1457    #[doc = "      ]"]
1458    #[doc = "    },"]
1459    #[doc = "    \"training_frequency\": {"]
1460    #[doc = "      \"title\": \"\","]
1461    #[doc = "      \"description\": \"Contribution of previous 7-day exercise frequency in range [1, 100].\","]
1462    #[doc = "      \"type\": ["]
1463    #[doc = "        \"integer\","]
1464    #[doc = "        \"null\""]
1465    #[doc = "      ]"]
1466    #[doc = "    },"]
1467    #[doc = "    \"training_volume\": {"]
1468    #[doc = "      \"title\": \"\","]
1469    #[doc = "      \"description\": \"Contribution of previous 7-day exercise volume in range [1, 100].\","]
1470    #[doc = "      \"type\": ["]
1471    #[doc = "        \"integer\","]
1472    #[doc = "        \"null\""]
1473    #[doc = "      ]"]
1474    #[doc = "    }"]
1475    #[doc = "  }"]
1476    #[doc = "}"]
1477    #[doc = r" ```"]
1478    #[doc = r" </details>"]
1479    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1480    pub struct PublicActivityContributors {
1481        #[doc = "Contribution of meeting previous 7-day daily activity targets in range [1, 100]."]
1482        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1483        pub meet_daily_targets: ::std::option::Option<i64>,
1484        #[doc = "Contribution of previous 24-hour inactivity alerts in range [1, 100]."]
1485        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1486        pub move_every_hour: ::std::option::Option<i64>,
1487        #[doc = "Contribution of previous 7-day recovery time in range [1, 100]."]
1488        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1489        pub recovery_time: ::std::option::Option<i64>,
1490        #[doc = "Contribution of previous 24-hour activity in range [1, 100]."]
1491        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1492        pub stay_active: ::std::option::Option<i64>,
1493        #[doc = "Contribution of previous 7-day exercise frequency in range [1, 100]."]
1494        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1495        pub training_frequency: ::std::option::Option<i64>,
1496        #[doc = "Contribution of previous 7-day exercise volume in range [1, 100]."]
1497        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1498        pub training_volume: ::std::option::Option<i64>,
1499    }
1500
1501    impl ::std::default::Default for PublicActivityContributors {
1502        fn default() -> Self {
1503            Self {
1504                meet_daily_targets: Default::default(),
1505                move_every_hour: Default::default(),
1506                recovery_time: Default::default(),
1507                stay_active: Default::default(),
1508                training_frequency: Default::default(),
1509                training_volume: Default::default(),
1510            }
1511        }
1512    }
1513
1514    #[doc = "Object defining a daily activity that is a 24-hour period starting at 4 a.m."]
1515    #[doc = r""]
1516    #[doc = r" <details><summary>JSON schema</summary>"]
1517    #[doc = r""]
1518    #[doc = r" ```json"]
1519    #[doc = "{"]
1520    #[doc = "  \"title\": \"PublicDailyActivity\","]
1521    #[doc = "  \"description\": \"Object defining a daily activity that is a 24-hour period starting at 4 a.m.\","]
1522    #[doc = "  \"type\": \"object\","]
1523    #[doc = "  \"required\": ["]
1524    #[doc = "    \"active_calories\","]
1525    #[doc = "    \"average_met_minutes\","]
1526    #[doc = "    \"contributors\","]
1527    #[doc = "    \"day\","]
1528    #[doc = "    \"equivalent_walking_distance\","]
1529    #[doc = "    \"high_activity_met_minutes\","]
1530    #[doc = "    \"high_activity_time\","]
1531    #[doc = "    \"id\","]
1532    #[doc = "    \"inactivity_alerts\","]
1533    #[doc = "    \"low_activity_met_minutes\","]
1534    #[doc = "    \"low_activity_time\","]
1535    #[doc = "    \"medium_activity_met_minutes\","]
1536    #[doc = "    \"medium_activity_time\","]
1537    #[doc = "    \"met\","]
1538    #[doc = "    \"meters_to_target\","]
1539    #[doc = "    \"non_wear_time\","]
1540    #[doc = "    \"resting_time\","]
1541    #[doc = "    \"sedentary_met_minutes\","]
1542    #[doc = "    \"sedentary_time\","]
1543    #[doc = "    \"steps\","]
1544    #[doc = "    \"target_calories\","]
1545    #[doc = "    \"target_meters\","]
1546    #[doc = "    \"timestamp\","]
1547    #[doc = "    \"total_calories\""]
1548    #[doc = "  ],"]
1549    #[doc = "  \"properties\": {"]
1550    #[doc = "    \"active_calories\": {"]
1551    #[doc = "      \"title\": \"\","]
1552    #[doc = "      \"description\": \"Active calories expended in kilocalories.\","]
1553    #[doc = "      \"type\": \"integer\""]
1554    #[doc = "    },"]
1555    #[doc = "    \"average_met_minutes\": {"]
1556    #[doc = "      \"title\": \"\","]
1557    #[doc = "      \"description\": \"Average MET minutes.\","]
1558    #[doc = "      \"type\": \"number\""]
1559    #[doc = "    },"]
1560    #[doc = "    \"class_5_min\": {"]
1561    #[doc = "      \"title\": \"\","]
1562    #[doc = "      \"description\": \"5-minute activity classification for the period where every character corresponds to:\\n'0' = non wear\\n'1' = rest\\n'2' = inactive\\n'3' = low activity\\n'4' = medium activity\\n'5' = high activity\\nExample: \\\"001233334555524001\\\".\","]
1563    #[doc = "      \"type\": ["]
1564    #[doc = "        \"string\","]
1565    #[doc = "        \"null\""]
1566    #[doc = "      ]"]
1567    #[doc = "    },"]
1568    #[doc = "    \"contributors\": {"]
1569    #[doc = "      \"$ref\": \"#/components/schemas/PublicActivityContributors\""]
1570    #[doc = "    },"]
1571    #[doc = "    \"day\": {"]
1572    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
1573    #[doc = "    },"]
1574    #[doc = "    \"equivalent_walking_distance\": {"]
1575    #[doc = "      \"title\": \"\","]
1576    #[doc = "      \"description\": \"Equivalent walking distance of energe expenditure in meters.\","]
1577    #[doc = "      \"type\": \"integer\""]
1578    #[doc = "    },"]
1579    #[doc = "    \"high_activity_met_minutes\": {"]
1580    #[doc = "      \"title\": \"\","]
1581    #[doc = "      \"description\": \"The total METs of each minute classified as high activity.\","]
1582    #[doc = "      \"type\": \"integer\""]
1583    #[doc = "    },"]
1584    #[doc = "    \"high_activity_time\": {"]
1585    #[doc = "      \"title\": \"\","]
1586    #[doc = "      \"description\": \"The total time in seconds of each minute classified as high activity.\","]
1587    #[doc = "      \"type\": \"integer\""]
1588    #[doc = "    },"]
1589    #[doc = "    \"id\": {"]
1590    #[doc = "      \"title\": \"\","]
1591    #[doc = "      \"description\": \"Unique identifier of the object.\","]
1592    #[doc = "      \"type\": \"string\","]
1593    #[doc = "      \"minLength\": 1"]
1594    #[doc = "    },"]
1595    #[doc = "    \"inactivity_alerts\": {"]
1596    #[doc = "      \"title\": \"\","]
1597    #[doc = "      \"description\": \"Number of inactivity alerts received.\","]
1598    #[doc = "      \"type\": \"integer\""]
1599    #[doc = "    },"]
1600    #[doc = "    \"low_activity_met_minutes\": {"]
1601    #[doc = "      \"title\": \"\","]
1602    #[doc = "      \"description\": \"The total METs of each minute classified as low activity.\","]
1603    #[doc = "      \"type\": \"integer\""]
1604    #[doc = "    },"]
1605    #[doc = "    \"low_activity_time\": {"]
1606    #[doc = "      \"title\": \"\","]
1607    #[doc = "      \"description\": \"The total time in seconds of each minute classified as low activity.\","]
1608    #[doc = "      \"type\": \"integer\""]
1609    #[doc = "    },"]
1610    #[doc = "    \"medium_activity_met_minutes\": {"]
1611    #[doc = "      \"title\": \"\","]
1612    #[doc = "      \"description\": \"The total METs of each minute classified as medium activity.\","]
1613    #[doc = "      \"type\": \"integer\""]
1614    #[doc = "    },"]
1615    #[doc = "    \"medium_activity_time\": {"]
1616    #[doc = "      \"title\": \"\","]
1617    #[doc = "      \"description\": \"The total time in seconds of each minute classified as medium activity.\","]
1618    #[doc = "      \"type\": \"integer\""]
1619    #[doc = "    },"]
1620    #[doc = "    \"met\": {"]
1621    #[doc = "      \"$ref\": \"#/components/schemas/PublicSample\""]
1622    #[doc = "    },"]
1623    #[doc = "    \"meters_to_target\": {"]
1624    #[doc = "      \"title\": \"\","]
1625    #[doc = "      \"description\": \"Meters remaining to target.\","]
1626    #[doc = "      \"type\": \"integer\""]
1627    #[doc = "    },"]
1628    #[doc = "    \"non_wear_time\": {"]
1629    #[doc = "      \"title\": \"\","]
1630    #[doc = "      \"description\": \"Ring non-wear time in seconds.\","]
1631    #[doc = "      \"type\": \"integer\""]
1632    #[doc = "    },"]
1633    #[doc = "    \"resting_time\": {"]
1634    #[doc = "      \"title\": \"\","]
1635    #[doc = "      \"description\": \"Resting time in seconds.\","]
1636    #[doc = "      \"type\": \"integer\""]
1637    #[doc = "    },"]
1638    #[doc = "    \"score\": {"]
1639    #[doc = "      \"title\": \"\","]
1640    #[doc = "      \"description\": \"Activity score in range [1, 100].\","]
1641    #[doc = "      \"type\": ["]
1642    #[doc = "        \"integer\","]
1643    #[doc = "        \"null\""]
1644    #[doc = "      ]"]
1645    #[doc = "    },"]
1646    #[doc = "    \"sedentary_met_minutes\": {"]
1647    #[doc = "      \"title\": \"\","]
1648    #[doc = "      \"description\": \"Sedentary MET minutes.\","]
1649    #[doc = "      \"type\": \"integer\""]
1650    #[doc = "    },"]
1651    #[doc = "    \"sedentary_time\": {"]
1652    #[doc = "      \"title\": \"\","]
1653    #[doc = "      \"description\": \"Sedentary time in seconds.\","]
1654    #[doc = "      \"type\": \"integer\""]
1655    #[doc = "    },"]
1656    #[doc = "    \"steps\": {"]
1657    #[doc = "      \"title\": \"\","]
1658    #[doc = "      \"description\": \"Total number of steps taken.\","]
1659    #[doc = "      \"type\": \"integer\""]
1660    #[doc = "    },"]
1661    #[doc = "    \"target_calories\": {"]
1662    #[doc = "      \"title\": \"\","]
1663    #[doc = "      \"description\": \"Daily activity target in kilocalories.\","]
1664    #[doc = "      \"type\": \"integer\""]
1665    #[doc = "    },"]
1666    #[doc = "    \"target_meters\": {"]
1667    #[doc = "      \"title\": \"\","]
1668    #[doc = "      \"description\": \"Daily activity target in meters.\","]
1669    #[doc = "      \"type\": \"integer\""]
1670    #[doc = "    },"]
1671    #[doc = "    \"timestamp\": {"]
1672    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
1673    #[doc = "    },"]
1674    #[doc = "    \"total_calories\": {"]
1675    #[doc = "      \"title\": \"\","]
1676    #[doc = "      \"description\": \"Total calories expended in kilocalories.\","]
1677    #[doc = "      \"type\": \"integer\""]
1678    #[doc = "    }"]
1679    #[doc = "  },"]
1680    #[doc = "  \"x-cloud-only\": true,"]
1681    #[doc = "  \"x-collection\": \"publicdailyactivity\","]
1682    #[doc = "  \"x-owner\": \"movement-squad\""]
1683    #[doc = "}"]
1684    #[doc = r" ```"]
1685    #[doc = r" </details>"]
1686    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1687    pub struct PublicDailyActivity {
1688        #[doc = "Active calories expended in kilocalories."]
1689        pub active_calories: i64,
1690        #[doc = "Average MET minutes."]
1691        pub average_met_minutes: f64,
1692        #[doc = "5-minute activity classification for the period where every character corresponds to:\n'0' = non wear\n'1' = rest\n'2' = inactive\n'3' = low activity\n'4' = medium activity\n'5' = high activity\nExample: \"001233334555524001\"."]
1693        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1694        pub class_5_min: ::std::option::Option<::std::string::String>,
1695        pub contributors: PublicActivityContributors,
1696        pub day: IsoDate,
1697        #[doc = "Equivalent walking distance of energe expenditure in meters."]
1698        pub equivalent_walking_distance: i64,
1699        #[doc = "The total METs of each minute classified as high activity."]
1700        pub high_activity_met_minutes: i64,
1701        #[doc = "The total time in seconds of each minute classified as high activity."]
1702        pub high_activity_time: i64,
1703        #[doc = "Unique identifier of the object."]
1704        pub id: X,
1705        #[doc = "Number of inactivity alerts received."]
1706        pub inactivity_alerts: i64,
1707        #[doc = "The total METs of each minute classified as low activity."]
1708        pub low_activity_met_minutes: i64,
1709        #[doc = "The total time in seconds of each minute classified as low activity."]
1710        pub low_activity_time: i64,
1711        #[doc = "The total METs of each minute classified as medium activity."]
1712        pub medium_activity_met_minutes: i64,
1713        #[doc = "The total time in seconds of each minute classified as medium activity."]
1714        pub medium_activity_time: i64,
1715        pub met: PublicSample,
1716        #[doc = "Meters remaining to target."]
1717        pub meters_to_target: i64,
1718        #[doc = "Ring non-wear time in seconds."]
1719        pub non_wear_time: i64,
1720        #[doc = "Resting time in seconds."]
1721        pub resting_time: i64,
1722        #[doc = "Activity score in range [1, 100]."]
1723        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1724        pub score: ::std::option::Option<i64>,
1725        #[doc = "Sedentary MET minutes."]
1726        pub sedentary_met_minutes: i64,
1727        #[doc = "Sedentary time in seconds."]
1728        pub sedentary_time: i64,
1729        #[doc = "Total number of steps taken."]
1730        pub steps: i64,
1731        #[doc = "Daily activity target in kilocalories."]
1732        pub target_calories: i64,
1733        #[doc = "Daily activity target in meters."]
1734        pub target_meters: i64,
1735        pub timestamp: LocalizedDateTime,
1736        #[doc = "Total calories expended in kilocalories."]
1737        pub total_calories: i64,
1738    }
1739
1740    #[doc = "Daily Cardiovascular Age."]
1741    #[doc = r""]
1742    #[doc = r" <details><summary>JSON schema</summary>"]
1743    #[doc = r""]
1744    #[doc = r" ```json"]
1745    #[doc = "{"]
1746    #[doc = "  \"title\": \"PublicDailyCardiovascularAge\","]
1747    #[doc = "  \"description\": \"Daily Cardiovascular Age.\","]
1748    #[doc = "  \"type\": \"object\","]
1749    #[doc = "  \"required\": ["]
1750    #[doc = "    \"day\","]
1751    #[doc = "    \"id\""]
1752    #[doc = "  ],"]
1753    #[doc = "  \"properties\": {"]
1754    #[doc = "    \"day\": {"]
1755    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
1756    #[doc = "    },"]
1757    #[doc = "    \"id\": {"]
1758    #[doc = "      \"title\": \"\","]
1759    #[doc = "      \"description\": \"Unique identifier of the object.\","]
1760    #[doc = "      \"type\": \"string\","]
1761    #[doc = "      \"minLength\": 1"]
1762    #[doc = "    },"]
1763    #[doc = "    \"pulse_wave_velocity\": {"]
1764    #[doc = "      \"title\": \"\","]
1765    #[doc = "      \"description\": \"Pulse wave velocity (m/s), derived from vascular age, with possible offset added.\","]
1766    #[doc = "      \"type\": ["]
1767    #[doc = "        \"number\","]
1768    #[doc = "        \"null\""]
1769    #[doc = "      ]"]
1770    #[doc = "    },"]
1771    #[doc = "    \"vascular_age\": {"]
1772    #[doc = "      \"title\": \"\","]
1773    #[doc = "      \"description\": \"Predicted vascular age in range [18, 100].\","]
1774    #[doc = "      \"type\": ["]
1775    #[doc = "        \"integer\","]
1776    #[doc = "        \"null\""]
1777    #[doc = "      ]"]
1778    #[doc = "    }"]
1779    #[doc = "  },"]
1780    #[doc = "  \"x-cloud-only\": true,"]
1781    #[doc = "  \"x-collection\": \"publicdailycardiovascularage\","]
1782    #[doc = "  \"x-owner\": \"heart-health-squad\""]
1783    #[doc = "}"]
1784    #[doc = r" ```"]
1785    #[doc = r" </details>"]
1786    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1787    pub struct PublicDailyCardiovascularAge {
1788        pub day: IsoDate,
1789        #[doc = "Unique identifier of the object."]
1790        pub id: X,
1791        #[doc = "Pulse wave velocity (m/s), derived from vascular age, with possible offset added."]
1792        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1793        pub pulse_wave_velocity: ::std::option::Option<f64>,
1794        #[doc = "Predicted vascular age in range [18, 100]."]
1795        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1796        pub vascular_age: ::std::option::Option<i64>,
1797    }
1798
1799    #[doc = "Public object defining daily readiness."]
1800    #[doc = r""]
1801    #[doc = r" <details><summary>JSON schema</summary>"]
1802    #[doc = r""]
1803    #[doc = r" ```json"]
1804    #[doc = "{"]
1805    #[doc = "  \"title\": \"PublicDailyReadiness\","]
1806    #[doc = "  \"description\": \"Public object defining daily readiness.\","]
1807    #[doc = "  \"type\": \"object\","]
1808    #[doc = "  \"required\": ["]
1809    #[doc = "    \"contributors\","]
1810    #[doc = "    \"day\","]
1811    #[doc = "    \"id\","]
1812    #[doc = "    \"timestamp\""]
1813    #[doc = "  ],"]
1814    #[doc = "  \"properties\": {"]
1815    #[doc = "    \"contributors\": {"]
1816    #[doc = "      \"$ref\": \"#/components/schemas/PublicReadinessContributors\""]
1817    #[doc = "    },"]
1818    #[doc = "    \"day\": {"]
1819    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
1820    #[doc = "    },"]
1821    #[doc = "    \"id\": {"]
1822    #[doc = "      \"title\": \"\","]
1823    #[doc = "      \"description\": \"Unique identifier of the object.\","]
1824    #[doc = "      \"type\": \"string\","]
1825    #[doc = "      \"minLength\": 1"]
1826    #[doc = "    },"]
1827    #[doc = "    \"score\": {"]
1828    #[doc = "      \"title\": \"\","]
1829    #[doc = "      \"description\": \"Daily readiness score.\","]
1830    #[doc = "      \"type\": ["]
1831    #[doc = "        \"integer\","]
1832    #[doc = "        \"null\""]
1833    #[doc = "      ]"]
1834    #[doc = "    },"]
1835    #[doc = "    \"temperature_deviation\": {"]
1836    #[doc = "      \"title\": \"\","]
1837    #[doc = "      \"description\": \"Temperature deviation in degrees Celsius.\","]
1838    #[doc = "      \"type\": ["]
1839    #[doc = "        \"number\","]
1840    #[doc = "        \"null\""]
1841    #[doc = "      ]"]
1842    #[doc = "    },"]
1843    #[doc = "    \"temperature_trend_deviation\": {"]
1844    #[doc = "      \"title\": \"\","]
1845    #[doc = "      \"description\": \"Temperature trend deviation in degrees Celsius.\","]
1846    #[doc = "      \"type\": ["]
1847    #[doc = "        \"number\","]
1848    #[doc = "        \"null\""]
1849    #[doc = "      ]"]
1850    #[doc = "    },"]
1851    #[doc = "    \"timestamp\": {"]
1852    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
1853    #[doc = "    }"]
1854    #[doc = "  },"]
1855    #[doc = "  \"x-cloud-only\": true,"]
1856    #[doc = "  \"x-collection\": \"publicdailyreadiness\","]
1857    #[doc = "  \"x-owner\": \"wellbeing-squad\""]
1858    #[doc = "}"]
1859    #[doc = r" ```"]
1860    #[doc = r" </details>"]
1861    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1862    pub struct PublicDailyReadiness {
1863        pub contributors: PublicReadinessContributors,
1864        pub day: IsoDate,
1865        #[doc = "Unique identifier of the object."]
1866        pub id: X,
1867        #[doc = "Daily readiness score."]
1868        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1869        pub score: ::std::option::Option<i64>,
1870        #[doc = "Temperature deviation in degrees Celsius."]
1871        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1872        pub temperature_deviation: ::std::option::Option<f64>,
1873        #[doc = "Temperature trend deviation in degrees Celsius."]
1874        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1875        pub temperature_trend_deviation: ::std::option::Option<f64>,
1876        pub timestamp: LocalizedDateTime,
1877    }
1878
1879    #[doc = "Public object defining daily sleep."]
1880    #[doc = r""]
1881    #[doc = r" <details><summary>JSON schema</summary>"]
1882    #[doc = r""]
1883    #[doc = r" ```json"]
1884    #[doc = "{"]
1885    #[doc = "  \"title\": \"PublicDailySleep\","]
1886    #[doc = "  \"description\": \"Public object defining daily sleep.\","]
1887    #[doc = "  \"type\": \"object\","]
1888    #[doc = "  \"required\": ["]
1889    #[doc = "    \"contributors\","]
1890    #[doc = "    \"day\","]
1891    #[doc = "    \"id\","]
1892    #[doc = "    \"timestamp\""]
1893    #[doc = "  ],"]
1894    #[doc = "  \"properties\": {"]
1895    #[doc = "    \"contributors\": {"]
1896    #[doc = "      \"$ref\": \"#/components/schemas/PublicSleepContributors\""]
1897    #[doc = "    },"]
1898    #[doc = "    \"day\": {"]
1899    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
1900    #[doc = "    },"]
1901    #[doc = "    \"id\": {"]
1902    #[doc = "      \"title\": \"\","]
1903    #[doc = "      \"description\": \"Unique identifier of the object.\","]
1904    #[doc = "      \"type\": \"string\","]
1905    #[doc = "      \"minLength\": 1"]
1906    #[doc = "    },"]
1907    #[doc = "    \"score\": {"]
1908    #[doc = "      \"title\": \"\","]
1909    #[doc = "      \"description\": \"Daily sleep score.\","]
1910    #[doc = "      \"type\": ["]
1911    #[doc = "        \"integer\","]
1912    #[doc = "        \"null\""]
1913    #[doc = "      ]"]
1914    #[doc = "    },"]
1915    #[doc = "    \"timestamp\": {"]
1916    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
1917    #[doc = "    }"]
1918    #[doc = "  },"]
1919    #[doc = "  \"x-cloud-only\": true,"]
1920    #[doc = "  \"x-collection\": \"publicdailysleep\","]
1921    #[doc = "  \"x-owner\": \"sleep-squad\""]
1922    #[doc = "}"]
1923    #[doc = r" ```"]
1924    #[doc = r" </details>"]
1925    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1926    pub struct PublicDailySleep {
1927        pub contributors: PublicSleepContributors,
1928        pub day: IsoDate,
1929        #[doc = "Unique identifier of the object."]
1930        pub id: X,
1931        #[doc = "Daily sleep score."]
1932        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1933        pub score: ::std::option::Option<i64>,
1934        pub timestamp: LocalizedDateTime,
1935    }
1936
1937    #[doc = "Daily SpO2 (Oxygen saturation)."]
1938    #[doc = r""]
1939    #[doc = r" <details><summary>JSON schema</summary>"]
1940    #[doc = r""]
1941    #[doc = r" ```json"]
1942    #[doc = "{"]
1943    #[doc = "  \"title\": \"PublicDailySpO2\","]
1944    #[doc = "  \"description\": \"Daily SpO2 (Oxygen saturation).\","]
1945    #[doc = "  \"type\": \"object\","]
1946    #[doc = "  \"required\": ["]
1947    #[doc = "    \"day\","]
1948    #[doc = "    \"id\""]
1949    #[doc = "  ],"]
1950    #[doc = "  \"properties\": {"]
1951    #[doc = "    \"breathing_disturbance_index\": {"]
1952    #[doc = "      \"title\": \"\","]
1953    #[doc = "      \"description\": \"Breathing Disturbance Index (BDI) calculated using detected SpO2 drops from timeseries. Values should be in range [0, 100]\","]
1954    #[doc = "      \"type\": ["]
1955    #[doc = "        \"integer\","]
1956    #[doc = "        \"null\""]
1957    #[doc = "      ]"]
1958    #[doc = "    },"]
1959    #[doc = "    \"day\": {"]
1960    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
1961    #[doc = "    },"]
1962    #[doc = "    \"id\": {"]
1963    #[doc = "      \"title\": \"\","]
1964    #[doc = "      \"description\": \"Unique identifier of the object.\","]
1965    #[doc = "      \"type\": \"string\","]
1966    #[doc = "      \"minLength\": 1"]
1967    #[doc = "    },"]
1968    #[doc = "    \"spo2_percentage\": {"]
1969    #[doc = "      \"title\": \"\","]
1970    #[doc = "      \"description\": \"The daily SpO2 percentage value aggregates. Sourced from SpO2 percentage timeseries values.\","]
1971    #[doc = "      \"oneOf\": ["]
1972    #[doc = "        {"]
1973    #[doc = "          \"type\": \"null\""]
1974    #[doc = "        },"]
1975    #[doc = "        {"]
1976    #[doc = "          \"allOf\": ["]
1977    #[doc = "            {"]
1978    #[doc = "              \"$ref\": \"#/components/schemas/PublicSpo2AggregatedValues\""]
1979    #[doc = "            }"]
1980    #[doc = "          ]"]
1981    #[doc = "        }"]
1982    #[doc = "      ]"]
1983    #[doc = "    }"]
1984    #[doc = "  },"]
1985    #[doc = "  \"x-cloud-only\": true,"]
1986    #[doc = "  \"x-collection\": \"publicdailyspo2\","]
1987    #[doc = "  \"x-owner\": \"sleep-squad\""]
1988    #[doc = "}"]
1989    #[doc = r" ```"]
1990    #[doc = r" </details>"]
1991    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1992    pub struct PublicDailySpO2 {
1993        #[doc = "Breathing Disturbance Index (BDI) calculated using detected SpO2 drops from timeseries. Values should be in range [0, 100]"]
1994        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1995        pub breathing_disturbance_index: ::std::option::Option<i64>,
1996        pub day: IsoDate,
1997        #[doc = "Unique identifier of the object."]
1998        pub id: X,
1999        #[doc = "The daily SpO2 percentage value aggregates. Sourced from SpO2 percentage timeseries values."]
2000        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2001        pub spo2_percentage: ::std::option::Option<PublicSpo2AggregatedValues>,
2002    }
2003
2004    #[doc = "Daily stress."]
2005    #[doc = r""]
2006    #[doc = r" <details><summary>JSON schema</summary>"]
2007    #[doc = r""]
2008    #[doc = r" ```json"]
2009    #[doc = "{"]
2010    #[doc = "  \"title\": \"PublicDailyStress\","]
2011    #[doc = "  \"description\": \"Daily stress.\","]
2012    #[doc = "  \"type\": \"object\","]
2013    #[doc = "  \"required\": ["]
2014    #[doc = "    \"day\","]
2015    #[doc = "    \"id\""]
2016    #[doc = "  ],"]
2017    #[doc = "  \"properties\": {"]
2018    #[doc = "    \"day\": {"]
2019    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
2020    #[doc = "    },"]
2021    #[doc = "    \"day_summary\": {"]
2022    #[doc = "      \"title\": \"\","]
2023    #[doc = "      \"description\": \"Stress summary of full day.\","]
2024    #[doc = "      \"oneOf\": ["]
2025    #[doc = "        {"]
2026    #[doc = "          \"type\": \"null\""]
2027    #[doc = "        },"]
2028    #[doc = "        {"]
2029    #[doc = "          \"allOf\": ["]
2030    #[doc = "            {"]
2031    #[doc = "              \"$ref\": \"#/components/schemas/PublicDailyStressSummary\""]
2032    #[doc = "            }"]
2033    #[doc = "          ]"]
2034    #[doc = "        }"]
2035    #[doc = "      ]"]
2036    #[doc = "    },"]
2037    #[doc = "    \"id\": {"]
2038    #[doc = "      \"title\": \"\","]
2039    #[doc = "      \"description\": \"Unique identifier of the object.\","]
2040    #[doc = "      \"type\": \"string\","]
2041    #[doc = "      \"minLength\": 1"]
2042    #[doc = "    },"]
2043    #[doc = "    \"recovery_high\": {"]
2044    #[doc = "      \"title\": \"\","]
2045    #[doc = "      \"description\": \"Time spent in a high recovery zone (bottom quartile data) in seconds.\","]
2046    #[doc = "      \"type\": ["]
2047    #[doc = "        \"integer\","]
2048    #[doc = "        \"null\""]
2049    #[doc = "      ]"]
2050    #[doc = "    },"]
2051    #[doc = "    \"stress_high\": {"]
2052    #[doc = "      \"title\": \"\","]
2053    #[doc = "      \"description\": \"Time spent in a high stress zone (top quartile of data) in seconds.\","]
2054    #[doc = "      \"type\": ["]
2055    #[doc = "        \"integer\","]
2056    #[doc = "        \"null\""]
2057    #[doc = "      ]"]
2058    #[doc = "    }"]
2059    #[doc = "  },"]
2060    #[doc = "  \"x-cloud-only\": true,"]
2061    #[doc = "  \"x-collection\": \"publicdailystress\","]
2062    #[doc = "  \"x-owner\": \"wellbeing-squad\""]
2063    #[doc = "}"]
2064    #[doc = r" ```"]
2065    #[doc = r" </details>"]
2066    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2067    pub struct PublicDailyStress {
2068        pub day: IsoDate,
2069        #[doc = "Stress summary of full day."]
2070        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2071        pub day_summary: ::std::option::Option<PublicDailyStressSummary>,
2072        #[doc = "Unique identifier of the object."]
2073        pub id: X,
2074        #[doc = "Time spent in a high recovery zone (bottom quartile data) in seconds."]
2075        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2076        pub recovery_high: ::std::option::Option<i64>,
2077        #[doc = "Time spent in a high stress zone (top quartile of data) in seconds."]
2078        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2079        pub stress_high: ::std::option::Option<i64>,
2080    }
2081
2082    #[doc = "Possible public daily stress summary types."]
2083    #[doc = r""]
2084    #[doc = r" <details><summary>JSON schema</summary>"]
2085    #[doc = r""]
2086    #[doc = r" ```json"]
2087    #[doc = "{"]
2088    #[doc = "  \"title\": \"PublicDailyStressSummary\","]
2089    #[doc = "  \"description\": \"Possible public daily stress summary types.\","]
2090    #[doc = "  \"type\": \"string\","]
2091    #[doc = "  \"enum\": ["]
2092    #[doc = "    \"restored\","]
2093    #[doc = "    \"normal\","]
2094    #[doc = "    \"stressful\""]
2095    #[doc = "  ]"]
2096    #[doc = "}"]
2097    #[doc = r" ```"]
2098    #[doc = r" </details>"]
2099    #[derive(
2100        :: serde :: Deserialize,
2101        :: serde :: Serialize,
2102        Clone,
2103        Copy,
2104        Debug,
2105        Eq,
2106        Hash,
2107        Ord,
2108        PartialEq,
2109        PartialOrd,
2110    )]
2111    pub enum PublicDailyStressSummary {
2112        #[serde(rename = "restored")]
2113        Restored,
2114        #[serde(rename = "normal")]
2115        Normal,
2116        #[serde(rename = "stressful")]
2117        Stressful,
2118    }
2119
2120    impl ::std::fmt::Display for PublicDailyStressSummary {
2121        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2122            match *self {
2123                Self::Restored => f.write_str("restored"),
2124                Self::Normal => f.write_str("normal"),
2125                Self::Stressful => f.write_str("stressful"),
2126            }
2127        }
2128    }
2129
2130    impl ::std::str::FromStr for PublicDailyStressSummary {
2131        type Err = self::error::ConversionError;
2132        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2133            match value {
2134                "restored" => Ok(Self::Restored),
2135                "normal" => Ok(Self::Normal),
2136                "stressful" => Ok(Self::Stressful),
2137                _ => Err("invalid value".into()),
2138            }
2139        }
2140    }
2141
2142    impl ::std::convert::TryFrom<&str> for PublicDailyStressSummary {
2143        type Error = self::error::ConversionError;
2144        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2145            value.parse()
2146        }
2147    }
2148
2149    impl ::std::convert::TryFrom<&::std::string::String> for PublicDailyStressSummary {
2150        type Error = self::error::ConversionError;
2151        fn try_from(
2152            value: &::std::string::String,
2153        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2154            value.parse()
2155        }
2156    }
2157
2158    impl ::std::convert::TryFrom<::std::string::String> for PublicDailyStressSummary {
2159        type Error = self::error::ConversionError;
2160        fn try_from(
2161            value: ::std::string::String,
2162        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2163            value.parse()
2164        }
2165    }
2166
2167    #[doc = "Heart rate sample"]
2168    #[doc = r""]
2169    #[doc = r" <details><summary>JSON schema</summary>"]
2170    #[doc = r""]
2171    #[doc = r" ```json"]
2172    #[doc = "{"]
2173    #[doc = "  \"title\": \"PublicHeartRateRow\","]
2174    #[doc = "  \"description\": \"Heart rate sample\","]
2175    #[doc = "  \"type\": \"object\","]
2176    #[doc = "  \"required\": ["]
2177    #[doc = "    \"bpm\","]
2178    #[doc = "    \"source\","]
2179    #[doc = "    \"timestamp\","]
2180    #[doc = "    \"timestamp_unix\""]
2181    #[doc = "  ],"]
2182    #[doc = "  \"properties\": {"]
2183    #[doc = "    \"bpm\": {"]
2184    #[doc = "      \"title\": \"\","]
2185    #[doc = "      \"description\": \"Heart rate as beats per minute.\","]
2186    #[doc = "      \"type\": \"integer\""]
2187    #[doc = "    },"]
2188    #[doc = "    \"source\": {"]
2189    #[doc = "      \"$ref\": \"#/components/schemas/PublicHeartRateSource\""]
2190    #[doc = "    },"]
2191    #[doc = "    \"timestamp\": {"]
2192    #[doc = "      \"$ref\": \"#/components/schemas/UtcDateTime\""]
2193    #[doc = "    },"]
2194    #[doc = "    \"timestamp_unix\": {"]
2195    #[doc = "      \"title\": \"\","]
2196    #[doc = "      \"description\": \"Timestamp of the discrete sample as unix time in milliseconds.\","]
2197    #[doc = "      \"type\": \"integer\""]
2198    #[doc = "    }"]
2199    #[doc = "  },"]
2200    #[doc = "  \"x-cloud-only\": true,"]
2201    #[doc = "  \"x-collection\": \"publicheartrate\","]
2202    #[doc = "  \"x-owner\": \"core-sensing-squad\""]
2203    #[doc = "}"]
2204    #[doc = r" ```"]
2205    #[doc = r" </details>"]
2206    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2207    pub struct PublicHeartRateRow {
2208        #[doc = "Heart rate as beats per minute."]
2209        pub bpm: i64,
2210        pub source: PublicHeartRateSource,
2211        pub timestamp: UtcDateTime,
2212        #[doc = "Timestamp of the discrete sample as unix time in milliseconds."]
2213        pub timestamp_unix: i64,
2214    }
2215
2216    #[doc = "Possible heart rate sources."]
2217    #[doc = r""]
2218    #[doc = r" <details><summary>JSON schema</summary>"]
2219    #[doc = r""]
2220    #[doc = r" ```json"]
2221    #[doc = "{"]
2222    #[doc = "  \"title\": \"PublicHeartRateSource\","]
2223    #[doc = "  \"description\": \"Possible heart rate sources.\","]
2224    #[doc = "  \"type\": \"string\","]
2225    #[doc = "  \"enum\": ["]
2226    #[doc = "    \"awake\","]
2227    #[doc = "    \"workout\","]
2228    #[doc = "    \"rest\","]
2229    #[doc = "    \"sleep\","]
2230    #[doc = "    \"live\","]
2231    #[doc = "    \"session\""]
2232    #[doc = "  ]"]
2233    #[doc = "}"]
2234    #[doc = r" ```"]
2235    #[doc = r" </details>"]
2236    #[derive(
2237        :: serde :: Deserialize,
2238        :: serde :: Serialize,
2239        Clone,
2240        Copy,
2241        Debug,
2242        Eq,
2243        Hash,
2244        Ord,
2245        PartialEq,
2246        PartialOrd,
2247    )]
2248    pub enum PublicHeartRateSource {
2249        #[serde(rename = "awake")]
2250        Awake,
2251        #[serde(rename = "workout")]
2252        Workout,
2253        #[serde(rename = "rest")]
2254        Rest,
2255        #[serde(rename = "sleep")]
2256        Sleep,
2257        #[serde(rename = "live")]
2258        Live,
2259        #[serde(rename = "session")]
2260        Session,
2261    }
2262
2263    impl ::std::fmt::Display for PublicHeartRateSource {
2264        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2265            match *self {
2266                Self::Awake => f.write_str("awake"),
2267                Self::Workout => f.write_str("workout"),
2268                Self::Rest => f.write_str("rest"),
2269                Self::Sleep => f.write_str("sleep"),
2270                Self::Live => f.write_str("live"),
2271                Self::Session => f.write_str("session"),
2272            }
2273        }
2274    }
2275
2276    impl ::std::str::FromStr for PublicHeartRateSource {
2277        type Err = self::error::ConversionError;
2278        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2279            match value {
2280                "awake" => Ok(Self::Awake),
2281                "workout" => Ok(Self::Workout),
2282                "rest" => Ok(Self::Rest),
2283                "sleep" => Ok(Self::Sleep),
2284                "live" => Ok(Self::Live),
2285                "session" => Ok(Self::Session),
2286                _ => Err("invalid value".into()),
2287            }
2288        }
2289    }
2290
2291    impl ::std::convert::TryFrom<&str> for PublicHeartRateSource {
2292        type Error = self::error::ConversionError;
2293        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2294            value.parse()
2295        }
2296    }
2297
2298    impl ::std::convert::TryFrom<&::std::string::String> for PublicHeartRateSource {
2299        type Error = self::error::ConversionError;
2300        fn try_from(
2301            value: &::std::string::String,
2302        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2303            value.parse()
2304        }
2305    }
2306
2307    impl ::std::convert::TryFrom<::std::string::String> for PublicHeartRateSource {
2308        type Error = self::error::ConversionError;
2309        fn try_from(
2310            value: ::std::string::String,
2311        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2312            value.parse()
2313        }
2314    }
2315
2316    #[doc = "`PublicModifiedSleepModel`"]
2317    #[doc = r""]
2318    #[doc = r" <details><summary>JSON schema</summary>"]
2319    #[doc = r""]
2320    #[doc = r" ```json"]
2321    #[doc = "{"]
2322    #[doc = "  \"title\": \"PublicModifiedSleepModel\","]
2323    #[doc = "  \"type\": \"object\","]
2324    #[doc = "  \"required\": ["]
2325    #[doc = "    \"bedtime_end\","]
2326    #[doc = "    \"bedtime_start\","]
2327    #[doc = "    \"day\","]
2328    #[doc = "    \"id\","]
2329    #[doc = "    \"low_battery_alert\","]
2330    #[doc = "    \"period\","]
2331    #[doc = "    \"time_in_bed\""]
2332    #[doc = "  ],"]
2333    #[doc = "  \"properties\": {"]
2334    #[doc = "    \"app_sleep_phase_5_min\": {"]
2335    #[doc = "      \"title\": \"App Sleep Phase 5 Min\","]
2336    #[doc = "      \"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        \","]
2337    #[doc = "      \"type\": ["]
2338    #[doc = "        \"string\","]
2339    #[doc = "        \"null\""]
2340    #[doc = "      ]"]
2341    #[doc = "    },"]
2342    #[doc = "    \"average_breath\": {"]
2343    #[doc = "      \"title\": \"\","]
2344    #[doc = "      \"description\": \"Average breathing rate during sleep as breaths/minute.\","]
2345    #[doc = "      \"type\": ["]
2346    #[doc = "        \"number\","]
2347    #[doc = "        \"null\""]
2348    #[doc = "      ]"]
2349    #[doc = "    },"]
2350    #[doc = "    \"average_heart_rate\": {"]
2351    #[doc = "      \"title\": \"\","]
2352    #[doc = "      \"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.\","]
2353    #[doc = "      \"type\": ["]
2354    #[doc = "        \"number\","]
2355    #[doc = "        \"null\""]
2356    #[doc = "      ]"]
2357    #[doc = "    },"]
2358    #[doc = "    \"average_hrv\": {"]
2359    #[doc = "      \"title\": \"\","]
2360    #[doc = "      \"description\": \"Average heart rate variability during sleep.\","]
2361    #[doc = "      \"type\": ["]
2362    #[doc = "        \"integer\","]
2363    #[doc = "        \"null\""]
2364    #[doc = "      ]"]
2365    #[doc = "    },"]
2366    #[doc = "    \"awake_time\": {"]
2367    #[doc = "      \"title\": \"\","]
2368    #[doc = "      \"description\": \"Duration spent awake in seconds.\","]
2369    #[doc = "      \"type\": ["]
2370    #[doc = "        \"integer\","]
2371    #[doc = "        \"null\""]
2372    #[doc = "      ]"]
2373    #[doc = "    },"]
2374    #[doc = "    \"bedtime_end\": {"]
2375    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
2376    #[doc = "    },"]
2377    #[doc = "    \"bedtime_start\": {"]
2378    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
2379    #[doc = "    },"]
2380    #[doc = "    \"day\": {"]
2381    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
2382    #[doc = "    },"]
2383    #[doc = "    \"deep_sleep_duration\": {"]
2384    #[doc = "      \"title\": \"\","]
2385    #[doc = "      \"description\": \"Duration spent in deep sleep in seconds.\","]
2386    #[doc = "      \"type\": ["]
2387    #[doc = "        \"integer\","]
2388    #[doc = "        \"null\""]
2389    #[doc = "      ]"]
2390    #[doc = "    },"]
2391    #[doc = "    \"efficiency\": {"]
2392    #[doc = "      \"title\": \"\","]
2393    #[doc = "      \"description\": \"Sleep efficiency rating in range [1, 100].\","]
2394    #[doc = "      \"type\": ["]
2395    #[doc = "        \"integer\","]
2396    #[doc = "        \"null\""]
2397    #[doc = "      ]"]
2398    #[doc = "    },"]
2399    #[doc = "    \"heart_rate\": {"]
2400    #[doc = "      \"title\": \"\","]
2401    #[doc = "      \"description\": \"Object containing heart rate samples.\","]
2402    #[doc = "      \"oneOf\": ["]
2403    #[doc = "        {"]
2404    #[doc = "          \"type\": \"null\""]
2405    #[doc = "        },"]
2406    #[doc = "        {"]
2407    #[doc = "          \"allOf\": ["]
2408    #[doc = "            {"]
2409    #[doc = "              \"$ref\": \"#/components/schemas/PublicSample\""]
2410    #[doc = "            }"]
2411    #[doc = "          ]"]
2412    #[doc = "        }"]
2413    #[doc = "      ]"]
2414    #[doc = "    },"]
2415    #[doc = "    \"hrv\": {"]
2416    #[doc = "      \"title\": \"\","]
2417    #[doc = "      \"description\": \"Object containing heart rate variability samples.\","]
2418    #[doc = "      \"oneOf\": ["]
2419    #[doc = "        {"]
2420    #[doc = "          \"type\": \"null\""]
2421    #[doc = "        },"]
2422    #[doc = "        {"]
2423    #[doc = "          \"allOf\": ["]
2424    #[doc = "            {"]
2425    #[doc = "              \"$ref\": \"#/components/schemas/PublicSample\""]
2426    #[doc = "            }"]
2427    #[doc = "          ]"]
2428    #[doc = "        }"]
2429    #[doc = "      ]"]
2430    #[doc = "    },"]
2431    #[doc = "    \"id\": {"]
2432    #[doc = "      \"title\": \"\","]
2433    #[doc = "      \"description\": \"Unique identifier of the object.\","]
2434    #[doc = "      \"type\": \"string\","]
2435    #[doc = "      \"minLength\": 1"]
2436    #[doc = "    },"]
2437    #[doc = "    \"latency\": {"]
2438    #[doc = "      \"title\": \"\","]
2439    #[doc = "      \"description\": \"Sleep latency in seconds. This is the time it took for the user to fall asleep after going to bed.\","]
2440    #[doc = "      \"type\": ["]
2441    #[doc = "        \"integer\","]
2442    #[doc = "        \"null\""]
2443    #[doc = "      ]"]
2444    #[doc = "    },"]
2445    #[doc = "    \"light_sleep_duration\": {"]
2446    #[doc = "      \"title\": \"\","]
2447    #[doc = "      \"description\": \"Duration spent in light sleep in seconds.\","]
2448    #[doc = "      \"type\": ["]
2449    #[doc = "        \"integer\","]
2450    #[doc = "        \"null\""]
2451    #[doc = "      ]"]
2452    #[doc = "    },"]
2453    #[doc = "    \"low_battery_alert\": {"]
2454    #[doc = "      \"title\": \"\","]
2455    #[doc = "      \"description\": \"Flag indicating if a low battery alert occurred.\","]
2456    #[doc = "      \"type\": \"boolean\""]
2457    #[doc = "    },"]
2458    #[doc = "    \"lowest_heart_rate\": {"]
2459    #[doc = "      \"title\": \"\","]
2460    #[doc = "      \"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.\","]
2461    #[doc = "      \"type\": ["]
2462    #[doc = "        \"integer\","]
2463    #[doc = "        \"null\""]
2464    #[doc = "      ]"]
2465    #[doc = "    },"]
2466    #[doc = "    \"movement_30_sec\": {"]
2467    #[doc = "      \"title\": \"\","]
2468    #[doc = "      \"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\\\".\","]
2469    #[doc = "      \"type\": ["]
2470    #[doc = "        \"string\","]
2471    #[doc = "        \"null\""]
2472    #[doc = "      ]"]
2473    #[doc = "    },"]
2474    #[doc = "    \"period\": {"]
2475    #[doc = "      \"title\": \"\","]
2476    #[doc = "      \"description\": \"ECore sleep period identifier.\","]
2477    #[doc = "      \"type\": \"integer\""]
2478    #[doc = "    },"]
2479    #[doc = "    \"readiness\": {"]
2480    #[doc = "      \"title\": \"\","]
2481    #[doc = "      \"description\": \"Object containing the readiness details.\","]
2482    #[doc = "      \"oneOf\": ["]
2483    #[doc = "        {"]
2484    #[doc = "          \"type\": \"null\""]
2485    #[doc = "        },"]
2486    #[doc = "        {"]
2487    #[doc = "          \"allOf\": ["]
2488    #[doc = "            {"]
2489    #[doc = "              \"$ref\": \"#/components/schemas/PublicReadiness\""]
2490    #[doc = "            }"]
2491    #[doc = "          ]"]
2492    #[doc = "        }"]
2493    #[doc = "      ]"]
2494    #[doc = "    },"]
2495    #[doc = "    \"readiness_score_delta\": {"]
2496    #[doc = "      \"title\": \"\","]
2497    #[doc = "      \"description\": \"Effect on readiness score caused by this sleep period.\","]
2498    #[doc = "      \"type\": ["]
2499    #[doc = "        \"integer\","]
2500    #[doc = "        \"null\""]
2501    #[doc = "      ]"]
2502    #[doc = "    },"]
2503    #[doc = "    \"rem_sleep_duration\": {"]
2504    #[doc = "      \"title\": \"\","]
2505    #[doc = "      \"description\": \"Duration spent in REM sleep in seconds.\","]
2506    #[doc = "      \"type\": ["]
2507    #[doc = "        \"integer\","]
2508    #[doc = "        \"null\""]
2509    #[doc = "      ]"]
2510    #[doc = "    },"]
2511    #[doc = "    \"restless_periods\": {"]
2512    #[doc = "      \"title\": \"\","]
2513    #[doc = "      \"description\": \"Number of restless periods during sleep.\","]
2514    #[doc = "      \"type\": ["]
2515    #[doc = "        \"integer\","]
2516    #[doc = "        \"null\""]
2517    #[doc = "      ]"]
2518    #[doc = "    },"]
2519    #[doc = "    \"ring_id\": {"]
2520    #[doc = "      \"title\": \"Ring Id\","]
2521    #[doc = "      \"description\": \"Encrypted identifier of the ring that produced this sleep data. Deprecated, returns null.\","]
2522    #[doc = "      \"type\": ["]
2523    #[doc = "        \"string\","]
2524    #[doc = "        \"null\""]
2525    #[doc = "      ]"]
2526    #[doc = "    },"]
2527    #[doc = "    \"sleep_algorithm_version\": {"]
2528    #[doc = "      \"title\": \"\","]
2529    #[doc = "      \"description\": \"Version of the sleep algorithm used to calculate the sleep data.\","]
2530    #[doc = "      \"oneOf\": ["]
2531    #[doc = "        {"]
2532    #[doc = "          \"type\": \"null\""]
2533    #[doc = "        },"]
2534    #[doc = "        {"]
2535    #[doc = "          \"allOf\": ["]
2536    #[doc = "            {"]
2537    #[doc = "              \"$ref\": \"#/components/schemas/PublicSleepAlgorithmVersion\""]
2538    #[doc = "            }"]
2539    #[doc = "          ]"]
2540    #[doc = "        }"]
2541    #[doc = "      ]"]
2542    #[doc = "    },"]
2543    #[doc = "    \"sleep_analysis_reason\": {"]
2544    #[doc = "      \"title\": \"\","]
2545    #[doc = "      \"description\": \"The reason for the creation or update of the latest version of this sleep.\","]
2546    #[doc = "      \"oneOf\": ["]
2547    #[doc = "        {"]
2548    #[doc = "          \"type\": \"null\""]
2549    #[doc = "        },"]
2550    #[doc = "        {"]
2551    #[doc = "          \"allOf\": ["]
2552    #[doc = "            {"]
2553    #[doc = "              \"$ref\": \"#/components/schemas/PublicSleepAnalysisReason\""]
2554    #[doc = "            }"]
2555    #[doc = "          ]"]
2556    #[doc = "        }"]
2557    #[doc = "      ]"]
2558    #[doc = "    },"]
2559    #[doc = "    \"sleep_phase_30_sec\": {"]
2560    #[doc = "      \"title\": \"\","]
2561    #[doc = "      \"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\\\".\","]
2562    #[doc = "      \"type\": ["]
2563    #[doc = "        \"string\","]
2564    #[doc = "        \"null\""]
2565    #[doc = "      ]"]
2566    #[doc = "    },"]
2567    #[doc = "    \"sleep_phase_5_min\": {"]
2568    #[doc = "      \"title\": \"\","]
2569    #[doc = "      \"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\\\".\","]
2570    #[doc = "      \"type\": ["]
2571    #[doc = "        \"string\","]
2572    #[doc = "        \"null\""]
2573    #[doc = "      ]"]
2574    #[doc = "    },"]
2575    #[doc = "    \"sleep_score_delta\": {"]
2576    #[doc = "      \"title\": \"\","]
2577    #[doc = "      \"description\": \"Effect on sleep score caused by this sleep period.\","]
2578    #[doc = "      \"type\": ["]
2579    #[doc = "        \"integer\","]
2580    #[doc = "        \"null\""]
2581    #[doc = "      ]"]
2582    #[doc = "    },"]
2583    #[doc = "    \"time_in_bed\": {"]
2584    #[doc = "      \"title\": \"\","]
2585    #[doc = "      \"description\": \"Duration spent in bed in seconds.\","]
2586    #[doc = "      \"type\": \"integer\""]
2587    #[doc = "    },"]
2588    #[doc = "    \"total_sleep_duration\": {"]
2589    #[doc = "      \"title\": \"\","]
2590    #[doc = "      \"description\": \"Total sleep duration in seconds.\","]
2591    #[doc = "      \"type\": ["]
2592    #[doc = "        \"integer\","]
2593    #[doc = "        \"null\""]
2594    #[doc = "      ]"]
2595    #[doc = "    },"]
2596    #[doc = "    \"type\": {"]
2597    #[doc = "      \"title\": \"\","]
2598    #[doc = "      \"description\": \"Type of the sleep period.\","]
2599    #[doc = "      \"oneOf\": ["]
2600    #[doc = "        {"]
2601    #[doc = "          \"type\": \"null\""]
2602    #[doc = "        },"]
2603    #[doc = "        {"]
2604    #[doc = "          \"allOf\": ["]
2605    #[doc = "            {"]
2606    #[doc = "              \"$ref\": \"#/components/schemas/PublicSleepType\""]
2607    #[doc = "            }"]
2608    #[doc = "          ]"]
2609    #[doc = "        }"]
2610    #[doc = "      ]"]
2611    #[doc = "    }"]
2612    #[doc = "  },"]
2613    #[doc = "  \"x-cloud-only\": true,"]
2614    #[doc = "  \"x-collection\": \"publicsleepmodel\","]
2615    #[doc = "  \"x-owner\": \"sleep-squad\""]
2616    #[doc = "}"]
2617    #[doc = r" ```"]
2618    #[doc = r" </details>"]
2619    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2620    pub struct PublicModifiedSleepModel {
2621        #[doc = "\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        "]
2622        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2623        pub app_sleep_phase_5_min: ::std::option::Option<::std::string::String>,
2624        #[doc = "Average breathing rate during sleep as breaths/minute."]
2625        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2626        pub average_breath: ::std::option::Option<f64>,
2627        #[doc = "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."]
2628        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2629        pub average_heart_rate: ::std::option::Option<f64>,
2630        #[doc = "Average heart rate variability during sleep."]
2631        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2632        pub average_hrv: ::std::option::Option<i64>,
2633        #[doc = "Duration spent awake in seconds."]
2634        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2635        pub awake_time: ::std::option::Option<i64>,
2636        pub bedtime_end: LocalizedDateTime,
2637        pub bedtime_start: LocalizedDateTime,
2638        pub day: IsoDate,
2639        #[doc = "Duration spent in deep sleep in seconds."]
2640        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2641        pub deep_sleep_duration: ::std::option::Option<i64>,
2642        #[doc = "Sleep efficiency rating in range [1, 100]."]
2643        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2644        pub efficiency: ::std::option::Option<i64>,
2645        #[doc = "Object containing heart rate samples."]
2646        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2647        pub heart_rate: ::std::option::Option<PublicSample>,
2648        #[doc = "Object containing heart rate variability samples."]
2649        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2650        pub hrv: ::std::option::Option<PublicSample>,
2651        #[doc = "Unique identifier of the object."]
2652        pub id: X,
2653        #[doc = "Sleep latency in seconds. This is the time it took for the user to fall asleep after going to bed."]
2654        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2655        pub latency: ::std::option::Option<i64>,
2656        #[doc = "Duration spent in light sleep in seconds."]
2657        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2658        pub light_sleep_duration: ::std::option::Option<i64>,
2659        #[doc = "Flag indicating if a low battery alert occurred."]
2660        pub low_battery_alert: bool,
2661        #[doc = "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."]
2662        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2663        pub lowest_heart_rate: ::std::option::Option<i64>,
2664        #[doc = "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\"."]
2665        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2666        pub movement_30_sec: ::std::option::Option<::std::string::String>,
2667        #[doc = "ECore sleep period identifier."]
2668        pub period: i64,
2669        #[doc = "Object containing the readiness details."]
2670        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2671        pub readiness: ::std::option::Option<PublicReadiness>,
2672        #[doc = "Effect on readiness score caused by this sleep period."]
2673        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2674        pub readiness_score_delta: ::std::option::Option<i64>,
2675        #[doc = "Duration spent in REM sleep in seconds."]
2676        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2677        pub rem_sleep_duration: ::std::option::Option<i64>,
2678        #[doc = "Number of restless periods during sleep."]
2679        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2680        pub restless_periods: ::std::option::Option<i64>,
2681        #[doc = "Encrypted identifier of the ring that produced this sleep data. Deprecated, returns null."]
2682        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2683        pub ring_id: ::std::option::Option<::std::string::String>,
2684        #[doc = "Version of the sleep algorithm used to calculate the sleep data."]
2685        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2686        pub sleep_algorithm_version: ::std::option::Option<PublicSleepAlgorithmVersion>,
2687        #[doc = "The reason for the creation or update of the latest version of this sleep."]
2688        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2689        pub sleep_analysis_reason: ::std::option::Option<PublicSleepAnalysisReason>,
2690        #[doc = "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\"."]
2691        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2692        pub sleep_phase_30_sec: ::std::option::Option<::std::string::String>,
2693        #[doc = "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\"."]
2694        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2695        pub sleep_phase_5_min: ::std::option::Option<::std::string::String>,
2696        #[doc = "Effect on sleep score caused by this sleep period."]
2697        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2698        pub sleep_score_delta: ::std::option::Option<i64>,
2699        #[doc = "Duration spent in bed in seconds."]
2700        pub time_in_bed: i64,
2701        #[doc = "Total sleep duration in seconds."]
2702        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2703        pub total_sleep_duration: ::std::option::Option<i64>,
2704        #[doc = "Type of the sleep period."]
2705        #[serde(
2706            rename = "type",
2707            default,
2708            skip_serializing_if = "::std::option::Option::is_none"
2709        )]
2710        pub type_: ::std::option::Option<PublicSleepType>,
2711    }
2712
2713    #[doc = "Possible Moment moods."]
2714    #[doc = r""]
2715    #[doc = r" <details><summary>JSON schema</summary>"]
2716    #[doc = r""]
2717    #[doc = r" ```json"]
2718    #[doc = "{"]
2719    #[doc = "  \"title\": \"PublicMomentMood\","]
2720    #[doc = "  \"description\": \"Possible Moment moods.\","]
2721    #[doc = "  \"type\": \"string\","]
2722    #[doc = "  \"enum\": ["]
2723    #[doc = "    \"bad\","]
2724    #[doc = "    \"worse\","]
2725    #[doc = "    \"same\","]
2726    #[doc = "    \"good\","]
2727    #[doc = "    \"great\""]
2728    #[doc = "  ]"]
2729    #[doc = "}"]
2730    #[doc = r" ```"]
2731    #[doc = r" </details>"]
2732    #[derive(
2733        :: serde :: Deserialize,
2734        :: serde :: Serialize,
2735        Clone,
2736        Copy,
2737        Debug,
2738        Eq,
2739        Hash,
2740        Ord,
2741        PartialEq,
2742        PartialOrd,
2743    )]
2744    pub enum PublicMomentMood {
2745        #[serde(rename = "bad")]
2746        Bad,
2747        #[serde(rename = "worse")]
2748        Worse,
2749        #[serde(rename = "same")]
2750        Same,
2751        #[serde(rename = "good")]
2752        Good,
2753        #[serde(rename = "great")]
2754        Great,
2755    }
2756
2757    impl ::std::fmt::Display for PublicMomentMood {
2758        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2759            match *self {
2760                Self::Bad => f.write_str("bad"),
2761                Self::Worse => f.write_str("worse"),
2762                Self::Same => f.write_str("same"),
2763                Self::Good => f.write_str("good"),
2764                Self::Great => f.write_str("great"),
2765            }
2766        }
2767    }
2768
2769    impl ::std::str::FromStr for PublicMomentMood {
2770        type Err = self::error::ConversionError;
2771        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2772            match value {
2773                "bad" => Ok(Self::Bad),
2774                "worse" => Ok(Self::Worse),
2775                "same" => Ok(Self::Same),
2776                "good" => Ok(Self::Good),
2777                "great" => Ok(Self::Great),
2778                _ => Err("invalid value".into()),
2779            }
2780        }
2781    }
2782
2783    impl ::std::convert::TryFrom<&str> for PublicMomentMood {
2784        type Error = self::error::ConversionError;
2785        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2786            value.parse()
2787        }
2788    }
2789
2790    impl ::std::convert::TryFrom<&::std::string::String> for PublicMomentMood {
2791        type Error = self::error::ConversionError;
2792        fn try_from(
2793            value: &::std::string::String,
2794        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2795            value.parse()
2796        }
2797    }
2798
2799    impl ::std::convert::TryFrom<::std::string::String> for PublicMomentMood {
2800        type Error = self::error::ConversionError;
2801        fn try_from(
2802            value: ::std::string::String,
2803        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2804            value.parse()
2805        }
2806    }
2807
2808    #[doc = "Possible Moment types."]
2809    #[doc = r""]
2810    #[doc = r" <details><summary>JSON schema</summary>"]
2811    #[doc = r""]
2812    #[doc = r" ```json"]
2813    #[doc = "{"]
2814    #[doc = "  \"title\": \"PublicMomentType\","]
2815    #[doc = "  \"description\": \"Possible Moment types.\","]
2816    #[doc = "  \"type\": \"string\","]
2817    #[doc = "  \"enum\": ["]
2818    #[doc = "    \"breathing\","]
2819    #[doc = "    \"meditation\","]
2820    #[doc = "    \"nap\","]
2821    #[doc = "    \"relaxation\","]
2822    #[doc = "    \"rest\","]
2823    #[doc = "    \"body_status\""]
2824    #[doc = "  ]"]
2825    #[doc = "}"]
2826    #[doc = r" ```"]
2827    #[doc = r" </details>"]
2828    #[derive(
2829        :: serde :: Deserialize,
2830        :: serde :: Serialize,
2831        Clone,
2832        Copy,
2833        Debug,
2834        Eq,
2835        Hash,
2836        Ord,
2837        PartialEq,
2838        PartialOrd,
2839    )]
2840    pub enum PublicMomentType {
2841        #[serde(rename = "breathing")]
2842        Breathing,
2843        #[serde(rename = "meditation")]
2844        Meditation,
2845        #[serde(rename = "nap")]
2846        Nap,
2847        #[serde(rename = "relaxation")]
2848        Relaxation,
2849        #[serde(rename = "rest")]
2850        Rest,
2851        #[serde(rename = "body_status")]
2852        BodyStatus,
2853    }
2854
2855    impl ::std::fmt::Display for PublicMomentType {
2856        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2857            match *self {
2858                Self::Breathing => f.write_str("breathing"),
2859                Self::Meditation => f.write_str("meditation"),
2860                Self::Nap => f.write_str("nap"),
2861                Self::Relaxation => f.write_str("relaxation"),
2862                Self::Rest => f.write_str("rest"),
2863                Self::BodyStatus => f.write_str("body_status"),
2864            }
2865        }
2866    }
2867
2868    impl ::std::str::FromStr for PublicMomentType {
2869        type Err = self::error::ConversionError;
2870        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2871            match value {
2872                "breathing" => Ok(Self::Breathing),
2873                "meditation" => Ok(Self::Meditation),
2874                "nap" => Ok(Self::Nap),
2875                "relaxation" => Ok(Self::Relaxation),
2876                "rest" => Ok(Self::Rest),
2877                "body_status" => Ok(Self::BodyStatus),
2878                _ => Err("invalid value".into()),
2879            }
2880        }
2881    }
2882
2883    impl ::std::convert::TryFrom<&str> for PublicMomentType {
2884        type Error = self::error::ConversionError;
2885        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2886            value.parse()
2887        }
2888    }
2889
2890    impl ::std::convert::TryFrom<&::std::string::String> for PublicMomentType {
2891        type Error = self::error::ConversionError;
2892        fn try_from(
2893            value: &::std::string::String,
2894        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2895            value.parse()
2896        }
2897    }
2898
2899    impl ::std::convert::TryFrom<::std::string::String> for PublicMomentType {
2900        type Error = self::error::ConversionError;
2901        fn try_from(
2902            value: ::std::string::String,
2903        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2904            value.parse()
2905        }
2906    }
2907
2908    #[doc = "Object defining readiness."]
2909    #[doc = r""]
2910    #[doc = r" <details><summary>JSON schema</summary>"]
2911    #[doc = r""]
2912    #[doc = r" ```json"]
2913    #[doc = "{"]
2914    #[doc = "  \"title\": \"PublicReadiness\","]
2915    #[doc = "  \"description\": \"Object defining readiness.\","]
2916    #[doc = "  \"type\": \"object\","]
2917    #[doc = "  \"required\": ["]
2918    #[doc = "    \"contributors\""]
2919    #[doc = "  ],"]
2920    #[doc = "  \"properties\": {"]
2921    #[doc = "    \"contributors\": {"]
2922    #[doc = "      \"$ref\": \"#/components/schemas/PublicReadinessContributors\""]
2923    #[doc = "    },"]
2924    #[doc = "    \"score\": {"]
2925    #[doc = "      \"title\": \"\","]
2926    #[doc = "      \"description\": \"Readiness score in range [1, 100].\","]
2927    #[doc = "      \"type\": ["]
2928    #[doc = "        \"integer\","]
2929    #[doc = "        \"null\""]
2930    #[doc = "      ]"]
2931    #[doc = "    },"]
2932    #[doc = "    \"temperature_deviation\": {"]
2933    #[doc = "      \"title\": \"\","]
2934    #[doc = "      \"description\": \"Temperature deviation in degrees Celsius.\","]
2935    #[doc = "      \"type\": ["]
2936    #[doc = "        \"number\","]
2937    #[doc = "        \"null\""]
2938    #[doc = "      ]"]
2939    #[doc = "    },"]
2940    #[doc = "    \"temperature_trend_deviation\": {"]
2941    #[doc = "      \"title\": \"\","]
2942    #[doc = "      \"description\": \"Temperature trend deviation in degrees Celsius.\","]
2943    #[doc = "      \"type\": ["]
2944    #[doc = "        \"number\","]
2945    #[doc = "        \"null\""]
2946    #[doc = "      ]"]
2947    #[doc = "    }"]
2948    #[doc = "  }"]
2949    #[doc = "}"]
2950    #[doc = r" ```"]
2951    #[doc = r" </details>"]
2952    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2953    pub struct PublicReadiness {
2954        pub contributors: PublicReadinessContributors,
2955        #[doc = "Readiness score in range [1, 100]."]
2956        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2957        pub score: ::std::option::Option<i64>,
2958        #[doc = "Temperature deviation in degrees Celsius."]
2959        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2960        pub temperature_deviation: ::std::option::Option<f64>,
2961        #[doc = "Temperature trend deviation in degrees Celsius."]
2962        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2963        pub temperature_trend_deviation: ::std::option::Option<f64>,
2964    }
2965
2966    #[doc = "Object defining readiness score contributors."]
2967    #[doc = r""]
2968    #[doc = r" <details><summary>JSON schema</summary>"]
2969    #[doc = r""]
2970    #[doc = r" ```json"]
2971    #[doc = "{"]
2972    #[doc = "  \"title\": \"PublicReadinessContributors\","]
2973    #[doc = "  \"description\": \"Object defining readiness score contributors.\","]
2974    #[doc = "  \"type\": \"object\","]
2975    #[doc = "  \"properties\": {"]
2976    #[doc = "    \"activity_balance\": {"]
2977    #[doc = "      \"title\": \"\","]
2978    #[doc = "      \"description\": \"Contribution of cumulative activity balance in range [1, 100].\","]
2979    #[doc = "      \"type\": ["]
2980    #[doc = "        \"integer\","]
2981    #[doc = "        \"null\""]
2982    #[doc = "      ]"]
2983    #[doc = "    },"]
2984    #[doc = "    \"body_temperature\": {"]
2985    #[doc = "      \"title\": \"\","]
2986    #[doc = "      \"description\": \"Contribution of body temperature in range [1, 100].\","]
2987    #[doc = "      \"type\": ["]
2988    #[doc = "        \"integer\","]
2989    #[doc = "        \"null\""]
2990    #[doc = "      ]"]
2991    #[doc = "    },"]
2992    #[doc = "    \"hrv_balance\": {"]
2993    #[doc = "      \"title\": \"\","]
2994    #[doc = "      \"description\": \"Contribution of heart rate variability balance in range [1, 100].\","]
2995    #[doc = "      \"type\": ["]
2996    #[doc = "        \"integer\","]
2997    #[doc = "        \"null\""]
2998    #[doc = "      ]"]
2999    #[doc = "    },"]
3000    #[doc = "    \"previous_day_activity\": {"]
3001    #[doc = "      \"title\": \"\","]
3002    #[doc = "      \"description\": \"Contribution of previous day's activity in range [1, 100].\","]
3003    #[doc = "      \"type\": ["]
3004    #[doc = "        \"integer\","]
3005    #[doc = "        \"null\""]
3006    #[doc = "      ]"]
3007    #[doc = "    },"]
3008    #[doc = "    \"previous_night\": {"]
3009    #[doc = "      \"title\": \"\","]
3010    #[doc = "      \"description\": \"Contribution of previous night's sleep in range [1, 100].\","]
3011    #[doc = "      \"type\": ["]
3012    #[doc = "        \"integer\","]
3013    #[doc = "        \"null\""]
3014    #[doc = "      ]"]
3015    #[doc = "    },"]
3016    #[doc = "    \"recovery_index\": {"]
3017    #[doc = "      \"title\": \"\","]
3018    #[doc = "      \"description\": \"Contribution of recovery index in range [1, 100].\","]
3019    #[doc = "      \"type\": ["]
3020    #[doc = "        \"integer\","]
3021    #[doc = "        \"null\""]
3022    #[doc = "      ]"]
3023    #[doc = "    },"]
3024    #[doc = "    \"resting_heart_rate\": {"]
3025    #[doc = "      \"title\": \"\","]
3026    #[doc = "      \"description\": \"Contribution of resting heart rate in range [1, 100].\","]
3027    #[doc = "      \"type\": ["]
3028    #[doc = "        \"integer\","]
3029    #[doc = "        \"null\""]
3030    #[doc = "      ]"]
3031    #[doc = "    },"]
3032    #[doc = "    \"sleep_balance\": {"]
3033    #[doc = "      \"title\": \"\","]
3034    #[doc = "      \"description\": \"Contribution of sleep balance in range [1, 100].\","]
3035    #[doc = "      \"type\": ["]
3036    #[doc = "        \"integer\","]
3037    #[doc = "        \"null\""]
3038    #[doc = "      ]"]
3039    #[doc = "    },"]
3040    #[doc = "    \"sleep_regularity\": {"]
3041    #[doc = "      \"title\": \"\","]
3042    #[doc = "      \"description\": \"Contribution of sleep regularity in range [1, 100].\","]
3043    #[doc = "      \"type\": ["]
3044    #[doc = "        \"integer\","]
3045    #[doc = "        \"null\""]
3046    #[doc = "      ]"]
3047    #[doc = "    }"]
3048    #[doc = "  }"]
3049    #[doc = "}"]
3050    #[doc = r" ```"]
3051    #[doc = r" </details>"]
3052    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3053    pub struct PublicReadinessContributors {
3054        #[doc = "Contribution of cumulative activity balance in range [1, 100]."]
3055        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3056        pub activity_balance: ::std::option::Option<i64>,
3057        #[doc = "Contribution of body temperature in range [1, 100]."]
3058        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3059        pub body_temperature: ::std::option::Option<i64>,
3060        #[doc = "Contribution of heart rate variability balance in range [1, 100]."]
3061        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3062        pub hrv_balance: ::std::option::Option<i64>,
3063        #[doc = "Contribution of previous day's activity in range [1, 100]."]
3064        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3065        pub previous_day_activity: ::std::option::Option<i64>,
3066        #[doc = "Contribution of previous night's sleep in range [1, 100]."]
3067        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3068        pub previous_night: ::std::option::Option<i64>,
3069        #[doc = "Contribution of recovery index in range [1, 100]."]
3070        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3071        pub recovery_index: ::std::option::Option<i64>,
3072        #[doc = "Contribution of resting heart rate in range [1, 100]."]
3073        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3074        pub resting_heart_rate: ::std::option::Option<i64>,
3075        #[doc = "Contribution of sleep balance in range [1, 100]."]
3076        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3077        pub sleep_balance: ::std::option::Option<i64>,
3078        #[doc = "Contribution of sleep regularity in range [1, 100]."]
3079        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3080        pub sleep_regularity: ::std::option::Option<i64>,
3081    }
3082
3083    impl ::std::default::Default for PublicReadinessContributors {
3084        fn default() -> Self {
3085            Self {
3086                activity_balance: Default::default(),
3087                body_temperature: Default::default(),
3088                hrv_balance: Default::default(),
3089                previous_day_activity: Default::default(),
3090                previous_night: Default::default(),
3091                recovery_index: Default::default(),
3092                resting_heart_rate: Default::default(),
3093                sleep_balance: Default::default(),
3094                sleep_regularity: Default::default(),
3095            }
3096        }
3097    }
3098
3099    #[doc = "Object defining a public Rest Mode episode."]
3100    #[doc = r""]
3101    #[doc = r" <details><summary>JSON schema</summary>"]
3102    #[doc = r""]
3103    #[doc = r" ```json"]
3104    #[doc = "{"]
3105    #[doc = "  \"title\": \"PublicRestModeEpisode\","]
3106    #[doc = "  \"description\": \"Object defining a public Rest Mode episode.\","]
3107    #[doc = "  \"type\": \"object\","]
3108    #[doc = "  \"required\": ["]
3109    #[doc = "    \"tags\","]
3110    #[doc = "    \"timestamp\""]
3111    #[doc = "  ],"]
3112    #[doc = "  \"properties\": {"]
3113    #[doc = "    \"tags\": {"]
3114    #[doc = "      \"title\": \"\","]
3115    #[doc = "      \"description\": \"Tags selected for the episode.\","]
3116    #[doc = "      \"type\": \"array\","]
3117    #[doc = "      \"items\": {"]
3118    #[doc = "        \"type\": \"string\""]
3119    #[doc = "      }"]
3120    #[doc = "    },"]
3121    #[doc = "    \"timestamp\": {"]
3122    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
3123    #[doc = "    }"]
3124    #[doc = "  }"]
3125    #[doc = "}"]
3126    #[doc = r" ```"]
3127    #[doc = r" </details>"]
3128    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3129    pub struct PublicRestModeEpisode {
3130        #[doc = "Tags selected for the episode."]
3131        pub tags: ::std::vec::Vec<::std::string::String>,
3132        pub timestamp: LocalizedDateTime,
3133    }
3134
3135    #[doc = "Rest mode episode information."]
3136    #[doc = r""]
3137    #[doc = r" <details><summary>JSON schema</summary>"]
3138    #[doc = r""]
3139    #[doc = r" ```json"]
3140    #[doc = "{"]
3141    #[doc = "  \"title\": \"PublicRestModePeriod\","]
3142    #[doc = "  \"description\": \"Rest mode episode information.\","]
3143    #[doc = "  \"type\": \"object\","]
3144    #[doc = "  \"required\": ["]
3145    #[doc = "    \"episodes\","]
3146    #[doc = "    \"id\","]
3147    #[doc = "    \"start_day\""]
3148    #[doc = "  ],"]
3149    #[doc = "  \"properties\": {"]
3150    #[doc = "    \"end_day\": {"]
3151    #[doc = "      \"title\": \"\","]
3152    #[doc = "      \"description\": \"End date of rest mode.\","]
3153    #[doc = "      \"oneOf\": ["]
3154    #[doc = "        {"]
3155    #[doc = "          \"type\": \"null\""]
3156    #[doc = "        },"]
3157    #[doc = "        {"]
3158    #[doc = "          \"allOf\": ["]
3159    #[doc = "            {"]
3160    #[doc = "              \"$ref\": \"#/components/schemas/ISODate\""]
3161    #[doc = "            }"]
3162    #[doc = "          ]"]
3163    #[doc = "        }"]
3164    #[doc = "      ]"]
3165    #[doc = "    },"]
3166    #[doc = "    \"end_time\": {"]
3167    #[doc = "      \"title\": \"\","]
3168    #[doc = "      \"description\": \"Timestamp when rest mode ended.\","]
3169    #[doc = "      \"oneOf\": ["]
3170    #[doc = "        {"]
3171    #[doc = "          \"type\": \"null\""]
3172    #[doc = "        },"]
3173    #[doc = "        {"]
3174    #[doc = "          \"allOf\": ["]
3175    #[doc = "            {"]
3176    #[doc = "              \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
3177    #[doc = "            }"]
3178    #[doc = "          ]"]
3179    #[doc = "        }"]
3180    #[doc = "      ]"]
3181    #[doc = "    },"]
3182    #[doc = "    \"episodes\": {"]
3183    #[doc = "      \"title\": \"\","]
3184    #[doc = "      \"description\": \"Collection of episodes during rest mode, consisting of tags.\","]
3185    #[doc = "      \"type\": \"array\","]
3186    #[doc = "      \"items\": {"]
3187    #[doc = "        \"$ref\": \"#/components/schemas/PublicRestModeEpisode\""]
3188    #[doc = "      }"]
3189    #[doc = "    },"]
3190    #[doc = "    \"id\": {"]
3191    #[doc = "      \"title\": \"\","]
3192    #[doc = "      \"description\": \"Unique identifier of the object.\","]
3193    #[doc = "      \"type\": \"string\","]
3194    #[doc = "      \"minLength\": 1"]
3195    #[doc = "    },"]
3196    #[doc = "    \"start_day\": {"]
3197    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
3198    #[doc = "    },"]
3199    #[doc = "    \"start_time\": {"]
3200    #[doc = "      \"title\": \"\","]
3201    #[doc = "      \"description\": \"Timestamp when rest mode ended.\","]
3202    #[doc = "      \"oneOf\": ["]
3203    #[doc = "        {"]
3204    #[doc = "          \"type\": \"null\""]
3205    #[doc = "        },"]
3206    #[doc = "        {"]
3207    #[doc = "          \"allOf\": ["]
3208    #[doc = "            {"]
3209    #[doc = "              \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
3210    #[doc = "            }"]
3211    #[doc = "          ]"]
3212    #[doc = "        }"]
3213    #[doc = "      ]"]
3214    #[doc = "    }"]
3215    #[doc = "  },"]
3216    #[doc = "  \"x-cloud-only\": true,"]
3217    #[doc = "  \"x-collection\": \"publicrestmodeperiod\","]
3218    #[doc = "  \"x-owner\": \"sleep-squad\""]
3219    #[doc = "}"]
3220    #[doc = r" ```"]
3221    #[doc = r" </details>"]
3222    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3223    pub struct PublicRestModePeriod {
3224        #[doc = "End date of rest mode."]
3225        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3226        pub end_day: ::std::option::Option<IsoDate>,
3227        #[doc = "Timestamp when rest mode ended."]
3228        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3229        pub end_time: ::std::option::Option<LocalizedDateTime>,
3230        #[doc = "Collection of episodes during rest mode, consisting of tags."]
3231        pub episodes: ::std::vec::Vec<PublicRestModeEpisode>,
3232        #[doc = "Unique identifier of the object."]
3233        pub id: X,
3234        pub start_day: IsoDate,
3235        #[doc = "Timestamp when rest mode ended."]
3236        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3237        pub start_time: ::std::option::Option<LocalizedDateTime>,
3238    }
3239
3240    #[doc = "Object defining a ring battery level event."]
3241    #[doc = r""]
3242    #[doc = r" <details><summary>JSON schema</summary>"]
3243    #[doc = r""]
3244    #[doc = r" ```json"]
3245    #[doc = "{"]
3246    #[doc = "  \"title\": \"PublicRingBatteryLevelRow\","]
3247    #[doc = "  \"description\": \"Object defining a ring battery level event.\","]
3248    #[doc = "  \"type\": \"object\","]
3249    #[doc = "  \"required\": ["]
3250    #[doc = "    \"level\","]
3251    #[doc = "    \"timestamp\","]
3252    #[doc = "    \"timestamp_unix\""]
3253    #[doc = "  ],"]
3254    #[doc = "  \"properties\": {"]
3255    #[doc = "    \"charging\": {"]
3256    #[doc = "      \"title\": \"\","]
3257    #[doc = "      \"description\": \"Flag indicating if the ring was charging.\","]
3258    #[doc = "      \"type\": ["]
3259    #[doc = "        \"boolean\","]
3260    #[doc = "        \"null\""]
3261    #[doc = "      ]"]
3262    #[doc = "    },"]
3263    #[doc = "    \"in_charger\": {"]
3264    #[doc = "      \"title\": \"\","]
3265    #[doc = "      \"description\": \"Flag indicating if the ring was in charger.\","]
3266    #[doc = "      \"type\": ["]
3267    #[doc = "        \"boolean\","]
3268    #[doc = "        \"null\""]
3269    #[doc = "      ]"]
3270    #[doc = "    },"]
3271    #[doc = "    \"level\": {"]
3272    #[doc = "      \"title\": \"\","]
3273    #[doc = "      \"description\": \"Ring battery level percentage. These values are within [0, 100].\","]
3274    #[doc = "      \"type\": \"integer\""]
3275    #[doc = "    },"]
3276    #[doc = "    \"timestamp\": {"]
3277    #[doc = "      \"$ref\": \"#/components/schemas/UtcDateTime\""]
3278    #[doc = "    },"]
3279    #[doc = "    \"timestamp_unix\": {"]
3280    #[doc = "      \"title\": \"\","]
3281    #[doc = "      \"description\": \"Timestamp of the discrete sample as unix time in milliseconds.\","]
3282    #[doc = "      \"type\": \"integer\""]
3283    #[doc = "    }"]
3284    #[doc = "  },"]
3285    #[doc = "  \"x-cloud-only\": true,"]
3286    #[doc = "  \"x-collection\": \"publicringbatterylevel\","]
3287    #[doc = "  \"x-owner\": \"connectivity-squad\""]
3288    #[doc = "}"]
3289    #[doc = r" ```"]
3290    #[doc = r" </details>"]
3291    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3292    pub struct PublicRingBatteryLevelRow {
3293        #[doc = "Flag indicating if the ring was charging."]
3294        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3295        pub charging: ::std::option::Option<bool>,
3296        #[doc = "Flag indicating if the ring was in charger."]
3297        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3298        pub in_charger: ::std::option::Option<bool>,
3299        #[doc = "Ring battery level percentage. These values are within [0, 100]."]
3300        pub level: i64,
3301        pub timestamp: UtcDateTime,
3302        #[doc = "Timestamp of the discrete sample as unix time in milliseconds."]
3303        pub timestamp_unix: i64,
3304    }
3305
3306    #[doc = "Possible ring colors."]
3307    #[doc = r""]
3308    #[doc = r" <details><summary>JSON schema</summary>"]
3309    #[doc = r""]
3310    #[doc = r" ```json"]
3311    #[doc = "{"]
3312    #[doc = "  \"title\": \"PublicRingColor\","]
3313    #[doc = "  \"description\": \"Possible ring colors.\","]
3314    #[doc = "  \"type\": \"string\","]
3315    #[doc = "  \"enum\": ["]
3316    #[doc = "    \"brushed_silver\","]
3317    #[doc = "    \"glossy_black\","]
3318    #[doc = "    \"glossy_gold\","]
3319    #[doc = "    \"glossy_white\","]
3320    #[doc = "    \"gucci\","]
3321    #[doc = "    \"matt_gold\","]
3322    #[doc = "    \"rose\","]
3323    #[doc = "    \"silver\","]
3324    #[doc = "    \"stealth_black\","]
3325    #[doc = "    \"titanium\","]
3326    #[doc = "    \"titanium_and_gold\","]
3327    #[doc = "    \"cloud\","]
3328    #[doc = "    \"petal\","]
3329    #[doc = "    \"midnight\","]
3330    #[doc = "    \"tide\","]
3331    #[doc = "    \"deep_rose\""]
3332    #[doc = "  ]"]
3333    #[doc = "}"]
3334    #[doc = r" ```"]
3335    #[doc = r" </details>"]
3336    #[derive(
3337        :: serde :: Deserialize,
3338        :: serde :: Serialize,
3339        Clone,
3340        Copy,
3341        Debug,
3342        Eq,
3343        Hash,
3344        Ord,
3345        PartialEq,
3346        PartialOrd,
3347    )]
3348    pub enum PublicRingColor {
3349        #[serde(rename = "brushed_silver")]
3350        BrushedSilver,
3351        #[serde(rename = "glossy_black")]
3352        GlossyBlack,
3353        #[serde(rename = "glossy_gold")]
3354        GlossyGold,
3355        #[serde(rename = "glossy_white")]
3356        GlossyWhite,
3357        #[serde(rename = "gucci")]
3358        Gucci,
3359        #[serde(rename = "matt_gold")]
3360        MattGold,
3361        #[serde(rename = "rose")]
3362        Rose,
3363        #[serde(rename = "silver")]
3364        Silver,
3365        #[serde(rename = "stealth_black")]
3366        StealthBlack,
3367        #[serde(rename = "titanium")]
3368        Titanium,
3369        #[serde(rename = "titanium_and_gold")]
3370        TitaniumAndGold,
3371        #[serde(rename = "cloud")]
3372        Cloud,
3373        #[serde(rename = "petal")]
3374        Petal,
3375        #[serde(rename = "midnight")]
3376        Midnight,
3377        #[serde(rename = "tide")]
3378        Tide,
3379        #[serde(rename = "deep_rose")]
3380        DeepRose,
3381    }
3382
3383    impl ::std::fmt::Display for PublicRingColor {
3384        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3385            match *self {
3386                Self::BrushedSilver => f.write_str("brushed_silver"),
3387                Self::GlossyBlack => f.write_str("glossy_black"),
3388                Self::GlossyGold => f.write_str("glossy_gold"),
3389                Self::GlossyWhite => f.write_str("glossy_white"),
3390                Self::Gucci => f.write_str("gucci"),
3391                Self::MattGold => f.write_str("matt_gold"),
3392                Self::Rose => f.write_str("rose"),
3393                Self::Silver => f.write_str("silver"),
3394                Self::StealthBlack => f.write_str("stealth_black"),
3395                Self::Titanium => f.write_str("titanium"),
3396                Self::TitaniumAndGold => f.write_str("titanium_and_gold"),
3397                Self::Cloud => f.write_str("cloud"),
3398                Self::Petal => f.write_str("petal"),
3399                Self::Midnight => f.write_str("midnight"),
3400                Self::Tide => f.write_str("tide"),
3401                Self::DeepRose => f.write_str("deep_rose"),
3402            }
3403        }
3404    }
3405
3406    impl ::std::str::FromStr for PublicRingColor {
3407        type Err = self::error::ConversionError;
3408        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3409            match value {
3410                "brushed_silver" => Ok(Self::BrushedSilver),
3411                "glossy_black" => Ok(Self::GlossyBlack),
3412                "glossy_gold" => Ok(Self::GlossyGold),
3413                "glossy_white" => Ok(Self::GlossyWhite),
3414                "gucci" => Ok(Self::Gucci),
3415                "matt_gold" => Ok(Self::MattGold),
3416                "rose" => Ok(Self::Rose),
3417                "silver" => Ok(Self::Silver),
3418                "stealth_black" => Ok(Self::StealthBlack),
3419                "titanium" => Ok(Self::Titanium),
3420                "titanium_and_gold" => Ok(Self::TitaniumAndGold),
3421                "cloud" => Ok(Self::Cloud),
3422                "petal" => Ok(Self::Petal),
3423                "midnight" => Ok(Self::Midnight),
3424                "tide" => Ok(Self::Tide),
3425                "deep_rose" => Ok(Self::DeepRose),
3426                _ => Err("invalid value".into()),
3427            }
3428        }
3429    }
3430
3431    impl ::std::convert::TryFrom<&str> for PublicRingColor {
3432        type Error = self::error::ConversionError;
3433        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3434            value.parse()
3435        }
3436    }
3437
3438    impl ::std::convert::TryFrom<&::std::string::String> for PublicRingColor {
3439        type Error = self::error::ConversionError;
3440        fn try_from(
3441            value: &::std::string::String,
3442        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3443            value.parse()
3444        }
3445    }
3446
3447    impl ::std::convert::TryFrom<::std::string::String> for PublicRingColor {
3448        type Error = self::error::ConversionError;
3449        fn try_from(
3450            value: ::std::string::String,
3451        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3452            value.parse()
3453        }
3454    }
3455
3456    #[doc = "Ring configuration."]
3457    #[doc = r""]
3458    #[doc = r" <details><summary>JSON schema</summary>"]
3459    #[doc = r""]
3460    #[doc = r" ```json"]
3461    #[doc = "{"]
3462    #[doc = "  \"title\": \"PublicRingConfiguration\","]
3463    #[doc = "  \"description\": \"Ring configuration.\","]
3464    #[doc = "  \"type\": \"object\","]
3465    #[doc = "  \"required\": ["]
3466    #[doc = "    \"id\""]
3467    #[doc = "  ],"]
3468    #[doc = "  \"properties\": {"]
3469    #[doc = "    \"color\": {"]
3470    #[doc = "      \"title\": \"\","]
3471    #[doc = "      \"description\": \"Color of the ring.\","]
3472    #[doc = "      \"oneOf\": ["]
3473    #[doc = "        {"]
3474    #[doc = "          \"type\": \"null\""]
3475    #[doc = "        },"]
3476    #[doc = "        {"]
3477    #[doc = "          \"allOf\": ["]
3478    #[doc = "            {"]
3479    #[doc = "              \"$ref\": \"#/components/schemas/PublicRingColor\""]
3480    #[doc = "            }"]
3481    #[doc = "          ]"]
3482    #[doc = "        }"]
3483    #[doc = "      ]"]
3484    #[doc = "    },"]
3485    #[doc = "    \"design\": {"]
3486    #[doc = "      \"title\": \"\","]
3487    #[doc = "      \"description\": \"Design of the ring.\","]
3488    #[doc = "      \"oneOf\": ["]
3489    #[doc = "        {"]
3490    #[doc = "          \"type\": \"null\""]
3491    #[doc = "        },"]
3492    #[doc = "        {"]
3493    #[doc = "          \"allOf\": ["]
3494    #[doc = "            {"]
3495    #[doc = "              \"$ref\": \"#/components/schemas/PublicRingDesign\""]
3496    #[doc = "            }"]
3497    #[doc = "          ]"]
3498    #[doc = "        }"]
3499    #[doc = "      ]"]
3500    #[doc = "    },"]
3501    #[doc = "    \"firmware_version\": {"]
3502    #[doc = "      \"title\": \"\","]
3503    #[doc = "      \"description\": \"Firmware version of the ring.\","]
3504    #[doc = "      \"type\": ["]
3505    #[doc = "        \"string\","]
3506    #[doc = "        \"null\""]
3507    #[doc = "      ]"]
3508    #[doc = "    },"]
3509    #[doc = "    \"hardware_type\": {"]
3510    #[doc = "      \"title\": \"\","]
3511    #[doc = "      \"description\": \"Hardware type of the ring.\","]
3512    #[doc = "      \"oneOf\": ["]
3513    #[doc = "        {"]
3514    #[doc = "          \"type\": \"null\""]
3515    #[doc = "        },"]
3516    #[doc = "        {"]
3517    #[doc = "          \"allOf\": ["]
3518    #[doc = "            {"]
3519    #[doc = "              \"$ref\": \"#/components/schemas/PublicRingHardwareType\""]
3520    #[doc = "            }"]
3521    #[doc = "          ]"]
3522    #[doc = "        }"]
3523    #[doc = "      ]"]
3524    #[doc = "    },"]
3525    #[doc = "    \"id\": {"]
3526    #[doc = "      \"title\": \"\","]
3527    #[doc = "      \"description\": \"Unique identifier of the object.\","]
3528    #[doc = "      \"type\": \"string\","]
3529    #[doc = "      \"minLength\": 1"]
3530    #[doc = "    },"]
3531    #[doc = "    \"set_up_at\": {"]
3532    #[doc = "      \"title\": \"\","]
3533    #[doc = "      \"description\": \"UTC timestamp indicating when the ring was set up.\","]
3534    #[doc = "      \"oneOf\": ["]
3535    #[doc = "        {"]
3536    #[doc = "          \"type\": \"null\""]
3537    #[doc = "        },"]
3538    #[doc = "        {"]
3539    #[doc = "          \"allOf\": ["]
3540    #[doc = "            {"]
3541    #[doc = "              \"$ref\": \"#/components/schemas/UtcDateTime\""]
3542    #[doc = "            }"]
3543    #[doc = "          ]"]
3544    #[doc = "        }"]
3545    #[doc = "      ]"]
3546    #[doc = "    },"]
3547    #[doc = "    \"size\": {"]
3548    #[doc = "      \"title\": \"\","]
3549    #[doc = "      \"description\": \"US size of the ring.\","]
3550    #[doc = "      \"type\": ["]
3551    #[doc = "        \"integer\","]
3552    #[doc = "        \"null\""]
3553    #[doc = "      ]"]
3554    #[doc = "    }"]
3555    #[doc = "  },"]
3556    #[doc = "  \"x-cloud-only\": true,"]
3557    #[doc = "  \"x-collection\": \"publicringconfiguration\","]
3558    #[doc = "  \"x-owner\": \"connectivity-squad\""]
3559    #[doc = "}"]
3560    #[doc = r" ```"]
3561    #[doc = r" </details>"]
3562    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3563    pub struct PublicRingConfiguration {
3564        #[doc = "Color of the ring."]
3565        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3566        pub color: ::std::option::Option<PublicRingColor>,
3567        #[doc = "Design of the ring."]
3568        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3569        pub design: ::std::option::Option<PublicRingDesign>,
3570        #[doc = "Firmware version of the ring."]
3571        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3572        pub firmware_version: ::std::option::Option<::std::string::String>,
3573        #[doc = "Hardware type of the ring."]
3574        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3575        pub hardware_type: ::std::option::Option<PublicRingHardwareType>,
3576        #[doc = "Unique identifier of the object."]
3577        pub id: X,
3578        #[doc = "UTC timestamp indicating when the ring was set up."]
3579        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3580        pub set_up_at: ::std::option::Option<UtcDateTime>,
3581        #[doc = "US size of the ring."]
3582        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3583        pub size: ::std::option::Option<i64>,
3584    }
3585
3586    #[doc = "Possible ring designs."]
3587    #[doc = r""]
3588    #[doc = r" <details><summary>JSON schema</summary>"]
3589    #[doc = r""]
3590    #[doc = r" ```json"]
3591    #[doc = "{"]
3592    #[doc = "  \"title\": \"PublicRingDesign\","]
3593    #[doc = "  \"description\": \"Possible ring designs.\","]
3594    #[doc = "  \"type\": \"string\","]
3595    #[doc = "  \"enum\": ["]
3596    #[doc = "    \"heritage\","]
3597    #[doc = "    \"balance\","]
3598    #[doc = "    \"balance_diamond\","]
3599    #[doc = "    \"horizon\","]
3600    #[doc = "    \"ceramic\""]
3601    #[doc = "  ]"]
3602    #[doc = "}"]
3603    #[doc = r" ```"]
3604    #[doc = r" </details>"]
3605    #[derive(
3606        :: serde :: Deserialize,
3607        :: serde :: Serialize,
3608        Clone,
3609        Copy,
3610        Debug,
3611        Eq,
3612        Hash,
3613        Ord,
3614        PartialEq,
3615        PartialOrd,
3616    )]
3617    pub enum PublicRingDesign {
3618        #[serde(rename = "heritage")]
3619        Heritage,
3620        #[serde(rename = "balance")]
3621        Balance,
3622        #[serde(rename = "balance_diamond")]
3623        BalanceDiamond,
3624        #[serde(rename = "horizon")]
3625        Horizon,
3626        #[serde(rename = "ceramic")]
3627        Ceramic,
3628    }
3629
3630    impl ::std::fmt::Display for PublicRingDesign {
3631        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3632            match *self {
3633                Self::Heritage => f.write_str("heritage"),
3634                Self::Balance => f.write_str("balance"),
3635                Self::BalanceDiamond => f.write_str("balance_diamond"),
3636                Self::Horizon => f.write_str("horizon"),
3637                Self::Ceramic => f.write_str("ceramic"),
3638            }
3639        }
3640    }
3641
3642    impl ::std::str::FromStr for PublicRingDesign {
3643        type Err = self::error::ConversionError;
3644        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3645            match value {
3646                "heritage" => Ok(Self::Heritage),
3647                "balance" => Ok(Self::Balance),
3648                "balance_diamond" => Ok(Self::BalanceDiamond),
3649                "horizon" => Ok(Self::Horizon),
3650                "ceramic" => Ok(Self::Ceramic),
3651                _ => Err("invalid value".into()),
3652            }
3653        }
3654    }
3655
3656    impl ::std::convert::TryFrom<&str> for PublicRingDesign {
3657        type Error = self::error::ConversionError;
3658        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3659            value.parse()
3660        }
3661    }
3662
3663    impl ::std::convert::TryFrom<&::std::string::String> for PublicRingDesign {
3664        type Error = self::error::ConversionError;
3665        fn try_from(
3666            value: &::std::string::String,
3667        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3668            value.parse()
3669        }
3670    }
3671
3672    impl ::std::convert::TryFrom<::std::string::String> for PublicRingDesign {
3673        type Error = self::error::ConversionError;
3674        fn try_from(
3675            value: ::std::string::String,
3676        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3677            value.parse()
3678        }
3679    }
3680
3681    #[doc = "Possible ring hardware types."]
3682    #[doc = r""]
3683    #[doc = r" <details><summary>JSON schema</summary>"]
3684    #[doc = r""]
3685    #[doc = r" ```json"]
3686    #[doc = "{"]
3687    #[doc = "  \"title\": \"PublicRingHardwareType\","]
3688    #[doc = "  \"description\": \"Possible ring hardware types.\","]
3689    #[doc = "  \"type\": \"string\","]
3690    #[doc = "  \"enum\": ["]
3691    #[doc = "    \"gen1\","]
3692    #[doc = "    \"gen2\","]
3693    #[doc = "    \"gen2m\","]
3694    #[doc = "    \"gen3\","]
3695    #[doc = "    \"gen4\","]
3696    #[doc = "    \"or5\""]
3697    #[doc = "  ]"]
3698    #[doc = "}"]
3699    #[doc = r" ```"]
3700    #[doc = r" </details>"]
3701    #[derive(
3702        :: serde :: Deserialize,
3703        :: serde :: Serialize,
3704        Clone,
3705        Copy,
3706        Debug,
3707        Eq,
3708        Hash,
3709        Ord,
3710        PartialEq,
3711        PartialOrd,
3712    )]
3713    pub enum PublicRingHardwareType {
3714        #[serde(rename = "gen1")]
3715        Gen1,
3716        #[serde(rename = "gen2")]
3717        Gen2,
3718        #[serde(rename = "gen2m")]
3719        Gen2m,
3720        #[serde(rename = "gen3")]
3721        Gen3,
3722        #[serde(rename = "gen4")]
3723        Gen4,
3724        #[serde(rename = "or5")]
3725        Or5,
3726    }
3727
3728    impl ::std::fmt::Display for PublicRingHardwareType {
3729        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3730            match *self {
3731                Self::Gen1 => f.write_str("gen1"),
3732                Self::Gen2 => f.write_str("gen2"),
3733                Self::Gen2m => f.write_str("gen2m"),
3734                Self::Gen3 => f.write_str("gen3"),
3735                Self::Gen4 => f.write_str("gen4"),
3736                Self::Or5 => f.write_str("or5"),
3737            }
3738        }
3739    }
3740
3741    impl ::std::str::FromStr for PublicRingHardwareType {
3742        type Err = self::error::ConversionError;
3743        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3744            match value {
3745                "gen1" => Ok(Self::Gen1),
3746                "gen2" => Ok(Self::Gen2),
3747                "gen2m" => Ok(Self::Gen2m),
3748                "gen3" => Ok(Self::Gen3),
3749                "gen4" => Ok(Self::Gen4),
3750                "or5" => Ok(Self::Or5),
3751                _ => Err("invalid value".into()),
3752            }
3753        }
3754    }
3755
3756    impl ::std::convert::TryFrom<&str> for PublicRingHardwareType {
3757        type Error = self::error::ConversionError;
3758        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3759            value.parse()
3760        }
3761    }
3762
3763    impl ::std::convert::TryFrom<&::std::string::String> for PublicRingHardwareType {
3764        type Error = self::error::ConversionError;
3765        fn try_from(
3766            value: &::std::string::String,
3767        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3768            value.parse()
3769        }
3770    }
3771
3772    impl ::std::convert::TryFrom<::std::string::String> for PublicRingHardwareType {
3773        type Error = self::error::ConversionError;
3774        fn try_from(
3775            value: ::std::string::String,
3776        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3777            value.parse()
3778        }
3779    }
3780
3781    #[doc = "Object defining a recorded sample."]
3782    #[doc = r""]
3783    #[doc = r" <details><summary>JSON schema</summary>"]
3784    #[doc = r""]
3785    #[doc = r" ```json"]
3786    #[doc = "{"]
3787    #[doc = "  \"title\": \"PublicSample\","]
3788    #[doc = "  \"description\": \"Object defining a recorded sample.\","]
3789    #[doc = "  \"type\": \"object\","]
3790    #[doc = "  \"required\": ["]
3791    #[doc = "    \"interval\","]
3792    #[doc = "    \"items\","]
3793    #[doc = "    \"timestamp\""]
3794    #[doc = "  ],"]
3795    #[doc = "  \"properties\": {"]
3796    #[doc = "    \"interval\": {"]
3797    #[doc = "      \"title\": \"\","]
3798    #[doc = "      \"description\": \"Interval in seconds between the sampled items.\","]
3799    #[doc = "      \"type\": \"number\""]
3800    #[doc = "    },"]
3801    #[doc = "    \"items\": {"]
3802    #[doc = "      \"$ref\": \"#/components/schemas/Array_Union_float__NoneType__Bits64_\""]
3803    #[doc = "    },"]
3804    #[doc = "    \"timestamp\": {"]
3805    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
3806    #[doc = "    }"]
3807    #[doc = "  }"]
3808    #[doc = "}"]
3809    #[doc = r" ```"]
3810    #[doc = r" </details>"]
3811    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3812    pub struct PublicSample {
3813        #[doc = "Interval in seconds between the sampled items."]
3814        pub interval: f64,
3815        pub items: ArrayUnionFloatNoneTypeBits64,
3816        pub timestamp: LocalizedDateTime,
3817    }
3818
3819    #[doc = "Public model defining a recorded Session."]
3820    #[doc = r""]
3821    #[doc = r" <details><summary>JSON schema</summary>"]
3822    #[doc = r""]
3823    #[doc = r" ```json"]
3824    #[doc = "{"]
3825    #[doc = "  \"title\": \"PublicSession\","]
3826    #[doc = "  \"description\": \"Public model defining a recorded Session.\","]
3827    #[doc = "  \"type\": \"object\","]
3828    #[doc = "  \"required\": ["]
3829    #[doc = "    \"day\","]
3830    #[doc = "    \"end_datetime\","]
3831    #[doc = "    \"id\","]
3832    #[doc = "    \"start_datetime\","]
3833    #[doc = "    \"type\""]
3834    #[doc = "  ],"]
3835    #[doc = "  \"properties\": {"]
3836    #[doc = "    \"day\": {"]
3837    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
3838    #[doc = "    },"]
3839    #[doc = "    \"end_datetime\": {"]
3840    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
3841    #[doc = "    },"]
3842    #[doc = "    \"heart_rate\": {"]
3843    #[doc = "      \"title\": \"\","]
3844    #[doc = "      \"description\": \"Recorded heart rate samples during the Moment.\","]
3845    #[doc = "      \"oneOf\": ["]
3846    #[doc = "        {"]
3847    #[doc = "          \"type\": \"null\""]
3848    #[doc = "        },"]
3849    #[doc = "        {"]
3850    #[doc = "          \"allOf\": ["]
3851    #[doc = "            {"]
3852    #[doc = "              \"$ref\": \"#/components/schemas/PublicSample\""]
3853    #[doc = "            }"]
3854    #[doc = "          ]"]
3855    #[doc = "        }"]
3856    #[doc = "      ]"]
3857    #[doc = "    },"]
3858    #[doc = "    \"heart_rate_variability\": {"]
3859    #[doc = "      \"title\": \"\","]
3860    #[doc = "      \"description\": \"Recorded heart rate variability samples during the Moment.\","]
3861    #[doc = "      \"oneOf\": ["]
3862    #[doc = "        {"]
3863    #[doc = "          \"type\": \"null\""]
3864    #[doc = "        },"]
3865    #[doc = "        {"]
3866    #[doc = "          \"allOf\": ["]
3867    #[doc = "            {"]
3868    #[doc = "              \"$ref\": \"#/components/schemas/PublicSample\""]
3869    #[doc = "            }"]
3870    #[doc = "          ]"]
3871    #[doc = "        }"]
3872    #[doc = "      ]"]
3873    #[doc = "    },"]
3874    #[doc = "    \"id\": {"]
3875    #[doc = "      \"title\": \"\","]
3876    #[doc = "      \"description\": \"Unique identifier of the object.\","]
3877    #[doc = "      \"type\": \"string\","]
3878    #[doc = "      \"minLength\": 1"]
3879    #[doc = "    },"]
3880    #[doc = "    \"mood\": {"]
3881    #[doc = "      \"title\": \"\","]
3882    #[doc = "      \"description\": \"User-selected mood for the Moment.\","]
3883    #[doc = "      \"oneOf\": ["]
3884    #[doc = "        {"]
3885    #[doc = "          \"type\": \"null\""]
3886    #[doc = "        },"]
3887    #[doc = "        {"]
3888    #[doc = "          \"allOf\": ["]
3889    #[doc = "            {"]
3890    #[doc = "              \"$ref\": \"#/components/schemas/PublicMomentMood\""]
3891    #[doc = "            }"]
3892    #[doc = "          ]"]
3893    #[doc = "        }"]
3894    #[doc = "      ]"]
3895    #[doc = "    },"]
3896    #[doc = "    \"motion_count\": {"]
3897    #[doc = "      \"title\": \"\","]
3898    #[doc = "      \"description\": \"Recorded motion count samples during the Moment.\","]
3899    #[doc = "      \"oneOf\": ["]
3900    #[doc = "        {"]
3901    #[doc = "          \"type\": \"null\""]
3902    #[doc = "        },"]
3903    #[doc = "        {"]
3904    #[doc = "          \"allOf\": ["]
3905    #[doc = "            {"]
3906    #[doc = "              \"$ref\": \"#/components/schemas/PublicSample\""]
3907    #[doc = "            }"]
3908    #[doc = "          ]"]
3909    #[doc = "        }"]
3910    #[doc = "      ]"]
3911    #[doc = "    },"]
3912    #[doc = "    \"start_datetime\": {"]
3913    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
3914    #[doc = "    },"]
3915    #[doc = "    \"type\": {"]
3916    #[doc = "      \"$ref\": \"#/components/schemas/PublicMomentType\""]
3917    #[doc = "    }"]
3918    #[doc = "  },"]
3919    #[doc = "  \"x-cloud-only\": true,"]
3920    #[doc = "  \"x-collection\": \"publicsession\","]
3921    #[doc = "  \"x-owner\": \"wellbeing-squad\""]
3922    #[doc = "}"]
3923    #[doc = r" ```"]
3924    #[doc = r" </details>"]
3925    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3926    pub struct PublicSession {
3927        pub day: IsoDate,
3928        pub end_datetime: LocalizedDateTime,
3929        #[doc = "Recorded heart rate samples during the Moment."]
3930        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3931        pub heart_rate: ::std::option::Option<PublicSample>,
3932        #[doc = "Recorded heart rate variability samples during the Moment."]
3933        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3934        pub heart_rate_variability: ::std::option::Option<PublicSample>,
3935        #[doc = "Unique identifier of the object."]
3936        pub id: X,
3937        #[doc = "User-selected mood for the Moment."]
3938        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3939        pub mood: ::std::option::Option<PublicMomentMood>,
3940        #[doc = "Recorded motion count samples during the Moment."]
3941        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3942        pub motion_count: ::std::option::Option<PublicSample>,
3943        pub start_datetime: LocalizedDateTime,
3944        #[serde(rename = "type")]
3945        pub type_: PublicMomentType,
3946    }
3947
3948    #[doc = "Oura Sleep Staging Algorithms.\nv1 = original aka legacy aka OSSA 1.0,\nv2 = latest sleep algorithm"]
3949    #[doc = r""]
3950    #[doc = r" <details><summary>JSON schema</summary>"]
3951    #[doc = r""]
3952    #[doc = r" ```json"]
3953    #[doc = "{"]
3954    #[doc = "  \"title\": \"PublicSleepAlgorithmVersion\","]
3955    #[doc = "  \"description\": \"Oura Sleep Staging Algorithms.\\nv1 = original aka legacy aka OSSA 1.0,\\nv2 = latest sleep algorithm\","]
3956    #[doc = "  \"type\": \"string\","]
3957    #[doc = "  \"enum\": ["]
3958    #[doc = "    \"v1\","]
3959    #[doc = "    \"v2\""]
3960    #[doc = "  ]"]
3961    #[doc = "}"]
3962    #[doc = r" ```"]
3963    #[doc = r" </details>"]
3964    #[derive(
3965        :: serde :: Deserialize,
3966        :: serde :: Serialize,
3967        Clone,
3968        Copy,
3969        Debug,
3970        Eq,
3971        Hash,
3972        Ord,
3973        PartialEq,
3974        PartialOrd,
3975    )]
3976    pub enum PublicSleepAlgorithmVersion {
3977        #[serde(rename = "v1")]
3978        V1,
3979        #[serde(rename = "v2")]
3980        V2,
3981    }
3982
3983    impl ::std::fmt::Display for PublicSleepAlgorithmVersion {
3984        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3985            match *self {
3986                Self::V1 => f.write_str("v1"),
3987                Self::V2 => f.write_str("v2"),
3988            }
3989        }
3990    }
3991
3992    impl ::std::str::FromStr for PublicSleepAlgorithmVersion {
3993        type Err = self::error::ConversionError;
3994        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3995            match value {
3996                "v1" => Ok(Self::V1),
3997                "v2" => Ok(Self::V2),
3998                _ => Err("invalid value".into()),
3999            }
4000        }
4001    }
4002
4003    impl ::std::convert::TryFrom<&str> for PublicSleepAlgorithmVersion {
4004        type Error = self::error::ConversionError;
4005        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4006            value.parse()
4007        }
4008    }
4009
4010    impl ::std::convert::TryFrom<&::std::string::String> for PublicSleepAlgorithmVersion {
4011        type Error = self::error::ConversionError;
4012        fn try_from(
4013            value: &::std::string::String,
4014        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4015            value.parse()
4016        }
4017    }
4018
4019    impl ::std::convert::TryFrom<::std::string::String> for PublicSleepAlgorithmVersion {
4020        type Error = self::error::ConversionError;
4021        fn try_from(
4022            value: ::std::string::String,
4023        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4024            value.parse()
4025        }
4026    }
4027
4028    #[doc = "Possible sleep analysis reasons."]
4029    #[doc = r""]
4030    #[doc = r" <details><summary>JSON schema</summary>"]
4031    #[doc = r""]
4032    #[doc = r" ```json"]
4033    #[doc = "{"]
4034    #[doc = "  \"title\": \"PublicSleepAnalysisReason\","]
4035    #[doc = "  \"description\": \"Possible sleep analysis reasons.\","]
4036    #[doc = "  \"type\": \"string\","]
4037    #[doc = "  \"enum\": ["]
4038    #[doc = "    \"foreground_sleep_analysis\","]
4039    #[doc = "    \"bedtime_edit\","]
4040    #[doc = "    \"background_sleep_analysis\","]
4041    #[doc = "    \"background_created_foreground_updated\""]
4042    #[doc = "  ]"]
4043    #[doc = "}"]
4044    #[doc = r" ```"]
4045    #[doc = r" </details>"]
4046    #[derive(
4047        :: serde :: Deserialize,
4048        :: serde :: Serialize,
4049        Clone,
4050        Copy,
4051        Debug,
4052        Eq,
4053        Hash,
4054        Ord,
4055        PartialEq,
4056        PartialOrd,
4057    )]
4058    pub enum PublicSleepAnalysisReason {
4059        #[serde(rename = "foreground_sleep_analysis")]
4060        ForegroundSleepAnalysis,
4061        #[serde(rename = "bedtime_edit")]
4062        BedtimeEdit,
4063        #[serde(rename = "background_sleep_analysis")]
4064        BackgroundSleepAnalysis,
4065        #[serde(rename = "background_created_foreground_updated")]
4066        BackgroundCreatedForegroundUpdated,
4067    }
4068
4069    impl ::std::fmt::Display for PublicSleepAnalysisReason {
4070        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4071            match *self {
4072                Self::ForegroundSleepAnalysis => f.write_str("foreground_sleep_analysis"),
4073                Self::BedtimeEdit => f.write_str("bedtime_edit"),
4074                Self::BackgroundSleepAnalysis => f.write_str("background_sleep_analysis"),
4075                Self::BackgroundCreatedForegroundUpdated => {
4076                    f.write_str("background_created_foreground_updated")
4077                }
4078            }
4079        }
4080    }
4081
4082    impl ::std::str::FromStr for PublicSleepAnalysisReason {
4083        type Err = self::error::ConversionError;
4084        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4085            match value {
4086                "foreground_sleep_analysis" => Ok(Self::ForegroundSleepAnalysis),
4087                "bedtime_edit" => Ok(Self::BedtimeEdit),
4088                "background_sleep_analysis" => Ok(Self::BackgroundSleepAnalysis),
4089                "background_created_foreground_updated" => {
4090                    Ok(Self::BackgroundCreatedForegroundUpdated)
4091                }
4092                _ => Err("invalid value".into()),
4093            }
4094        }
4095    }
4096
4097    impl ::std::convert::TryFrom<&str> for PublicSleepAnalysisReason {
4098        type Error = self::error::ConversionError;
4099        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4100            value.parse()
4101        }
4102    }
4103
4104    impl ::std::convert::TryFrom<&::std::string::String> for PublicSleepAnalysisReason {
4105        type Error = self::error::ConversionError;
4106        fn try_from(
4107            value: &::std::string::String,
4108        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4109            value.parse()
4110        }
4111    }
4112
4113    impl ::std::convert::TryFrom<::std::string::String> for PublicSleepAnalysisReason {
4114        type Error = self::error::ConversionError;
4115        fn try_from(
4116            value: ::std::string::String,
4117        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4118            value.parse()
4119        }
4120    }
4121
4122    #[doc = "Object defining sleep score contributors."]
4123    #[doc = r""]
4124    #[doc = r" <details><summary>JSON schema</summary>"]
4125    #[doc = r""]
4126    #[doc = r" ```json"]
4127    #[doc = "{"]
4128    #[doc = "  \"title\": \"PublicSleepContributors\","]
4129    #[doc = "  \"description\": \"Object defining sleep score contributors.\","]
4130    #[doc = "  \"type\": \"object\","]
4131    #[doc = "  \"properties\": {"]
4132    #[doc = "    \"deep_sleep\": {"]
4133    #[doc = "      \"title\": \"\","]
4134    #[doc = "      \"description\": \"Contribution of deep sleep in range [1, 100].\","]
4135    #[doc = "      \"type\": ["]
4136    #[doc = "        \"integer\","]
4137    #[doc = "        \"null\""]
4138    #[doc = "      ]"]
4139    #[doc = "    },"]
4140    #[doc = "    \"efficiency\": {"]
4141    #[doc = "      \"title\": \"\","]
4142    #[doc = "      \"description\": \"Contribution of sleep efficiency in range [1, 100].\","]
4143    #[doc = "      \"type\": ["]
4144    #[doc = "        \"integer\","]
4145    #[doc = "        \"null\""]
4146    #[doc = "      ]"]
4147    #[doc = "    },"]
4148    #[doc = "    \"latency\": {"]
4149    #[doc = "      \"title\": \"\","]
4150    #[doc = "      \"description\": \"Contribution of sleep latency in range [1, 100].\","]
4151    #[doc = "      \"type\": ["]
4152    #[doc = "        \"integer\","]
4153    #[doc = "        \"null\""]
4154    #[doc = "      ]"]
4155    #[doc = "    },"]
4156    #[doc = "    \"rem_sleep\": {"]
4157    #[doc = "      \"title\": \"\","]
4158    #[doc = "      \"description\": \"Contribution of REM sleep in range [1, 100].\","]
4159    #[doc = "      \"type\": ["]
4160    #[doc = "        \"integer\","]
4161    #[doc = "        \"null\""]
4162    #[doc = "      ]"]
4163    #[doc = "    },"]
4164    #[doc = "    \"restfulness\": {"]
4165    #[doc = "      \"title\": \"\","]
4166    #[doc = "      \"description\": \"Contribution of sleep restfulness in range [1, 100].\","]
4167    #[doc = "      \"type\": ["]
4168    #[doc = "        \"integer\","]
4169    #[doc = "        \"null\""]
4170    #[doc = "      ]"]
4171    #[doc = "    },"]
4172    #[doc = "    \"timing\": {"]
4173    #[doc = "      \"title\": \"\","]
4174    #[doc = "      \"description\": \"Contribution of sleep timing in range [1, 100].\","]
4175    #[doc = "      \"type\": ["]
4176    #[doc = "        \"integer\","]
4177    #[doc = "        \"null\""]
4178    #[doc = "      ]"]
4179    #[doc = "    },"]
4180    #[doc = "    \"total_sleep\": {"]
4181    #[doc = "      \"title\": \"\","]
4182    #[doc = "      \"description\": \"Contribution of total sleep in range [1, 100].\","]
4183    #[doc = "      \"type\": ["]
4184    #[doc = "        \"integer\","]
4185    #[doc = "        \"null\""]
4186    #[doc = "      ]"]
4187    #[doc = "    }"]
4188    #[doc = "  }"]
4189    #[doc = "}"]
4190    #[doc = r" ```"]
4191    #[doc = r" </details>"]
4192    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4193    pub struct PublicSleepContributors {
4194        #[doc = "Contribution of deep sleep in range [1, 100]."]
4195        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4196        pub deep_sleep: ::std::option::Option<i64>,
4197        #[doc = "Contribution of sleep efficiency in range [1, 100]."]
4198        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4199        pub efficiency: ::std::option::Option<i64>,
4200        #[doc = "Contribution of sleep latency in range [1, 100]."]
4201        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4202        pub latency: ::std::option::Option<i64>,
4203        #[doc = "Contribution of REM sleep in range [1, 100]."]
4204        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4205        pub rem_sleep: ::std::option::Option<i64>,
4206        #[doc = "Contribution of sleep restfulness in range [1, 100]."]
4207        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4208        pub restfulness: ::std::option::Option<i64>,
4209        #[doc = "Contribution of sleep timing in range [1, 100]."]
4210        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4211        pub timing: ::std::option::Option<i64>,
4212        #[doc = "Contribution of total sleep in range [1, 100]."]
4213        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4214        pub total_sleep: ::std::option::Option<i64>,
4215    }
4216
4217    impl ::std::default::Default for PublicSleepContributors {
4218        fn default() -> Self {
4219            Self {
4220                deep_sleep: Default::default(),
4221                efficiency: Default::default(),
4222                latency: Default::default(),
4223                rem_sleep: Default::default(),
4224                restfulness: Default::default(),
4225                timing: Default::default(),
4226                total_sleep: Default::default(),
4227            }
4228        }
4229    }
4230
4231    #[doc = "Suggested bedtime for the user."]
4232    #[doc = r""]
4233    #[doc = r" <details><summary>JSON schema</summary>"]
4234    #[doc = r""]
4235    #[doc = r" ```json"]
4236    #[doc = "{"]
4237    #[doc = "  \"title\": \"PublicSleepTime\","]
4238    #[doc = "  \"description\": \"Suggested bedtime for the user.\","]
4239    #[doc = "  \"type\": \"object\","]
4240    #[doc = "  \"required\": ["]
4241    #[doc = "    \"day\","]
4242    #[doc = "    \"id\""]
4243    #[doc = "  ],"]
4244    #[doc = "  \"properties\": {"]
4245    #[doc = "    \"day\": {"]
4246    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
4247    #[doc = "    },"]
4248    #[doc = "    \"id\": {"]
4249    #[doc = "      \"title\": \"\","]
4250    #[doc = "      \"description\": \"Unique identifier of the object.\","]
4251    #[doc = "      \"type\": \"string\","]
4252    #[doc = "      \"minLength\": 1"]
4253    #[doc = "    },"]
4254    #[doc = "    \"optimal_bedtime\": {"]
4255    #[doc = "      \"title\": \"\","]
4256    #[doc = "      \"description\": \"Optimal bedtime.\","]
4257    #[doc = "      \"oneOf\": ["]
4258    #[doc = "        {"]
4259    #[doc = "          \"type\": \"null\""]
4260    #[doc = "        },"]
4261    #[doc = "        {"]
4262    #[doc = "          \"allOf\": ["]
4263    #[doc = "            {"]
4264    #[doc = "              \"$ref\": \"#/components/schemas/PublicSleepTimeWindow\""]
4265    #[doc = "            }"]
4266    #[doc = "          ]"]
4267    #[doc = "        }"]
4268    #[doc = "      ]"]
4269    #[doc = "    },"]
4270    #[doc = "    \"recommendation\": {"]
4271    #[doc = "      \"title\": \"\","]
4272    #[doc = "      \"description\": \"Recommended action for bedtime.\","]
4273    #[doc = "      \"oneOf\": ["]
4274    #[doc = "        {"]
4275    #[doc = "          \"type\": \"null\""]
4276    #[doc = "        },"]
4277    #[doc = "        {"]
4278    #[doc = "          \"allOf\": ["]
4279    #[doc = "            {"]
4280    #[doc = "              \"$ref\": \"#/components/schemas/PublicSleepTimeRecommendation\""]
4281    #[doc = "            }"]
4282    #[doc = "          ]"]
4283    #[doc = "        }"]
4284    #[doc = "      ]"]
4285    #[doc = "    },"]
4286    #[doc = "    \"status\": {"]
4287    #[doc = "      \"title\": \"\","]
4288    #[doc = "      \"description\": \"Sleep time status; used to inform sleep time recommendation.\","]
4289    #[doc = "      \"oneOf\": ["]
4290    #[doc = "        {"]
4291    #[doc = "          \"type\": \"null\""]
4292    #[doc = "        },"]
4293    #[doc = "        {"]
4294    #[doc = "          \"allOf\": ["]
4295    #[doc = "            {"]
4296    #[doc = "              \"$ref\": \"#/components/schemas/PublicSleepTimeStatus\""]
4297    #[doc = "            }"]
4298    #[doc = "          ]"]
4299    #[doc = "        }"]
4300    #[doc = "      ]"]
4301    #[doc = "    }"]
4302    #[doc = "  },"]
4303    #[doc = "  \"x-cloud-only\": true,"]
4304    #[doc = "  \"x-collection\": \"publicsleeptime\","]
4305    #[doc = "  \"x-owner\": \"sleep-squad\""]
4306    #[doc = "}"]
4307    #[doc = r" ```"]
4308    #[doc = r" </details>"]
4309    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4310    pub struct PublicSleepTime {
4311        pub day: IsoDate,
4312        #[doc = "Unique identifier of the object."]
4313        pub id: X,
4314        #[doc = "Optimal bedtime."]
4315        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4316        pub optimal_bedtime: ::std::option::Option<PublicSleepTimeWindow>,
4317        #[doc = "Recommended action for bedtime."]
4318        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4319        pub recommendation: ::std::option::Option<PublicSleepTimeRecommendation>,
4320        #[doc = "Sleep time status; used to inform sleep time recommendation."]
4321        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4322        pub status: ::std::option::Option<PublicSleepTimeStatus>,
4323    }
4324
4325    #[doc = "Possible public SleepTime recommendation."]
4326    #[doc = r""]
4327    #[doc = r" <details><summary>JSON schema</summary>"]
4328    #[doc = r""]
4329    #[doc = r" ```json"]
4330    #[doc = "{"]
4331    #[doc = "  \"title\": \"PublicSleepTimeRecommendation\","]
4332    #[doc = "  \"description\": \"Possible public SleepTime recommendation.\","]
4333    #[doc = "  \"type\": \"string\","]
4334    #[doc = "  \"enum\": ["]
4335    #[doc = "    \"improve_efficiency\","]
4336    #[doc = "    \"earlier_bedtime\","]
4337    #[doc = "    \"later_bedtime\","]
4338    #[doc = "    \"earlier_wake_up_time\","]
4339    #[doc = "    \"later_wake_up_time\","]
4340    #[doc = "    \"follow_optimal_bedtime\""]
4341    #[doc = "  ]"]
4342    #[doc = "}"]
4343    #[doc = r" ```"]
4344    #[doc = r" </details>"]
4345    #[derive(
4346        :: serde :: Deserialize,
4347        :: serde :: Serialize,
4348        Clone,
4349        Copy,
4350        Debug,
4351        Eq,
4352        Hash,
4353        Ord,
4354        PartialEq,
4355        PartialOrd,
4356    )]
4357    pub enum PublicSleepTimeRecommendation {
4358        #[serde(rename = "improve_efficiency")]
4359        ImproveEfficiency,
4360        #[serde(rename = "earlier_bedtime")]
4361        EarlierBedtime,
4362        #[serde(rename = "later_bedtime")]
4363        LaterBedtime,
4364        #[serde(rename = "earlier_wake_up_time")]
4365        EarlierWakeUpTime,
4366        #[serde(rename = "later_wake_up_time")]
4367        LaterWakeUpTime,
4368        #[serde(rename = "follow_optimal_bedtime")]
4369        FollowOptimalBedtime,
4370    }
4371
4372    impl ::std::fmt::Display for PublicSleepTimeRecommendation {
4373        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4374            match *self {
4375                Self::ImproveEfficiency => f.write_str("improve_efficiency"),
4376                Self::EarlierBedtime => f.write_str("earlier_bedtime"),
4377                Self::LaterBedtime => f.write_str("later_bedtime"),
4378                Self::EarlierWakeUpTime => f.write_str("earlier_wake_up_time"),
4379                Self::LaterWakeUpTime => f.write_str("later_wake_up_time"),
4380                Self::FollowOptimalBedtime => f.write_str("follow_optimal_bedtime"),
4381            }
4382        }
4383    }
4384
4385    impl ::std::str::FromStr for PublicSleepTimeRecommendation {
4386        type Err = self::error::ConversionError;
4387        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4388            match value {
4389                "improve_efficiency" => Ok(Self::ImproveEfficiency),
4390                "earlier_bedtime" => Ok(Self::EarlierBedtime),
4391                "later_bedtime" => Ok(Self::LaterBedtime),
4392                "earlier_wake_up_time" => Ok(Self::EarlierWakeUpTime),
4393                "later_wake_up_time" => Ok(Self::LaterWakeUpTime),
4394                "follow_optimal_bedtime" => Ok(Self::FollowOptimalBedtime),
4395                _ => Err("invalid value".into()),
4396            }
4397        }
4398    }
4399
4400    impl ::std::convert::TryFrom<&str> for PublicSleepTimeRecommendation {
4401        type Error = self::error::ConversionError;
4402        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4403            value.parse()
4404        }
4405    }
4406
4407    impl ::std::convert::TryFrom<&::std::string::String> for PublicSleepTimeRecommendation {
4408        type Error = self::error::ConversionError;
4409        fn try_from(
4410            value: &::std::string::String,
4411        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4412            value.parse()
4413        }
4414    }
4415
4416    impl ::std::convert::TryFrom<::std::string::String> for PublicSleepTimeRecommendation {
4417        type Error = self::error::ConversionError;
4418        fn try_from(
4419            value: ::std::string::String,
4420        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4421            value.parse()
4422        }
4423    }
4424
4425    #[doc = "Possible public SleepTime status."]
4426    #[doc = r""]
4427    #[doc = r" <details><summary>JSON schema</summary>"]
4428    #[doc = r""]
4429    #[doc = r" ```json"]
4430    #[doc = "{"]
4431    #[doc = "  \"title\": \"PublicSleepTimeStatus\","]
4432    #[doc = "  \"description\": \"Possible public SleepTime status.\","]
4433    #[doc = "  \"type\": \"string\","]
4434    #[doc = "  \"enum\": ["]
4435    #[doc = "    \"not_enough_nights\","]
4436    #[doc = "    \"not_enough_recent_nights\","]
4437    #[doc = "    \"bad_sleep_quality\","]
4438    #[doc = "    \"only_recommended_found\","]
4439    #[doc = "    \"optimal_found\""]
4440    #[doc = "  ]"]
4441    #[doc = "}"]
4442    #[doc = r" ```"]
4443    #[doc = r" </details>"]
4444    #[derive(
4445        :: serde :: Deserialize,
4446        :: serde :: Serialize,
4447        Clone,
4448        Copy,
4449        Debug,
4450        Eq,
4451        Hash,
4452        Ord,
4453        PartialEq,
4454        PartialOrd,
4455    )]
4456    pub enum PublicSleepTimeStatus {
4457        #[serde(rename = "not_enough_nights")]
4458        NotEnoughNights,
4459        #[serde(rename = "not_enough_recent_nights")]
4460        NotEnoughRecentNights,
4461        #[serde(rename = "bad_sleep_quality")]
4462        BadSleepQuality,
4463        #[serde(rename = "only_recommended_found")]
4464        OnlyRecommendedFound,
4465        #[serde(rename = "optimal_found")]
4466        OptimalFound,
4467    }
4468
4469    impl ::std::fmt::Display for PublicSleepTimeStatus {
4470        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4471            match *self {
4472                Self::NotEnoughNights => f.write_str("not_enough_nights"),
4473                Self::NotEnoughRecentNights => f.write_str("not_enough_recent_nights"),
4474                Self::BadSleepQuality => f.write_str("bad_sleep_quality"),
4475                Self::OnlyRecommendedFound => f.write_str("only_recommended_found"),
4476                Self::OptimalFound => f.write_str("optimal_found"),
4477            }
4478        }
4479    }
4480
4481    impl ::std::str::FromStr for PublicSleepTimeStatus {
4482        type Err = self::error::ConversionError;
4483        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4484            match value {
4485                "not_enough_nights" => Ok(Self::NotEnoughNights),
4486                "not_enough_recent_nights" => Ok(Self::NotEnoughRecentNights),
4487                "bad_sleep_quality" => Ok(Self::BadSleepQuality),
4488                "only_recommended_found" => Ok(Self::OnlyRecommendedFound),
4489                "optimal_found" => Ok(Self::OptimalFound),
4490                _ => Err("invalid value".into()),
4491            }
4492        }
4493    }
4494
4495    impl ::std::convert::TryFrom<&str> for PublicSleepTimeStatus {
4496        type Error = self::error::ConversionError;
4497        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4498            value.parse()
4499        }
4500    }
4501
4502    impl ::std::convert::TryFrom<&::std::string::String> for PublicSleepTimeStatus {
4503        type Error = self::error::ConversionError;
4504        fn try_from(
4505            value: &::std::string::String,
4506        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4507            value.parse()
4508        }
4509    }
4510
4511    impl ::std::convert::TryFrom<::std::string::String> for PublicSleepTimeStatus {
4512        type Error = self::error::ConversionError;
4513        fn try_from(
4514            value: ::std::string::String,
4515        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4516            value.parse()
4517        }
4518    }
4519
4520    #[doc = "Object defining sleep time window"]
4521    #[doc = r""]
4522    #[doc = r" <details><summary>JSON schema</summary>"]
4523    #[doc = r""]
4524    #[doc = r" ```json"]
4525    #[doc = "{"]
4526    #[doc = "  \"title\": \"PublicSleepTimeWindow\","]
4527    #[doc = "  \"description\": \"Object defining sleep time window\","]
4528    #[doc = "  \"type\": \"object\","]
4529    #[doc = "  \"required\": ["]
4530    #[doc = "    \"day_tz\","]
4531    #[doc = "    \"end_offset\","]
4532    #[doc = "    \"start_offset\""]
4533    #[doc = "  ],"]
4534    #[doc = "  \"properties\": {"]
4535    #[doc = "    \"day_tz\": {"]
4536    #[doc = "      \"title\": \"\","]
4537    #[doc = "      \"description\": \"Timezone offset in second from GMT of the day\","]
4538    #[doc = "      \"type\": \"integer\""]
4539    #[doc = "    },"]
4540    #[doc = "    \"end_offset\": {"]
4541    #[doc = "      \"title\": \"\","]
4542    #[doc = "      \"description\": \"End offset from midnight in second\","]
4543    #[doc = "      \"type\": \"integer\""]
4544    #[doc = "    },"]
4545    #[doc = "    \"start_offset\": {"]
4546    #[doc = "      \"title\": \"\","]
4547    #[doc = "      \"description\": \"Start offset from midnight in second\","]
4548    #[doc = "      \"type\": \"integer\""]
4549    #[doc = "    }"]
4550    #[doc = "  }"]
4551    #[doc = "}"]
4552    #[doc = r" ```"]
4553    #[doc = r" </details>"]
4554    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4555    pub struct PublicSleepTimeWindow {
4556        #[doc = "Timezone offset in second from GMT of the day"]
4557        pub day_tz: i64,
4558        #[doc = "End offset from midnight in second"]
4559        pub end_offset: i64,
4560        #[doc = "Start offset from midnight in second"]
4561        pub start_offset: i64,
4562    }
4563
4564    #[doc = "Possible sleep period types.\n'deleted' = deleted sleep by user.\n'sleep' = user confirmed sleep / nap, min 15 minutes, max 3 hours, contributes to daily scores\n'late_nap' = user confirmed sleep / nap, min 15 minutes, ended after sleep day change (6 pm), contributes to next days daily scores\n'long_sleep' = sleep that is long enough (>3h) to automatically contribute to daily scores\n'rest' = Falsely detected sleep / nap, rejected in confirm prompt by user"]
4565    #[doc = r""]
4566    #[doc = r" <details><summary>JSON schema</summary>"]
4567    #[doc = r""]
4568    #[doc = r" ```json"]
4569    #[doc = "{"]
4570    #[doc = "  \"title\": \"PublicSleepType\","]
4571    #[doc = "  \"description\": \"Possible sleep period types.\\n'deleted' = deleted sleep by user.\\n'sleep' = user confirmed sleep / nap, min 15 minutes, max 3 hours, contributes to daily scores\\n'late_nap' = user confirmed sleep / nap, min 15 minutes, ended after sleep day change (6 pm), contributes to next days daily scores\\n'long_sleep' = sleep that is long enough (>3h) to automatically contribute to daily scores\\n'rest' = Falsely detected sleep / nap, rejected in confirm prompt by user\","]
4572    #[doc = "  \"type\": \"string\","]
4573    #[doc = "  \"enum\": ["]
4574    #[doc = "    \"deleted\","]
4575    #[doc = "    \"sleep\","]
4576    #[doc = "    \"long_sleep\","]
4577    #[doc = "    \"late_nap\","]
4578    #[doc = "    \"rest\""]
4579    #[doc = "  ]"]
4580    #[doc = "}"]
4581    #[doc = r" ```"]
4582    #[doc = r" </details>"]
4583    #[derive(
4584        :: serde :: Deserialize,
4585        :: serde :: Serialize,
4586        Clone,
4587        Copy,
4588        Debug,
4589        Eq,
4590        Hash,
4591        Ord,
4592        PartialEq,
4593        PartialOrd,
4594    )]
4595    pub enum PublicSleepType {
4596        #[serde(rename = "deleted")]
4597        Deleted,
4598        #[serde(rename = "sleep")]
4599        Sleep,
4600        #[serde(rename = "long_sleep")]
4601        LongSleep,
4602        #[serde(rename = "late_nap")]
4603        LateNap,
4604        #[serde(rename = "rest")]
4605        Rest,
4606    }
4607
4608    impl ::std::fmt::Display for PublicSleepType {
4609        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4610            match *self {
4611                Self::Deleted => f.write_str("deleted"),
4612                Self::Sleep => f.write_str("sleep"),
4613                Self::LongSleep => f.write_str("long_sleep"),
4614                Self::LateNap => f.write_str("late_nap"),
4615                Self::Rest => f.write_str("rest"),
4616            }
4617        }
4618    }
4619
4620    impl ::std::str::FromStr for PublicSleepType {
4621        type Err = self::error::ConversionError;
4622        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4623            match value {
4624                "deleted" => Ok(Self::Deleted),
4625                "sleep" => Ok(Self::Sleep),
4626                "long_sleep" => Ok(Self::LongSleep),
4627                "late_nap" => Ok(Self::LateNap),
4628                "rest" => Ok(Self::Rest),
4629                _ => Err("invalid value".into()),
4630            }
4631        }
4632    }
4633
4634    impl ::std::convert::TryFrom<&str> for PublicSleepType {
4635        type Error = self::error::ConversionError;
4636        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4637            value.parse()
4638        }
4639    }
4640
4641    impl ::std::convert::TryFrom<&::std::string::String> for PublicSleepType {
4642        type Error = self::error::ConversionError;
4643        fn try_from(
4644            value: &::std::string::String,
4645        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4646            value.parse()
4647        }
4648    }
4649
4650    impl ::std::convert::TryFrom<::std::string::String> for PublicSleepType {
4651        type Error = self::error::ConversionError;
4652        fn try_from(
4653            value: ::std::string::String,
4654        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4655            value.parse()
4656        }
4657    }
4658
4659    #[doc = "Object defining public spo2 aggregated values."]
4660    #[doc = r""]
4661    #[doc = r" <details><summary>JSON schema</summary>"]
4662    #[doc = r""]
4663    #[doc = r" ```json"]
4664    #[doc = "{"]
4665    #[doc = "  \"title\": \"PublicSpo2AggregatedValues\","]
4666    #[doc = "  \"description\": \"Object defining public spo2 aggregated values.\","]
4667    #[doc = "  \"type\": \"object\","]
4668    #[doc = "  \"required\": ["]
4669    #[doc = "    \"average\""]
4670    #[doc = "  ],"]
4671    #[doc = "  \"properties\": {"]
4672    #[doc = "    \"average\": {"]
4673    #[doc = "      \"title\": \"\","]
4674    #[doc = "      \"description\": \"Average of spo2.\","]
4675    #[doc = "      \"type\": \"number\""]
4676    #[doc = "    }"]
4677    #[doc = "  }"]
4678    #[doc = "}"]
4679    #[doc = r" ```"]
4680    #[doc = r" </details>"]
4681    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4682    pub struct PublicSpo2AggregatedValues {
4683        #[doc = "Average of spo2."]
4684        pub average: f64,
4685    }
4686
4687    #[doc = "VO2Max estimate."]
4688    #[doc = r""]
4689    #[doc = r" <details><summary>JSON schema</summary>"]
4690    #[doc = r""]
4691    #[doc = r" ```json"]
4692    #[doc = "{"]
4693    #[doc = "  \"title\": \"PublicVO2Max\","]
4694    #[doc = "  \"description\": \"VO2Max estimate.\","]
4695    #[doc = "  \"type\": \"object\","]
4696    #[doc = "  \"required\": ["]
4697    #[doc = "    \"day\","]
4698    #[doc = "    \"id\","]
4699    #[doc = "    \"timestamp\","]
4700    #[doc = "    \"vo2_max\""]
4701    #[doc = "  ],"]
4702    #[doc = "  \"properties\": {"]
4703    #[doc = "    \"day\": {"]
4704    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
4705    #[doc = "    },"]
4706    #[doc = "    \"id\": {"]
4707    #[doc = "      \"title\": \"\","]
4708    #[doc = "      \"description\": \"Unique identifier of the object.\","]
4709    #[doc = "      \"type\": \"string\","]
4710    #[doc = "      \"minLength\": 1"]
4711    #[doc = "    },"]
4712    #[doc = "    \"timestamp\": {"]
4713    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
4714    #[doc = "    },"]
4715    #[doc = "    \"vo2_max\": {"]
4716    #[doc = "      \"title\": \"\","]
4717    #[doc = "      \"description\": \"VO2 max value.\","]
4718    #[doc = "      \"type\": \"integer\""]
4719    #[doc = "    }"]
4720    #[doc = "  },"]
4721    #[doc = "  \"x-cloud-only\": true,"]
4722    #[doc = "  \"x-collection\": \"publicvo2max\","]
4723    #[doc = "  \"x-owner\": \"movement-squad\""]
4724    #[doc = "}"]
4725    #[doc = r" ```"]
4726    #[doc = r" </details>"]
4727    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4728    pub struct PublicVo2Max {
4729        pub day: IsoDate,
4730        #[doc = "Unique identifier of the object."]
4731        pub id: X,
4732        pub timestamp: LocalizedDateTime,
4733        #[doc = "VO2 max value."]
4734        pub vo2_max: i64,
4735    }
4736
4737    #[doc = "Public model for Workout."]
4738    #[doc = r""]
4739    #[doc = r" <details><summary>JSON schema</summary>"]
4740    #[doc = r""]
4741    #[doc = r" ```json"]
4742    #[doc = "{"]
4743    #[doc = "  \"title\": \"PublicWorkout\","]
4744    #[doc = "  \"description\": \"Public model for Workout.\","]
4745    #[doc = "  \"type\": \"object\","]
4746    #[doc = "  \"required\": ["]
4747    #[doc = "    \"activity\","]
4748    #[doc = "    \"day\","]
4749    #[doc = "    \"end_datetime\","]
4750    #[doc = "    \"id\","]
4751    #[doc = "    \"intensity\","]
4752    #[doc = "    \"source\","]
4753    #[doc = "    \"start_datetime\""]
4754    #[doc = "  ],"]
4755    #[doc = "  \"properties\": {"]
4756    #[doc = "    \"activity\": {"]
4757    #[doc = "      \"title\": \"\","]
4758    #[doc = "      \"description\": \"Type of the workout activity.\","]
4759    #[doc = "      \"type\": \"string\""]
4760    #[doc = "    },"]
4761    #[doc = "    \"calories\": {"]
4762    #[doc = "      \"title\": \"\","]
4763    #[doc = "      \"description\": \"Energy burned in kilocalories during the workout.\","]
4764    #[doc = "      \"type\": ["]
4765    #[doc = "        \"number\","]
4766    #[doc = "        \"null\""]
4767    #[doc = "      ]"]
4768    #[doc = "    },"]
4769    #[doc = "    \"day\": {"]
4770    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
4771    #[doc = "    },"]
4772    #[doc = "    \"distance\": {"]
4773    #[doc = "      \"title\": \"\","]
4774    #[doc = "      \"description\": \"Distance traveled in meters during the workout.\","]
4775    #[doc = "      \"type\": ["]
4776    #[doc = "        \"number\","]
4777    #[doc = "        \"null\""]
4778    #[doc = "      ]"]
4779    #[doc = "    },"]
4780    #[doc = "    \"end_datetime\": {"]
4781    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
4782    #[doc = "    },"]
4783    #[doc = "    \"id\": {"]
4784    #[doc = "      \"title\": \"\","]
4785    #[doc = "      \"description\": \"Unique identifier of the object.\","]
4786    #[doc = "      \"type\": \"string\","]
4787    #[doc = "      \"minLength\": 1"]
4788    #[doc = "    },"]
4789    #[doc = "    \"intensity\": {"]
4790    #[doc = "      \"$ref\": \"#/components/schemas/PublicWorkoutIntensity\""]
4791    #[doc = "    },"]
4792    #[doc = "    \"label\": {"]
4793    #[doc = "      \"title\": \"\","]
4794    #[doc = "      \"description\": \"User-defined label for the workout.\","]
4795    #[doc = "      \"type\": ["]
4796    #[doc = "        \"string\","]
4797    #[doc = "        \"null\""]
4798    #[doc = "      ]"]
4799    #[doc = "    },"]
4800    #[doc = "    \"source\": {"]
4801    #[doc = "      \"$ref\": \"#/components/schemas/PublicWorkoutSource\""]
4802    #[doc = "    },"]
4803    #[doc = "    \"start_datetime\": {"]
4804    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
4805    #[doc = "    }"]
4806    #[doc = "  },"]
4807    #[doc = "  \"x-cloud-only\": true,"]
4808    #[doc = "  \"x-collection\": \"publicworkout\","]
4809    #[doc = "  \"x-owner\": \"movement-squad\""]
4810    #[doc = "}"]
4811    #[doc = r" ```"]
4812    #[doc = r" </details>"]
4813    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4814    pub struct PublicWorkout {
4815        #[doc = "Type of the workout activity."]
4816        pub activity: ::std::string::String,
4817        #[doc = "Energy burned in kilocalories during the workout."]
4818        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4819        pub calories: ::std::option::Option<f64>,
4820        pub day: IsoDate,
4821        #[doc = "Distance traveled in meters during the workout."]
4822        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4823        pub distance: ::std::option::Option<f64>,
4824        pub end_datetime: LocalizedDateTime,
4825        #[doc = "Unique identifier of the object."]
4826        pub id: X,
4827        pub intensity: PublicWorkoutIntensity,
4828        #[doc = "User-defined label for the workout."]
4829        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4830        pub label: ::std::option::Option<::std::string::String>,
4831        pub source: PublicWorkoutSource,
4832        pub start_datetime: LocalizedDateTime,
4833    }
4834
4835    #[doc = "Possible workout intensities."]
4836    #[doc = r""]
4837    #[doc = r" <details><summary>JSON schema</summary>"]
4838    #[doc = r""]
4839    #[doc = r" ```json"]
4840    #[doc = "{"]
4841    #[doc = "  \"title\": \"PublicWorkoutIntensity\","]
4842    #[doc = "  \"description\": \"Possible workout intensities.\","]
4843    #[doc = "  \"type\": \"string\","]
4844    #[doc = "  \"enum\": ["]
4845    #[doc = "    \"easy\","]
4846    #[doc = "    \"moderate\","]
4847    #[doc = "    \"hard\""]
4848    #[doc = "  ]"]
4849    #[doc = "}"]
4850    #[doc = r" ```"]
4851    #[doc = r" </details>"]
4852    #[derive(
4853        :: serde :: Deserialize,
4854        :: serde :: Serialize,
4855        Clone,
4856        Copy,
4857        Debug,
4858        Eq,
4859        Hash,
4860        Ord,
4861        PartialEq,
4862        PartialOrd,
4863    )]
4864    pub enum PublicWorkoutIntensity {
4865        #[serde(rename = "easy")]
4866        Easy,
4867        #[serde(rename = "moderate")]
4868        Moderate,
4869        #[serde(rename = "hard")]
4870        Hard,
4871    }
4872
4873    impl ::std::fmt::Display for PublicWorkoutIntensity {
4874        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4875            match *self {
4876                Self::Easy => f.write_str("easy"),
4877                Self::Moderate => f.write_str("moderate"),
4878                Self::Hard => f.write_str("hard"),
4879            }
4880        }
4881    }
4882
4883    impl ::std::str::FromStr for PublicWorkoutIntensity {
4884        type Err = self::error::ConversionError;
4885        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4886            match value {
4887                "easy" => Ok(Self::Easy),
4888                "moderate" => Ok(Self::Moderate),
4889                "hard" => Ok(Self::Hard),
4890                _ => Err("invalid value".into()),
4891            }
4892        }
4893    }
4894
4895    impl ::std::convert::TryFrom<&str> for PublicWorkoutIntensity {
4896        type Error = self::error::ConversionError;
4897        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4898            value.parse()
4899        }
4900    }
4901
4902    impl ::std::convert::TryFrom<&::std::string::String> for PublicWorkoutIntensity {
4903        type Error = self::error::ConversionError;
4904        fn try_from(
4905            value: &::std::string::String,
4906        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4907            value.parse()
4908        }
4909    }
4910
4911    impl ::std::convert::TryFrom<::std::string::String> for PublicWorkoutIntensity {
4912        type Error = self::error::ConversionError;
4913        fn try_from(
4914            value: ::std::string::String,
4915        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4916            value.parse()
4917        }
4918    }
4919
4920    #[doc = "Possible workout sources."]
4921    #[doc = r""]
4922    #[doc = r" <details><summary>JSON schema</summary>"]
4923    #[doc = r""]
4924    #[doc = r" ```json"]
4925    #[doc = "{"]
4926    #[doc = "  \"title\": \"PublicWorkoutSource\","]
4927    #[doc = "  \"description\": \"Possible workout sources.\","]
4928    #[doc = "  \"type\": \"string\","]
4929    #[doc = "  \"enum\": ["]
4930    #[doc = "    \"manual\","]
4931    #[doc = "    \"autodetected\","]
4932    #[doc = "    \"confirmed\","]
4933    #[doc = "    \"workout_heart_rate\","]
4934    #[doc = "    \"live_third_party_heart_rate\","]
4935    #[doc = "    \"live_oura_heart_rate\""]
4936    #[doc = "  ]"]
4937    #[doc = "}"]
4938    #[doc = r" ```"]
4939    #[doc = r" </details>"]
4940    #[derive(
4941        :: serde :: Deserialize,
4942        :: serde :: Serialize,
4943        Clone,
4944        Copy,
4945        Debug,
4946        Eq,
4947        Hash,
4948        Ord,
4949        PartialEq,
4950        PartialOrd,
4951    )]
4952    pub enum PublicWorkoutSource {
4953        #[serde(rename = "manual")]
4954        Manual,
4955        #[serde(rename = "autodetected")]
4956        Autodetected,
4957        #[serde(rename = "confirmed")]
4958        Confirmed,
4959        #[serde(rename = "workout_heart_rate")]
4960        WorkoutHeartRate,
4961        #[serde(rename = "live_third_party_heart_rate")]
4962        LiveThirdPartyHeartRate,
4963        #[serde(rename = "live_oura_heart_rate")]
4964        LiveOuraHeartRate,
4965    }
4966
4967    impl ::std::fmt::Display for PublicWorkoutSource {
4968        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4969            match *self {
4970                Self::Manual => f.write_str("manual"),
4971                Self::Autodetected => f.write_str("autodetected"),
4972                Self::Confirmed => f.write_str("confirmed"),
4973                Self::WorkoutHeartRate => f.write_str("workout_heart_rate"),
4974                Self::LiveThirdPartyHeartRate => f.write_str("live_third_party_heart_rate"),
4975                Self::LiveOuraHeartRate => f.write_str("live_oura_heart_rate"),
4976            }
4977        }
4978    }
4979
4980    impl ::std::str::FromStr for PublicWorkoutSource {
4981        type Err = self::error::ConversionError;
4982        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4983            match value {
4984                "manual" => Ok(Self::Manual),
4985                "autodetected" => Ok(Self::Autodetected),
4986                "confirmed" => Ok(Self::Confirmed),
4987                "workout_heart_rate" => Ok(Self::WorkoutHeartRate),
4988                "live_third_party_heart_rate" => Ok(Self::LiveThirdPartyHeartRate),
4989                "live_oura_heart_rate" => Ok(Self::LiveOuraHeartRate),
4990                _ => Err("invalid value".into()),
4991            }
4992        }
4993    }
4994
4995    impl ::std::convert::TryFrom<&str> for PublicWorkoutSource {
4996        type Error = self::error::ConversionError;
4997        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4998            value.parse()
4999        }
5000    }
5001
5002    impl ::std::convert::TryFrom<&::std::string::String> for PublicWorkoutSource {
5003        type Error = self::error::ConversionError;
5004        fn try_from(
5005            value: &::std::string::String,
5006        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5007            value.parse()
5008        }
5009    }
5010
5011    impl ::std::convert::TryFrom<::std::string::String> for PublicWorkoutSource {
5012        type Error = self::error::ConversionError;
5013        fn try_from(
5014            value: ::std::string::String,
5015        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5016            value.parse()
5017        }
5018    }
5019
5020    #[doc = "`ResilienceContributors`"]
5021    #[doc = r""]
5022    #[doc = r" <details><summary>JSON schema</summary>"]
5023    #[doc = r""]
5024    #[doc = r" ```json"]
5025    #[doc = "{"]
5026    #[doc = "  \"title\": \"ResilienceContributors\","]
5027    #[doc = "  \"type\": \"object\","]
5028    #[doc = "  \"required\": ["]
5029    #[doc = "    \"daytime_recovery\","]
5030    #[doc = "    \"sleep_recovery\","]
5031    #[doc = "    \"stress\""]
5032    #[doc = "  ],"]
5033    #[doc = "  \"properties\": {"]
5034    #[doc = "    \"daytime_recovery\": {"]
5035    #[doc = "      \"title\": \"Daytime Recovery\","]
5036    #[doc = "      \"description\": \"Daytime recovery contributor to the resilience score. Range: [0, 100]\","]
5037    #[doc = "      \"type\": \"number\""]
5038    #[doc = "    },"]
5039    #[doc = "    \"sleep_recovery\": {"]
5040    #[doc = "      \"title\": \"Sleep Recovery\","]
5041    #[doc = "      \"description\": \"Sleep recovery contributor to the resilience score. Range: [0, 100]\","]
5042    #[doc = "      \"type\": \"number\""]
5043    #[doc = "    },"]
5044    #[doc = "    \"stress\": {"]
5045    #[doc = "      \"title\": \"Stress\","]
5046    #[doc = "      \"description\": \"Stress contributor to the resilience score. Range: [0, 100]\","]
5047    #[doc = "      \"type\": \"number\""]
5048    #[doc = "    }"]
5049    #[doc = "  }"]
5050    #[doc = "}"]
5051    #[doc = r" ```"]
5052    #[doc = r" </details>"]
5053    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5054    pub struct ResilienceContributors {
5055        #[doc = "Daytime recovery contributor to the resilience score. Range: [0, 100]"]
5056        pub daytime_recovery: f64,
5057        #[doc = "Sleep recovery contributor to the resilience score. Range: [0, 100]"]
5058        pub sleep_recovery: f64,
5059        #[doc = "Stress contributor to the resilience score. Range: [0, 100]"]
5060        pub stress: f64,
5061    }
5062
5063    #[doc = "`ResponseMultipleHeartrateDocumentsV2UsercollectionHeartrateGet`"]
5064    #[doc = r""]
5065    #[doc = r" <details><summary>JSON schema</summary>"]
5066    #[doc = r""]
5067    #[doc = r" ```json"]
5068    #[doc = "{"]
5069    #[doc = "  \"title\": \"Response Multiple Heartrate Documents V2 Usercollection Heartrate Get\","]
5070    #[doc = "  \"anyOf\": ["]
5071    #[doc = "    {"]
5072    #[doc = "      \"$ref\": \"#/components/schemas/TimeSeriesResponse_PublicHeartRateRow_\""]
5073    #[doc = "    },"]
5074    #[doc = "    {"]
5075    #[doc = "      \"$ref\": \"#/components/schemas/TimeSeriesResponseDict\""]
5076    #[doc = "    }"]
5077    #[doc = "  ]"]
5078    #[doc = "}"]
5079    #[doc = r" ```"]
5080    #[doc = r" </details>"]
5081    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5082    pub struct ResponseMultipleHeartrateDocumentsV2UsercollectionHeartrateGet {
5083        #[serde(
5084            flatten,
5085            default,
5086            skip_serializing_if = "::std::option::Option::is_none"
5087        )]
5088        pub subtype_0: ::std::option::Option<TimeSeriesResponsePublicHeartRateRow>,
5089        #[serde(
5090            flatten,
5091            default,
5092            skip_serializing_if = "::std::option::Option::is_none"
5093        )]
5094        pub subtype_1: ::std::option::Option<TimeSeriesResponseDict>,
5095    }
5096
5097    impl ::std::default::Default for ResponseMultipleHeartrateDocumentsV2UsercollectionHeartrateGet {
5098        fn default() -> Self {
5099            Self {
5100                subtype_0: Default::default(),
5101                subtype_1: Default::default(),
5102            }
5103        }
5104    }
5105
5106    #[doc = "`ResponseMultipleRingBatteryLevelDocumentsV2UsercollectionRingBatteryLevelGet`"]
5107    #[doc = r""]
5108    #[doc = r" <details><summary>JSON schema</summary>"]
5109    #[doc = r""]
5110    #[doc = r" ```json"]
5111    #[doc = "{"]
5112    #[doc = "  \"title\": \"Response Multiple Ring Battery Level Documents V2 Usercollection Ring Battery Level Get\","]
5113    #[doc = "  \"anyOf\": ["]
5114    #[doc = "    {"]
5115    #[doc = "      \"$ref\": \"#/components/schemas/TimeSeriesResponse_PublicRingBatteryLevelRow_\""]
5116    #[doc = "    },"]
5117    #[doc = "    {"]
5118    #[doc = "      \"$ref\": \"#/components/schemas/TimeSeriesResponseDict\""]
5119    #[doc = "    }"]
5120    #[doc = "  ]"]
5121    #[doc = "}"]
5122    #[doc = r" ```"]
5123    #[doc = r" </details>"]
5124    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5125    pub struct ResponseMultipleRingBatteryLevelDocumentsV2UsercollectionRingBatteryLevelGet {
5126        #[serde(
5127            flatten,
5128            default,
5129            skip_serializing_if = "::std::option::Option::is_none"
5130        )]
5131        pub subtype_0: ::std::option::Option<TimeSeriesResponsePublicRingBatteryLevelRow>,
5132        #[serde(
5133            flatten,
5134            default,
5135            skip_serializing_if = "::std::option::Option::is_none"
5136        )]
5137        pub subtype_1: ::std::option::Option<TimeSeriesResponseDict>,
5138    }
5139
5140    impl ::std::default::Default
5141        for ResponseMultipleRingBatteryLevelDocumentsV2UsercollectionRingBatteryLevelGet
5142    {
5143        fn default() -> Self {
5144            Self {
5145                subtype_0: Default::default(),
5146                subtype_1: Default::default(),
5147            }
5148        }
5149    }
5150
5151    #[doc = "`ResponseSandboxMultipleHeartrateDocumentsV2SandboxUsercollectionHeartrateGet`"]
5152    #[doc = r""]
5153    #[doc = r" <details><summary>JSON schema</summary>"]
5154    #[doc = r""]
5155    #[doc = r" ```json"]
5156    #[doc = "{"]
5157    #[doc = "  \"title\": \"Response Sandbox   Multiple Heartrate Documents V2 Sandbox Usercollection Heartrate Get\","]
5158    #[doc = "  \"anyOf\": ["]
5159    #[doc = "    {"]
5160    #[doc = "      \"$ref\": \"#/components/schemas/TimeSeriesResponse_PublicHeartRateRow_\""]
5161    #[doc = "    },"]
5162    #[doc = "    {"]
5163    #[doc = "      \"$ref\": \"#/components/schemas/TimeSeriesResponseDict\""]
5164    #[doc = "    }"]
5165    #[doc = "  ]"]
5166    #[doc = "}"]
5167    #[doc = r" ```"]
5168    #[doc = r" </details>"]
5169    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5170    pub struct ResponseSandboxMultipleHeartrateDocumentsV2SandboxUsercollectionHeartrateGet {
5171        #[serde(
5172            flatten,
5173            default,
5174            skip_serializing_if = "::std::option::Option::is_none"
5175        )]
5176        pub subtype_0: ::std::option::Option<TimeSeriesResponsePublicHeartRateRow>,
5177        #[serde(
5178            flatten,
5179            default,
5180            skip_serializing_if = "::std::option::Option::is_none"
5181        )]
5182        pub subtype_1: ::std::option::Option<TimeSeriesResponseDict>,
5183    }
5184
5185    impl ::std::default::Default
5186        for ResponseSandboxMultipleHeartrateDocumentsV2SandboxUsercollectionHeartrateGet
5187    {
5188        fn default() -> Self {
5189            Self {
5190                subtype_0: Default::default(),
5191                subtype_1: Default::default(),
5192            }
5193        }
5194    }
5195
5196    #[doc = "`ResponseSandboxMultipleRingBatteryLevelDocumentsV2SandboxUsercollectionRingBatteryLevelGet`"]
5197    #[doc = r""]
5198    #[doc = r" <details><summary>JSON schema</summary>"]
5199    #[doc = r""]
5200    #[doc = r" ```json"]
5201    #[doc = "{"]
5202    #[doc = "  \"title\": \"Response Sandbox   Multiple Ring Battery Level Documents V2 Sandbox Usercollection Ring Battery Level Get\","]
5203    #[doc = "  \"anyOf\": ["]
5204    #[doc = "    {"]
5205    #[doc = "      \"$ref\": \"#/components/schemas/TimeSeriesResponse_PublicRingBatteryLevelRow_\""]
5206    #[doc = "    },"]
5207    #[doc = "    {"]
5208    #[doc = "      \"$ref\": \"#/components/schemas/TimeSeriesResponseDict\""]
5209    #[doc = "    }"]
5210    #[doc = "  ]"]
5211    #[doc = "}"]
5212    #[doc = r" ```"]
5213    #[doc = r" </details>"]
5214    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5215    pub struct ResponseSandboxMultipleRingBatteryLevelDocumentsV2SandboxUsercollectionRingBatteryLevelGet
5216    {
5217        #[serde(
5218            flatten,
5219            default,
5220            skip_serializing_if = "::std::option::Option::is_none"
5221        )]
5222        pub subtype_0: ::std::option::Option<TimeSeriesResponsePublicRingBatteryLevelRow>,
5223        #[serde(
5224            flatten,
5225            default,
5226            skip_serializing_if = "::std::option::Option::is_none"
5227        )]
5228        pub subtype_1: ::std::option::Option<TimeSeriesResponseDict>,
5229    }
5230
5231    impl :: std :: default :: Default for ResponseSandboxMultipleRingBatteryLevelDocumentsV2SandboxUsercollectionRingBatteryLevelGet { fn default () -> Self { Self { subtype_0 : Default :: default () , subtype_1 : Default :: default () , } } }
5232    #[doc = "A TagModel maps to an ASSANote. An ASSANote in ExtAPIV2 is called a Tag\nA TagModel will be populated by data from an ASSANote\nThe fields in the TagModel map to fields in an ASSANote"]
5233    #[doc = r""]
5234    #[doc = r" <details><summary>JSON schema</summary>"]
5235    #[doc = r""]
5236    #[doc = r" ```json"]
5237    #[doc = "{"]
5238    #[doc = "  \"title\": \"TagModel\","]
5239    #[doc = "  \"description\": \"A TagModel maps to an ASSANote. An ASSANote in ExtAPIV2 is called a Tag\\nA TagModel will be populated by data from an ASSANote\\nThe fields in the TagModel map to fields in an ASSANote\","]
5240    #[doc = "  \"type\": \"object\","]
5241    #[doc = "  \"required\": ["]
5242    #[doc = "    \"day\","]
5243    #[doc = "    \"id\","]
5244    #[doc = "    \"tags\","]
5245    #[doc = "    \"text\","]
5246    #[doc = "    \"timestamp\""]
5247    #[doc = "  ],"]
5248    #[doc = "  \"properties\": {"]
5249    #[doc = "    \"day\": {"]
5250    #[doc = "      \"title\": \"Day\","]
5251    #[doc = "      \"description\": \"Day that the note belongs to.\","]
5252    #[doc = "      \"type\": \"string\","]
5253    #[doc = "      \"format\": \"date\""]
5254    #[doc = "    },"]
5255    #[doc = "    \"id\": {"]
5256    #[doc = "      \"title\": \"Id\","]
5257    #[doc = "      \"type\": \"string\""]
5258    #[doc = "    },"]
5259    #[doc = "    \"tags\": {"]
5260    #[doc = "      \"title\": \"Tags\","]
5261    #[doc = "      \"description\": \"Selected tags for the tag.\","]
5262    #[doc = "      \"type\": \"array\","]
5263    #[doc = "      \"items\": {"]
5264    #[doc = "        \"type\": \"string\""]
5265    #[doc = "      }"]
5266    #[doc = "    },"]
5267    #[doc = "    \"text\": {"]
5268    #[doc = "      \"title\": \"Text\","]
5269    #[doc = "      \"description\": \"Textual contents of the note.\","]
5270    #[doc = "      \"type\": ["]
5271    #[doc = "        \"string\","]
5272    #[doc = "        \"null\""]
5273    #[doc = "      ]"]
5274    #[doc = "    },"]
5275    #[doc = "    \"timestamp\": {"]
5276    #[doc = "      \"$ref\": \"#/components/schemas/LocalDateTime\""]
5277    #[doc = "    }"]
5278    #[doc = "  }"]
5279    #[doc = "}"]
5280    #[doc = r" ```"]
5281    #[doc = r" </details>"]
5282    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5283    pub struct TagModel {
5284        #[doc = "Day that the note belongs to."]
5285        pub day: ::chrono::naive::NaiveDate,
5286        pub id: ::std::string::String,
5287        #[doc = "Selected tags for the tag."]
5288        pub tags: ::std::vec::Vec<::std::string::String>,
5289        #[doc = "Textual contents of the note."]
5290        pub text: ::std::option::Option<::std::string::String>,
5291        pub timestamp: LocalDateTime,
5292    }
5293
5294    #[doc = "`TimeSeriesResponseDict`"]
5295    #[doc = r""]
5296    #[doc = r" <details><summary>JSON schema</summary>"]
5297    #[doc = r""]
5298    #[doc = r" ```json"]
5299    #[doc = "{"]
5300    #[doc = "  \"title\": \"TimeSeriesResponseDict\","]
5301    #[doc = "  \"type\": \"object\","]
5302    #[doc = "  \"required\": ["]
5303    #[doc = "    \"data\""]
5304    #[doc = "  ],"]
5305    #[doc = "  \"properties\": {"]
5306    #[doc = "    \"data\": {"]
5307    #[doc = "      \"title\": \"Data\","]
5308    #[doc = "      \"type\": \"array\","]
5309    #[doc = "      \"items\": {"]
5310    #[doc = "        \"type\": \"object\","]
5311    #[doc = "        \"additionalProperties\": true"]
5312    #[doc = "      }"]
5313    #[doc = "    },"]
5314    #[doc = "    \"next_token\": {"]
5315    #[doc = "      \"title\": \"Next Token\","]
5316    #[doc = "      \"type\": ["]
5317    #[doc = "        \"string\","]
5318    #[doc = "        \"null\""]
5319    #[doc = "      ]"]
5320    #[doc = "    }"]
5321    #[doc = "  }"]
5322    #[doc = "}"]
5323    #[doc = r" ```"]
5324    #[doc = r" </details>"]
5325    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5326    pub struct TimeSeriesResponseDict {
5327        pub data: ::std::vec::Vec<::serde_json::Map<::std::string::String, ::serde_json::Value>>,
5328        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5329        pub next_token: ::std::option::Option<::std::string::String>,
5330    }
5331
5332    #[doc = "`TimeSeriesResponsePublicHeartRateRow`"]
5333    #[doc = r""]
5334    #[doc = r" <details><summary>JSON schema</summary>"]
5335    #[doc = r""]
5336    #[doc = r" ```json"]
5337    #[doc = "{"]
5338    #[doc = "  \"title\": \"TimeSeriesResponse[PublicHeartRateRow]\","]
5339    #[doc = "  \"type\": \"object\","]
5340    #[doc = "  \"required\": ["]
5341    #[doc = "    \"data\""]
5342    #[doc = "  ],"]
5343    #[doc = "  \"properties\": {"]
5344    #[doc = "    \"data\": {"]
5345    #[doc = "      \"title\": \"Data\","]
5346    #[doc = "      \"type\": \"array\","]
5347    #[doc = "      \"items\": {"]
5348    #[doc = "        \"$ref\": \"#/components/schemas/PublicHeartRateRow\""]
5349    #[doc = "      }"]
5350    #[doc = "    },"]
5351    #[doc = "    \"next_token\": {"]
5352    #[doc = "      \"title\": \"Next Token\","]
5353    #[doc = "      \"type\": ["]
5354    #[doc = "        \"string\","]
5355    #[doc = "        \"null\""]
5356    #[doc = "      ]"]
5357    #[doc = "    }"]
5358    #[doc = "  }"]
5359    #[doc = "}"]
5360    #[doc = r" ```"]
5361    #[doc = r" </details>"]
5362    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5363    pub struct TimeSeriesResponsePublicHeartRateRow {
5364        pub data: ::std::vec::Vec<PublicHeartRateRow>,
5365        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5366        pub next_token: ::std::option::Option<::std::string::String>,
5367    }
5368
5369    #[doc = "`TimeSeriesResponsePublicRingBatteryLevelRow`"]
5370    #[doc = r""]
5371    #[doc = r" <details><summary>JSON schema</summary>"]
5372    #[doc = r""]
5373    #[doc = r" ```json"]
5374    #[doc = "{"]
5375    #[doc = "  \"title\": \"TimeSeriesResponse[PublicRingBatteryLevelRow]\","]
5376    #[doc = "  \"type\": \"object\","]
5377    #[doc = "  \"required\": ["]
5378    #[doc = "    \"data\""]
5379    #[doc = "  ],"]
5380    #[doc = "  \"properties\": {"]
5381    #[doc = "    \"data\": {"]
5382    #[doc = "      \"title\": \"Data\","]
5383    #[doc = "      \"type\": \"array\","]
5384    #[doc = "      \"items\": {"]
5385    #[doc = "        \"$ref\": \"#/components/schemas/PublicRingBatteryLevelRow\""]
5386    #[doc = "      }"]
5387    #[doc = "    },"]
5388    #[doc = "    \"next_token\": {"]
5389    #[doc = "      \"title\": \"Next Token\","]
5390    #[doc = "      \"type\": ["]
5391    #[doc = "        \"string\","]
5392    #[doc = "        \"null\""]
5393    #[doc = "      ]"]
5394    #[doc = "    }"]
5395    #[doc = "  }"]
5396    #[doc = "}"]
5397    #[doc = r" ```"]
5398    #[doc = r" </details>"]
5399    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5400    pub struct TimeSeriesResponsePublicRingBatteryLevelRow {
5401        pub data: ::std::vec::Vec<PublicRingBatteryLevelRow>,
5402        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5403        pub next_token: ::std::option::Option<::std::string::String>,
5404    }
5405
5406    #[doc = "`UpdateWebhookSubscriptionRequest`"]
5407    #[doc = r""]
5408    #[doc = r" <details><summary>JSON schema</summary>"]
5409    #[doc = r""]
5410    #[doc = r" ```json"]
5411    #[doc = "{"]
5412    #[doc = "  \"title\": \"UpdateWebhookSubscriptionRequest\","]
5413    #[doc = "  \"type\": \"object\","]
5414    #[doc = "  \"required\": ["]
5415    #[doc = "    \"verification_token\""]
5416    #[doc = "  ],"]
5417    #[doc = "  \"properties\": {"]
5418    #[doc = "    \"callback_url\": {"]
5419    #[doc = "      \"title\": \"Callback Url\","]
5420    #[doc = "      \"type\": ["]
5421    #[doc = "        \"string\","]
5422    #[doc = "        \"null\""]
5423    #[doc = "      ]"]
5424    #[doc = "    },"]
5425    #[doc = "    \"data_type\": {"]
5426    #[doc = "      \"oneOf\": ["]
5427    #[doc = "        {"]
5428    #[doc = "          \"type\": \"null\""]
5429    #[doc = "        },"]
5430    #[doc = "        {"]
5431    #[doc = "          \"allOf\": ["]
5432    #[doc = "            {"]
5433    #[doc = "              \"$ref\": \"#/components/schemas/ExtApiV2DataType\""]
5434    #[doc = "            }"]
5435    #[doc = "          ]"]
5436    #[doc = "        }"]
5437    #[doc = "      ]"]
5438    #[doc = "    },"]
5439    #[doc = "    \"event_type\": {"]
5440    #[doc = "      \"oneOf\": ["]
5441    #[doc = "        {"]
5442    #[doc = "          \"type\": \"null\""]
5443    #[doc = "        },"]
5444    #[doc = "        {"]
5445    #[doc = "          \"allOf\": ["]
5446    #[doc = "            {"]
5447    #[doc = "              \"$ref\": \"#/components/schemas/WebhookOperation\""]
5448    #[doc = "            }"]
5449    #[doc = "          ]"]
5450    #[doc = "        }"]
5451    #[doc = "      ]"]
5452    #[doc = "    },"]
5453    #[doc = "    \"verification_token\": {"]
5454    #[doc = "      \"title\": \"Verification Token\","]
5455    #[doc = "      \"type\": \"string\""]
5456    #[doc = "    }"]
5457    #[doc = "  }"]
5458    #[doc = "}"]
5459    #[doc = r" ```"]
5460    #[doc = r" </details>"]
5461    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5462    pub struct UpdateWebhookSubscriptionRequest {
5463        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5464        pub callback_url: ::std::option::Option<::std::string::String>,
5465        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5466        pub data_type: ::std::option::Option<ExtApiV2DataType>,
5467        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5468        pub event_type: ::std::option::Option<WebhookOperation>,
5469        pub verification_token: ::std::string::String,
5470    }
5471
5472    #[doc = "`UtcDateTime`"]
5473    #[doc = r""]
5474    #[doc = r" <details><summary>JSON schema</summary>"]
5475    #[doc = r""]
5476    #[doc = r" ```json"]
5477    #[doc = "{"]
5478    #[doc = "  \"type\": \"string\""]
5479    #[doc = "}"]
5480    #[doc = r" ```"]
5481    #[doc = r" </details>"]
5482    #[derive(
5483        :: serde :: Deserialize,
5484        :: serde :: Serialize,
5485        Clone,
5486        Debug,
5487        Eq,
5488        Hash,
5489        Ord,
5490        PartialEq,
5491        PartialOrd,
5492    )]
5493    #[serde(transparent)]
5494    pub struct UtcDateTime(pub ::std::string::String);
5495    impl ::std::ops::Deref for UtcDateTime {
5496        type Target = ::std::string::String;
5497        fn deref(&self) -> &::std::string::String {
5498            &self.0
5499        }
5500    }
5501
5502    impl ::std::convert::From<UtcDateTime> for ::std::string::String {
5503        fn from(value: UtcDateTime) -> Self {
5504            value.0
5505        }
5506    }
5507
5508    impl ::std::convert::From<::std::string::String> for UtcDateTime {
5509        fn from(value: ::std::string::String) -> Self {
5510            Self(value)
5511        }
5512    }
5513
5514    impl ::std::str::FromStr for UtcDateTime {
5515        type Err = ::std::convert::Infallible;
5516        fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
5517            Ok(Self(value.to_string()))
5518        }
5519    }
5520
5521    impl ::std::fmt::Display for UtcDateTime {
5522        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5523            self.0.fmt(f)
5524        }
5525    }
5526
5527    #[doc = "`ValidationError`"]
5528    #[doc = r""]
5529    #[doc = r" <details><summary>JSON schema</summary>"]
5530    #[doc = r""]
5531    #[doc = r" ```json"]
5532    #[doc = "{"]
5533    #[doc = "  \"title\": \"ValidationError\","]
5534    #[doc = "  \"type\": \"object\","]
5535    #[doc = "  \"required\": ["]
5536    #[doc = "    \"loc\","]
5537    #[doc = "    \"msg\","]
5538    #[doc = "    \"type\""]
5539    #[doc = "  ],"]
5540    #[doc = "  \"properties\": {"]
5541    #[doc = "    \"ctx\": {"]
5542    #[doc = "      \"title\": \"Context\","]
5543    #[doc = "      \"type\": \"object\""]
5544    #[doc = "    },"]
5545    #[doc = "    \"input\": {"]
5546    #[doc = "      \"title\": \"Input\""]
5547    #[doc = "    },"]
5548    #[doc = "    \"loc\": {"]
5549    #[doc = "      \"title\": \"Location\","]
5550    #[doc = "      \"type\": \"array\","]
5551    #[doc = "      \"items\": {"]
5552    #[doc = "        \"anyOf\": ["]
5553    #[doc = "          {"]
5554    #[doc = "            \"type\": \"string\""]
5555    #[doc = "          },"]
5556    #[doc = "          {"]
5557    #[doc = "            \"type\": \"integer\""]
5558    #[doc = "          }"]
5559    #[doc = "        ]"]
5560    #[doc = "      }"]
5561    #[doc = "    },"]
5562    #[doc = "    \"msg\": {"]
5563    #[doc = "      \"title\": \"Message\","]
5564    #[doc = "      \"type\": \"string\""]
5565    #[doc = "    },"]
5566    #[doc = "    \"type\": {"]
5567    #[doc = "      \"title\": \"Error Type\","]
5568    #[doc = "      \"type\": \"string\""]
5569    #[doc = "    }"]
5570    #[doc = "  }"]
5571    #[doc = "}"]
5572    #[doc = r" ```"]
5573    #[doc = r" </details>"]
5574    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5575    pub struct ValidationError {
5576        #[serde(default, skip_serializing_if = "::serde_json::Map::is_empty")]
5577        pub ctx: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
5578        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5579        pub input: ::std::option::Option<::serde_json::Value>,
5580        pub loc: ::std::vec::Vec<LocationItem>,
5581        pub msg: ::std::string::String,
5582        #[serde(rename = "type")]
5583        pub type_: ::std::string::String,
5584    }
5585
5586    #[doc = "`WebhookOperation`"]
5587    #[doc = r""]
5588    #[doc = r" <details><summary>JSON schema</summary>"]
5589    #[doc = r""]
5590    #[doc = r" ```json"]
5591    #[doc = "{"]
5592    #[doc = "  \"title\": \"WebhookOperation\","]
5593    #[doc = "  \"type\": \"string\","]
5594    #[doc = "  \"enum\": ["]
5595    #[doc = "    \"create\","]
5596    #[doc = "    \"update\","]
5597    #[doc = "    \"delete\""]
5598    #[doc = "  ]"]
5599    #[doc = "}"]
5600    #[doc = r" ```"]
5601    #[doc = r" </details>"]
5602    #[derive(
5603        :: serde :: Deserialize,
5604        :: serde :: Serialize,
5605        Clone,
5606        Copy,
5607        Debug,
5608        Eq,
5609        Hash,
5610        Ord,
5611        PartialEq,
5612        PartialOrd,
5613    )]
5614    pub enum WebhookOperation {
5615        #[serde(rename = "create")]
5616        Create,
5617        #[serde(rename = "update")]
5618        Update,
5619        #[serde(rename = "delete")]
5620        Delete,
5621    }
5622
5623    impl ::std::fmt::Display for WebhookOperation {
5624        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5625            match *self {
5626                Self::Create => f.write_str("create"),
5627                Self::Update => f.write_str("update"),
5628                Self::Delete => f.write_str("delete"),
5629            }
5630        }
5631    }
5632
5633    impl ::std::str::FromStr for WebhookOperation {
5634        type Err = self::error::ConversionError;
5635        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5636            match value {
5637                "create" => Ok(Self::Create),
5638                "update" => Ok(Self::Update),
5639                "delete" => Ok(Self::Delete),
5640                _ => Err("invalid value".into()),
5641            }
5642        }
5643    }
5644
5645    impl ::std::convert::TryFrom<&str> for WebhookOperation {
5646        type Error = self::error::ConversionError;
5647        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5648            value.parse()
5649        }
5650    }
5651
5652    impl ::std::convert::TryFrom<&::std::string::String> for WebhookOperation {
5653        type Error = self::error::ConversionError;
5654        fn try_from(
5655            value: &::std::string::String,
5656        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5657            value.parse()
5658        }
5659    }
5660
5661    impl ::std::convert::TryFrom<::std::string::String> for WebhookOperation {
5662        type Error = self::error::ConversionError;
5663        fn try_from(
5664            value: ::std::string::String,
5665        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5666            value.parse()
5667        }
5668    }
5669
5670    #[doc = "`WebhookSubscriptionModel`"]
5671    #[doc = r""]
5672    #[doc = r" <details><summary>JSON schema</summary>"]
5673    #[doc = r""]
5674    #[doc = r" ```json"]
5675    #[doc = "{"]
5676    #[doc = "  \"title\": \"WebhookSubscriptionModel\","]
5677    #[doc = "  \"type\": \"object\","]
5678    #[doc = "  \"required\": ["]
5679    #[doc = "    \"callback_url\","]
5680    #[doc = "    \"data_type\","]
5681    #[doc = "    \"event_type\","]
5682    #[doc = "    \"expiration_time\","]
5683    #[doc = "    \"id\""]
5684    #[doc = "  ],"]
5685    #[doc = "  \"properties\": {"]
5686    #[doc = "    \"callback_url\": {"]
5687    #[doc = "      \"title\": \"Callback Url\","]
5688    #[doc = "      \"type\": \"string\""]
5689    #[doc = "    },"]
5690    #[doc = "    \"data_type\": {"]
5691    #[doc = "      \"$ref\": \"#/components/schemas/ExtApiV2DataType\""]
5692    #[doc = "    },"]
5693    #[doc = "    \"event_type\": {"]
5694    #[doc = "      \"$ref\": \"#/components/schemas/WebhookOperation\""]
5695    #[doc = "    },"]
5696    #[doc = "    \"expiration_time\": {"]
5697    #[doc = "      \"title\": \"Expiration Time\","]
5698    #[doc = "      \"type\": \"string\","]
5699    #[doc = "      \"format\": \"date-time\""]
5700    #[doc = "    },"]
5701    #[doc = "    \"id\": {"]
5702    #[doc = "      \"title\": \"Id\","]
5703    #[doc = "      \"type\": \"string\","]
5704    #[doc = "      \"format\": \"uuid4\""]
5705    #[doc = "    }"]
5706    #[doc = "  }"]
5707    #[doc = "}"]
5708    #[doc = r" ```"]
5709    #[doc = r" </details>"]
5710    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5711    pub struct WebhookSubscriptionModel {
5712        pub callback_url: ::std::string::String,
5713        pub data_type: ExtApiV2DataType,
5714        pub event_type: WebhookOperation,
5715        pub expiration_time: ::chrono::DateTime<::chrono::offset::Utc>,
5716        pub id: ::std::string::String,
5717    }
5718
5719    #[doc = "Unique identifier of the object."]
5720    #[doc = r""]
5721    #[doc = r" <details><summary>JSON schema</summary>"]
5722    #[doc = r""]
5723    #[doc = r" ```json"]
5724    #[doc = "{"]
5725    #[doc = "  \"title\": \"\","]
5726    #[doc = "  \"description\": \"Unique identifier of the object.\","]
5727    #[doc = "  \"type\": \"string\","]
5728    #[doc = "  \"minLength\": 1"]
5729    #[doc = "}"]
5730    #[doc = r" ```"]
5731    #[doc = r" </details>"]
5732    #[derive(:: serde :: Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5733    #[serde(transparent)]
5734    pub struct X(::std::string::String);
5735    impl ::std::ops::Deref for X {
5736        type Target = ::std::string::String;
5737        fn deref(&self) -> &::std::string::String {
5738            &self.0
5739        }
5740    }
5741
5742    impl ::std::convert::From<X> for ::std::string::String {
5743        fn from(value: X) -> Self {
5744            value.0
5745        }
5746    }
5747
5748    impl ::std::str::FromStr for X {
5749        type Err = self::error::ConversionError;
5750        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5751            if value.chars().count() < 1usize {
5752                return Err("shorter than 1 characters".into());
5753            }
5754            Ok(Self(value.to_string()))
5755        }
5756    }
5757
5758    impl ::std::convert::TryFrom<&str> for X {
5759        type Error = self::error::ConversionError;
5760        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5761            value.parse()
5762        }
5763    }
5764
5765    impl ::std::convert::TryFrom<&::std::string::String> for X {
5766        type Error = self::error::ConversionError;
5767        fn try_from(
5768            value: &::std::string::String,
5769        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5770            value.parse()
5771        }
5772    }
5773
5774    impl ::std::convert::TryFrom<::std::string::String> for X {
5775        type Error = self::error::ConversionError;
5776        fn try_from(
5777            value: ::std::string::String,
5778        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5779            value.parse()
5780        }
5781    }
5782
5783    impl<'de> ::serde::Deserialize<'de> for X {
5784        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
5785        where
5786            D: ::serde::Deserializer<'de>,
5787        {
5788            ::std::string::String::deserialize(deserializer)?
5789                .parse()
5790                .map_err(|e: self::error::ConversionError| {
5791                    <D::Error as ::serde::de::Error>::custom(e.to_string())
5792                })
5793        }
5794    }
5795}
5796
5797#[derive(Clone, Debug)]
5798#[doc = "Client for Oura API Documentation\n\n# Overview \nThe Oura API allows Oura users and partner applications to improve their user experience with Oura data.\nThis document describes the Oura API Version 2 (V2), which is the only available integration point for Oura data. The previous V1 API has been sunset.\n# Getting Started \n## What is an API?\nAn API (Application Programming Interface) allows different software applications to communicate with each other. The Oura API enables you to access your Oura Ring data programmatically.\n## Quick Start Guide\n1. Register an [API Application](https://cloud.ouraring.com/oauth/applications) and implement OAuth2\n2. **Make Your First API Call**:\n   ```\n   curl -X GET https://api.ouraring.com/v2/usercollection/personal_info \\\n   -H \"Authorization: Bearer YOUR_TOKEN_HERE\" \\\n   -H \"User-Agent: YourAppName/1.0\"\n   ```\n3. **Explore Data Types**:\n   - Browse the available endpoints in this documentation to discover what data you can access\n   - Each endpoint includes example requests and responses\n4. **Set Up Webhooks (Strongly Recommended)**:\n   - Webhooks are the preferred way to consume Oura data\n   - We have not had customers hit rate limits with webhooks properly implemented\n   - Make a single request for historical data when a user first connects, then use webhooks for ongoing updates\n   - Webhook notifications come approximately 30 seconds after data syncs from the mobile app\n   - [Set up webhooks](#tag/Webhook-Subscription-Routes) to receive notifications when data changes\n## Common Questions\n- **Data Delay**: Different data types sync at different times - sleep data requires users to open the Oura app, while daily activity and stress may sync in the background\n# Data Access\nIn order to access data, a registered [API Application](https://cloud.ouraring.com/oauth/applications) is required.\n API Applications are limited to **10** users before requiring approval from Oura. There is no limit once an application is approved.\n Additionally, Oura users **must provide consent** to share each data type an API Application has access to.\nAll data access requests through the Oura API require [Authentication](https://cloud.ouraring.com/docs/authentication).\nAdditionally, we recommend that Oura users keep their mobile app updated to support API access for the latest data types.\n# Authentication\nThe Oura Cloud API supports authentication through the industry-standard OAuth2 protocol. For more information, see our [Authentication instructions](https://cloud.ouraring.com/docs/authentication).\nAccess tokens must be included in the request header as follows:\n```http\nGET /v2/usercollection/personal_info HTTP/1.1\nHost: api.ouraring.com\nAuthorization: Bearer <token>\nUser-Agent: YourAppName/1.0\n```\nPlease note that personal access tokens were deprecated in December 2025 and are no longer available for use.\n# User-Agent Header\nEvery request must include a `User-Agent` header that identifies your application, for example `User-Agent: YourAppName/1.0`. Requests without one may be rejected. Not every HTTP library sends a default value, so set it explicitly rather than relying on the default. Browsers set their own `User-Agent` automatically; every other client (server-side code, scripts, native apps) must set it.\n\n# Oura HTTP Response Codes\n| Response Code                        | Description |\n| ------------------------------------ | - |\n| 200 OK                               | Successful Response         |\n| 400 Query Parameter Validation Error | The request contains query parameters that are invalid or incorrectly formatted. |\n| 401 Unauthorized                     | Invalid or expired authentication token. |\n| 403 Forbidden                        | The requested resource requires additional permissions or the user's Oura subscription has expired. |\n| 429 Too Many Requests                | Rate limit exceeded. See response headers for retry guidance. |\n\n## Rate Limits\nThe API enforces rate limits at two layers to ensure fair access across all applications:\n- a per-access-token limit, which throttles single-token floods, and\n- a per-application limit, which caps the aggregate traffic across all of an application's end-user tokens so one fan-out app can't dominate shared capacity.\n\nA request that trips either layer receives a `429 Too Many Requests`. The `X-RateLimit-Tier` response header identifies which layer fired.\n\nIf your application regularly approaches rate limits, [webhooks](#tag/Webhook-Subscription-Routes) are strongly recommended — most applications that implement webhooks correctly do not encounter rate limit issues.\n\n[Contact us](mailto:api-support@ouraring.com) if you expect your usage to require higher limits.\n\n## Rate Limit Response Headers\nWhen a `429 Too Many Requests` response is returned, five headers are included to guide retries. Prefer these over fixed-interval backoff:\n- **`Retry-After`** — integer seconds to wait before retrying. RFC 7231-compliant; safe to feed directly into your client's backoff logic.\n- **`X-RateLimit-Limit`** — the request ceiling for the current window.\n- **`X-RateLimit-Window`** — the rolling window length in seconds that the ceiling applies to.\n- **`X-RateLimit-Reset`** — Unix epoch (seconds) at which the window resets and quota is fully restored.\n- **`X-RateLimit-Tier`** — identifies which limit was exceeded, useful when contacting support.\n\n\nhttps://cloud.ouraring.com/legal/api-agreement\n\nVersion: 2.0"]
5799pub struct Client {
5800    pub(crate) baseurl: String,
5801    pub(crate) client: reqwest::Client,
5802}
5803
5804impl Client {
5805    #[doc = r" Create a new client."]
5806    #[doc = r""]
5807    #[doc = r" `baseurl` is the base URL provided to the internal"]
5808    #[doc = r" `reqwest::Client`, and should include a scheme and hostname,"]
5809    #[doc = r" as well as port and a path stem if applicable."]
5810    pub fn new(baseurl: &str) -> Self {
5811        #[cfg(not(target_arch = "wasm32"))]
5812        let client = {
5813            let dur = ::std::time::Duration::from_secs(15u64);
5814            reqwest::ClientBuilder::new()
5815                .connect_timeout(dur)
5816                .timeout(dur)
5817        };
5818        #[cfg(target_arch = "wasm32")]
5819        let client = reqwest::ClientBuilder::new();
5820        Self::new_with_client(baseurl, client.build().unwrap())
5821    }
5822
5823    #[doc = r" Construct a new client with an existing `reqwest::Client`,"]
5824    #[doc = r" allowing more control over its configuration."]
5825    #[doc = r""]
5826    #[doc = r" `baseurl` is the base URL provided to the internal"]
5827    #[doc = r" `reqwest::Client`, and should include a scheme and hostname,"]
5828    #[doc = r" as well as port and a path stem if applicable."]
5829    pub fn new_with_client(baseurl: &str, client: reqwest::Client) -> Self {
5830        Self {
5831            baseurl: baseurl.to_string(),
5832            client,
5833        }
5834    }
5835}
5836
5837impl ClientInfo<()> for Client {
5838    fn api_version() -> &'static str {
5839        "2.0"
5840    }
5841
5842    fn baseurl(&self) -> &str {
5843        self.baseurl.as_str()
5844    }
5845
5846    fn client(&self) -> &reqwest::Client {
5847        &self.client
5848    }
5849
5850    fn inner(&self) -> &() {
5851        &()
5852    }
5853}
5854
5855impl ClientHooks<()> for &Client {}
5856#[allow(clippy::all)]
5857impl Client {
5858    #[doc = "Sandbox - Multiple Daily Activity Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_activity`\n\n"]
5859    pub async fn sandbox_multiple_daily_activity_documents_v2_sandbox_usercollection_daily_activity_get<
5860        'a,
5861    >(
5862        &'a self,
5863        end_date: Option<&'a ::chrono::naive::NaiveDate>,
5864        next_token: Option<&'a str>,
5865        start_date: Option<&'a ::chrono::naive::NaiveDate>,
5866    ) -> Result<
5867        ResponseValue<types::MultiDocumentResponsePublicDailyActivity>,
5868        Error<types::HttpValidationError>,
5869    > {
5870        let url = format!("{}/v2/sandbox/usercollection/daily_activity", self.baseurl,);
5871        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
5872        header_map.append(
5873            ::reqwest::header::HeaderName::from_static("api-version"),
5874            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
5875        );
5876        #[allow(unused_mut)]
5877        let mut request = self
5878            .client
5879            .get(url)
5880            .header(
5881                ::reqwest::header::ACCEPT,
5882                ::reqwest::header::HeaderValue::from_static("application/json"),
5883            )
5884            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
5885            .query(&progenitor_client::QueryParam::new(
5886                "next_token",
5887                &next_token,
5888            ))
5889            .query(&progenitor_client::QueryParam::new(
5890                "start_date",
5891                &start_date,
5892            ))
5893            .headers(header_map)
5894            .build()?;
5895        let info = OperationInfo { operation_id : "sandbox_multiple_daily_activity_documents_v2_sandbox_usercollection_daily_activity_get" , } ;
5896        self.pre(&mut request, &info).await?;
5897        let result = self.exec(request, &info).await;
5898        self.post(&result, &info).await?;
5899        let response = result?;
5900        match response.status().as_u16() {
5901            200u16 => ResponseValue::from_response(response).await,
5902            422u16 => Err(Error::ErrorResponse(
5903                ResponseValue::from_response(response).await?,
5904            )),
5905            _ => Err(Error::UnexpectedResponse(response)),
5906        }
5907    }
5908
5909    #[doc = "Sandbox - Single Daily Activity Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_activity/{document_id}`\n\n"]
5910    pub async fn sandbox_single_daily_activity_document_v2_sandbox_usercollection_daily_activity_document_id_get<
5911        'a,
5912    >(
5913        &'a self,
5914        document_id: &'a str,
5915    ) -> Result<ResponseValue<types::PublicDailyActivity>, Error<types::HttpValidationError>> {
5916        let url = format!(
5917            "{}/v2/sandbox/usercollection/daily_activity/{}",
5918            self.baseurl,
5919            encode_path(&document_id.to_string()),
5920        );
5921        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
5922        header_map.append(
5923            ::reqwest::header::HeaderName::from_static("api-version"),
5924            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
5925        );
5926        #[allow(unused_mut)]
5927        let mut request = self
5928            .client
5929            .get(url)
5930            .header(
5931                ::reqwest::header::ACCEPT,
5932                ::reqwest::header::HeaderValue::from_static("application/json"),
5933            )
5934            .headers(header_map)
5935            .build()?;
5936        let info = OperationInfo { operation_id : "sandbox_single_daily_activity_document_v2_sandbox_usercollection_daily_activity_document_id_get" , } ;
5937        self.pre(&mut request, &info).await?;
5938        let result = self.exec(request, &info).await;
5939        self.post(&result, &info).await?;
5940        let response = result?;
5941        match response.status().as_u16() {
5942            200u16 => ResponseValue::from_response(response).await,
5943            422u16 => Err(Error::ErrorResponse(
5944                ResponseValue::from_response(response).await?,
5945            )),
5946            _ => Err(Error::UnexpectedResponse(response)),
5947        }
5948    }
5949
5950    #[doc = "Sandbox - Multiple Daily Cardiovascular Age Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_cardiovascular_age`\n\n"]
5951    pub async fn sandbox_multiple_daily_cardiovascular_age_documents_v2_sandbox_usercollection_daily_cardiovascular_age_get<
5952        'a,
5953    >(
5954        &'a self,
5955        end_date: Option<&'a ::chrono::naive::NaiveDate>,
5956        next_token: Option<&'a str>,
5957        start_date: Option<&'a ::chrono::naive::NaiveDate>,
5958    ) -> Result<
5959        ResponseValue<types::MultiDocumentResponsePublicDailyCardiovascularAge>,
5960        Error<types::HttpValidationError>,
5961    > {
5962        let url = format!(
5963            "{}/v2/sandbox/usercollection/daily_cardiovascular_age",
5964            self.baseurl,
5965        );
5966        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
5967        header_map.append(
5968            ::reqwest::header::HeaderName::from_static("api-version"),
5969            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
5970        );
5971        #[allow(unused_mut)]
5972        let mut request = self
5973            .client
5974            .get(url)
5975            .header(
5976                ::reqwest::header::ACCEPT,
5977                ::reqwest::header::HeaderValue::from_static("application/json"),
5978            )
5979            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
5980            .query(&progenitor_client::QueryParam::new(
5981                "next_token",
5982                &next_token,
5983            ))
5984            .query(&progenitor_client::QueryParam::new(
5985                "start_date",
5986                &start_date,
5987            ))
5988            .headers(header_map)
5989            .build()?;
5990        let info = OperationInfo { operation_id : "sandbox_multiple_daily_cardiovascular_age_documents_v2_sandbox_usercollection_daily_cardiovascular_age_get" , } ;
5991        self.pre(&mut request, &info).await?;
5992        let result = self.exec(request, &info).await;
5993        self.post(&result, &info).await?;
5994        let response = result?;
5995        match response.status().as_u16() {
5996            200u16 => ResponseValue::from_response(response).await,
5997            422u16 => Err(Error::ErrorResponse(
5998                ResponseValue::from_response(response).await?,
5999            )),
6000            _ => Err(Error::UnexpectedResponse(response)),
6001        }
6002    }
6003
6004    #[doc = "Sandbox - Single Daily Cardiovascular Age Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_cardiovascular_age/{document_id}`\n\n"]
6005    pub async fn sandbox_single_daily_cardiovascular_age_document_v2_sandbox_usercollection_daily_cardiovascular_age_document_id_get<
6006        'a,
6007    >(
6008        &'a self,
6009        document_id: &'a str,
6010    ) -> Result<ResponseValue<types::PublicDailyCardiovascularAge>, Error<types::HttpValidationError>>
6011    {
6012        let url = format!(
6013            "{}/v2/sandbox/usercollection/daily_cardiovascular_age/{}",
6014            self.baseurl,
6015            encode_path(&document_id.to_string()),
6016        );
6017        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6018        header_map.append(
6019            ::reqwest::header::HeaderName::from_static("api-version"),
6020            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6021        );
6022        #[allow(unused_mut)]
6023        let mut request = self
6024            .client
6025            .get(url)
6026            .header(
6027                ::reqwest::header::ACCEPT,
6028                ::reqwest::header::HeaderValue::from_static("application/json"),
6029            )
6030            .headers(header_map)
6031            .build()?;
6032        let info = OperationInfo { operation_id : "sandbox_single_daily_cardiovascular_age_document_v2_sandbox_usercollection_daily_cardiovascular_age_document_id_get" , } ;
6033        self.pre(&mut request, &info).await?;
6034        let result = self.exec(request, &info).await;
6035        self.post(&result, &info).await?;
6036        let response = result?;
6037        match response.status().as_u16() {
6038            200u16 => ResponseValue::from_response(response).await,
6039            422u16 => Err(Error::ErrorResponse(
6040                ResponseValue::from_response(response).await?,
6041            )),
6042            _ => Err(Error::UnexpectedResponse(response)),
6043        }
6044    }
6045
6046    #[doc = "Sandbox - Multiple Daily Readiness Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_readiness`\n\n"]
6047    pub async fn sandbox_multiple_daily_readiness_documents_v2_sandbox_usercollection_daily_readiness_get<
6048        'a,
6049    >(
6050        &'a self,
6051        end_date: Option<&'a ::chrono::naive::NaiveDate>,
6052        next_token: Option<&'a str>,
6053        start_date: Option<&'a ::chrono::naive::NaiveDate>,
6054    ) -> Result<
6055        ResponseValue<types::MultiDocumentResponsePublicDailyReadiness>,
6056        Error<types::HttpValidationError>,
6057    > {
6058        let url = format!("{}/v2/sandbox/usercollection/daily_readiness", self.baseurl,);
6059        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6060        header_map.append(
6061            ::reqwest::header::HeaderName::from_static("api-version"),
6062            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6063        );
6064        #[allow(unused_mut)]
6065        let mut request = self
6066            .client
6067            .get(url)
6068            .header(
6069                ::reqwest::header::ACCEPT,
6070                ::reqwest::header::HeaderValue::from_static("application/json"),
6071            )
6072            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
6073            .query(&progenitor_client::QueryParam::new(
6074                "next_token",
6075                &next_token,
6076            ))
6077            .query(&progenitor_client::QueryParam::new(
6078                "start_date",
6079                &start_date,
6080            ))
6081            .headers(header_map)
6082            .build()?;
6083        let info = OperationInfo { operation_id : "sandbox_multiple_daily_readiness_documents_v2_sandbox_usercollection_daily_readiness_get" , } ;
6084        self.pre(&mut request, &info).await?;
6085        let result = self.exec(request, &info).await;
6086        self.post(&result, &info).await?;
6087        let response = result?;
6088        match response.status().as_u16() {
6089            200u16 => ResponseValue::from_response(response).await,
6090            422u16 => Err(Error::ErrorResponse(
6091                ResponseValue::from_response(response).await?,
6092            )),
6093            _ => Err(Error::UnexpectedResponse(response)),
6094        }
6095    }
6096
6097    #[doc = "Sandbox - Single Daily Readiness Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_readiness/{document_id}`\n\n"]
6098    pub async fn sandbox_single_daily_readiness_document_v2_sandbox_usercollection_daily_readiness_document_id_get<
6099        'a,
6100    >(
6101        &'a self,
6102        document_id: &'a str,
6103    ) -> Result<ResponseValue<types::PublicDailyReadiness>, Error<types::HttpValidationError>> {
6104        let url = format!(
6105            "{}/v2/sandbox/usercollection/daily_readiness/{}",
6106            self.baseurl,
6107            encode_path(&document_id.to_string()),
6108        );
6109        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6110        header_map.append(
6111            ::reqwest::header::HeaderName::from_static("api-version"),
6112            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6113        );
6114        #[allow(unused_mut)]
6115        let mut request = self
6116            .client
6117            .get(url)
6118            .header(
6119                ::reqwest::header::ACCEPT,
6120                ::reqwest::header::HeaderValue::from_static("application/json"),
6121            )
6122            .headers(header_map)
6123            .build()?;
6124        let info = OperationInfo { operation_id : "sandbox_single_daily_readiness_document_v2_sandbox_usercollection_daily_readiness_document_id_get" , } ;
6125        self.pre(&mut request, &info).await?;
6126        let result = self.exec(request, &info).await;
6127        self.post(&result, &info).await?;
6128        let response = result?;
6129        match response.status().as_u16() {
6130            200u16 => ResponseValue::from_response(response).await,
6131            422u16 => Err(Error::ErrorResponse(
6132                ResponseValue::from_response(response).await?,
6133            )),
6134            _ => Err(Error::UnexpectedResponse(response)),
6135        }
6136    }
6137
6138    #[doc = "Sandbox - Multiple Daily Resilience Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_resilience`\n\n"]
6139    pub async fn sandbox_multiple_daily_resilience_documents_v2_sandbox_usercollection_daily_resilience_get<
6140        'a,
6141    >(
6142        &'a self,
6143        end_date: Option<&'a ::chrono::naive::NaiveDate>,
6144        next_token: Option<&'a str>,
6145        start_date: Option<&'a ::chrono::naive::NaiveDate>,
6146    ) -> Result<
6147        ResponseValue<types::MultiDocumentResponseDailyResilienceModel>,
6148        Error<types::HttpValidationError>,
6149    > {
6150        let url = format!(
6151            "{}/v2/sandbox/usercollection/daily_resilience",
6152            self.baseurl,
6153        );
6154        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6155        header_map.append(
6156            ::reqwest::header::HeaderName::from_static("api-version"),
6157            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6158        );
6159        #[allow(unused_mut)]
6160        let mut request = self
6161            .client
6162            .get(url)
6163            .header(
6164                ::reqwest::header::ACCEPT,
6165                ::reqwest::header::HeaderValue::from_static("application/json"),
6166            )
6167            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
6168            .query(&progenitor_client::QueryParam::new(
6169                "next_token",
6170                &next_token,
6171            ))
6172            .query(&progenitor_client::QueryParam::new(
6173                "start_date",
6174                &start_date,
6175            ))
6176            .headers(header_map)
6177            .build()?;
6178        let info = OperationInfo { operation_id : "sandbox_multiple_daily_resilience_documents_v2_sandbox_usercollection_daily_resilience_get" , } ;
6179        self.pre(&mut request, &info).await?;
6180        let result = self.exec(request, &info).await;
6181        self.post(&result, &info).await?;
6182        let response = result?;
6183        match response.status().as_u16() {
6184            200u16 => ResponseValue::from_response(response).await,
6185            422u16 => Err(Error::ErrorResponse(
6186                ResponseValue::from_response(response).await?,
6187            )),
6188            _ => Err(Error::UnexpectedResponse(response)),
6189        }
6190    }
6191
6192    #[doc = "Sandbox - Single Daily Resilience Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_resilience/{document_id}`\n\n"]
6193    pub async fn sandbox_single_daily_resilience_document_v2_sandbox_usercollection_daily_resilience_document_id_get<
6194        'a,
6195    >(
6196        &'a self,
6197        document_id: &'a str,
6198    ) -> Result<ResponseValue<types::DailyResilienceModel>, Error<types::HttpValidationError>> {
6199        let url = format!(
6200            "{}/v2/sandbox/usercollection/daily_resilience/{}",
6201            self.baseurl,
6202            encode_path(&document_id.to_string()),
6203        );
6204        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6205        header_map.append(
6206            ::reqwest::header::HeaderName::from_static("api-version"),
6207            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6208        );
6209        #[allow(unused_mut)]
6210        let mut request = self
6211            .client
6212            .get(url)
6213            .header(
6214                ::reqwest::header::ACCEPT,
6215                ::reqwest::header::HeaderValue::from_static("application/json"),
6216            )
6217            .headers(header_map)
6218            .build()?;
6219        let info = OperationInfo { operation_id : "sandbox_single_daily_resilience_document_v2_sandbox_usercollection_daily_resilience_document_id_get" , } ;
6220        self.pre(&mut request, &info).await?;
6221        let result = self.exec(request, &info).await;
6222        self.post(&result, &info).await?;
6223        let response = result?;
6224        match response.status().as_u16() {
6225            200u16 => ResponseValue::from_response(response).await,
6226            422u16 => Err(Error::ErrorResponse(
6227                ResponseValue::from_response(response).await?,
6228            )),
6229            _ => Err(Error::UnexpectedResponse(response)),
6230        }
6231    }
6232
6233    #[doc = "Sandbox - Multiple Daily Sleep Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_sleep`\n\n"]
6234    pub async fn sandbox_multiple_daily_sleep_documents_v2_sandbox_usercollection_daily_sleep_get<
6235        'a,
6236    >(
6237        &'a self,
6238        end_date: Option<&'a ::chrono::naive::NaiveDate>,
6239        next_token: Option<&'a str>,
6240        start_date: Option<&'a ::chrono::naive::NaiveDate>,
6241    ) -> Result<
6242        ResponseValue<types::MultiDocumentResponsePublicDailySleep>,
6243        Error<types::HttpValidationError>,
6244    > {
6245        let url = format!("{}/v2/sandbox/usercollection/daily_sleep", self.baseurl,);
6246        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6247        header_map.append(
6248            ::reqwest::header::HeaderName::from_static("api-version"),
6249            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6250        );
6251        #[allow(unused_mut)]
6252        let mut request = self
6253            .client
6254            .get(url)
6255            .header(
6256                ::reqwest::header::ACCEPT,
6257                ::reqwest::header::HeaderValue::from_static("application/json"),
6258            )
6259            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
6260            .query(&progenitor_client::QueryParam::new(
6261                "next_token",
6262                &next_token,
6263            ))
6264            .query(&progenitor_client::QueryParam::new(
6265                "start_date",
6266                &start_date,
6267            ))
6268            .headers(header_map)
6269            .build()?;
6270        let info = OperationInfo {
6271            operation_id:
6272                "sandbox_multiple_daily_sleep_documents_v2_sandbox_usercollection_daily_sleep_get",
6273        };
6274        self.pre(&mut request, &info).await?;
6275        let result = self.exec(request, &info).await;
6276        self.post(&result, &info).await?;
6277        let response = result?;
6278        match response.status().as_u16() {
6279            200u16 => ResponseValue::from_response(response).await,
6280            422u16 => Err(Error::ErrorResponse(
6281                ResponseValue::from_response(response).await?,
6282            )),
6283            _ => Err(Error::UnexpectedResponse(response)),
6284        }
6285    }
6286
6287    #[doc = "Sandbox - Single Daily Sleep Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_sleep/{document_id}`\n\n"]
6288    pub async fn sandbox_single_daily_sleep_document_v2_sandbox_usercollection_daily_sleep_document_id_get<
6289        'a,
6290    >(
6291        &'a self,
6292        document_id: &'a str,
6293    ) -> Result<ResponseValue<types::PublicDailySleep>, Error<types::HttpValidationError>> {
6294        let url = format!(
6295            "{}/v2/sandbox/usercollection/daily_sleep/{}",
6296            self.baseurl,
6297            encode_path(&document_id.to_string()),
6298        );
6299        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6300        header_map.append(
6301            ::reqwest::header::HeaderName::from_static("api-version"),
6302            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6303        );
6304        #[allow(unused_mut)]
6305        let mut request = self
6306            .client
6307            .get(url)
6308            .header(
6309                ::reqwest::header::ACCEPT,
6310                ::reqwest::header::HeaderValue::from_static("application/json"),
6311            )
6312            .headers(header_map)
6313            .build()?;
6314        let info = OperationInfo { operation_id : "sandbox_single_daily_sleep_document_v2_sandbox_usercollection_daily_sleep_document_id_get" , } ;
6315        self.pre(&mut request, &info).await?;
6316        let result = self.exec(request, &info).await;
6317        self.post(&result, &info).await?;
6318        let response = result?;
6319        match response.status().as_u16() {
6320            200u16 => ResponseValue::from_response(response).await,
6321            422u16 => Err(Error::ErrorResponse(
6322                ResponseValue::from_response(response).await?,
6323            )),
6324            _ => Err(Error::UnexpectedResponse(response)),
6325        }
6326    }
6327
6328    #[doc = "Sandbox - Multiple Daily Spo2 Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_spo2`\n\n"]
6329    pub async fn sandbox_multiple_daily_spo2_documents_v2_sandbox_usercollection_daily_spo2_get<
6330        'a,
6331    >(
6332        &'a self,
6333        end_date: Option<&'a ::chrono::naive::NaiveDate>,
6334        next_token: Option<&'a str>,
6335        start_date: Option<&'a ::chrono::naive::NaiveDate>,
6336    ) -> Result<
6337        ResponseValue<types::MultiDocumentResponsePublicDailySpO2>,
6338        Error<types::HttpValidationError>,
6339    > {
6340        let url = format!("{}/v2/sandbox/usercollection/daily_spo2", self.baseurl,);
6341        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6342        header_map.append(
6343            ::reqwest::header::HeaderName::from_static("api-version"),
6344            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6345        );
6346        #[allow(unused_mut)]
6347        let mut request = self
6348            .client
6349            .get(url)
6350            .header(
6351                ::reqwest::header::ACCEPT,
6352                ::reqwest::header::HeaderValue::from_static("application/json"),
6353            )
6354            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
6355            .query(&progenitor_client::QueryParam::new(
6356                "next_token",
6357                &next_token,
6358            ))
6359            .query(&progenitor_client::QueryParam::new(
6360                "start_date",
6361                &start_date,
6362            ))
6363            .headers(header_map)
6364            .build()?;
6365        let info = OperationInfo {
6366            operation_id:
6367                "sandbox_multiple_daily_spo2_documents_v2_sandbox_usercollection_daily_spo2_get",
6368        };
6369        self.pre(&mut request, &info).await?;
6370        let result = self.exec(request, &info).await;
6371        self.post(&result, &info).await?;
6372        let response = result?;
6373        match response.status().as_u16() {
6374            200u16 => ResponseValue::from_response(response).await,
6375            422u16 => Err(Error::ErrorResponse(
6376                ResponseValue::from_response(response).await?,
6377            )),
6378            _ => Err(Error::UnexpectedResponse(response)),
6379        }
6380    }
6381
6382    #[doc = "Sandbox - Single Daily Spo2 Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_spo2/{document_id}`\n\n"]
6383    pub async fn sandbox_single_daily_spo2_document_v2_sandbox_usercollection_daily_spo2_document_id_get<
6384        'a,
6385    >(
6386        &'a self,
6387        document_id: &'a str,
6388    ) -> Result<ResponseValue<types::PublicDailySpO2>, Error<types::HttpValidationError>> {
6389        let url = format!(
6390            "{}/v2/sandbox/usercollection/daily_spo2/{}",
6391            self.baseurl,
6392            encode_path(&document_id.to_string()),
6393        );
6394        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6395        header_map.append(
6396            ::reqwest::header::HeaderName::from_static("api-version"),
6397            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6398        );
6399        #[allow(unused_mut)]
6400        let mut request = self
6401            .client
6402            .get(url)
6403            .header(
6404                ::reqwest::header::ACCEPT,
6405                ::reqwest::header::HeaderValue::from_static("application/json"),
6406            )
6407            .headers(header_map)
6408            .build()?;
6409        let info = OperationInfo { operation_id : "sandbox_single_daily_spo2_document_v2_sandbox_usercollection_daily_spo2_document_id_get" , } ;
6410        self.pre(&mut request, &info).await?;
6411        let result = self.exec(request, &info).await;
6412        self.post(&result, &info).await?;
6413        let response = result?;
6414        match response.status().as_u16() {
6415            200u16 => ResponseValue::from_response(response).await,
6416            422u16 => Err(Error::ErrorResponse(
6417                ResponseValue::from_response(response).await?,
6418            )),
6419            _ => Err(Error::UnexpectedResponse(response)),
6420        }
6421    }
6422
6423    #[doc = "Sandbox - Multiple Daily Stress Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_stress`\n\n"]
6424    pub async fn sandbox_multiple_daily_stress_documents_v2_sandbox_usercollection_daily_stress_get<
6425        'a,
6426    >(
6427        &'a self,
6428        end_date: Option<&'a ::chrono::naive::NaiveDate>,
6429        next_token: Option<&'a str>,
6430        start_date: Option<&'a ::chrono::naive::NaiveDate>,
6431    ) -> Result<
6432        ResponseValue<types::MultiDocumentResponsePublicDailyStress>,
6433        Error<types::HttpValidationError>,
6434    > {
6435        let url = format!("{}/v2/sandbox/usercollection/daily_stress", self.baseurl,);
6436        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6437        header_map.append(
6438            ::reqwest::header::HeaderName::from_static("api-version"),
6439            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6440        );
6441        #[allow(unused_mut)]
6442        let mut request = self
6443            .client
6444            .get(url)
6445            .header(
6446                ::reqwest::header::ACCEPT,
6447                ::reqwest::header::HeaderValue::from_static("application/json"),
6448            )
6449            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
6450            .query(&progenitor_client::QueryParam::new(
6451                "next_token",
6452                &next_token,
6453            ))
6454            .query(&progenitor_client::QueryParam::new(
6455                "start_date",
6456                &start_date,
6457            ))
6458            .headers(header_map)
6459            .build()?;
6460        let info = OperationInfo {
6461            operation_id:
6462                "sandbox_multiple_daily_stress_documents_v2_sandbox_usercollection_daily_stress_get",
6463        };
6464        self.pre(&mut request, &info).await?;
6465        let result = self.exec(request, &info).await;
6466        self.post(&result, &info).await?;
6467        let response = result?;
6468        match response.status().as_u16() {
6469            200u16 => ResponseValue::from_response(response).await,
6470            422u16 => Err(Error::ErrorResponse(
6471                ResponseValue::from_response(response).await?,
6472            )),
6473            _ => Err(Error::UnexpectedResponse(response)),
6474        }
6475    }
6476
6477    #[doc = "Sandbox - Single Daily Stress Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_stress/{document_id}`\n\n"]
6478    pub async fn sandbox_single_daily_stress_document_v2_sandbox_usercollection_daily_stress_document_id_get<
6479        'a,
6480    >(
6481        &'a self,
6482        document_id: &'a str,
6483    ) -> Result<ResponseValue<types::PublicDailyStress>, Error<types::HttpValidationError>> {
6484        let url = format!(
6485            "{}/v2/sandbox/usercollection/daily_stress/{}",
6486            self.baseurl,
6487            encode_path(&document_id.to_string()),
6488        );
6489        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6490        header_map.append(
6491            ::reqwest::header::HeaderName::from_static("api-version"),
6492            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6493        );
6494        #[allow(unused_mut)]
6495        let mut request = self
6496            .client
6497            .get(url)
6498            .header(
6499                ::reqwest::header::ACCEPT,
6500                ::reqwest::header::HeaderValue::from_static("application/json"),
6501            )
6502            .headers(header_map)
6503            .build()?;
6504        let info = OperationInfo { operation_id : "sandbox_single_daily_stress_document_v2_sandbox_usercollection_daily_stress_document_id_get" , } ;
6505        self.pre(&mut request, &info).await?;
6506        let result = self.exec(request, &info).await;
6507        self.post(&result, &info).await?;
6508        let response = result?;
6509        match response.status().as_u16() {
6510            200u16 => ResponseValue::from_response(response).await,
6511            422u16 => Err(Error::ErrorResponse(
6512                ResponseValue::from_response(response).await?,
6513            )),
6514            _ => Err(Error::UnexpectedResponse(response)),
6515        }
6516    }
6517
6518    #[doc = "Sandbox - Multiple Enhanced Tag Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/enhanced_tag`\n\n"]
6519    pub async fn sandbox_multiple_enhanced_tag_documents_v2_sandbox_usercollection_enhanced_tag_get<
6520        'a,
6521    >(
6522        &'a self,
6523        end_date: Option<&'a ::chrono::naive::NaiveDate>,
6524        next_token: Option<&'a str>,
6525        start_date: Option<&'a ::chrono::naive::NaiveDate>,
6526    ) -> Result<
6527        ResponseValue<types::MultiDocumentResponseEnhancedTagModel>,
6528        Error<types::HttpValidationError>,
6529    > {
6530        let url = format!("{}/v2/sandbox/usercollection/enhanced_tag", self.baseurl,);
6531        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6532        header_map.append(
6533            ::reqwest::header::HeaderName::from_static("api-version"),
6534            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6535        );
6536        #[allow(unused_mut)]
6537        let mut request = self
6538            .client
6539            .get(url)
6540            .header(
6541                ::reqwest::header::ACCEPT,
6542                ::reqwest::header::HeaderValue::from_static("application/json"),
6543            )
6544            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
6545            .query(&progenitor_client::QueryParam::new(
6546                "next_token",
6547                &next_token,
6548            ))
6549            .query(&progenitor_client::QueryParam::new(
6550                "start_date",
6551                &start_date,
6552            ))
6553            .headers(header_map)
6554            .build()?;
6555        let info = OperationInfo {
6556            operation_id:
6557                "sandbox_multiple_enhanced_tag_documents_v2_sandbox_usercollection_enhanced_tag_get",
6558        };
6559        self.pre(&mut request, &info).await?;
6560        let result = self.exec(request, &info).await;
6561        self.post(&result, &info).await?;
6562        let response = result?;
6563        match response.status().as_u16() {
6564            200u16 => ResponseValue::from_response(response).await,
6565            422u16 => Err(Error::ErrorResponse(
6566                ResponseValue::from_response(response).await?,
6567            )),
6568            _ => Err(Error::UnexpectedResponse(response)),
6569        }
6570    }
6571
6572    #[doc = "Sandbox - Single Enhanced Tag Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/enhanced_tag/{document_id}`\n\n"]
6573    pub async fn sandbox_single_enhanced_tag_document_v2_sandbox_usercollection_enhanced_tag_document_id_get<
6574        'a,
6575    >(
6576        &'a self,
6577        document_id: &'a str,
6578    ) -> Result<ResponseValue<types::EnhancedTagModel>, Error<types::HttpValidationError>> {
6579        let url = format!(
6580            "{}/v2/sandbox/usercollection/enhanced_tag/{}",
6581            self.baseurl,
6582            encode_path(&document_id.to_string()),
6583        );
6584        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6585        header_map.append(
6586            ::reqwest::header::HeaderName::from_static("api-version"),
6587            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6588        );
6589        #[allow(unused_mut)]
6590        let mut request = self
6591            .client
6592            .get(url)
6593            .header(
6594                ::reqwest::header::ACCEPT,
6595                ::reqwest::header::HeaderValue::from_static("application/json"),
6596            )
6597            .headers(header_map)
6598            .build()?;
6599        let info = OperationInfo { operation_id : "sandbox_single_enhanced_tag_document_v2_sandbox_usercollection_enhanced_tag_document_id_get" , } ;
6600        self.pre(&mut request, &info).await?;
6601        let result = self.exec(request, &info).await;
6602        self.post(&result, &info).await?;
6603        let response = result?;
6604        match response.status().as_u16() {
6605            200u16 => ResponseValue::from_response(response).await,
6606            422u16 => Err(Error::ErrorResponse(
6607                ResponseValue::from_response(response).await?,
6608            )),
6609            _ => Err(Error::UnexpectedResponse(response)),
6610        }
6611    }
6612
6613    #[doc = "Sandbox - Multiple Heartrate Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/heartrate`\n\n"]
6614    pub async fn sandbox_multiple_heartrate_documents_v2_sandbox_usercollection_heartrate_get<
6615        'a,
6616    >(
6617        &'a self,
6618        end_datetime: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>,
6619        next_token: Option<&'a str>,
6620        start_datetime: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>,
6621    ) -> Result<
6622        ResponseValue<
6623            types::ResponseSandboxMultipleHeartrateDocumentsV2SandboxUsercollectionHeartrateGet,
6624        >,
6625        Error<types::HttpValidationError>,
6626    > {
6627        let url = format!("{}/v2/sandbox/usercollection/heartrate", self.baseurl,);
6628        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6629        header_map.append(
6630            ::reqwest::header::HeaderName::from_static("api-version"),
6631            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6632        );
6633        #[allow(unused_mut)]
6634        let mut request = self
6635            .client
6636            .get(url)
6637            .header(
6638                ::reqwest::header::ACCEPT,
6639                ::reqwest::header::HeaderValue::from_static("application/json"),
6640            )
6641            .query(&progenitor_client::QueryParam::new(
6642                "end_datetime",
6643                &end_datetime,
6644            ))
6645            .query(&progenitor_client::QueryParam::new(
6646                "next_token",
6647                &next_token,
6648            ))
6649            .query(&progenitor_client::QueryParam::new(
6650                "start_datetime",
6651                &start_datetime,
6652            ))
6653            .headers(header_map)
6654            .build()?;
6655        let info = OperationInfo {
6656            operation_id:
6657                "sandbox_multiple_heartrate_documents_v2_sandbox_usercollection_heartrate_get",
6658        };
6659        self.pre(&mut request, &info).await?;
6660        let result = self.exec(request, &info).await;
6661        self.post(&result, &info).await?;
6662        let response = result?;
6663        match response.status().as_u16() {
6664            200u16 => ResponseValue::from_response(response).await,
6665            422u16 => Err(Error::ErrorResponse(
6666                ResponseValue::from_response(response).await?,
6667            )),
6668            _ => Err(Error::UnexpectedResponse(response)),
6669        }
6670    }
6671
6672    #[doc = "Sandbox - Multiple Rest Mode Period Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/rest_mode_period`\n\n"]
6673    pub async fn sandbox_multiple_rest_mode_period_documents_v2_sandbox_usercollection_rest_mode_period_get<
6674        'a,
6675    >(
6676        &'a self,
6677        end_date: Option<&'a ::chrono::naive::NaiveDate>,
6678        next_token: Option<&'a str>,
6679        start_date: Option<&'a ::chrono::naive::NaiveDate>,
6680    ) -> Result<
6681        ResponseValue<types::MultiDocumentResponsePublicRestModePeriod>,
6682        Error<types::HttpValidationError>,
6683    > {
6684        let url = format!(
6685            "{}/v2/sandbox/usercollection/rest_mode_period",
6686            self.baseurl,
6687        );
6688        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6689        header_map.append(
6690            ::reqwest::header::HeaderName::from_static("api-version"),
6691            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6692        );
6693        #[allow(unused_mut)]
6694        let mut request = self
6695            .client
6696            .get(url)
6697            .header(
6698                ::reqwest::header::ACCEPT,
6699                ::reqwest::header::HeaderValue::from_static("application/json"),
6700            )
6701            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
6702            .query(&progenitor_client::QueryParam::new(
6703                "next_token",
6704                &next_token,
6705            ))
6706            .query(&progenitor_client::QueryParam::new(
6707                "start_date",
6708                &start_date,
6709            ))
6710            .headers(header_map)
6711            .build()?;
6712        let info = OperationInfo { operation_id : "sandbox_multiple_rest_mode_period_documents_v2_sandbox_usercollection_rest_mode_period_get" , } ;
6713        self.pre(&mut request, &info).await?;
6714        let result = self.exec(request, &info).await;
6715        self.post(&result, &info).await?;
6716        let response = result?;
6717        match response.status().as_u16() {
6718            200u16 => ResponseValue::from_response(response).await,
6719            422u16 => Err(Error::ErrorResponse(
6720                ResponseValue::from_response(response).await?,
6721            )),
6722            _ => Err(Error::UnexpectedResponse(response)),
6723        }
6724    }
6725
6726    #[doc = "Sandbox - Single Rest Mode Period Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/rest_mode_period/{document_id}`\n\n"]
6727    pub async fn sandbox_single_rest_mode_period_document_v2_sandbox_usercollection_rest_mode_period_document_id_get<
6728        'a,
6729    >(
6730        &'a self,
6731        document_id: &'a str,
6732    ) -> Result<ResponseValue<types::PublicRestModePeriod>, Error<types::HttpValidationError>> {
6733        let url = format!(
6734            "{}/v2/sandbox/usercollection/rest_mode_period/{}",
6735            self.baseurl,
6736            encode_path(&document_id.to_string()),
6737        );
6738        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6739        header_map.append(
6740            ::reqwest::header::HeaderName::from_static("api-version"),
6741            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6742        );
6743        #[allow(unused_mut)]
6744        let mut request = self
6745            .client
6746            .get(url)
6747            .header(
6748                ::reqwest::header::ACCEPT,
6749                ::reqwest::header::HeaderValue::from_static("application/json"),
6750            )
6751            .headers(header_map)
6752            .build()?;
6753        let info = OperationInfo { operation_id : "sandbox_single_rest_mode_period_document_v2_sandbox_usercollection_rest_mode_period_document_id_get" , } ;
6754        self.pre(&mut request, &info).await?;
6755        let result = self.exec(request, &info).await;
6756        self.post(&result, &info).await?;
6757        let response = result?;
6758        match response.status().as_u16() {
6759            200u16 => ResponseValue::from_response(response).await,
6760            422u16 => Err(Error::ErrorResponse(
6761                ResponseValue::from_response(response).await?,
6762            )),
6763            _ => Err(Error::UnexpectedResponse(response)),
6764        }
6765    }
6766
6767    #[doc = "Sandbox - Multiple Ring Battery Level Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/ring_battery_level`\n\n"]    pub async fn sandbox_multiple_ring_battery_level_documents_v2_sandbox_usercollection_ring_battery_level_get < 'a > (& 'a self , end_datetime : Option < & 'a :: chrono :: DateTime < :: chrono :: offset :: Utc > > , next_token : Option < & 'a str > , start_datetime : Option < & 'a :: chrono :: DateTime < :: chrono :: offset :: Utc > >) -> Result < ResponseValue < types :: ResponseSandboxMultipleRingBatteryLevelDocumentsV2SandboxUsercollectionRingBatteryLevelGet > , Error < types :: HttpValidationError > , >{
6768        let url = format!(
6769            "{}/v2/sandbox/usercollection/ring_battery_level",
6770            self.baseurl,
6771        );
6772        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6773        header_map.append(
6774            ::reqwest::header::HeaderName::from_static("api-version"),
6775            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6776        );
6777        #[allow(unused_mut)]
6778        let mut request = self
6779            .client
6780            .get(url)
6781            .header(
6782                ::reqwest::header::ACCEPT,
6783                ::reqwest::header::HeaderValue::from_static("application/json"),
6784            )
6785            .query(&progenitor_client::QueryParam::new(
6786                "end_datetime",
6787                &end_datetime,
6788            ))
6789            .query(&progenitor_client::QueryParam::new(
6790                "next_token",
6791                &next_token,
6792            ))
6793            .query(&progenitor_client::QueryParam::new(
6794                "start_datetime",
6795                &start_datetime,
6796            ))
6797            .headers(header_map)
6798            .build()?;
6799        let info = OperationInfo { operation_id : "sandbox_multiple_ring_battery_level_documents_v2_sandbox_usercollection_ring_battery_level_get" , } ;
6800        self.pre(&mut request, &info).await?;
6801        let result = self.exec(request, &info).await;
6802        self.post(&result, &info).await?;
6803        let response = result?;
6804        match response.status().as_u16() {
6805            200u16 => ResponseValue::from_response(response).await,
6806            422u16 => Err(Error::ErrorResponse(
6807                ResponseValue::from_response(response).await?,
6808            )),
6809            _ => Err(Error::UnexpectedResponse(response)),
6810        }
6811    }
6812
6813    #[doc = "Sandbox - Multiple Ring Configuration Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/ring_configuration`\n\n"]
6814    pub async fn sandbox_multiple_ring_configuration_documents_v2_sandbox_usercollection_ring_configuration_get<
6815        'a,
6816    >(
6817        &'a self,
6818        next_token: Option<&'a str>,
6819    ) -> Result<
6820        ResponseValue<types::MultiDocumentResponsePublicRingConfiguration>,
6821        Error<types::HttpValidationError>,
6822    > {
6823        let url = format!(
6824            "{}/v2/sandbox/usercollection/ring_configuration",
6825            self.baseurl,
6826        );
6827        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6828        header_map.append(
6829            ::reqwest::header::HeaderName::from_static("api-version"),
6830            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6831        );
6832        #[allow(unused_mut)]
6833        let mut request = self
6834            .client
6835            .get(url)
6836            .header(
6837                ::reqwest::header::ACCEPT,
6838                ::reqwest::header::HeaderValue::from_static("application/json"),
6839            )
6840            .query(&progenitor_client::QueryParam::new(
6841                "next_token",
6842                &next_token,
6843            ))
6844            .headers(header_map)
6845            .build()?;
6846        let info = OperationInfo { operation_id : "sandbox_multiple_ring_configuration_documents_v2_sandbox_usercollection_ring_configuration_get" , } ;
6847        self.pre(&mut request, &info).await?;
6848        let result = self.exec(request, &info).await;
6849        self.post(&result, &info).await?;
6850        let response = result?;
6851        match response.status().as_u16() {
6852            200u16 => ResponseValue::from_response(response).await,
6853            422u16 => Err(Error::ErrorResponse(
6854                ResponseValue::from_response(response).await?,
6855            )),
6856            _ => Err(Error::UnexpectedResponse(response)),
6857        }
6858    }
6859
6860    #[doc = "Sandbox - Single Ring Configuration Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/ring_configuration/{document_id}`\n\n"]
6861    pub async fn sandbox_single_ring_configuration_document_v2_sandbox_usercollection_ring_configuration_document_id_get<
6862        'a,
6863    >(
6864        &'a self,
6865        document_id: &'a str,
6866    ) -> Result<ResponseValue<types::PublicRingConfiguration>, Error<types::HttpValidationError>>
6867    {
6868        let url = format!(
6869            "{}/v2/sandbox/usercollection/ring_configuration/{}",
6870            self.baseurl,
6871            encode_path(&document_id.to_string()),
6872        );
6873        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6874        header_map.append(
6875            ::reqwest::header::HeaderName::from_static("api-version"),
6876            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6877        );
6878        #[allow(unused_mut)]
6879        let mut request = self
6880            .client
6881            .get(url)
6882            .header(
6883                ::reqwest::header::ACCEPT,
6884                ::reqwest::header::HeaderValue::from_static("application/json"),
6885            )
6886            .headers(header_map)
6887            .build()?;
6888        let info = OperationInfo { operation_id : "sandbox_single_ring_configuration_document_v2_sandbox_usercollection_ring_configuration_document_id_get" , } ;
6889        self.pre(&mut request, &info).await?;
6890        let result = self.exec(request, &info).await;
6891        self.post(&result, &info).await?;
6892        let response = result?;
6893        match response.status().as_u16() {
6894            200u16 => ResponseValue::from_response(response).await,
6895            422u16 => Err(Error::ErrorResponse(
6896                ResponseValue::from_response(response).await?,
6897            )),
6898            _ => Err(Error::UnexpectedResponse(response)),
6899        }
6900    }
6901
6902    #[doc = "Sandbox - Multiple Session Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/session`\n\n"]
6903    pub async fn sandbox_multiple_session_documents_v2_sandbox_usercollection_session_get<'a>(
6904        &'a self,
6905        end_date: Option<&'a ::chrono::naive::NaiveDate>,
6906        next_token: Option<&'a str>,
6907        start_date: Option<&'a ::chrono::naive::NaiveDate>,
6908    ) -> Result<
6909        ResponseValue<types::MultiDocumentResponsePublicSession>,
6910        Error<types::HttpValidationError>,
6911    > {
6912        let url = format!("{}/v2/sandbox/usercollection/session", self.baseurl,);
6913        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6914        header_map.append(
6915            ::reqwest::header::HeaderName::from_static("api-version"),
6916            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6917        );
6918        #[allow(unused_mut)]
6919        let mut request = self
6920            .client
6921            .get(url)
6922            .header(
6923                ::reqwest::header::ACCEPT,
6924                ::reqwest::header::HeaderValue::from_static("application/json"),
6925            )
6926            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
6927            .query(&progenitor_client::QueryParam::new(
6928                "next_token",
6929                &next_token,
6930            ))
6931            .query(&progenitor_client::QueryParam::new(
6932                "start_date",
6933                &start_date,
6934            ))
6935            .headers(header_map)
6936            .build()?;
6937        let info = OperationInfo {
6938            operation_id:
6939                "sandbox_multiple_session_documents_v2_sandbox_usercollection_session_get",
6940        };
6941        self.pre(&mut request, &info).await?;
6942        let result = self.exec(request, &info).await;
6943        self.post(&result, &info).await?;
6944        let response = result?;
6945        match response.status().as_u16() {
6946            200u16 => ResponseValue::from_response(response).await,
6947            422u16 => Err(Error::ErrorResponse(
6948                ResponseValue::from_response(response).await?,
6949            )),
6950            _ => Err(Error::UnexpectedResponse(response)),
6951        }
6952    }
6953
6954    #[doc = "Sandbox - Single Session Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/session/{document_id}`\n\n"]
6955    pub async fn sandbox_single_session_document_v2_sandbox_usercollection_session_document_id_get<
6956        'a,
6957    >(
6958        &'a self,
6959        document_id: &'a str,
6960    ) -> Result<ResponseValue<types::PublicSession>, Error<types::HttpValidationError>> {
6961        let url = format!(
6962            "{}/v2/sandbox/usercollection/session/{}",
6963            self.baseurl,
6964            encode_path(&document_id.to_string()),
6965        );
6966        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6967        header_map.append(
6968            ::reqwest::header::HeaderName::from_static("api-version"),
6969            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6970        );
6971        #[allow(unused_mut)]
6972        let mut request = self
6973            .client
6974            .get(url)
6975            .header(
6976                ::reqwest::header::ACCEPT,
6977                ::reqwest::header::HeaderValue::from_static("application/json"),
6978            )
6979            .headers(header_map)
6980            .build()?;
6981        let info = OperationInfo {
6982            operation_id:
6983                "sandbox_single_session_document_v2_sandbox_usercollection_session_document_id_get",
6984        };
6985        self.pre(&mut request, &info).await?;
6986        let result = self.exec(request, &info).await;
6987        self.post(&result, &info).await?;
6988        let response = result?;
6989        match response.status().as_u16() {
6990            200u16 => ResponseValue::from_response(response).await,
6991            422u16 => Err(Error::ErrorResponse(
6992                ResponseValue::from_response(response).await?,
6993            )),
6994            _ => Err(Error::UnexpectedResponse(response)),
6995        }
6996    }
6997
6998    #[doc = "Sandbox - Multiple Sleep Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/sleep`\n\n"]
6999    pub async fn sandbox_multiple_sleep_documents_v2_sandbox_usercollection_sleep_get<'a>(
7000        &'a self,
7001        end_date: Option<&'a ::chrono::naive::NaiveDate>,
7002        next_token: Option<&'a str>,
7003        start_date: Option<&'a ::chrono::naive::NaiveDate>,
7004    ) -> Result<
7005        ResponseValue<types::MultiDocumentResponsePublicModifiedSleepModel>,
7006        Error<types::HttpValidationError>,
7007    > {
7008        let url = format!("{}/v2/sandbox/usercollection/sleep", self.baseurl,);
7009        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7010        header_map.append(
7011            ::reqwest::header::HeaderName::from_static("api-version"),
7012            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7013        );
7014        #[allow(unused_mut)]
7015        let mut request = self
7016            .client
7017            .get(url)
7018            .header(
7019                ::reqwest::header::ACCEPT,
7020                ::reqwest::header::HeaderValue::from_static("application/json"),
7021            )
7022            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
7023            .query(&progenitor_client::QueryParam::new(
7024                "next_token",
7025                &next_token,
7026            ))
7027            .query(&progenitor_client::QueryParam::new(
7028                "start_date",
7029                &start_date,
7030            ))
7031            .headers(header_map)
7032            .build()?;
7033        let info = OperationInfo {
7034            operation_id: "sandbox_multiple_sleep_documents_v2_sandbox_usercollection_sleep_get",
7035        };
7036        self.pre(&mut request, &info).await?;
7037        let result = self.exec(request, &info).await;
7038        self.post(&result, &info).await?;
7039        let response = result?;
7040        match response.status().as_u16() {
7041            200u16 => ResponseValue::from_response(response).await,
7042            422u16 => Err(Error::ErrorResponse(
7043                ResponseValue::from_response(response).await?,
7044            )),
7045            _ => Err(Error::UnexpectedResponse(response)),
7046        }
7047    }
7048
7049    #[doc = "Sandbox - Single Sleep Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/sleep/{document_id}`\n\n"]
7050    pub async fn sandbox_single_sleep_document_v2_sandbox_usercollection_sleep_document_id_get<
7051        'a,
7052    >(
7053        &'a self,
7054        document_id: &'a str,
7055    ) -> Result<ResponseValue<types::PublicModifiedSleepModel>, Error<types::HttpValidationError>>
7056    {
7057        let url = format!(
7058            "{}/v2/sandbox/usercollection/sleep/{}",
7059            self.baseurl,
7060            encode_path(&document_id.to_string()),
7061        );
7062        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7063        header_map.append(
7064            ::reqwest::header::HeaderName::from_static("api-version"),
7065            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7066        );
7067        #[allow(unused_mut)]
7068        let mut request = self
7069            .client
7070            .get(url)
7071            .header(
7072                ::reqwest::header::ACCEPT,
7073                ::reqwest::header::HeaderValue::from_static("application/json"),
7074            )
7075            .headers(header_map)
7076            .build()?;
7077        let info = OperationInfo {
7078            operation_id:
7079                "sandbox_single_sleep_document_v2_sandbox_usercollection_sleep_document_id_get",
7080        };
7081        self.pre(&mut request, &info).await?;
7082        let result = self.exec(request, &info).await;
7083        self.post(&result, &info).await?;
7084        let response = result?;
7085        match response.status().as_u16() {
7086            200u16 => ResponseValue::from_response(response).await,
7087            422u16 => Err(Error::ErrorResponse(
7088                ResponseValue::from_response(response).await?,
7089            )),
7090            _ => Err(Error::UnexpectedResponse(response)),
7091        }
7092    }
7093
7094    #[doc = "Sandbox - Multiple Sleep Time Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/sleep_time`\n\n"]
7095    pub async fn sandbox_multiple_sleep_time_documents_v2_sandbox_usercollection_sleep_time_get<
7096        'a,
7097    >(
7098        &'a self,
7099        end_date: Option<&'a ::chrono::naive::NaiveDate>,
7100        next_token: Option<&'a str>,
7101        start_date: Option<&'a ::chrono::naive::NaiveDate>,
7102    ) -> Result<
7103        ResponseValue<types::MultiDocumentResponsePublicSleepTime>,
7104        Error<types::HttpValidationError>,
7105    > {
7106        let url = format!("{}/v2/sandbox/usercollection/sleep_time", self.baseurl,);
7107        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7108        header_map.append(
7109            ::reqwest::header::HeaderName::from_static("api-version"),
7110            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7111        );
7112        #[allow(unused_mut)]
7113        let mut request = self
7114            .client
7115            .get(url)
7116            .header(
7117                ::reqwest::header::ACCEPT,
7118                ::reqwest::header::HeaderValue::from_static("application/json"),
7119            )
7120            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
7121            .query(&progenitor_client::QueryParam::new(
7122                "next_token",
7123                &next_token,
7124            ))
7125            .query(&progenitor_client::QueryParam::new(
7126                "start_date",
7127                &start_date,
7128            ))
7129            .headers(header_map)
7130            .build()?;
7131        let info = OperationInfo {
7132            operation_id:
7133                "sandbox_multiple_sleep_time_documents_v2_sandbox_usercollection_sleep_time_get",
7134        };
7135        self.pre(&mut request, &info).await?;
7136        let result = self.exec(request, &info).await;
7137        self.post(&result, &info).await?;
7138        let response = result?;
7139        match response.status().as_u16() {
7140            200u16 => ResponseValue::from_response(response).await,
7141            422u16 => Err(Error::ErrorResponse(
7142                ResponseValue::from_response(response).await?,
7143            )),
7144            _ => Err(Error::UnexpectedResponse(response)),
7145        }
7146    }
7147
7148    #[doc = "Sandbox - Single Sleep Time Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/sleep_time/{document_id}`\n\n"]
7149    pub async fn sandbox_single_sleep_time_document_v2_sandbox_usercollection_sleep_time_document_id_get<
7150        'a,
7151    >(
7152        &'a self,
7153        document_id: &'a str,
7154    ) -> Result<ResponseValue<types::PublicSleepTime>, Error<types::HttpValidationError>> {
7155        let url = format!(
7156            "{}/v2/sandbox/usercollection/sleep_time/{}",
7157            self.baseurl,
7158            encode_path(&document_id.to_string()),
7159        );
7160        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7161        header_map.append(
7162            ::reqwest::header::HeaderName::from_static("api-version"),
7163            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7164        );
7165        #[allow(unused_mut)]
7166        let mut request = self
7167            .client
7168            .get(url)
7169            .header(
7170                ::reqwest::header::ACCEPT,
7171                ::reqwest::header::HeaderValue::from_static("application/json"),
7172            )
7173            .headers(header_map)
7174            .build()?;
7175        let info = OperationInfo { operation_id : "sandbox_single_sleep_time_document_v2_sandbox_usercollection_sleep_time_document_id_get" , } ;
7176        self.pre(&mut request, &info).await?;
7177        let result = self.exec(request, &info).await;
7178        self.post(&result, &info).await?;
7179        let response = result?;
7180        match response.status().as_u16() {
7181            200u16 => ResponseValue::from_response(response).await,
7182            422u16 => Err(Error::ErrorResponse(
7183                ResponseValue::from_response(response).await?,
7184            )),
7185            _ => Err(Error::UnexpectedResponse(response)),
7186        }
7187    }
7188
7189    #[doc = "Sandbox - Multiple Tag Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/tag`\n\n"]
7190    pub async fn sandbox_multiple_tag_documents_v2_sandbox_usercollection_tag_get<'a>(
7191        &'a self,
7192        end_date: Option<&'a ::chrono::naive::NaiveDate>,
7193        next_token: Option<&'a str>,
7194        start_date: Option<&'a ::chrono::naive::NaiveDate>,
7195    ) -> Result<
7196        ResponseValue<types::MultiDocumentResponseTagModel>,
7197        Error<types::HttpValidationError>,
7198    > {
7199        let url = format!("{}/v2/sandbox/usercollection/tag", self.baseurl,);
7200        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7201        header_map.append(
7202            ::reqwest::header::HeaderName::from_static("api-version"),
7203            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7204        );
7205        #[allow(unused_mut)]
7206        let mut request = self
7207            .client
7208            .get(url)
7209            .header(
7210                ::reqwest::header::ACCEPT,
7211                ::reqwest::header::HeaderValue::from_static("application/json"),
7212            )
7213            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
7214            .query(&progenitor_client::QueryParam::new(
7215                "next_token",
7216                &next_token,
7217            ))
7218            .query(&progenitor_client::QueryParam::new(
7219                "start_date",
7220                &start_date,
7221            ))
7222            .headers(header_map)
7223            .build()?;
7224        let info = OperationInfo {
7225            operation_id: "sandbox_multiple_tag_documents_v2_sandbox_usercollection_tag_get",
7226        };
7227        self.pre(&mut request, &info).await?;
7228        let result = self.exec(request, &info).await;
7229        self.post(&result, &info).await?;
7230        let response = result?;
7231        match response.status().as_u16() {
7232            200u16 => ResponseValue::from_response(response).await,
7233            422u16 => Err(Error::ErrorResponse(
7234                ResponseValue::from_response(response).await?,
7235            )),
7236            _ => Err(Error::UnexpectedResponse(response)),
7237        }
7238    }
7239
7240    #[doc = "Sandbox - Single Tag Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/tag/{document_id}`\n\n"]
7241    pub async fn sandbox_single_tag_document_v2_sandbox_usercollection_tag_document_id_get<'a>(
7242        &'a self,
7243        document_id: &'a str,
7244    ) -> Result<ResponseValue<types::TagModel>, Error<types::HttpValidationError>> {
7245        let url = format!(
7246            "{}/v2/sandbox/usercollection/tag/{}",
7247            self.baseurl,
7248            encode_path(&document_id.to_string()),
7249        );
7250        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7251        header_map.append(
7252            ::reqwest::header::HeaderName::from_static("api-version"),
7253            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7254        );
7255        #[allow(unused_mut)]
7256        let mut request = self
7257            .client
7258            .get(url)
7259            .header(
7260                ::reqwest::header::ACCEPT,
7261                ::reqwest::header::HeaderValue::from_static("application/json"),
7262            )
7263            .headers(header_map)
7264            .build()?;
7265        let info = OperationInfo {
7266            operation_id:
7267                "sandbox_single_tag_document_v2_sandbox_usercollection_tag_document_id_get",
7268        };
7269        self.pre(&mut request, &info).await?;
7270        let result = self.exec(request, &info).await;
7271        self.post(&result, &info).await?;
7272        let response = result?;
7273        match response.status().as_u16() {
7274            200u16 => ResponseValue::from_response(response).await,
7275            422u16 => Err(Error::ErrorResponse(
7276                ResponseValue::from_response(response).await?,
7277            )),
7278            _ => Err(Error::UnexpectedResponse(response)),
7279        }
7280    }
7281
7282    #[doc = "Sandbox - Multiple Vo2 Max Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/vO2_max`\n\n"]
7283    pub async fn sandbox_multiple_v_o2_max_documents_v2_sandbox_usercollection_v_o2_max_get<'a>(
7284        &'a self,
7285        end_date: Option<&'a ::chrono::naive::NaiveDate>,
7286        next_token: Option<&'a str>,
7287        start_date: Option<&'a ::chrono::naive::NaiveDate>,
7288    ) -> Result<
7289        ResponseValue<types::MultiDocumentResponsePublicVo2Max>,
7290        Error<types::HttpValidationError>,
7291    > {
7292        let url = format!("{}/v2/sandbox/usercollection/vO2_max", self.baseurl,);
7293        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7294        header_map.append(
7295            ::reqwest::header::HeaderName::from_static("api-version"),
7296            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7297        );
7298        #[allow(unused_mut)]
7299        let mut request = self
7300            .client
7301            .get(url)
7302            .header(
7303                ::reqwest::header::ACCEPT,
7304                ::reqwest::header::HeaderValue::from_static("application/json"),
7305            )
7306            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
7307            .query(&progenitor_client::QueryParam::new(
7308                "next_token",
7309                &next_token,
7310            ))
7311            .query(&progenitor_client::QueryParam::new(
7312                "start_date",
7313                &start_date,
7314            ))
7315            .headers(header_map)
7316            .build()?;
7317        let info = OperationInfo {
7318            operation_id:
7319                "sandbox_multiple_v_o2_max_documents_v2_sandbox_usercollection_v_o2_max_get",
7320        };
7321        self.pre(&mut request, &info).await?;
7322        let result = self.exec(request, &info).await;
7323        self.post(&result, &info).await?;
7324        let response = result?;
7325        match response.status().as_u16() {
7326            200u16 => ResponseValue::from_response(response).await,
7327            422u16 => Err(Error::ErrorResponse(
7328                ResponseValue::from_response(response).await?,
7329            )),
7330            _ => Err(Error::UnexpectedResponse(response)),
7331        }
7332    }
7333
7334    #[doc = "Sandbox - Single Vo2 Max Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/vO2_max/{document_id}`\n\n"]
7335    pub async fn sandbox_single_v_o2_max_document_v2_sandbox_usercollection_v_o2_max_document_id_get<
7336        'a,
7337    >(
7338        &'a self,
7339        document_id: &'a str,
7340    ) -> Result<ResponseValue<types::PublicVo2Max>, Error<types::HttpValidationError>> {
7341        let url = format!(
7342            "{}/v2/sandbox/usercollection/vO2_max/{}",
7343            self.baseurl,
7344            encode_path(&document_id.to_string()),
7345        );
7346        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7347        header_map.append(
7348            ::reqwest::header::HeaderName::from_static("api-version"),
7349            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7350        );
7351        #[allow(unused_mut)]
7352        let mut request = self
7353            .client
7354            .get(url)
7355            .header(
7356                ::reqwest::header::ACCEPT,
7357                ::reqwest::header::HeaderValue::from_static("application/json"),
7358            )
7359            .headers(header_map)
7360            .build()?;
7361        let info = OperationInfo { operation_id : "sandbox_single_v_o2_max_document_v2_sandbox_usercollection_v_o2_max_document_id_get" , } ;
7362        self.pre(&mut request, &info).await?;
7363        let result = self.exec(request, &info).await;
7364        self.post(&result, &info).await?;
7365        let response = result?;
7366        match response.status().as_u16() {
7367            200u16 => ResponseValue::from_response(response).await,
7368            422u16 => Err(Error::ErrorResponse(
7369                ResponseValue::from_response(response).await?,
7370            )),
7371            _ => Err(Error::UnexpectedResponse(response)),
7372        }
7373    }
7374
7375    #[doc = "Sandbox - Multiple Workout Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/workout`\n\n"]
7376    pub async fn sandbox_multiple_workout_documents_v2_sandbox_usercollection_workout_get<'a>(
7377        &'a self,
7378        end_date: Option<&'a ::chrono::naive::NaiveDate>,
7379        next_token: Option<&'a str>,
7380        start_date: Option<&'a ::chrono::naive::NaiveDate>,
7381    ) -> Result<
7382        ResponseValue<types::MultiDocumentResponsePublicWorkout>,
7383        Error<types::HttpValidationError>,
7384    > {
7385        let url = format!("{}/v2/sandbox/usercollection/workout", self.baseurl,);
7386        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7387        header_map.append(
7388            ::reqwest::header::HeaderName::from_static("api-version"),
7389            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7390        );
7391        #[allow(unused_mut)]
7392        let mut request = self
7393            .client
7394            .get(url)
7395            .header(
7396                ::reqwest::header::ACCEPT,
7397                ::reqwest::header::HeaderValue::from_static("application/json"),
7398            )
7399            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
7400            .query(&progenitor_client::QueryParam::new(
7401                "next_token",
7402                &next_token,
7403            ))
7404            .query(&progenitor_client::QueryParam::new(
7405                "start_date",
7406                &start_date,
7407            ))
7408            .headers(header_map)
7409            .build()?;
7410        let info = OperationInfo {
7411            operation_id:
7412                "sandbox_multiple_workout_documents_v2_sandbox_usercollection_workout_get",
7413        };
7414        self.pre(&mut request, &info).await?;
7415        let result = self.exec(request, &info).await;
7416        self.post(&result, &info).await?;
7417        let response = result?;
7418        match response.status().as_u16() {
7419            200u16 => ResponseValue::from_response(response).await,
7420            422u16 => Err(Error::ErrorResponse(
7421                ResponseValue::from_response(response).await?,
7422            )),
7423            _ => Err(Error::UnexpectedResponse(response)),
7424        }
7425    }
7426
7427    #[doc = "Sandbox - Single Workout Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/workout/{document_id}`\n\n"]
7428    pub async fn sandbox_single_workout_document_v2_sandbox_usercollection_workout_document_id_get<
7429        'a,
7430    >(
7431        &'a self,
7432        document_id: &'a str,
7433    ) -> Result<ResponseValue<types::PublicWorkout>, Error<types::HttpValidationError>> {
7434        let url = format!(
7435            "{}/v2/sandbox/usercollection/workout/{}",
7436            self.baseurl,
7437            encode_path(&document_id.to_string()),
7438        );
7439        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7440        header_map.append(
7441            ::reqwest::header::HeaderName::from_static("api-version"),
7442            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7443        );
7444        #[allow(unused_mut)]
7445        let mut request = self
7446            .client
7447            .get(url)
7448            .header(
7449                ::reqwest::header::ACCEPT,
7450                ::reqwest::header::HeaderValue::from_static("application/json"),
7451            )
7452            .headers(header_map)
7453            .build()?;
7454        let info = OperationInfo {
7455            operation_id:
7456                "sandbox_single_workout_document_v2_sandbox_usercollection_workout_document_id_get",
7457        };
7458        self.pre(&mut request, &info).await?;
7459        let result = self.exec(request, &info).await;
7460        self.post(&result, &info).await?;
7461        let response = result?;
7462        match response.status().as_u16() {
7463            200u16 => ResponseValue::from_response(response).await,
7464            422u16 => Err(Error::ErrorResponse(
7465                ResponseValue::from_response(response).await?,
7466            )),
7467            _ => Err(Error::UnexpectedResponse(response)),
7468        }
7469    }
7470
7471    #[doc = "Multiple Daily Activity Documents\n\nSends a `GET` request to `/v2/usercollection/daily_activity`\n\nArguments:\n- `end_date`\n- `fields`: Comma-separated list of fields to include in the response, in addition to the always returned fields. Defaults to all fields if not provided.\n- `next_token`\n- `start_date`\n"]
7472    pub async fn multiple_daily_activity_documents_v2_usercollection_daily_activity_get<'a>(
7473        &'a self,
7474        end_date: Option<&'a ::chrono::naive::NaiveDate>,
7475        fields: Option<&'a str>,
7476        next_token: Option<&'a str>,
7477        start_date: Option<&'a ::chrono::naive::NaiveDate>,
7478    ) -> Result<
7479        ResponseValue<types::MultiDocumentResponsePublicDailyActivity>,
7480        Error<types::HttpValidationError>,
7481    > {
7482        let url = format!("{}/v2/usercollection/daily_activity", self.baseurl,);
7483        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7484        header_map.append(
7485            ::reqwest::header::HeaderName::from_static("api-version"),
7486            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7487        );
7488        #[allow(unused_mut)]
7489        let mut request = self
7490            .client
7491            .get(url)
7492            .header(
7493                ::reqwest::header::ACCEPT,
7494                ::reqwest::header::HeaderValue::from_static("application/json"),
7495            )
7496            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
7497            .query(&progenitor_client::QueryParam::new("fields", &fields))
7498            .query(&progenitor_client::QueryParam::new(
7499                "next_token",
7500                &next_token,
7501            ))
7502            .query(&progenitor_client::QueryParam::new(
7503                "start_date",
7504                &start_date,
7505            ))
7506            .headers(header_map)
7507            .build()?;
7508        let info = OperationInfo {
7509            operation_id: "multiple_daily_activity_documents_v2_usercollection_daily_activity_get",
7510        };
7511        self.pre(&mut request, &info).await?;
7512        let result = self.exec(request, &info).await;
7513        self.post(&result, &info).await?;
7514        let response = result?;
7515        match response.status().as_u16() {
7516            200u16 => ResponseValue::from_response(response).await,
7517            422u16 => Err(Error::ErrorResponse(
7518                ResponseValue::from_response(response).await?,
7519            )),
7520            _ => Err(Error::UnexpectedResponse(response)),
7521        }
7522    }
7523
7524    #[doc = "Single Daily Activity Document\n\nSends a `GET` request to `/v2/usercollection/daily_activity/{document_id}`\n\n"]
7525    pub async fn single_daily_activity_document_v2_usercollection_daily_activity_document_id_get<
7526        'a,
7527    >(
7528        &'a self,
7529        document_id: &'a str,
7530    ) -> Result<ResponseValue<types::PublicDailyActivity>, Error<types::HttpValidationError>> {
7531        let url = format!(
7532            "{}/v2/usercollection/daily_activity/{}",
7533            self.baseurl,
7534            encode_path(&document_id.to_string()),
7535        );
7536        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7537        header_map.append(
7538            ::reqwest::header::HeaderName::from_static("api-version"),
7539            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7540        );
7541        #[allow(unused_mut)]
7542        let mut request = self
7543            .client
7544            .get(url)
7545            .header(
7546                ::reqwest::header::ACCEPT,
7547                ::reqwest::header::HeaderValue::from_static("application/json"),
7548            )
7549            .headers(header_map)
7550            .build()?;
7551        let info = OperationInfo {
7552            operation_id:
7553                "single_daily_activity_document_v2_usercollection_daily_activity_document_id_get",
7554        };
7555        self.pre(&mut request, &info).await?;
7556        let result = self.exec(request, &info).await;
7557        self.post(&result, &info).await?;
7558        let response = result?;
7559        match response.status().as_u16() {
7560            200u16 => ResponseValue::from_response(response).await,
7561            422u16 => Err(Error::ErrorResponse(
7562                ResponseValue::from_response(response).await?,
7563            )),
7564            _ => Err(Error::UnexpectedResponse(response)),
7565        }
7566    }
7567
7568    #[doc = "Multiple Daily Cardiovascular Age Documents\n\nSends a `GET` request to `/v2/usercollection/daily_cardiovascular_age`\n\nArguments:\n- `end_date`\n- `fields`: Comma-separated list of fields to include in the response, in addition to the always returned fields. Defaults to all fields if not provided.\n- `next_token`\n- `start_date`\n"]
7569    pub async fn multiple_daily_cardiovascular_age_documents_v2_usercollection_daily_cardiovascular_age_get<
7570        'a,
7571    >(
7572        &'a self,
7573        end_date: Option<&'a ::chrono::naive::NaiveDate>,
7574        fields: Option<&'a str>,
7575        next_token: Option<&'a str>,
7576        start_date: Option<&'a ::chrono::naive::NaiveDate>,
7577    ) -> Result<
7578        ResponseValue<types::MultiDocumentResponsePublicDailyCardiovascularAge>,
7579        Error<types::HttpValidationError>,
7580    > {
7581        let url = format!(
7582            "{}/v2/usercollection/daily_cardiovascular_age",
7583            self.baseurl,
7584        );
7585        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7586        header_map.append(
7587            ::reqwest::header::HeaderName::from_static("api-version"),
7588            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7589        );
7590        #[allow(unused_mut)]
7591        let mut request = self
7592            .client
7593            .get(url)
7594            .header(
7595                ::reqwest::header::ACCEPT,
7596                ::reqwest::header::HeaderValue::from_static("application/json"),
7597            )
7598            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
7599            .query(&progenitor_client::QueryParam::new("fields", &fields))
7600            .query(&progenitor_client::QueryParam::new(
7601                "next_token",
7602                &next_token,
7603            ))
7604            .query(&progenitor_client::QueryParam::new(
7605                "start_date",
7606                &start_date,
7607            ))
7608            .headers(header_map)
7609            .build()?;
7610        let info = OperationInfo { operation_id : "multiple_daily_cardiovascular_age_documents_v2_usercollection_daily_cardiovascular_age_get" , } ;
7611        self.pre(&mut request, &info).await?;
7612        let result = self.exec(request, &info).await;
7613        self.post(&result, &info).await?;
7614        let response = result?;
7615        match response.status().as_u16() {
7616            200u16 => ResponseValue::from_response(response).await,
7617            422u16 => Err(Error::ErrorResponse(
7618                ResponseValue::from_response(response).await?,
7619            )),
7620            _ => Err(Error::UnexpectedResponse(response)),
7621        }
7622    }
7623
7624    #[doc = "Single Daily Cardiovascular Age Document\n\nSends a `GET` request to `/v2/usercollection/daily_cardiovascular_age/{document_id}`\n\n"]
7625    pub async fn single_daily_cardiovascular_age_document_v2_usercollection_daily_cardiovascular_age_document_id_get<
7626        'a,
7627    >(
7628        &'a self,
7629        document_id: &'a str,
7630    ) -> Result<ResponseValue<types::PublicDailyCardiovascularAge>, Error<types::HttpValidationError>>
7631    {
7632        let url = format!(
7633            "{}/v2/usercollection/daily_cardiovascular_age/{}",
7634            self.baseurl,
7635            encode_path(&document_id.to_string()),
7636        );
7637        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7638        header_map.append(
7639            ::reqwest::header::HeaderName::from_static("api-version"),
7640            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7641        );
7642        #[allow(unused_mut)]
7643        let mut request = self
7644            .client
7645            .get(url)
7646            .header(
7647                ::reqwest::header::ACCEPT,
7648                ::reqwest::header::HeaderValue::from_static("application/json"),
7649            )
7650            .headers(header_map)
7651            .build()?;
7652        let info = OperationInfo { operation_id : "single_daily_cardiovascular_age_document_v2_usercollection_daily_cardiovascular_age_document_id_get" , } ;
7653        self.pre(&mut request, &info).await?;
7654        let result = self.exec(request, &info).await;
7655        self.post(&result, &info).await?;
7656        let response = result?;
7657        match response.status().as_u16() {
7658            200u16 => ResponseValue::from_response(response).await,
7659            422u16 => Err(Error::ErrorResponse(
7660                ResponseValue::from_response(response).await?,
7661            )),
7662            _ => Err(Error::UnexpectedResponse(response)),
7663        }
7664    }
7665
7666    #[doc = "Multiple Daily Readiness Documents\n\nSends a `GET` request to `/v2/usercollection/daily_readiness`\n\nArguments:\n- `end_date`\n- `fields`: Comma-separated list of fields to include in the response, in addition to the always returned fields. Defaults to all fields if not provided.\n- `next_token`\n- `start_date`\n"]
7667    pub async fn multiple_daily_readiness_documents_v2_usercollection_daily_readiness_get<'a>(
7668        &'a self,
7669        end_date: Option<&'a ::chrono::naive::NaiveDate>,
7670        fields: Option<&'a str>,
7671        next_token: Option<&'a str>,
7672        start_date: Option<&'a ::chrono::naive::NaiveDate>,
7673    ) -> Result<
7674        ResponseValue<types::MultiDocumentResponsePublicDailyReadiness>,
7675        Error<types::HttpValidationError>,
7676    > {
7677        let url = format!("{}/v2/usercollection/daily_readiness", self.baseurl,);
7678        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7679        header_map.append(
7680            ::reqwest::header::HeaderName::from_static("api-version"),
7681            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7682        );
7683        #[allow(unused_mut)]
7684        let mut request = self
7685            .client
7686            .get(url)
7687            .header(
7688                ::reqwest::header::ACCEPT,
7689                ::reqwest::header::HeaderValue::from_static("application/json"),
7690            )
7691            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
7692            .query(&progenitor_client::QueryParam::new("fields", &fields))
7693            .query(&progenitor_client::QueryParam::new(
7694                "next_token",
7695                &next_token,
7696            ))
7697            .query(&progenitor_client::QueryParam::new(
7698                "start_date",
7699                &start_date,
7700            ))
7701            .headers(header_map)
7702            .build()?;
7703        let info = OperationInfo {
7704            operation_id:
7705                "multiple_daily_readiness_documents_v2_usercollection_daily_readiness_get",
7706        };
7707        self.pre(&mut request, &info).await?;
7708        let result = self.exec(request, &info).await;
7709        self.post(&result, &info).await?;
7710        let response = result?;
7711        match response.status().as_u16() {
7712            200u16 => ResponseValue::from_response(response).await,
7713            422u16 => Err(Error::ErrorResponse(
7714                ResponseValue::from_response(response).await?,
7715            )),
7716            _ => Err(Error::UnexpectedResponse(response)),
7717        }
7718    }
7719
7720    #[doc = "Single Daily Readiness Document\n\nSends a `GET` request to `/v2/usercollection/daily_readiness/{document_id}`\n\n"]
7721    pub async fn single_daily_readiness_document_v2_usercollection_daily_readiness_document_id_get<
7722        'a,
7723    >(
7724        &'a self,
7725        document_id: &'a str,
7726    ) -> Result<ResponseValue<types::PublicDailyReadiness>, Error<types::HttpValidationError>> {
7727        let url = format!(
7728            "{}/v2/usercollection/daily_readiness/{}",
7729            self.baseurl,
7730            encode_path(&document_id.to_string()),
7731        );
7732        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7733        header_map.append(
7734            ::reqwest::header::HeaderName::from_static("api-version"),
7735            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7736        );
7737        #[allow(unused_mut)]
7738        let mut request = self
7739            .client
7740            .get(url)
7741            .header(
7742                ::reqwest::header::ACCEPT,
7743                ::reqwest::header::HeaderValue::from_static("application/json"),
7744            )
7745            .headers(header_map)
7746            .build()?;
7747        let info = OperationInfo {
7748            operation_id:
7749                "single_daily_readiness_document_v2_usercollection_daily_readiness_document_id_get",
7750        };
7751        self.pre(&mut request, &info).await?;
7752        let result = self.exec(request, &info).await;
7753        self.post(&result, &info).await?;
7754        let response = result?;
7755        match response.status().as_u16() {
7756            200u16 => ResponseValue::from_response(response).await,
7757            422u16 => Err(Error::ErrorResponse(
7758                ResponseValue::from_response(response).await?,
7759            )),
7760            _ => Err(Error::UnexpectedResponse(response)),
7761        }
7762    }
7763
7764    #[doc = "Multiple Daily Resilience Documents\n\nSends a `GET` request to `/v2/usercollection/daily_resilience`\n\nArguments:\n- `end_date`\n- `fields`: N/A. This route does not support field selection yet, all fields will be returned.\n- `next_token`\n- `start_date`\n"]
7765    pub async fn multiple_daily_resilience_documents_v2_usercollection_daily_resilience_get<'a>(
7766        &'a self,
7767        end_date: Option<&'a ::chrono::naive::NaiveDate>,
7768        fields: Option<&'a str>,
7769        next_token: Option<&'a str>,
7770        start_date: Option<&'a ::chrono::naive::NaiveDate>,
7771    ) -> Result<
7772        ResponseValue<types::MultiDocumentResponseDailyResilienceModel>,
7773        Error<types::HttpValidationError>,
7774    > {
7775        let url = format!("{}/v2/usercollection/daily_resilience", self.baseurl,);
7776        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7777        header_map.append(
7778            ::reqwest::header::HeaderName::from_static("api-version"),
7779            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7780        );
7781        #[allow(unused_mut)]
7782        let mut request = self
7783            .client
7784            .get(url)
7785            .header(
7786                ::reqwest::header::ACCEPT,
7787                ::reqwest::header::HeaderValue::from_static("application/json"),
7788            )
7789            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
7790            .query(&progenitor_client::QueryParam::new("fields", &fields))
7791            .query(&progenitor_client::QueryParam::new(
7792                "next_token",
7793                &next_token,
7794            ))
7795            .query(&progenitor_client::QueryParam::new(
7796                "start_date",
7797                &start_date,
7798            ))
7799            .headers(header_map)
7800            .build()?;
7801        let info = OperationInfo {
7802            operation_id:
7803                "multiple_daily_resilience_documents_v2_usercollection_daily_resilience_get",
7804        };
7805        self.pre(&mut request, &info).await?;
7806        let result = self.exec(request, &info).await;
7807        self.post(&result, &info).await?;
7808        let response = result?;
7809        match response.status().as_u16() {
7810            200u16 => ResponseValue::from_response(response).await,
7811            422u16 => Err(Error::ErrorResponse(
7812                ResponseValue::from_response(response).await?,
7813            )),
7814            _ => Err(Error::UnexpectedResponse(response)),
7815        }
7816    }
7817
7818    #[doc = "Single Daily Resilience Document\n\nSends a `GET` request to `/v2/usercollection/daily_resilience/{document_id}`\n\n"]
7819    pub async fn single_daily_resilience_document_v2_usercollection_daily_resilience_document_id_get<
7820        'a,
7821    >(
7822        &'a self,
7823        document_id: &'a str,
7824    ) -> Result<ResponseValue<types::DailyResilienceModel>, Error<types::HttpValidationError>> {
7825        let url = format!(
7826            "{}/v2/usercollection/daily_resilience/{}",
7827            self.baseurl,
7828            encode_path(&document_id.to_string()),
7829        );
7830        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7831        header_map.append(
7832            ::reqwest::header::HeaderName::from_static("api-version"),
7833            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7834        );
7835        #[allow(unused_mut)]
7836        let mut request = self
7837            .client
7838            .get(url)
7839            .header(
7840                ::reqwest::header::ACCEPT,
7841                ::reqwest::header::HeaderValue::from_static("application/json"),
7842            )
7843            .headers(header_map)
7844            .build()?;
7845        let info = OperationInfo { operation_id : "single_daily_resilience_document_v2_usercollection_daily_resilience_document_id_get" , } ;
7846        self.pre(&mut request, &info).await?;
7847        let result = self.exec(request, &info).await;
7848        self.post(&result, &info).await?;
7849        let response = result?;
7850        match response.status().as_u16() {
7851            200u16 => ResponseValue::from_response(response).await,
7852            422u16 => Err(Error::ErrorResponse(
7853                ResponseValue::from_response(response).await?,
7854            )),
7855            _ => Err(Error::UnexpectedResponse(response)),
7856        }
7857    }
7858
7859    #[doc = "Multiple Daily Sleep Documents\n\nSends a `GET` request to `/v2/usercollection/daily_sleep`\n\nArguments:\n- `end_date`\n- `fields`: Comma-separated list of fields to include in the response, in addition to the always returned fields. Defaults to all fields if not provided.\n- `next_token`\n- `start_date`\n"]
7860    pub async fn multiple_daily_sleep_documents_v2_usercollection_daily_sleep_get<'a>(
7861        &'a self,
7862        end_date: Option<&'a ::chrono::naive::NaiveDate>,
7863        fields: Option<&'a str>,
7864        next_token: Option<&'a str>,
7865        start_date: Option<&'a ::chrono::naive::NaiveDate>,
7866    ) -> Result<
7867        ResponseValue<types::MultiDocumentResponsePublicDailySleep>,
7868        Error<types::HttpValidationError>,
7869    > {
7870        let url = format!("{}/v2/usercollection/daily_sleep", self.baseurl,);
7871        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7872        header_map.append(
7873            ::reqwest::header::HeaderName::from_static("api-version"),
7874            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7875        );
7876        #[allow(unused_mut)]
7877        let mut request = self
7878            .client
7879            .get(url)
7880            .header(
7881                ::reqwest::header::ACCEPT,
7882                ::reqwest::header::HeaderValue::from_static("application/json"),
7883            )
7884            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
7885            .query(&progenitor_client::QueryParam::new("fields", &fields))
7886            .query(&progenitor_client::QueryParam::new(
7887                "next_token",
7888                &next_token,
7889            ))
7890            .query(&progenitor_client::QueryParam::new(
7891                "start_date",
7892                &start_date,
7893            ))
7894            .headers(header_map)
7895            .build()?;
7896        let info = OperationInfo {
7897            operation_id: "multiple_daily_sleep_documents_v2_usercollection_daily_sleep_get",
7898        };
7899        self.pre(&mut request, &info).await?;
7900        let result = self.exec(request, &info).await;
7901        self.post(&result, &info).await?;
7902        let response = result?;
7903        match response.status().as_u16() {
7904            200u16 => ResponseValue::from_response(response).await,
7905            422u16 => Err(Error::ErrorResponse(
7906                ResponseValue::from_response(response).await?,
7907            )),
7908            _ => Err(Error::UnexpectedResponse(response)),
7909        }
7910    }
7911
7912    #[doc = "Single Daily Sleep Document\n\nSends a `GET` request to `/v2/usercollection/daily_sleep/{document_id}`\n\n"]
7913    pub async fn single_daily_sleep_document_v2_usercollection_daily_sleep_document_id_get<'a>(
7914        &'a self,
7915        document_id: &'a str,
7916    ) -> Result<ResponseValue<types::PublicDailySleep>, Error<types::HttpValidationError>> {
7917        let url = format!(
7918            "{}/v2/usercollection/daily_sleep/{}",
7919            self.baseurl,
7920            encode_path(&document_id.to_string()),
7921        );
7922        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7923        header_map.append(
7924            ::reqwest::header::HeaderName::from_static("api-version"),
7925            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7926        );
7927        #[allow(unused_mut)]
7928        let mut request = self
7929            .client
7930            .get(url)
7931            .header(
7932                ::reqwest::header::ACCEPT,
7933                ::reqwest::header::HeaderValue::from_static("application/json"),
7934            )
7935            .headers(header_map)
7936            .build()?;
7937        let info = OperationInfo {
7938            operation_id:
7939                "single_daily_sleep_document_v2_usercollection_daily_sleep_document_id_get",
7940        };
7941        self.pre(&mut request, &info).await?;
7942        let result = self.exec(request, &info).await;
7943        self.post(&result, &info).await?;
7944        let response = result?;
7945        match response.status().as_u16() {
7946            200u16 => ResponseValue::from_response(response).await,
7947            422u16 => Err(Error::ErrorResponse(
7948                ResponseValue::from_response(response).await?,
7949            )),
7950            _ => Err(Error::UnexpectedResponse(response)),
7951        }
7952    }
7953
7954    #[doc = "Multiple Daily Spo2 Documents\n\nSends a `GET` request to `/v2/usercollection/daily_spo2`\n\nArguments:\n- `end_date`\n- `fields`: Comma-separated list of fields to include in the response, in addition to the always returned fields. Defaults to all fields if not provided.\n- `next_token`\n- `start_date`\n"]
7955    pub async fn multiple_daily_spo2_documents_v2_usercollection_daily_spo2_get<'a>(
7956        &'a self,
7957        end_date: Option<&'a ::chrono::naive::NaiveDate>,
7958        fields: Option<&'a str>,
7959        next_token: Option<&'a str>,
7960        start_date: Option<&'a ::chrono::naive::NaiveDate>,
7961    ) -> Result<
7962        ResponseValue<types::MultiDocumentResponsePublicDailySpO2>,
7963        Error<types::HttpValidationError>,
7964    > {
7965        let url = format!("{}/v2/usercollection/daily_spo2", self.baseurl,);
7966        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7967        header_map.append(
7968            ::reqwest::header::HeaderName::from_static("api-version"),
7969            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7970        );
7971        #[allow(unused_mut)]
7972        let mut request = self
7973            .client
7974            .get(url)
7975            .header(
7976                ::reqwest::header::ACCEPT,
7977                ::reqwest::header::HeaderValue::from_static("application/json"),
7978            )
7979            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
7980            .query(&progenitor_client::QueryParam::new("fields", &fields))
7981            .query(&progenitor_client::QueryParam::new(
7982                "next_token",
7983                &next_token,
7984            ))
7985            .query(&progenitor_client::QueryParam::new(
7986                "start_date",
7987                &start_date,
7988            ))
7989            .headers(header_map)
7990            .build()?;
7991        let info = OperationInfo {
7992            operation_id: "multiple_daily_spo2_documents_v2_usercollection_daily_spo2_get",
7993        };
7994        self.pre(&mut request, &info).await?;
7995        let result = self.exec(request, &info).await;
7996        self.post(&result, &info).await?;
7997        let response = result?;
7998        match response.status().as_u16() {
7999            200u16 => ResponseValue::from_response(response).await,
8000            422u16 => Err(Error::ErrorResponse(
8001                ResponseValue::from_response(response).await?,
8002            )),
8003            _ => Err(Error::UnexpectedResponse(response)),
8004        }
8005    }
8006
8007    #[doc = "Single Daily Spo2 Document\n\nSends a `GET` request to `/v2/usercollection/daily_spo2/{document_id}`\n\n"]
8008    pub async fn single_daily_spo2_document_v2_usercollection_daily_spo2_document_id_get<'a>(
8009        &'a self,
8010        document_id: &'a str,
8011    ) -> Result<ResponseValue<types::PublicDailySpO2>, Error<types::HttpValidationError>> {
8012        let url = format!(
8013            "{}/v2/usercollection/daily_spo2/{}",
8014            self.baseurl,
8015            encode_path(&document_id.to_string()),
8016        );
8017        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8018        header_map.append(
8019            ::reqwest::header::HeaderName::from_static("api-version"),
8020            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8021        );
8022        #[allow(unused_mut)]
8023        let mut request = self
8024            .client
8025            .get(url)
8026            .header(
8027                ::reqwest::header::ACCEPT,
8028                ::reqwest::header::HeaderValue::from_static("application/json"),
8029            )
8030            .headers(header_map)
8031            .build()?;
8032        let info = OperationInfo {
8033            operation_id: "single_daily_spo2_document_v2_usercollection_daily_spo2_document_id_get",
8034        };
8035        self.pre(&mut request, &info).await?;
8036        let result = self.exec(request, &info).await;
8037        self.post(&result, &info).await?;
8038        let response = result?;
8039        match response.status().as_u16() {
8040            200u16 => ResponseValue::from_response(response).await,
8041            422u16 => Err(Error::ErrorResponse(
8042                ResponseValue::from_response(response).await?,
8043            )),
8044            _ => Err(Error::UnexpectedResponse(response)),
8045        }
8046    }
8047
8048    #[doc = "Multiple Daily Stress Documents\n\nSends a `GET` request to `/v2/usercollection/daily_stress`\n\nArguments:\n- `end_date`\n- `fields`: Comma-separated list of fields to include in the response, in addition to the always returned fields. Defaults to all fields if not provided.\n- `next_token`\n- `start_date`\n"]
8049    pub async fn multiple_daily_stress_documents_v2_usercollection_daily_stress_get<'a>(
8050        &'a self,
8051        end_date: Option<&'a ::chrono::naive::NaiveDate>,
8052        fields: Option<&'a str>,
8053        next_token: Option<&'a str>,
8054        start_date: Option<&'a ::chrono::naive::NaiveDate>,
8055    ) -> Result<
8056        ResponseValue<types::MultiDocumentResponsePublicDailyStress>,
8057        Error<types::HttpValidationError>,
8058    > {
8059        let url = format!("{}/v2/usercollection/daily_stress", self.baseurl,);
8060        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8061        header_map.append(
8062            ::reqwest::header::HeaderName::from_static("api-version"),
8063            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8064        );
8065        #[allow(unused_mut)]
8066        let mut request = self
8067            .client
8068            .get(url)
8069            .header(
8070                ::reqwest::header::ACCEPT,
8071                ::reqwest::header::HeaderValue::from_static("application/json"),
8072            )
8073            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
8074            .query(&progenitor_client::QueryParam::new("fields", &fields))
8075            .query(&progenitor_client::QueryParam::new(
8076                "next_token",
8077                &next_token,
8078            ))
8079            .query(&progenitor_client::QueryParam::new(
8080                "start_date",
8081                &start_date,
8082            ))
8083            .headers(header_map)
8084            .build()?;
8085        let info = OperationInfo {
8086            operation_id: "multiple_daily_stress_documents_v2_usercollection_daily_stress_get",
8087        };
8088        self.pre(&mut request, &info).await?;
8089        let result = self.exec(request, &info).await;
8090        self.post(&result, &info).await?;
8091        let response = result?;
8092        match response.status().as_u16() {
8093            200u16 => ResponseValue::from_response(response).await,
8094            422u16 => Err(Error::ErrorResponse(
8095                ResponseValue::from_response(response).await?,
8096            )),
8097            _ => Err(Error::UnexpectedResponse(response)),
8098        }
8099    }
8100
8101    #[doc = "Single Daily Stress Document\n\nSends a `GET` request to `/v2/usercollection/daily_stress/{document_id}`\n\n"]
8102    pub async fn single_daily_stress_document_v2_usercollection_daily_stress_document_id_get<'a>(
8103        &'a self,
8104        document_id: &'a str,
8105    ) -> Result<ResponseValue<types::PublicDailyStress>, Error<types::HttpValidationError>> {
8106        let url = format!(
8107            "{}/v2/usercollection/daily_stress/{}",
8108            self.baseurl,
8109            encode_path(&document_id.to_string()),
8110        );
8111        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8112        header_map.append(
8113            ::reqwest::header::HeaderName::from_static("api-version"),
8114            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8115        );
8116        #[allow(unused_mut)]
8117        let mut request = self
8118            .client
8119            .get(url)
8120            .header(
8121                ::reqwest::header::ACCEPT,
8122                ::reqwest::header::HeaderValue::from_static("application/json"),
8123            )
8124            .headers(header_map)
8125            .build()?;
8126        let info = OperationInfo {
8127            operation_id:
8128                "single_daily_stress_document_v2_usercollection_daily_stress_document_id_get",
8129        };
8130        self.pre(&mut request, &info).await?;
8131        let result = self.exec(request, &info).await;
8132        self.post(&result, &info).await?;
8133        let response = result?;
8134        match response.status().as_u16() {
8135            200u16 => ResponseValue::from_response(response).await,
8136            422u16 => Err(Error::ErrorResponse(
8137                ResponseValue::from_response(response).await?,
8138            )),
8139            _ => Err(Error::UnexpectedResponse(response)),
8140        }
8141    }
8142
8143    #[doc = "Multiple Enhanced Tag Documents\n\nSends a `GET` request to `/v2/usercollection/enhanced_tag`\n\nArguments:\n- `end_date`\n- `fields`: N/A. This route does not support field selection yet, all fields will be returned.\n- `next_token`\n- `start_date`\n"]
8144    pub async fn multiple_enhanced_tag_documents_v2_usercollection_enhanced_tag_get<'a>(
8145        &'a self,
8146        end_date: Option<&'a ::chrono::naive::NaiveDate>,
8147        fields: Option<&'a str>,
8148        next_token: Option<&'a str>,
8149        start_date: Option<&'a ::chrono::naive::NaiveDate>,
8150    ) -> Result<
8151        ResponseValue<types::MultiDocumentResponseEnhancedTagModel>,
8152        Error<types::HttpValidationError>,
8153    > {
8154        let url = format!("{}/v2/usercollection/enhanced_tag", self.baseurl,);
8155        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8156        header_map.append(
8157            ::reqwest::header::HeaderName::from_static("api-version"),
8158            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8159        );
8160        #[allow(unused_mut)]
8161        let mut request = self
8162            .client
8163            .get(url)
8164            .header(
8165                ::reqwest::header::ACCEPT,
8166                ::reqwest::header::HeaderValue::from_static("application/json"),
8167            )
8168            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
8169            .query(&progenitor_client::QueryParam::new("fields", &fields))
8170            .query(&progenitor_client::QueryParam::new(
8171                "next_token",
8172                &next_token,
8173            ))
8174            .query(&progenitor_client::QueryParam::new(
8175                "start_date",
8176                &start_date,
8177            ))
8178            .headers(header_map)
8179            .build()?;
8180        let info = OperationInfo {
8181            operation_id: "multiple_enhanced_tag_documents_v2_usercollection_enhanced_tag_get",
8182        };
8183        self.pre(&mut request, &info).await?;
8184        let result = self.exec(request, &info).await;
8185        self.post(&result, &info).await?;
8186        let response = result?;
8187        match response.status().as_u16() {
8188            200u16 => ResponseValue::from_response(response).await,
8189            422u16 => Err(Error::ErrorResponse(
8190                ResponseValue::from_response(response).await?,
8191            )),
8192            _ => Err(Error::UnexpectedResponse(response)),
8193        }
8194    }
8195
8196    #[doc = "Single Enhanced Tag Document\n\nSends a `GET` request to `/v2/usercollection/enhanced_tag/{document_id}`\n\n"]
8197    pub async fn single_enhanced_tag_document_v2_usercollection_enhanced_tag_document_id_get<'a>(
8198        &'a self,
8199        document_id: &'a str,
8200    ) -> Result<ResponseValue<types::EnhancedTagModel>, Error<types::HttpValidationError>> {
8201        let url = format!(
8202            "{}/v2/usercollection/enhanced_tag/{}",
8203            self.baseurl,
8204            encode_path(&document_id.to_string()),
8205        );
8206        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8207        header_map.append(
8208            ::reqwest::header::HeaderName::from_static("api-version"),
8209            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8210        );
8211        #[allow(unused_mut)]
8212        let mut request = self
8213            .client
8214            .get(url)
8215            .header(
8216                ::reqwest::header::ACCEPT,
8217                ::reqwest::header::HeaderValue::from_static("application/json"),
8218            )
8219            .headers(header_map)
8220            .build()?;
8221        let info = OperationInfo {
8222            operation_id:
8223                "single_enhanced_tag_document_v2_usercollection_enhanced_tag_document_id_get",
8224        };
8225        self.pre(&mut request, &info).await?;
8226        let result = self.exec(request, &info).await;
8227        self.post(&result, &info).await?;
8228        let response = result?;
8229        match response.status().as_u16() {
8230            200u16 => ResponseValue::from_response(response).await,
8231            422u16 => Err(Error::ErrorResponse(
8232                ResponseValue::from_response(response).await?,
8233            )),
8234            _ => Err(Error::UnexpectedResponse(response)),
8235        }
8236    }
8237
8238    #[doc = "Multiple Heartrate Documents\n\nSends a `GET` request to `/v2/usercollection/heartrate`\n\nArguments:\n- `end_datetime`\n- `fields`: Comma-separated list of fields to include in the response, in addition to the always returned fields. Defaults to all fields if not provided.\n- `latest`: If True, returns most recent sample.\n- `next_token`\n- `start_datetime`\n"]
8239    pub async fn multiple_heartrate_documents_v2_usercollection_heartrate_get<'a>(
8240        &'a self,
8241        end_datetime: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>,
8242        fields: Option<&'a str>,
8243        latest: Option<bool>,
8244        next_token: Option<&'a str>,
8245        start_datetime: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>,
8246    ) -> Result<
8247        ResponseValue<types::ResponseMultipleHeartrateDocumentsV2UsercollectionHeartrateGet>,
8248        Error<types::HttpValidationError>,
8249    > {
8250        let url = format!("{}/v2/usercollection/heartrate", self.baseurl,);
8251        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8252        header_map.append(
8253            ::reqwest::header::HeaderName::from_static("api-version"),
8254            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8255        );
8256        #[allow(unused_mut)]
8257        let mut request = self
8258            .client
8259            .get(url)
8260            .header(
8261                ::reqwest::header::ACCEPT,
8262                ::reqwest::header::HeaderValue::from_static("application/json"),
8263            )
8264            .query(&progenitor_client::QueryParam::new(
8265                "end_datetime",
8266                &end_datetime,
8267            ))
8268            .query(&progenitor_client::QueryParam::new("fields", &fields))
8269            .query(&progenitor_client::QueryParam::new("latest", &latest))
8270            .query(&progenitor_client::QueryParam::new(
8271                "next_token",
8272                &next_token,
8273            ))
8274            .query(&progenitor_client::QueryParam::new(
8275                "start_datetime",
8276                &start_datetime,
8277            ))
8278            .headers(header_map)
8279            .build()?;
8280        let info = OperationInfo {
8281            operation_id: "multiple_heartrate_documents_v2_usercollection_heartrate_get",
8282        };
8283        self.pre(&mut request, &info).await?;
8284        let result = self.exec(request, &info).await;
8285        self.post(&result, &info).await?;
8286        let response = result?;
8287        match response.status().as_u16() {
8288            200u16 => ResponseValue::from_response(response).await,
8289            422u16 => Err(Error::ErrorResponse(
8290                ResponseValue::from_response(response).await?,
8291            )),
8292            _ => Err(Error::UnexpectedResponse(response)),
8293        }
8294    }
8295
8296    #[doc = "Single Personal Info Document\n\nSends a `GET` request to `/v2/usercollection/personal_info`\n\n"]
8297    pub async fn single_personal_info_document_v2_usercollection_personal_info_get<'a>(
8298        &'a self,
8299    ) -> Result<ResponseValue<types::PersonalInfoResponse>, Error<()>> {
8300        let url = format!("{}/v2/usercollection/personal_info", self.baseurl,);
8301        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8302        header_map.append(
8303            ::reqwest::header::HeaderName::from_static("api-version"),
8304            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8305        );
8306        #[allow(unused_mut)]
8307        let mut request = self
8308            .client
8309            .get(url)
8310            .header(
8311                ::reqwest::header::ACCEPT,
8312                ::reqwest::header::HeaderValue::from_static("application/json"),
8313            )
8314            .headers(header_map)
8315            .build()?;
8316        let info = OperationInfo {
8317            operation_id: "single_personal_info_document_v2_usercollection_personal_info_get",
8318        };
8319        self.pre(&mut request, &info).await?;
8320        let result = self.exec(request, &info).await;
8321        self.post(&result, &info).await?;
8322        let response = result?;
8323        match response.status().as_u16() {
8324            200u16 => ResponseValue::from_response(response).await,
8325            _ => Err(Error::UnexpectedResponse(response)),
8326        }
8327    }
8328
8329    #[doc = "Multiple Rest Mode Period Documents\n\nSends a `GET` request to `/v2/usercollection/rest_mode_period`\n\nArguments:\n- `end_date`\n- `fields`: Comma-separated list of fields to include in the response, in addition to the always returned fields. Defaults to all fields if not provided.\n- `next_token`\n- `start_date`\n"]
8330    pub async fn multiple_rest_mode_period_documents_v2_usercollection_rest_mode_period_get<'a>(
8331        &'a self,
8332        end_date: Option<&'a ::chrono::naive::NaiveDate>,
8333        fields: Option<&'a str>,
8334        next_token: Option<&'a str>,
8335        start_date: Option<&'a ::chrono::naive::NaiveDate>,
8336    ) -> Result<
8337        ResponseValue<types::MultiDocumentResponsePublicRestModePeriod>,
8338        Error<types::HttpValidationError>,
8339    > {
8340        let url = format!("{}/v2/usercollection/rest_mode_period", self.baseurl,);
8341        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8342        header_map.append(
8343            ::reqwest::header::HeaderName::from_static("api-version"),
8344            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8345        );
8346        #[allow(unused_mut)]
8347        let mut request = self
8348            .client
8349            .get(url)
8350            .header(
8351                ::reqwest::header::ACCEPT,
8352                ::reqwest::header::HeaderValue::from_static("application/json"),
8353            )
8354            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
8355            .query(&progenitor_client::QueryParam::new("fields", &fields))
8356            .query(&progenitor_client::QueryParam::new(
8357                "next_token",
8358                &next_token,
8359            ))
8360            .query(&progenitor_client::QueryParam::new(
8361                "start_date",
8362                &start_date,
8363            ))
8364            .headers(header_map)
8365            .build()?;
8366        let info = OperationInfo {
8367            operation_id:
8368                "multiple_rest_mode_period_documents_v2_usercollection_rest_mode_period_get",
8369        };
8370        self.pre(&mut request, &info).await?;
8371        let result = self.exec(request, &info).await;
8372        self.post(&result, &info).await?;
8373        let response = result?;
8374        match response.status().as_u16() {
8375            200u16 => ResponseValue::from_response(response).await,
8376            422u16 => Err(Error::ErrorResponse(
8377                ResponseValue::from_response(response).await?,
8378            )),
8379            _ => Err(Error::UnexpectedResponse(response)),
8380        }
8381    }
8382
8383    #[doc = "Single Rest Mode Period Document\n\nSends a `GET` request to `/v2/usercollection/rest_mode_period/{document_id}`\n\n"]
8384    pub async fn single_rest_mode_period_document_v2_usercollection_rest_mode_period_document_id_get<
8385        'a,
8386    >(
8387        &'a self,
8388        document_id: &'a str,
8389    ) -> Result<ResponseValue<types::PublicRestModePeriod>, Error<types::HttpValidationError>> {
8390        let url = format!(
8391            "{}/v2/usercollection/rest_mode_period/{}",
8392            self.baseurl,
8393            encode_path(&document_id.to_string()),
8394        );
8395        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8396        header_map.append(
8397            ::reqwest::header::HeaderName::from_static("api-version"),
8398            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8399        );
8400        #[allow(unused_mut)]
8401        let mut request = self
8402            .client
8403            .get(url)
8404            .header(
8405                ::reqwest::header::ACCEPT,
8406                ::reqwest::header::HeaderValue::from_static("application/json"),
8407            )
8408            .headers(header_map)
8409            .build()?;
8410        let info = OperationInfo { operation_id : "single_rest_mode_period_document_v2_usercollection_rest_mode_period_document_id_get" , } ;
8411        self.pre(&mut request, &info).await?;
8412        let result = self.exec(request, &info).await;
8413        self.post(&result, &info).await?;
8414        let response = result?;
8415        match response.status().as_u16() {
8416            200u16 => ResponseValue::from_response(response).await,
8417            422u16 => Err(Error::ErrorResponse(
8418                ResponseValue::from_response(response).await?,
8419            )),
8420            _ => Err(Error::UnexpectedResponse(response)),
8421        }
8422    }
8423
8424    #[doc = "Multiple Ring Battery Level Documents\n\nSends a `GET` request to `/v2/usercollection/ring_battery_level`\n\nArguments:\n- `end_datetime`\n- `fields`: Comma-separated list of fields to include in the response, in addition to the always returned fields. Defaults to all fields if not provided.\n- `latest`: If True, returns most recent sample.\n- `next_token`\n- `start_datetime`\n"]
8425    pub async fn multiple_ring_battery_level_documents_v2_usercollection_ring_battery_level_get<
8426        'a,
8427    >(
8428        &'a self,
8429        end_datetime: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>,
8430        fields: Option<&'a str>,
8431        latest: Option<bool>,
8432        next_token: Option<&'a str>,
8433        start_datetime: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>,
8434    ) -> Result<
8435        ResponseValue<
8436            types::ResponseMultipleRingBatteryLevelDocumentsV2UsercollectionRingBatteryLevelGet,
8437        >,
8438        Error<types::HttpValidationError>,
8439    > {
8440        let url = format!("{}/v2/usercollection/ring_battery_level", self.baseurl,);
8441        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8442        header_map.append(
8443            ::reqwest::header::HeaderName::from_static("api-version"),
8444            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8445        );
8446        #[allow(unused_mut)]
8447        let mut request = self
8448            .client
8449            .get(url)
8450            .header(
8451                ::reqwest::header::ACCEPT,
8452                ::reqwest::header::HeaderValue::from_static("application/json"),
8453            )
8454            .query(&progenitor_client::QueryParam::new(
8455                "end_datetime",
8456                &end_datetime,
8457            ))
8458            .query(&progenitor_client::QueryParam::new("fields", &fields))
8459            .query(&progenitor_client::QueryParam::new("latest", &latest))
8460            .query(&progenitor_client::QueryParam::new(
8461                "next_token",
8462                &next_token,
8463            ))
8464            .query(&progenitor_client::QueryParam::new(
8465                "start_datetime",
8466                &start_datetime,
8467            ))
8468            .headers(header_map)
8469            .build()?;
8470        let info = OperationInfo {
8471            operation_id:
8472                "multiple_ring_battery_level_documents_v2_usercollection_ring_battery_level_get",
8473        };
8474        self.pre(&mut request, &info).await?;
8475        let result = self.exec(request, &info).await;
8476        self.post(&result, &info).await?;
8477        let response = result?;
8478        match response.status().as_u16() {
8479            200u16 => ResponseValue::from_response(response).await,
8480            422u16 => Err(Error::ErrorResponse(
8481                ResponseValue::from_response(response).await?,
8482            )),
8483            _ => Err(Error::UnexpectedResponse(response)),
8484        }
8485    }
8486
8487    #[doc = "Multiple Ring Configuration Documents\n\nSends a `GET` request to `/v2/usercollection/ring_configuration`\n\nArguments:\n- `fields`: Comma-separated list of fields to include in the response, in addition to the always returned fields. Defaults to all fields if not provided.\n- `next_token`\n"]
8488    pub async fn multiple_ring_configuration_documents_v2_usercollection_ring_configuration_get<
8489        'a,
8490    >(
8491        &'a self,
8492        fields: Option<&'a str>,
8493        next_token: Option<&'a str>,
8494    ) -> Result<
8495        ResponseValue<types::MultiDocumentResponsePublicRingConfiguration>,
8496        Error<types::HttpValidationError>,
8497    > {
8498        let url = format!("{}/v2/usercollection/ring_configuration", self.baseurl,);
8499        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8500        header_map.append(
8501            ::reqwest::header::HeaderName::from_static("api-version"),
8502            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8503        );
8504        #[allow(unused_mut)]
8505        let mut request = self
8506            .client
8507            .get(url)
8508            .header(
8509                ::reqwest::header::ACCEPT,
8510                ::reqwest::header::HeaderValue::from_static("application/json"),
8511            )
8512            .query(&progenitor_client::QueryParam::new("fields", &fields))
8513            .query(&progenitor_client::QueryParam::new(
8514                "next_token",
8515                &next_token,
8516            ))
8517            .headers(header_map)
8518            .build()?;
8519        let info = OperationInfo {
8520            operation_id:
8521                "multiple_ring_configuration_documents_v2_usercollection_ring_configuration_get",
8522        };
8523        self.pre(&mut request, &info).await?;
8524        let result = self.exec(request, &info).await;
8525        self.post(&result, &info).await?;
8526        let response = result?;
8527        match response.status().as_u16() {
8528            200u16 => ResponseValue::from_response(response).await,
8529            422u16 => Err(Error::ErrorResponse(
8530                ResponseValue::from_response(response).await?,
8531            )),
8532            _ => Err(Error::UnexpectedResponse(response)),
8533        }
8534    }
8535
8536    #[doc = "Single Ring Configuration Document\n\nSends a `GET` request to `/v2/usercollection/ring_configuration/{document_id}`\n\n"]
8537    pub async fn single_ring_configuration_document_v2_usercollection_ring_configuration_document_id_get<
8538        'a,
8539    >(
8540        &'a self,
8541        document_id: &'a str,
8542    ) -> Result<ResponseValue<types::PublicRingConfiguration>, Error<types::HttpValidationError>>
8543    {
8544        let url = format!(
8545            "{}/v2/usercollection/ring_configuration/{}",
8546            self.baseurl,
8547            encode_path(&document_id.to_string()),
8548        );
8549        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8550        header_map.append(
8551            ::reqwest::header::HeaderName::from_static("api-version"),
8552            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8553        );
8554        #[allow(unused_mut)]
8555        let mut request = self
8556            .client
8557            .get(url)
8558            .header(
8559                ::reqwest::header::ACCEPT,
8560                ::reqwest::header::HeaderValue::from_static("application/json"),
8561            )
8562            .headers(header_map)
8563            .build()?;
8564        let info = OperationInfo { operation_id : "single_ring_configuration_document_v2_usercollection_ring_configuration_document_id_get" , } ;
8565        self.pre(&mut request, &info).await?;
8566        let result = self.exec(request, &info).await;
8567        self.post(&result, &info).await?;
8568        let response = result?;
8569        match response.status().as_u16() {
8570            200u16 => ResponseValue::from_response(response).await,
8571            422u16 => Err(Error::ErrorResponse(
8572                ResponseValue::from_response(response).await?,
8573            )),
8574            _ => Err(Error::UnexpectedResponse(response)),
8575        }
8576    }
8577
8578    #[doc = "Multiple Session Documents\n\nSends a `GET` request to `/v2/usercollection/session`\n\nArguments:\n- `end_date`\n- `fields`: Comma-separated list of fields to include in the response, in addition to the always returned fields. Defaults to all fields if not provided.\n- `next_token`\n- `start_date`\n"]
8579    pub async fn multiple_session_documents_v2_usercollection_session_get<'a>(
8580        &'a self,
8581        end_date: Option<&'a ::chrono::naive::NaiveDate>,
8582        fields: Option<&'a str>,
8583        next_token: Option<&'a str>,
8584        start_date: Option<&'a ::chrono::naive::NaiveDate>,
8585    ) -> Result<
8586        ResponseValue<types::MultiDocumentResponsePublicSession>,
8587        Error<types::HttpValidationError>,
8588    > {
8589        let url = format!("{}/v2/usercollection/session", self.baseurl,);
8590        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8591        header_map.append(
8592            ::reqwest::header::HeaderName::from_static("api-version"),
8593            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8594        );
8595        #[allow(unused_mut)]
8596        let mut request = self
8597            .client
8598            .get(url)
8599            .header(
8600                ::reqwest::header::ACCEPT,
8601                ::reqwest::header::HeaderValue::from_static("application/json"),
8602            )
8603            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
8604            .query(&progenitor_client::QueryParam::new("fields", &fields))
8605            .query(&progenitor_client::QueryParam::new(
8606                "next_token",
8607                &next_token,
8608            ))
8609            .query(&progenitor_client::QueryParam::new(
8610                "start_date",
8611                &start_date,
8612            ))
8613            .headers(header_map)
8614            .build()?;
8615        let info = OperationInfo {
8616            operation_id: "multiple_session_documents_v2_usercollection_session_get",
8617        };
8618        self.pre(&mut request, &info).await?;
8619        let result = self.exec(request, &info).await;
8620        self.post(&result, &info).await?;
8621        let response = result?;
8622        match response.status().as_u16() {
8623            200u16 => ResponseValue::from_response(response).await,
8624            422u16 => Err(Error::ErrorResponse(
8625                ResponseValue::from_response(response).await?,
8626            )),
8627            _ => Err(Error::UnexpectedResponse(response)),
8628        }
8629    }
8630
8631    #[doc = "Single Session Document\n\nSends a `GET` request to `/v2/usercollection/session/{document_id}`\n\n"]
8632    pub async fn single_session_document_v2_usercollection_session_document_id_get<'a>(
8633        &'a self,
8634        document_id: &'a str,
8635    ) -> Result<ResponseValue<types::PublicSession>, Error<types::HttpValidationError>> {
8636        let url = format!(
8637            "{}/v2/usercollection/session/{}",
8638            self.baseurl,
8639            encode_path(&document_id.to_string()),
8640        );
8641        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8642        header_map.append(
8643            ::reqwest::header::HeaderName::from_static("api-version"),
8644            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8645        );
8646        #[allow(unused_mut)]
8647        let mut request = self
8648            .client
8649            .get(url)
8650            .header(
8651                ::reqwest::header::ACCEPT,
8652                ::reqwest::header::HeaderValue::from_static("application/json"),
8653            )
8654            .headers(header_map)
8655            .build()?;
8656        let info = OperationInfo {
8657            operation_id: "single_session_document_v2_usercollection_session_document_id_get",
8658        };
8659        self.pre(&mut request, &info).await?;
8660        let result = self.exec(request, &info).await;
8661        self.post(&result, &info).await?;
8662        let response = result?;
8663        match response.status().as_u16() {
8664            200u16 => ResponseValue::from_response(response).await,
8665            422u16 => Err(Error::ErrorResponse(
8666                ResponseValue::from_response(response).await?,
8667            )),
8668            _ => Err(Error::UnexpectedResponse(response)),
8669        }
8670    }
8671
8672    #[doc = "Multiple Sleep Documents\n\nSends a `GET` request to `/v2/usercollection/sleep`\n\nArguments:\n- `end_date`\n- `fields`: Comma-separated list of fields to include in the response, in addition to the always returned fields. Defaults to all fields if not provided.\n- `next_token`\n- `start_date`\n"]
8673    pub async fn multiple_sleep_documents_v2_usercollection_sleep_get<'a>(
8674        &'a self,
8675        end_date: Option<&'a ::chrono::naive::NaiveDate>,
8676        fields: Option<&'a str>,
8677        next_token: Option<&'a str>,
8678        start_date: Option<&'a ::chrono::naive::NaiveDate>,
8679    ) -> Result<
8680        ResponseValue<types::MultiDocumentResponsePublicModifiedSleepModel>,
8681        Error<types::HttpValidationError>,
8682    > {
8683        let url = format!("{}/v2/usercollection/sleep", self.baseurl,);
8684        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8685        header_map.append(
8686            ::reqwest::header::HeaderName::from_static("api-version"),
8687            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8688        );
8689        #[allow(unused_mut)]
8690        let mut request = self
8691            .client
8692            .get(url)
8693            .header(
8694                ::reqwest::header::ACCEPT,
8695                ::reqwest::header::HeaderValue::from_static("application/json"),
8696            )
8697            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
8698            .query(&progenitor_client::QueryParam::new("fields", &fields))
8699            .query(&progenitor_client::QueryParam::new(
8700                "next_token",
8701                &next_token,
8702            ))
8703            .query(&progenitor_client::QueryParam::new(
8704                "start_date",
8705                &start_date,
8706            ))
8707            .headers(header_map)
8708            .build()?;
8709        let info = OperationInfo {
8710            operation_id: "multiple_sleep_documents_v2_usercollection_sleep_get",
8711        };
8712        self.pre(&mut request, &info).await?;
8713        let result = self.exec(request, &info).await;
8714        self.post(&result, &info).await?;
8715        let response = result?;
8716        match response.status().as_u16() {
8717            200u16 => ResponseValue::from_response(response).await,
8718            422u16 => Err(Error::ErrorResponse(
8719                ResponseValue::from_response(response).await?,
8720            )),
8721            _ => Err(Error::UnexpectedResponse(response)),
8722        }
8723    }
8724
8725    #[doc = "Single Sleep Document\n\nSends a `GET` request to `/v2/usercollection/sleep/{document_id}`\n\n"]
8726    pub async fn single_sleep_document_v2_usercollection_sleep_document_id_get<'a>(
8727        &'a self,
8728        document_id: &'a str,
8729    ) -> Result<ResponseValue<types::PublicModifiedSleepModel>, Error<types::HttpValidationError>>
8730    {
8731        let url = format!(
8732            "{}/v2/usercollection/sleep/{}",
8733            self.baseurl,
8734            encode_path(&document_id.to_string()),
8735        );
8736        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8737        header_map.append(
8738            ::reqwest::header::HeaderName::from_static("api-version"),
8739            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8740        );
8741        #[allow(unused_mut)]
8742        let mut request = self
8743            .client
8744            .get(url)
8745            .header(
8746                ::reqwest::header::ACCEPT,
8747                ::reqwest::header::HeaderValue::from_static("application/json"),
8748            )
8749            .headers(header_map)
8750            .build()?;
8751        let info = OperationInfo {
8752            operation_id: "single_sleep_document_v2_usercollection_sleep_document_id_get",
8753        };
8754        self.pre(&mut request, &info).await?;
8755        let result = self.exec(request, &info).await;
8756        self.post(&result, &info).await?;
8757        let response = result?;
8758        match response.status().as_u16() {
8759            200u16 => ResponseValue::from_response(response).await,
8760            422u16 => Err(Error::ErrorResponse(
8761                ResponseValue::from_response(response).await?,
8762            )),
8763            _ => Err(Error::UnexpectedResponse(response)),
8764        }
8765    }
8766
8767    #[doc = "Multiple Sleep Time Documents\n\nSends a `GET` request to `/v2/usercollection/sleep_time`\n\nArguments:\n- `end_date`\n- `fields`: Comma-separated list of fields to include in the response, in addition to the always returned fields. Defaults to all fields if not provided.\n- `next_token`\n- `start_date`\n"]
8768    pub async fn multiple_sleep_time_documents_v2_usercollection_sleep_time_get<'a>(
8769        &'a self,
8770        end_date: Option<&'a ::chrono::naive::NaiveDate>,
8771        fields: Option<&'a str>,
8772        next_token: Option<&'a str>,
8773        start_date: Option<&'a ::chrono::naive::NaiveDate>,
8774    ) -> Result<
8775        ResponseValue<types::MultiDocumentResponsePublicSleepTime>,
8776        Error<types::HttpValidationError>,
8777    > {
8778        let url = format!("{}/v2/usercollection/sleep_time", self.baseurl,);
8779        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8780        header_map.append(
8781            ::reqwest::header::HeaderName::from_static("api-version"),
8782            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8783        );
8784        #[allow(unused_mut)]
8785        let mut request = self
8786            .client
8787            .get(url)
8788            .header(
8789                ::reqwest::header::ACCEPT,
8790                ::reqwest::header::HeaderValue::from_static("application/json"),
8791            )
8792            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
8793            .query(&progenitor_client::QueryParam::new("fields", &fields))
8794            .query(&progenitor_client::QueryParam::new(
8795                "next_token",
8796                &next_token,
8797            ))
8798            .query(&progenitor_client::QueryParam::new(
8799                "start_date",
8800                &start_date,
8801            ))
8802            .headers(header_map)
8803            .build()?;
8804        let info = OperationInfo {
8805            operation_id: "multiple_sleep_time_documents_v2_usercollection_sleep_time_get",
8806        };
8807        self.pre(&mut request, &info).await?;
8808        let result = self.exec(request, &info).await;
8809        self.post(&result, &info).await?;
8810        let response = result?;
8811        match response.status().as_u16() {
8812            200u16 => ResponseValue::from_response(response).await,
8813            422u16 => Err(Error::ErrorResponse(
8814                ResponseValue::from_response(response).await?,
8815            )),
8816            _ => Err(Error::UnexpectedResponse(response)),
8817        }
8818    }
8819
8820    #[doc = "Single Sleep Time Document\n\nSends a `GET` request to `/v2/usercollection/sleep_time/{document_id}`\n\n"]
8821    pub async fn single_sleep_time_document_v2_usercollection_sleep_time_document_id_get<'a>(
8822        &'a self,
8823        document_id: &'a str,
8824    ) -> Result<ResponseValue<types::PublicSleepTime>, Error<types::HttpValidationError>> {
8825        let url = format!(
8826            "{}/v2/usercollection/sleep_time/{}",
8827            self.baseurl,
8828            encode_path(&document_id.to_string()),
8829        );
8830        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8831        header_map.append(
8832            ::reqwest::header::HeaderName::from_static("api-version"),
8833            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8834        );
8835        #[allow(unused_mut)]
8836        let mut request = self
8837            .client
8838            .get(url)
8839            .header(
8840                ::reqwest::header::ACCEPT,
8841                ::reqwest::header::HeaderValue::from_static("application/json"),
8842            )
8843            .headers(header_map)
8844            .build()?;
8845        let info = OperationInfo {
8846            operation_id: "single_sleep_time_document_v2_usercollection_sleep_time_document_id_get",
8847        };
8848        self.pre(&mut request, &info).await?;
8849        let result = self.exec(request, &info).await;
8850        self.post(&result, &info).await?;
8851        let response = result?;
8852        match response.status().as_u16() {
8853            200u16 => ResponseValue::from_response(response).await,
8854            422u16 => Err(Error::ErrorResponse(
8855                ResponseValue::from_response(response).await?,
8856            )),
8857            _ => Err(Error::UnexpectedResponse(response)),
8858        }
8859    }
8860
8861    #[doc = "Multiple Tag Documents\n\nSends a `GET` request to `/v2/usercollection/tag`\n\nArguments:\n- `end_date`\n- `fields`: N/A. This route does not support field selection yet, all fields will be returned.\n- `next_token`\n- `start_date`\n"]
8862    pub async fn multiple_tag_documents_v2_usercollection_tag_get<'a>(
8863        &'a self,
8864        end_date: Option<&'a ::chrono::naive::NaiveDate>,
8865        fields: Option<&'a str>,
8866        next_token: Option<&'a str>,
8867        start_date: Option<&'a ::chrono::naive::NaiveDate>,
8868    ) -> Result<
8869        ResponseValue<types::MultiDocumentResponseTagModel>,
8870        Error<types::HttpValidationError>,
8871    > {
8872        let url = format!("{}/v2/usercollection/tag", self.baseurl,);
8873        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8874        header_map.append(
8875            ::reqwest::header::HeaderName::from_static("api-version"),
8876            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8877        );
8878        #[allow(unused_mut)]
8879        let mut request = self
8880            .client
8881            .get(url)
8882            .header(
8883                ::reqwest::header::ACCEPT,
8884                ::reqwest::header::HeaderValue::from_static("application/json"),
8885            )
8886            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
8887            .query(&progenitor_client::QueryParam::new("fields", &fields))
8888            .query(&progenitor_client::QueryParam::new(
8889                "next_token",
8890                &next_token,
8891            ))
8892            .query(&progenitor_client::QueryParam::new(
8893                "start_date",
8894                &start_date,
8895            ))
8896            .headers(header_map)
8897            .build()?;
8898        let info = OperationInfo {
8899            operation_id: "multiple_tag_documents_v2_usercollection_tag_get",
8900        };
8901        self.pre(&mut request, &info).await?;
8902        let result = self.exec(request, &info).await;
8903        self.post(&result, &info).await?;
8904        let response = result?;
8905        match response.status().as_u16() {
8906            200u16 => ResponseValue::from_response(response).await,
8907            422u16 => Err(Error::ErrorResponse(
8908                ResponseValue::from_response(response).await?,
8909            )),
8910            _ => Err(Error::UnexpectedResponse(response)),
8911        }
8912    }
8913
8914    #[doc = "Single Tag Document\n\nSends a `GET` request to `/v2/usercollection/tag/{document_id}`\n\n"]
8915    pub async fn single_tag_document_v2_usercollection_tag_document_id_get<'a>(
8916        &'a self,
8917        document_id: &'a str,
8918    ) -> Result<ResponseValue<types::TagModel>, Error<types::HttpValidationError>> {
8919        let url = format!(
8920            "{}/v2/usercollection/tag/{}",
8921            self.baseurl,
8922            encode_path(&document_id.to_string()),
8923        );
8924        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8925        header_map.append(
8926            ::reqwest::header::HeaderName::from_static("api-version"),
8927            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8928        );
8929        #[allow(unused_mut)]
8930        let mut request = self
8931            .client
8932            .get(url)
8933            .header(
8934                ::reqwest::header::ACCEPT,
8935                ::reqwest::header::HeaderValue::from_static("application/json"),
8936            )
8937            .headers(header_map)
8938            .build()?;
8939        let info = OperationInfo {
8940            operation_id: "single_tag_document_v2_usercollection_tag_document_id_get",
8941        };
8942        self.pre(&mut request, &info).await?;
8943        let result = self.exec(request, &info).await;
8944        self.post(&result, &info).await?;
8945        let response = result?;
8946        match response.status().as_u16() {
8947            200u16 => ResponseValue::from_response(response).await,
8948            422u16 => Err(Error::ErrorResponse(
8949                ResponseValue::from_response(response).await?,
8950            )),
8951            _ => Err(Error::UnexpectedResponse(response)),
8952        }
8953    }
8954
8955    #[doc = "Multiple Vo2 Max Documents\n\nSends a `GET` request to `/v2/usercollection/vO2_max`\n\nArguments:\n- `end_date`\n- `fields`: Comma-separated list of fields to include in the response, in addition to the always returned fields. Defaults to all fields if not provided.\n- `next_token`\n- `start_date`\n"]
8956    pub async fn multiple_v_o2_max_documents_v2_usercollection_v_o2_max_get<'a>(
8957        &'a self,
8958        end_date: Option<&'a ::chrono::naive::NaiveDate>,
8959        fields: Option<&'a str>,
8960        next_token: Option<&'a str>,
8961        start_date: Option<&'a ::chrono::naive::NaiveDate>,
8962    ) -> Result<
8963        ResponseValue<types::MultiDocumentResponsePublicVo2Max>,
8964        Error<types::HttpValidationError>,
8965    > {
8966        let url = format!("{}/v2/usercollection/vO2_max", self.baseurl,);
8967        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8968        header_map.append(
8969            ::reqwest::header::HeaderName::from_static("api-version"),
8970            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8971        );
8972        #[allow(unused_mut)]
8973        let mut request = self
8974            .client
8975            .get(url)
8976            .header(
8977                ::reqwest::header::ACCEPT,
8978                ::reqwest::header::HeaderValue::from_static("application/json"),
8979            )
8980            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
8981            .query(&progenitor_client::QueryParam::new("fields", &fields))
8982            .query(&progenitor_client::QueryParam::new(
8983                "next_token",
8984                &next_token,
8985            ))
8986            .query(&progenitor_client::QueryParam::new(
8987                "start_date",
8988                &start_date,
8989            ))
8990            .headers(header_map)
8991            .build()?;
8992        let info = OperationInfo {
8993            operation_id: "multiple_v_o2_max_documents_v2_usercollection_v_o2_max_get",
8994        };
8995        self.pre(&mut request, &info).await?;
8996        let result = self.exec(request, &info).await;
8997        self.post(&result, &info).await?;
8998        let response = result?;
8999        match response.status().as_u16() {
9000            200u16 => ResponseValue::from_response(response).await,
9001            422u16 => Err(Error::ErrorResponse(
9002                ResponseValue::from_response(response).await?,
9003            )),
9004            _ => Err(Error::UnexpectedResponse(response)),
9005        }
9006    }
9007
9008    #[doc = "Single Vo2 Max Document\n\nSends a `GET` request to `/v2/usercollection/vO2_max/{document_id}`\n\n"]
9009    pub async fn single_v_o2_max_document_v2_usercollection_v_o2_max_document_id_get<'a>(
9010        &'a self,
9011        document_id: &'a str,
9012    ) -> Result<ResponseValue<types::PublicVo2Max>, Error<types::HttpValidationError>> {
9013        let url = format!(
9014            "{}/v2/usercollection/vO2_max/{}",
9015            self.baseurl,
9016            encode_path(&document_id.to_string()),
9017        );
9018        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
9019        header_map.append(
9020            ::reqwest::header::HeaderName::from_static("api-version"),
9021            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9022        );
9023        #[allow(unused_mut)]
9024        let mut request = self
9025            .client
9026            .get(url)
9027            .header(
9028                ::reqwest::header::ACCEPT,
9029                ::reqwest::header::HeaderValue::from_static("application/json"),
9030            )
9031            .headers(header_map)
9032            .build()?;
9033        let info = OperationInfo {
9034            operation_id: "single_v_o2_max_document_v2_usercollection_v_o2_max_document_id_get",
9035        };
9036        self.pre(&mut request, &info).await?;
9037        let result = self.exec(request, &info).await;
9038        self.post(&result, &info).await?;
9039        let response = result?;
9040        match response.status().as_u16() {
9041            200u16 => ResponseValue::from_response(response).await,
9042            422u16 => Err(Error::ErrorResponse(
9043                ResponseValue::from_response(response).await?,
9044            )),
9045            _ => Err(Error::UnexpectedResponse(response)),
9046        }
9047    }
9048
9049    #[doc = "Multiple Workout Documents\n\nSends a `GET` request to `/v2/usercollection/workout`\n\nArguments:\n- `end_date`\n- `fields`: Comma-separated list of fields to include in the response, in addition to the always returned fields. Defaults to all fields if not provided.\n- `next_token`\n- `start_date`\n"]
9050    pub async fn multiple_workout_documents_v2_usercollection_workout_get<'a>(
9051        &'a self,
9052        end_date: Option<&'a ::chrono::naive::NaiveDate>,
9053        fields: Option<&'a str>,
9054        next_token: Option<&'a str>,
9055        start_date: Option<&'a ::chrono::naive::NaiveDate>,
9056    ) -> Result<
9057        ResponseValue<types::MultiDocumentResponsePublicWorkout>,
9058        Error<types::HttpValidationError>,
9059    > {
9060        let url = format!("{}/v2/usercollection/workout", self.baseurl,);
9061        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
9062        header_map.append(
9063            ::reqwest::header::HeaderName::from_static("api-version"),
9064            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9065        );
9066        #[allow(unused_mut)]
9067        let mut request = self
9068            .client
9069            .get(url)
9070            .header(
9071                ::reqwest::header::ACCEPT,
9072                ::reqwest::header::HeaderValue::from_static("application/json"),
9073            )
9074            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
9075            .query(&progenitor_client::QueryParam::new("fields", &fields))
9076            .query(&progenitor_client::QueryParam::new(
9077                "next_token",
9078                &next_token,
9079            ))
9080            .query(&progenitor_client::QueryParam::new(
9081                "start_date",
9082                &start_date,
9083            ))
9084            .headers(header_map)
9085            .build()?;
9086        let info = OperationInfo {
9087            operation_id: "multiple_workout_documents_v2_usercollection_workout_get",
9088        };
9089        self.pre(&mut request, &info).await?;
9090        let result = self.exec(request, &info).await;
9091        self.post(&result, &info).await?;
9092        let response = result?;
9093        match response.status().as_u16() {
9094            200u16 => ResponseValue::from_response(response).await,
9095            422u16 => Err(Error::ErrorResponse(
9096                ResponseValue::from_response(response).await?,
9097            )),
9098            _ => Err(Error::UnexpectedResponse(response)),
9099        }
9100    }
9101
9102    #[doc = "Single Workout Document\n\nSends a `GET` request to `/v2/usercollection/workout/{document_id}`\n\n"]
9103    pub async fn single_workout_document_v2_usercollection_workout_document_id_get<'a>(
9104        &'a self,
9105        document_id: &'a str,
9106    ) -> Result<ResponseValue<types::PublicWorkout>, Error<types::HttpValidationError>> {
9107        let url = format!(
9108            "{}/v2/usercollection/workout/{}",
9109            self.baseurl,
9110            encode_path(&document_id.to_string()),
9111        );
9112        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
9113        header_map.append(
9114            ::reqwest::header::HeaderName::from_static("api-version"),
9115            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9116        );
9117        #[allow(unused_mut)]
9118        let mut request = self
9119            .client
9120            .get(url)
9121            .header(
9122                ::reqwest::header::ACCEPT,
9123                ::reqwest::header::HeaderValue::from_static("application/json"),
9124            )
9125            .headers(header_map)
9126            .build()?;
9127        let info = OperationInfo {
9128            operation_id: "single_workout_document_v2_usercollection_workout_document_id_get",
9129        };
9130        self.pre(&mut request, &info).await?;
9131        let result = self.exec(request, &info).await;
9132        self.post(&result, &info).await?;
9133        let response = result?;
9134        match response.status().as_u16() {
9135            200u16 => ResponseValue::from_response(response).await,
9136            422u16 => Err(Error::ErrorResponse(
9137                ResponseValue::from_response(response).await?,
9138            )),
9139            _ => Err(Error::UnexpectedResponse(response)),
9140        }
9141    }
9142
9143    #[doc = "List Webhook Subscriptions\n\nSends a `GET` request to `/v2/webhook/subscription`\n\n"]
9144    pub async fn list_webhook_subscriptions_v2_webhook_subscription_get<'a>(
9145        &'a self,
9146    ) -> Result<ResponseValue<::std::vec::Vec<types::WebhookSubscriptionModel>>, Error<()>> {
9147        let url = format!("{}/v2/webhook/subscription", self.baseurl,);
9148        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
9149        header_map.append(
9150            ::reqwest::header::HeaderName::from_static("api-version"),
9151            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9152        );
9153        #[allow(unused_mut)]
9154        let mut request = self
9155            .client
9156            .get(url)
9157            .header(
9158                ::reqwest::header::ACCEPT,
9159                ::reqwest::header::HeaderValue::from_static("application/json"),
9160            )
9161            .headers(header_map)
9162            .build()?;
9163        let info = OperationInfo {
9164            operation_id: "list_webhook_subscriptions_v2_webhook_subscription_get",
9165        };
9166        self.pre(&mut request, &info).await?;
9167        let result = self.exec(request, &info).await;
9168        self.post(&result, &info).await?;
9169        let response = result?;
9170        match response.status().as_u16() {
9171            200u16 => ResponseValue::from_response(response).await,
9172            _ => Err(Error::UnexpectedResponse(response)),
9173        }
9174    }
9175
9176    #[doc = "Create Webhook Subscription\n\nSends a `POST` request to `/v2/webhook/subscription`\n\n"]
9177    pub async fn create_webhook_subscription_v2_webhook_subscription_post<'a>(
9178        &'a self,
9179        body: &'a types::CreateWebhookSubscriptionRequest,
9180    ) -> Result<ResponseValue<types::WebhookSubscriptionModel>, Error<types::HttpValidationError>>
9181    {
9182        let url = format!("{}/v2/webhook/subscription", self.baseurl,);
9183        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
9184        header_map.append(
9185            ::reqwest::header::HeaderName::from_static("api-version"),
9186            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9187        );
9188        #[allow(unused_mut)]
9189        let mut request = self
9190            .client
9191            .post(url)
9192            .header(
9193                ::reqwest::header::ACCEPT,
9194                ::reqwest::header::HeaderValue::from_static("application/json"),
9195            )
9196            .json(&body)
9197            .headers(header_map)
9198            .build()?;
9199        let info = OperationInfo {
9200            operation_id: "create_webhook_subscription_v2_webhook_subscription_post",
9201        };
9202        self.pre(&mut request, &info).await?;
9203        let result = self.exec(request, &info).await;
9204        self.post(&result, &info).await?;
9205        let response = result?;
9206        match response.status().as_u16() {
9207            201u16 => ResponseValue::from_response(response).await,
9208            422u16 => Err(Error::ErrorResponse(
9209                ResponseValue::from_response(response).await?,
9210            )),
9211            _ => Err(Error::UnexpectedResponse(response)),
9212        }
9213    }
9214
9215    #[doc = "Renew Webhook Subscription\n\nSends a `PUT` request to `/v2/webhook/subscription/renew/{id}`\n\n"]
9216    pub async fn renew_webhook_subscription_v2_webhook_subscription_renew_id_put<'a>(
9217        &'a self,
9218        id: &'a str,
9219    ) -> Result<ResponseValue<types::WebhookSubscriptionModel>, Error<types::HttpValidationError>>
9220    {
9221        let url = format!(
9222            "{}/v2/webhook/subscription/renew/{}",
9223            self.baseurl,
9224            encode_path(&id.to_string()),
9225        );
9226        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
9227        header_map.append(
9228            ::reqwest::header::HeaderName::from_static("api-version"),
9229            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9230        );
9231        #[allow(unused_mut)]
9232        let mut request = self
9233            .client
9234            .put(url)
9235            .header(
9236                ::reqwest::header::ACCEPT,
9237                ::reqwest::header::HeaderValue::from_static("application/json"),
9238            )
9239            .headers(header_map)
9240            .build()?;
9241        let info = OperationInfo {
9242            operation_id: "renew_webhook_subscription_v2_webhook_subscription_renew_id_put",
9243        };
9244        self.pre(&mut request, &info).await?;
9245        let result = self.exec(request, &info).await;
9246        self.post(&result, &info).await?;
9247        let response = result?;
9248        match response.status().as_u16() {
9249            200u16 => ResponseValue::from_response(response).await,
9250            422u16 => Err(Error::ErrorResponse(
9251                ResponseValue::from_response(response).await?,
9252            )),
9253            _ => Err(Error::UnexpectedResponse(response)),
9254        }
9255    }
9256
9257    #[doc = "Get Webhook Subscription\n\nSends a `GET` request to `/v2/webhook/subscription/{id}`\n\n"]
9258    pub async fn get_webhook_subscription_v2_webhook_subscription_id_get<'a>(
9259        &'a self,
9260        id: &'a str,
9261    ) -> Result<ResponseValue<types::WebhookSubscriptionModel>, Error<types::HttpValidationError>>
9262    {
9263        let url = format!(
9264            "{}/v2/webhook/subscription/{}",
9265            self.baseurl,
9266            encode_path(&id.to_string()),
9267        );
9268        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
9269        header_map.append(
9270            ::reqwest::header::HeaderName::from_static("api-version"),
9271            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9272        );
9273        #[allow(unused_mut)]
9274        let mut request = self
9275            .client
9276            .get(url)
9277            .header(
9278                ::reqwest::header::ACCEPT,
9279                ::reqwest::header::HeaderValue::from_static("application/json"),
9280            )
9281            .headers(header_map)
9282            .build()?;
9283        let info = OperationInfo {
9284            operation_id: "get_webhook_subscription_v2_webhook_subscription_id_get",
9285        };
9286        self.pre(&mut request, &info).await?;
9287        let result = self.exec(request, &info).await;
9288        self.post(&result, &info).await?;
9289        let response = result?;
9290        match response.status().as_u16() {
9291            200u16 => ResponseValue::from_response(response).await,
9292            422u16 => Err(Error::ErrorResponse(
9293                ResponseValue::from_response(response).await?,
9294            )),
9295            _ => Err(Error::UnexpectedResponse(response)),
9296        }
9297    }
9298
9299    #[doc = "Update Webhook Subscription\n\nSends a `PUT` request to `/v2/webhook/subscription/{id}`\n\n"]
9300    pub async fn update_webhook_subscription_v2_webhook_subscription_id_put<'a>(
9301        &'a self,
9302        id: &'a str,
9303        body: &'a types::UpdateWebhookSubscriptionRequest,
9304    ) -> Result<ResponseValue<types::WebhookSubscriptionModel>, Error<types::HttpValidationError>>
9305    {
9306        let url = format!(
9307            "{}/v2/webhook/subscription/{}",
9308            self.baseurl,
9309            encode_path(&id.to_string()),
9310        );
9311        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
9312        header_map.append(
9313            ::reqwest::header::HeaderName::from_static("api-version"),
9314            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9315        );
9316        #[allow(unused_mut)]
9317        let mut request = self
9318            .client
9319            .put(url)
9320            .header(
9321                ::reqwest::header::ACCEPT,
9322                ::reqwest::header::HeaderValue::from_static("application/json"),
9323            )
9324            .json(&body)
9325            .headers(header_map)
9326            .build()?;
9327        let info = OperationInfo {
9328            operation_id: "update_webhook_subscription_v2_webhook_subscription_id_put",
9329        };
9330        self.pre(&mut request, &info).await?;
9331        let result = self.exec(request, &info).await;
9332        self.post(&result, &info).await?;
9333        let response = result?;
9334        match response.status().as_u16() {
9335            200u16 => ResponseValue::from_response(response).await,
9336            422u16 => Err(Error::ErrorResponse(
9337                ResponseValue::from_response(response).await?,
9338            )),
9339            _ => Err(Error::UnexpectedResponse(response)),
9340        }
9341    }
9342
9343    #[doc = "Delete Webhook Subscription\n\nSends a `DELETE` request to `/v2/webhook/subscription/{id}`\n\n"]
9344    pub async fn delete_webhook_subscription_v2_webhook_subscription_id_delete<'a>(
9345        &'a self,
9346        id: &'a str,
9347    ) -> Result<ResponseValue<()>, Error<types::HttpValidationError>> {
9348        let url = format!(
9349            "{}/v2/webhook/subscription/{}",
9350            self.baseurl,
9351            encode_path(&id.to_string()),
9352        );
9353        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
9354        header_map.append(
9355            ::reqwest::header::HeaderName::from_static("api-version"),
9356            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9357        );
9358        #[allow(unused_mut)]
9359        let mut request = self
9360            .client
9361            .delete(url)
9362            .header(
9363                ::reqwest::header::ACCEPT,
9364                ::reqwest::header::HeaderValue::from_static("application/json"),
9365            )
9366            .headers(header_map)
9367            .build()?;
9368        let info = OperationInfo {
9369            operation_id: "delete_webhook_subscription_v2_webhook_subscription_id_delete",
9370        };
9371        self.pre(&mut request, &info).await?;
9372        let result = self.exec(request, &info).await;
9373        self.post(&result, &info).await?;
9374        let response = result?;
9375        match response.status().as_u16() {
9376            204u16 => Ok(ResponseValue::empty(response)),
9377            422u16 => Err(Error::ErrorResponse(
9378                ResponseValue::from_response(response).await?,
9379            )),
9380            _ => Err(Error::UnexpectedResponse(response)),
9381        }
9382    }
9383}
9384
9385#[doc = r" Items consumers will typically use such as the Client."]
9386pub mod prelude {
9387    #[allow(unused_imports)]
9388    pub use super::Client;
9389}