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 = "`ExtApiV2DataType`"]
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 = "  \"type\": \"string\","]
280    #[doc = "  \"enum\": ["]
281    #[doc = "    \"tag\","]
282    #[doc = "    \"enhanced_tag\","]
283    #[doc = "    \"workout\","]
284    #[doc = "    \"session\","]
285    #[doc = "    \"sleep\","]
286    #[doc = "    \"daily_sleep\","]
287    #[doc = "    \"daily_readiness\","]
288    #[doc = "    \"daily_activity\","]
289    #[doc = "    \"daily_spo2\","]
290    #[doc = "    \"sleep_time\","]
291    #[doc = "    \"rest_mode_period\","]
292    #[doc = "    \"ring_configuration\","]
293    #[doc = "    \"daily_stress\","]
294    #[doc = "    \"daily_cardiovascular_age\","]
295    #[doc = "    \"daily_resilience\","]
296    #[doc = "    \"vo2_max\","]
297    #[doc = "    \"meal\""]
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        #[serde(rename = "meal")]
348        Meal,
349    }
350
351    impl ::std::fmt::Display for ExtApiV2DataType {
352        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
353            match *self {
354                Self::Tag => f.write_str("tag"),
355                Self::EnhancedTag => f.write_str("enhanced_tag"),
356                Self::Workout => f.write_str("workout"),
357                Self::Session => f.write_str("session"),
358                Self::Sleep => f.write_str("sleep"),
359                Self::DailySleep => f.write_str("daily_sleep"),
360                Self::DailyReadiness => f.write_str("daily_readiness"),
361                Self::DailyActivity => f.write_str("daily_activity"),
362                Self::DailySpo2 => f.write_str("daily_spo2"),
363                Self::SleepTime => f.write_str("sleep_time"),
364                Self::RestModePeriod => f.write_str("rest_mode_period"),
365                Self::RingConfiguration => f.write_str("ring_configuration"),
366                Self::DailyStress => f.write_str("daily_stress"),
367                Self::DailyCardiovascularAge => f.write_str("daily_cardiovascular_age"),
368                Self::DailyResilience => f.write_str("daily_resilience"),
369                Self::Vo2Max => f.write_str("vo2_max"),
370                Self::Meal => f.write_str("meal"),
371            }
372        }
373    }
374
375    impl ::std::str::FromStr for ExtApiV2DataType {
376        type Err = self::error::ConversionError;
377        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
378            match value {
379                "tag" => Ok(Self::Tag),
380                "enhanced_tag" => Ok(Self::EnhancedTag),
381                "workout" => Ok(Self::Workout),
382                "session" => Ok(Self::Session),
383                "sleep" => Ok(Self::Sleep),
384                "daily_sleep" => Ok(Self::DailySleep),
385                "daily_readiness" => Ok(Self::DailyReadiness),
386                "daily_activity" => Ok(Self::DailyActivity),
387                "daily_spo2" => Ok(Self::DailySpo2),
388                "sleep_time" => Ok(Self::SleepTime),
389                "rest_mode_period" => Ok(Self::RestModePeriod),
390                "ring_configuration" => Ok(Self::RingConfiguration),
391                "daily_stress" => Ok(Self::DailyStress),
392                "daily_cardiovascular_age" => Ok(Self::DailyCardiovascularAge),
393                "daily_resilience" => Ok(Self::DailyResilience),
394                "vo2_max" => Ok(Self::Vo2Max),
395                "meal" => Ok(Self::Meal),
396                _ => Err("invalid value".into()),
397            }
398        }
399    }
400
401    impl ::std::convert::TryFrom<&str> for ExtApiV2DataType {
402        type Error = self::error::ConversionError;
403        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
404            value.parse()
405        }
406    }
407
408    impl ::std::convert::TryFrom<&::std::string::String> for ExtApiV2DataType {
409        type Error = self::error::ConversionError;
410        fn try_from(
411            value: &::std::string::String,
412        ) -> ::std::result::Result<Self, self::error::ConversionError> {
413            value.parse()
414        }
415    }
416
417    impl ::std::convert::TryFrom<::std::string::String> for ExtApiV2DataType {
418        type Error = self::error::ConversionError;
419        fn try_from(
420            value: ::std::string::String,
421        ) -> ::std::result::Result<Self, self::error::ConversionError> {
422            value.parse()
423        }
424    }
425
426    #[doc = "`HttpValidationError`"]
427    #[doc = r""]
428    #[doc = r" <details><summary>JSON schema</summary>"]
429    #[doc = r""]
430    #[doc = r" ```json"]
431    #[doc = "{"]
432    #[doc = "  \"title\": \"HTTPValidationError\","]
433    #[doc = "  \"type\": \"object\","]
434    #[doc = "  \"properties\": {"]
435    #[doc = "    \"detail\": {"]
436    #[doc = "      \"title\": \"Detail\","]
437    #[doc = "      \"type\": \"array\","]
438    #[doc = "      \"items\": {"]
439    #[doc = "        \"$ref\": \"#/components/schemas/ValidationError\""]
440    #[doc = "      }"]
441    #[doc = "    }"]
442    #[doc = "  }"]
443    #[doc = "}"]
444    #[doc = r" ```"]
445    #[doc = r" </details>"]
446    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
447    pub struct HttpValidationError {
448        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
449        pub detail: ::std::vec::Vec<ValidationError>,
450    }
451
452    impl ::std::default::Default for HttpValidationError {
453        fn default() -> Self {
454            Self {
455                detail: Default::default(),
456            }
457        }
458    }
459
460    #[doc = "`IsoDate`"]
461    #[doc = r""]
462    #[doc = r" <details><summary>JSON schema</summary>"]
463    #[doc = r""]
464    #[doc = r" ```json"]
465    #[doc = "{"]
466    #[doc = "  \"type\": \"string\""]
467    #[doc = "}"]
468    #[doc = r" ```"]
469    #[doc = r" </details>"]
470    #[derive(
471        :: serde :: Deserialize,
472        :: serde :: Serialize,
473        Clone,
474        Debug,
475        Eq,
476        Hash,
477        Ord,
478        PartialEq,
479        PartialOrd,
480    )]
481    #[serde(transparent)]
482    pub struct IsoDate(pub ::std::string::String);
483    impl ::std::ops::Deref for IsoDate {
484        type Target = ::std::string::String;
485        fn deref(&self) -> &::std::string::String {
486            &self.0
487        }
488    }
489
490    impl ::std::convert::From<IsoDate> for ::std::string::String {
491        fn from(value: IsoDate) -> Self {
492            value.0
493        }
494    }
495
496    impl ::std::convert::From<::std::string::String> for IsoDate {
497        fn from(value: ::std::string::String) -> Self {
498            Self(value)
499        }
500    }
501
502    impl ::std::str::FromStr for IsoDate {
503        type Err = ::std::convert::Infallible;
504        fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
505            Ok(Self(value.to_string()))
506        }
507    }
508
509    impl ::std::fmt::Display for IsoDate {
510        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
511            self.0.fmt(f)
512        }
513    }
514
515    #[doc = "`LocalDateTime`"]
516    #[doc = r""]
517    #[doc = r" <details><summary>JSON schema</summary>"]
518    #[doc = r""]
519    #[doc = r" ```json"]
520    #[doc = "{"]
521    #[doc = "  \"type\": \"string\""]
522    #[doc = "}"]
523    #[doc = r" ```"]
524    #[doc = r" </details>"]
525    #[derive(
526        :: serde :: Deserialize,
527        :: serde :: Serialize,
528        Clone,
529        Debug,
530        Eq,
531        Hash,
532        Ord,
533        PartialEq,
534        PartialOrd,
535    )]
536    #[serde(transparent)]
537    pub struct LocalDateTime(pub ::std::string::String);
538    impl ::std::ops::Deref for LocalDateTime {
539        type Target = ::std::string::String;
540        fn deref(&self) -> &::std::string::String {
541            &self.0
542        }
543    }
544
545    impl ::std::convert::From<LocalDateTime> for ::std::string::String {
546        fn from(value: LocalDateTime) -> Self {
547            value.0
548        }
549    }
550
551    impl ::std::convert::From<::std::string::String> for LocalDateTime {
552        fn from(value: ::std::string::String) -> Self {
553            Self(value)
554        }
555    }
556
557    impl ::std::str::FromStr for LocalDateTime {
558        type Err = ::std::convert::Infallible;
559        fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
560            Ok(Self(value.to_string()))
561        }
562    }
563
564    impl ::std::fmt::Display for LocalDateTime {
565        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
566            self.0.fmt(f)
567        }
568    }
569
570    #[doc = "`LocalizedDateTime`"]
571    #[doc = r""]
572    #[doc = r" <details><summary>JSON schema</summary>"]
573    #[doc = r""]
574    #[doc = r" ```json"]
575    #[doc = "{"]
576    #[doc = "  \"type\": \"string\""]
577    #[doc = "}"]
578    #[doc = r" ```"]
579    #[doc = r" </details>"]
580    #[derive(
581        :: serde :: Deserialize,
582        :: serde :: Serialize,
583        Clone,
584        Debug,
585        Eq,
586        Hash,
587        Ord,
588        PartialEq,
589        PartialOrd,
590    )]
591    #[serde(transparent)]
592    pub struct LocalizedDateTime(pub ::std::string::String);
593    impl ::std::ops::Deref for LocalizedDateTime {
594        type Target = ::std::string::String;
595        fn deref(&self) -> &::std::string::String {
596            &self.0
597        }
598    }
599
600    impl ::std::convert::From<LocalizedDateTime> for ::std::string::String {
601        fn from(value: LocalizedDateTime) -> Self {
602            value.0
603        }
604    }
605
606    impl ::std::convert::From<::std::string::String> for LocalizedDateTime {
607        fn from(value: ::std::string::String) -> Self {
608            Self(value)
609        }
610    }
611
612    impl ::std::str::FromStr for LocalizedDateTime {
613        type Err = ::std::convert::Infallible;
614        fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
615            Ok(Self(value.to_string()))
616        }
617    }
618
619    impl ::std::fmt::Display for LocalizedDateTime {
620        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
621            self.0.fmt(f)
622        }
623    }
624
625    #[doc = "`LocationItem`"]
626    #[doc = r""]
627    #[doc = r" <details><summary>JSON schema</summary>"]
628    #[doc = r""]
629    #[doc = r" ```json"]
630    #[doc = "{"]
631    #[doc = "  \"anyOf\": ["]
632    #[doc = "    {"]
633    #[doc = "      \"type\": \"string\""]
634    #[doc = "    },"]
635    #[doc = "    {"]
636    #[doc = "      \"type\": \"integer\""]
637    #[doc = "    }"]
638    #[doc = "  ]"]
639    #[doc = "}"]
640    #[doc = r" ```"]
641    #[doc = r" </details>"]
642    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
643    #[serde(untagged)]
644    pub enum LocationItem {
645        String(::std::string::String),
646        Integer(i64),
647    }
648
649    impl ::std::fmt::Display for LocationItem {
650        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
651            match self {
652                Self::String(x) => x.fmt(f),
653                Self::Integer(x) => x.fmt(f),
654            }
655        }
656    }
657
658    impl ::std::convert::From<i64> for LocationItem {
659        fn from(value: i64) -> Self {
660            Self::Integer(value)
661        }
662    }
663
664    #[doc = "Possible long term resilience level values."]
665    #[doc = r""]
666    #[doc = r" <details><summary>JSON schema</summary>"]
667    #[doc = r""]
668    #[doc = r" ```json"]
669    #[doc = "{"]
670    #[doc = "  \"title\": \"LongTermResilienceLevel\","]
671    #[doc = "  \"description\": \"Possible long term resilience level values.\","]
672    #[doc = "  \"type\": \"string\","]
673    #[doc = "  \"enum\": ["]
674    #[doc = "    \"limited\","]
675    #[doc = "    \"adequate\","]
676    #[doc = "    \"solid\","]
677    #[doc = "    \"strong\","]
678    #[doc = "    \"exceptional\""]
679    #[doc = "  ]"]
680    #[doc = "}"]
681    #[doc = r" ```"]
682    #[doc = r" </details>"]
683    #[derive(
684        :: serde :: Deserialize,
685        :: serde :: Serialize,
686        Clone,
687        Copy,
688        Debug,
689        Eq,
690        Hash,
691        Ord,
692        PartialEq,
693        PartialOrd,
694    )]
695    pub enum LongTermResilienceLevel {
696        #[serde(rename = "limited")]
697        Limited,
698        #[serde(rename = "adequate")]
699        Adequate,
700        #[serde(rename = "solid")]
701        Solid,
702        #[serde(rename = "strong")]
703        Strong,
704        #[serde(rename = "exceptional")]
705        Exceptional,
706    }
707
708    impl ::std::fmt::Display for LongTermResilienceLevel {
709        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
710            match *self {
711                Self::Limited => f.write_str("limited"),
712                Self::Adequate => f.write_str("adequate"),
713                Self::Solid => f.write_str("solid"),
714                Self::Strong => f.write_str("strong"),
715                Self::Exceptional => f.write_str("exceptional"),
716            }
717        }
718    }
719
720    impl ::std::str::FromStr for LongTermResilienceLevel {
721        type Err = self::error::ConversionError;
722        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
723            match value {
724                "limited" => Ok(Self::Limited),
725                "adequate" => Ok(Self::Adequate),
726                "solid" => Ok(Self::Solid),
727                "strong" => Ok(Self::Strong),
728                "exceptional" => Ok(Self::Exceptional),
729                _ => Err("invalid value".into()),
730            }
731        }
732    }
733
734    impl ::std::convert::TryFrom<&str> for LongTermResilienceLevel {
735        type Error = self::error::ConversionError;
736        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
737            value.parse()
738        }
739    }
740
741    impl ::std::convert::TryFrom<&::std::string::String> for LongTermResilienceLevel {
742        type Error = self::error::ConversionError;
743        fn try_from(
744            value: &::std::string::String,
745        ) -> ::std::result::Result<Self, self::error::ConversionError> {
746            value.parse()
747        }
748    }
749
750    impl ::std::convert::TryFrom<::std::string::String> for LongTermResilienceLevel {
751        type Error = self::error::ConversionError;
752        fn try_from(
753            value: ::std::string::String,
754        ) -> ::std::result::Result<Self, self::error::ConversionError> {
755            value.parse()
756        }
757    }
758
759    #[doc = "`MultiDocumentResponseDailyResilienceModel`"]
760    #[doc = r""]
761    #[doc = r" <details><summary>JSON schema</summary>"]
762    #[doc = r""]
763    #[doc = r" ```json"]
764    #[doc = "{"]
765    #[doc = "  \"title\": \"MultiDocumentResponse[DailyResilienceModel]\","]
766    #[doc = "  \"type\": \"object\","]
767    #[doc = "  \"required\": ["]
768    #[doc = "    \"data\","]
769    #[doc = "    \"next_token\""]
770    #[doc = "  ],"]
771    #[doc = "  \"properties\": {"]
772    #[doc = "    \"data\": {"]
773    #[doc = "      \"title\": \"Data\","]
774    #[doc = "      \"type\": \"array\","]
775    #[doc = "      \"items\": {"]
776    #[doc = "        \"$ref\": \"#/components/schemas/DailyResilienceModel\""]
777    #[doc = "      }"]
778    #[doc = "    },"]
779    #[doc = "    \"next_token\": {"]
780    #[doc = "      \"title\": \"Next Token\","]
781    #[doc = "      \"type\": ["]
782    #[doc = "        \"string\","]
783    #[doc = "        \"null\""]
784    #[doc = "      ]"]
785    #[doc = "    }"]
786    #[doc = "  }"]
787    #[doc = "}"]
788    #[doc = r" ```"]
789    #[doc = r" </details>"]
790    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
791    pub struct MultiDocumentResponseDailyResilienceModel {
792        pub data: ::std::vec::Vec<DailyResilienceModel>,
793        pub next_token: ::std::option::Option<::std::string::String>,
794    }
795
796    #[doc = "`MultiDocumentResponseEnhancedTagModel`"]
797    #[doc = r""]
798    #[doc = r" <details><summary>JSON schema</summary>"]
799    #[doc = r""]
800    #[doc = r" ```json"]
801    #[doc = "{"]
802    #[doc = "  \"title\": \"MultiDocumentResponse[EnhancedTagModel]\","]
803    #[doc = "  \"type\": \"object\","]
804    #[doc = "  \"required\": ["]
805    #[doc = "    \"data\","]
806    #[doc = "    \"next_token\""]
807    #[doc = "  ],"]
808    #[doc = "  \"properties\": {"]
809    #[doc = "    \"data\": {"]
810    #[doc = "      \"title\": \"Data\","]
811    #[doc = "      \"type\": \"array\","]
812    #[doc = "      \"items\": {"]
813    #[doc = "        \"$ref\": \"#/components/schemas/EnhancedTagModel\""]
814    #[doc = "      }"]
815    #[doc = "    },"]
816    #[doc = "    \"next_token\": {"]
817    #[doc = "      \"title\": \"Next Token\","]
818    #[doc = "      \"type\": ["]
819    #[doc = "        \"string\","]
820    #[doc = "        \"null\""]
821    #[doc = "      ]"]
822    #[doc = "    }"]
823    #[doc = "  }"]
824    #[doc = "}"]
825    #[doc = r" ```"]
826    #[doc = r" </details>"]
827    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
828    pub struct MultiDocumentResponseEnhancedTagModel {
829        pub data: ::std::vec::Vec<EnhancedTagModel>,
830        pub next_token: ::std::option::Option<::std::string::String>,
831    }
832
833    #[doc = "`MultiDocumentResponsePublicDailyActivity`"]
834    #[doc = r""]
835    #[doc = r" <details><summary>JSON schema</summary>"]
836    #[doc = r""]
837    #[doc = r" ```json"]
838    #[doc = "{"]
839    #[doc = "  \"title\": \"MultiDocumentResponse[PublicDailyActivity]\","]
840    #[doc = "  \"type\": \"object\","]
841    #[doc = "  \"required\": ["]
842    #[doc = "    \"data\","]
843    #[doc = "    \"next_token\""]
844    #[doc = "  ],"]
845    #[doc = "  \"properties\": {"]
846    #[doc = "    \"data\": {"]
847    #[doc = "      \"title\": \"Data\","]
848    #[doc = "      \"type\": \"array\","]
849    #[doc = "      \"items\": {"]
850    #[doc = "        \"$ref\": \"#/components/schemas/PublicDailyActivity\""]
851    #[doc = "      }"]
852    #[doc = "    },"]
853    #[doc = "    \"next_token\": {"]
854    #[doc = "      \"title\": \"Next Token\","]
855    #[doc = "      \"type\": ["]
856    #[doc = "        \"string\","]
857    #[doc = "        \"null\""]
858    #[doc = "      ]"]
859    #[doc = "    }"]
860    #[doc = "  }"]
861    #[doc = "}"]
862    #[doc = r" ```"]
863    #[doc = r" </details>"]
864    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
865    pub struct MultiDocumentResponsePublicDailyActivity {
866        pub data: ::std::vec::Vec<PublicDailyActivity>,
867        pub next_token: ::std::option::Option<::std::string::String>,
868    }
869
870    #[doc = "`MultiDocumentResponsePublicDailyCardiovascularAge`"]
871    #[doc = r""]
872    #[doc = r" <details><summary>JSON schema</summary>"]
873    #[doc = r""]
874    #[doc = r" ```json"]
875    #[doc = "{"]
876    #[doc = "  \"title\": \"MultiDocumentResponse[PublicDailyCardiovascularAge]\","]
877    #[doc = "  \"type\": \"object\","]
878    #[doc = "  \"required\": ["]
879    #[doc = "    \"data\","]
880    #[doc = "    \"next_token\""]
881    #[doc = "  ],"]
882    #[doc = "  \"properties\": {"]
883    #[doc = "    \"data\": {"]
884    #[doc = "      \"title\": \"Data\","]
885    #[doc = "      \"type\": \"array\","]
886    #[doc = "      \"items\": {"]
887    #[doc = "        \"$ref\": \"#/components/schemas/PublicDailyCardiovascularAge\""]
888    #[doc = "      }"]
889    #[doc = "    },"]
890    #[doc = "    \"next_token\": {"]
891    #[doc = "      \"title\": \"Next Token\","]
892    #[doc = "      \"type\": ["]
893    #[doc = "        \"string\","]
894    #[doc = "        \"null\""]
895    #[doc = "      ]"]
896    #[doc = "    }"]
897    #[doc = "  }"]
898    #[doc = "}"]
899    #[doc = r" ```"]
900    #[doc = r" </details>"]
901    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
902    pub struct MultiDocumentResponsePublicDailyCardiovascularAge {
903        pub data: ::std::vec::Vec<PublicDailyCardiovascularAge>,
904        pub next_token: ::std::option::Option<::std::string::String>,
905    }
906
907    #[doc = "`MultiDocumentResponsePublicDailyReadiness`"]
908    #[doc = r""]
909    #[doc = r" <details><summary>JSON schema</summary>"]
910    #[doc = r""]
911    #[doc = r" ```json"]
912    #[doc = "{"]
913    #[doc = "  \"title\": \"MultiDocumentResponse[PublicDailyReadiness]\","]
914    #[doc = "  \"type\": \"object\","]
915    #[doc = "  \"required\": ["]
916    #[doc = "    \"data\","]
917    #[doc = "    \"next_token\""]
918    #[doc = "  ],"]
919    #[doc = "  \"properties\": {"]
920    #[doc = "    \"data\": {"]
921    #[doc = "      \"title\": \"Data\","]
922    #[doc = "      \"type\": \"array\","]
923    #[doc = "      \"items\": {"]
924    #[doc = "        \"$ref\": \"#/components/schemas/PublicDailyReadiness\""]
925    #[doc = "      }"]
926    #[doc = "    },"]
927    #[doc = "    \"next_token\": {"]
928    #[doc = "      \"title\": \"Next Token\","]
929    #[doc = "      \"type\": ["]
930    #[doc = "        \"string\","]
931    #[doc = "        \"null\""]
932    #[doc = "      ]"]
933    #[doc = "    }"]
934    #[doc = "  }"]
935    #[doc = "}"]
936    #[doc = r" ```"]
937    #[doc = r" </details>"]
938    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
939    pub struct MultiDocumentResponsePublicDailyReadiness {
940        pub data: ::std::vec::Vec<PublicDailyReadiness>,
941        pub next_token: ::std::option::Option<::std::string::String>,
942    }
943
944    #[doc = "`MultiDocumentResponsePublicDailySleep`"]
945    #[doc = r""]
946    #[doc = r" <details><summary>JSON schema</summary>"]
947    #[doc = r""]
948    #[doc = r" ```json"]
949    #[doc = "{"]
950    #[doc = "  \"title\": \"MultiDocumentResponse[PublicDailySleep]\","]
951    #[doc = "  \"type\": \"object\","]
952    #[doc = "  \"required\": ["]
953    #[doc = "    \"data\","]
954    #[doc = "    \"next_token\""]
955    #[doc = "  ],"]
956    #[doc = "  \"properties\": {"]
957    #[doc = "    \"data\": {"]
958    #[doc = "      \"title\": \"Data\","]
959    #[doc = "      \"type\": \"array\","]
960    #[doc = "      \"items\": {"]
961    #[doc = "        \"$ref\": \"#/components/schemas/PublicDailySleep\""]
962    #[doc = "      }"]
963    #[doc = "    },"]
964    #[doc = "    \"next_token\": {"]
965    #[doc = "      \"title\": \"Next Token\","]
966    #[doc = "      \"type\": ["]
967    #[doc = "        \"string\","]
968    #[doc = "        \"null\""]
969    #[doc = "      ]"]
970    #[doc = "    }"]
971    #[doc = "  }"]
972    #[doc = "}"]
973    #[doc = r" ```"]
974    #[doc = r" </details>"]
975    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
976    pub struct MultiDocumentResponsePublicDailySleep {
977        pub data: ::std::vec::Vec<PublicDailySleep>,
978        pub next_token: ::std::option::Option<::std::string::String>,
979    }
980
981    #[doc = "`MultiDocumentResponsePublicDailySpO2`"]
982    #[doc = r""]
983    #[doc = r" <details><summary>JSON schema</summary>"]
984    #[doc = r""]
985    #[doc = r" ```json"]
986    #[doc = "{"]
987    #[doc = "  \"title\": \"MultiDocumentResponse[PublicDailySpO2]\","]
988    #[doc = "  \"type\": \"object\","]
989    #[doc = "  \"required\": ["]
990    #[doc = "    \"data\","]
991    #[doc = "    \"next_token\""]
992    #[doc = "  ],"]
993    #[doc = "  \"properties\": {"]
994    #[doc = "    \"data\": {"]
995    #[doc = "      \"title\": \"Data\","]
996    #[doc = "      \"type\": \"array\","]
997    #[doc = "      \"items\": {"]
998    #[doc = "        \"$ref\": \"#/components/schemas/PublicDailySpO2\""]
999    #[doc = "      }"]
1000    #[doc = "    },"]
1001    #[doc = "    \"next_token\": {"]
1002    #[doc = "      \"title\": \"Next Token\","]
1003    #[doc = "      \"type\": ["]
1004    #[doc = "        \"string\","]
1005    #[doc = "        \"null\""]
1006    #[doc = "      ]"]
1007    #[doc = "    }"]
1008    #[doc = "  }"]
1009    #[doc = "}"]
1010    #[doc = r" ```"]
1011    #[doc = r" </details>"]
1012    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1013    pub struct MultiDocumentResponsePublicDailySpO2 {
1014        pub data: ::std::vec::Vec<PublicDailySpO2>,
1015        pub next_token: ::std::option::Option<::std::string::String>,
1016    }
1017
1018    #[doc = "`MultiDocumentResponsePublicDailyStress`"]
1019    #[doc = r""]
1020    #[doc = r" <details><summary>JSON schema</summary>"]
1021    #[doc = r""]
1022    #[doc = r" ```json"]
1023    #[doc = "{"]
1024    #[doc = "  \"title\": \"MultiDocumentResponse[PublicDailyStress]\","]
1025    #[doc = "  \"type\": \"object\","]
1026    #[doc = "  \"required\": ["]
1027    #[doc = "    \"data\","]
1028    #[doc = "    \"next_token\""]
1029    #[doc = "  ],"]
1030    #[doc = "  \"properties\": {"]
1031    #[doc = "    \"data\": {"]
1032    #[doc = "      \"title\": \"Data\","]
1033    #[doc = "      \"type\": \"array\","]
1034    #[doc = "      \"items\": {"]
1035    #[doc = "        \"$ref\": \"#/components/schemas/PublicDailyStress\""]
1036    #[doc = "      }"]
1037    #[doc = "    },"]
1038    #[doc = "    \"next_token\": {"]
1039    #[doc = "      \"title\": \"Next Token\","]
1040    #[doc = "      \"type\": ["]
1041    #[doc = "        \"string\","]
1042    #[doc = "        \"null\""]
1043    #[doc = "      ]"]
1044    #[doc = "    }"]
1045    #[doc = "  }"]
1046    #[doc = "}"]
1047    #[doc = r" ```"]
1048    #[doc = r" </details>"]
1049    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1050    pub struct MultiDocumentResponsePublicDailyStress {
1051        pub data: ::std::vec::Vec<PublicDailyStress>,
1052        pub next_token: ::std::option::Option<::std::string::String>,
1053    }
1054
1055    #[doc = "`MultiDocumentResponsePublicModifiedSleepModel`"]
1056    #[doc = r""]
1057    #[doc = r" <details><summary>JSON schema</summary>"]
1058    #[doc = r""]
1059    #[doc = r" ```json"]
1060    #[doc = "{"]
1061    #[doc = "  \"title\": \"MultiDocumentResponse[PublicModifiedSleepModel]\","]
1062    #[doc = "  \"type\": \"object\","]
1063    #[doc = "  \"required\": ["]
1064    #[doc = "    \"data\","]
1065    #[doc = "    \"next_token\""]
1066    #[doc = "  ],"]
1067    #[doc = "  \"properties\": {"]
1068    #[doc = "    \"data\": {"]
1069    #[doc = "      \"title\": \"Data\","]
1070    #[doc = "      \"type\": \"array\","]
1071    #[doc = "      \"items\": {"]
1072    #[doc = "        \"$ref\": \"#/components/schemas/PublicModifiedSleepModel\""]
1073    #[doc = "      }"]
1074    #[doc = "    },"]
1075    #[doc = "    \"next_token\": {"]
1076    #[doc = "      \"title\": \"Next Token\","]
1077    #[doc = "      \"type\": ["]
1078    #[doc = "        \"string\","]
1079    #[doc = "        \"null\""]
1080    #[doc = "      ]"]
1081    #[doc = "    }"]
1082    #[doc = "  }"]
1083    #[doc = "}"]
1084    #[doc = r" ```"]
1085    #[doc = r" </details>"]
1086    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1087    pub struct MultiDocumentResponsePublicModifiedSleepModel {
1088        pub data: ::std::vec::Vec<PublicModifiedSleepModel>,
1089        pub next_token: ::std::option::Option<::std::string::String>,
1090    }
1091
1092    #[doc = "`MultiDocumentResponsePublicRestModePeriod`"]
1093    #[doc = r""]
1094    #[doc = r" <details><summary>JSON schema</summary>"]
1095    #[doc = r""]
1096    #[doc = r" ```json"]
1097    #[doc = "{"]
1098    #[doc = "  \"title\": \"MultiDocumentResponse[PublicRestModePeriod]\","]
1099    #[doc = "  \"type\": \"object\","]
1100    #[doc = "  \"required\": ["]
1101    #[doc = "    \"data\","]
1102    #[doc = "    \"next_token\""]
1103    #[doc = "  ],"]
1104    #[doc = "  \"properties\": {"]
1105    #[doc = "    \"data\": {"]
1106    #[doc = "      \"title\": \"Data\","]
1107    #[doc = "      \"type\": \"array\","]
1108    #[doc = "      \"items\": {"]
1109    #[doc = "        \"$ref\": \"#/components/schemas/PublicRestModePeriod\""]
1110    #[doc = "      }"]
1111    #[doc = "    },"]
1112    #[doc = "    \"next_token\": {"]
1113    #[doc = "      \"title\": \"Next Token\","]
1114    #[doc = "      \"type\": ["]
1115    #[doc = "        \"string\","]
1116    #[doc = "        \"null\""]
1117    #[doc = "      ]"]
1118    #[doc = "    }"]
1119    #[doc = "  }"]
1120    #[doc = "}"]
1121    #[doc = r" ```"]
1122    #[doc = r" </details>"]
1123    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1124    pub struct MultiDocumentResponsePublicRestModePeriod {
1125        pub data: ::std::vec::Vec<PublicRestModePeriod>,
1126        pub next_token: ::std::option::Option<::std::string::String>,
1127    }
1128
1129    #[doc = "`MultiDocumentResponsePublicRingConfiguration`"]
1130    #[doc = r""]
1131    #[doc = r" <details><summary>JSON schema</summary>"]
1132    #[doc = r""]
1133    #[doc = r" ```json"]
1134    #[doc = "{"]
1135    #[doc = "  \"title\": \"MultiDocumentResponse[PublicRingConfiguration]\","]
1136    #[doc = "  \"type\": \"object\","]
1137    #[doc = "  \"required\": ["]
1138    #[doc = "    \"data\","]
1139    #[doc = "    \"next_token\""]
1140    #[doc = "  ],"]
1141    #[doc = "  \"properties\": {"]
1142    #[doc = "    \"data\": {"]
1143    #[doc = "      \"title\": \"Data\","]
1144    #[doc = "      \"type\": \"array\","]
1145    #[doc = "      \"items\": {"]
1146    #[doc = "        \"$ref\": \"#/components/schemas/PublicRingConfiguration\""]
1147    #[doc = "      }"]
1148    #[doc = "    },"]
1149    #[doc = "    \"next_token\": {"]
1150    #[doc = "      \"title\": \"Next Token\","]
1151    #[doc = "      \"type\": ["]
1152    #[doc = "        \"string\","]
1153    #[doc = "        \"null\""]
1154    #[doc = "      ]"]
1155    #[doc = "    }"]
1156    #[doc = "  }"]
1157    #[doc = "}"]
1158    #[doc = r" ```"]
1159    #[doc = r" </details>"]
1160    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1161    pub struct MultiDocumentResponsePublicRingConfiguration {
1162        pub data: ::std::vec::Vec<PublicRingConfiguration>,
1163        pub next_token: ::std::option::Option<::std::string::String>,
1164    }
1165
1166    #[doc = "`MultiDocumentResponsePublicSession`"]
1167    #[doc = r""]
1168    #[doc = r" <details><summary>JSON schema</summary>"]
1169    #[doc = r""]
1170    #[doc = r" ```json"]
1171    #[doc = "{"]
1172    #[doc = "  \"title\": \"MultiDocumentResponse[PublicSession]\","]
1173    #[doc = "  \"type\": \"object\","]
1174    #[doc = "  \"required\": ["]
1175    #[doc = "    \"data\","]
1176    #[doc = "    \"next_token\""]
1177    #[doc = "  ],"]
1178    #[doc = "  \"properties\": {"]
1179    #[doc = "    \"data\": {"]
1180    #[doc = "      \"title\": \"Data\","]
1181    #[doc = "      \"type\": \"array\","]
1182    #[doc = "      \"items\": {"]
1183    #[doc = "        \"$ref\": \"#/components/schemas/PublicSession\""]
1184    #[doc = "      }"]
1185    #[doc = "    },"]
1186    #[doc = "    \"next_token\": {"]
1187    #[doc = "      \"title\": \"Next Token\","]
1188    #[doc = "      \"type\": ["]
1189    #[doc = "        \"string\","]
1190    #[doc = "        \"null\""]
1191    #[doc = "      ]"]
1192    #[doc = "    }"]
1193    #[doc = "  }"]
1194    #[doc = "}"]
1195    #[doc = r" ```"]
1196    #[doc = r" </details>"]
1197    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1198    pub struct MultiDocumentResponsePublicSession {
1199        pub data: ::std::vec::Vec<PublicSession>,
1200        pub next_token: ::std::option::Option<::std::string::String>,
1201    }
1202
1203    #[doc = "`MultiDocumentResponsePublicSleepTime`"]
1204    #[doc = r""]
1205    #[doc = r" <details><summary>JSON schema</summary>"]
1206    #[doc = r""]
1207    #[doc = r" ```json"]
1208    #[doc = "{"]
1209    #[doc = "  \"title\": \"MultiDocumentResponse[PublicSleepTime]\","]
1210    #[doc = "  \"type\": \"object\","]
1211    #[doc = "  \"required\": ["]
1212    #[doc = "    \"data\","]
1213    #[doc = "    \"next_token\""]
1214    #[doc = "  ],"]
1215    #[doc = "  \"properties\": {"]
1216    #[doc = "    \"data\": {"]
1217    #[doc = "      \"title\": \"Data\","]
1218    #[doc = "      \"type\": \"array\","]
1219    #[doc = "      \"items\": {"]
1220    #[doc = "        \"$ref\": \"#/components/schemas/PublicSleepTime\""]
1221    #[doc = "      }"]
1222    #[doc = "    },"]
1223    #[doc = "    \"next_token\": {"]
1224    #[doc = "      \"title\": \"Next Token\","]
1225    #[doc = "      \"type\": ["]
1226    #[doc = "        \"string\","]
1227    #[doc = "        \"null\""]
1228    #[doc = "      ]"]
1229    #[doc = "    }"]
1230    #[doc = "  }"]
1231    #[doc = "}"]
1232    #[doc = r" ```"]
1233    #[doc = r" </details>"]
1234    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1235    pub struct MultiDocumentResponsePublicSleepTime {
1236        pub data: ::std::vec::Vec<PublicSleepTime>,
1237        pub next_token: ::std::option::Option<::std::string::String>,
1238    }
1239
1240    #[doc = "`MultiDocumentResponsePublicVo2Max`"]
1241    #[doc = r""]
1242    #[doc = r" <details><summary>JSON schema</summary>"]
1243    #[doc = r""]
1244    #[doc = r" ```json"]
1245    #[doc = "{"]
1246    #[doc = "  \"title\": \"MultiDocumentResponse[PublicVO2Max]\","]
1247    #[doc = "  \"type\": \"object\","]
1248    #[doc = "  \"required\": ["]
1249    #[doc = "    \"data\","]
1250    #[doc = "    \"next_token\""]
1251    #[doc = "  ],"]
1252    #[doc = "  \"properties\": {"]
1253    #[doc = "    \"data\": {"]
1254    #[doc = "      \"title\": \"Data\","]
1255    #[doc = "      \"type\": \"array\","]
1256    #[doc = "      \"items\": {"]
1257    #[doc = "        \"$ref\": \"#/components/schemas/PublicVO2Max\""]
1258    #[doc = "      }"]
1259    #[doc = "    },"]
1260    #[doc = "    \"next_token\": {"]
1261    #[doc = "      \"title\": \"Next Token\","]
1262    #[doc = "      \"type\": ["]
1263    #[doc = "        \"string\","]
1264    #[doc = "        \"null\""]
1265    #[doc = "      ]"]
1266    #[doc = "    }"]
1267    #[doc = "  }"]
1268    #[doc = "}"]
1269    #[doc = r" ```"]
1270    #[doc = r" </details>"]
1271    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1272    pub struct MultiDocumentResponsePublicVo2Max {
1273        pub data: ::std::vec::Vec<PublicVo2Max>,
1274        pub next_token: ::std::option::Option<::std::string::String>,
1275    }
1276
1277    #[doc = "`MultiDocumentResponsePublicWorkout`"]
1278    #[doc = r""]
1279    #[doc = r" <details><summary>JSON schema</summary>"]
1280    #[doc = r""]
1281    #[doc = r" ```json"]
1282    #[doc = "{"]
1283    #[doc = "  \"title\": \"MultiDocumentResponse[PublicWorkout]\","]
1284    #[doc = "  \"type\": \"object\","]
1285    #[doc = "  \"required\": ["]
1286    #[doc = "    \"data\","]
1287    #[doc = "    \"next_token\""]
1288    #[doc = "  ],"]
1289    #[doc = "  \"properties\": {"]
1290    #[doc = "    \"data\": {"]
1291    #[doc = "      \"title\": \"Data\","]
1292    #[doc = "      \"type\": \"array\","]
1293    #[doc = "      \"items\": {"]
1294    #[doc = "        \"$ref\": \"#/components/schemas/PublicWorkout\""]
1295    #[doc = "      }"]
1296    #[doc = "    },"]
1297    #[doc = "    \"next_token\": {"]
1298    #[doc = "      \"title\": \"Next Token\","]
1299    #[doc = "      \"type\": ["]
1300    #[doc = "        \"string\","]
1301    #[doc = "        \"null\""]
1302    #[doc = "      ]"]
1303    #[doc = "    }"]
1304    #[doc = "  }"]
1305    #[doc = "}"]
1306    #[doc = r" ```"]
1307    #[doc = r" </details>"]
1308    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1309    pub struct MultiDocumentResponsePublicWorkout {
1310        pub data: ::std::vec::Vec<PublicWorkout>,
1311        pub next_token: ::std::option::Option<::std::string::String>,
1312    }
1313
1314    #[doc = "`MultiDocumentResponseTagModel`"]
1315    #[doc = r""]
1316    #[doc = r" <details><summary>JSON schema</summary>"]
1317    #[doc = r""]
1318    #[doc = r" ```json"]
1319    #[doc = "{"]
1320    #[doc = "  \"title\": \"MultiDocumentResponse[TagModel]\","]
1321    #[doc = "  \"type\": \"object\","]
1322    #[doc = "  \"required\": ["]
1323    #[doc = "    \"data\","]
1324    #[doc = "    \"next_token\""]
1325    #[doc = "  ],"]
1326    #[doc = "  \"properties\": {"]
1327    #[doc = "    \"data\": {"]
1328    #[doc = "      \"title\": \"Data\","]
1329    #[doc = "      \"type\": \"array\","]
1330    #[doc = "      \"items\": {"]
1331    #[doc = "        \"$ref\": \"#/components/schemas/TagModel\""]
1332    #[doc = "      }"]
1333    #[doc = "    },"]
1334    #[doc = "    \"next_token\": {"]
1335    #[doc = "      \"title\": \"Next Token\","]
1336    #[doc = "      \"type\": ["]
1337    #[doc = "        \"string\","]
1338    #[doc = "        \"null\""]
1339    #[doc = "      ]"]
1340    #[doc = "    }"]
1341    #[doc = "  }"]
1342    #[doc = "}"]
1343    #[doc = r" ```"]
1344    #[doc = r" </details>"]
1345    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1346    pub struct MultiDocumentResponseTagModel {
1347        pub data: ::std::vec::Vec<TagModel>,
1348        pub next_token: ::std::option::Option<::std::string::String>,
1349    }
1350
1351    #[doc = "`PersonalInfoResponse`"]
1352    #[doc = r""]
1353    #[doc = r" <details><summary>JSON schema</summary>"]
1354    #[doc = r""]
1355    #[doc = r" ```json"]
1356    #[doc = "{"]
1357    #[doc = "  \"title\": \"PersonalInfoResponse\","]
1358    #[doc = "  \"type\": \"object\","]
1359    #[doc = "  \"required\": ["]
1360    #[doc = "    \"id\""]
1361    #[doc = "  ],"]
1362    #[doc = "  \"properties\": {"]
1363    #[doc = "    \"age\": {"]
1364    #[doc = "      \"title\": \"Age\","]
1365    #[doc = "      \"type\": ["]
1366    #[doc = "        \"integer\","]
1367    #[doc = "        \"null\""]
1368    #[doc = "      ]"]
1369    #[doc = "    },"]
1370    #[doc = "    \"biological_sex\": {"]
1371    #[doc = "      \"title\": \"Biological Sex\","]
1372    #[doc = "      \"type\": ["]
1373    #[doc = "        \"string\","]
1374    #[doc = "        \"null\""]
1375    #[doc = "      ]"]
1376    #[doc = "    },"]
1377    #[doc = "    \"email\": {"]
1378    #[doc = "      \"title\": \"Email\","]
1379    #[doc = "      \"type\": ["]
1380    #[doc = "        \"string\","]
1381    #[doc = "        \"null\""]
1382    #[doc = "      ]"]
1383    #[doc = "    },"]
1384    #[doc = "    \"height\": {"]
1385    #[doc = "      \"title\": \"Height\","]
1386    #[doc = "      \"type\": ["]
1387    #[doc = "        \"number\","]
1388    #[doc = "        \"null\""]
1389    #[doc = "      ]"]
1390    #[doc = "    },"]
1391    #[doc = "    \"id\": {"]
1392    #[doc = "      \"title\": \"Id\","]
1393    #[doc = "      \"type\": \"string\""]
1394    #[doc = "    },"]
1395    #[doc = "    \"weight\": {"]
1396    #[doc = "      \"title\": \"Weight\","]
1397    #[doc = "      \"type\": ["]
1398    #[doc = "        \"number\","]
1399    #[doc = "        \"null\""]
1400    #[doc = "      ]"]
1401    #[doc = "    }"]
1402    #[doc = "  }"]
1403    #[doc = "}"]
1404    #[doc = r" ```"]
1405    #[doc = r" </details>"]
1406    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1407    pub struct PersonalInfoResponse {
1408        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1409        pub age: ::std::option::Option<i64>,
1410        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1411        pub biological_sex: ::std::option::Option<::std::string::String>,
1412        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1413        pub email: ::std::option::Option<::std::string::String>,
1414        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1415        pub height: ::std::option::Option<f64>,
1416        pub id: ::std::string::String,
1417        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1418        pub weight: ::std::option::Option<f64>,
1419    }
1420
1421    #[doc = "Object defining activity score contributors."]
1422    #[doc = r""]
1423    #[doc = r" <details><summary>JSON schema</summary>"]
1424    #[doc = r""]
1425    #[doc = r" ```json"]
1426    #[doc = "{"]
1427    #[doc = "  \"title\": \"PublicActivityContributors\","]
1428    #[doc = "  \"description\": \"Object defining activity score contributors.\","]
1429    #[doc = "  \"type\": \"object\","]
1430    #[doc = "  \"properties\": {"]
1431    #[doc = "    \"meet_daily_targets\": {"]
1432    #[doc = "      \"title\": \"\","]
1433    #[doc = "      \"description\": \"Contribution of meeting previous 7-day daily activity targets in range [1, 100].\","]
1434    #[doc = "      \"type\": ["]
1435    #[doc = "        \"integer\","]
1436    #[doc = "        \"null\""]
1437    #[doc = "      ]"]
1438    #[doc = "    },"]
1439    #[doc = "    \"move_every_hour\": {"]
1440    #[doc = "      \"title\": \"\","]
1441    #[doc = "      \"description\": \"Contribution of previous 24-hour inactivity alerts in range [1, 100].\","]
1442    #[doc = "      \"type\": ["]
1443    #[doc = "        \"integer\","]
1444    #[doc = "        \"null\""]
1445    #[doc = "      ]"]
1446    #[doc = "    },"]
1447    #[doc = "    \"recovery_time\": {"]
1448    #[doc = "      \"title\": \"\","]
1449    #[doc = "      \"description\": \"Contribution of previous 7-day recovery time in range [1, 100].\","]
1450    #[doc = "      \"type\": ["]
1451    #[doc = "        \"integer\","]
1452    #[doc = "        \"null\""]
1453    #[doc = "      ]"]
1454    #[doc = "    },"]
1455    #[doc = "    \"stay_active\": {"]
1456    #[doc = "      \"title\": \"\","]
1457    #[doc = "      \"description\": \"Contribution of previous 24-hour activity in range [1, 100].\","]
1458    #[doc = "      \"type\": ["]
1459    #[doc = "        \"integer\","]
1460    #[doc = "        \"null\""]
1461    #[doc = "      ]"]
1462    #[doc = "    },"]
1463    #[doc = "    \"training_frequency\": {"]
1464    #[doc = "      \"title\": \"\","]
1465    #[doc = "      \"description\": \"Contribution of previous 7-day exercise frequency in range [1, 100].\","]
1466    #[doc = "      \"type\": ["]
1467    #[doc = "        \"integer\","]
1468    #[doc = "        \"null\""]
1469    #[doc = "      ]"]
1470    #[doc = "    },"]
1471    #[doc = "    \"training_volume\": {"]
1472    #[doc = "      \"title\": \"\","]
1473    #[doc = "      \"description\": \"Contribution of previous 7-day exercise volume in range [1, 100].\","]
1474    #[doc = "      \"type\": ["]
1475    #[doc = "        \"integer\","]
1476    #[doc = "        \"null\""]
1477    #[doc = "      ]"]
1478    #[doc = "    }"]
1479    #[doc = "  }"]
1480    #[doc = "}"]
1481    #[doc = r" ```"]
1482    #[doc = r" </details>"]
1483    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1484    pub struct PublicActivityContributors {
1485        #[doc = "Contribution of meeting previous 7-day daily activity targets in range [1, 100]."]
1486        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1487        pub meet_daily_targets: ::std::option::Option<i64>,
1488        #[doc = "Contribution of previous 24-hour inactivity alerts in range [1, 100]."]
1489        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1490        pub move_every_hour: ::std::option::Option<i64>,
1491        #[doc = "Contribution of previous 7-day recovery time in range [1, 100]."]
1492        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1493        pub recovery_time: ::std::option::Option<i64>,
1494        #[doc = "Contribution of previous 24-hour activity in range [1, 100]."]
1495        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1496        pub stay_active: ::std::option::Option<i64>,
1497        #[doc = "Contribution of previous 7-day exercise frequency in range [1, 100]."]
1498        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1499        pub training_frequency: ::std::option::Option<i64>,
1500        #[doc = "Contribution of previous 7-day exercise volume in range [1, 100]."]
1501        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1502        pub training_volume: ::std::option::Option<i64>,
1503    }
1504
1505    impl ::std::default::Default for PublicActivityContributors {
1506        fn default() -> Self {
1507            Self {
1508                meet_daily_targets: Default::default(),
1509                move_every_hour: Default::default(),
1510                recovery_time: Default::default(),
1511                stay_active: Default::default(),
1512                training_frequency: Default::default(),
1513                training_volume: Default::default(),
1514            }
1515        }
1516    }
1517
1518    #[doc = "Object defining a daily activity that is a 24-hour period starting at 4 a.m."]
1519    #[doc = r""]
1520    #[doc = r" <details><summary>JSON schema</summary>"]
1521    #[doc = r""]
1522    #[doc = r" ```json"]
1523    #[doc = "{"]
1524    #[doc = "  \"title\": \"PublicDailyActivity\","]
1525    #[doc = "  \"description\": \"Object defining a daily activity that is a 24-hour period starting at 4 a.m.\","]
1526    #[doc = "  \"type\": \"object\","]
1527    #[doc = "  \"required\": ["]
1528    #[doc = "    \"active_calories\","]
1529    #[doc = "    \"average_met_minutes\","]
1530    #[doc = "    \"contributors\","]
1531    #[doc = "    \"day\","]
1532    #[doc = "    \"equivalent_walking_distance\","]
1533    #[doc = "    \"high_activity_met_minutes\","]
1534    #[doc = "    \"high_activity_time\","]
1535    #[doc = "    \"id\","]
1536    #[doc = "    \"inactivity_alerts\","]
1537    #[doc = "    \"low_activity_met_minutes\","]
1538    #[doc = "    \"low_activity_time\","]
1539    #[doc = "    \"medium_activity_met_minutes\","]
1540    #[doc = "    \"medium_activity_time\","]
1541    #[doc = "    \"met\","]
1542    #[doc = "    \"meters_to_target\","]
1543    #[doc = "    \"non_wear_time\","]
1544    #[doc = "    \"resting_time\","]
1545    #[doc = "    \"sedentary_met_minutes\","]
1546    #[doc = "    \"sedentary_time\","]
1547    #[doc = "    \"steps\","]
1548    #[doc = "    \"target_calories\","]
1549    #[doc = "    \"target_meters\","]
1550    #[doc = "    \"timestamp\","]
1551    #[doc = "    \"total_calories\""]
1552    #[doc = "  ],"]
1553    #[doc = "  \"properties\": {"]
1554    #[doc = "    \"active_calories\": {"]
1555    #[doc = "      \"title\": \"\","]
1556    #[doc = "      \"description\": \"Active calories expended in kilocalories.\","]
1557    #[doc = "      \"type\": \"integer\""]
1558    #[doc = "    },"]
1559    #[doc = "    \"average_met_minutes\": {"]
1560    #[doc = "      \"title\": \"\","]
1561    #[doc = "      \"description\": \"Average MET minutes.\","]
1562    #[doc = "      \"type\": \"number\""]
1563    #[doc = "    },"]
1564    #[doc = "    \"class_5_min\": {"]
1565    #[doc = "      \"title\": \"\","]
1566    #[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\\\".\","]
1567    #[doc = "      \"type\": ["]
1568    #[doc = "        \"string\","]
1569    #[doc = "        \"null\""]
1570    #[doc = "      ]"]
1571    #[doc = "    },"]
1572    #[doc = "    \"contributors\": {"]
1573    #[doc = "      \"$ref\": \"#/components/schemas/PublicActivityContributors\""]
1574    #[doc = "    },"]
1575    #[doc = "    \"day\": {"]
1576    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
1577    #[doc = "    },"]
1578    #[doc = "    \"equivalent_walking_distance\": {"]
1579    #[doc = "      \"title\": \"\","]
1580    #[doc = "      \"description\": \"Equivalent walking distance of energe expenditure in meters.\","]
1581    #[doc = "      \"type\": \"integer\""]
1582    #[doc = "    },"]
1583    #[doc = "    \"high_activity_met_minutes\": {"]
1584    #[doc = "      \"title\": \"\","]
1585    #[doc = "      \"description\": \"The total METs of each minute classified as high activity.\","]
1586    #[doc = "      \"type\": \"integer\""]
1587    #[doc = "    },"]
1588    #[doc = "    \"high_activity_time\": {"]
1589    #[doc = "      \"title\": \"\","]
1590    #[doc = "      \"description\": \"The total time in seconds of each minute classified as high activity.\","]
1591    #[doc = "      \"type\": \"integer\""]
1592    #[doc = "    },"]
1593    #[doc = "    \"id\": {"]
1594    #[doc = "      \"title\": \"\","]
1595    #[doc = "      \"description\": \"Unique identifier of the object.\","]
1596    #[doc = "      \"type\": \"string\","]
1597    #[doc = "      \"minLength\": 1"]
1598    #[doc = "    },"]
1599    #[doc = "    \"inactivity_alerts\": {"]
1600    #[doc = "      \"title\": \"\","]
1601    #[doc = "      \"description\": \"Number of inactivity alerts received.\","]
1602    #[doc = "      \"type\": \"integer\""]
1603    #[doc = "    },"]
1604    #[doc = "    \"low_activity_met_minutes\": {"]
1605    #[doc = "      \"title\": \"\","]
1606    #[doc = "      \"description\": \"The total METs of each minute classified as low activity.\","]
1607    #[doc = "      \"type\": \"integer\""]
1608    #[doc = "    },"]
1609    #[doc = "    \"low_activity_time\": {"]
1610    #[doc = "      \"title\": \"\","]
1611    #[doc = "      \"description\": \"The total time in seconds of each minute classified as low activity.\","]
1612    #[doc = "      \"type\": \"integer\""]
1613    #[doc = "    },"]
1614    #[doc = "    \"medium_activity_met_minutes\": {"]
1615    #[doc = "      \"title\": \"\","]
1616    #[doc = "      \"description\": \"The total METs of each minute classified as medium activity.\","]
1617    #[doc = "      \"type\": \"integer\""]
1618    #[doc = "    },"]
1619    #[doc = "    \"medium_activity_time\": {"]
1620    #[doc = "      \"title\": \"\","]
1621    #[doc = "      \"description\": \"The total time in seconds of each minute classified as medium activity.\","]
1622    #[doc = "      \"type\": \"integer\""]
1623    #[doc = "    },"]
1624    #[doc = "    \"met\": {"]
1625    #[doc = "      \"$ref\": \"#/components/schemas/PublicSample\""]
1626    #[doc = "    },"]
1627    #[doc = "    \"meters_to_target\": {"]
1628    #[doc = "      \"title\": \"\","]
1629    #[doc = "      \"description\": \"Meters remaining to target.\","]
1630    #[doc = "      \"type\": \"integer\""]
1631    #[doc = "    },"]
1632    #[doc = "    \"non_wear_time\": {"]
1633    #[doc = "      \"title\": \"\","]
1634    #[doc = "      \"description\": \"Ring non-wear time in seconds.\","]
1635    #[doc = "      \"type\": \"integer\""]
1636    #[doc = "    },"]
1637    #[doc = "    \"resting_time\": {"]
1638    #[doc = "      \"title\": \"\","]
1639    #[doc = "      \"description\": \"Resting time in seconds.\","]
1640    #[doc = "      \"type\": \"integer\""]
1641    #[doc = "    },"]
1642    #[doc = "    \"score\": {"]
1643    #[doc = "      \"title\": \"\","]
1644    #[doc = "      \"description\": \"Activity score in range [1, 100].\","]
1645    #[doc = "      \"type\": ["]
1646    #[doc = "        \"integer\","]
1647    #[doc = "        \"null\""]
1648    #[doc = "      ]"]
1649    #[doc = "    },"]
1650    #[doc = "    \"sedentary_met_minutes\": {"]
1651    #[doc = "      \"title\": \"\","]
1652    #[doc = "      \"description\": \"Sedentary MET minutes.\","]
1653    #[doc = "      \"type\": \"integer\""]
1654    #[doc = "    },"]
1655    #[doc = "    \"sedentary_time\": {"]
1656    #[doc = "      \"title\": \"\","]
1657    #[doc = "      \"description\": \"Sedentary time in seconds.\","]
1658    #[doc = "      \"type\": \"integer\""]
1659    #[doc = "    },"]
1660    #[doc = "    \"steps\": {"]
1661    #[doc = "      \"title\": \"\","]
1662    #[doc = "      \"description\": \"Total number of steps taken.\","]
1663    #[doc = "      \"type\": \"integer\""]
1664    #[doc = "    },"]
1665    #[doc = "    \"target_calories\": {"]
1666    #[doc = "      \"title\": \"\","]
1667    #[doc = "      \"description\": \"Daily activity target in kilocalories.\","]
1668    #[doc = "      \"type\": \"integer\""]
1669    #[doc = "    },"]
1670    #[doc = "    \"target_meters\": {"]
1671    #[doc = "      \"title\": \"\","]
1672    #[doc = "      \"description\": \"Daily activity target in meters.\","]
1673    #[doc = "      \"type\": \"integer\""]
1674    #[doc = "    },"]
1675    #[doc = "    \"timestamp\": {"]
1676    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
1677    #[doc = "    },"]
1678    #[doc = "    \"total_calories\": {"]
1679    #[doc = "      \"title\": \"\","]
1680    #[doc = "      \"description\": \"Total calories expended in kilocalories.\","]
1681    #[doc = "      \"type\": \"integer\""]
1682    #[doc = "    }"]
1683    #[doc = "  },"]
1684    #[doc = "  \"x-cloud-only\": true,"]
1685    #[doc = "  \"x-collection\": \"publicdailyactivity\","]
1686    #[doc = "  \"x-owner\": \"movement-squad\""]
1687    #[doc = "}"]
1688    #[doc = r" ```"]
1689    #[doc = r" </details>"]
1690    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1691    pub struct PublicDailyActivity {
1692        #[doc = "Active calories expended in kilocalories."]
1693        pub active_calories: i64,
1694        #[doc = "Average MET minutes."]
1695        pub average_met_minutes: f64,
1696        #[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\"."]
1697        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1698        pub class_5_min: ::std::option::Option<::std::string::String>,
1699        pub contributors: PublicActivityContributors,
1700        pub day: IsoDate,
1701        #[doc = "Equivalent walking distance of energe expenditure in meters."]
1702        pub equivalent_walking_distance: i64,
1703        #[doc = "The total METs of each minute classified as high activity."]
1704        pub high_activity_met_minutes: i64,
1705        #[doc = "The total time in seconds of each minute classified as high activity."]
1706        pub high_activity_time: i64,
1707        #[doc = "Unique identifier of the object."]
1708        pub id: X,
1709        #[doc = "Number of inactivity alerts received."]
1710        pub inactivity_alerts: i64,
1711        #[doc = "The total METs of each minute classified as low activity."]
1712        pub low_activity_met_minutes: i64,
1713        #[doc = "The total time in seconds of each minute classified as low activity."]
1714        pub low_activity_time: i64,
1715        #[doc = "The total METs of each minute classified as medium activity."]
1716        pub medium_activity_met_minutes: i64,
1717        #[doc = "The total time in seconds of each minute classified as medium activity."]
1718        pub medium_activity_time: i64,
1719        pub met: PublicSample,
1720        #[doc = "Meters remaining to target."]
1721        pub meters_to_target: i64,
1722        #[doc = "Ring non-wear time in seconds."]
1723        pub non_wear_time: i64,
1724        #[doc = "Resting time in seconds."]
1725        pub resting_time: i64,
1726        #[doc = "Activity score in range [1, 100]."]
1727        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1728        pub score: ::std::option::Option<i64>,
1729        #[doc = "Sedentary MET minutes."]
1730        pub sedentary_met_minutes: i64,
1731        #[doc = "Sedentary time in seconds."]
1732        pub sedentary_time: i64,
1733        #[doc = "Total number of steps taken."]
1734        pub steps: i64,
1735        #[doc = "Daily activity target in kilocalories."]
1736        pub target_calories: i64,
1737        #[doc = "Daily activity target in meters."]
1738        pub target_meters: i64,
1739        pub timestamp: LocalizedDateTime,
1740        #[doc = "Total calories expended in kilocalories."]
1741        pub total_calories: i64,
1742    }
1743
1744    #[doc = "Daily Cardiovascular Age."]
1745    #[doc = r""]
1746    #[doc = r" <details><summary>JSON schema</summary>"]
1747    #[doc = r""]
1748    #[doc = r" ```json"]
1749    #[doc = "{"]
1750    #[doc = "  \"title\": \"PublicDailyCardiovascularAge\","]
1751    #[doc = "  \"description\": \"Daily Cardiovascular Age.\","]
1752    #[doc = "  \"type\": \"object\","]
1753    #[doc = "  \"required\": ["]
1754    #[doc = "    \"day\","]
1755    #[doc = "    \"id\""]
1756    #[doc = "  ],"]
1757    #[doc = "  \"properties\": {"]
1758    #[doc = "    \"day\": {"]
1759    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
1760    #[doc = "    },"]
1761    #[doc = "    \"id\": {"]
1762    #[doc = "      \"title\": \"\","]
1763    #[doc = "      \"description\": \"Unique identifier of the object.\","]
1764    #[doc = "      \"type\": \"string\","]
1765    #[doc = "      \"minLength\": 1"]
1766    #[doc = "    },"]
1767    #[doc = "    \"pulse_wave_velocity\": {"]
1768    #[doc = "      \"title\": \"\","]
1769    #[doc = "      \"description\": \"Pulse wave velocity (m/s), derived from vascular age, with possible offset added.\","]
1770    #[doc = "      \"type\": ["]
1771    #[doc = "        \"number\","]
1772    #[doc = "        \"null\""]
1773    #[doc = "      ]"]
1774    #[doc = "    },"]
1775    #[doc = "    \"vascular_age\": {"]
1776    #[doc = "      \"title\": \"\","]
1777    #[doc = "      \"description\": \"Predicted vascular age in range [18, 100].\","]
1778    #[doc = "      \"type\": ["]
1779    #[doc = "        \"integer\","]
1780    #[doc = "        \"null\""]
1781    #[doc = "      ]"]
1782    #[doc = "    }"]
1783    #[doc = "  },"]
1784    #[doc = "  \"x-cloud-only\": true,"]
1785    #[doc = "  \"x-collection\": \"publicdailycardiovascularage\","]
1786    #[doc = "  \"x-owner\": \"heart-health-squad\""]
1787    #[doc = "}"]
1788    #[doc = r" ```"]
1789    #[doc = r" </details>"]
1790    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1791    pub struct PublicDailyCardiovascularAge {
1792        pub day: IsoDate,
1793        #[doc = "Unique identifier of the object."]
1794        pub id: X,
1795        #[doc = "Pulse wave velocity (m/s), derived from vascular age, with possible offset added."]
1796        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1797        pub pulse_wave_velocity: ::std::option::Option<f64>,
1798        #[doc = "Predicted vascular age in range [18, 100]."]
1799        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1800        pub vascular_age: ::std::option::Option<i64>,
1801    }
1802
1803    #[doc = "Public object defining daily readiness."]
1804    #[doc = r""]
1805    #[doc = r" <details><summary>JSON schema</summary>"]
1806    #[doc = r""]
1807    #[doc = r" ```json"]
1808    #[doc = "{"]
1809    #[doc = "  \"title\": \"PublicDailyReadiness\","]
1810    #[doc = "  \"description\": \"Public object defining daily readiness.\","]
1811    #[doc = "  \"type\": \"object\","]
1812    #[doc = "  \"required\": ["]
1813    #[doc = "    \"contributors\","]
1814    #[doc = "    \"day\","]
1815    #[doc = "    \"id\","]
1816    #[doc = "    \"timestamp\""]
1817    #[doc = "  ],"]
1818    #[doc = "  \"properties\": {"]
1819    #[doc = "    \"contributors\": {"]
1820    #[doc = "      \"$ref\": \"#/components/schemas/PublicReadinessContributors\""]
1821    #[doc = "    },"]
1822    #[doc = "    \"day\": {"]
1823    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
1824    #[doc = "    },"]
1825    #[doc = "    \"id\": {"]
1826    #[doc = "      \"title\": \"\","]
1827    #[doc = "      \"description\": \"Unique identifier of the object.\","]
1828    #[doc = "      \"type\": \"string\","]
1829    #[doc = "      \"minLength\": 1"]
1830    #[doc = "    },"]
1831    #[doc = "    \"score\": {"]
1832    #[doc = "      \"title\": \"\","]
1833    #[doc = "      \"description\": \"Daily readiness score.\","]
1834    #[doc = "      \"type\": ["]
1835    #[doc = "        \"integer\","]
1836    #[doc = "        \"null\""]
1837    #[doc = "      ]"]
1838    #[doc = "    },"]
1839    #[doc = "    \"temperature_deviation\": {"]
1840    #[doc = "      \"title\": \"\","]
1841    #[doc = "      \"description\": \"Temperature deviation in degrees Celsius.\","]
1842    #[doc = "      \"type\": ["]
1843    #[doc = "        \"number\","]
1844    #[doc = "        \"null\""]
1845    #[doc = "      ]"]
1846    #[doc = "    },"]
1847    #[doc = "    \"temperature_trend_deviation\": {"]
1848    #[doc = "      \"title\": \"\","]
1849    #[doc = "      \"description\": \"Temperature trend deviation in degrees Celsius.\","]
1850    #[doc = "      \"type\": ["]
1851    #[doc = "        \"number\","]
1852    #[doc = "        \"null\""]
1853    #[doc = "      ]"]
1854    #[doc = "    },"]
1855    #[doc = "    \"timestamp\": {"]
1856    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
1857    #[doc = "    }"]
1858    #[doc = "  },"]
1859    #[doc = "  \"x-cloud-only\": true,"]
1860    #[doc = "  \"x-collection\": \"publicdailyreadiness\","]
1861    #[doc = "  \"x-owner\": \"wellbeing-squad\""]
1862    #[doc = "}"]
1863    #[doc = r" ```"]
1864    #[doc = r" </details>"]
1865    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1866    pub struct PublicDailyReadiness {
1867        pub contributors: PublicReadinessContributors,
1868        pub day: IsoDate,
1869        #[doc = "Unique identifier of the object."]
1870        pub id: X,
1871        #[doc = "Daily readiness score."]
1872        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1873        pub score: ::std::option::Option<i64>,
1874        #[doc = "Temperature deviation in degrees Celsius."]
1875        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1876        pub temperature_deviation: ::std::option::Option<f64>,
1877        #[doc = "Temperature trend deviation in degrees Celsius."]
1878        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1879        pub temperature_trend_deviation: ::std::option::Option<f64>,
1880        pub timestamp: LocalizedDateTime,
1881    }
1882
1883    #[doc = "Public object defining daily sleep."]
1884    #[doc = r""]
1885    #[doc = r" <details><summary>JSON schema</summary>"]
1886    #[doc = r""]
1887    #[doc = r" ```json"]
1888    #[doc = "{"]
1889    #[doc = "  \"title\": \"PublicDailySleep\","]
1890    #[doc = "  \"description\": \"Public object defining daily sleep.\","]
1891    #[doc = "  \"type\": \"object\","]
1892    #[doc = "  \"required\": ["]
1893    #[doc = "    \"contributors\","]
1894    #[doc = "    \"day\","]
1895    #[doc = "    \"id\","]
1896    #[doc = "    \"timestamp\""]
1897    #[doc = "  ],"]
1898    #[doc = "  \"properties\": {"]
1899    #[doc = "    \"contributors\": {"]
1900    #[doc = "      \"$ref\": \"#/components/schemas/PublicSleepContributors\""]
1901    #[doc = "    },"]
1902    #[doc = "    \"day\": {"]
1903    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
1904    #[doc = "    },"]
1905    #[doc = "    \"id\": {"]
1906    #[doc = "      \"title\": \"\","]
1907    #[doc = "      \"description\": \"Unique identifier of the object.\","]
1908    #[doc = "      \"type\": \"string\","]
1909    #[doc = "      \"minLength\": 1"]
1910    #[doc = "    },"]
1911    #[doc = "    \"score\": {"]
1912    #[doc = "      \"title\": \"\","]
1913    #[doc = "      \"description\": \"Daily sleep score.\","]
1914    #[doc = "      \"type\": ["]
1915    #[doc = "        \"integer\","]
1916    #[doc = "        \"null\""]
1917    #[doc = "      ]"]
1918    #[doc = "    },"]
1919    #[doc = "    \"timestamp\": {"]
1920    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
1921    #[doc = "    }"]
1922    #[doc = "  },"]
1923    #[doc = "  \"x-cloud-only\": true,"]
1924    #[doc = "  \"x-collection\": \"publicdailysleep\","]
1925    #[doc = "  \"x-owner\": \"sleep-squad\""]
1926    #[doc = "}"]
1927    #[doc = r" ```"]
1928    #[doc = r" </details>"]
1929    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1930    pub struct PublicDailySleep {
1931        pub contributors: PublicSleepContributors,
1932        pub day: IsoDate,
1933        #[doc = "Unique identifier of the object."]
1934        pub id: X,
1935        #[doc = "Daily sleep score."]
1936        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1937        pub score: ::std::option::Option<i64>,
1938        pub timestamp: LocalizedDateTime,
1939    }
1940
1941    #[doc = "Daily SpO2 (Oxygen saturation)."]
1942    #[doc = r""]
1943    #[doc = r" <details><summary>JSON schema</summary>"]
1944    #[doc = r""]
1945    #[doc = r" ```json"]
1946    #[doc = "{"]
1947    #[doc = "  \"title\": \"PublicDailySpO2\","]
1948    #[doc = "  \"description\": \"Daily SpO2 (Oxygen saturation).\","]
1949    #[doc = "  \"type\": \"object\","]
1950    #[doc = "  \"required\": ["]
1951    #[doc = "    \"day\","]
1952    #[doc = "    \"id\""]
1953    #[doc = "  ],"]
1954    #[doc = "  \"properties\": {"]
1955    #[doc = "    \"breathing_disturbance_index\": {"]
1956    #[doc = "      \"title\": \"\","]
1957    #[doc = "      \"description\": \"Breathing Disturbance Index (BDI) calculated using detected SpO2 drops from timeseries. Values should be in range [0, 100]\","]
1958    #[doc = "      \"type\": ["]
1959    #[doc = "        \"integer\","]
1960    #[doc = "        \"null\""]
1961    #[doc = "      ]"]
1962    #[doc = "    },"]
1963    #[doc = "    \"day\": {"]
1964    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
1965    #[doc = "    },"]
1966    #[doc = "    \"id\": {"]
1967    #[doc = "      \"title\": \"\","]
1968    #[doc = "      \"description\": \"Unique identifier of the object.\","]
1969    #[doc = "      \"type\": \"string\","]
1970    #[doc = "      \"minLength\": 1"]
1971    #[doc = "    },"]
1972    #[doc = "    \"spo2_percentage\": {"]
1973    #[doc = "      \"title\": \"\","]
1974    #[doc = "      \"description\": \"The daily SpO2 percentage value aggregates. Sourced from SpO2 percentage timeseries values.\","]
1975    #[doc = "      \"oneOf\": ["]
1976    #[doc = "        {"]
1977    #[doc = "          \"type\": \"null\""]
1978    #[doc = "        },"]
1979    #[doc = "        {"]
1980    #[doc = "          \"allOf\": ["]
1981    #[doc = "            {"]
1982    #[doc = "              \"$ref\": \"#/components/schemas/PublicSpo2AggregatedValues\""]
1983    #[doc = "            }"]
1984    #[doc = "          ]"]
1985    #[doc = "        }"]
1986    #[doc = "      ]"]
1987    #[doc = "    }"]
1988    #[doc = "  },"]
1989    #[doc = "  \"x-cloud-only\": true,"]
1990    #[doc = "  \"x-collection\": \"publicdailyspo2\","]
1991    #[doc = "  \"x-owner\": \"sleep-squad\""]
1992    #[doc = "}"]
1993    #[doc = r" ```"]
1994    #[doc = r" </details>"]
1995    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1996    pub struct PublicDailySpO2 {
1997        #[doc = "Breathing Disturbance Index (BDI) calculated using detected SpO2 drops from timeseries. Values should be in range [0, 100]"]
1998        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1999        pub breathing_disturbance_index: ::std::option::Option<i64>,
2000        pub day: IsoDate,
2001        #[doc = "Unique identifier of the object."]
2002        pub id: X,
2003        #[doc = "The daily SpO2 percentage value aggregates. Sourced from SpO2 percentage timeseries values."]
2004        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2005        pub spo2_percentage: ::std::option::Option<PublicSpo2AggregatedValues>,
2006    }
2007
2008    #[doc = "Daily stress."]
2009    #[doc = r""]
2010    #[doc = r" <details><summary>JSON schema</summary>"]
2011    #[doc = r""]
2012    #[doc = r" ```json"]
2013    #[doc = "{"]
2014    #[doc = "  \"title\": \"PublicDailyStress\","]
2015    #[doc = "  \"description\": \"Daily stress.\","]
2016    #[doc = "  \"type\": \"object\","]
2017    #[doc = "  \"required\": ["]
2018    #[doc = "    \"day\","]
2019    #[doc = "    \"id\""]
2020    #[doc = "  ],"]
2021    #[doc = "  \"properties\": {"]
2022    #[doc = "    \"day\": {"]
2023    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
2024    #[doc = "    },"]
2025    #[doc = "    \"day_summary\": {"]
2026    #[doc = "      \"title\": \"\","]
2027    #[doc = "      \"description\": \"Stress summary of full day.\","]
2028    #[doc = "      \"oneOf\": ["]
2029    #[doc = "        {"]
2030    #[doc = "          \"type\": \"null\""]
2031    #[doc = "        },"]
2032    #[doc = "        {"]
2033    #[doc = "          \"allOf\": ["]
2034    #[doc = "            {"]
2035    #[doc = "              \"$ref\": \"#/components/schemas/PublicDailyStressSummary\""]
2036    #[doc = "            }"]
2037    #[doc = "          ]"]
2038    #[doc = "        }"]
2039    #[doc = "      ]"]
2040    #[doc = "    },"]
2041    #[doc = "    \"id\": {"]
2042    #[doc = "      \"title\": \"\","]
2043    #[doc = "      \"description\": \"Unique identifier of the object.\","]
2044    #[doc = "      \"type\": \"string\","]
2045    #[doc = "      \"minLength\": 1"]
2046    #[doc = "    },"]
2047    #[doc = "    \"recovery_high\": {"]
2048    #[doc = "      \"title\": \"\","]
2049    #[doc = "      \"description\": \"Time spent in a high recovery zone (bottom quartile data) in seconds.\","]
2050    #[doc = "      \"type\": ["]
2051    #[doc = "        \"integer\","]
2052    #[doc = "        \"null\""]
2053    #[doc = "      ]"]
2054    #[doc = "    },"]
2055    #[doc = "    \"stress_high\": {"]
2056    #[doc = "      \"title\": \"\","]
2057    #[doc = "      \"description\": \"Time spent in a high stress zone (top quartile of data) in seconds.\","]
2058    #[doc = "      \"type\": ["]
2059    #[doc = "        \"integer\","]
2060    #[doc = "        \"null\""]
2061    #[doc = "      ]"]
2062    #[doc = "    }"]
2063    #[doc = "  },"]
2064    #[doc = "  \"x-cloud-only\": true,"]
2065    #[doc = "  \"x-collection\": \"publicdailystress\","]
2066    #[doc = "  \"x-owner\": \"wellbeing-squad\""]
2067    #[doc = "}"]
2068    #[doc = r" ```"]
2069    #[doc = r" </details>"]
2070    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2071    pub struct PublicDailyStress {
2072        pub day: IsoDate,
2073        #[doc = "Stress summary of full day."]
2074        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2075        pub day_summary: ::std::option::Option<PublicDailyStressSummary>,
2076        #[doc = "Unique identifier of the object."]
2077        pub id: X,
2078        #[doc = "Time spent in a high recovery zone (bottom quartile data) in seconds."]
2079        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2080        pub recovery_high: ::std::option::Option<i64>,
2081        #[doc = "Time spent in a high stress zone (top quartile of data) in seconds."]
2082        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2083        pub stress_high: ::std::option::Option<i64>,
2084    }
2085
2086    #[doc = "Possible public daily stress summary types."]
2087    #[doc = r""]
2088    #[doc = r" <details><summary>JSON schema</summary>"]
2089    #[doc = r""]
2090    #[doc = r" ```json"]
2091    #[doc = "{"]
2092    #[doc = "  \"title\": \"PublicDailyStressSummary\","]
2093    #[doc = "  \"description\": \"Possible public daily stress summary types.\","]
2094    #[doc = "  \"type\": \"string\","]
2095    #[doc = "  \"enum\": ["]
2096    #[doc = "    \"restored\","]
2097    #[doc = "    \"normal\","]
2098    #[doc = "    \"stressful\""]
2099    #[doc = "  ]"]
2100    #[doc = "}"]
2101    #[doc = r" ```"]
2102    #[doc = r" </details>"]
2103    #[derive(
2104        :: serde :: Deserialize,
2105        :: serde :: Serialize,
2106        Clone,
2107        Copy,
2108        Debug,
2109        Eq,
2110        Hash,
2111        Ord,
2112        PartialEq,
2113        PartialOrd,
2114    )]
2115    pub enum PublicDailyStressSummary {
2116        #[serde(rename = "restored")]
2117        Restored,
2118        #[serde(rename = "normal")]
2119        Normal,
2120        #[serde(rename = "stressful")]
2121        Stressful,
2122    }
2123
2124    impl ::std::fmt::Display for PublicDailyStressSummary {
2125        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2126            match *self {
2127                Self::Restored => f.write_str("restored"),
2128                Self::Normal => f.write_str("normal"),
2129                Self::Stressful => f.write_str("stressful"),
2130            }
2131        }
2132    }
2133
2134    impl ::std::str::FromStr for PublicDailyStressSummary {
2135        type Err = self::error::ConversionError;
2136        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2137            match value {
2138                "restored" => Ok(Self::Restored),
2139                "normal" => Ok(Self::Normal),
2140                "stressful" => Ok(Self::Stressful),
2141                _ => Err("invalid value".into()),
2142            }
2143        }
2144    }
2145
2146    impl ::std::convert::TryFrom<&str> for PublicDailyStressSummary {
2147        type Error = self::error::ConversionError;
2148        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2149            value.parse()
2150        }
2151    }
2152
2153    impl ::std::convert::TryFrom<&::std::string::String> for PublicDailyStressSummary {
2154        type Error = self::error::ConversionError;
2155        fn try_from(
2156            value: &::std::string::String,
2157        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2158            value.parse()
2159        }
2160    }
2161
2162    impl ::std::convert::TryFrom<::std::string::String> for PublicDailyStressSummary {
2163        type Error = self::error::ConversionError;
2164        fn try_from(
2165            value: ::std::string::String,
2166        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2167            value.parse()
2168        }
2169    }
2170
2171    #[doc = "Heart rate sample"]
2172    #[doc = r""]
2173    #[doc = r" <details><summary>JSON schema</summary>"]
2174    #[doc = r""]
2175    #[doc = r" ```json"]
2176    #[doc = "{"]
2177    #[doc = "  \"title\": \"PublicHeartRateRow\","]
2178    #[doc = "  \"description\": \"Heart rate sample\","]
2179    #[doc = "  \"type\": \"object\","]
2180    #[doc = "  \"required\": ["]
2181    #[doc = "    \"bpm\","]
2182    #[doc = "    \"source\","]
2183    #[doc = "    \"timestamp\","]
2184    #[doc = "    \"timestamp_unix\""]
2185    #[doc = "  ],"]
2186    #[doc = "  \"properties\": {"]
2187    #[doc = "    \"bpm\": {"]
2188    #[doc = "      \"title\": \"\","]
2189    #[doc = "      \"description\": \"Heart rate as beats per minute.\","]
2190    #[doc = "      \"type\": \"integer\""]
2191    #[doc = "    },"]
2192    #[doc = "    \"source\": {"]
2193    #[doc = "      \"$ref\": \"#/components/schemas/PublicHeartRateSource\""]
2194    #[doc = "    },"]
2195    #[doc = "    \"timestamp\": {"]
2196    #[doc = "      \"$ref\": \"#/components/schemas/UtcDateTime\""]
2197    #[doc = "    },"]
2198    #[doc = "    \"timestamp_unix\": {"]
2199    #[doc = "      \"title\": \"\","]
2200    #[doc = "      \"description\": \"Timestamp of the discrete sample as unix time in milliseconds.\","]
2201    #[doc = "      \"type\": \"integer\""]
2202    #[doc = "    }"]
2203    #[doc = "  },"]
2204    #[doc = "  \"x-cloud-only\": true,"]
2205    #[doc = "  \"x-collection\": \"publicheartrate\","]
2206    #[doc = "  \"x-owner\": \"core-sensing-squad\""]
2207    #[doc = "}"]
2208    #[doc = r" ```"]
2209    #[doc = r" </details>"]
2210    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2211    pub struct PublicHeartRateRow {
2212        #[doc = "Heart rate as beats per minute."]
2213        pub bpm: i64,
2214        pub source: PublicHeartRateSource,
2215        pub timestamp: UtcDateTime,
2216        #[doc = "Timestamp of the discrete sample as unix time in milliseconds."]
2217        pub timestamp_unix: i64,
2218    }
2219
2220    #[doc = "Possible heart rate sources."]
2221    #[doc = r""]
2222    #[doc = r" <details><summary>JSON schema</summary>"]
2223    #[doc = r""]
2224    #[doc = r" ```json"]
2225    #[doc = "{"]
2226    #[doc = "  \"title\": \"PublicHeartRateSource\","]
2227    #[doc = "  \"description\": \"Possible heart rate sources.\","]
2228    #[doc = "  \"type\": \"string\","]
2229    #[doc = "  \"enum\": ["]
2230    #[doc = "    \"awake\","]
2231    #[doc = "    \"workout\","]
2232    #[doc = "    \"rest\","]
2233    #[doc = "    \"sleep\","]
2234    #[doc = "    \"live\","]
2235    #[doc = "    \"session\""]
2236    #[doc = "  ]"]
2237    #[doc = "}"]
2238    #[doc = r" ```"]
2239    #[doc = r" </details>"]
2240    #[derive(
2241        :: serde :: Deserialize,
2242        :: serde :: Serialize,
2243        Clone,
2244        Copy,
2245        Debug,
2246        Eq,
2247        Hash,
2248        Ord,
2249        PartialEq,
2250        PartialOrd,
2251    )]
2252    pub enum PublicHeartRateSource {
2253        #[serde(rename = "awake")]
2254        Awake,
2255        #[serde(rename = "workout")]
2256        Workout,
2257        #[serde(rename = "rest")]
2258        Rest,
2259        #[serde(rename = "sleep")]
2260        Sleep,
2261        #[serde(rename = "live")]
2262        Live,
2263        #[serde(rename = "session")]
2264        Session,
2265    }
2266
2267    impl ::std::fmt::Display for PublicHeartRateSource {
2268        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2269            match *self {
2270                Self::Awake => f.write_str("awake"),
2271                Self::Workout => f.write_str("workout"),
2272                Self::Rest => f.write_str("rest"),
2273                Self::Sleep => f.write_str("sleep"),
2274                Self::Live => f.write_str("live"),
2275                Self::Session => f.write_str("session"),
2276            }
2277        }
2278    }
2279
2280    impl ::std::str::FromStr for PublicHeartRateSource {
2281        type Err = self::error::ConversionError;
2282        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2283            match value {
2284                "awake" => Ok(Self::Awake),
2285                "workout" => Ok(Self::Workout),
2286                "rest" => Ok(Self::Rest),
2287                "sleep" => Ok(Self::Sleep),
2288                "live" => Ok(Self::Live),
2289                "session" => Ok(Self::Session),
2290                _ => Err("invalid value".into()),
2291            }
2292        }
2293    }
2294
2295    impl ::std::convert::TryFrom<&str> for PublicHeartRateSource {
2296        type Error = self::error::ConversionError;
2297        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2298            value.parse()
2299        }
2300    }
2301
2302    impl ::std::convert::TryFrom<&::std::string::String> for PublicHeartRateSource {
2303        type Error = self::error::ConversionError;
2304        fn try_from(
2305            value: &::std::string::String,
2306        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2307            value.parse()
2308        }
2309    }
2310
2311    impl ::std::convert::TryFrom<::std::string::String> for PublicHeartRateSource {
2312        type Error = self::error::ConversionError;
2313        fn try_from(
2314            value: ::std::string::String,
2315        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2316            value.parse()
2317        }
2318    }
2319
2320    #[doc = "`PublicModifiedSleepModel`"]
2321    #[doc = r""]
2322    #[doc = r" <details><summary>JSON schema</summary>"]
2323    #[doc = r""]
2324    #[doc = r" ```json"]
2325    #[doc = "{"]
2326    #[doc = "  \"title\": \"PublicModifiedSleepModel\","]
2327    #[doc = "  \"type\": \"object\","]
2328    #[doc = "  \"required\": ["]
2329    #[doc = "    \"bedtime_end\","]
2330    #[doc = "    \"bedtime_start\","]
2331    #[doc = "    \"day\","]
2332    #[doc = "    \"id\","]
2333    #[doc = "    \"low_battery_alert\","]
2334    #[doc = "    \"period\","]
2335    #[doc = "    \"time_in_bed\""]
2336    #[doc = "  ],"]
2337    #[doc = "  \"properties\": {"]
2338    #[doc = "    \"app_sleep_phase_5_min\": {"]
2339    #[doc = "      \"title\": \"App Sleep Phase 5 Min\","]
2340    #[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        \","]
2341    #[doc = "      \"type\": ["]
2342    #[doc = "        \"string\","]
2343    #[doc = "        \"null\""]
2344    #[doc = "      ]"]
2345    #[doc = "    },"]
2346    #[doc = "    \"average_breath\": {"]
2347    #[doc = "      \"title\": \"\","]
2348    #[doc = "      \"description\": \"Average breathing rate during sleep as breaths/minute.\","]
2349    #[doc = "      \"type\": ["]
2350    #[doc = "        \"number\","]
2351    #[doc = "        \"null\""]
2352    #[doc = "      ]"]
2353    #[doc = "    },"]
2354    #[doc = "    \"average_heart_rate\": {"]
2355    #[doc = "      \"title\": \"\","]
2356    #[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.\","]
2357    #[doc = "      \"type\": ["]
2358    #[doc = "        \"number\","]
2359    #[doc = "        \"null\""]
2360    #[doc = "      ]"]
2361    #[doc = "    },"]
2362    #[doc = "    \"average_hrv\": {"]
2363    #[doc = "      \"title\": \"\","]
2364    #[doc = "      \"description\": \"Average heart rate variability during sleep.\","]
2365    #[doc = "      \"type\": ["]
2366    #[doc = "        \"integer\","]
2367    #[doc = "        \"null\""]
2368    #[doc = "      ]"]
2369    #[doc = "    },"]
2370    #[doc = "    \"awake_time\": {"]
2371    #[doc = "      \"title\": \"\","]
2372    #[doc = "      \"description\": \"Duration spent awake in seconds.\","]
2373    #[doc = "      \"type\": ["]
2374    #[doc = "        \"integer\","]
2375    #[doc = "        \"null\""]
2376    #[doc = "      ]"]
2377    #[doc = "    },"]
2378    #[doc = "    \"bedtime_end\": {"]
2379    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
2380    #[doc = "    },"]
2381    #[doc = "    \"bedtime_start\": {"]
2382    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
2383    #[doc = "    },"]
2384    #[doc = "    \"day\": {"]
2385    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
2386    #[doc = "    },"]
2387    #[doc = "    \"deep_sleep_duration\": {"]
2388    #[doc = "      \"title\": \"\","]
2389    #[doc = "      \"description\": \"Duration spent in deep sleep in seconds.\","]
2390    #[doc = "      \"type\": ["]
2391    #[doc = "        \"integer\","]
2392    #[doc = "        \"null\""]
2393    #[doc = "      ]"]
2394    #[doc = "    },"]
2395    #[doc = "    \"efficiency\": {"]
2396    #[doc = "      \"title\": \"\","]
2397    #[doc = "      \"description\": \"Sleep efficiency rating in range [1, 100].\","]
2398    #[doc = "      \"type\": ["]
2399    #[doc = "        \"integer\","]
2400    #[doc = "        \"null\""]
2401    #[doc = "      ]"]
2402    #[doc = "    },"]
2403    #[doc = "    \"heart_rate\": {"]
2404    #[doc = "      \"title\": \"\","]
2405    #[doc = "      \"description\": \"Object containing heart rate samples.\","]
2406    #[doc = "      \"oneOf\": ["]
2407    #[doc = "        {"]
2408    #[doc = "          \"type\": \"null\""]
2409    #[doc = "        },"]
2410    #[doc = "        {"]
2411    #[doc = "          \"allOf\": ["]
2412    #[doc = "            {"]
2413    #[doc = "              \"$ref\": \"#/components/schemas/PublicSample\""]
2414    #[doc = "            }"]
2415    #[doc = "          ]"]
2416    #[doc = "        }"]
2417    #[doc = "      ]"]
2418    #[doc = "    },"]
2419    #[doc = "    \"hrv\": {"]
2420    #[doc = "      \"title\": \"\","]
2421    #[doc = "      \"description\": \"Object containing heart rate variability samples.\","]
2422    #[doc = "      \"oneOf\": ["]
2423    #[doc = "        {"]
2424    #[doc = "          \"type\": \"null\""]
2425    #[doc = "        },"]
2426    #[doc = "        {"]
2427    #[doc = "          \"allOf\": ["]
2428    #[doc = "            {"]
2429    #[doc = "              \"$ref\": \"#/components/schemas/PublicSample\""]
2430    #[doc = "            }"]
2431    #[doc = "          ]"]
2432    #[doc = "        }"]
2433    #[doc = "      ]"]
2434    #[doc = "    },"]
2435    #[doc = "    \"id\": {"]
2436    #[doc = "      \"title\": \"\","]
2437    #[doc = "      \"description\": \"Unique identifier of the object.\","]
2438    #[doc = "      \"type\": \"string\","]
2439    #[doc = "      \"minLength\": 1"]
2440    #[doc = "    },"]
2441    #[doc = "    \"latency\": {"]
2442    #[doc = "      \"title\": \"\","]
2443    #[doc = "      \"description\": \"Sleep latency in seconds. This is the time it took for the user to fall asleep after going to bed.\","]
2444    #[doc = "      \"type\": ["]
2445    #[doc = "        \"integer\","]
2446    #[doc = "        \"null\""]
2447    #[doc = "      ]"]
2448    #[doc = "    },"]
2449    #[doc = "    \"light_sleep_duration\": {"]
2450    #[doc = "      \"title\": \"\","]
2451    #[doc = "      \"description\": \"Duration spent in light sleep in seconds.\","]
2452    #[doc = "      \"type\": ["]
2453    #[doc = "        \"integer\","]
2454    #[doc = "        \"null\""]
2455    #[doc = "      ]"]
2456    #[doc = "    },"]
2457    #[doc = "    \"low_battery_alert\": {"]
2458    #[doc = "      \"title\": \"\","]
2459    #[doc = "      \"description\": \"Flag indicating if a low battery alert occurred.\","]
2460    #[doc = "      \"type\": \"boolean\""]
2461    #[doc = "    },"]
2462    #[doc = "    \"lowest_heart_rate\": {"]
2463    #[doc = "      \"title\": \"\","]
2464    #[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.\","]
2465    #[doc = "      \"type\": ["]
2466    #[doc = "        \"integer\","]
2467    #[doc = "        \"null\""]
2468    #[doc = "      ]"]
2469    #[doc = "    },"]
2470    #[doc = "    \"movement_30_sec\": {"]
2471    #[doc = "      \"title\": \"\","]
2472    #[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\\\".\","]
2473    #[doc = "      \"type\": ["]
2474    #[doc = "        \"string\","]
2475    #[doc = "        \"null\""]
2476    #[doc = "      ]"]
2477    #[doc = "    },"]
2478    #[doc = "    \"period\": {"]
2479    #[doc = "      \"title\": \"\","]
2480    #[doc = "      \"description\": \"ECore sleep period identifier.\","]
2481    #[doc = "      \"type\": \"integer\""]
2482    #[doc = "    },"]
2483    #[doc = "    \"readiness\": {"]
2484    #[doc = "      \"title\": \"\","]
2485    #[doc = "      \"description\": \"Object containing the readiness details.\","]
2486    #[doc = "      \"oneOf\": ["]
2487    #[doc = "        {"]
2488    #[doc = "          \"type\": \"null\""]
2489    #[doc = "        },"]
2490    #[doc = "        {"]
2491    #[doc = "          \"allOf\": ["]
2492    #[doc = "            {"]
2493    #[doc = "              \"$ref\": \"#/components/schemas/PublicReadiness\""]
2494    #[doc = "            }"]
2495    #[doc = "          ]"]
2496    #[doc = "        }"]
2497    #[doc = "      ]"]
2498    #[doc = "    },"]
2499    #[doc = "    \"readiness_score_delta\": {"]
2500    #[doc = "      \"title\": \"\","]
2501    #[doc = "      \"description\": \"Effect on readiness score caused by this sleep period.\","]
2502    #[doc = "      \"type\": ["]
2503    #[doc = "        \"integer\","]
2504    #[doc = "        \"null\""]
2505    #[doc = "      ]"]
2506    #[doc = "    },"]
2507    #[doc = "    \"rem_sleep_duration\": {"]
2508    #[doc = "      \"title\": \"\","]
2509    #[doc = "      \"description\": \"Duration spent in REM sleep in seconds.\","]
2510    #[doc = "      \"type\": ["]
2511    #[doc = "        \"integer\","]
2512    #[doc = "        \"null\""]
2513    #[doc = "      ]"]
2514    #[doc = "    },"]
2515    #[doc = "    \"restless_periods\": {"]
2516    #[doc = "      \"title\": \"\","]
2517    #[doc = "      \"description\": \"Number of restless periods during sleep.\","]
2518    #[doc = "      \"type\": ["]
2519    #[doc = "        \"integer\","]
2520    #[doc = "        \"null\""]
2521    #[doc = "      ]"]
2522    #[doc = "    },"]
2523    #[doc = "    \"ring_id\": {"]
2524    #[doc = "      \"title\": \"Ring Id\","]
2525    #[doc = "      \"description\": \"Encrypted identifier of the ring that produced this sleep data.\","]
2526    #[doc = "      \"type\": ["]
2527    #[doc = "        \"string\","]
2528    #[doc = "        \"null\""]
2529    #[doc = "      ]"]
2530    #[doc = "    },"]
2531    #[doc = "    \"sleep_algorithm_version\": {"]
2532    #[doc = "      \"title\": \"\","]
2533    #[doc = "      \"description\": \"Version of the sleep algorithm used to calculate the sleep data.\","]
2534    #[doc = "      \"oneOf\": ["]
2535    #[doc = "        {"]
2536    #[doc = "          \"type\": \"null\""]
2537    #[doc = "        },"]
2538    #[doc = "        {"]
2539    #[doc = "          \"allOf\": ["]
2540    #[doc = "            {"]
2541    #[doc = "              \"$ref\": \"#/components/schemas/PublicSleepAlgorithmVersion\""]
2542    #[doc = "            }"]
2543    #[doc = "          ]"]
2544    #[doc = "        }"]
2545    #[doc = "      ]"]
2546    #[doc = "    },"]
2547    #[doc = "    \"sleep_analysis_reason\": {"]
2548    #[doc = "      \"title\": \"\","]
2549    #[doc = "      \"description\": \"The reason for the creation or update of the latest version of this sleep.\","]
2550    #[doc = "      \"oneOf\": ["]
2551    #[doc = "        {"]
2552    #[doc = "          \"type\": \"null\""]
2553    #[doc = "        },"]
2554    #[doc = "        {"]
2555    #[doc = "          \"allOf\": ["]
2556    #[doc = "            {"]
2557    #[doc = "              \"$ref\": \"#/components/schemas/PublicSleepAnalysisReason\""]
2558    #[doc = "            }"]
2559    #[doc = "          ]"]
2560    #[doc = "        }"]
2561    #[doc = "      ]"]
2562    #[doc = "    },"]
2563    #[doc = "    \"sleep_phase_30_sec\": {"]
2564    #[doc = "      \"title\": \"\","]
2565    #[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\\\".\","]
2566    #[doc = "      \"type\": ["]
2567    #[doc = "        \"string\","]
2568    #[doc = "        \"null\""]
2569    #[doc = "      ]"]
2570    #[doc = "    },"]
2571    #[doc = "    \"sleep_phase_5_min\": {"]
2572    #[doc = "      \"title\": \"\","]
2573    #[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\\\".\","]
2574    #[doc = "      \"type\": ["]
2575    #[doc = "        \"string\","]
2576    #[doc = "        \"null\""]
2577    #[doc = "      ]"]
2578    #[doc = "    },"]
2579    #[doc = "    \"sleep_score_delta\": {"]
2580    #[doc = "      \"title\": \"\","]
2581    #[doc = "      \"description\": \"Effect on sleep score caused by this sleep period.\","]
2582    #[doc = "      \"type\": ["]
2583    #[doc = "        \"integer\","]
2584    #[doc = "        \"null\""]
2585    #[doc = "      ]"]
2586    #[doc = "    },"]
2587    #[doc = "    \"time_in_bed\": {"]
2588    #[doc = "      \"title\": \"\","]
2589    #[doc = "      \"description\": \"Duration spent in bed in seconds.\","]
2590    #[doc = "      \"type\": \"integer\""]
2591    #[doc = "    },"]
2592    #[doc = "    \"total_sleep_duration\": {"]
2593    #[doc = "      \"title\": \"\","]
2594    #[doc = "      \"description\": \"Total sleep duration in seconds.\","]
2595    #[doc = "      \"type\": ["]
2596    #[doc = "        \"integer\","]
2597    #[doc = "        \"null\""]
2598    #[doc = "      ]"]
2599    #[doc = "    },"]
2600    #[doc = "    \"type\": {"]
2601    #[doc = "      \"title\": \"\","]
2602    #[doc = "      \"description\": \"Type of the sleep period.\","]
2603    #[doc = "      \"oneOf\": ["]
2604    #[doc = "        {"]
2605    #[doc = "          \"type\": \"null\""]
2606    #[doc = "        },"]
2607    #[doc = "        {"]
2608    #[doc = "          \"allOf\": ["]
2609    #[doc = "            {"]
2610    #[doc = "              \"$ref\": \"#/components/schemas/PublicSleepType\""]
2611    #[doc = "            }"]
2612    #[doc = "          ]"]
2613    #[doc = "        }"]
2614    #[doc = "      ]"]
2615    #[doc = "    }"]
2616    #[doc = "  },"]
2617    #[doc = "  \"x-cloud-only\": true,"]
2618    #[doc = "  \"x-collection\": \"publicsleepmodel\","]
2619    #[doc = "  \"x-owner\": \"sleep-squad\""]
2620    #[doc = "}"]
2621    #[doc = r" ```"]
2622    #[doc = r" </details>"]
2623    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2624    pub struct PublicModifiedSleepModel {
2625        #[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        "]
2626        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2627        pub app_sleep_phase_5_min: ::std::option::Option<::std::string::String>,
2628        #[doc = "Average breathing rate during sleep as breaths/minute."]
2629        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2630        pub average_breath: ::std::option::Option<f64>,
2631        #[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."]
2632        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2633        pub average_heart_rate: ::std::option::Option<f64>,
2634        #[doc = "Average heart rate variability during sleep."]
2635        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2636        pub average_hrv: ::std::option::Option<i64>,
2637        #[doc = "Duration spent awake in seconds."]
2638        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2639        pub awake_time: ::std::option::Option<i64>,
2640        pub bedtime_end: LocalizedDateTime,
2641        pub bedtime_start: LocalizedDateTime,
2642        pub day: IsoDate,
2643        #[doc = "Duration spent in deep sleep in seconds."]
2644        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2645        pub deep_sleep_duration: ::std::option::Option<i64>,
2646        #[doc = "Sleep efficiency rating in range [1, 100]."]
2647        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2648        pub efficiency: ::std::option::Option<i64>,
2649        #[doc = "Object containing heart rate samples."]
2650        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2651        pub heart_rate: ::std::option::Option<PublicSample>,
2652        #[doc = "Object containing heart rate variability samples."]
2653        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2654        pub hrv: ::std::option::Option<PublicSample>,
2655        #[doc = "Unique identifier of the object."]
2656        pub id: X,
2657        #[doc = "Sleep latency in seconds. This is the time it took for the user to fall asleep after going to bed."]
2658        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2659        pub latency: ::std::option::Option<i64>,
2660        #[doc = "Duration spent in light sleep in seconds."]
2661        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2662        pub light_sleep_duration: ::std::option::Option<i64>,
2663        #[doc = "Flag indicating if a low battery alert occurred."]
2664        pub low_battery_alert: bool,
2665        #[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."]
2666        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2667        pub lowest_heart_rate: ::std::option::Option<i64>,
2668        #[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\"."]
2669        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2670        pub movement_30_sec: ::std::option::Option<::std::string::String>,
2671        #[doc = "ECore sleep period identifier."]
2672        pub period: i64,
2673        #[doc = "Object containing the readiness details."]
2674        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2675        pub readiness: ::std::option::Option<PublicReadiness>,
2676        #[doc = "Effect on readiness score caused by this sleep period."]
2677        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2678        pub readiness_score_delta: ::std::option::Option<i64>,
2679        #[doc = "Duration spent in REM sleep in seconds."]
2680        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2681        pub rem_sleep_duration: ::std::option::Option<i64>,
2682        #[doc = "Number of restless periods during sleep."]
2683        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2684        pub restless_periods: ::std::option::Option<i64>,
2685        #[doc = "Encrypted identifier of the ring that produced this sleep data."]
2686        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2687        pub ring_id: ::std::option::Option<::std::string::String>,
2688        #[doc = "Version of the sleep algorithm used to calculate the sleep data."]
2689        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2690        pub sleep_algorithm_version: ::std::option::Option<PublicSleepAlgorithmVersion>,
2691        #[doc = "The reason for the creation or update of the latest version of this sleep."]
2692        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2693        pub sleep_analysis_reason: ::std::option::Option<PublicSleepAnalysisReason>,
2694        #[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\"."]
2695        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2696        pub sleep_phase_30_sec: ::std::option::Option<::std::string::String>,
2697        #[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\"."]
2698        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2699        pub sleep_phase_5_min: ::std::option::Option<::std::string::String>,
2700        #[doc = "Effect on sleep score caused by this sleep period."]
2701        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2702        pub sleep_score_delta: ::std::option::Option<i64>,
2703        #[doc = "Duration spent in bed in seconds."]
2704        pub time_in_bed: i64,
2705        #[doc = "Total sleep duration in seconds."]
2706        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2707        pub total_sleep_duration: ::std::option::Option<i64>,
2708        #[doc = "Type of the sleep period."]
2709        #[serde(
2710            rename = "type",
2711            default,
2712            skip_serializing_if = "::std::option::Option::is_none"
2713        )]
2714        pub type_: ::std::option::Option<PublicSleepType>,
2715    }
2716
2717    #[doc = "Possible Moment moods."]
2718    #[doc = r""]
2719    #[doc = r" <details><summary>JSON schema</summary>"]
2720    #[doc = r""]
2721    #[doc = r" ```json"]
2722    #[doc = "{"]
2723    #[doc = "  \"title\": \"PublicMomentMood\","]
2724    #[doc = "  \"description\": \"Possible Moment moods.\","]
2725    #[doc = "  \"type\": \"string\","]
2726    #[doc = "  \"enum\": ["]
2727    #[doc = "    \"bad\","]
2728    #[doc = "    \"worse\","]
2729    #[doc = "    \"same\","]
2730    #[doc = "    \"good\","]
2731    #[doc = "    \"great\""]
2732    #[doc = "  ]"]
2733    #[doc = "}"]
2734    #[doc = r" ```"]
2735    #[doc = r" </details>"]
2736    #[derive(
2737        :: serde :: Deserialize,
2738        :: serde :: Serialize,
2739        Clone,
2740        Copy,
2741        Debug,
2742        Eq,
2743        Hash,
2744        Ord,
2745        PartialEq,
2746        PartialOrd,
2747    )]
2748    pub enum PublicMomentMood {
2749        #[serde(rename = "bad")]
2750        Bad,
2751        #[serde(rename = "worse")]
2752        Worse,
2753        #[serde(rename = "same")]
2754        Same,
2755        #[serde(rename = "good")]
2756        Good,
2757        #[serde(rename = "great")]
2758        Great,
2759    }
2760
2761    impl ::std::fmt::Display for PublicMomentMood {
2762        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2763            match *self {
2764                Self::Bad => f.write_str("bad"),
2765                Self::Worse => f.write_str("worse"),
2766                Self::Same => f.write_str("same"),
2767                Self::Good => f.write_str("good"),
2768                Self::Great => f.write_str("great"),
2769            }
2770        }
2771    }
2772
2773    impl ::std::str::FromStr for PublicMomentMood {
2774        type Err = self::error::ConversionError;
2775        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2776            match value {
2777                "bad" => Ok(Self::Bad),
2778                "worse" => Ok(Self::Worse),
2779                "same" => Ok(Self::Same),
2780                "good" => Ok(Self::Good),
2781                "great" => Ok(Self::Great),
2782                _ => Err("invalid value".into()),
2783            }
2784        }
2785    }
2786
2787    impl ::std::convert::TryFrom<&str> for PublicMomentMood {
2788        type Error = self::error::ConversionError;
2789        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2790            value.parse()
2791        }
2792    }
2793
2794    impl ::std::convert::TryFrom<&::std::string::String> for PublicMomentMood {
2795        type Error = self::error::ConversionError;
2796        fn try_from(
2797            value: &::std::string::String,
2798        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2799            value.parse()
2800        }
2801    }
2802
2803    impl ::std::convert::TryFrom<::std::string::String> for PublicMomentMood {
2804        type Error = self::error::ConversionError;
2805        fn try_from(
2806            value: ::std::string::String,
2807        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2808            value.parse()
2809        }
2810    }
2811
2812    #[doc = "Possible Moment types."]
2813    #[doc = r""]
2814    #[doc = r" <details><summary>JSON schema</summary>"]
2815    #[doc = r""]
2816    #[doc = r" ```json"]
2817    #[doc = "{"]
2818    #[doc = "  \"title\": \"PublicMomentType\","]
2819    #[doc = "  \"description\": \"Possible Moment types.\","]
2820    #[doc = "  \"type\": \"string\","]
2821    #[doc = "  \"enum\": ["]
2822    #[doc = "    \"breathing\","]
2823    #[doc = "    \"meditation\","]
2824    #[doc = "    \"nap\","]
2825    #[doc = "    \"relaxation\","]
2826    #[doc = "    \"rest\","]
2827    #[doc = "    \"body_status\""]
2828    #[doc = "  ]"]
2829    #[doc = "}"]
2830    #[doc = r" ```"]
2831    #[doc = r" </details>"]
2832    #[derive(
2833        :: serde :: Deserialize,
2834        :: serde :: Serialize,
2835        Clone,
2836        Copy,
2837        Debug,
2838        Eq,
2839        Hash,
2840        Ord,
2841        PartialEq,
2842        PartialOrd,
2843    )]
2844    pub enum PublicMomentType {
2845        #[serde(rename = "breathing")]
2846        Breathing,
2847        #[serde(rename = "meditation")]
2848        Meditation,
2849        #[serde(rename = "nap")]
2850        Nap,
2851        #[serde(rename = "relaxation")]
2852        Relaxation,
2853        #[serde(rename = "rest")]
2854        Rest,
2855        #[serde(rename = "body_status")]
2856        BodyStatus,
2857    }
2858
2859    impl ::std::fmt::Display for PublicMomentType {
2860        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2861            match *self {
2862                Self::Breathing => f.write_str("breathing"),
2863                Self::Meditation => f.write_str("meditation"),
2864                Self::Nap => f.write_str("nap"),
2865                Self::Relaxation => f.write_str("relaxation"),
2866                Self::Rest => f.write_str("rest"),
2867                Self::BodyStatus => f.write_str("body_status"),
2868            }
2869        }
2870    }
2871
2872    impl ::std::str::FromStr for PublicMomentType {
2873        type Err = self::error::ConversionError;
2874        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2875            match value {
2876                "breathing" => Ok(Self::Breathing),
2877                "meditation" => Ok(Self::Meditation),
2878                "nap" => Ok(Self::Nap),
2879                "relaxation" => Ok(Self::Relaxation),
2880                "rest" => Ok(Self::Rest),
2881                "body_status" => Ok(Self::BodyStatus),
2882                _ => Err("invalid value".into()),
2883            }
2884        }
2885    }
2886
2887    impl ::std::convert::TryFrom<&str> for PublicMomentType {
2888        type Error = self::error::ConversionError;
2889        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2890            value.parse()
2891        }
2892    }
2893
2894    impl ::std::convert::TryFrom<&::std::string::String> for PublicMomentType {
2895        type Error = self::error::ConversionError;
2896        fn try_from(
2897            value: &::std::string::String,
2898        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2899            value.parse()
2900        }
2901    }
2902
2903    impl ::std::convert::TryFrom<::std::string::String> for PublicMomentType {
2904        type Error = self::error::ConversionError;
2905        fn try_from(
2906            value: ::std::string::String,
2907        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2908            value.parse()
2909        }
2910    }
2911
2912    #[doc = "Object defining readiness."]
2913    #[doc = r""]
2914    #[doc = r" <details><summary>JSON schema</summary>"]
2915    #[doc = r""]
2916    #[doc = r" ```json"]
2917    #[doc = "{"]
2918    #[doc = "  \"title\": \"PublicReadiness\","]
2919    #[doc = "  \"description\": \"Object defining readiness.\","]
2920    #[doc = "  \"type\": \"object\","]
2921    #[doc = "  \"required\": ["]
2922    #[doc = "    \"contributors\""]
2923    #[doc = "  ],"]
2924    #[doc = "  \"properties\": {"]
2925    #[doc = "    \"contributors\": {"]
2926    #[doc = "      \"$ref\": \"#/components/schemas/PublicReadinessContributors\""]
2927    #[doc = "    },"]
2928    #[doc = "    \"score\": {"]
2929    #[doc = "      \"title\": \"\","]
2930    #[doc = "      \"description\": \"Readiness score in range [1, 100].\","]
2931    #[doc = "      \"type\": ["]
2932    #[doc = "        \"integer\","]
2933    #[doc = "        \"null\""]
2934    #[doc = "      ]"]
2935    #[doc = "    },"]
2936    #[doc = "    \"temperature_deviation\": {"]
2937    #[doc = "      \"title\": \"\","]
2938    #[doc = "      \"description\": \"Temperature deviation in degrees Celsius.\","]
2939    #[doc = "      \"type\": ["]
2940    #[doc = "        \"number\","]
2941    #[doc = "        \"null\""]
2942    #[doc = "      ]"]
2943    #[doc = "    },"]
2944    #[doc = "    \"temperature_trend_deviation\": {"]
2945    #[doc = "      \"title\": \"\","]
2946    #[doc = "      \"description\": \"Temperature trend deviation in degrees Celsius.\","]
2947    #[doc = "      \"type\": ["]
2948    #[doc = "        \"number\","]
2949    #[doc = "        \"null\""]
2950    #[doc = "      ]"]
2951    #[doc = "    }"]
2952    #[doc = "  }"]
2953    #[doc = "}"]
2954    #[doc = r" ```"]
2955    #[doc = r" </details>"]
2956    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2957    pub struct PublicReadiness {
2958        pub contributors: PublicReadinessContributors,
2959        #[doc = "Readiness score in range [1, 100]."]
2960        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2961        pub score: ::std::option::Option<i64>,
2962        #[doc = "Temperature deviation in degrees Celsius."]
2963        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2964        pub temperature_deviation: ::std::option::Option<f64>,
2965        #[doc = "Temperature trend deviation in degrees Celsius."]
2966        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2967        pub temperature_trend_deviation: ::std::option::Option<f64>,
2968    }
2969
2970    #[doc = "Object defining readiness score contributors."]
2971    #[doc = r""]
2972    #[doc = r" <details><summary>JSON schema</summary>"]
2973    #[doc = r""]
2974    #[doc = r" ```json"]
2975    #[doc = "{"]
2976    #[doc = "  \"title\": \"PublicReadinessContributors\","]
2977    #[doc = "  \"description\": \"Object defining readiness score contributors.\","]
2978    #[doc = "  \"type\": \"object\","]
2979    #[doc = "  \"properties\": {"]
2980    #[doc = "    \"activity_balance\": {"]
2981    #[doc = "      \"title\": \"\","]
2982    #[doc = "      \"description\": \"Contribution of cumulative activity balance in range [1, 100].\","]
2983    #[doc = "      \"type\": ["]
2984    #[doc = "        \"integer\","]
2985    #[doc = "        \"null\""]
2986    #[doc = "      ]"]
2987    #[doc = "    },"]
2988    #[doc = "    \"body_temperature\": {"]
2989    #[doc = "      \"title\": \"\","]
2990    #[doc = "      \"description\": \"Contribution of body temperature in range [1, 100].\","]
2991    #[doc = "      \"type\": ["]
2992    #[doc = "        \"integer\","]
2993    #[doc = "        \"null\""]
2994    #[doc = "      ]"]
2995    #[doc = "    },"]
2996    #[doc = "    \"hrv_balance\": {"]
2997    #[doc = "      \"title\": \"\","]
2998    #[doc = "      \"description\": \"Contribution of heart rate variability balance in range [1, 100].\","]
2999    #[doc = "      \"type\": ["]
3000    #[doc = "        \"integer\","]
3001    #[doc = "        \"null\""]
3002    #[doc = "      ]"]
3003    #[doc = "    },"]
3004    #[doc = "    \"previous_day_activity\": {"]
3005    #[doc = "      \"title\": \"\","]
3006    #[doc = "      \"description\": \"Contribution of previous day's activity in range [1, 100].\","]
3007    #[doc = "      \"type\": ["]
3008    #[doc = "        \"integer\","]
3009    #[doc = "        \"null\""]
3010    #[doc = "      ]"]
3011    #[doc = "    },"]
3012    #[doc = "    \"previous_night\": {"]
3013    #[doc = "      \"title\": \"\","]
3014    #[doc = "      \"description\": \"Contribution of previous night's sleep in range [1, 100].\","]
3015    #[doc = "      \"type\": ["]
3016    #[doc = "        \"integer\","]
3017    #[doc = "        \"null\""]
3018    #[doc = "      ]"]
3019    #[doc = "    },"]
3020    #[doc = "    \"recovery_index\": {"]
3021    #[doc = "      \"title\": \"\","]
3022    #[doc = "      \"description\": \"Contribution of recovery index in range [1, 100].\","]
3023    #[doc = "      \"type\": ["]
3024    #[doc = "        \"integer\","]
3025    #[doc = "        \"null\""]
3026    #[doc = "      ]"]
3027    #[doc = "    },"]
3028    #[doc = "    \"resting_heart_rate\": {"]
3029    #[doc = "      \"title\": \"\","]
3030    #[doc = "      \"description\": \"Contribution of resting heart rate in range [1, 100].\","]
3031    #[doc = "      \"type\": ["]
3032    #[doc = "        \"integer\","]
3033    #[doc = "        \"null\""]
3034    #[doc = "      ]"]
3035    #[doc = "    },"]
3036    #[doc = "    \"sleep_balance\": {"]
3037    #[doc = "      \"title\": \"\","]
3038    #[doc = "      \"description\": \"Contribution of sleep balance in range [1, 100].\","]
3039    #[doc = "      \"type\": ["]
3040    #[doc = "        \"integer\","]
3041    #[doc = "        \"null\""]
3042    #[doc = "      ]"]
3043    #[doc = "    },"]
3044    #[doc = "    \"sleep_regularity\": {"]
3045    #[doc = "      \"title\": \"\","]
3046    #[doc = "      \"description\": \"Contribution of sleep regularity in range [1, 100].\","]
3047    #[doc = "      \"type\": ["]
3048    #[doc = "        \"integer\","]
3049    #[doc = "        \"null\""]
3050    #[doc = "      ]"]
3051    #[doc = "    }"]
3052    #[doc = "  }"]
3053    #[doc = "}"]
3054    #[doc = r" ```"]
3055    #[doc = r" </details>"]
3056    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3057    pub struct PublicReadinessContributors {
3058        #[doc = "Contribution of cumulative activity balance in range [1, 100]."]
3059        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3060        pub activity_balance: ::std::option::Option<i64>,
3061        #[doc = "Contribution of body temperature in range [1, 100]."]
3062        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3063        pub body_temperature: ::std::option::Option<i64>,
3064        #[doc = "Contribution of heart rate variability balance in range [1, 100]."]
3065        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3066        pub hrv_balance: ::std::option::Option<i64>,
3067        #[doc = "Contribution of previous day's activity in range [1, 100]."]
3068        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3069        pub previous_day_activity: ::std::option::Option<i64>,
3070        #[doc = "Contribution of previous night's sleep in range [1, 100]."]
3071        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3072        pub previous_night: ::std::option::Option<i64>,
3073        #[doc = "Contribution of recovery index in range [1, 100]."]
3074        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3075        pub recovery_index: ::std::option::Option<i64>,
3076        #[doc = "Contribution of resting heart rate in range [1, 100]."]
3077        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3078        pub resting_heart_rate: ::std::option::Option<i64>,
3079        #[doc = "Contribution of sleep balance in range [1, 100]."]
3080        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3081        pub sleep_balance: ::std::option::Option<i64>,
3082        #[doc = "Contribution of sleep regularity in range [1, 100]."]
3083        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3084        pub sleep_regularity: ::std::option::Option<i64>,
3085    }
3086
3087    impl ::std::default::Default for PublicReadinessContributors {
3088        fn default() -> Self {
3089            Self {
3090                activity_balance: Default::default(),
3091                body_temperature: Default::default(),
3092                hrv_balance: Default::default(),
3093                previous_day_activity: Default::default(),
3094                previous_night: Default::default(),
3095                recovery_index: Default::default(),
3096                resting_heart_rate: Default::default(),
3097                sleep_balance: Default::default(),
3098                sleep_regularity: Default::default(),
3099            }
3100        }
3101    }
3102
3103    #[doc = "Object defining a public Rest Mode episode."]
3104    #[doc = r""]
3105    #[doc = r" <details><summary>JSON schema</summary>"]
3106    #[doc = r""]
3107    #[doc = r" ```json"]
3108    #[doc = "{"]
3109    #[doc = "  \"title\": \"PublicRestModeEpisode\","]
3110    #[doc = "  \"description\": \"Object defining a public Rest Mode episode.\","]
3111    #[doc = "  \"type\": \"object\","]
3112    #[doc = "  \"required\": ["]
3113    #[doc = "    \"tags\","]
3114    #[doc = "    \"timestamp\""]
3115    #[doc = "  ],"]
3116    #[doc = "  \"properties\": {"]
3117    #[doc = "    \"tags\": {"]
3118    #[doc = "      \"title\": \"\","]
3119    #[doc = "      \"description\": \"Tags selected for the episode.\","]
3120    #[doc = "      \"type\": \"array\","]
3121    #[doc = "      \"items\": {"]
3122    #[doc = "        \"type\": \"string\""]
3123    #[doc = "      }"]
3124    #[doc = "    },"]
3125    #[doc = "    \"timestamp\": {"]
3126    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
3127    #[doc = "    }"]
3128    #[doc = "  }"]
3129    #[doc = "}"]
3130    #[doc = r" ```"]
3131    #[doc = r" </details>"]
3132    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3133    pub struct PublicRestModeEpisode {
3134        #[doc = "Tags selected for the episode."]
3135        pub tags: ::std::vec::Vec<::std::string::String>,
3136        pub timestamp: LocalizedDateTime,
3137    }
3138
3139    #[doc = "Rest mode episode information."]
3140    #[doc = r""]
3141    #[doc = r" <details><summary>JSON schema</summary>"]
3142    #[doc = r""]
3143    #[doc = r" ```json"]
3144    #[doc = "{"]
3145    #[doc = "  \"title\": \"PublicRestModePeriod\","]
3146    #[doc = "  \"description\": \"Rest mode episode information.\","]
3147    #[doc = "  \"type\": \"object\","]
3148    #[doc = "  \"required\": ["]
3149    #[doc = "    \"episodes\","]
3150    #[doc = "    \"id\","]
3151    #[doc = "    \"start_day\""]
3152    #[doc = "  ],"]
3153    #[doc = "  \"properties\": {"]
3154    #[doc = "    \"end_day\": {"]
3155    #[doc = "      \"title\": \"\","]
3156    #[doc = "      \"description\": \"End date of rest mode.\","]
3157    #[doc = "      \"oneOf\": ["]
3158    #[doc = "        {"]
3159    #[doc = "          \"type\": \"null\""]
3160    #[doc = "        },"]
3161    #[doc = "        {"]
3162    #[doc = "          \"allOf\": ["]
3163    #[doc = "            {"]
3164    #[doc = "              \"$ref\": \"#/components/schemas/ISODate\""]
3165    #[doc = "            }"]
3166    #[doc = "          ]"]
3167    #[doc = "        }"]
3168    #[doc = "      ]"]
3169    #[doc = "    },"]
3170    #[doc = "    \"end_time\": {"]
3171    #[doc = "      \"title\": \"\","]
3172    #[doc = "      \"description\": \"Timestamp when rest mode ended.\","]
3173    #[doc = "      \"oneOf\": ["]
3174    #[doc = "        {"]
3175    #[doc = "          \"type\": \"null\""]
3176    #[doc = "        },"]
3177    #[doc = "        {"]
3178    #[doc = "          \"allOf\": ["]
3179    #[doc = "            {"]
3180    #[doc = "              \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
3181    #[doc = "            }"]
3182    #[doc = "          ]"]
3183    #[doc = "        }"]
3184    #[doc = "      ]"]
3185    #[doc = "    },"]
3186    #[doc = "    \"episodes\": {"]
3187    #[doc = "      \"title\": \"\","]
3188    #[doc = "      \"description\": \"Collection of episodes during rest mode, consisting of tags.\","]
3189    #[doc = "      \"type\": \"array\","]
3190    #[doc = "      \"items\": {"]
3191    #[doc = "        \"$ref\": \"#/components/schemas/PublicRestModeEpisode\""]
3192    #[doc = "      }"]
3193    #[doc = "    },"]
3194    #[doc = "    \"id\": {"]
3195    #[doc = "      \"title\": \"\","]
3196    #[doc = "      \"description\": \"Unique identifier of the object.\","]
3197    #[doc = "      \"type\": \"string\","]
3198    #[doc = "      \"minLength\": 1"]
3199    #[doc = "    },"]
3200    #[doc = "    \"start_day\": {"]
3201    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
3202    #[doc = "    },"]
3203    #[doc = "    \"start_time\": {"]
3204    #[doc = "      \"title\": \"\","]
3205    #[doc = "      \"description\": \"Timestamp when rest mode ended.\","]
3206    #[doc = "      \"oneOf\": ["]
3207    #[doc = "        {"]
3208    #[doc = "          \"type\": \"null\""]
3209    #[doc = "        },"]
3210    #[doc = "        {"]
3211    #[doc = "          \"allOf\": ["]
3212    #[doc = "            {"]
3213    #[doc = "              \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
3214    #[doc = "            }"]
3215    #[doc = "          ]"]
3216    #[doc = "        }"]
3217    #[doc = "      ]"]
3218    #[doc = "    }"]
3219    #[doc = "  },"]
3220    #[doc = "  \"x-cloud-only\": true,"]
3221    #[doc = "  \"x-collection\": \"publicrestmodeperiod\","]
3222    #[doc = "  \"x-owner\": \"sleep-squad\""]
3223    #[doc = "}"]
3224    #[doc = r" ```"]
3225    #[doc = r" </details>"]
3226    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3227    pub struct PublicRestModePeriod {
3228        #[doc = "End date of rest mode."]
3229        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3230        pub end_day: ::std::option::Option<IsoDate>,
3231        #[doc = "Timestamp when rest mode ended."]
3232        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3233        pub end_time: ::std::option::Option<LocalizedDateTime>,
3234        #[doc = "Collection of episodes during rest mode, consisting of tags."]
3235        pub episodes: ::std::vec::Vec<PublicRestModeEpisode>,
3236        #[doc = "Unique identifier of the object."]
3237        pub id: X,
3238        pub start_day: IsoDate,
3239        #[doc = "Timestamp when rest mode ended."]
3240        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3241        pub start_time: ::std::option::Option<LocalizedDateTime>,
3242    }
3243
3244    #[doc = "Object defining a ring battery level event."]
3245    #[doc = r""]
3246    #[doc = r" <details><summary>JSON schema</summary>"]
3247    #[doc = r""]
3248    #[doc = r" ```json"]
3249    #[doc = "{"]
3250    #[doc = "  \"title\": \"PublicRingBatteryLevelRow\","]
3251    #[doc = "  \"description\": \"Object defining a ring battery level event.\","]
3252    #[doc = "  \"type\": \"object\","]
3253    #[doc = "  \"required\": ["]
3254    #[doc = "    \"level\","]
3255    #[doc = "    \"timestamp\","]
3256    #[doc = "    \"timestamp_unix\""]
3257    #[doc = "  ],"]
3258    #[doc = "  \"properties\": {"]
3259    #[doc = "    \"charging\": {"]
3260    #[doc = "      \"title\": \"\","]
3261    #[doc = "      \"description\": \"Flag indicating if the ring was charging.\","]
3262    #[doc = "      \"type\": ["]
3263    #[doc = "        \"boolean\","]
3264    #[doc = "        \"null\""]
3265    #[doc = "      ]"]
3266    #[doc = "    },"]
3267    #[doc = "    \"in_charger\": {"]
3268    #[doc = "      \"title\": \"\","]
3269    #[doc = "      \"description\": \"Flag indicating if the ring was in charger.\","]
3270    #[doc = "      \"type\": ["]
3271    #[doc = "        \"boolean\","]
3272    #[doc = "        \"null\""]
3273    #[doc = "      ]"]
3274    #[doc = "    },"]
3275    #[doc = "    \"level\": {"]
3276    #[doc = "      \"title\": \"\","]
3277    #[doc = "      \"description\": \"Ring battery level percentage. These values are within [0, 100].\","]
3278    #[doc = "      \"type\": \"integer\""]
3279    #[doc = "    },"]
3280    #[doc = "    \"timestamp\": {"]
3281    #[doc = "      \"$ref\": \"#/components/schemas/UtcDateTime\""]
3282    #[doc = "    },"]
3283    #[doc = "    \"timestamp_unix\": {"]
3284    #[doc = "      \"title\": \"\","]
3285    #[doc = "      \"description\": \"Timestamp of the discrete sample as unix time in milliseconds.\","]
3286    #[doc = "      \"type\": \"integer\""]
3287    #[doc = "    }"]
3288    #[doc = "  },"]
3289    #[doc = "  \"x-cloud-only\": true,"]
3290    #[doc = "  \"x-collection\": \"publicringbatterylevel\","]
3291    #[doc = "  \"x-owner\": \"connectivity-squad\""]
3292    #[doc = "}"]
3293    #[doc = r" ```"]
3294    #[doc = r" </details>"]
3295    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3296    pub struct PublicRingBatteryLevelRow {
3297        #[doc = "Flag indicating if the ring was charging."]
3298        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3299        pub charging: ::std::option::Option<bool>,
3300        #[doc = "Flag indicating if the ring was in charger."]
3301        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3302        pub in_charger: ::std::option::Option<bool>,
3303        #[doc = "Ring battery level percentage. These values are within [0, 100]."]
3304        pub level: i64,
3305        pub timestamp: UtcDateTime,
3306        #[doc = "Timestamp of the discrete sample as unix time in milliseconds."]
3307        pub timestamp_unix: i64,
3308    }
3309
3310    #[doc = "Possible ring colors."]
3311    #[doc = r""]
3312    #[doc = r" <details><summary>JSON schema</summary>"]
3313    #[doc = r""]
3314    #[doc = r" ```json"]
3315    #[doc = "{"]
3316    #[doc = "  \"title\": \"PublicRingColor\","]
3317    #[doc = "  \"description\": \"Possible ring colors.\","]
3318    #[doc = "  \"type\": \"string\","]
3319    #[doc = "  \"enum\": ["]
3320    #[doc = "    \"brushed_silver\","]
3321    #[doc = "    \"glossy_black\","]
3322    #[doc = "    \"glossy_gold\","]
3323    #[doc = "    \"glossy_white\","]
3324    #[doc = "    \"gucci\","]
3325    #[doc = "    \"matt_gold\","]
3326    #[doc = "    \"rose\","]
3327    #[doc = "    \"silver\","]
3328    #[doc = "    \"stealth_black\","]
3329    #[doc = "    \"titanium\","]
3330    #[doc = "    \"titanium_and_gold\","]
3331    #[doc = "    \"cloud\","]
3332    #[doc = "    \"petal\","]
3333    #[doc = "    \"midnight\","]
3334    #[doc = "    \"tide\","]
3335    #[doc = "    \"deep_rose\""]
3336    #[doc = "  ]"]
3337    #[doc = "}"]
3338    #[doc = r" ```"]
3339    #[doc = r" </details>"]
3340    #[derive(
3341        :: serde :: Deserialize,
3342        :: serde :: Serialize,
3343        Clone,
3344        Copy,
3345        Debug,
3346        Eq,
3347        Hash,
3348        Ord,
3349        PartialEq,
3350        PartialOrd,
3351    )]
3352    pub enum PublicRingColor {
3353        #[serde(rename = "brushed_silver")]
3354        BrushedSilver,
3355        #[serde(rename = "glossy_black")]
3356        GlossyBlack,
3357        #[serde(rename = "glossy_gold")]
3358        GlossyGold,
3359        #[serde(rename = "glossy_white")]
3360        GlossyWhite,
3361        #[serde(rename = "gucci")]
3362        Gucci,
3363        #[serde(rename = "matt_gold")]
3364        MattGold,
3365        #[serde(rename = "rose")]
3366        Rose,
3367        #[serde(rename = "silver")]
3368        Silver,
3369        #[serde(rename = "stealth_black")]
3370        StealthBlack,
3371        #[serde(rename = "titanium")]
3372        Titanium,
3373        #[serde(rename = "titanium_and_gold")]
3374        TitaniumAndGold,
3375        #[serde(rename = "cloud")]
3376        Cloud,
3377        #[serde(rename = "petal")]
3378        Petal,
3379        #[serde(rename = "midnight")]
3380        Midnight,
3381        #[serde(rename = "tide")]
3382        Tide,
3383        #[serde(rename = "deep_rose")]
3384        DeepRose,
3385    }
3386
3387    impl ::std::fmt::Display for PublicRingColor {
3388        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3389            match *self {
3390                Self::BrushedSilver => f.write_str("brushed_silver"),
3391                Self::GlossyBlack => f.write_str("glossy_black"),
3392                Self::GlossyGold => f.write_str("glossy_gold"),
3393                Self::GlossyWhite => f.write_str("glossy_white"),
3394                Self::Gucci => f.write_str("gucci"),
3395                Self::MattGold => f.write_str("matt_gold"),
3396                Self::Rose => f.write_str("rose"),
3397                Self::Silver => f.write_str("silver"),
3398                Self::StealthBlack => f.write_str("stealth_black"),
3399                Self::Titanium => f.write_str("titanium"),
3400                Self::TitaniumAndGold => f.write_str("titanium_and_gold"),
3401                Self::Cloud => f.write_str("cloud"),
3402                Self::Petal => f.write_str("petal"),
3403                Self::Midnight => f.write_str("midnight"),
3404                Self::Tide => f.write_str("tide"),
3405                Self::DeepRose => f.write_str("deep_rose"),
3406            }
3407        }
3408    }
3409
3410    impl ::std::str::FromStr for PublicRingColor {
3411        type Err = self::error::ConversionError;
3412        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3413            match value {
3414                "brushed_silver" => Ok(Self::BrushedSilver),
3415                "glossy_black" => Ok(Self::GlossyBlack),
3416                "glossy_gold" => Ok(Self::GlossyGold),
3417                "glossy_white" => Ok(Self::GlossyWhite),
3418                "gucci" => Ok(Self::Gucci),
3419                "matt_gold" => Ok(Self::MattGold),
3420                "rose" => Ok(Self::Rose),
3421                "silver" => Ok(Self::Silver),
3422                "stealth_black" => Ok(Self::StealthBlack),
3423                "titanium" => Ok(Self::Titanium),
3424                "titanium_and_gold" => Ok(Self::TitaniumAndGold),
3425                "cloud" => Ok(Self::Cloud),
3426                "petal" => Ok(Self::Petal),
3427                "midnight" => Ok(Self::Midnight),
3428                "tide" => Ok(Self::Tide),
3429                "deep_rose" => Ok(Self::DeepRose),
3430                _ => Err("invalid value".into()),
3431            }
3432        }
3433    }
3434
3435    impl ::std::convert::TryFrom<&str> for PublicRingColor {
3436        type Error = self::error::ConversionError;
3437        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3438            value.parse()
3439        }
3440    }
3441
3442    impl ::std::convert::TryFrom<&::std::string::String> for PublicRingColor {
3443        type Error = self::error::ConversionError;
3444        fn try_from(
3445            value: &::std::string::String,
3446        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3447            value.parse()
3448        }
3449    }
3450
3451    impl ::std::convert::TryFrom<::std::string::String> for PublicRingColor {
3452        type Error = self::error::ConversionError;
3453        fn try_from(
3454            value: ::std::string::String,
3455        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3456            value.parse()
3457        }
3458    }
3459
3460    #[doc = "Ring configuration."]
3461    #[doc = r""]
3462    #[doc = r" <details><summary>JSON schema</summary>"]
3463    #[doc = r""]
3464    #[doc = r" ```json"]
3465    #[doc = "{"]
3466    #[doc = "  \"title\": \"PublicRingConfiguration\","]
3467    #[doc = "  \"description\": \"Ring configuration.\","]
3468    #[doc = "  \"type\": \"object\","]
3469    #[doc = "  \"required\": ["]
3470    #[doc = "    \"id\""]
3471    #[doc = "  ],"]
3472    #[doc = "  \"properties\": {"]
3473    #[doc = "    \"color\": {"]
3474    #[doc = "      \"title\": \"\","]
3475    #[doc = "      \"description\": \"Color of the ring.\","]
3476    #[doc = "      \"oneOf\": ["]
3477    #[doc = "        {"]
3478    #[doc = "          \"type\": \"null\""]
3479    #[doc = "        },"]
3480    #[doc = "        {"]
3481    #[doc = "          \"allOf\": ["]
3482    #[doc = "            {"]
3483    #[doc = "              \"$ref\": \"#/components/schemas/PublicRingColor\""]
3484    #[doc = "            }"]
3485    #[doc = "          ]"]
3486    #[doc = "        }"]
3487    #[doc = "      ]"]
3488    #[doc = "    },"]
3489    #[doc = "    \"design\": {"]
3490    #[doc = "      \"title\": \"\","]
3491    #[doc = "      \"description\": \"Design of the ring.\","]
3492    #[doc = "      \"oneOf\": ["]
3493    #[doc = "        {"]
3494    #[doc = "          \"type\": \"null\""]
3495    #[doc = "        },"]
3496    #[doc = "        {"]
3497    #[doc = "          \"allOf\": ["]
3498    #[doc = "            {"]
3499    #[doc = "              \"$ref\": \"#/components/schemas/PublicRingDesign\""]
3500    #[doc = "            }"]
3501    #[doc = "          ]"]
3502    #[doc = "        }"]
3503    #[doc = "      ]"]
3504    #[doc = "    },"]
3505    #[doc = "    \"firmware_version\": {"]
3506    #[doc = "      \"title\": \"\","]
3507    #[doc = "      \"description\": \"Firmware version of the ring.\","]
3508    #[doc = "      \"type\": ["]
3509    #[doc = "        \"string\","]
3510    #[doc = "        \"null\""]
3511    #[doc = "      ]"]
3512    #[doc = "    },"]
3513    #[doc = "    \"hardware_type\": {"]
3514    #[doc = "      \"title\": \"\","]
3515    #[doc = "      \"description\": \"Hardware type of the ring.\","]
3516    #[doc = "      \"oneOf\": ["]
3517    #[doc = "        {"]
3518    #[doc = "          \"type\": \"null\""]
3519    #[doc = "        },"]
3520    #[doc = "        {"]
3521    #[doc = "          \"allOf\": ["]
3522    #[doc = "            {"]
3523    #[doc = "              \"$ref\": \"#/components/schemas/PublicRingHardwareType\""]
3524    #[doc = "            }"]
3525    #[doc = "          ]"]
3526    #[doc = "        }"]
3527    #[doc = "      ]"]
3528    #[doc = "    },"]
3529    #[doc = "    \"id\": {"]
3530    #[doc = "      \"title\": \"\","]
3531    #[doc = "      \"description\": \"Unique identifier of the object.\","]
3532    #[doc = "      \"type\": \"string\","]
3533    #[doc = "      \"minLength\": 1"]
3534    #[doc = "    },"]
3535    #[doc = "    \"set_up_at\": {"]
3536    #[doc = "      \"title\": \"\","]
3537    #[doc = "      \"description\": \"UTC timestamp indicating when the ring was set up.\","]
3538    #[doc = "      \"oneOf\": ["]
3539    #[doc = "        {"]
3540    #[doc = "          \"type\": \"null\""]
3541    #[doc = "        },"]
3542    #[doc = "        {"]
3543    #[doc = "          \"allOf\": ["]
3544    #[doc = "            {"]
3545    #[doc = "              \"$ref\": \"#/components/schemas/UtcDateTime\""]
3546    #[doc = "            }"]
3547    #[doc = "          ]"]
3548    #[doc = "        }"]
3549    #[doc = "      ]"]
3550    #[doc = "    },"]
3551    #[doc = "    \"size\": {"]
3552    #[doc = "      \"title\": \"\","]
3553    #[doc = "      \"description\": \"US size of the ring.\","]
3554    #[doc = "      \"type\": ["]
3555    #[doc = "        \"integer\","]
3556    #[doc = "        \"null\""]
3557    #[doc = "      ]"]
3558    #[doc = "    }"]
3559    #[doc = "  },"]
3560    #[doc = "  \"x-cloud-only\": true,"]
3561    #[doc = "  \"x-collection\": \"publicringconfiguration\","]
3562    #[doc = "  \"x-owner\": \"connectivity-squad\""]
3563    #[doc = "}"]
3564    #[doc = r" ```"]
3565    #[doc = r" </details>"]
3566    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3567    pub struct PublicRingConfiguration {
3568        #[doc = "Color of the ring."]
3569        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3570        pub color: ::std::option::Option<PublicRingColor>,
3571        #[doc = "Design of the ring."]
3572        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3573        pub design: ::std::option::Option<PublicRingDesign>,
3574        #[doc = "Firmware version of the ring."]
3575        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3576        pub firmware_version: ::std::option::Option<::std::string::String>,
3577        #[doc = "Hardware type of the ring."]
3578        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3579        pub hardware_type: ::std::option::Option<PublicRingHardwareType>,
3580        #[doc = "Unique identifier of the object."]
3581        pub id: X,
3582        #[doc = "UTC timestamp indicating when the ring was set up."]
3583        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3584        pub set_up_at: ::std::option::Option<UtcDateTime>,
3585        #[doc = "US size of the ring."]
3586        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3587        pub size: ::std::option::Option<i64>,
3588    }
3589
3590    #[doc = "Possible ring designs."]
3591    #[doc = r""]
3592    #[doc = r" <details><summary>JSON schema</summary>"]
3593    #[doc = r""]
3594    #[doc = r" ```json"]
3595    #[doc = "{"]
3596    #[doc = "  \"title\": \"PublicRingDesign\","]
3597    #[doc = "  \"description\": \"Possible ring designs.\","]
3598    #[doc = "  \"type\": \"string\","]
3599    #[doc = "  \"enum\": ["]
3600    #[doc = "    \"heritage\","]
3601    #[doc = "    \"balance\","]
3602    #[doc = "    \"balance_diamond\","]
3603    #[doc = "    \"horizon\","]
3604    #[doc = "    \"ceramic\""]
3605    #[doc = "  ]"]
3606    #[doc = "}"]
3607    #[doc = r" ```"]
3608    #[doc = r" </details>"]
3609    #[derive(
3610        :: serde :: Deserialize,
3611        :: serde :: Serialize,
3612        Clone,
3613        Copy,
3614        Debug,
3615        Eq,
3616        Hash,
3617        Ord,
3618        PartialEq,
3619        PartialOrd,
3620    )]
3621    pub enum PublicRingDesign {
3622        #[serde(rename = "heritage")]
3623        Heritage,
3624        #[serde(rename = "balance")]
3625        Balance,
3626        #[serde(rename = "balance_diamond")]
3627        BalanceDiamond,
3628        #[serde(rename = "horizon")]
3629        Horizon,
3630        #[serde(rename = "ceramic")]
3631        Ceramic,
3632    }
3633
3634    impl ::std::fmt::Display for PublicRingDesign {
3635        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3636            match *self {
3637                Self::Heritage => f.write_str("heritage"),
3638                Self::Balance => f.write_str("balance"),
3639                Self::BalanceDiamond => f.write_str("balance_diamond"),
3640                Self::Horizon => f.write_str("horizon"),
3641                Self::Ceramic => f.write_str("ceramic"),
3642            }
3643        }
3644    }
3645
3646    impl ::std::str::FromStr for PublicRingDesign {
3647        type Err = self::error::ConversionError;
3648        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3649            match value {
3650                "heritage" => Ok(Self::Heritage),
3651                "balance" => Ok(Self::Balance),
3652                "balance_diamond" => Ok(Self::BalanceDiamond),
3653                "horizon" => Ok(Self::Horizon),
3654                "ceramic" => Ok(Self::Ceramic),
3655                _ => Err("invalid value".into()),
3656            }
3657        }
3658    }
3659
3660    impl ::std::convert::TryFrom<&str> for PublicRingDesign {
3661        type Error = self::error::ConversionError;
3662        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3663            value.parse()
3664        }
3665    }
3666
3667    impl ::std::convert::TryFrom<&::std::string::String> for PublicRingDesign {
3668        type Error = self::error::ConversionError;
3669        fn try_from(
3670            value: &::std::string::String,
3671        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3672            value.parse()
3673        }
3674    }
3675
3676    impl ::std::convert::TryFrom<::std::string::String> for PublicRingDesign {
3677        type Error = self::error::ConversionError;
3678        fn try_from(
3679            value: ::std::string::String,
3680        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3681            value.parse()
3682        }
3683    }
3684
3685    #[doc = "Possible ring hardware types."]
3686    #[doc = r""]
3687    #[doc = r" <details><summary>JSON schema</summary>"]
3688    #[doc = r""]
3689    #[doc = r" ```json"]
3690    #[doc = "{"]
3691    #[doc = "  \"title\": \"PublicRingHardwareType\","]
3692    #[doc = "  \"description\": \"Possible ring hardware types.\","]
3693    #[doc = "  \"type\": \"string\","]
3694    #[doc = "  \"enum\": ["]
3695    #[doc = "    \"gen1\","]
3696    #[doc = "    \"gen2\","]
3697    #[doc = "    \"gen2m\","]
3698    #[doc = "    \"gen3\","]
3699    #[doc = "    \"gen4\","]
3700    #[doc = "    \"or5\""]
3701    #[doc = "  ]"]
3702    #[doc = "}"]
3703    #[doc = r" ```"]
3704    #[doc = r" </details>"]
3705    #[derive(
3706        :: serde :: Deserialize,
3707        :: serde :: Serialize,
3708        Clone,
3709        Copy,
3710        Debug,
3711        Eq,
3712        Hash,
3713        Ord,
3714        PartialEq,
3715        PartialOrd,
3716    )]
3717    pub enum PublicRingHardwareType {
3718        #[serde(rename = "gen1")]
3719        Gen1,
3720        #[serde(rename = "gen2")]
3721        Gen2,
3722        #[serde(rename = "gen2m")]
3723        Gen2m,
3724        #[serde(rename = "gen3")]
3725        Gen3,
3726        #[serde(rename = "gen4")]
3727        Gen4,
3728        #[serde(rename = "or5")]
3729        Or5,
3730    }
3731
3732    impl ::std::fmt::Display for PublicRingHardwareType {
3733        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3734            match *self {
3735                Self::Gen1 => f.write_str("gen1"),
3736                Self::Gen2 => f.write_str("gen2"),
3737                Self::Gen2m => f.write_str("gen2m"),
3738                Self::Gen3 => f.write_str("gen3"),
3739                Self::Gen4 => f.write_str("gen4"),
3740                Self::Or5 => f.write_str("or5"),
3741            }
3742        }
3743    }
3744
3745    impl ::std::str::FromStr for PublicRingHardwareType {
3746        type Err = self::error::ConversionError;
3747        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3748            match value {
3749                "gen1" => Ok(Self::Gen1),
3750                "gen2" => Ok(Self::Gen2),
3751                "gen2m" => Ok(Self::Gen2m),
3752                "gen3" => Ok(Self::Gen3),
3753                "gen4" => Ok(Self::Gen4),
3754                "or5" => Ok(Self::Or5),
3755                _ => Err("invalid value".into()),
3756            }
3757        }
3758    }
3759
3760    impl ::std::convert::TryFrom<&str> for PublicRingHardwareType {
3761        type Error = self::error::ConversionError;
3762        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3763            value.parse()
3764        }
3765    }
3766
3767    impl ::std::convert::TryFrom<&::std::string::String> for PublicRingHardwareType {
3768        type Error = self::error::ConversionError;
3769        fn try_from(
3770            value: &::std::string::String,
3771        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3772            value.parse()
3773        }
3774    }
3775
3776    impl ::std::convert::TryFrom<::std::string::String> for PublicRingHardwareType {
3777        type Error = self::error::ConversionError;
3778        fn try_from(
3779            value: ::std::string::String,
3780        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3781            value.parse()
3782        }
3783    }
3784
3785    #[doc = "Object defining a recorded sample."]
3786    #[doc = r""]
3787    #[doc = r" <details><summary>JSON schema</summary>"]
3788    #[doc = r""]
3789    #[doc = r" ```json"]
3790    #[doc = "{"]
3791    #[doc = "  \"title\": \"PublicSample\","]
3792    #[doc = "  \"description\": \"Object defining a recorded sample.\","]
3793    #[doc = "  \"type\": \"object\","]
3794    #[doc = "  \"required\": ["]
3795    #[doc = "    \"interval\","]
3796    #[doc = "    \"items\","]
3797    #[doc = "    \"timestamp\""]
3798    #[doc = "  ],"]
3799    #[doc = "  \"properties\": {"]
3800    #[doc = "    \"interval\": {"]
3801    #[doc = "      \"title\": \"\","]
3802    #[doc = "      \"description\": \"Interval in seconds between the sampled items.\","]
3803    #[doc = "      \"type\": \"number\""]
3804    #[doc = "    },"]
3805    #[doc = "    \"items\": {"]
3806    #[doc = "      \"$ref\": \"#/components/schemas/Array_Union_float__NoneType__Bits64_\""]
3807    #[doc = "    },"]
3808    #[doc = "    \"timestamp\": {"]
3809    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
3810    #[doc = "    }"]
3811    #[doc = "  }"]
3812    #[doc = "}"]
3813    #[doc = r" ```"]
3814    #[doc = r" </details>"]
3815    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3816    pub struct PublicSample {
3817        #[doc = "Interval in seconds between the sampled items."]
3818        pub interval: f64,
3819        pub items: ArrayUnionFloatNoneTypeBits64,
3820        pub timestamp: LocalizedDateTime,
3821    }
3822
3823    #[doc = "Public model defining a recorded Session."]
3824    #[doc = r""]
3825    #[doc = r" <details><summary>JSON schema</summary>"]
3826    #[doc = r""]
3827    #[doc = r" ```json"]
3828    #[doc = "{"]
3829    #[doc = "  \"title\": \"PublicSession\","]
3830    #[doc = "  \"description\": \"Public model defining a recorded Session.\","]
3831    #[doc = "  \"type\": \"object\","]
3832    #[doc = "  \"required\": ["]
3833    #[doc = "    \"day\","]
3834    #[doc = "    \"end_datetime\","]
3835    #[doc = "    \"id\","]
3836    #[doc = "    \"start_datetime\","]
3837    #[doc = "    \"type\""]
3838    #[doc = "  ],"]
3839    #[doc = "  \"properties\": {"]
3840    #[doc = "    \"day\": {"]
3841    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
3842    #[doc = "    },"]
3843    #[doc = "    \"end_datetime\": {"]
3844    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
3845    #[doc = "    },"]
3846    #[doc = "    \"heart_rate\": {"]
3847    #[doc = "      \"title\": \"\","]
3848    #[doc = "      \"description\": \"Recorded heart rate samples during the Moment.\","]
3849    #[doc = "      \"oneOf\": ["]
3850    #[doc = "        {"]
3851    #[doc = "          \"type\": \"null\""]
3852    #[doc = "        },"]
3853    #[doc = "        {"]
3854    #[doc = "          \"allOf\": ["]
3855    #[doc = "            {"]
3856    #[doc = "              \"$ref\": \"#/components/schemas/PublicSample\""]
3857    #[doc = "            }"]
3858    #[doc = "          ]"]
3859    #[doc = "        }"]
3860    #[doc = "      ]"]
3861    #[doc = "    },"]
3862    #[doc = "    \"heart_rate_variability\": {"]
3863    #[doc = "      \"title\": \"\","]
3864    #[doc = "      \"description\": \"Recorded heart rate variability samples during the Moment.\","]
3865    #[doc = "      \"oneOf\": ["]
3866    #[doc = "        {"]
3867    #[doc = "          \"type\": \"null\""]
3868    #[doc = "        },"]
3869    #[doc = "        {"]
3870    #[doc = "          \"allOf\": ["]
3871    #[doc = "            {"]
3872    #[doc = "              \"$ref\": \"#/components/schemas/PublicSample\""]
3873    #[doc = "            }"]
3874    #[doc = "          ]"]
3875    #[doc = "        }"]
3876    #[doc = "      ]"]
3877    #[doc = "    },"]
3878    #[doc = "    \"id\": {"]
3879    #[doc = "      \"title\": \"\","]
3880    #[doc = "      \"description\": \"Unique identifier of the object.\","]
3881    #[doc = "      \"type\": \"string\","]
3882    #[doc = "      \"minLength\": 1"]
3883    #[doc = "    },"]
3884    #[doc = "    \"mood\": {"]
3885    #[doc = "      \"title\": \"\","]
3886    #[doc = "      \"description\": \"User-selected mood for the Moment.\","]
3887    #[doc = "      \"oneOf\": ["]
3888    #[doc = "        {"]
3889    #[doc = "          \"type\": \"null\""]
3890    #[doc = "        },"]
3891    #[doc = "        {"]
3892    #[doc = "          \"allOf\": ["]
3893    #[doc = "            {"]
3894    #[doc = "              \"$ref\": \"#/components/schemas/PublicMomentMood\""]
3895    #[doc = "            }"]
3896    #[doc = "          ]"]
3897    #[doc = "        }"]
3898    #[doc = "      ]"]
3899    #[doc = "    },"]
3900    #[doc = "    \"motion_count\": {"]
3901    #[doc = "      \"title\": \"\","]
3902    #[doc = "      \"description\": \"Recorded motion count samples during the Moment.\","]
3903    #[doc = "      \"oneOf\": ["]
3904    #[doc = "        {"]
3905    #[doc = "          \"type\": \"null\""]
3906    #[doc = "        },"]
3907    #[doc = "        {"]
3908    #[doc = "          \"allOf\": ["]
3909    #[doc = "            {"]
3910    #[doc = "              \"$ref\": \"#/components/schemas/PublicSample\""]
3911    #[doc = "            }"]
3912    #[doc = "          ]"]
3913    #[doc = "        }"]
3914    #[doc = "      ]"]
3915    #[doc = "    },"]
3916    #[doc = "    \"start_datetime\": {"]
3917    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
3918    #[doc = "    },"]
3919    #[doc = "    \"type\": {"]
3920    #[doc = "      \"$ref\": \"#/components/schemas/PublicMomentType\""]
3921    #[doc = "    }"]
3922    #[doc = "  },"]
3923    #[doc = "  \"x-cloud-only\": true,"]
3924    #[doc = "  \"x-collection\": \"publicsession\","]
3925    #[doc = "  \"x-owner\": \"wellbeing-squad\""]
3926    #[doc = "}"]
3927    #[doc = r" ```"]
3928    #[doc = r" </details>"]
3929    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3930    pub struct PublicSession {
3931        pub day: IsoDate,
3932        pub end_datetime: LocalizedDateTime,
3933        #[doc = "Recorded heart rate samples during the Moment."]
3934        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3935        pub heart_rate: ::std::option::Option<PublicSample>,
3936        #[doc = "Recorded heart rate variability samples during the Moment."]
3937        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3938        pub heart_rate_variability: ::std::option::Option<PublicSample>,
3939        #[doc = "Unique identifier of the object."]
3940        pub id: X,
3941        #[doc = "User-selected mood for the Moment."]
3942        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3943        pub mood: ::std::option::Option<PublicMomentMood>,
3944        #[doc = "Recorded motion count samples during the Moment."]
3945        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3946        pub motion_count: ::std::option::Option<PublicSample>,
3947        pub start_datetime: LocalizedDateTime,
3948        #[serde(rename = "type")]
3949        pub type_: PublicMomentType,
3950    }
3951
3952    #[doc = "Oura Sleep Staging Algorithms.\nv1 = original aka legacy aka OSSA 1.0,\nv2 = latest sleep algorithm"]
3953    #[doc = r""]
3954    #[doc = r" <details><summary>JSON schema</summary>"]
3955    #[doc = r""]
3956    #[doc = r" ```json"]
3957    #[doc = "{"]
3958    #[doc = "  \"title\": \"PublicSleepAlgorithmVersion\","]
3959    #[doc = "  \"description\": \"Oura Sleep Staging Algorithms.\\nv1 = original aka legacy aka OSSA 1.0,\\nv2 = latest sleep algorithm\","]
3960    #[doc = "  \"type\": \"string\","]
3961    #[doc = "  \"enum\": ["]
3962    #[doc = "    \"v1\","]
3963    #[doc = "    \"v2\""]
3964    #[doc = "  ]"]
3965    #[doc = "}"]
3966    #[doc = r" ```"]
3967    #[doc = r" </details>"]
3968    #[derive(
3969        :: serde :: Deserialize,
3970        :: serde :: Serialize,
3971        Clone,
3972        Copy,
3973        Debug,
3974        Eq,
3975        Hash,
3976        Ord,
3977        PartialEq,
3978        PartialOrd,
3979    )]
3980    pub enum PublicSleepAlgorithmVersion {
3981        #[serde(rename = "v1")]
3982        V1,
3983        #[serde(rename = "v2")]
3984        V2,
3985    }
3986
3987    impl ::std::fmt::Display for PublicSleepAlgorithmVersion {
3988        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3989            match *self {
3990                Self::V1 => f.write_str("v1"),
3991                Self::V2 => f.write_str("v2"),
3992            }
3993        }
3994    }
3995
3996    impl ::std::str::FromStr for PublicSleepAlgorithmVersion {
3997        type Err = self::error::ConversionError;
3998        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3999            match value {
4000                "v1" => Ok(Self::V1),
4001                "v2" => Ok(Self::V2),
4002                _ => Err("invalid value".into()),
4003            }
4004        }
4005    }
4006
4007    impl ::std::convert::TryFrom<&str> for PublicSleepAlgorithmVersion {
4008        type Error = self::error::ConversionError;
4009        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4010            value.parse()
4011        }
4012    }
4013
4014    impl ::std::convert::TryFrom<&::std::string::String> for PublicSleepAlgorithmVersion {
4015        type Error = self::error::ConversionError;
4016        fn try_from(
4017            value: &::std::string::String,
4018        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4019            value.parse()
4020        }
4021    }
4022
4023    impl ::std::convert::TryFrom<::std::string::String> for PublicSleepAlgorithmVersion {
4024        type Error = self::error::ConversionError;
4025        fn try_from(
4026            value: ::std::string::String,
4027        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4028            value.parse()
4029        }
4030    }
4031
4032    #[doc = "Possible sleep analysis reasons."]
4033    #[doc = r""]
4034    #[doc = r" <details><summary>JSON schema</summary>"]
4035    #[doc = r""]
4036    #[doc = r" ```json"]
4037    #[doc = "{"]
4038    #[doc = "  \"title\": \"PublicSleepAnalysisReason\","]
4039    #[doc = "  \"description\": \"Possible sleep analysis reasons.\","]
4040    #[doc = "  \"type\": \"string\","]
4041    #[doc = "  \"enum\": ["]
4042    #[doc = "    \"foreground_sleep_analysis\","]
4043    #[doc = "    \"bedtime_edit\","]
4044    #[doc = "    \"background_sleep_analysis\","]
4045    #[doc = "    \"background_created_foreground_updated\""]
4046    #[doc = "  ]"]
4047    #[doc = "}"]
4048    #[doc = r" ```"]
4049    #[doc = r" </details>"]
4050    #[derive(
4051        :: serde :: Deserialize,
4052        :: serde :: Serialize,
4053        Clone,
4054        Copy,
4055        Debug,
4056        Eq,
4057        Hash,
4058        Ord,
4059        PartialEq,
4060        PartialOrd,
4061    )]
4062    pub enum PublicSleepAnalysisReason {
4063        #[serde(rename = "foreground_sleep_analysis")]
4064        ForegroundSleepAnalysis,
4065        #[serde(rename = "bedtime_edit")]
4066        BedtimeEdit,
4067        #[serde(rename = "background_sleep_analysis")]
4068        BackgroundSleepAnalysis,
4069        #[serde(rename = "background_created_foreground_updated")]
4070        BackgroundCreatedForegroundUpdated,
4071    }
4072
4073    impl ::std::fmt::Display for PublicSleepAnalysisReason {
4074        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4075            match *self {
4076                Self::ForegroundSleepAnalysis => f.write_str("foreground_sleep_analysis"),
4077                Self::BedtimeEdit => f.write_str("bedtime_edit"),
4078                Self::BackgroundSleepAnalysis => f.write_str("background_sleep_analysis"),
4079                Self::BackgroundCreatedForegroundUpdated => {
4080                    f.write_str("background_created_foreground_updated")
4081                }
4082            }
4083        }
4084    }
4085
4086    impl ::std::str::FromStr for PublicSleepAnalysisReason {
4087        type Err = self::error::ConversionError;
4088        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4089            match value {
4090                "foreground_sleep_analysis" => Ok(Self::ForegroundSleepAnalysis),
4091                "bedtime_edit" => Ok(Self::BedtimeEdit),
4092                "background_sleep_analysis" => Ok(Self::BackgroundSleepAnalysis),
4093                "background_created_foreground_updated" => {
4094                    Ok(Self::BackgroundCreatedForegroundUpdated)
4095                }
4096                _ => Err("invalid value".into()),
4097            }
4098        }
4099    }
4100
4101    impl ::std::convert::TryFrom<&str> for PublicSleepAnalysisReason {
4102        type Error = self::error::ConversionError;
4103        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4104            value.parse()
4105        }
4106    }
4107
4108    impl ::std::convert::TryFrom<&::std::string::String> for PublicSleepAnalysisReason {
4109        type Error = self::error::ConversionError;
4110        fn try_from(
4111            value: &::std::string::String,
4112        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4113            value.parse()
4114        }
4115    }
4116
4117    impl ::std::convert::TryFrom<::std::string::String> for PublicSleepAnalysisReason {
4118        type Error = self::error::ConversionError;
4119        fn try_from(
4120            value: ::std::string::String,
4121        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4122            value.parse()
4123        }
4124    }
4125
4126    #[doc = "Object defining sleep score contributors."]
4127    #[doc = r""]
4128    #[doc = r" <details><summary>JSON schema</summary>"]
4129    #[doc = r""]
4130    #[doc = r" ```json"]
4131    #[doc = "{"]
4132    #[doc = "  \"title\": \"PublicSleepContributors\","]
4133    #[doc = "  \"description\": \"Object defining sleep score contributors.\","]
4134    #[doc = "  \"type\": \"object\","]
4135    #[doc = "  \"properties\": {"]
4136    #[doc = "    \"deep_sleep\": {"]
4137    #[doc = "      \"title\": \"\","]
4138    #[doc = "      \"description\": \"Contribution of deep sleep in range [1, 100].\","]
4139    #[doc = "      \"type\": ["]
4140    #[doc = "        \"integer\","]
4141    #[doc = "        \"null\""]
4142    #[doc = "      ]"]
4143    #[doc = "    },"]
4144    #[doc = "    \"efficiency\": {"]
4145    #[doc = "      \"title\": \"\","]
4146    #[doc = "      \"description\": \"Contribution of sleep efficiency in range [1, 100].\","]
4147    #[doc = "      \"type\": ["]
4148    #[doc = "        \"integer\","]
4149    #[doc = "        \"null\""]
4150    #[doc = "      ]"]
4151    #[doc = "    },"]
4152    #[doc = "    \"latency\": {"]
4153    #[doc = "      \"title\": \"\","]
4154    #[doc = "      \"description\": \"Contribution of sleep latency in range [1, 100].\","]
4155    #[doc = "      \"type\": ["]
4156    #[doc = "        \"integer\","]
4157    #[doc = "        \"null\""]
4158    #[doc = "      ]"]
4159    #[doc = "    },"]
4160    #[doc = "    \"rem_sleep\": {"]
4161    #[doc = "      \"title\": \"\","]
4162    #[doc = "      \"description\": \"Contribution of REM sleep in range [1, 100].\","]
4163    #[doc = "      \"type\": ["]
4164    #[doc = "        \"integer\","]
4165    #[doc = "        \"null\""]
4166    #[doc = "      ]"]
4167    #[doc = "    },"]
4168    #[doc = "    \"restfulness\": {"]
4169    #[doc = "      \"title\": \"\","]
4170    #[doc = "      \"description\": \"Contribution of sleep restfulness in range [1, 100].\","]
4171    #[doc = "      \"type\": ["]
4172    #[doc = "        \"integer\","]
4173    #[doc = "        \"null\""]
4174    #[doc = "      ]"]
4175    #[doc = "    },"]
4176    #[doc = "    \"timing\": {"]
4177    #[doc = "      \"title\": \"\","]
4178    #[doc = "      \"description\": \"Contribution of sleep timing in range [1, 100].\","]
4179    #[doc = "      \"type\": ["]
4180    #[doc = "        \"integer\","]
4181    #[doc = "        \"null\""]
4182    #[doc = "      ]"]
4183    #[doc = "    },"]
4184    #[doc = "    \"total_sleep\": {"]
4185    #[doc = "      \"title\": \"\","]
4186    #[doc = "      \"description\": \"Contribution of total sleep in range [1, 100].\","]
4187    #[doc = "      \"type\": ["]
4188    #[doc = "        \"integer\","]
4189    #[doc = "        \"null\""]
4190    #[doc = "      ]"]
4191    #[doc = "    }"]
4192    #[doc = "  }"]
4193    #[doc = "}"]
4194    #[doc = r" ```"]
4195    #[doc = r" </details>"]
4196    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4197    pub struct PublicSleepContributors {
4198        #[doc = "Contribution of deep sleep in range [1, 100]."]
4199        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4200        pub deep_sleep: ::std::option::Option<i64>,
4201        #[doc = "Contribution of sleep efficiency in range [1, 100]."]
4202        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4203        pub efficiency: ::std::option::Option<i64>,
4204        #[doc = "Contribution of sleep latency in range [1, 100]."]
4205        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4206        pub latency: ::std::option::Option<i64>,
4207        #[doc = "Contribution of REM sleep in range [1, 100]."]
4208        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4209        pub rem_sleep: ::std::option::Option<i64>,
4210        #[doc = "Contribution of sleep restfulness in range [1, 100]."]
4211        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4212        pub restfulness: ::std::option::Option<i64>,
4213        #[doc = "Contribution of sleep timing in range [1, 100]."]
4214        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4215        pub timing: ::std::option::Option<i64>,
4216        #[doc = "Contribution of total sleep in range [1, 100]."]
4217        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4218        pub total_sleep: ::std::option::Option<i64>,
4219    }
4220
4221    impl ::std::default::Default for PublicSleepContributors {
4222        fn default() -> Self {
4223            Self {
4224                deep_sleep: Default::default(),
4225                efficiency: Default::default(),
4226                latency: Default::default(),
4227                rem_sleep: Default::default(),
4228                restfulness: Default::default(),
4229                timing: Default::default(),
4230                total_sleep: Default::default(),
4231            }
4232        }
4233    }
4234
4235    #[doc = "Suggested bedtime for the user."]
4236    #[doc = r""]
4237    #[doc = r" <details><summary>JSON schema</summary>"]
4238    #[doc = r""]
4239    #[doc = r" ```json"]
4240    #[doc = "{"]
4241    #[doc = "  \"title\": \"PublicSleepTime\","]
4242    #[doc = "  \"description\": \"Suggested bedtime for the user.\","]
4243    #[doc = "  \"type\": \"object\","]
4244    #[doc = "  \"required\": ["]
4245    #[doc = "    \"day\","]
4246    #[doc = "    \"id\""]
4247    #[doc = "  ],"]
4248    #[doc = "  \"properties\": {"]
4249    #[doc = "    \"day\": {"]
4250    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
4251    #[doc = "    },"]
4252    #[doc = "    \"id\": {"]
4253    #[doc = "      \"title\": \"\","]
4254    #[doc = "      \"description\": \"Unique identifier of the object.\","]
4255    #[doc = "      \"type\": \"string\","]
4256    #[doc = "      \"minLength\": 1"]
4257    #[doc = "    },"]
4258    #[doc = "    \"optimal_bedtime\": {"]
4259    #[doc = "      \"title\": \"\","]
4260    #[doc = "      \"description\": \"Optimal bedtime.\","]
4261    #[doc = "      \"oneOf\": ["]
4262    #[doc = "        {"]
4263    #[doc = "          \"type\": \"null\""]
4264    #[doc = "        },"]
4265    #[doc = "        {"]
4266    #[doc = "          \"allOf\": ["]
4267    #[doc = "            {"]
4268    #[doc = "              \"$ref\": \"#/components/schemas/PublicSleepTimeWindow\""]
4269    #[doc = "            }"]
4270    #[doc = "          ]"]
4271    #[doc = "        }"]
4272    #[doc = "      ]"]
4273    #[doc = "    },"]
4274    #[doc = "    \"recommendation\": {"]
4275    #[doc = "      \"title\": \"\","]
4276    #[doc = "      \"description\": \"Recommended action for bedtime.\","]
4277    #[doc = "      \"oneOf\": ["]
4278    #[doc = "        {"]
4279    #[doc = "          \"type\": \"null\""]
4280    #[doc = "        },"]
4281    #[doc = "        {"]
4282    #[doc = "          \"allOf\": ["]
4283    #[doc = "            {"]
4284    #[doc = "              \"$ref\": \"#/components/schemas/PublicSleepTimeRecommendation\""]
4285    #[doc = "            }"]
4286    #[doc = "          ]"]
4287    #[doc = "        }"]
4288    #[doc = "      ]"]
4289    #[doc = "    },"]
4290    #[doc = "    \"status\": {"]
4291    #[doc = "      \"title\": \"\","]
4292    #[doc = "      \"description\": \"Sleep time status; used to inform sleep time recommendation.\","]
4293    #[doc = "      \"oneOf\": ["]
4294    #[doc = "        {"]
4295    #[doc = "          \"type\": \"null\""]
4296    #[doc = "        },"]
4297    #[doc = "        {"]
4298    #[doc = "          \"allOf\": ["]
4299    #[doc = "            {"]
4300    #[doc = "              \"$ref\": \"#/components/schemas/PublicSleepTimeStatus\""]
4301    #[doc = "            }"]
4302    #[doc = "          ]"]
4303    #[doc = "        }"]
4304    #[doc = "      ]"]
4305    #[doc = "    }"]
4306    #[doc = "  },"]
4307    #[doc = "  \"x-cloud-only\": true,"]
4308    #[doc = "  \"x-collection\": \"publicsleeptime\","]
4309    #[doc = "  \"x-owner\": \"sleep-squad\""]
4310    #[doc = "}"]
4311    #[doc = r" ```"]
4312    #[doc = r" </details>"]
4313    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4314    pub struct PublicSleepTime {
4315        pub day: IsoDate,
4316        #[doc = "Unique identifier of the object."]
4317        pub id: X,
4318        #[doc = "Optimal bedtime."]
4319        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4320        pub optimal_bedtime: ::std::option::Option<PublicSleepTimeWindow>,
4321        #[doc = "Recommended action for bedtime."]
4322        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4323        pub recommendation: ::std::option::Option<PublicSleepTimeRecommendation>,
4324        #[doc = "Sleep time status; used to inform sleep time recommendation."]
4325        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4326        pub status: ::std::option::Option<PublicSleepTimeStatus>,
4327    }
4328
4329    #[doc = "Possible public SleepTime recommendation."]
4330    #[doc = r""]
4331    #[doc = r" <details><summary>JSON schema</summary>"]
4332    #[doc = r""]
4333    #[doc = r" ```json"]
4334    #[doc = "{"]
4335    #[doc = "  \"title\": \"PublicSleepTimeRecommendation\","]
4336    #[doc = "  \"description\": \"Possible public SleepTime recommendation.\","]
4337    #[doc = "  \"type\": \"string\","]
4338    #[doc = "  \"enum\": ["]
4339    #[doc = "    \"improve_efficiency\","]
4340    #[doc = "    \"earlier_bedtime\","]
4341    #[doc = "    \"later_bedtime\","]
4342    #[doc = "    \"earlier_wake_up_time\","]
4343    #[doc = "    \"later_wake_up_time\","]
4344    #[doc = "    \"follow_optimal_bedtime\""]
4345    #[doc = "  ]"]
4346    #[doc = "}"]
4347    #[doc = r" ```"]
4348    #[doc = r" </details>"]
4349    #[derive(
4350        :: serde :: Deserialize,
4351        :: serde :: Serialize,
4352        Clone,
4353        Copy,
4354        Debug,
4355        Eq,
4356        Hash,
4357        Ord,
4358        PartialEq,
4359        PartialOrd,
4360    )]
4361    pub enum PublicSleepTimeRecommendation {
4362        #[serde(rename = "improve_efficiency")]
4363        ImproveEfficiency,
4364        #[serde(rename = "earlier_bedtime")]
4365        EarlierBedtime,
4366        #[serde(rename = "later_bedtime")]
4367        LaterBedtime,
4368        #[serde(rename = "earlier_wake_up_time")]
4369        EarlierWakeUpTime,
4370        #[serde(rename = "later_wake_up_time")]
4371        LaterWakeUpTime,
4372        #[serde(rename = "follow_optimal_bedtime")]
4373        FollowOptimalBedtime,
4374    }
4375
4376    impl ::std::fmt::Display for PublicSleepTimeRecommendation {
4377        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4378            match *self {
4379                Self::ImproveEfficiency => f.write_str("improve_efficiency"),
4380                Self::EarlierBedtime => f.write_str("earlier_bedtime"),
4381                Self::LaterBedtime => f.write_str("later_bedtime"),
4382                Self::EarlierWakeUpTime => f.write_str("earlier_wake_up_time"),
4383                Self::LaterWakeUpTime => f.write_str("later_wake_up_time"),
4384                Self::FollowOptimalBedtime => f.write_str("follow_optimal_bedtime"),
4385            }
4386        }
4387    }
4388
4389    impl ::std::str::FromStr for PublicSleepTimeRecommendation {
4390        type Err = self::error::ConversionError;
4391        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4392            match value {
4393                "improve_efficiency" => Ok(Self::ImproveEfficiency),
4394                "earlier_bedtime" => Ok(Self::EarlierBedtime),
4395                "later_bedtime" => Ok(Self::LaterBedtime),
4396                "earlier_wake_up_time" => Ok(Self::EarlierWakeUpTime),
4397                "later_wake_up_time" => Ok(Self::LaterWakeUpTime),
4398                "follow_optimal_bedtime" => Ok(Self::FollowOptimalBedtime),
4399                _ => Err("invalid value".into()),
4400            }
4401        }
4402    }
4403
4404    impl ::std::convert::TryFrom<&str> for PublicSleepTimeRecommendation {
4405        type Error = self::error::ConversionError;
4406        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4407            value.parse()
4408        }
4409    }
4410
4411    impl ::std::convert::TryFrom<&::std::string::String> for PublicSleepTimeRecommendation {
4412        type Error = self::error::ConversionError;
4413        fn try_from(
4414            value: &::std::string::String,
4415        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4416            value.parse()
4417        }
4418    }
4419
4420    impl ::std::convert::TryFrom<::std::string::String> for PublicSleepTimeRecommendation {
4421        type Error = self::error::ConversionError;
4422        fn try_from(
4423            value: ::std::string::String,
4424        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4425            value.parse()
4426        }
4427    }
4428
4429    #[doc = "Possible public SleepTime status."]
4430    #[doc = r""]
4431    #[doc = r" <details><summary>JSON schema</summary>"]
4432    #[doc = r""]
4433    #[doc = r" ```json"]
4434    #[doc = "{"]
4435    #[doc = "  \"title\": \"PublicSleepTimeStatus\","]
4436    #[doc = "  \"description\": \"Possible public SleepTime status.\","]
4437    #[doc = "  \"type\": \"string\","]
4438    #[doc = "  \"enum\": ["]
4439    #[doc = "    \"not_enough_nights\","]
4440    #[doc = "    \"not_enough_recent_nights\","]
4441    #[doc = "    \"bad_sleep_quality\","]
4442    #[doc = "    \"only_recommended_found\","]
4443    #[doc = "    \"optimal_found\""]
4444    #[doc = "  ]"]
4445    #[doc = "}"]
4446    #[doc = r" ```"]
4447    #[doc = r" </details>"]
4448    #[derive(
4449        :: serde :: Deserialize,
4450        :: serde :: Serialize,
4451        Clone,
4452        Copy,
4453        Debug,
4454        Eq,
4455        Hash,
4456        Ord,
4457        PartialEq,
4458        PartialOrd,
4459    )]
4460    pub enum PublicSleepTimeStatus {
4461        #[serde(rename = "not_enough_nights")]
4462        NotEnoughNights,
4463        #[serde(rename = "not_enough_recent_nights")]
4464        NotEnoughRecentNights,
4465        #[serde(rename = "bad_sleep_quality")]
4466        BadSleepQuality,
4467        #[serde(rename = "only_recommended_found")]
4468        OnlyRecommendedFound,
4469        #[serde(rename = "optimal_found")]
4470        OptimalFound,
4471    }
4472
4473    impl ::std::fmt::Display for PublicSleepTimeStatus {
4474        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4475            match *self {
4476                Self::NotEnoughNights => f.write_str("not_enough_nights"),
4477                Self::NotEnoughRecentNights => f.write_str("not_enough_recent_nights"),
4478                Self::BadSleepQuality => f.write_str("bad_sleep_quality"),
4479                Self::OnlyRecommendedFound => f.write_str("only_recommended_found"),
4480                Self::OptimalFound => f.write_str("optimal_found"),
4481            }
4482        }
4483    }
4484
4485    impl ::std::str::FromStr for PublicSleepTimeStatus {
4486        type Err = self::error::ConversionError;
4487        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4488            match value {
4489                "not_enough_nights" => Ok(Self::NotEnoughNights),
4490                "not_enough_recent_nights" => Ok(Self::NotEnoughRecentNights),
4491                "bad_sleep_quality" => Ok(Self::BadSleepQuality),
4492                "only_recommended_found" => Ok(Self::OnlyRecommendedFound),
4493                "optimal_found" => Ok(Self::OptimalFound),
4494                _ => Err("invalid value".into()),
4495            }
4496        }
4497    }
4498
4499    impl ::std::convert::TryFrom<&str> for PublicSleepTimeStatus {
4500        type Error = self::error::ConversionError;
4501        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4502            value.parse()
4503        }
4504    }
4505
4506    impl ::std::convert::TryFrom<&::std::string::String> for PublicSleepTimeStatus {
4507        type Error = self::error::ConversionError;
4508        fn try_from(
4509            value: &::std::string::String,
4510        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4511            value.parse()
4512        }
4513    }
4514
4515    impl ::std::convert::TryFrom<::std::string::String> for PublicSleepTimeStatus {
4516        type Error = self::error::ConversionError;
4517        fn try_from(
4518            value: ::std::string::String,
4519        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4520            value.parse()
4521        }
4522    }
4523
4524    #[doc = "Object defining sleep time window"]
4525    #[doc = r""]
4526    #[doc = r" <details><summary>JSON schema</summary>"]
4527    #[doc = r""]
4528    #[doc = r" ```json"]
4529    #[doc = "{"]
4530    #[doc = "  \"title\": \"PublicSleepTimeWindow\","]
4531    #[doc = "  \"description\": \"Object defining sleep time window\","]
4532    #[doc = "  \"type\": \"object\","]
4533    #[doc = "  \"required\": ["]
4534    #[doc = "    \"day_tz\","]
4535    #[doc = "    \"end_offset\","]
4536    #[doc = "    \"start_offset\""]
4537    #[doc = "  ],"]
4538    #[doc = "  \"properties\": {"]
4539    #[doc = "    \"day_tz\": {"]
4540    #[doc = "      \"title\": \"\","]
4541    #[doc = "      \"description\": \"Timezone offset in second from GMT of the day\","]
4542    #[doc = "      \"type\": \"integer\""]
4543    #[doc = "    },"]
4544    #[doc = "    \"end_offset\": {"]
4545    #[doc = "      \"title\": \"\","]
4546    #[doc = "      \"description\": \"End offset from midnight in second\","]
4547    #[doc = "      \"type\": \"integer\""]
4548    #[doc = "    },"]
4549    #[doc = "    \"start_offset\": {"]
4550    #[doc = "      \"title\": \"\","]
4551    #[doc = "      \"description\": \"Start offset from midnight in second\","]
4552    #[doc = "      \"type\": \"integer\""]
4553    #[doc = "    }"]
4554    #[doc = "  }"]
4555    #[doc = "}"]
4556    #[doc = r" ```"]
4557    #[doc = r" </details>"]
4558    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4559    pub struct PublicSleepTimeWindow {
4560        #[doc = "Timezone offset in second from GMT of the day"]
4561        pub day_tz: i64,
4562        #[doc = "End offset from midnight in second"]
4563        pub end_offset: i64,
4564        #[doc = "Start offset from midnight in second"]
4565        pub start_offset: i64,
4566    }
4567
4568    #[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"]
4569    #[doc = r""]
4570    #[doc = r" <details><summary>JSON schema</summary>"]
4571    #[doc = r""]
4572    #[doc = r" ```json"]
4573    #[doc = "{"]
4574    #[doc = "  \"title\": \"PublicSleepType\","]
4575    #[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\","]
4576    #[doc = "  \"type\": \"string\","]
4577    #[doc = "  \"enum\": ["]
4578    #[doc = "    \"deleted\","]
4579    #[doc = "    \"sleep\","]
4580    #[doc = "    \"long_sleep\","]
4581    #[doc = "    \"late_nap\","]
4582    #[doc = "    \"rest\""]
4583    #[doc = "  ]"]
4584    #[doc = "}"]
4585    #[doc = r" ```"]
4586    #[doc = r" </details>"]
4587    #[derive(
4588        :: serde :: Deserialize,
4589        :: serde :: Serialize,
4590        Clone,
4591        Copy,
4592        Debug,
4593        Eq,
4594        Hash,
4595        Ord,
4596        PartialEq,
4597        PartialOrd,
4598    )]
4599    pub enum PublicSleepType {
4600        #[serde(rename = "deleted")]
4601        Deleted,
4602        #[serde(rename = "sleep")]
4603        Sleep,
4604        #[serde(rename = "long_sleep")]
4605        LongSleep,
4606        #[serde(rename = "late_nap")]
4607        LateNap,
4608        #[serde(rename = "rest")]
4609        Rest,
4610    }
4611
4612    impl ::std::fmt::Display for PublicSleepType {
4613        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4614            match *self {
4615                Self::Deleted => f.write_str("deleted"),
4616                Self::Sleep => f.write_str("sleep"),
4617                Self::LongSleep => f.write_str("long_sleep"),
4618                Self::LateNap => f.write_str("late_nap"),
4619                Self::Rest => f.write_str("rest"),
4620            }
4621        }
4622    }
4623
4624    impl ::std::str::FromStr for PublicSleepType {
4625        type Err = self::error::ConversionError;
4626        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4627            match value {
4628                "deleted" => Ok(Self::Deleted),
4629                "sleep" => Ok(Self::Sleep),
4630                "long_sleep" => Ok(Self::LongSleep),
4631                "late_nap" => Ok(Self::LateNap),
4632                "rest" => Ok(Self::Rest),
4633                _ => Err("invalid value".into()),
4634            }
4635        }
4636    }
4637
4638    impl ::std::convert::TryFrom<&str> for PublicSleepType {
4639        type Error = self::error::ConversionError;
4640        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4641            value.parse()
4642        }
4643    }
4644
4645    impl ::std::convert::TryFrom<&::std::string::String> for PublicSleepType {
4646        type Error = self::error::ConversionError;
4647        fn try_from(
4648            value: &::std::string::String,
4649        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4650            value.parse()
4651        }
4652    }
4653
4654    impl ::std::convert::TryFrom<::std::string::String> for PublicSleepType {
4655        type Error = self::error::ConversionError;
4656        fn try_from(
4657            value: ::std::string::String,
4658        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4659            value.parse()
4660        }
4661    }
4662
4663    #[doc = "Object defining public spo2 aggregated values."]
4664    #[doc = r""]
4665    #[doc = r" <details><summary>JSON schema</summary>"]
4666    #[doc = r""]
4667    #[doc = r" ```json"]
4668    #[doc = "{"]
4669    #[doc = "  \"title\": \"PublicSpo2AggregatedValues\","]
4670    #[doc = "  \"description\": \"Object defining public spo2 aggregated values.\","]
4671    #[doc = "  \"type\": \"object\","]
4672    #[doc = "  \"required\": ["]
4673    #[doc = "    \"average\""]
4674    #[doc = "  ],"]
4675    #[doc = "  \"properties\": {"]
4676    #[doc = "    \"average\": {"]
4677    #[doc = "      \"title\": \"\","]
4678    #[doc = "      \"description\": \"Average of spo2.\","]
4679    #[doc = "      \"type\": \"number\""]
4680    #[doc = "    }"]
4681    #[doc = "  }"]
4682    #[doc = "}"]
4683    #[doc = r" ```"]
4684    #[doc = r" </details>"]
4685    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4686    pub struct PublicSpo2AggregatedValues {
4687        #[doc = "Average of spo2."]
4688        pub average: f64,
4689    }
4690
4691    #[doc = "VO2Max estimate."]
4692    #[doc = r""]
4693    #[doc = r" <details><summary>JSON schema</summary>"]
4694    #[doc = r""]
4695    #[doc = r" ```json"]
4696    #[doc = "{"]
4697    #[doc = "  \"title\": \"PublicVO2Max\","]
4698    #[doc = "  \"description\": \"VO2Max estimate.\","]
4699    #[doc = "  \"type\": \"object\","]
4700    #[doc = "  \"required\": ["]
4701    #[doc = "    \"day\","]
4702    #[doc = "    \"id\","]
4703    #[doc = "    \"timestamp\","]
4704    #[doc = "    \"vo2_max\""]
4705    #[doc = "  ],"]
4706    #[doc = "  \"properties\": {"]
4707    #[doc = "    \"day\": {"]
4708    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
4709    #[doc = "    },"]
4710    #[doc = "    \"id\": {"]
4711    #[doc = "      \"title\": \"\","]
4712    #[doc = "      \"description\": \"Unique identifier of the object.\","]
4713    #[doc = "      \"type\": \"string\","]
4714    #[doc = "      \"minLength\": 1"]
4715    #[doc = "    },"]
4716    #[doc = "    \"timestamp\": {"]
4717    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
4718    #[doc = "    },"]
4719    #[doc = "    \"vo2_max\": {"]
4720    #[doc = "      \"title\": \"\","]
4721    #[doc = "      \"description\": \"VO2 max value.\","]
4722    #[doc = "      \"type\": \"integer\""]
4723    #[doc = "    }"]
4724    #[doc = "  },"]
4725    #[doc = "  \"x-cloud-only\": true,"]
4726    #[doc = "  \"x-collection\": \"publicvo2max\","]
4727    #[doc = "  \"x-owner\": \"movement-squad\""]
4728    #[doc = "}"]
4729    #[doc = r" ```"]
4730    #[doc = r" </details>"]
4731    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4732    pub struct PublicVo2Max {
4733        pub day: IsoDate,
4734        #[doc = "Unique identifier of the object."]
4735        pub id: X,
4736        pub timestamp: LocalizedDateTime,
4737        #[doc = "VO2 max value."]
4738        pub vo2_max: i64,
4739    }
4740
4741    #[doc = "Public model for Workout."]
4742    #[doc = r""]
4743    #[doc = r" <details><summary>JSON schema</summary>"]
4744    #[doc = r""]
4745    #[doc = r" ```json"]
4746    #[doc = "{"]
4747    #[doc = "  \"title\": \"PublicWorkout\","]
4748    #[doc = "  \"description\": \"Public model for Workout.\","]
4749    #[doc = "  \"type\": \"object\","]
4750    #[doc = "  \"required\": ["]
4751    #[doc = "    \"activity\","]
4752    #[doc = "    \"day\","]
4753    #[doc = "    \"end_datetime\","]
4754    #[doc = "    \"id\","]
4755    #[doc = "    \"intensity\","]
4756    #[doc = "    \"source\","]
4757    #[doc = "    \"start_datetime\""]
4758    #[doc = "  ],"]
4759    #[doc = "  \"properties\": {"]
4760    #[doc = "    \"activity\": {"]
4761    #[doc = "      \"title\": \"\","]
4762    #[doc = "      \"description\": \"Type of the workout activity.\","]
4763    #[doc = "      \"type\": \"string\""]
4764    #[doc = "    },"]
4765    #[doc = "    \"calories\": {"]
4766    #[doc = "      \"title\": \"\","]
4767    #[doc = "      \"description\": \"Energy burned in kilocalories during the workout.\","]
4768    #[doc = "      \"type\": ["]
4769    #[doc = "        \"number\","]
4770    #[doc = "        \"null\""]
4771    #[doc = "      ]"]
4772    #[doc = "    },"]
4773    #[doc = "    \"day\": {"]
4774    #[doc = "      \"$ref\": \"#/components/schemas/ISODate\""]
4775    #[doc = "    },"]
4776    #[doc = "    \"distance\": {"]
4777    #[doc = "      \"title\": \"\","]
4778    #[doc = "      \"description\": \"Distance traveled in meters during the workout.\","]
4779    #[doc = "      \"type\": ["]
4780    #[doc = "        \"number\","]
4781    #[doc = "        \"null\""]
4782    #[doc = "      ]"]
4783    #[doc = "    },"]
4784    #[doc = "    \"end_datetime\": {"]
4785    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
4786    #[doc = "    },"]
4787    #[doc = "    \"id\": {"]
4788    #[doc = "      \"title\": \"\","]
4789    #[doc = "      \"description\": \"Unique identifier of the object.\","]
4790    #[doc = "      \"type\": \"string\","]
4791    #[doc = "      \"minLength\": 1"]
4792    #[doc = "    },"]
4793    #[doc = "    \"intensity\": {"]
4794    #[doc = "      \"$ref\": \"#/components/schemas/PublicWorkoutIntensity\""]
4795    #[doc = "    },"]
4796    #[doc = "    \"label\": {"]
4797    #[doc = "      \"title\": \"\","]
4798    #[doc = "      \"description\": \"User-defined label for the workout.\","]
4799    #[doc = "      \"type\": ["]
4800    #[doc = "        \"string\","]
4801    #[doc = "        \"null\""]
4802    #[doc = "      ]"]
4803    #[doc = "    },"]
4804    #[doc = "    \"source\": {"]
4805    #[doc = "      \"$ref\": \"#/components/schemas/PublicWorkoutSource\""]
4806    #[doc = "    },"]
4807    #[doc = "    \"start_datetime\": {"]
4808    #[doc = "      \"$ref\": \"#/components/schemas/LocalizedDateTime\""]
4809    #[doc = "    }"]
4810    #[doc = "  },"]
4811    #[doc = "  \"x-cloud-only\": true,"]
4812    #[doc = "  \"x-collection\": \"publicworkout\","]
4813    #[doc = "  \"x-owner\": \"movement-squad\""]
4814    #[doc = "}"]
4815    #[doc = r" ```"]
4816    #[doc = r" </details>"]
4817    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4818    pub struct PublicWorkout {
4819        #[doc = "Type of the workout activity."]
4820        pub activity: ::std::string::String,
4821        #[doc = "Energy burned in kilocalories during the workout."]
4822        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4823        pub calories: ::std::option::Option<f64>,
4824        pub day: IsoDate,
4825        #[doc = "Distance traveled in meters during the workout."]
4826        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4827        pub distance: ::std::option::Option<f64>,
4828        pub end_datetime: LocalizedDateTime,
4829        #[doc = "Unique identifier of the object."]
4830        pub id: X,
4831        pub intensity: PublicWorkoutIntensity,
4832        #[doc = "User-defined label for the workout."]
4833        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4834        pub label: ::std::option::Option<::std::string::String>,
4835        pub source: PublicWorkoutSource,
4836        pub start_datetime: LocalizedDateTime,
4837    }
4838
4839    #[doc = "Possible workout intensities."]
4840    #[doc = r""]
4841    #[doc = r" <details><summary>JSON schema</summary>"]
4842    #[doc = r""]
4843    #[doc = r" ```json"]
4844    #[doc = "{"]
4845    #[doc = "  \"title\": \"PublicWorkoutIntensity\","]
4846    #[doc = "  \"description\": \"Possible workout intensities.\","]
4847    #[doc = "  \"type\": \"string\","]
4848    #[doc = "  \"enum\": ["]
4849    #[doc = "    \"easy\","]
4850    #[doc = "    \"moderate\","]
4851    #[doc = "    \"hard\""]
4852    #[doc = "  ]"]
4853    #[doc = "}"]
4854    #[doc = r" ```"]
4855    #[doc = r" </details>"]
4856    #[derive(
4857        :: serde :: Deserialize,
4858        :: serde :: Serialize,
4859        Clone,
4860        Copy,
4861        Debug,
4862        Eq,
4863        Hash,
4864        Ord,
4865        PartialEq,
4866        PartialOrd,
4867    )]
4868    pub enum PublicWorkoutIntensity {
4869        #[serde(rename = "easy")]
4870        Easy,
4871        #[serde(rename = "moderate")]
4872        Moderate,
4873        #[serde(rename = "hard")]
4874        Hard,
4875    }
4876
4877    impl ::std::fmt::Display for PublicWorkoutIntensity {
4878        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4879            match *self {
4880                Self::Easy => f.write_str("easy"),
4881                Self::Moderate => f.write_str("moderate"),
4882                Self::Hard => f.write_str("hard"),
4883            }
4884        }
4885    }
4886
4887    impl ::std::str::FromStr for PublicWorkoutIntensity {
4888        type Err = self::error::ConversionError;
4889        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4890            match value {
4891                "easy" => Ok(Self::Easy),
4892                "moderate" => Ok(Self::Moderate),
4893                "hard" => Ok(Self::Hard),
4894                _ => Err("invalid value".into()),
4895            }
4896        }
4897    }
4898
4899    impl ::std::convert::TryFrom<&str> for PublicWorkoutIntensity {
4900        type Error = self::error::ConversionError;
4901        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4902            value.parse()
4903        }
4904    }
4905
4906    impl ::std::convert::TryFrom<&::std::string::String> for PublicWorkoutIntensity {
4907        type Error = self::error::ConversionError;
4908        fn try_from(
4909            value: &::std::string::String,
4910        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4911            value.parse()
4912        }
4913    }
4914
4915    impl ::std::convert::TryFrom<::std::string::String> for PublicWorkoutIntensity {
4916        type Error = self::error::ConversionError;
4917        fn try_from(
4918            value: ::std::string::String,
4919        ) -> ::std::result::Result<Self, self::error::ConversionError> {
4920            value.parse()
4921        }
4922    }
4923
4924    #[doc = "Possible workout sources."]
4925    #[doc = r""]
4926    #[doc = r" <details><summary>JSON schema</summary>"]
4927    #[doc = r""]
4928    #[doc = r" ```json"]
4929    #[doc = "{"]
4930    #[doc = "  \"title\": \"PublicWorkoutSource\","]
4931    #[doc = "  \"description\": \"Possible workout sources.\","]
4932    #[doc = "  \"type\": \"string\","]
4933    #[doc = "  \"enum\": ["]
4934    #[doc = "    \"manual\","]
4935    #[doc = "    \"autodetected\","]
4936    #[doc = "    \"confirmed\","]
4937    #[doc = "    \"workout_heart_rate\""]
4938    #[doc = "  ]"]
4939    #[doc = "}"]
4940    #[doc = r" ```"]
4941    #[doc = r" </details>"]
4942    #[derive(
4943        :: serde :: Deserialize,
4944        :: serde :: Serialize,
4945        Clone,
4946        Copy,
4947        Debug,
4948        Eq,
4949        Hash,
4950        Ord,
4951        PartialEq,
4952        PartialOrd,
4953    )]
4954    pub enum PublicWorkoutSource {
4955        #[serde(rename = "manual")]
4956        Manual,
4957        #[serde(rename = "autodetected")]
4958        Autodetected,
4959        #[serde(rename = "confirmed")]
4960        Confirmed,
4961        #[serde(rename = "workout_heart_rate")]
4962        WorkoutHeartRate,
4963    }
4964
4965    impl ::std::fmt::Display for PublicWorkoutSource {
4966        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4967            match *self {
4968                Self::Manual => f.write_str("manual"),
4969                Self::Autodetected => f.write_str("autodetected"),
4970                Self::Confirmed => f.write_str("confirmed"),
4971                Self::WorkoutHeartRate => f.write_str("workout_heart_rate"),
4972            }
4973        }
4974    }
4975
4976    impl ::std::str::FromStr for PublicWorkoutSource {
4977        type Err = self::error::ConversionError;
4978        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4979            match value {
4980                "manual" => Ok(Self::Manual),
4981                "autodetected" => Ok(Self::Autodetected),
4982                "confirmed" => Ok(Self::Confirmed),
4983                "workout_heart_rate" => Ok(Self::WorkoutHeartRate),
4984                _ => Err("invalid value".into()),
4985            }
4986        }
4987    }
4988
4989    impl ::std::convert::TryFrom<&str> for PublicWorkoutSource {
4990        type Error = self::error::ConversionError;
4991        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4992            value.parse()
4993        }
4994    }
4995
4996    impl ::std::convert::TryFrom<&::std::string::String> for PublicWorkoutSource {
4997        type Error = self::error::ConversionError;
4998        fn try_from(
4999            value: &::std::string::String,
5000        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5001            value.parse()
5002        }
5003    }
5004
5005    impl ::std::convert::TryFrom<::std::string::String> for PublicWorkoutSource {
5006        type Error = self::error::ConversionError;
5007        fn try_from(
5008            value: ::std::string::String,
5009        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5010            value.parse()
5011        }
5012    }
5013
5014    #[doc = "`ResilienceContributors`"]
5015    #[doc = r""]
5016    #[doc = r" <details><summary>JSON schema</summary>"]
5017    #[doc = r""]
5018    #[doc = r" ```json"]
5019    #[doc = "{"]
5020    #[doc = "  \"title\": \"ResilienceContributors\","]
5021    #[doc = "  \"type\": \"object\","]
5022    #[doc = "  \"required\": ["]
5023    #[doc = "    \"daytime_recovery\","]
5024    #[doc = "    \"sleep_recovery\","]
5025    #[doc = "    \"stress\""]
5026    #[doc = "  ],"]
5027    #[doc = "  \"properties\": {"]
5028    #[doc = "    \"daytime_recovery\": {"]
5029    #[doc = "      \"title\": \"Daytime Recovery\","]
5030    #[doc = "      \"description\": \"Daytime recovery contributor to the resilience score. Range: [0, 100]\","]
5031    #[doc = "      \"type\": \"number\""]
5032    #[doc = "    },"]
5033    #[doc = "    \"sleep_recovery\": {"]
5034    #[doc = "      \"title\": \"Sleep Recovery\","]
5035    #[doc = "      \"description\": \"Sleep recovery contributor to the resilience score. Range: [0, 100]\","]
5036    #[doc = "      \"type\": \"number\""]
5037    #[doc = "    },"]
5038    #[doc = "    \"stress\": {"]
5039    #[doc = "      \"title\": \"Stress\","]
5040    #[doc = "      \"description\": \"Stress contributor to the resilience score. Range: [0, 100]\","]
5041    #[doc = "      \"type\": \"number\""]
5042    #[doc = "    }"]
5043    #[doc = "  }"]
5044    #[doc = "}"]
5045    #[doc = r" ```"]
5046    #[doc = r" </details>"]
5047    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5048    pub struct ResilienceContributors {
5049        #[doc = "Daytime recovery contributor to the resilience score. Range: [0, 100]"]
5050        pub daytime_recovery: f64,
5051        #[doc = "Sleep recovery contributor to the resilience score. Range: [0, 100]"]
5052        pub sleep_recovery: f64,
5053        #[doc = "Stress contributor to the resilience score. Range: [0, 100]"]
5054        pub stress: f64,
5055    }
5056
5057    #[doc = "`ResponseMultipleHeartrateDocumentsV2UsercollectionHeartrateGet`"]
5058    #[doc = r""]
5059    #[doc = r" <details><summary>JSON schema</summary>"]
5060    #[doc = r""]
5061    #[doc = r" ```json"]
5062    #[doc = "{"]
5063    #[doc = "  \"title\": \"Response Multiple Heartrate Documents V2 Usercollection Heartrate Get\","]
5064    #[doc = "  \"anyOf\": ["]
5065    #[doc = "    {"]
5066    #[doc = "      \"$ref\": \"#/components/schemas/TimeSeriesResponse_PublicHeartRateRow_\""]
5067    #[doc = "    },"]
5068    #[doc = "    {"]
5069    #[doc = "      \"$ref\": \"#/components/schemas/TimeSeriesResponseDict\""]
5070    #[doc = "    }"]
5071    #[doc = "  ]"]
5072    #[doc = "}"]
5073    #[doc = r" ```"]
5074    #[doc = r" </details>"]
5075    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5076    pub struct ResponseMultipleHeartrateDocumentsV2UsercollectionHeartrateGet {
5077        #[serde(
5078            flatten,
5079            default,
5080            skip_serializing_if = "::std::option::Option::is_none"
5081        )]
5082        pub subtype_0: ::std::option::Option<TimeSeriesResponsePublicHeartRateRow>,
5083        #[serde(
5084            flatten,
5085            default,
5086            skip_serializing_if = "::std::option::Option::is_none"
5087        )]
5088        pub subtype_1: ::std::option::Option<TimeSeriesResponseDict>,
5089    }
5090
5091    impl ::std::default::Default for ResponseMultipleHeartrateDocumentsV2UsercollectionHeartrateGet {
5092        fn default() -> Self {
5093            Self {
5094                subtype_0: Default::default(),
5095                subtype_1: Default::default(),
5096            }
5097        }
5098    }
5099
5100    #[doc = "`ResponseMultipleRingBatteryLevelDocumentsV2UsercollectionRingBatteryLevelGet`"]
5101    #[doc = r""]
5102    #[doc = r" <details><summary>JSON schema</summary>"]
5103    #[doc = r""]
5104    #[doc = r" ```json"]
5105    #[doc = "{"]
5106    #[doc = "  \"title\": \"Response Multiple Ring Battery Level Documents V2 Usercollection Ring Battery Level Get\","]
5107    #[doc = "  \"anyOf\": ["]
5108    #[doc = "    {"]
5109    #[doc = "      \"$ref\": \"#/components/schemas/TimeSeriesResponse_PublicRingBatteryLevelRow_\""]
5110    #[doc = "    },"]
5111    #[doc = "    {"]
5112    #[doc = "      \"$ref\": \"#/components/schemas/TimeSeriesResponseDict\""]
5113    #[doc = "    }"]
5114    #[doc = "  ]"]
5115    #[doc = "}"]
5116    #[doc = r" ```"]
5117    #[doc = r" </details>"]
5118    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5119    pub struct ResponseMultipleRingBatteryLevelDocumentsV2UsercollectionRingBatteryLevelGet {
5120        #[serde(
5121            flatten,
5122            default,
5123            skip_serializing_if = "::std::option::Option::is_none"
5124        )]
5125        pub subtype_0: ::std::option::Option<TimeSeriesResponsePublicRingBatteryLevelRow>,
5126        #[serde(
5127            flatten,
5128            default,
5129            skip_serializing_if = "::std::option::Option::is_none"
5130        )]
5131        pub subtype_1: ::std::option::Option<TimeSeriesResponseDict>,
5132    }
5133
5134    impl ::std::default::Default
5135        for ResponseMultipleRingBatteryLevelDocumentsV2UsercollectionRingBatteryLevelGet
5136    {
5137        fn default() -> Self {
5138            Self {
5139                subtype_0: Default::default(),
5140                subtype_1: Default::default(),
5141            }
5142        }
5143    }
5144
5145    #[doc = "`ResponseSandboxMultipleHeartrateDocumentsV2SandboxUsercollectionHeartrateGet`"]
5146    #[doc = r""]
5147    #[doc = r" <details><summary>JSON schema</summary>"]
5148    #[doc = r""]
5149    #[doc = r" ```json"]
5150    #[doc = "{"]
5151    #[doc = "  \"title\": \"Response Sandbox   Multiple Heartrate Documents V2 Sandbox Usercollection Heartrate Get\","]
5152    #[doc = "  \"anyOf\": ["]
5153    #[doc = "    {"]
5154    #[doc = "      \"$ref\": \"#/components/schemas/TimeSeriesResponse_PublicHeartRateRow_\""]
5155    #[doc = "    },"]
5156    #[doc = "    {"]
5157    #[doc = "      \"$ref\": \"#/components/schemas/TimeSeriesResponseDict\""]
5158    #[doc = "    }"]
5159    #[doc = "  ]"]
5160    #[doc = "}"]
5161    #[doc = r" ```"]
5162    #[doc = r" </details>"]
5163    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5164    pub struct ResponseSandboxMultipleHeartrateDocumentsV2SandboxUsercollectionHeartrateGet {
5165        #[serde(
5166            flatten,
5167            default,
5168            skip_serializing_if = "::std::option::Option::is_none"
5169        )]
5170        pub subtype_0: ::std::option::Option<TimeSeriesResponsePublicHeartRateRow>,
5171        #[serde(
5172            flatten,
5173            default,
5174            skip_serializing_if = "::std::option::Option::is_none"
5175        )]
5176        pub subtype_1: ::std::option::Option<TimeSeriesResponseDict>,
5177    }
5178
5179    impl ::std::default::Default
5180        for ResponseSandboxMultipleHeartrateDocumentsV2SandboxUsercollectionHeartrateGet
5181    {
5182        fn default() -> Self {
5183            Self {
5184                subtype_0: Default::default(),
5185                subtype_1: Default::default(),
5186            }
5187        }
5188    }
5189
5190    #[doc = "`ResponseSandboxMultipleRingBatteryLevelDocumentsV2SandboxUsercollectionRingBatteryLevelGet`"]
5191    #[doc = r""]
5192    #[doc = r" <details><summary>JSON schema</summary>"]
5193    #[doc = r""]
5194    #[doc = r" ```json"]
5195    #[doc = "{"]
5196    #[doc = "  \"title\": \"Response Sandbox   Multiple Ring Battery Level Documents V2 Sandbox Usercollection Ring Battery Level Get\","]
5197    #[doc = "  \"anyOf\": ["]
5198    #[doc = "    {"]
5199    #[doc = "      \"$ref\": \"#/components/schemas/TimeSeriesResponse_PublicRingBatteryLevelRow_\""]
5200    #[doc = "    },"]
5201    #[doc = "    {"]
5202    #[doc = "      \"$ref\": \"#/components/schemas/TimeSeriesResponseDict\""]
5203    #[doc = "    }"]
5204    #[doc = "  ]"]
5205    #[doc = "}"]
5206    #[doc = r" ```"]
5207    #[doc = r" </details>"]
5208    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5209    pub struct ResponseSandboxMultipleRingBatteryLevelDocumentsV2SandboxUsercollectionRingBatteryLevelGet
5210    {
5211        #[serde(
5212            flatten,
5213            default,
5214            skip_serializing_if = "::std::option::Option::is_none"
5215        )]
5216        pub subtype_0: ::std::option::Option<TimeSeriesResponsePublicRingBatteryLevelRow>,
5217        #[serde(
5218            flatten,
5219            default,
5220            skip_serializing_if = "::std::option::Option::is_none"
5221        )]
5222        pub subtype_1: ::std::option::Option<TimeSeriesResponseDict>,
5223    }
5224
5225    impl :: std :: default :: Default for ResponseSandboxMultipleRingBatteryLevelDocumentsV2SandboxUsercollectionRingBatteryLevelGet { fn default () -> Self { Self { subtype_0 : Default :: default () , subtype_1 : Default :: default () , } } }
5226    #[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"]
5227    #[doc = r""]
5228    #[doc = r" <details><summary>JSON schema</summary>"]
5229    #[doc = r""]
5230    #[doc = r" ```json"]
5231    #[doc = "{"]
5232    #[doc = "  \"title\": \"TagModel\","]
5233    #[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\","]
5234    #[doc = "  \"type\": \"object\","]
5235    #[doc = "  \"required\": ["]
5236    #[doc = "    \"day\","]
5237    #[doc = "    \"id\","]
5238    #[doc = "    \"tags\","]
5239    #[doc = "    \"text\","]
5240    #[doc = "    \"timestamp\""]
5241    #[doc = "  ],"]
5242    #[doc = "  \"properties\": {"]
5243    #[doc = "    \"day\": {"]
5244    #[doc = "      \"title\": \"Day\","]
5245    #[doc = "      \"description\": \"Day that the note belongs to.\","]
5246    #[doc = "      \"type\": \"string\","]
5247    #[doc = "      \"format\": \"date\""]
5248    #[doc = "    },"]
5249    #[doc = "    \"id\": {"]
5250    #[doc = "      \"title\": \"Id\","]
5251    #[doc = "      \"type\": \"string\""]
5252    #[doc = "    },"]
5253    #[doc = "    \"tags\": {"]
5254    #[doc = "      \"title\": \"Tags\","]
5255    #[doc = "      \"description\": \"Selected tags for the tag.\","]
5256    #[doc = "      \"type\": \"array\","]
5257    #[doc = "      \"items\": {"]
5258    #[doc = "        \"type\": \"string\""]
5259    #[doc = "      }"]
5260    #[doc = "    },"]
5261    #[doc = "    \"text\": {"]
5262    #[doc = "      \"title\": \"Text\","]
5263    #[doc = "      \"description\": \"Textual contents of the note.\","]
5264    #[doc = "      \"type\": ["]
5265    #[doc = "        \"string\","]
5266    #[doc = "        \"null\""]
5267    #[doc = "      ]"]
5268    #[doc = "    },"]
5269    #[doc = "    \"timestamp\": {"]
5270    #[doc = "      \"$ref\": \"#/components/schemas/LocalDateTime\""]
5271    #[doc = "    }"]
5272    #[doc = "  }"]
5273    #[doc = "}"]
5274    #[doc = r" ```"]
5275    #[doc = r" </details>"]
5276    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5277    pub struct TagModel {
5278        #[doc = "Day that the note belongs to."]
5279        pub day: ::chrono::naive::NaiveDate,
5280        pub id: ::std::string::String,
5281        #[doc = "Selected tags for the tag."]
5282        pub tags: ::std::vec::Vec<::std::string::String>,
5283        #[doc = "Textual contents of the note."]
5284        pub text: ::std::option::Option<::std::string::String>,
5285        pub timestamp: LocalDateTime,
5286    }
5287
5288    #[doc = "`TimeSeriesResponseDict`"]
5289    #[doc = r""]
5290    #[doc = r" <details><summary>JSON schema</summary>"]
5291    #[doc = r""]
5292    #[doc = r" ```json"]
5293    #[doc = "{"]
5294    #[doc = "  \"title\": \"TimeSeriesResponseDict\","]
5295    #[doc = "  \"type\": \"object\","]
5296    #[doc = "  \"required\": ["]
5297    #[doc = "    \"data\""]
5298    #[doc = "  ],"]
5299    #[doc = "  \"properties\": {"]
5300    #[doc = "    \"data\": {"]
5301    #[doc = "      \"title\": \"Data\","]
5302    #[doc = "      \"type\": \"array\","]
5303    #[doc = "      \"items\": {"]
5304    #[doc = "        \"type\": \"object\","]
5305    #[doc = "        \"additionalProperties\": true"]
5306    #[doc = "      }"]
5307    #[doc = "    },"]
5308    #[doc = "    \"next_token\": {"]
5309    #[doc = "      \"title\": \"Next Token\","]
5310    #[doc = "      \"type\": ["]
5311    #[doc = "        \"string\","]
5312    #[doc = "        \"null\""]
5313    #[doc = "      ]"]
5314    #[doc = "    }"]
5315    #[doc = "  }"]
5316    #[doc = "}"]
5317    #[doc = r" ```"]
5318    #[doc = r" </details>"]
5319    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5320    pub struct TimeSeriesResponseDict {
5321        pub data: ::std::vec::Vec<::serde_json::Map<::std::string::String, ::serde_json::Value>>,
5322        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5323        pub next_token: ::std::option::Option<::std::string::String>,
5324    }
5325
5326    #[doc = "`TimeSeriesResponsePublicHeartRateRow`"]
5327    #[doc = r""]
5328    #[doc = r" <details><summary>JSON schema</summary>"]
5329    #[doc = r""]
5330    #[doc = r" ```json"]
5331    #[doc = "{"]
5332    #[doc = "  \"title\": \"TimeSeriesResponse[PublicHeartRateRow]\","]
5333    #[doc = "  \"type\": \"object\","]
5334    #[doc = "  \"required\": ["]
5335    #[doc = "    \"data\""]
5336    #[doc = "  ],"]
5337    #[doc = "  \"properties\": {"]
5338    #[doc = "    \"data\": {"]
5339    #[doc = "      \"title\": \"Data\","]
5340    #[doc = "      \"type\": \"array\","]
5341    #[doc = "      \"items\": {"]
5342    #[doc = "        \"$ref\": \"#/components/schemas/PublicHeartRateRow\""]
5343    #[doc = "      }"]
5344    #[doc = "    },"]
5345    #[doc = "    \"next_token\": {"]
5346    #[doc = "      \"title\": \"Next Token\","]
5347    #[doc = "      \"type\": ["]
5348    #[doc = "        \"string\","]
5349    #[doc = "        \"null\""]
5350    #[doc = "      ]"]
5351    #[doc = "    }"]
5352    #[doc = "  }"]
5353    #[doc = "}"]
5354    #[doc = r" ```"]
5355    #[doc = r" </details>"]
5356    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5357    pub struct TimeSeriesResponsePublicHeartRateRow {
5358        pub data: ::std::vec::Vec<PublicHeartRateRow>,
5359        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5360        pub next_token: ::std::option::Option<::std::string::String>,
5361    }
5362
5363    #[doc = "`TimeSeriesResponsePublicRingBatteryLevelRow`"]
5364    #[doc = r""]
5365    #[doc = r" <details><summary>JSON schema</summary>"]
5366    #[doc = r""]
5367    #[doc = r" ```json"]
5368    #[doc = "{"]
5369    #[doc = "  \"title\": \"TimeSeriesResponse[PublicRingBatteryLevelRow]\","]
5370    #[doc = "  \"type\": \"object\","]
5371    #[doc = "  \"required\": ["]
5372    #[doc = "    \"data\""]
5373    #[doc = "  ],"]
5374    #[doc = "  \"properties\": {"]
5375    #[doc = "    \"data\": {"]
5376    #[doc = "      \"title\": \"Data\","]
5377    #[doc = "      \"type\": \"array\","]
5378    #[doc = "      \"items\": {"]
5379    #[doc = "        \"$ref\": \"#/components/schemas/PublicRingBatteryLevelRow\""]
5380    #[doc = "      }"]
5381    #[doc = "    },"]
5382    #[doc = "    \"next_token\": {"]
5383    #[doc = "      \"title\": \"Next Token\","]
5384    #[doc = "      \"type\": ["]
5385    #[doc = "        \"string\","]
5386    #[doc = "        \"null\""]
5387    #[doc = "      ]"]
5388    #[doc = "    }"]
5389    #[doc = "  }"]
5390    #[doc = "}"]
5391    #[doc = r" ```"]
5392    #[doc = r" </details>"]
5393    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5394    pub struct TimeSeriesResponsePublicRingBatteryLevelRow {
5395        pub data: ::std::vec::Vec<PublicRingBatteryLevelRow>,
5396        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5397        pub next_token: ::std::option::Option<::std::string::String>,
5398    }
5399
5400    #[doc = "`UpdateWebhookSubscriptionRequest`"]
5401    #[doc = r""]
5402    #[doc = r" <details><summary>JSON schema</summary>"]
5403    #[doc = r""]
5404    #[doc = r" ```json"]
5405    #[doc = "{"]
5406    #[doc = "  \"title\": \"UpdateWebhookSubscriptionRequest\","]
5407    #[doc = "  \"type\": \"object\","]
5408    #[doc = "  \"required\": ["]
5409    #[doc = "    \"verification_token\""]
5410    #[doc = "  ],"]
5411    #[doc = "  \"properties\": {"]
5412    #[doc = "    \"callback_url\": {"]
5413    #[doc = "      \"title\": \"Callback Url\","]
5414    #[doc = "      \"type\": ["]
5415    #[doc = "        \"string\","]
5416    #[doc = "        \"null\""]
5417    #[doc = "      ]"]
5418    #[doc = "    },"]
5419    #[doc = "    \"data_type\": {"]
5420    #[doc = "      \"oneOf\": ["]
5421    #[doc = "        {"]
5422    #[doc = "          \"type\": \"null\""]
5423    #[doc = "        },"]
5424    #[doc = "        {"]
5425    #[doc = "          \"allOf\": ["]
5426    #[doc = "            {"]
5427    #[doc = "              \"$ref\": \"#/components/schemas/ExtApiV2DataType\""]
5428    #[doc = "            }"]
5429    #[doc = "          ]"]
5430    #[doc = "        }"]
5431    #[doc = "      ]"]
5432    #[doc = "    },"]
5433    #[doc = "    \"event_type\": {"]
5434    #[doc = "      \"oneOf\": ["]
5435    #[doc = "        {"]
5436    #[doc = "          \"type\": \"null\""]
5437    #[doc = "        },"]
5438    #[doc = "        {"]
5439    #[doc = "          \"allOf\": ["]
5440    #[doc = "            {"]
5441    #[doc = "              \"$ref\": \"#/components/schemas/WebhookOperation\""]
5442    #[doc = "            }"]
5443    #[doc = "          ]"]
5444    #[doc = "        }"]
5445    #[doc = "      ]"]
5446    #[doc = "    },"]
5447    #[doc = "    \"verification_token\": {"]
5448    #[doc = "      \"title\": \"Verification Token\","]
5449    #[doc = "      \"type\": \"string\""]
5450    #[doc = "    }"]
5451    #[doc = "  }"]
5452    #[doc = "}"]
5453    #[doc = r" ```"]
5454    #[doc = r" </details>"]
5455    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5456    pub struct UpdateWebhookSubscriptionRequest {
5457        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5458        pub callback_url: ::std::option::Option<::std::string::String>,
5459        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5460        pub data_type: ::std::option::Option<ExtApiV2DataType>,
5461        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5462        pub event_type: ::std::option::Option<WebhookOperation>,
5463        pub verification_token: ::std::string::String,
5464    }
5465
5466    #[doc = "`UtcDateTime`"]
5467    #[doc = r""]
5468    #[doc = r" <details><summary>JSON schema</summary>"]
5469    #[doc = r""]
5470    #[doc = r" ```json"]
5471    #[doc = "{"]
5472    #[doc = "  \"type\": \"string\""]
5473    #[doc = "}"]
5474    #[doc = r" ```"]
5475    #[doc = r" </details>"]
5476    #[derive(
5477        :: serde :: Deserialize,
5478        :: serde :: Serialize,
5479        Clone,
5480        Debug,
5481        Eq,
5482        Hash,
5483        Ord,
5484        PartialEq,
5485        PartialOrd,
5486    )]
5487    #[serde(transparent)]
5488    pub struct UtcDateTime(pub ::std::string::String);
5489    impl ::std::ops::Deref for UtcDateTime {
5490        type Target = ::std::string::String;
5491        fn deref(&self) -> &::std::string::String {
5492            &self.0
5493        }
5494    }
5495
5496    impl ::std::convert::From<UtcDateTime> for ::std::string::String {
5497        fn from(value: UtcDateTime) -> Self {
5498            value.0
5499        }
5500    }
5501
5502    impl ::std::convert::From<::std::string::String> for UtcDateTime {
5503        fn from(value: ::std::string::String) -> Self {
5504            Self(value)
5505        }
5506    }
5507
5508    impl ::std::str::FromStr for UtcDateTime {
5509        type Err = ::std::convert::Infallible;
5510        fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
5511            Ok(Self(value.to_string()))
5512        }
5513    }
5514
5515    impl ::std::fmt::Display for UtcDateTime {
5516        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5517            self.0.fmt(f)
5518        }
5519    }
5520
5521    #[doc = "`ValidationError`"]
5522    #[doc = r""]
5523    #[doc = r" <details><summary>JSON schema</summary>"]
5524    #[doc = r""]
5525    #[doc = r" ```json"]
5526    #[doc = "{"]
5527    #[doc = "  \"title\": \"ValidationError\","]
5528    #[doc = "  \"type\": \"object\","]
5529    #[doc = "  \"required\": ["]
5530    #[doc = "    \"loc\","]
5531    #[doc = "    \"msg\","]
5532    #[doc = "    \"type\""]
5533    #[doc = "  ],"]
5534    #[doc = "  \"properties\": {"]
5535    #[doc = "    \"loc\": {"]
5536    #[doc = "      \"title\": \"Location\","]
5537    #[doc = "      \"type\": \"array\","]
5538    #[doc = "      \"items\": {"]
5539    #[doc = "        \"anyOf\": ["]
5540    #[doc = "          {"]
5541    #[doc = "            \"type\": \"string\""]
5542    #[doc = "          },"]
5543    #[doc = "          {"]
5544    #[doc = "            \"type\": \"integer\""]
5545    #[doc = "          }"]
5546    #[doc = "        ]"]
5547    #[doc = "      }"]
5548    #[doc = "    },"]
5549    #[doc = "    \"msg\": {"]
5550    #[doc = "      \"title\": \"Message\","]
5551    #[doc = "      \"type\": \"string\""]
5552    #[doc = "    },"]
5553    #[doc = "    \"type\": {"]
5554    #[doc = "      \"title\": \"Error Type\","]
5555    #[doc = "      \"type\": \"string\""]
5556    #[doc = "    }"]
5557    #[doc = "  }"]
5558    #[doc = "}"]
5559    #[doc = r" ```"]
5560    #[doc = r" </details>"]
5561    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5562    pub struct ValidationError {
5563        pub loc: ::std::vec::Vec<LocationItem>,
5564        pub msg: ::std::string::String,
5565        #[serde(rename = "type")]
5566        pub type_: ::std::string::String,
5567    }
5568
5569    #[doc = "`WebhookOperation`"]
5570    #[doc = r""]
5571    #[doc = r" <details><summary>JSON schema</summary>"]
5572    #[doc = r""]
5573    #[doc = r" ```json"]
5574    #[doc = "{"]
5575    #[doc = "  \"title\": \"WebhookOperation\","]
5576    #[doc = "  \"type\": \"string\","]
5577    #[doc = "  \"enum\": ["]
5578    #[doc = "    \"create\","]
5579    #[doc = "    \"update\","]
5580    #[doc = "    \"delete\""]
5581    #[doc = "  ]"]
5582    #[doc = "}"]
5583    #[doc = r" ```"]
5584    #[doc = r" </details>"]
5585    #[derive(
5586        :: serde :: Deserialize,
5587        :: serde :: Serialize,
5588        Clone,
5589        Copy,
5590        Debug,
5591        Eq,
5592        Hash,
5593        Ord,
5594        PartialEq,
5595        PartialOrd,
5596    )]
5597    pub enum WebhookOperation {
5598        #[serde(rename = "create")]
5599        Create,
5600        #[serde(rename = "update")]
5601        Update,
5602        #[serde(rename = "delete")]
5603        Delete,
5604    }
5605
5606    impl ::std::fmt::Display for WebhookOperation {
5607        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5608            match *self {
5609                Self::Create => f.write_str("create"),
5610                Self::Update => f.write_str("update"),
5611                Self::Delete => f.write_str("delete"),
5612            }
5613        }
5614    }
5615
5616    impl ::std::str::FromStr for WebhookOperation {
5617        type Err = self::error::ConversionError;
5618        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5619            match value {
5620                "create" => Ok(Self::Create),
5621                "update" => Ok(Self::Update),
5622                "delete" => Ok(Self::Delete),
5623                _ => Err("invalid value".into()),
5624            }
5625        }
5626    }
5627
5628    impl ::std::convert::TryFrom<&str> for WebhookOperation {
5629        type Error = self::error::ConversionError;
5630        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5631            value.parse()
5632        }
5633    }
5634
5635    impl ::std::convert::TryFrom<&::std::string::String> for WebhookOperation {
5636        type Error = self::error::ConversionError;
5637        fn try_from(
5638            value: &::std::string::String,
5639        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5640            value.parse()
5641        }
5642    }
5643
5644    impl ::std::convert::TryFrom<::std::string::String> for WebhookOperation {
5645        type Error = self::error::ConversionError;
5646        fn try_from(
5647            value: ::std::string::String,
5648        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5649            value.parse()
5650        }
5651    }
5652
5653    #[doc = "`WebhookSubscriptionModel`"]
5654    #[doc = r""]
5655    #[doc = r" <details><summary>JSON schema</summary>"]
5656    #[doc = r""]
5657    #[doc = r" ```json"]
5658    #[doc = "{"]
5659    #[doc = "  \"title\": \"WebhookSubscriptionModel\","]
5660    #[doc = "  \"type\": \"object\","]
5661    #[doc = "  \"required\": ["]
5662    #[doc = "    \"callback_url\","]
5663    #[doc = "    \"data_type\","]
5664    #[doc = "    \"event_type\","]
5665    #[doc = "    \"expiration_time\","]
5666    #[doc = "    \"id\""]
5667    #[doc = "  ],"]
5668    #[doc = "  \"properties\": {"]
5669    #[doc = "    \"callback_url\": {"]
5670    #[doc = "      \"title\": \"Callback Url\","]
5671    #[doc = "      \"type\": \"string\""]
5672    #[doc = "    },"]
5673    #[doc = "    \"data_type\": {"]
5674    #[doc = "      \"$ref\": \"#/components/schemas/ExtApiV2DataType\""]
5675    #[doc = "    },"]
5676    #[doc = "    \"event_type\": {"]
5677    #[doc = "      \"$ref\": \"#/components/schemas/WebhookOperation\""]
5678    #[doc = "    },"]
5679    #[doc = "    \"expiration_time\": {"]
5680    #[doc = "      \"title\": \"Expiration Time\","]
5681    #[doc = "      \"type\": \"string\","]
5682    #[doc = "      \"format\": \"date-time\""]
5683    #[doc = "    },"]
5684    #[doc = "    \"id\": {"]
5685    #[doc = "      \"title\": \"Id\","]
5686    #[doc = "      \"type\": \"string\","]
5687    #[doc = "      \"format\": \"uuid4\""]
5688    #[doc = "    }"]
5689    #[doc = "  }"]
5690    #[doc = "}"]
5691    #[doc = r" ```"]
5692    #[doc = r" </details>"]
5693    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5694    pub struct WebhookSubscriptionModel {
5695        pub callback_url: ::std::string::String,
5696        pub data_type: ExtApiV2DataType,
5697        pub event_type: WebhookOperation,
5698        pub expiration_time: ::chrono::DateTime<::chrono::offset::Utc>,
5699        pub id: ::std::string::String,
5700    }
5701
5702    #[doc = "Unique identifier of the object."]
5703    #[doc = r""]
5704    #[doc = r" <details><summary>JSON schema</summary>"]
5705    #[doc = r""]
5706    #[doc = r" ```json"]
5707    #[doc = "{"]
5708    #[doc = "  \"title\": \"\","]
5709    #[doc = "  \"description\": \"Unique identifier of the object.\","]
5710    #[doc = "  \"type\": \"string\","]
5711    #[doc = "  \"minLength\": 1"]
5712    #[doc = "}"]
5713    #[doc = r" ```"]
5714    #[doc = r" </details>"]
5715    #[derive(:: serde :: Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5716    #[serde(transparent)]
5717    pub struct X(::std::string::String);
5718    impl ::std::ops::Deref for X {
5719        type Target = ::std::string::String;
5720        fn deref(&self) -> &::std::string::String {
5721            &self.0
5722        }
5723    }
5724
5725    impl ::std::convert::From<X> for ::std::string::String {
5726        fn from(value: X) -> Self {
5727            value.0
5728        }
5729    }
5730
5731    impl ::std::str::FromStr for X {
5732        type Err = self::error::ConversionError;
5733        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5734            if value.chars().count() < 1usize {
5735                return Err("shorter than 1 characters".into());
5736            }
5737            Ok(Self(value.to_string()))
5738        }
5739    }
5740
5741    impl ::std::convert::TryFrom<&str> for X {
5742        type Error = self::error::ConversionError;
5743        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5744            value.parse()
5745        }
5746    }
5747
5748    impl ::std::convert::TryFrom<&::std::string::String> for X {
5749        type Error = self::error::ConversionError;
5750        fn try_from(
5751            value: &::std::string::String,
5752        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5753            value.parse()
5754        }
5755    }
5756
5757    impl ::std::convert::TryFrom<::std::string::String> for X {
5758        type Error = self::error::ConversionError;
5759        fn try_from(
5760            value: ::std::string::String,
5761        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5762            value.parse()
5763        }
5764    }
5765
5766    impl<'de> ::serde::Deserialize<'de> for X {
5767        fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
5768        where
5769            D: ::serde::Deserializer<'de>,
5770        {
5771            ::std::string::String::deserialize(deserializer)?
5772                .parse()
5773                .map_err(|e: self::error::ConversionError| {
5774                    <D::Error as ::serde::de::Error>::custom(e.to_string())
5775                })
5776        }
5777    }
5778}
5779
5780#[derive(Clone, Debug)]
5781#[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   ```\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>\n```\nPlease note that personal access tokens were deprecated in December 2025 and are no longer available for use.\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"]
5782pub struct Client {
5783    pub(crate) baseurl: String,
5784    pub(crate) client: reqwest::Client,
5785}
5786
5787impl Client {
5788    #[doc = r" Create a new client."]
5789    #[doc = r""]
5790    #[doc = r" `baseurl` is the base URL provided to the internal"]
5791    #[doc = r" `reqwest::Client`, and should include a scheme and hostname,"]
5792    #[doc = r" as well as port and a path stem if applicable."]
5793    pub fn new(baseurl: &str) -> Self {
5794        #[cfg(not(target_arch = "wasm32"))]
5795        let client = {
5796            let dur = ::std::time::Duration::from_secs(15u64);
5797            reqwest::ClientBuilder::new()
5798                .connect_timeout(dur)
5799                .timeout(dur)
5800        };
5801        #[cfg(target_arch = "wasm32")]
5802        let client = reqwest::ClientBuilder::new();
5803        Self::new_with_client(baseurl, client.build().unwrap())
5804    }
5805
5806    #[doc = r" Construct a new client with an existing `reqwest::Client`,"]
5807    #[doc = r" allowing more control over its configuration."]
5808    #[doc = r""]
5809    #[doc = r" `baseurl` is the base URL provided to the internal"]
5810    #[doc = r" `reqwest::Client`, and should include a scheme and hostname,"]
5811    #[doc = r" as well as port and a path stem if applicable."]
5812    pub fn new_with_client(baseurl: &str, client: reqwest::Client) -> Self {
5813        Self {
5814            baseurl: baseurl.to_string(),
5815            client,
5816        }
5817    }
5818}
5819
5820impl ClientInfo<()> for Client {
5821    fn api_version() -> &'static str {
5822        "2.0"
5823    }
5824
5825    fn baseurl(&self) -> &str {
5826        self.baseurl.as_str()
5827    }
5828
5829    fn client(&self) -> &reqwest::Client {
5830        &self.client
5831    }
5832
5833    fn inner(&self) -> &() {
5834        &()
5835    }
5836}
5837
5838impl ClientHooks<()> for &Client {}
5839#[allow(clippy::all)]
5840impl Client {
5841    #[doc = "Sandbox - Multiple Daily Activity Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_activity`\n\n"]
5842    pub async fn sandbox_multiple_daily_activity_documents_v2_sandbox_usercollection_daily_activity_get<
5843        'a,
5844    >(
5845        &'a self,
5846        end_date: Option<&'a ::chrono::naive::NaiveDate>,
5847        next_token: Option<&'a str>,
5848        start_date: Option<&'a ::chrono::naive::NaiveDate>,
5849    ) -> Result<
5850        ResponseValue<types::MultiDocumentResponsePublicDailyActivity>,
5851        Error<types::HttpValidationError>,
5852    > {
5853        let url = format!("{}/v2/sandbox/usercollection/daily_activity", self.baseurl,);
5854        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
5855        header_map.append(
5856            ::reqwest::header::HeaderName::from_static("api-version"),
5857            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
5858        );
5859        #[allow(unused_mut)]
5860        let mut request = self
5861            .client
5862            .get(url)
5863            .header(
5864                ::reqwest::header::ACCEPT,
5865                ::reqwest::header::HeaderValue::from_static("application/json"),
5866            )
5867            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
5868            .query(&progenitor_client::QueryParam::new(
5869                "next_token",
5870                &next_token,
5871            ))
5872            .query(&progenitor_client::QueryParam::new(
5873                "start_date",
5874                &start_date,
5875            ))
5876            .headers(header_map)
5877            .build()?;
5878        let info = OperationInfo { operation_id : "sandbox_multiple_daily_activity_documents_v2_sandbox_usercollection_daily_activity_get" , } ;
5879        self.pre(&mut request, &info).await?;
5880        let result = self.exec(request, &info).await;
5881        self.post(&result, &info).await?;
5882        let response = result?;
5883        match response.status().as_u16() {
5884            200u16 => ResponseValue::from_response(response).await,
5885            422u16 => Err(Error::ErrorResponse(
5886                ResponseValue::from_response(response).await?,
5887            )),
5888            _ => Err(Error::UnexpectedResponse(response)),
5889        }
5890    }
5891
5892    #[doc = "Sandbox - Single Daily Activity Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_activity/{document_id}`\n\n"]
5893    pub async fn sandbox_single_daily_activity_document_v2_sandbox_usercollection_daily_activity_document_id_get<
5894        'a,
5895    >(
5896        &'a self,
5897        document_id: &'a str,
5898    ) -> Result<ResponseValue<types::PublicDailyActivity>, Error<types::HttpValidationError>> {
5899        let url = format!(
5900            "{}/v2/sandbox/usercollection/daily_activity/{}",
5901            self.baseurl,
5902            encode_path(&document_id.to_string()),
5903        );
5904        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
5905        header_map.append(
5906            ::reqwest::header::HeaderName::from_static("api-version"),
5907            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
5908        );
5909        #[allow(unused_mut)]
5910        let mut request = self
5911            .client
5912            .get(url)
5913            .header(
5914                ::reqwest::header::ACCEPT,
5915                ::reqwest::header::HeaderValue::from_static("application/json"),
5916            )
5917            .headers(header_map)
5918            .build()?;
5919        let info = OperationInfo { operation_id : "sandbox_single_daily_activity_document_v2_sandbox_usercollection_daily_activity_document_id_get" , } ;
5920        self.pre(&mut request, &info).await?;
5921        let result = self.exec(request, &info).await;
5922        self.post(&result, &info).await?;
5923        let response = result?;
5924        match response.status().as_u16() {
5925            200u16 => ResponseValue::from_response(response).await,
5926            422u16 => Err(Error::ErrorResponse(
5927                ResponseValue::from_response(response).await?,
5928            )),
5929            _ => Err(Error::UnexpectedResponse(response)),
5930        }
5931    }
5932
5933    #[doc = "Sandbox - Multiple Daily Cardiovascular Age Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_cardiovascular_age`\n\n"]
5934    pub async fn sandbox_multiple_daily_cardiovascular_age_documents_v2_sandbox_usercollection_daily_cardiovascular_age_get<
5935        'a,
5936    >(
5937        &'a self,
5938        end_date: Option<&'a ::chrono::naive::NaiveDate>,
5939        next_token: Option<&'a str>,
5940        start_date: Option<&'a ::chrono::naive::NaiveDate>,
5941    ) -> Result<
5942        ResponseValue<types::MultiDocumentResponsePublicDailyCardiovascularAge>,
5943        Error<types::HttpValidationError>,
5944    > {
5945        let url = format!(
5946            "{}/v2/sandbox/usercollection/daily_cardiovascular_age",
5947            self.baseurl,
5948        );
5949        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
5950        header_map.append(
5951            ::reqwest::header::HeaderName::from_static("api-version"),
5952            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
5953        );
5954        #[allow(unused_mut)]
5955        let mut request = self
5956            .client
5957            .get(url)
5958            .header(
5959                ::reqwest::header::ACCEPT,
5960                ::reqwest::header::HeaderValue::from_static("application/json"),
5961            )
5962            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
5963            .query(&progenitor_client::QueryParam::new(
5964                "next_token",
5965                &next_token,
5966            ))
5967            .query(&progenitor_client::QueryParam::new(
5968                "start_date",
5969                &start_date,
5970            ))
5971            .headers(header_map)
5972            .build()?;
5973        let info = OperationInfo { operation_id : "sandbox_multiple_daily_cardiovascular_age_documents_v2_sandbox_usercollection_daily_cardiovascular_age_get" , } ;
5974        self.pre(&mut request, &info).await?;
5975        let result = self.exec(request, &info).await;
5976        self.post(&result, &info).await?;
5977        let response = result?;
5978        match response.status().as_u16() {
5979            200u16 => ResponseValue::from_response(response).await,
5980            422u16 => Err(Error::ErrorResponse(
5981                ResponseValue::from_response(response).await?,
5982            )),
5983            _ => Err(Error::UnexpectedResponse(response)),
5984        }
5985    }
5986
5987    #[doc = "Sandbox - Single Daily Cardiovascular Age Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_cardiovascular_age/{document_id}`\n\n"]
5988    pub async fn sandbox_single_daily_cardiovascular_age_document_v2_sandbox_usercollection_daily_cardiovascular_age_document_id_get<
5989        'a,
5990    >(
5991        &'a self,
5992        document_id: &'a str,
5993    ) -> Result<ResponseValue<types::PublicDailyCardiovascularAge>, Error<types::HttpValidationError>>
5994    {
5995        let url = format!(
5996            "{}/v2/sandbox/usercollection/daily_cardiovascular_age/{}",
5997            self.baseurl,
5998            encode_path(&document_id.to_string()),
5999        );
6000        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6001        header_map.append(
6002            ::reqwest::header::HeaderName::from_static("api-version"),
6003            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6004        );
6005        #[allow(unused_mut)]
6006        let mut request = self
6007            .client
6008            .get(url)
6009            .header(
6010                ::reqwest::header::ACCEPT,
6011                ::reqwest::header::HeaderValue::from_static("application/json"),
6012            )
6013            .headers(header_map)
6014            .build()?;
6015        let info = OperationInfo { operation_id : "sandbox_single_daily_cardiovascular_age_document_v2_sandbox_usercollection_daily_cardiovascular_age_document_id_get" , } ;
6016        self.pre(&mut request, &info).await?;
6017        let result = self.exec(request, &info).await;
6018        self.post(&result, &info).await?;
6019        let response = result?;
6020        match response.status().as_u16() {
6021            200u16 => ResponseValue::from_response(response).await,
6022            422u16 => Err(Error::ErrorResponse(
6023                ResponseValue::from_response(response).await?,
6024            )),
6025            _ => Err(Error::UnexpectedResponse(response)),
6026        }
6027    }
6028
6029    #[doc = "Sandbox - Multiple Daily Readiness Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_readiness`\n\n"]
6030    pub async fn sandbox_multiple_daily_readiness_documents_v2_sandbox_usercollection_daily_readiness_get<
6031        'a,
6032    >(
6033        &'a self,
6034        end_date: Option<&'a ::chrono::naive::NaiveDate>,
6035        next_token: Option<&'a str>,
6036        start_date: Option<&'a ::chrono::naive::NaiveDate>,
6037    ) -> Result<
6038        ResponseValue<types::MultiDocumentResponsePublicDailyReadiness>,
6039        Error<types::HttpValidationError>,
6040    > {
6041        let url = format!("{}/v2/sandbox/usercollection/daily_readiness", self.baseurl,);
6042        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6043        header_map.append(
6044            ::reqwest::header::HeaderName::from_static("api-version"),
6045            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6046        );
6047        #[allow(unused_mut)]
6048        let mut request = self
6049            .client
6050            .get(url)
6051            .header(
6052                ::reqwest::header::ACCEPT,
6053                ::reqwest::header::HeaderValue::from_static("application/json"),
6054            )
6055            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
6056            .query(&progenitor_client::QueryParam::new(
6057                "next_token",
6058                &next_token,
6059            ))
6060            .query(&progenitor_client::QueryParam::new(
6061                "start_date",
6062                &start_date,
6063            ))
6064            .headers(header_map)
6065            .build()?;
6066        let info = OperationInfo { operation_id : "sandbox_multiple_daily_readiness_documents_v2_sandbox_usercollection_daily_readiness_get" , } ;
6067        self.pre(&mut request, &info).await?;
6068        let result = self.exec(request, &info).await;
6069        self.post(&result, &info).await?;
6070        let response = result?;
6071        match response.status().as_u16() {
6072            200u16 => ResponseValue::from_response(response).await,
6073            422u16 => Err(Error::ErrorResponse(
6074                ResponseValue::from_response(response).await?,
6075            )),
6076            _ => Err(Error::UnexpectedResponse(response)),
6077        }
6078    }
6079
6080    #[doc = "Sandbox - Single Daily Readiness Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_readiness/{document_id}`\n\n"]
6081    pub async fn sandbox_single_daily_readiness_document_v2_sandbox_usercollection_daily_readiness_document_id_get<
6082        'a,
6083    >(
6084        &'a self,
6085        document_id: &'a str,
6086    ) -> Result<ResponseValue<types::PublicDailyReadiness>, Error<types::HttpValidationError>> {
6087        let url = format!(
6088            "{}/v2/sandbox/usercollection/daily_readiness/{}",
6089            self.baseurl,
6090            encode_path(&document_id.to_string()),
6091        );
6092        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6093        header_map.append(
6094            ::reqwest::header::HeaderName::from_static("api-version"),
6095            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6096        );
6097        #[allow(unused_mut)]
6098        let mut request = self
6099            .client
6100            .get(url)
6101            .header(
6102                ::reqwest::header::ACCEPT,
6103                ::reqwest::header::HeaderValue::from_static("application/json"),
6104            )
6105            .headers(header_map)
6106            .build()?;
6107        let info = OperationInfo { operation_id : "sandbox_single_daily_readiness_document_v2_sandbox_usercollection_daily_readiness_document_id_get" , } ;
6108        self.pre(&mut request, &info).await?;
6109        let result = self.exec(request, &info).await;
6110        self.post(&result, &info).await?;
6111        let response = result?;
6112        match response.status().as_u16() {
6113            200u16 => ResponseValue::from_response(response).await,
6114            422u16 => Err(Error::ErrorResponse(
6115                ResponseValue::from_response(response).await?,
6116            )),
6117            _ => Err(Error::UnexpectedResponse(response)),
6118        }
6119    }
6120
6121    #[doc = "Sandbox - Multiple Daily Resilience Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_resilience`\n\n"]
6122    pub async fn sandbox_multiple_daily_resilience_documents_v2_sandbox_usercollection_daily_resilience_get<
6123        'a,
6124    >(
6125        &'a self,
6126        end_date: Option<&'a ::chrono::naive::NaiveDate>,
6127        next_token: Option<&'a str>,
6128        start_date: Option<&'a ::chrono::naive::NaiveDate>,
6129    ) -> Result<
6130        ResponseValue<types::MultiDocumentResponseDailyResilienceModel>,
6131        Error<types::HttpValidationError>,
6132    > {
6133        let url = format!(
6134            "{}/v2/sandbox/usercollection/daily_resilience",
6135            self.baseurl,
6136        );
6137        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6138        header_map.append(
6139            ::reqwest::header::HeaderName::from_static("api-version"),
6140            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6141        );
6142        #[allow(unused_mut)]
6143        let mut request = self
6144            .client
6145            .get(url)
6146            .header(
6147                ::reqwest::header::ACCEPT,
6148                ::reqwest::header::HeaderValue::from_static("application/json"),
6149            )
6150            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
6151            .query(&progenitor_client::QueryParam::new(
6152                "next_token",
6153                &next_token,
6154            ))
6155            .query(&progenitor_client::QueryParam::new(
6156                "start_date",
6157                &start_date,
6158            ))
6159            .headers(header_map)
6160            .build()?;
6161        let info = OperationInfo { operation_id : "sandbox_multiple_daily_resilience_documents_v2_sandbox_usercollection_daily_resilience_get" , } ;
6162        self.pre(&mut request, &info).await?;
6163        let result = self.exec(request, &info).await;
6164        self.post(&result, &info).await?;
6165        let response = result?;
6166        match response.status().as_u16() {
6167            200u16 => ResponseValue::from_response(response).await,
6168            422u16 => Err(Error::ErrorResponse(
6169                ResponseValue::from_response(response).await?,
6170            )),
6171            _ => Err(Error::UnexpectedResponse(response)),
6172        }
6173    }
6174
6175    #[doc = "Sandbox - Single Daily Resilience Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_resilience/{document_id}`\n\n"]
6176    pub async fn sandbox_single_daily_resilience_document_v2_sandbox_usercollection_daily_resilience_document_id_get<
6177        'a,
6178    >(
6179        &'a self,
6180        document_id: &'a str,
6181    ) -> Result<ResponseValue<types::DailyResilienceModel>, Error<types::HttpValidationError>> {
6182        let url = format!(
6183            "{}/v2/sandbox/usercollection/daily_resilience/{}",
6184            self.baseurl,
6185            encode_path(&document_id.to_string()),
6186        );
6187        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6188        header_map.append(
6189            ::reqwest::header::HeaderName::from_static("api-version"),
6190            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6191        );
6192        #[allow(unused_mut)]
6193        let mut request = self
6194            .client
6195            .get(url)
6196            .header(
6197                ::reqwest::header::ACCEPT,
6198                ::reqwest::header::HeaderValue::from_static("application/json"),
6199            )
6200            .headers(header_map)
6201            .build()?;
6202        let info = OperationInfo { operation_id : "sandbox_single_daily_resilience_document_v2_sandbox_usercollection_daily_resilience_document_id_get" , } ;
6203        self.pre(&mut request, &info).await?;
6204        let result = self.exec(request, &info).await;
6205        self.post(&result, &info).await?;
6206        let response = result?;
6207        match response.status().as_u16() {
6208            200u16 => ResponseValue::from_response(response).await,
6209            422u16 => Err(Error::ErrorResponse(
6210                ResponseValue::from_response(response).await?,
6211            )),
6212            _ => Err(Error::UnexpectedResponse(response)),
6213        }
6214    }
6215
6216    #[doc = "Sandbox - Multiple Daily Sleep Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_sleep`\n\n"]
6217    pub async fn sandbox_multiple_daily_sleep_documents_v2_sandbox_usercollection_daily_sleep_get<
6218        'a,
6219    >(
6220        &'a self,
6221        end_date: Option<&'a ::chrono::naive::NaiveDate>,
6222        next_token: Option<&'a str>,
6223        start_date: Option<&'a ::chrono::naive::NaiveDate>,
6224    ) -> Result<
6225        ResponseValue<types::MultiDocumentResponsePublicDailySleep>,
6226        Error<types::HttpValidationError>,
6227    > {
6228        let url = format!("{}/v2/sandbox/usercollection/daily_sleep", self.baseurl,);
6229        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6230        header_map.append(
6231            ::reqwest::header::HeaderName::from_static("api-version"),
6232            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6233        );
6234        #[allow(unused_mut)]
6235        let mut request = self
6236            .client
6237            .get(url)
6238            .header(
6239                ::reqwest::header::ACCEPT,
6240                ::reqwest::header::HeaderValue::from_static("application/json"),
6241            )
6242            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
6243            .query(&progenitor_client::QueryParam::new(
6244                "next_token",
6245                &next_token,
6246            ))
6247            .query(&progenitor_client::QueryParam::new(
6248                "start_date",
6249                &start_date,
6250            ))
6251            .headers(header_map)
6252            .build()?;
6253        let info = OperationInfo {
6254            operation_id:
6255                "sandbox_multiple_daily_sleep_documents_v2_sandbox_usercollection_daily_sleep_get",
6256        };
6257        self.pre(&mut request, &info).await?;
6258        let result = self.exec(request, &info).await;
6259        self.post(&result, &info).await?;
6260        let response = result?;
6261        match response.status().as_u16() {
6262            200u16 => ResponseValue::from_response(response).await,
6263            422u16 => Err(Error::ErrorResponse(
6264                ResponseValue::from_response(response).await?,
6265            )),
6266            _ => Err(Error::UnexpectedResponse(response)),
6267        }
6268    }
6269
6270    #[doc = "Sandbox - Single Daily Sleep Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_sleep/{document_id}`\n\n"]
6271    pub async fn sandbox_single_daily_sleep_document_v2_sandbox_usercollection_daily_sleep_document_id_get<
6272        'a,
6273    >(
6274        &'a self,
6275        document_id: &'a str,
6276    ) -> Result<ResponseValue<types::PublicDailySleep>, Error<types::HttpValidationError>> {
6277        let url = format!(
6278            "{}/v2/sandbox/usercollection/daily_sleep/{}",
6279            self.baseurl,
6280            encode_path(&document_id.to_string()),
6281        );
6282        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6283        header_map.append(
6284            ::reqwest::header::HeaderName::from_static("api-version"),
6285            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6286        );
6287        #[allow(unused_mut)]
6288        let mut request = self
6289            .client
6290            .get(url)
6291            .header(
6292                ::reqwest::header::ACCEPT,
6293                ::reqwest::header::HeaderValue::from_static("application/json"),
6294            )
6295            .headers(header_map)
6296            .build()?;
6297        let info = OperationInfo { operation_id : "sandbox_single_daily_sleep_document_v2_sandbox_usercollection_daily_sleep_document_id_get" , } ;
6298        self.pre(&mut request, &info).await?;
6299        let result = self.exec(request, &info).await;
6300        self.post(&result, &info).await?;
6301        let response = result?;
6302        match response.status().as_u16() {
6303            200u16 => ResponseValue::from_response(response).await,
6304            422u16 => Err(Error::ErrorResponse(
6305                ResponseValue::from_response(response).await?,
6306            )),
6307            _ => Err(Error::UnexpectedResponse(response)),
6308        }
6309    }
6310
6311    #[doc = "Sandbox - Multiple Daily Spo2 Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_spo2`\n\n"]
6312    pub async fn sandbox_multiple_daily_spo2_documents_v2_sandbox_usercollection_daily_spo2_get<
6313        'a,
6314    >(
6315        &'a self,
6316        end_date: Option<&'a ::chrono::naive::NaiveDate>,
6317        next_token: Option<&'a str>,
6318        start_date: Option<&'a ::chrono::naive::NaiveDate>,
6319    ) -> Result<
6320        ResponseValue<types::MultiDocumentResponsePublicDailySpO2>,
6321        Error<types::HttpValidationError>,
6322    > {
6323        let url = format!("{}/v2/sandbox/usercollection/daily_spo2", self.baseurl,);
6324        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6325        header_map.append(
6326            ::reqwest::header::HeaderName::from_static("api-version"),
6327            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6328        );
6329        #[allow(unused_mut)]
6330        let mut request = self
6331            .client
6332            .get(url)
6333            .header(
6334                ::reqwest::header::ACCEPT,
6335                ::reqwest::header::HeaderValue::from_static("application/json"),
6336            )
6337            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
6338            .query(&progenitor_client::QueryParam::new(
6339                "next_token",
6340                &next_token,
6341            ))
6342            .query(&progenitor_client::QueryParam::new(
6343                "start_date",
6344                &start_date,
6345            ))
6346            .headers(header_map)
6347            .build()?;
6348        let info = OperationInfo {
6349            operation_id:
6350                "sandbox_multiple_daily_spo2_documents_v2_sandbox_usercollection_daily_spo2_get",
6351        };
6352        self.pre(&mut request, &info).await?;
6353        let result = self.exec(request, &info).await;
6354        self.post(&result, &info).await?;
6355        let response = result?;
6356        match response.status().as_u16() {
6357            200u16 => ResponseValue::from_response(response).await,
6358            422u16 => Err(Error::ErrorResponse(
6359                ResponseValue::from_response(response).await?,
6360            )),
6361            _ => Err(Error::UnexpectedResponse(response)),
6362        }
6363    }
6364
6365    #[doc = "Sandbox - Single Daily Spo2 Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_spo2/{document_id}`\n\n"]
6366    pub async fn sandbox_single_daily_spo2_document_v2_sandbox_usercollection_daily_spo2_document_id_get<
6367        'a,
6368    >(
6369        &'a self,
6370        document_id: &'a str,
6371    ) -> Result<ResponseValue<types::PublicDailySpO2>, Error<types::HttpValidationError>> {
6372        let url = format!(
6373            "{}/v2/sandbox/usercollection/daily_spo2/{}",
6374            self.baseurl,
6375            encode_path(&document_id.to_string()),
6376        );
6377        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6378        header_map.append(
6379            ::reqwest::header::HeaderName::from_static("api-version"),
6380            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6381        );
6382        #[allow(unused_mut)]
6383        let mut request = self
6384            .client
6385            .get(url)
6386            .header(
6387                ::reqwest::header::ACCEPT,
6388                ::reqwest::header::HeaderValue::from_static("application/json"),
6389            )
6390            .headers(header_map)
6391            .build()?;
6392        let info = OperationInfo { operation_id : "sandbox_single_daily_spo2_document_v2_sandbox_usercollection_daily_spo2_document_id_get" , } ;
6393        self.pre(&mut request, &info).await?;
6394        let result = self.exec(request, &info).await;
6395        self.post(&result, &info).await?;
6396        let response = result?;
6397        match response.status().as_u16() {
6398            200u16 => ResponseValue::from_response(response).await,
6399            422u16 => Err(Error::ErrorResponse(
6400                ResponseValue::from_response(response).await?,
6401            )),
6402            _ => Err(Error::UnexpectedResponse(response)),
6403        }
6404    }
6405
6406    #[doc = "Sandbox - Multiple Daily Stress Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_stress`\n\n"]
6407    pub async fn sandbox_multiple_daily_stress_documents_v2_sandbox_usercollection_daily_stress_get<
6408        'a,
6409    >(
6410        &'a self,
6411        end_date: Option<&'a ::chrono::naive::NaiveDate>,
6412        next_token: Option<&'a str>,
6413        start_date: Option<&'a ::chrono::naive::NaiveDate>,
6414    ) -> Result<
6415        ResponseValue<types::MultiDocumentResponsePublicDailyStress>,
6416        Error<types::HttpValidationError>,
6417    > {
6418        let url = format!("{}/v2/sandbox/usercollection/daily_stress", self.baseurl,);
6419        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6420        header_map.append(
6421            ::reqwest::header::HeaderName::from_static("api-version"),
6422            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6423        );
6424        #[allow(unused_mut)]
6425        let mut request = self
6426            .client
6427            .get(url)
6428            .header(
6429                ::reqwest::header::ACCEPT,
6430                ::reqwest::header::HeaderValue::from_static("application/json"),
6431            )
6432            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
6433            .query(&progenitor_client::QueryParam::new(
6434                "next_token",
6435                &next_token,
6436            ))
6437            .query(&progenitor_client::QueryParam::new(
6438                "start_date",
6439                &start_date,
6440            ))
6441            .headers(header_map)
6442            .build()?;
6443        let info = OperationInfo {
6444            operation_id:
6445                "sandbox_multiple_daily_stress_documents_v2_sandbox_usercollection_daily_stress_get",
6446        };
6447        self.pre(&mut request, &info).await?;
6448        let result = self.exec(request, &info).await;
6449        self.post(&result, &info).await?;
6450        let response = result?;
6451        match response.status().as_u16() {
6452            200u16 => ResponseValue::from_response(response).await,
6453            422u16 => Err(Error::ErrorResponse(
6454                ResponseValue::from_response(response).await?,
6455            )),
6456            _ => Err(Error::UnexpectedResponse(response)),
6457        }
6458    }
6459
6460    #[doc = "Sandbox - Single Daily Stress Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/daily_stress/{document_id}`\n\n"]
6461    pub async fn sandbox_single_daily_stress_document_v2_sandbox_usercollection_daily_stress_document_id_get<
6462        'a,
6463    >(
6464        &'a self,
6465        document_id: &'a str,
6466    ) -> Result<ResponseValue<types::PublicDailyStress>, Error<types::HttpValidationError>> {
6467        let url = format!(
6468            "{}/v2/sandbox/usercollection/daily_stress/{}",
6469            self.baseurl,
6470            encode_path(&document_id.to_string()),
6471        );
6472        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6473        header_map.append(
6474            ::reqwest::header::HeaderName::from_static("api-version"),
6475            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6476        );
6477        #[allow(unused_mut)]
6478        let mut request = self
6479            .client
6480            .get(url)
6481            .header(
6482                ::reqwest::header::ACCEPT,
6483                ::reqwest::header::HeaderValue::from_static("application/json"),
6484            )
6485            .headers(header_map)
6486            .build()?;
6487        let info = OperationInfo { operation_id : "sandbox_single_daily_stress_document_v2_sandbox_usercollection_daily_stress_document_id_get" , } ;
6488        self.pre(&mut request, &info).await?;
6489        let result = self.exec(request, &info).await;
6490        self.post(&result, &info).await?;
6491        let response = result?;
6492        match response.status().as_u16() {
6493            200u16 => ResponseValue::from_response(response).await,
6494            422u16 => Err(Error::ErrorResponse(
6495                ResponseValue::from_response(response).await?,
6496            )),
6497            _ => Err(Error::UnexpectedResponse(response)),
6498        }
6499    }
6500
6501    #[doc = "Sandbox - Multiple Enhanced Tag Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/enhanced_tag`\n\n"]
6502    pub async fn sandbox_multiple_enhanced_tag_documents_v2_sandbox_usercollection_enhanced_tag_get<
6503        'a,
6504    >(
6505        &'a self,
6506        end_date: Option<&'a ::chrono::naive::NaiveDate>,
6507        next_token: Option<&'a str>,
6508        start_date: Option<&'a ::chrono::naive::NaiveDate>,
6509    ) -> Result<
6510        ResponseValue<types::MultiDocumentResponseEnhancedTagModel>,
6511        Error<types::HttpValidationError>,
6512    > {
6513        let url = format!("{}/v2/sandbox/usercollection/enhanced_tag", self.baseurl,);
6514        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6515        header_map.append(
6516            ::reqwest::header::HeaderName::from_static("api-version"),
6517            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6518        );
6519        #[allow(unused_mut)]
6520        let mut request = self
6521            .client
6522            .get(url)
6523            .header(
6524                ::reqwest::header::ACCEPT,
6525                ::reqwest::header::HeaderValue::from_static("application/json"),
6526            )
6527            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
6528            .query(&progenitor_client::QueryParam::new(
6529                "next_token",
6530                &next_token,
6531            ))
6532            .query(&progenitor_client::QueryParam::new(
6533                "start_date",
6534                &start_date,
6535            ))
6536            .headers(header_map)
6537            .build()?;
6538        let info = OperationInfo {
6539            operation_id:
6540                "sandbox_multiple_enhanced_tag_documents_v2_sandbox_usercollection_enhanced_tag_get",
6541        };
6542        self.pre(&mut request, &info).await?;
6543        let result = self.exec(request, &info).await;
6544        self.post(&result, &info).await?;
6545        let response = result?;
6546        match response.status().as_u16() {
6547            200u16 => ResponseValue::from_response(response).await,
6548            422u16 => Err(Error::ErrorResponse(
6549                ResponseValue::from_response(response).await?,
6550            )),
6551            _ => Err(Error::UnexpectedResponse(response)),
6552        }
6553    }
6554
6555    #[doc = "Sandbox - Single Enhanced Tag Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/enhanced_tag/{document_id}`\n\n"]
6556    pub async fn sandbox_single_enhanced_tag_document_v2_sandbox_usercollection_enhanced_tag_document_id_get<
6557        'a,
6558    >(
6559        &'a self,
6560        document_id: &'a str,
6561    ) -> Result<ResponseValue<types::EnhancedTagModel>, Error<types::HttpValidationError>> {
6562        let url = format!(
6563            "{}/v2/sandbox/usercollection/enhanced_tag/{}",
6564            self.baseurl,
6565            encode_path(&document_id.to_string()),
6566        );
6567        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6568        header_map.append(
6569            ::reqwest::header::HeaderName::from_static("api-version"),
6570            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6571        );
6572        #[allow(unused_mut)]
6573        let mut request = self
6574            .client
6575            .get(url)
6576            .header(
6577                ::reqwest::header::ACCEPT,
6578                ::reqwest::header::HeaderValue::from_static("application/json"),
6579            )
6580            .headers(header_map)
6581            .build()?;
6582        let info = OperationInfo { operation_id : "sandbox_single_enhanced_tag_document_v2_sandbox_usercollection_enhanced_tag_document_id_get" , } ;
6583        self.pre(&mut request, &info).await?;
6584        let result = self.exec(request, &info).await;
6585        self.post(&result, &info).await?;
6586        let response = result?;
6587        match response.status().as_u16() {
6588            200u16 => ResponseValue::from_response(response).await,
6589            422u16 => Err(Error::ErrorResponse(
6590                ResponseValue::from_response(response).await?,
6591            )),
6592            _ => Err(Error::UnexpectedResponse(response)),
6593        }
6594    }
6595
6596    #[doc = "Sandbox - Multiple Heartrate Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/heartrate`\n\n"]
6597    pub async fn sandbox_multiple_heartrate_documents_v2_sandbox_usercollection_heartrate_get<
6598        'a,
6599    >(
6600        &'a self,
6601        end_datetime: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>,
6602        next_token: Option<&'a str>,
6603        start_datetime: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>,
6604    ) -> Result<
6605        ResponseValue<
6606            types::ResponseSandboxMultipleHeartrateDocumentsV2SandboxUsercollectionHeartrateGet,
6607        >,
6608        Error<types::HttpValidationError>,
6609    > {
6610        let url = format!("{}/v2/sandbox/usercollection/heartrate", self.baseurl,);
6611        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6612        header_map.append(
6613            ::reqwest::header::HeaderName::from_static("api-version"),
6614            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6615        );
6616        #[allow(unused_mut)]
6617        let mut request = self
6618            .client
6619            .get(url)
6620            .header(
6621                ::reqwest::header::ACCEPT,
6622                ::reqwest::header::HeaderValue::from_static("application/json"),
6623            )
6624            .query(&progenitor_client::QueryParam::new(
6625                "end_datetime",
6626                &end_datetime,
6627            ))
6628            .query(&progenitor_client::QueryParam::new(
6629                "next_token",
6630                &next_token,
6631            ))
6632            .query(&progenitor_client::QueryParam::new(
6633                "start_datetime",
6634                &start_datetime,
6635            ))
6636            .headers(header_map)
6637            .build()?;
6638        let info = OperationInfo {
6639            operation_id:
6640                "sandbox_multiple_heartrate_documents_v2_sandbox_usercollection_heartrate_get",
6641        };
6642        self.pre(&mut request, &info).await?;
6643        let result = self.exec(request, &info).await;
6644        self.post(&result, &info).await?;
6645        let response = result?;
6646        match response.status().as_u16() {
6647            200u16 => ResponseValue::from_response(response).await,
6648            422u16 => Err(Error::ErrorResponse(
6649                ResponseValue::from_response(response).await?,
6650            )),
6651            _ => Err(Error::UnexpectedResponse(response)),
6652        }
6653    }
6654
6655    #[doc = "Sandbox - Multiple Rest Mode Period Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/rest_mode_period`\n\n"]
6656    pub async fn sandbox_multiple_rest_mode_period_documents_v2_sandbox_usercollection_rest_mode_period_get<
6657        'a,
6658    >(
6659        &'a self,
6660        end_date: Option<&'a ::chrono::naive::NaiveDate>,
6661        next_token: Option<&'a str>,
6662        start_date: Option<&'a ::chrono::naive::NaiveDate>,
6663    ) -> Result<
6664        ResponseValue<types::MultiDocumentResponsePublicRestModePeriod>,
6665        Error<types::HttpValidationError>,
6666    > {
6667        let url = format!(
6668            "{}/v2/sandbox/usercollection/rest_mode_period",
6669            self.baseurl,
6670        );
6671        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6672        header_map.append(
6673            ::reqwest::header::HeaderName::from_static("api-version"),
6674            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6675        );
6676        #[allow(unused_mut)]
6677        let mut request = self
6678            .client
6679            .get(url)
6680            .header(
6681                ::reqwest::header::ACCEPT,
6682                ::reqwest::header::HeaderValue::from_static("application/json"),
6683            )
6684            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
6685            .query(&progenitor_client::QueryParam::new(
6686                "next_token",
6687                &next_token,
6688            ))
6689            .query(&progenitor_client::QueryParam::new(
6690                "start_date",
6691                &start_date,
6692            ))
6693            .headers(header_map)
6694            .build()?;
6695        let info = OperationInfo { operation_id : "sandbox_multiple_rest_mode_period_documents_v2_sandbox_usercollection_rest_mode_period_get" , } ;
6696        self.pre(&mut request, &info).await?;
6697        let result = self.exec(request, &info).await;
6698        self.post(&result, &info).await?;
6699        let response = result?;
6700        match response.status().as_u16() {
6701            200u16 => ResponseValue::from_response(response).await,
6702            422u16 => Err(Error::ErrorResponse(
6703                ResponseValue::from_response(response).await?,
6704            )),
6705            _ => Err(Error::UnexpectedResponse(response)),
6706        }
6707    }
6708
6709    #[doc = "Sandbox - Single Rest Mode Period Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/rest_mode_period/{document_id}`\n\n"]
6710    pub async fn sandbox_single_rest_mode_period_document_v2_sandbox_usercollection_rest_mode_period_document_id_get<
6711        'a,
6712    >(
6713        &'a self,
6714        document_id: &'a str,
6715    ) -> Result<ResponseValue<types::PublicRestModePeriod>, Error<types::HttpValidationError>> {
6716        let url = format!(
6717            "{}/v2/sandbox/usercollection/rest_mode_period/{}",
6718            self.baseurl,
6719            encode_path(&document_id.to_string()),
6720        );
6721        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6722        header_map.append(
6723            ::reqwest::header::HeaderName::from_static("api-version"),
6724            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6725        );
6726        #[allow(unused_mut)]
6727        let mut request = self
6728            .client
6729            .get(url)
6730            .header(
6731                ::reqwest::header::ACCEPT,
6732                ::reqwest::header::HeaderValue::from_static("application/json"),
6733            )
6734            .headers(header_map)
6735            .build()?;
6736        let info = OperationInfo { operation_id : "sandbox_single_rest_mode_period_document_v2_sandbox_usercollection_rest_mode_period_document_id_get" , } ;
6737        self.pre(&mut request, &info).await?;
6738        let result = self.exec(request, &info).await;
6739        self.post(&result, &info).await?;
6740        let response = result?;
6741        match response.status().as_u16() {
6742            200u16 => ResponseValue::from_response(response).await,
6743            422u16 => Err(Error::ErrorResponse(
6744                ResponseValue::from_response(response).await?,
6745            )),
6746            _ => Err(Error::UnexpectedResponse(response)),
6747        }
6748    }
6749
6750    #[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 > , >{
6751        let url = format!(
6752            "{}/v2/sandbox/usercollection/ring_battery_level",
6753            self.baseurl,
6754        );
6755        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6756        header_map.append(
6757            ::reqwest::header::HeaderName::from_static("api-version"),
6758            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6759        );
6760        #[allow(unused_mut)]
6761        let mut request = self
6762            .client
6763            .get(url)
6764            .header(
6765                ::reqwest::header::ACCEPT,
6766                ::reqwest::header::HeaderValue::from_static("application/json"),
6767            )
6768            .query(&progenitor_client::QueryParam::new(
6769                "end_datetime",
6770                &end_datetime,
6771            ))
6772            .query(&progenitor_client::QueryParam::new(
6773                "next_token",
6774                &next_token,
6775            ))
6776            .query(&progenitor_client::QueryParam::new(
6777                "start_datetime",
6778                &start_datetime,
6779            ))
6780            .headers(header_map)
6781            .build()?;
6782        let info = OperationInfo { operation_id : "sandbox_multiple_ring_battery_level_documents_v2_sandbox_usercollection_ring_battery_level_get" , } ;
6783        self.pre(&mut request, &info).await?;
6784        let result = self.exec(request, &info).await;
6785        self.post(&result, &info).await?;
6786        let response = result?;
6787        match response.status().as_u16() {
6788            200u16 => ResponseValue::from_response(response).await,
6789            422u16 => Err(Error::ErrorResponse(
6790                ResponseValue::from_response(response).await?,
6791            )),
6792            _ => Err(Error::UnexpectedResponse(response)),
6793        }
6794    }
6795
6796    #[doc = "Sandbox - Multiple Ring Configuration Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/ring_configuration`\n\n"]
6797    pub async fn sandbox_multiple_ring_configuration_documents_v2_sandbox_usercollection_ring_configuration_get<
6798        'a,
6799    >(
6800        &'a self,
6801        next_token: Option<&'a str>,
6802    ) -> Result<
6803        ResponseValue<types::MultiDocumentResponsePublicRingConfiguration>,
6804        Error<types::HttpValidationError>,
6805    > {
6806        let url = format!(
6807            "{}/v2/sandbox/usercollection/ring_configuration",
6808            self.baseurl,
6809        );
6810        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6811        header_map.append(
6812            ::reqwest::header::HeaderName::from_static("api-version"),
6813            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6814        );
6815        #[allow(unused_mut)]
6816        let mut request = self
6817            .client
6818            .get(url)
6819            .header(
6820                ::reqwest::header::ACCEPT,
6821                ::reqwest::header::HeaderValue::from_static("application/json"),
6822            )
6823            .query(&progenitor_client::QueryParam::new(
6824                "next_token",
6825                &next_token,
6826            ))
6827            .headers(header_map)
6828            .build()?;
6829        let info = OperationInfo { operation_id : "sandbox_multiple_ring_configuration_documents_v2_sandbox_usercollection_ring_configuration_get" , } ;
6830        self.pre(&mut request, &info).await?;
6831        let result = self.exec(request, &info).await;
6832        self.post(&result, &info).await?;
6833        let response = result?;
6834        match response.status().as_u16() {
6835            200u16 => ResponseValue::from_response(response).await,
6836            422u16 => Err(Error::ErrorResponse(
6837                ResponseValue::from_response(response).await?,
6838            )),
6839            _ => Err(Error::UnexpectedResponse(response)),
6840        }
6841    }
6842
6843    #[doc = "Sandbox - Single Ring Configuration Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/ring_configuration/{document_id}`\n\n"]
6844    pub async fn sandbox_single_ring_configuration_document_v2_sandbox_usercollection_ring_configuration_document_id_get<
6845        'a,
6846    >(
6847        &'a self,
6848        document_id: &'a str,
6849    ) -> Result<ResponseValue<types::PublicRingConfiguration>, Error<types::HttpValidationError>>
6850    {
6851        let url = format!(
6852            "{}/v2/sandbox/usercollection/ring_configuration/{}",
6853            self.baseurl,
6854            encode_path(&document_id.to_string()),
6855        );
6856        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6857        header_map.append(
6858            ::reqwest::header::HeaderName::from_static("api-version"),
6859            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6860        );
6861        #[allow(unused_mut)]
6862        let mut request = self
6863            .client
6864            .get(url)
6865            .header(
6866                ::reqwest::header::ACCEPT,
6867                ::reqwest::header::HeaderValue::from_static("application/json"),
6868            )
6869            .headers(header_map)
6870            .build()?;
6871        let info = OperationInfo { operation_id : "sandbox_single_ring_configuration_document_v2_sandbox_usercollection_ring_configuration_document_id_get" , } ;
6872        self.pre(&mut request, &info).await?;
6873        let result = self.exec(request, &info).await;
6874        self.post(&result, &info).await?;
6875        let response = result?;
6876        match response.status().as_u16() {
6877            200u16 => ResponseValue::from_response(response).await,
6878            422u16 => Err(Error::ErrorResponse(
6879                ResponseValue::from_response(response).await?,
6880            )),
6881            _ => Err(Error::UnexpectedResponse(response)),
6882        }
6883    }
6884
6885    #[doc = "Sandbox - Multiple Session Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/session`\n\n"]
6886    pub async fn sandbox_multiple_session_documents_v2_sandbox_usercollection_session_get<'a>(
6887        &'a self,
6888        end_date: Option<&'a ::chrono::naive::NaiveDate>,
6889        next_token: Option<&'a str>,
6890        start_date: Option<&'a ::chrono::naive::NaiveDate>,
6891    ) -> Result<
6892        ResponseValue<types::MultiDocumentResponsePublicSession>,
6893        Error<types::HttpValidationError>,
6894    > {
6895        let url = format!("{}/v2/sandbox/usercollection/session", self.baseurl,);
6896        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6897        header_map.append(
6898            ::reqwest::header::HeaderName::from_static("api-version"),
6899            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6900        );
6901        #[allow(unused_mut)]
6902        let mut request = self
6903            .client
6904            .get(url)
6905            .header(
6906                ::reqwest::header::ACCEPT,
6907                ::reqwest::header::HeaderValue::from_static("application/json"),
6908            )
6909            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
6910            .query(&progenitor_client::QueryParam::new(
6911                "next_token",
6912                &next_token,
6913            ))
6914            .query(&progenitor_client::QueryParam::new(
6915                "start_date",
6916                &start_date,
6917            ))
6918            .headers(header_map)
6919            .build()?;
6920        let info = OperationInfo {
6921            operation_id:
6922                "sandbox_multiple_session_documents_v2_sandbox_usercollection_session_get",
6923        };
6924        self.pre(&mut request, &info).await?;
6925        let result = self.exec(request, &info).await;
6926        self.post(&result, &info).await?;
6927        let response = result?;
6928        match response.status().as_u16() {
6929            200u16 => ResponseValue::from_response(response).await,
6930            422u16 => Err(Error::ErrorResponse(
6931                ResponseValue::from_response(response).await?,
6932            )),
6933            _ => Err(Error::UnexpectedResponse(response)),
6934        }
6935    }
6936
6937    #[doc = "Sandbox - Single Session Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/session/{document_id}`\n\n"]
6938    pub async fn sandbox_single_session_document_v2_sandbox_usercollection_session_document_id_get<
6939        'a,
6940    >(
6941        &'a self,
6942        document_id: &'a str,
6943    ) -> Result<ResponseValue<types::PublicSession>, Error<types::HttpValidationError>> {
6944        let url = format!(
6945            "{}/v2/sandbox/usercollection/session/{}",
6946            self.baseurl,
6947            encode_path(&document_id.to_string()),
6948        );
6949        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6950        header_map.append(
6951            ::reqwest::header::HeaderName::from_static("api-version"),
6952            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6953        );
6954        #[allow(unused_mut)]
6955        let mut request = self
6956            .client
6957            .get(url)
6958            .header(
6959                ::reqwest::header::ACCEPT,
6960                ::reqwest::header::HeaderValue::from_static("application/json"),
6961            )
6962            .headers(header_map)
6963            .build()?;
6964        let info = OperationInfo {
6965            operation_id:
6966                "sandbox_single_session_document_v2_sandbox_usercollection_session_document_id_get",
6967        };
6968        self.pre(&mut request, &info).await?;
6969        let result = self.exec(request, &info).await;
6970        self.post(&result, &info).await?;
6971        let response = result?;
6972        match response.status().as_u16() {
6973            200u16 => ResponseValue::from_response(response).await,
6974            422u16 => Err(Error::ErrorResponse(
6975                ResponseValue::from_response(response).await?,
6976            )),
6977            _ => Err(Error::UnexpectedResponse(response)),
6978        }
6979    }
6980
6981    #[doc = "Sandbox - Multiple Sleep Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/sleep`\n\n"]
6982    pub async fn sandbox_multiple_sleep_documents_v2_sandbox_usercollection_sleep_get<'a>(
6983        &'a self,
6984        end_date: Option<&'a ::chrono::naive::NaiveDate>,
6985        next_token: Option<&'a str>,
6986        start_date: Option<&'a ::chrono::naive::NaiveDate>,
6987    ) -> Result<
6988        ResponseValue<types::MultiDocumentResponsePublicModifiedSleepModel>,
6989        Error<types::HttpValidationError>,
6990    > {
6991        let url = format!("{}/v2/sandbox/usercollection/sleep", self.baseurl,);
6992        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
6993        header_map.append(
6994            ::reqwest::header::HeaderName::from_static("api-version"),
6995            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
6996        );
6997        #[allow(unused_mut)]
6998        let mut request = self
6999            .client
7000            .get(url)
7001            .header(
7002                ::reqwest::header::ACCEPT,
7003                ::reqwest::header::HeaderValue::from_static("application/json"),
7004            )
7005            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
7006            .query(&progenitor_client::QueryParam::new(
7007                "next_token",
7008                &next_token,
7009            ))
7010            .query(&progenitor_client::QueryParam::new(
7011                "start_date",
7012                &start_date,
7013            ))
7014            .headers(header_map)
7015            .build()?;
7016        let info = OperationInfo {
7017            operation_id: "sandbox_multiple_sleep_documents_v2_sandbox_usercollection_sleep_get",
7018        };
7019        self.pre(&mut request, &info).await?;
7020        let result = self.exec(request, &info).await;
7021        self.post(&result, &info).await?;
7022        let response = result?;
7023        match response.status().as_u16() {
7024            200u16 => ResponseValue::from_response(response).await,
7025            422u16 => Err(Error::ErrorResponse(
7026                ResponseValue::from_response(response).await?,
7027            )),
7028            _ => Err(Error::UnexpectedResponse(response)),
7029        }
7030    }
7031
7032    #[doc = "Sandbox - Single Sleep Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/sleep/{document_id}`\n\n"]
7033    pub async fn sandbox_single_sleep_document_v2_sandbox_usercollection_sleep_document_id_get<
7034        'a,
7035    >(
7036        &'a self,
7037        document_id: &'a str,
7038    ) -> Result<ResponseValue<types::PublicModifiedSleepModel>, Error<types::HttpValidationError>>
7039    {
7040        let url = format!(
7041            "{}/v2/sandbox/usercollection/sleep/{}",
7042            self.baseurl,
7043            encode_path(&document_id.to_string()),
7044        );
7045        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7046        header_map.append(
7047            ::reqwest::header::HeaderName::from_static("api-version"),
7048            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7049        );
7050        #[allow(unused_mut)]
7051        let mut request = self
7052            .client
7053            .get(url)
7054            .header(
7055                ::reqwest::header::ACCEPT,
7056                ::reqwest::header::HeaderValue::from_static("application/json"),
7057            )
7058            .headers(header_map)
7059            .build()?;
7060        let info = OperationInfo {
7061            operation_id:
7062                "sandbox_single_sleep_document_v2_sandbox_usercollection_sleep_document_id_get",
7063        };
7064        self.pre(&mut request, &info).await?;
7065        let result = self.exec(request, &info).await;
7066        self.post(&result, &info).await?;
7067        let response = result?;
7068        match response.status().as_u16() {
7069            200u16 => ResponseValue::from_response(response).await,
7070            422u16 => Err(Error::ErrorResponse(
7071                ResponseValue::from_response(response).await?,
7072            )),
7073            _ => Err(Error::UnexpectedResponse(response)),
7074        }
7075    }
7076
7077    #[doc = "Sandbox - Multiple Sleep Time Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/sleep_time`\n\n"]
7078    pub async fn sandbox_multiple_sleep_time_documents_v2_sandbox_usercollection_sleep_time_get<
7079        'a,
7080    >(
7081        &'a self,
7082        end_date: Option<&'a ::chrono::naive::NaiveDate>,
7083        next_token: Option<&'a str>,
7084        start_date: Option<&'a ::chrono::naive::NaiveDate>,
7085    ) -> Result<
7086        ResponseValue<types::MultiDocumentResponsePublicSleepTime>,
7087        Error<types::HttpValidationError>,
7088    > {
7089        let url = format!("{}/v2/sandbox/usercollection/sleep_time", self.baseurl,);
7090        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7091        header_map.append(
7092            ::reqwest::header::HeaderName::from_static("api-version"),
7093            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7094        );
7095        #[allow(unused_mut)]
7096        let mut request = self
7097            .client
7098            .get(url)
7099            .header(
7100                ::reqwest::header::ACCEPT,
7101                ::reqwest::header::HeaderValue::from_static("application/json"),
7102            )
7103            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
7104            .query(&progenitor_client::QueryParam::new(
7105                "next_token",
7106                &next_token,
7107            ))
7108            .query(&progenitor_client::QueryParam::new(
7109                "start_date",
7110                &start_date,
7111            ))
7112            .headers(header_map)
7113            .build()?;
7114        let info = OperationInfo {
7115            operation_id:
7116                "sandbox_multiple_sleep_time_documents_v2_sandbox_usercollection_sleep_time_get",
7117        };
7118        self.pre(&mut request, &info).await?;
7119        let result = self.exec(request, &info).await;
7120        self.post(&result, &info).await?;
7121        let response = result?;
7122        match response.status().as_u16() {
7123            200u16 => ResponseValue::from_response(response).await,
7124            422u16 => Err(Error::ErrorResponse(
7125                ResponseValue::from_response(response).await?,
7126            )),
7127            _ => Err(Error::UnexpectedResponse(response)),
7128        }
7129    }
7130
7131    #[doc = "Sandbox - Single Sleep Time Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/sleep_time/{document_id}`\n\n"]
7132    pub async fn sandbox_single_sleep_time_document_v2_sandbox_usercollection_sleep_time_document_id_get<
7133        'a,
7134    >(
7135        &'a self,
7136        document_id: &'a str,
7137    ) -> Result<ResponseValue<types::PublicSleepTime>, Error<types::HttpValidationError>> {
7138        let url = format!(
7139            "{}/v2/sandbox/usercollection/sleep_time/{}",
7140            self.baseurl,
7141            encode_path(&document_id.to_string()),
7142        );
7143        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7144        header_map.append(
7145            ::reqwest::header::HeaderName::from_static("api-version"),
7146            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7147        );
7148        #[allow(unused_mut)]
7149        let mut request = self
7150            .client
7151            .get(url)
7152            .header(
7153                ::reqwest::header::ACCEPT,
7154                ::reqwest::header::HeaderValue::from_static("application/json"),
7155            )
7156            .headers(header_map)
7157            .build()?;
7158        let info = OperationInfo { operation_id : "sandbox_single_sleep_time_document_v2_sandbox_usercollection_sleep_time_document_id_get" , } ;
7159        self.pre(&mut request, &info).await?;
7160        let result = self.exec(request, &info).await;
7161        self.post(&result, &info).await?;
7162        let response = result?;
7163        match response.status().as_u16() {
7164            200u16 => ResponseValue::from_response(response).await,
7165            422u16 => Err(Error::ErrorResponse(
7166                ResponseValue::from_response(response).await?,
7167            )),
7168            _ => Err(Error::UnexpectedResponse(response)),
7169        }
7170    }
7171
7172    #[doc = "Sandbox - Multiple Tag Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/tag`\n\n"]
7173    pub async fn sandbox_multiple_tag_documents_v2_sandbox_usercollection_tag_get<'a>(
7174        &'a self,
7175        end_date: Option<&'a ::chrono::naive::NaiveDate>,
7176        next_token: Option<&'a str>,
7177        start_date: Option<&'a ::chrono::naive::NaiveDate>,
7178    ) -> Result<
7179        ResponseValue<types::MultiDocumentResponseTagModel>,
7180        Error<types::HttpValidationError>,
7181    > {
7182        let url = format!("{}/v2/sandbox/usercollection/tag", self.baseurl,);
7183        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7184        header_map.append(
7185            ::reqwest::header::HeaderName::from_static("api-version"),
7186            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7187        );
7188        #[allow(unused_mut)]
7189        let mut request = self
7190            .client
7191            .get(url)
7192            .header(
7193                ::reqwest::header::ACCEPT,
7194                ::reqwest::header::HeaderValue::from_static("application/json"),
7195            )
7196            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
7197            .query(&progenitor_client::QueryParam::new(
7198                "next_token",
7199                &next_token,
7200            ))
7201            .query(&progenitor_client::QueryParam::new(
7202                "start_date",
7203                &start_date,
7204            ))
7205            .headers(header_map)
7206            .build()?;
7207        let info = OperationInfo {
7208            operation_id: "sandbox_multiple_tag_documents_v2_sandbox_usercollection_tag_get",
7209        };
7210        self.pre(&mut request, &info).await?;
7211        let result = self.exec(request, &info).await;
7212        self.post(&result, &info).await?;
7213        let response = result?;
7214        match response.status().as_u16() {
7215            200u16 => ResponseValue::from_response(response).await,
7216            422u16 => Err(Error::ErrorResponse(
7217                ResponseValue::from_response(response).await?,
7218            )),
7219            _ => Err(Error::UnexpectedResponse(response)),
7220        }
7221    }
7222
7223    #[doc = "Sandbox - Single Tag Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/tag/{document_id}`\n\n"]
7224    pub async fn sandbox_single_tag_document_v2_sandbox_usercollection_tag_document_id_get<'a>(
7225        &'a self,
7226        document_id: &'a str,
7227    ) -> Result<ResponseValue<types::TagModel>, Error<types::HttpValidationError>> {
7228        let url = format!(
7229            "{}/v2/sandbox/usercollection/tag/{}",
7230            self.baseurl,
7231            encode_path(&document_id.to_string()),
7232        );
7233        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7234        header_map.append(
7235            ::reqwest::header::HeaderName::from_static("api-version"),
7236            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7237        );
7238        #[allow(unused_mut)]
7239        let mut request = self
7240            .client
7241            .get(url)
7242            .header(
7243                ::reqwest::header::ACCEPT,
7244                ::reqwest::header::HeaderValue::from_static("application/json"),
7245            )
7246            .headers(header_map)
7247            .build()?;
7248        let info = OperationInfo {
7249            operation_id:
7250                "sandbox_single_tag_document_v2_sandbox_usercollection_tag_document_id_get",
7251        };
7252        self.pre(&mut request, &info).await?;
7253        let result = self.exec(request, &info).await;
7254        self.post(&result, &info).await?;
7255        let response = result?;
7256        match response.status().as_u16() {
7257            200u16 => ResponseValue::from_response(response).await,
7258            422u16 => Err(Error::ErrorResponse(
7259                ResponseValue::from_response(response).await?,
7260            )),
7261            _ => Err(Error::UnexpectedResponse(response)),
7262        }
7263    }
7264
7265    #[doc = "Sandbox - Multiple Vo2 Max Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/vO2_max`\n\n"]
7266    pub async fn sandbox_multiple_v_o2_max_documents_v2_sandbox_usercollection_v_o2_max_get<'a>(
7267        &'a self,
7268        end_date: Option<&'a ::chrono::naive::NaiveDate>,
7269        next_token: Option<&'a str>,
7270        start_date: Option<&'a ::chrono::naive::NaiveDate>,
7271    ) -> Result<
7272        ResponseValue<types::MultiDocumentResponsePublicVo2Max>,
7273        Error<types::HttpValidationError>,
7274    > {
7275        let url = format!("{}/v2/sandbox/usercollection/vO2_max", self.baseurl,);
7276        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7277        header_map.append(
7278            ::reqwest::header::HeaderName::from_static("api-version"),
7279            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7280        );
7281        #[allow(unused_mut)]
7282        let mut request = self
7283            .client
7284            .get(url)
7285            .header(
7286                ::reqwest::header::ACCEPT,
7287                ::reqwest::header::HeaderValue::from_static("application/json"),
7288            )
7289            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
7290            .query(&progenitor_client::QueryParam::new(
7291                "next_token",
7292                &next_token,
7293            ))
7294            .query(&progenitor_client::QueryParam::new(
7295                "start_date",
7296                &start_date,
7297            ))
7298            .headers(header_map)
7299            .build()?;
7300        let info = OperationInfo {
7301            operation_id:
7302                "sandbox_multiple_v_o2_max_documents_v2_sandbox_usercollection_v_o2_max_get",
7303        };
7304        self.pre(&mut request, &info).await?;
7305        let result = self.exec(request, &info).await;
7306        self.post(&result, &info).await?;
7307        let response = result?;
7308        match response.status().as_u16() {
7309            200u16 => ResponseValue::from_response(response).await,
7310            422u16 => Err(Error::ErrorResponse(
7311                ResponseValue::from_response(response).await?,
7312            )),
7313            _ => Err(Error::UnexpectedResponse(response)),
7314        }
7315    }
7316
7317    #[doc = "Sandbox - Single Vo2 Max Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/vO2_max/{document_id}`\n\n"]
7318    pub async fn sandbox_single_v_o2_max_document_v2_sandbox_usercollection_v_o2_max_document_id_get<
7319        'a,
7320    >(
7321        &'a self,
7322        document_id: &'a str,
7323    ) -> Result<ResponseValue<types::PublicVo2Max>, Error<types::HttpValidationError>> {
7324        let url = format!(
7325            "{}/v2/sandbox/usercollection/vO2_max/{}",
7326            self.baseurl,
7327            encode_path(&document_id.to_string()),
7328        );
7329        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7330        header_map.append(
7331            ::reqwest::header::HeaderName::from_static("api-version"),
7332            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7333        );
7334        #[allow(unused_mut)]
7335        let mut request = self
7336            .client
7337            .get(url)
7338            .header(
7339                ::reqwest::header::ACCEPT,
7340                ::reqwest::header::HeaderValue::from_static("application/json"),
7341            )
7342            .headers(header_map)
7343            .build()?;
7344        let info = OperationInfo { operation_id : "sandbox_single_v_o2_max_document_v2_sandbox_usercollection_v_o2_max_document_id_get" , } ;
7345        self.pre(&mut request, &info).await?;
7346        let result = self.exec(request, &info).await;
7347        self.post(&result, &info).await?;
7348        let response = result?;
7349        match response.status().as_u16() {
7350            200u16 => ResponseValue::from_response(response).await,
7351            422u16 => Err(Error::ErrorResponse(
7352                ResponseValue::from_response(response).await?,
7353            )),
7354            _ => Err(Error::UnexpectedResponse(response)),
7355        }
7356    }
7357
7358    #[doc = "Sandbox - Multiple Workout Documents\n\nSends a `GET` request to `/v2/sandbox/usercollection/workout`\n\n"]
7359    pub async fn sandbox_multiple_workout_documents_v2_sandbox_usercollection_workout_get<'a>(
7360        &'a self,
7361        end_date: Option<&'a ::chrono::naive::NaiveDate>,
7362        next_token: Option<&'a str>,
7363        start_date: Option<&'a ::chrono::naive::NaiveDate>,
7364    ) -> Result<
7365        ResponseValue<types::MultiDocumentResponsePublicWorkout>,
7366        Error<types::HttpValidationError>,
7367    > {
7368        let url = format!("{}/v2/sandbox/usercollection/workout", self.baseurl,);
7369        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7370        header_map.append(
7371            ::reqwest::header::HeaderName::from_static("api-version"),
7372            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7373        );
7374        #[allow(unused_mut)]
7375        let mut request = self
7376            .client
7377            .get(url)
7378            .header(
7379                ::reqwest::header::ACCEPT,
7380                ::reqwest::header::HeaderValue::from_static("application/json"),
7381            )
7382            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
7383            .query(&progenitor_client::QueryParam::new(
7384                "next_token",
7385                &next_token,
7386            ))
7387            .query(&progenitor_client::QueryParam::new(
7388                "start_date",
7389                &start_date,
7390            ))
7391            .headers(header_map)
7392            .build()?;
7393        let info = OperationInfo {
7394            operation_id:
7395                "sandbox_multiple_workout_documents_v2_sandbox_usercollection_workout_get",
7396        };
7397        self.pre(&mut request, &info).await?;
7398        let result = self.exec(request, &info).await;
7399        self.post(&result, &info).await?;
7400        let response = result?;
7401        match response.status().as_u16() {
7402            200u16 => ResponseValue::from_response(response).await,
7403            422u16 => Err(Error::ErrorResponse(
7404                ResponseValue::from_response(response).await?,
7405            )),
7406            _ => Err(Error::UnexpectedResponse(response)),
7407        }
7408    }
7409
7410    #[doc = "Sandbox - Single Workout Document\n\nSends a `GET` request to `/v2/sandbox/usercollection/workout/{document_id}`\n\n"]
7411    pub async fn sandbox_single_workout_document_v2_sandbox_usercollection_workout_document_id_get<
7412        'a,
7413    >(
7414        &'a self,
7415        document_id: &'a str,
7416    ) -> Result<ResponseValue<types::PublicWorkout>, Error<types::HttpValidationError>> {
7417        let url = format!(
7418            "{}/v2/sandbox/usercollection/workout/{}",
7419            self.baseurl,
7420            encode_path(&document_id.to_string()),
7421        );
7422        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7423        header_map.append(
7424            ::reqwest::header::HeaderName::from_static("api-version"),
7425            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7426        );
7427        #[allow(unused_mut)]
7428        let mut request = self
7429            .client
7430            .get(url)
7431            .header(
7432                ::reqwest::header::ACCEPT,
7433                ::reqwest::header::HeaderValue::from_static("application/json"),
7434            )
7435            .headers(header_map)
7436            .build()?;
7437        let info = OperationInfo {
7438            operation_id:
7439                "sandbox_single_workout_document_v2_sandbox_usercollection_workout_document_id_get",
7440        };
7441        self.pre(&mut request, &info).await?;
7442        let result = self.exec(request, &info).await;
7443        self.post(&result, &info).await?;
7444        let response = result?;
7445        match response.status().as_u16() {
7446            200u16 => ResponseValue::from_response(response).await,
7447            422u16 => Err(Error::ErrorResponse(
7448                ResponseValue::from_response(response).await?,
7449            )),
7450            _ => Err(Error::UnexpectedResponse(response)),
7451        }
7452    }
7453
7454    #[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"]
7455    pub async fn multiple_daily_activity_documents_v2_usercollection_daily_activity_get<'a>(
7456        &'a self,
7457        end_date: Option<&'a ::chrono::naive::NaiveDate>,
7458        fields: Option<&'a str>,
7459        next_token: Option<&'a str>,
7460        start_date: Option<&'a ::chrono::naive::NaiveDate>,
7461    ) -> Result<
7462        ResponseValue<types::MultiDocumentResponsePublicDailyActivity>,
7463        Error<types::HttpValidationError>,
7464    > {
7465        let url = format!("{}/v2/usercollection/daily_activity", self.baseurl,);
7466        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7467        header_map.append(
7468            ::reqwest::header::HeaderName::from_static("api-version"),
7469            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7470        );
7471        #[allow(unused_mut)]
7472        let mut request = self
7473            .client
7474            .get(url)
7475            .header(
7476                ::reqwest::header::ACCEPT,
7477                ::reqwest::header::HeaderValue::from_static("application/json"),
7478            )
7479            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
7480            .query(&progenitor_client::QueryParam::new("fields", &fields))
7481            .query(&progenitor_client::QueryParam::new(
7482                "next_token",
7483                &next_token,
7484            ))
7485            .query(&progenitor_client::QueryParam::new(
7486                "start_date",
7487                &start_date,
7488            ))
7489            .headers(header_map)
7490            .build()?;
7491        let info = OperationInfo {
7492            operation_id: "multiple_daily_activity_documents_v2_usercollection_daily_activity_get",
7493        };
7494        self.pre(&mut request, &info).await?;
7495        let result = self.exec(request, &info).await;
7496        self.post(&result, &info).await?;
7497        let response = result?;
7498        match response.status().as_u16() {
7499            200u16 => ResponseValue::from_response(response).await,
7500            422u16 => Err(Error::ErrorResponse(
7501                ResponseValue::from_response(response).await?,
7502            )),
7503            _ => Err(Error::UnexpectedResponse(response)),
7504        }
7505    }
7506
7507    #[doc = "Single Daily Activity Document\n\nSends a `GET` request to `/v2/usercollection/daily_activity/{document_id}`\n\n"]
7508    pub async fn single_daily_activity_document_v2_usercollection_daily_activity_document_id_get<
7509        'a,
7510    >(
7511        &'a self,
7512        document_id: &'a str,
7513    ) -> Result<ResponseValue<types::PublicDailyActivity>, Error<types::HttpValidationError>> {
7514        let url = format!(
7515            "{}/v2/usercollection/daily_activity/{}",
7516            self.baseurl,
7517            encode_path(&document_id.to_string()),
7518        );
7519        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7520        header_map.append(
7521            ::reqwest::header::HeaderName::from_static("api-version"),
7522            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7523        );
7524        #[allow(unused_mut)]
7525        let mut request = self
7526            .client
7527            .get(url)
7528            .header(
7529                ::reqwest::header::ACCEPT,
7530                ::reqwest::header::HeaderValue::from_static("application/json"),
7531            )
7532            .headers(header_map)
7533            .build()?;
7534        let info = OperationInfo {
7535            operation_id:
7536                "single_daily_activity_document_v2_usercollection_daily_activity_document_id_get",
7537        };
7538        self.pre(&mut request, &info).await?;
7539        let result = self.exec(request, &info).await;
7540        self.post(&result, &info).await?;
7541        let response = result?;
7542        match response.status().as_u16() {
7543            200u16 => ResponseValue::from_response(response).await,
7544            422u16 => Err(Error::ErrorResponse(
7545                ResponseValue::from_response(response).await?,
7546            )),
7547            _ => Err(Error::UnexpectedResponse(response)),
7548        }
7549    }
7550
7551    #[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"]
7552    pub async fn multiple_daily_cardiovascular_age_documents_v2_usercollection_daily_cardiovascular_age_get<
7553        'a,
7554    >(
7555        &'a self,
7556        end_date: Option<&'a ::chrono::naive::NaiveDate>,
7557        fields: Option<&'a str>,
7558        next_token: Option<&'a str>,
7559        start_date: Option<&'a ::chrono::naive::NaiveDate>,
7560    ) -> Result<
7561        ResponseValue<types::MultiDocumentResponsePublicDailyCardiovascularAge>,
7562        Error<types::HttpValidationError>,
7563    > {
7564        let url = format!(
7565            "{}/v2/usercollection/daily_cardiovascular_age",
7566            self.baseurl,
7567        );
7568        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7569        header_map.append(
7570            ::reqwest::header::HeaderName::from_static("api-version"),
7571            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7572        );
7573        #[allow(unused_mut)]
7574        let mut request = self
7575            .client
7576            .get(url)
7577            .header(
7578                ::reqwest::header::ACCEPT,
7579                ::reqwest::header::HeaderValue::from_static("application/json"),
7580            )
7581            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
7582            .query(&progenitor_client::QueryParam::new("fields", &fields))
7583            .query(&progenitor_client::QueryParam::new(
7584                "next_token",
7585                &next_token,
7586            ))
7587            .query(&progenitor_client::QueryParam::new(
7588                "start_date",
7589                &start_date,
7590            ))
7591            .headers(header_map)
7592            .build()?;
7593        let info = OperationInfo { operation_id : "multiple_daily_cardiovascular_age_documents_v2_usercollection_daily_cardiovascular_age_get" , } ;
7594        self.pre(&mut request, &info).await?;
7595        let result = self.exec(request, &info).await;
7596        self.post(&result, &info).await?;
7597        let response = result?;
7598        match response.status().as_u16() {
7599            200u16 => ResponseValue::from_response(response).await,
7600            422u16 => Err(Error::ErrorResponse(
7601                ResponseValue::from_response(response).await?,
7602            )),
7603            _ => Err(Error::UnexpectedResponse(response)),
7604        }
7605    }
7606
7607    #[doc = "Single Daily Cardiovascular Age Document\n\nSends a `GET` request to `/v2/usercollection/daily_cardiovascular_age/{document_id}`\n\n"]
7608    pub async fn single_daily_cardiovascular_age_document_v2_usercollection_daily_cardiovascular_age_document_id_get<
7609        'a,
7610    >(
7611        &'a self,
7612        document_id: &'a str,
7613    ) -> Result<ResponseValue<types::PublicDailyCardiovascularAge>, Error<types::HttpValidationError>>
7614    {
7615        let url = format!(
7616            "{}/v2/usercollection/daily_cardiovascular_age/{}",
7617            self.baseurl,
7618            encode_path(&document_id.to_string()),
7619        );
7620        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7621        header_map.append(
7622            ::reqwest::header::HeaderName::from_static("api-version"),
7623            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7624        );
7625        #[allow(unused_mut)]
7626        let mut request = self
7627            .client
7628            .get(url)
7629            .header(
7630                ::reqwest::header::ACCEPT,
7631                ::reqwest::header::HeaderValue::from_static("application/json"),
7632            )
7633            .headers(header_map)
7634            .build()?;
7635        let info = OperationInfo { operation_id : "single_daily_cardiovascular_age_document_v2_usercollection_daily_cardiovascular_age_document_id_get" , } ;
7636        self.pre(&mut request, &info).await?;
7637        let result = self.exec(request, &info).await;
7638        self.post(&result, &info).await?;
7639        let response = result?;
7640        match response.status().as_u16() {
7641            200u16 => ResponseValue::from_response(response).await,
7642            422u16 => Err(Error::ErrorResponse(
7643                ResponseValue::from_response(response).await?,
7644            )),
7645            _ => Err(Error::UnexpectedResponse(response)),
7646        }
7647    }
7648
7649    #[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"]
7650    pub async fn multiple_daily_readiness_documents_v2_usercollection_daily_readiness_get<'a>(
7651        &'a self,
7652        end_date: Option<&'a ::chrono::naive::NaiveDate>,
7653        fields: Option<&'a str>,
7654        next_token: Option<&'a str>,
7655        start_date: Option<&'a ::chrono::naive::NaiveDate>,
7656    ) -> Result<
7657        ResponseValue<types::MultiDocumentResponsePublicDailyReadiness>,
7658        Error<types::HttpValidationError>,
7659    > {
7660        let url = format!("{}/v2/usercollection/daily_readiness", self.baseurl,);
7661        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7662        header_map.append(
7663            ::reqwest::header::HeaderName::from_static("api-version"),
7664            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7665        );
7666        #[allow(unused_mut)]
7667        let mut request = self
7668            .client
7669            .get(url)
7670            .header(
7671                ::reqwest::header::ACCEPT,
7672                ::reqwest::header::HeaderValue::from_static("application/json"),
7673            )
7674            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
7675            .query(&progenitor_client::QueryParam::new("fields", &fields))
7676            .query(&progenitor_client::QueryParam::new(
7677                "next_token",
7678                &next_token,
7679            ))
7680            .query(&progenitor_client::QueryParam::new(
7681                "start_date",
7682                &start_date,
7683            ))
7684            .headers(header_map)
7685            .build()?;
7686        let info = OperationInfo {
7687            operation_id:
7688                "multiple_daily_readiness_documents_v2_usercollection_daily_readiness_get",
7689        };
7690        self.pre(&mut request, &info).await?;
7691        let result = self.exec(request, &info).await;
7692        self.post(&result, &info).await?;
7693        let response = result?;
7694        match response.status().as_u16() {
7695            200u16 => ResponseValue::from_response(response).await,
7696            422u16 => Err(Error::ErrorResponse(
7697                ResponseValue::from_response(response).await?,
7698            )),
7699            _ => Err(Error::UnexpectedResponse(response)),
7700        }
7701    }
7702
7703    #[doc = "Single Daily Readiness Document\n\nSends a `GET` request to `/v2/usercollection/daily_readiness/{document_id}`\n\n"]
7704    pub async fn single_daily_readiness_document_v2_usercollection_daily_readiness_document_id_get<
7705        'a,
7706    >(
7707        &'a self,
7708        document_id: &'a str,
7709    ) -> Result<ResponseValue<types::PublicDailyReadiness>, Error<types::HttpValidationError>> {
7710        let url = format!(
7711            "{}/v2/usercollection/daily_readiness/{}",
7712            self.baseurl,
7713            encode_path(&document_id.to_string()),
7714        );
7715        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7716        header_map.append(
7717            ::reqwest::header::HeaderName::from_static("api-version"),
7718            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7719        );
7720        #[allow(unused_mut)]
7721        let mut request = self
7722            .client
7723            .get(url)
7724            .header(
7725                ::reqwest::header::ACCEPT,
7726                ::reqwest::header::HeaderValue::from_static("application/json"),
7727            )
7728            .headers(header_map)
7729            .build()?;
7730        let info = OperationInfo {
7731            operation_id:
7732                "single_daily_readiness_document_v2_usercollection_daily_readiness_document_id_get",
7733        };
7734        self.pre(&mut request, &info).await?;
7735        let result = self.exec(request, &info).await;
7736        self.post(&result, &info).await?;
7737        let response = result?;
7738        match response.status().as_u16() {
7739            200u16 => ResponseValue::from_response(response).await,
7740            422u16 => Err(Error::ErrorResponse(
7741                ResponseValue::from_response(response).await?,
7742            )),
7743            _ => Err(Error::UnexpectedResponse(response)),
7744        }
7745    }
7746
7747    #[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"]
7748    pub async fn multiple_daily_resilience_documents_v2_usercollection_daily_resilience_get<'a>(
7749        &'a self,
7750        end_date: Option<&'a ::chrono::naive::NaiveDate>,
7751        fields: Option<&'a str>,
7752        next_token: Option<&'a str>,
7753        start_date: Option<&'a ::chrono::naive::NaiveDate>,
7754    ) -> Result<
7755        ResponseValue<types::MultiDocumentResponseDailyResilienceModel>,
7756        Error<types::HttpValidationError>,
7757    > {
7758        let url = format!("{}/v2/usercollection/daily_resilience", self.baseurl,);
7759        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7760        header_map.append(
7761            ::reqwest::header::HeaderName::from_static("api-version"),
7762            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7763        );
7764        #[allow(unused_mut)]
7765        let mut request = self
7766            .client
7767            .get(url)
7768            .header(
7769                ::reqwest::header::ACCEPT,
7770                ::reqwest::header::HeaderValue::from_static("application/json"),
7771            )
7772            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
7773            .query(&progenitor_client::QueryParam::new("fields", &fields))
7774            .query(&progenitor_client::QueryParam::new(
7775                "next_token",
7776                &next_token,
7777            ))
7778            .query(&progenitor_client::QueryParam::new(
7779                "start_date",
7780                &start_date,
7781            ))
7782            .headers(header_map)
7783            .build()?;
7784        let info = OperationInfo {
7785            operation_id:
7786                "multiple_daily_resilience_documents_v2_usercollection_daily_resilience_get",
7787        };
7788        self.pre(&mut request, &info).await?;
7789        let result = self.exec(request, &info).await;
7790        self.post(&result, &info).await?;
7791        let response = result?;
7792        match response.status().as_u16() {
7793            200u16 => ResponseValue::from_response(response).await,
7794            422u16 => Err(Error::ErrorResponse(
7795                ResponseValue::from_response(response).await?,
7796            )),
7797            _ => Err(Error::UnexpectedResponse(response)),
7798        }
7799    }
7800
7801    #[doc = "Single Daily Resilience Document\n\nSends a `GET` request to `/v2/usercollection/daily_resilience/{document_id}`\n\n"]
7802    pub async fn single_daily_resilience_document_v2_usercollection_daily_resilience_document_id_get<
7803        'a,
7804    >(
7805        &'a self,
7806        document_id: &'a str,
7807    ) -> Result<ResponseValue<types::DailyResilienceModel>, Error<types::HttpValidationError>> {
7808        let url = format!(
7809            "{}/v2/usercollection/daily_resilience/{}",
7810            self.baseurl,
7811            encode_path(&document_id.to_string()),
7812        );
7813        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7814        header_map.append(
7815            ::reqwest::header::HeaderName::from_static("api-version"),
7816            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7817        );
7818        #[allow(unused_mut)]
7819        let mut request = self
7820            .client
7821            .get(url)
7822            .header(
7823                ::reqwest::header::ACCEPT,
7824                ::reqwest::header::HeaderValue::from_static("application/json"),
7825            )
7826            .headers(header_map)
7827            .build()?;
7828        let info = OperationInfo { operation_id : "single_daily_resilience_document_v2_usercollection_daily_resilience_document_id_get" , } ;
7829        self.pre(&mut request, &info).await?;
7830        let result = self.exec(request, &info).await;
7831        self.post(&result, &info).await?;
7832        let response = result?;
7833        match response.status().as_u16() {
7834            200u16 => ResponseValue::from_response(response).await,
7835            422u16 => Err(Error::ErrorResponse(
7836                ResponseValue::from_response(response).await?,
7837            )),
7838            _ => Err(Error::UnexpectedResponse(response)),
7839        }
7840    }
7841
7842    #[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"]
7843    pub async fn multiple_daily_sleep_documents_v2_usercollection_daily_sleep_get<'a>(
7844        &'a self,
7845        end_date: Option<&'a ::chrono::naive::NaiveDate>,
7846        fields: Option<&'a str>,
7847        next_token: Option<&'a str>,
7848        start_date: Option<&'a ::chrono::naive::NaiveDate>,
7849    ) -> Result<
7850        ResponseValue<types::MultiDocumentResponsePublicDailySleep>,
7851        Error<types::HttpValidationError>,
7852    > {
7853        let url = format!("{}/v2/usercollection/daily_sleep", self.baseurl,);
7854        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7855        header_map.append(
7856            ::reqwest::header::HeaderName::from_static("api-version"),
7857            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7858        );
7859        #[allow(unused_mut)]
7860        let mut request = self
7861            .client
7862            .get(url)
7863            .header(
7864                ::reqwest::header::ACCEPT,
7865                ::reqwest::header::HeaderValue::from_static("application/json"),
7866            )
7867            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
7868            .query(&progenitor_client::QueryParam::new("fields", &fields))
7869            .query(&progenitor_client::QueryParam::new(
7870                "next_token",
7871                &next_token,
7872            ))
7873            .query(&progenitor_client::QueryParam::new(
7874                "start_date",
7875                &start_date,
7876            ))
7877            .headers(header_map)
7878            .build()?;
7879        let info = OperationInfo {
7880            operation_id: "multiple_daily_sleep_documents_v2_usercollection_daily_sleep_get",
7881        };
7882        self.pre(&mut request, &info).await?;
7883        let result = self.exec(request, &info).await;
7884        self.post(&result, &info).await?;
7885        let response = result?;
7886        match response.status().as_u16() {
7887            200u16 => ResponseValue::from_response(response).await,
7888            422u16 => Err(Error::ErrorResponse(
7889                ResponseValue::from_response(response).await?,
7890            )),
7891            _ => Err(Error::UnexpectedResponse(response)),
7892        }
7893    }
7894
7895    #[doc = "Single Daily Sleep Document\n\nSends a `GET` request to `/v2/usercollection/daily_sleep/{document_id}`\n\n"]
7896    pub async fn single_daily_sleep_document_v2_usercollection_daily_sleep_document_id_get<'a>(
7897        &'a self,
7898        document_id: &'a str,
7899    ) -> Result<ResponseValue<types::PublicDailySleep>, Error<types::HttpValidationError>> {
7900        let url = format!(
7901            "{}/v2/usercollection/daily_sleep/{}",
7902            self.baseurl,
7903            encode_path(&document_id.to_string()),
7904        );
7905        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7906        header_map.append(
7907            ::reqwest::header::HeaderName::from_static("api-version"),
7908            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7909        );
7910        #[allow(unused_mut)]
7911        let mut request = self
7912            .client
7913            .get(url)
7914            .header(
7915                ::reqwest::header::ACCEPT,
7916                ::reqwest::header::HeaderValue::from_static("application/json"),
7917            )
7918            .headers(header_map)
7919            .build()?;
7920        let info = OperationInfo {
7921            operation_id:
7922                "single_daily_sleep_document_v2_usercollection_daily_sleep_document_id_get",
7923        };
7924        self.pre(&mut request, &info).await?;
7925        let result = self.exec(request, &info).await;
7926        self.post(&result, &info).await?;
7927        let response = result?;
7928        match response.status().as_u16() {
7929            200u16 => ResponseValue::from_response(response).await,
7930            422u16 => Err(Error::ErrorResponse(
7931                ResponseValue::from_response(response).await?,
7932            )),
7933            _ => Err(Error::UnexpectedResponse(response)),
7934        }
7935    }
7936
7937    #[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"]
7938    pub async fn multiple_daily_spo2_documents_v2_usercollection_daily_spo2_get<'a>(
7939        &'a self,
7940        end_date: Option<&'a ::chrono::naive::NaiveDate>,
7941        fields: Option<&'a str>,
7942        next_token: Option<&'a str>,
7943        start_date: Option<&'a ::chrono::naive::NaiveDate>,
7944    ) -> Result<
7945        ResponseValue<types::MultiDocumentResponsePublicDailySpO2>,
7946        Error<types::HttpValidationError>,
7947    > {
7948        let url = format!("{}/v2/usercollection/daily_spo2", self.baseurl,);
7949        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7950        header_map.append(
7951            ::reqwest::header::HeaderName::from_static("api-version"),
7952            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7953        );
7954        #[allow(unused_mut)]
7955        let mut request = self
7956            .client
7957            .get(url)
7958            .header(
7959                ::reqwest::header::ACCEPT,
7960                ::reqwest::header::HeaderValue::from_static("application/json"),
7961            )
7962            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
7963            .query(&progenitor_client::QueryParam::new("fields", &fields))
7964            .query(&progenitor_client::QueryParam::new(
7965                "next_token",
7966                &next_token,
7967            ))
7968            .query(&progenitor_client::QueryParam::new(
7969                "start_date",
7970                &start_date,
7971            ))
7972            .headers(header_map)
7973            .build()?;
7974        let info = OperationInfo {
7975            operation_id: "multiple_daily_spo2_documents_v2_usercollection_daily_spo2_get",
7976        };
7977        self.pre(&mut request, &info).await?;
7978        let result = self.exec(request, &info).await;
7979        self.post(&result, &info).await?;
7980        let response = result?;
7981        match response.status().as_u16() {
7982            200u16 => ResponseValue::from_response(response).await,
7983            422u16 => Err(Error::ErrorResponse(
7984                ResponseValue::from_response(response).await?,
7985            )),
7986            _ => Err(Error::UnexpectedResponse(response)),
7987        }
7988    }
7989
7990    #[doc = "Single Daily Spo2 Document\n\nSends a `GET` request to `/v2/usercollection/daily_spo2/{document_id}`\n\n"]
7991    pub async fn single_daily_spo2_document_v2_usercollection_daily_spo2_document_id_get<'a>(
7992        &'a self,
7993        document_id: &'a str,
7994    ) -> Result<ResponseValue<types::PublicDailySpO2>, Error<types::HttpValidationError>> {
7995        let url = format!(
7996            "{}/v2/usercollection/daily_spo2/{}",
7997            self.baseurl,
7998            encode_path(&document_id.to_string()),
7999        );
8000        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8001        header_map.append(
8002            ::reqwest::header::HeaderName::from_static("api-version"),
8003            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8004        );
8005        #[allow(unused_mut)]
8006        let mut request = self
8007            .client
8008            .get(url)
8009            .header(
8010                ::reqwest::header::ACCEPT,
8011                ::reqwest::header::HeaderValue::from_static("application/json"),
8012            )
8013            .headers(header_map)
8014            .build()?;
8015        let info = OperationInfo {
8016            operation_id: "single_daily_spo2_document_v2_usercollection_daily_spo2_document_id_get",
8017        };
8018        self.pre(&mut request, &info).await?;
8019        let result = self.exec(request, &info).await;
8020        self.post(&result, &info).await?;
8021        let response = result?;
8022        match response.status().as_u16() {
8023            200u16 => ResponseValue::from_response(response).await,
8024            422u16 => Err(Error::ErrorResponse(
8025                ResponseValue::from_response(response).await?,
8026            )),
8027            _ => Err(Error::UnexpectedResponse(response)),
8028        }
8029    }
8030
8031    #[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"]
8032    pub async fn multiple_daily_stress_documents_v2_usercollection_daily_stress_get<'a>(
8033        &'a self,
8034        end_date: Option<&'a ::chrono::naive::NaiveDate>,
8035        fields: Option<&'a str>,
8036        next_token: Option<&'a str>,
8037        start_date: Option<&'a ::chrono::naive::NaiveDate>,
8038    ) -> Result<
8039        ResponseValue<types::MultiDocumentResponsePublicDailyStress>,
8040        Error<types::HttpValidationError>,
8041    > {
8042        let url = format!("{}/v2/usercollection/daily_stress", self.baseurl,);
8043        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8044        header_map.append(
8045            ::reqwest::header::HeaderName::from_static("api-version"),
8046            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8047        );
8048        #[allow(unused_mut)]
8049        let mut request = self
8050            .client
8051            .get(url)
8052            .header(
8053                ::reqwest::header::ACCEPT,
8054                ::reqwest::header::HeaderValue::from_static("application/json"),
8055            )
8056            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
8057            .query(&progenitor_client::QueryParam::new("fields", &fields))
8058            .query(&progenitor_client::QueryParam::new(
8059                "next_token",
8060                &next_token,
8061            ))
8062            .query(&progenitor_client::QueryParam::new(
8063                "start_date",
8064                &start_date,
8065            ))
8066            .headers(header_map)
8067            .build()?;
8068        let info = OperationInfo {
8069            operation_id: "multiple_daily_stress_documents_v2_usercollection_daily_stress_get",
8070        };
8071        self.pre(&mut request, &info).await?;
8072        let result = self.exec(request, &info).await;
8073        self.post(&result, &info).await?;
8074        let response = result?;
8075        match response.status().as_u16() {
8076            200u16 => ResponseValue::from_response(response).await,
8077            422u16 => Err(Error::ErrorResponse(
8078                ResponseValue::from_response(response).await?,
8079            )),
8080            _ => Err(Error::UnexpectedResponse(response)),
8081        }
8082    }
8083
8084    #[doc = "Single Daily Stress Document\n\nSends a `GET` request to `/v2/usercollection/daily_stress/{document_id}`\n\n"]
8085    pub async fn single_daily_stress_document_v2_usercollection_daily_stress_document_id_get<'a>(
8086        &'a self,
8087        document_id: &'a str,
8088    ) -> Result<ResponseValue<types::PublicDailyStress>, Error<types::HttpValidationError>> {
8089        let url = format!(
8090            "{}/v2/usercollection/daily_stress/{}",
8091            self.baseurl,
8092            encode_path(&document_id.to_string()),
8093        );
8094        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8095        header_map.append(
8096            ::reqwest::header::HeaderName::from_static("api-version"),
8097            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8098        );
8099        #[allow(unused_mut)]
8100        let mut request = self
8101            .client
8102            .get(url)
8103            .header(
8104                ::reqwest::header::ACCEPT,
8105                ::reqwest::header::HeaderValue::from_static("application/json"),
8106            )
8107            .headers(header_map)
8108            .build()?;
8109        let info = OperationInfo {
8110            operation_id:
8111                "single_daily_stress_document_v2_usercollection_daily_stress_document_id_get",
8112        };
8113        self.pre(&mut request, &info).await?;
8114        let result = self.exec(request, &info).await;
8115        self.post(&result, &info).await?;
8116        let response = result?;
8117        match response.status().as_u16() {
8118            200u16 => ResponseValue::from_response(response).await,
8119            422u16 => Err(Error::ErrorResponse(
8120                ResponseValue::from_response(response).await?,
8121            )),
8122            _ => Err(Error::UnexpectedResponse(response)),
8123        }
8124    }
8125
8126    #[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"]
8127    pub async fn multiple_enhanced_tag_documents_v2_usercollection_enhanced_tag_get<'a>(
8128        &'a self,
8129        end_date: Option<&'a ::chrono::naive::NaiveDate>,
8130        fields: Option<&'a str>,
8131        next_token: Option<&'a str>,
8132        start_date: Option<&'a ::chrono::naive::NaiveDate>,
8133    ) -> Result<
8134        ResponseValue<types::MultiDocumentResponseEnhancedTagModel>,
8135        Error<types::HttpValidationError>,
8136    > {
8137        let url = format!("{}/v2/usercollection/enhanced_tag", self.baseurl,);
8138        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8139        header_map.append(
8140            ::reqwest::header::HeaderName::from_static("api-version"),
8141            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8142        );
8143        #[allow(unused_mut)]
8144        let mut request = self
8145            .client
8146            .get(url)
8147            .header(
8148                ::reqwest::header::ACCEPT,
8149                ::reqwest::header::HeaderValue::from_static("application/json"),
8150            )
8151            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
8152            .query(&progenitor_client::QueryParam::new("fields", &fields))
8153            .query(&progenitor_client::QueryParam::new(
8154                "next_token",
8155                &next_token,
8156            ))
8157            .query(&progenitor_client::QueryParam::new(
8158                "start_date",
8159                &start_date,
8160            ))
8161            .headers(header_map)
8162            .build()?;
8163        let info = OperationInfo {
8164            operation_id: "multiple_enhanced_tag_documents_v2_usercollection_enhanced_tag_get",
8165        };
8166        self.pre(&mut request, &info).await?;
8167        let result = self.exec(request, &info).await;
8168        self.post(&result, &info).await?;
8169        let response = result?;
8170        match response.status().as_u16() {
8171            200u16 => ResponseValue::from_response(response).await,
8172            422u16 => Err(Error::ErrorResponse(
8173                ResponseValue::from_response(response).await?,
8174            )),
8175            _ => Err(Error::UnexpectedResponse(response)),
8176        }
8177    }
8178
8179    #[doc = "Single Enhanced Tag Document\n\nSends a `GET` request to `/v2/usercollection/enhanced_tag/{document_id}`\n\n"]
8180    pub async fn single_enhanced_tag_document_v2_usercollection_enhanced_tag_document_id_get<'a>(
8181        &'a self,
8182        document_id: &'a str,
8183    ) -> Result<ResponseValue<types::EnhancedTagModel>, Error<types::HttpValidationError>> {
8184        let url = format!(
8185            "{}/v2/usercollection/enhanced_tag/{}",
8186            self.baseurl,
8187            encode_path(&document_id.to_string()),
8188        );
8189        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8190        header_map.append(
8191            ::reqwest::header::HeaderName::from_static("api-version"),
8192            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8193        );
8194        #[allow(unused_mut)]
8195        let mut request = self
8196            .client
8197            .get(url)
8198            .header(
8199                ::reqwest::header::ACCEPT,
8200                ::reqwest::header::HeaderValue::from_static("application/json"),
8201            )
8202            .headers(header_map)
8203            .build()?;
8204        let info = OperationInfo {
8205            operation_id:
8206                "single_enhanced_tag_document_v2_usercollection_enhanced_tag_document_id_get",
8207        };
8208        self.pre(&mut request, &info).await?;
8209        let result = self.exec(request, &info).await;
8210        self.post(&result, &info).await?;
8211        let response = result?;
8212        match response.status().as_u16() {
8213            200u16 => ResponseValue::from_response(response).await,
8214            422u16 => Err(Error::ErrorResponse(
8215                ResponseValue::from_response(response).await?,
8216            )),
8217            _ => Err(Error::UnexpectedResponse(response)),
8218        }
8219    }
8220
8221    #[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"]
8222    pub async fn multiple_heartrate_documents_v2_usercollection_heartrate_get<'a>(
8223        &'a self,
8224        end_datetime: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>,
8225        fields: Option<&'a str>,
8226        latest: Option<bool>,
8227        next_token: Option<&'a str>,
8228        start_datetime: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>,
8229    ) -> Result<
8230        ResponseValue<types::ResponseMultipleHeartrateDocumentsV2UsercollectionHeartrateGet>,
8231        Error<types::HttpValidationError>,
8232    > {
8233        let url = format!("{}/v2/usercollection/heartrate", self.baseurl,);
8234        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8235        header_map.append(
8236            ::reqwest::header::HeaderName::from_static("api-version"),
8237            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8238        );
8239        #[allow(unused_mut)]
8240        let mut request = self
8241            .client
8242            .get(url)
8243            .header(
8244                ::reqwest::header::ACCEPT,
8245                ::reqwest::header::HeaderValue::from_static("application/json"),
8246            )
8247            .query(&progenitor_client::QueryParam::new(
8248                "end_datetime",
8249                &end_datetime,
8250            ))
8251            .query(&progenitor_client::QueryParam::new("fields", &fields))
8252            .query(&progenitor_client::QueryParam::new("latest", &latest))
8253            .query(&progenitor_client::QueryParam::new(
8254                "next_token",
8255                &next_token,
8256            ))
8257            .query(&progenitor_client::QueryParam::new(
8258                "start_datetime",
8259                &start_datetime,
8260            ))
8261            .headers(header_map)
8262            .build()?;
8263        let info = OperationInfo {
8264            operation_id: "multiple_heartrate_documents_v2_usercollection_heartrate_get",
8265        };
8266        self.pre(&mut request, &info).await?;
8267        let result = self.exec(request, &info).await;
8268        self.post(&result, &info).await?;
8269        let response = result?;
8270        match response.status().as_u16() {
8271            200u16 => ResponseValue::from_response(response).await,
8272            422u16 => Err(Error::ErrorResponse(
8273                ResponseValue::from_response(response).await?,
8274            )),
8275            _ => Err(Error::UnexpectedResponse(response)),
8276        }
8277    }
8278
8279    #[doc = "Single Personal Info Document\n\nSends a `GET` request to `/v2/usercollection/personal_info`\n\n"]
8280    pub async fn single_personal_info_document_v2_usercollection_personal_info_get<'a>(
8281        &'a self,
8282    ) -> Result<ResponseValue<types::PersonalInfoResponse>, Error<()>> {
8283        let url = format!("{}/v2/usercollection/personal_info", self.baseurl,);
8284        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8285        header_map.append(
8286            ::reqwest::header::HeaderName::from_static("api-version"),
8287            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8288        );
8289        #[allow(unused_mut)]
8290        let mut request = self
8291            .client
8292            .get(url)
8293            .header(
8294                ::reqwest::header::ACCEPT,
8295                ::reqwest::header::HeaderValue::from_static("application/json"),
8296            )
8297            .headers(header_map)
8298            .build()?;
8299        let info = OperationInfo {
8300            operation_id: "single_personal_info_document_v2_usercollection_personal_info_get",
8301        };
8302        self.pre(&mut request, &info).await?;
8303        let result = self.exec(request, &info).await;
8304        self.post(&result, &info).await?;
8305        let response = result?;
8306        match response.status().as_u16() {
8307            200u16 => ResponseValue::from_response(response).await,
8308            _ => Err(Error::UnexpectedResponse(response)),
8309        }
8310    }
8311
8312    #[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"]
8313    pub async fn multiple_rest_mode_period_documents_v2_usercollection_rest_mode_period_get<'a>(
8314        &'a self,
8315        end_date: Option<&'a ::chrono::naive::NaiveDate>,
8316        fields: Option<&'a str>,
8317        next_token: Option<&'a str>,
8318        start_date: Option<&'a ::chrono::naive::NaiveDate>,
8319    ) -> Result<
8320        ResponseValue<types::MultiDocumentResponsePublicRestModePeriod>,
8321        Error<types::HttpValidationError>,
8322    > {
8323        let url = format!("{}/v2/usercollection/rest_mode_period", self.baseurl,);
8324        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8325        header_map.append(
8326            ::reqwest::header::HeaderName::from_static("api-version"),
8327            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8328        );
8329        #[allow(unused_mut)]
8330        let mut request = self
8331            .client
8332            .get(url)
8333            .header(
8334                ::reqwest::header::ACCEPT,
8335                ::reqwest::header::HeaderValue::from_static("application/json"),
8336            )
8337            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
8338            .query(&progenitor_client::QueryParam::new("fields", &fields))
8339            .query(&progenitor_client::QueryParam::new(
8340                "next_token",
8341                &next_token,
8342            ))
8343            .query(&progenitor_client::QueryParam::new(
8344                "start_date",
8345                &start_date,
8346            ))
8347            .headers(header_map)
8348            .build()?;
8349        let info = OperationInfo {
8350            operation_id:
8351                "multiple_rest_mode_period_documents_v2_usercollection_rest_mode_period_get",
8352        };
8353        self.pre(&mut request, &info).await?;
8354        let result = self.exec(request, &info).await;
8355        self.post(&result, &info).await?;
8356        let response = result?;
8357        match response.status().as_u16() {
8358            200u16 => ResponseValue::from_response(response).await,
8359            422u16 => Err(Error::ErrorResponse(
8360                ResponseValue::from_response(response).await?,
8361            )),
8362            _ => Err(Error::UnexpectedResponse(response)),
8363        }
8364    }
8365
8366    #[doc = "Single Rest Mode Period Document\n\nSends a `GET` request to `/v2/usercollection/rest_mode_period/{document_id}`\n\n"]
8367    pub async fn single_rest_mode_period_document_v2_usercollection_rest_mode_period_document_id_get<
8368        'a,
8369    >(
8370        &'a self,
8371        document_id: &'a str,
8372    ) -> Result<ResponseValue<types::PublicRestModePeriod>, Error<types::HttpValidationError>> {
8373        let url = format!(
8374            "{}/v2/usercollection/rest_mode_period/{}",
8375            self.baseurl,
8376            encode_path(&document_id.to_string()),
8377        );
8378        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8379        header_map.append(
8380            ::reqwest::header::HeaderName::from_static("api-version"),
8381            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8382        );
8383        #[allow(unused_mut)]
8384        let mut request = self
8385            .client
8386            .get(url)
8387            .header(
8388                ::reqwest::header::ACCEPT,
8389                ::reqwest::header::HeaderValue::from_static("application/json"),
8390            )
8391            .headers(header_map)
8392            .build()?;
8393        let info = OperationInfo { operation_id : "single_rest_mode_period_document_v2_usercollection_rest_mode_period_document_id_get" , } ;
8394        self.pre(&mut request, &info).await?;
8395        let result = self.exec(request, &info).await;
8396        self.post(&result, &info).await?;
8397        let response = result?;
8398        match response.status().as_u16() {
8399            200u16 => ResponseValue::from_response(response).await,
8400            422u16 => Err(Error::ErrorResponse(
8401                ResponseValue::from_response(response).await?,
8402            )),
8403            _ => Err(Error::UnexpectedResponse(response)),
8404        }
8405    }
8406
8407    #[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"]
8408    pub async fn multiple_ring_battery_level_documents_v2_usercollection_ring_battery_level_get<
8409        'a,
8410    >(
8411        &'a self,
8412        end_datetime: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>,
8413        fields: Option<&'a str>,
8414        latest: Option<bool>,
8415        next_token: Option<&'a str>,
8416        start_datetime: Option<&'a ::chrono::DateTime<::chrono::offset::Utc>>,
8417    ) -> Result<
8418        ResponseValue<
8419            types::ResponseMultipleRingBatteryLevelDocumentsV2UsercollectionRingBatteryLevelGet,
8420        >,
8421        Error<types::HttpValidationError>,
8422    > {
8423        let url = format!("{}/v2/usercollection/ring_battery_level", self.baseurl,);
8424        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8425        header_map.append(
8426            ::reqwest::header::HeaderName::from_static("api-version"),
8427            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8428        );
8429        #[allow(unused_mut)]
8430        let mut request = self
8431            .client
8432            .get(url)
8433            .header(
8434                ::reqwest::header::ACCEPT,
8435                ::reqwest::header::HeaderValue::from_static("application/json"),
8436            )
8437            .query(&progenitor_client::QueryParam::new(
8438                "end_datetime",
8439                &end_datetime,
8440            ))
8441            .query(&progenitor_client::QueryParam::new("fields", &fields))
8442            .query(&progenitor_client::QueryParam::new("latest", &latest))
8443            .query(&progenitor_client::QueryParam::new(
8444                "next_token",
8445                &next_token,
8446            ))
8447            .query(&progenitor_client::QueryParam::new(
8448                "start_datetime",
8449                &start_datetime,
8450            ))
8451            .headers(header_map)
8452            .build()?;
8453        let info = OperationInfo {
8454            operation_id:
8455                "multiple_ring_battery_level_documents_v2_usercollection_ring_battery_level_get",
8456        };
8457        self.pre(&mut request, &info).await?;
8458        let result = self.exec(request, &info).await;
8459        self.post(&result, &info).await?;
8460        let response = result?;
8461        match response.status().as_u16() {
8462            200u16 => ResponseValue::from_response(response).await,
8463            422u16 => Err(Error::ErrorResponse(
8464                ResponseValue::from_response(response).await?,
8465            )),
8466            _ => Err(Error::UnexpectedResponse(response)),
8467        }
8468    }
8469
8470    #[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"]
8471    pub async fn multiple_ring_configuration_documents_v2_usercollection_ring_configuration_get<
8472        'a,
8473    >(
8474        &'a self,
8475        fields: Option<&'a str>,
8476        next_token: Option<&'a str>,
8477    ) -> Result<
8478        ResponseValue<types::MultiDocumentResponsePublicRingConfiguration>,
8479        Error<types::HttpValidationError>,
8480    > {
8481        let url = format!("{}/v2/usercollection/ring_configuration", self.baseurl,);
8482        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8483        header_map.append(
8484            ::reqwest::header::HeaderName::from_static("api-version"),
8485            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8486        );
8487        #[allow(unused_mut)]
8488        let mut request = self
8489            .client
8490            .get(url)
8491            .header(
8492                ::reqwest::header::ACCEPT,
8493                ::reqwest::header::HeaderValue::from_static("application/json"),
8494            )
8495            .query(&progenitor_client::QueryParam::new("fields", &fields))
8496            .query(&progenitor_client::QueryParam::new(
8497                "next_token",
8498                &next_token,
8499            ))
8500            .headers(header_map)
8501            .build()?;
8502        let info = OperationInfo {
8503            operation_id:
8504                "multiple_ring_configuration_documents_v2_usercollection_ring_configuration_get",
8505        };
8506        self.pre(&mut request, &info).await?;
8507        let result = self.exec(request, &info).await;
8508        self.post(&result, &info).await?;
8509        let response = result?;
8510        match response.status().as_u16() {
8511            200u16 => ResponseValue::from_response(response).await,
8512            422u16 => Err(Error::ErrorResponse(
8513                ResponseValue::from_response(response).await?,
8514            )),
8515            _ => Err(Error::UnexpectedResponse(response)),
8516        }
8517    }
8518
8519    #[doc = "Single Ring Configuration Document\n\nSends a `GET` request to `/v2/usercollection/ring_configuration/{document_id}`\n\n"]
8520    pub async fn single_ring_configuration_document_v2_usercollection_ring_configuration_document_id_get<
8521        'a,
8522    >(
8523        &'a self,
8524        document_id: &'a str,
8525    ) -> Result<ResponseValue<types::PublicRingConfiguration>, Error<types::HttpValidationError>>
8526    {
8527        let url = format!(
8528            "{}/v2/usercollection/ring_configuration/{}",
8529            self.baseurl,
8530            encode_path(&document_id.to_string()),
8531        );
8532        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8533        header_map.append(
8534            ::reqwest::header::HeaderName::from_static("api-version"),
8535            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8536        );
8537        #[allow(unused_mut)]
8538        let mut request = self
8539            .client
8540            .get(url)
8541            .header(
8542                ::reqwest::header::ACCEPT,
8543                ::reqwest::header::HeaderValue::from_static("application/json"),
8544            )
8545            .headers(header_map)
8546            .build()?;
8547        let info = OperationInfo { operation_id : "single_ring_configuration_document_v2_usercollection_ring_configuration_document_id_get" , } ;
8548        self.pre(&mut request, &info).await?;
8549        let result = self.exec(request, &info).await;
8550        self.post(&result, &info).await?;
8551        let response = result?;
8552        match response.status().as_u16() {
8553            200u16 => ResponseValue::from_response(response).await,
8554            422u16 => Err(Error::ErrorResponse(
8555                ResponseValue::from_response(response).await?,
8556            )),
8557            _ => Err(Error::UnexpectedResponse(response)),
8558        }
8559    }
8560
8561    #[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"]
8562    pub async fn multiple_session_documents_v2_usercollection_session_get<'a>(
8563        &'a self,
8564        end_date: Option<&'a ::chrono::naive::NaiveDate>,
8565        fields: Option<&'a str>,
8566        next_token: Option<&'a str>,
8567        start_date: Option<&'a ::chrono::naive::NaiveDate>,
8568    ) -> Result<
8569        ResponseValue<types::MultiDocumentResponsePublicSession>,
8570        Error<types::HttpValidationError>,
8571    > {
8572        let url = format!("{}/v2/usercollection/session", self.baseurl,);
8573        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8574        header_map.append(
8575            ::reqwest::header::HeaderName::from_static("api-version"),
8576            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8577        );
8578        #[allow(unused_mut)]
8579        let mut request = self
8580            .client
8581            .get(url)
8582            .header(
8583                ::reqwest::header::ACCEPT,
8584                ::reqwest::header::HeaderValue::from_static("application/json"),
8585            )
8586            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
8587            .query(&progenitor_client::QueryParam::new("fields", &fields))
8588            .query(&progenitor_client::QueryParam::new(
8589                "next_token",
8590                &next_token,
8591            ))
8592            .query(&progenitor_client::QueryParam::new(
8593                "start_date",
8594                &start_date,
8595            ))
8596            .headers(header_map)
8597            .build()?;
8598        let info = OperationInfo {
8599            operation_id: "multiple_session_documents_v2_usercollection_session_get",
8600        };
8601        self.pre(&mut request, &info).await?;
8602        let result = self.exec(request, &info).await;
8603        self.post(&result, &info).await?;
8604        let response = result?;
8605        match response.status().as_u16() {
8606            200u16 => ResponseValue::from_response(response).await,
8607            422u16 => Err(Error::ErrorResponse(
8608                ResponseValue::from_response(response).await?,
8609            )),
8610            _ => Err(Error::UnexpectedResponse(response)),
8611        }
8612    }
8613
8614    #[doc = "Single Session Document\n\nSends a `GET` request to `/v2/usercollection/session/{document_id}`\n\n"]
8615    pub async fn single_session_document_v2_usercollection_session_document_id_get<'a>(
8616        &'a self,
8617        document_id: &'a str,
8618    ) -> Result<ResponseValue<types::PublicSession>, Error<types::HttpValidationError>> {
8619        let url = format!(
8620            "{}/v2/usercollection/session/{}",
8621            self.baseurl,
8622            encode_path(&document_id.to_string()),
8623        );
8624        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8625        header_map.append(
8626            ::reqwest::header::HeaderName::from_static("api-version"),
8627            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8628        );
8629        #[allow(unused_mut)]
8630        let mut request = self
8631            .client
8632            .get(url)
8633            .header(
8634                ::reqwest::header::ACCEPT,
8635                ::reqwest::header::HeaderValue::from_static("application/json"),
8636            )
8637            .headers(header_map)
8638            .build()?;
8639        let info = OperationInfo {
8640            operation_id: "single_session_document_v2_usercollection_session_document_id_get",
8641        };
8642        self.pre(&mut request, &info).await?;
8643        let result = self.exec(request, &info).await;
8644        self.post(&result, &info).await?;
8645        let response = result?;
8646        match response.status().as_u16() {
8647            200u16 => ResponseValue::from_response(response).await,
8648            422u16 => Err(Error::ErrorResponse(
8649                ResponseValue::from_response(response).await?,
8650            )),
8651            _ => Err(Error::UnexpectedResponse(response)),
8652        }
8653    }
8654
8655    #[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"]
8656    pub async fn multiple_sleep_documents_v2_usercollection_sleep_get<'a>(
8657        &'a self,
8658        end_date: Option<&'a ::chrono::naive::NaiveDate>,
8659        fields: Option<&'a str>,
8660        next_token: Option<&'a str>,
8661        start_date: Option<&'a ::chrono::naive::NaiveDate>,
8662    ) -> Result<
8663        ResponseValue<types::MultiDocumentResponsePublicModifiedSleepModel>,
8664        Error<types::HttpValidationError>,
8665    > {
8666        let url = format!("{}/v2/usercollection/sleep", self.baseurl,);
8667        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8668        header_map.append(
8669            ::reqwest::header::HeaderName::from_static("api-version"),
8670            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8671        );
8672        #[allow(unused_mut)]
8673        let mut request = self
8674            .client
8675            .get(url)
8676            .header(
8677                ::reqwest::header::ACCEPT,
8678                ::reqwest::header::HeaderValue::from_static("application/json"),
8679            )
8680            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
8681            .query(&progenitor_client::QueryParam::new("fields", &fields))
8682            .query(&progenitor_client::QueryParam::new(
8683                "next_token",
8684                &next_token,
8685            ))
8686            .query(&progenitor_client::QueryParam::new(
8687                "start_date",
8688                &start_date,
8689            ))
8690            .headers(header_map)
8691            .build()?;
8692        let info = OperationInfo {
8693            operation_id: "multiple_sleep_documents_v2_usercollection_sleep_get",
8694        };
8695        self.pre(&mut request, &info).await?;
8696        let result = self.exec(request, &info).await;
8697        self.post(&result, &info).await?;
8698        let response = result?;
8699        match response.status().as_u16() {
8700            200u16 => ResponseValue::from_response(response).await,
8701            422u16 => Err(Error::ErrorResponse(
8702                ResponseValue::from_response(response).await?,
8703            )),
8704            _ => Err(Error::UnexpectedResponse(response)),
8705        }
8706    }
8707
8708    #[doc = "Single Sleep Document\n\nSends a `GET` request to `/v2/usercollection/sleep/{document_id}`\n\n"]
8709    pub async fn single_sleep_document_v2_usercollection_sleep_document_id_get<'a>(
8710        &'a self,
8711        document_id: &'a str,
8712    ) -> Result<ResponseValue<types::PublicModifiedSleepModel>, Error<types::HttpValidationError>>
8713    {
8714        let url = format!(
8715            "{}/v2/usercollection/sleep/{}",
8716            self.baseurl,
8717            encode_path(&document_id.to_string()),
8718        );
8719        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8720        header_map.append(
8721            ::reqwest::header::HeaderName::from_static("api-version"),
8722            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8723        );
8724        #[allow(unused_mut)]
8725        let mut request = self
8726            .client
8727            .get(url)
8728            .header(
8729                ::reqwest::header::ACCEPT,
8730                ::reqwest::header::HeaderValue::from_static("application/json"),
8731            )
8732            .headers(header_map)
8733            .build()?;
8734        let info = OperationInfo {
8735            operation_id: "single_sleep_document_v2_usercollection_sleep_document_id_get",
8736        };
8737        self.pre(&mut request, &info).await?;
8738        let result = self.exec(request, &info).await;
8739        self.post(&result, &info).await?;
8740        let response = result?;
8741        match response.status().as_u16() {
8742            200u16 => ResponseValue::from_response(response).await,
8743            422u16 => Err(Error::ErrorResponse(
8744                ResponseValue::from_response(response).await?,
8745            )),
8746            _ => Err(Error::UnexpectedResponse(response)),
8747        }
8748    }
8749
8750    #[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"]
8751    pub async fn multiple_sleep_time_documents_v2_usercollection_sleep_time_get<'a>(
8752        &'a self,
8753        end_date: Option<&'a ::chrono::naive::NaiveDate>,
8754        fields: Option<&'a str>,
8755        next_token: Option<&'a str>,
8756        start_date: Option<&'a ::chrono::naive::NaiveDate>,
8757    ) -> Result<
8758        ResponseValue<types::MultiDocumentResponsePublicSleepTime>,
8759        Error<types::HttpValidationError>,
8760    > {
8761        let url = format!("{}/v2/usercollection/sleep_time", self.baseurl,);
8762        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8763        header_map.append(
8764            ::reqwest::header::HeaderName::from_static("api-version"),
8765            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8766        );
8767        #[allow(unused_mut)]
8768        let mut request = self
8769            .client
8770            .get(url)
8771            .header(
8772                ::reqwest::header::ACCEPT,
8773                ::reqwest::header::HeaderValue::from_static("application/json"),
8774            )
8775            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
8776            .query(&progenitor_client::QueryParam::new("fields", &fields))
8777            .query(&progenitor_client::QueryParam::new(
8778                "next_token",
8779                &next_token,
8780            ))
8781            .query(&progenitor_client::QueryParam::new(
8782                "start_date",
8783                &start_date,
8784            ))
8785            .headers(header_map)
8786            .build()?;
8787        let info = OperationInfo {
8788            operation_id: "multiple_sleep_time_documents_v2_usercollection_sleep_time_get",
8789        };
8790        self.pre(&mut request, &info).await?;
8791        let result = self.exec(request, &info).await;
8792        self.post(&result, &info).await?;
8793        let response = result?;
8794        match response.status().as_u16() {
8795            200u16 => ResponseValue::from_response(response).await,
8796            422u16 => Err(Error::ErrorResponse(
8797                ResponseValue::from_response(response).await?,
8798            )),
8799            _ => Err(Error::UnexpectedResponse(response)),
8800        }
8801    }
8802
8803    #[doc = "Single Sleep Time Document\n\nSends a `GET` request to `/v2/usercollection/sleep_time/{document_id}`\n\n"]
8804    pub async fn single_sleep_time_document_v2_usercollection_sleep_time_document_id_get<'a>(
8805        &'a self,
8806        document_id: &'a str,
8807    ) -> Result<ResponseValue<types::PublicSleepTime>, Error<types::HttpValidationError>> {
8808        let url = format!(
8809            "{}/v2/usercollection/sleep_time/{}",
8810            self.baseurl,
8811            encode_path(&document_id.to_string()),
8812        );
8813        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8814        header_map.append(
8815            ::reqwest::header::HeaderName::from_static("api-version"),
8816            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8817        );
8818        #[allow(unused_mut)]
8819        let mut request = self
8820            .client
8821            .get(url)
8822            .header(
8823                ::reqwest::header::ACCEPT,
8824                ::reqwest::header::HeaderValue::from_static("application/json"),
8825            )
8826            .headers(header_map)
8827            .build()?;
8828        let info = OperationInfo {
8829            operation_id: "single_sleep_time_document_v2_usercollection_sleep_time_document_id_get",
8830        };
8831        self.pre(&mut request, &info).await?;
8832        let result = self.exec(request, &info).await;
8833        self.post(&result, &info).await?;
8834        let response = result?;
8835        match response.status().as_u16() {
8836            200u16 => ResponseValue::from_response(response).await,
8837            422u16 => Err(Error::ErrorResponse(
8838                ResponseValue::from_response(response).await?,
8839            )),
8840            _ => Err(Error::UnexpectedResponse(response)),
8841        }
8842    }
8843
8844    #[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"]
8845    pub async fn multiple_tag_documents_v2_usercollection_tag_get<'a>(
8846        &'a self,
8847        end_date: Option<&'a ::chrono::naive::NaiveDate>,
8848        fields: Option<&'a str>,
8849        next_token: Option<&'a str>,
8850        start_date: Option<&'a ::chrono::naive::NaiveDate>,
8851    ) -> Result<
8852        ResponseValue<types::MultiDocumentResponseTagModel>,
8853        Error<types::HttpValidationError>,
8854    > {
8855        let url = format!("{}/v2/usercollection/tag", self.baseurl,);
8856        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8857        header_map.append(
8858            ::reqwest::header::HeaderName::from_static("api-version"),
8859            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8860        );
8861        #[allow(unused_mut)]
8862        let mut request = self
8863            .client
8864            .get(url)
8865            .header(
8866                ::reqwest::header::ACCEPT,
8867                ::reqwest::header::HeaderValue::from_static("application/json"),
8868            )
8869            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
8870            .query(&progenitor_client::QueryParam::new("fields", &fields))
8871            .query(&progenitor_client::QueryParam::new(
8872                "next_token",
8873                &next_token,
8874            ))
8875            .query(&progenitor_client::QueryParam::new(
8876                "start_date",
8877                &start_date,
8878            ))
8879            .headers(header_map)
8880            .build()?;
8881        let info = OperationInfo {
8882            operation_id: "multiple_tag_documents_v2_usercollection_tag_get",
8883        };
8884        self.pre(&mut request, &info).await?;
8885        let result = self.exec(request, &info).await;
8886        self.post(&result, &info).await?;
8887        let response = result?;
8888        match response.status().as_u16() {
8889            200u16 => ResponseValue::from_response(response).await,
8890            422u16 => Err(Error::ErrorResponse(
8891                ResponseValue::from_response(response).await?,
8892            )),
8893            _ => Err(Error::UnexpectedResponse(response)),
8894        }
8895    }
8896
8897    #[doc = "Single Tag Document\n\nSends a `GET` request to `/v2/usercollection/tag/{document_id}`\n\n"]
8898    pub async fn single_tag_document_v2_usercollection_tag_document_id_get<'a>(
8899        &'a self,
8900        document_id: &'a str,
8901    ) -> Result<ResponseValue<types::TagModel>, Error<types::HttpValidationError>> {
8902        let url = format!(
8903            "{}/v2/usercollection/tag/{}",
8904            self.baseurl,
8905            encode_path(&document_id.to_string()),
8906        );
8907        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8908        header_map.append(
8909            ::reqwest::header::HeaderName::from_static("api-version"),
8910            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8911        );
8912        #[allow(unused_mut)]
8913        let mut request = self
8914            .client
8915            .get(url)
8916            .header(
8917                ::reqwest::header::ACCEPT,
8918                ::reqwest::header::HeaderValue::from_static("application/json"),
8919            )
8920            .headers(header_map)
8921            .build()?;
8922        let info = OperationInfo {
8923            operation_id: "single_tag_document_v2_usercollection_tag_document_id_get",
8924        };
8925        self.pre(&mut request, &info).await?;
8926        let result = self.exec(request, &info).await;
8927        self.post(&result, &info).await?;
8928        let response = result?;
8929        match response.status().as_u16() {
8930            200u16 => ResponseValue::from_response(response).await,
8931            422u16 => Err(Error::ErrorResponse(
8932                ResponseValue::from_response(response).await?,
8933            )),
8934            _ => Err(Error::UnexpectedResponse(response)),
8935        }
8936    }
8937
8938    #[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"]
8939    pub async fn multiple_v_o2_max_documents_v2_usercollection_v_o2_max_get<'a>(
8940        &'a self,
8941        end_date: Option<&'a ::chrono::naive::NaiveDate>,
8942        fields: Option<&'a str>,
8943        next_token: Option<&'a str>,
8944        start_date: Option<&'a ::chrono::naive::NaiveDate>,
8945    ) -> Result<
8946        ResponseValue<types::MultiDocumentResponsePublicVo2Max>,
8947        Error<types::HttpValidationError>,
8948    > {
8949        let url = format!("{}/v2/usercollection/vO2_max", self.baseurl,);
8950        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8951        header_map.append(
8952            ::reqwest::header::HeaderName::from_static("api-version"),
8953            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8954        );
8955        #[allow(unused_mut)]
8956        let mut request = self
8957            .client
8958            .get(url)
8959            .header(
8960                ::reqwest::header::ACCEPT,
8961                ::reqwest::header::HeaderValue::from_static("application/json"),
8962            )
8963            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
8964            .query(&progenitor_client::QueryParam::new("fields", &fields))
8965            .query(&progenitor_client::QueryParam::new(
8966                "next_token",
8967                &next_token,
8968            ))
8969            .query(&progenitor_client::QueryParam::new(
8970                "start_date",
8971                &start_date,
8972            ))
8973            .headers(header_map)
8974            .build()?;
8975        let info = OperationInfo {
8976            operation_id: "multiple_v_o2_max_documents_v2_usercollection_v_o2_max_get",
8977        };
8978        self.pre(&mut request, &info).await?;
8979        let result = self.exec(request, &info).await;
8980        self.post(&result, &info).await?;
8981        let response = result?;
8982        match response.status().as_u16() {
8983            200u16 => ResponseValue::from_response(response).await,
8984            422u16 => Err(Error::ErrorResponse(
8985                ResponseValue::from_response(response).await?,
8986            )),
8987            _ => Err(Error::UnexpectedResponse(response)),
8988        }
8989    }
8990
8991    #[doc = "Single Vo2 Max Document\n\nSends a `GET` request to `/v2/usercollection/vO2_max/{document_id}`\n\n"]
8992    pub async fn single_v_o2_max_document_v2_usercollection_v_o2_max_document_id_get<'a>(
8993        &'a self,
8994        document_id: &'a str,
8995    ) -> Result<ResponseValue<types::PublicVo2Max>, Error<types::HttpValidationError>> {
8996        let url = format!(
8997            "{}/v2/usercollection/vO2_max/{}",
8998            self.baseurl,
8999            encode_path(&document_id.to_string()),
9000        );
9001        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
9002        header_map.append(
9003            ::reqwest::header::HeaderName::from_static("api-version"),
9004            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9005        );
9006        #[allow(unused_mut)]
9007        let mut request = self
9008            .client
9009            .get(url)
9010            .header(
9011                ::reqwest::header::ACCEPT,
9012                ::reqwest::header::HeaderValue::from_static("application/json"),
9013            )
9014            .headers(header_map)
9015            .build()?;
9016        let info = OperationInfo {
9017            operation_id: "single_v_o2_max_document_v2_usercollection_v_o2_max_document_id_get",
9018        };
9019        self.pre(&mut request, &info).await?;
9020        let result = self.exec(request, &info).await;
9021        self.post(&result, &info).await?;
9022        let response = result?;
9023        match response.status().as_u16() {
9024            200u16 => ResponseValue::from_response(response).await,
9025            422u16 => Err(Error::ErrorResponse(
9026                ResponseValue::from_response(response).await?,
9027            )),
9028            _ => Err(Error::UnexpectedResponse(response)),
9029        }
9030    }
9031
9032    #[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"]
9033    pub async fn multiple_workout_documents_v2_usercollection_workout_get<'a>(
9034        &'a self,
9035        end_date: Option<&'a ::chrono::naive::NaiveDate>,
9036        fields: Option<&'a str>,
9037        next_token: Option<&'a str>,
9038        start_date: Option<&'a ::chrono::naive::NaiveDate>,
9039    ) -> Result<
9040        ResponseValue<types::MultiDocumentResponsePublicWorkout>,
9041        Error<types::HttpValidationError>,
9042    > {
9043        let url = format!("{}/v2/usercollection/workout", self.baseurl,);
9044        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
9045        header_map.append(
9046            ::reqwest::header::HeaderName::from_static("api-version"),
9047            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9048        );
9049        #[allow(unused_mut)]
9050        let mut request = self
9051            .client
9052            .get(url)
9053            .header(
9054                ::reqwest::header::ACCEPT,
9055                ::reqwest::header::HeaderValue::from_static("application/json"),
9056            )
9057            .query(&progenitor_client::QueryParam::new("end_date", &end_date))
9058            .query(&progenitor_client::QueryParam::new("fields", &fields))
9059            .query(&progenitor_client::QueryParam::new(
9060                "next_token",
9061                &next_token,
9062            ))
9063            .query(&progenitor_client::QueryParam::new(
9064                "start_date",
9065                &start_date,
9066            ))
9067            .headers(header_map)
9068            .build()?;
9069        let info = OperationInfo {
9070            operation_id: "multiple_workout_documents_v2_usercollection_workout_get",
9071        };
9072        self.pre(&mut request, &info).await?;
9073        let result = self.exec(request, &info).await;
9074        self.post(&result, &info).await?;
9075        let response = result?;
9076        match response.status().as_u16() {
9077            200u16 => ResponseValue::from_response(response).await,
9078            422u16 => Err(Error::ErrorResponse(
9079                ResponseValue::from_response(response).await?,
9080            )),
9081            _ => Err(Error::UnexpectedResponse(response)),
9082        }
9083    }
9084
9085    #[doc = "Single Workout Document\n\nSends a `GET` request to `/v2/usercollection/workout/{document_id}`\n\n"]
9086    pub async fn single_workout_document_v2_usercollection_workout_document_id_get<'a>(
9087        &'a self,
9088        document_id: &'a str,
9089    ) -> Result<ResponseValue<types::PublicWorkout>, Error<types::HttpValidationError>> {
9090        let url = format!(
9091            "{}/v2/usercollection/workout/{}",
9092            self.baseurl,
9093            encode_path(&document_id.to_string()),
9094        );
9095        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
9096        header_map.append(
9097            ::reqwest::header::HeaderName::from_static("api-version"),
9098            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9099        );
9100        #[allow(unused_mut)]
9101        let mut request = self
9102            .client
9103            .get(url)
9104            .header(
9105                ::reqwest::header::ACCEPT,
9106                ::reqwest::header::HeaderValue::from_static("application/json"),
9107            )
9108            .headers(header_map)
9109            .build()?;
9110        let info = OperationInfo {
9111            operation_id: "single_workout_document_v2_usercollection_workout_document_id_get",
9112        };
9113        self.pre(&mut request, &info).await?;
9114        let result = self.exec(request, &info).await;
9115        self.post(&result, &info).await?;
9116        let response = result?;
9117        match response.status().as_u16() {
9118            200u16 => ResponseValue::from_response(response).await,
9119            422u16 => Err(Error::ErrorResponse(
9120                ResponseValue::from_response(response).await?,
9121            )),
9122            _ => Err(Error::UnexpectedResponse(response)),
9123        }
9124    }
9125
9126    #[doc = "List Webhook Subscriptions\n\nSends a `GET` request to `/v2/webhook/subscription`\n\n"]
9127    pub async fn list_webhook_subscriptions_v2_webhook_subscription_get<'a>(
9128        &'a self,
9129    ) -> Result<ResponseValue<::std::vec::Vec<types::WebhookSubscriptionModel>>, Error<()>> {
9130        let url = format!("{}/v2/webhook/subscription", self.baseurl,);
9131        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
9132        header_map.append(
9133            ::reqwest::header::HeaderName::from_static("api-version"),
9134            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9135        );
9136        #[allow(unused_mut)]
9137        let mut request = self
9138            .client
9139            .get(url)
9140            .header(
9141                ::reqwest::header::ACCEPT,
9142                ::reqwest::header::HeaderValue::from_static("application/json"),
9143            )
9144            .headers(header_map)
9145            .build()?;
9146        let info = OperationInfo {
9147            operation_id: "list_webhook_subscriptions_v2_webhook_subscription_get",
9148        };
9149        self.pre(&mut request, &info).await?;
9150        let result = self.exec(request, &info).await;
9151        self.post(&result, &info).await?;
9152        let response = result?;
9153        match response.status().as_u16() {
9154            200u16 => ResponseValue::from_response(response).await,
9155            _ => Err(Error::UnexpectedResponse(response)),
9156        }
9157    }
9158
9159    #[doc = "Create Webhook Subscription\n\nSends a `POST` request to `/v2/webhook/subscription`\n\n"]
9160    pub async fn create_webhook_subscription_v2_webhook_subscription_post<'a>(
9161        &'a self,
9162        body: &'a types::CreateWebhookSubscriptionRequest,
9163    ) -> Result<ResponseValue<types::WebhookSubscriptionModel>, Error<types::HttpValidationError>>
9164    {
9165        let url = format!("{}/v2/webhook/subscription", self.baseurl,);
9166        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
9167        header_map.append(
9168            ::reqwest::header::HeaderName::from_static("api-version"),
9169            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9170        );
9171        #[allow(unused_mut)]
9172        let mut request = self
9173            .client
9174            .post(url)
9175            .header(
9176                ::reqwest::header::ACCEPT,
9177                ::reqwest::header::HeaderValue::from_static("application/json"),
9178            )
9179            .json(&body)
9180            .headers(header_map)
9181            .build()?;
9182        let info = OperationInfo {
9183            operation_id: "create_webhook_subscription_v2_webhook_subscription_post",
9184        };
9185        self.pre(&mut request, &info).await?;
9186        let result = self.exec(request, &info).await;
9187        self.post(&result, &info).await?;
9188        let response = result?;
9189        match response.status().as_u16() {
9190            201u16 => ResponseValue::from_response(response).await,
9191            422u16 => Err(Error::ErrorResponse(
9192                ResponseValue::from_response(response).await?,
9193            )),
9194            _ => Err(Error::UnexpectedResponse(response)),
9195        }
9196    }
9197
9198    #[doc = "Renew Webhook Subscription\n\nSends a `PUT` request to `/v2/webhook/subscription/renew/{id}`\n\n"]
9199    pub async fn renew_webhook_subscription_v2_webhook_subscription_renew_id_put<'a>(
9200        &'a self,
9201        id: &'a str,
9202    ) -> Result<ResponseValue<types::WebhookSubscriptionModel>, Error<types::HttpValidationError>>
9203    {
9204        let url = format!(
9205            "{}/v2/webhook/subscription/renew/{}",
9206            self.baseurl,
9207            encode_path(&id.to_string()),
9208        );
9209        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
9210        header_map.append(
9211            ::reqwest::header::HeaderName::from_static("api-version"),
9212            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9213        );
9214        #[allow(unused_mut)]
9215        let mut request = self
9216            .client
9217            .put(url)
9218            .header(
9219                ::reqwest::header::ACCEPT,
9220                ::reqwest::header::HeaderValue::from_static("application/json"),
9221            )
9222            .headers(header_map)
9223            .build()?;
9224        let info = OperationInfo {
9225            operation_id: "renew_webhook_subscription_v2_webhook_subscription_renew_id_put",
9226        };
9227        self.pre(&mut request, &info).await?;
9228        let result = self.exec(request, &info).await;
9229        self.post(&result, &info).await?;
9230        let response = result?;
9231        match response.status().as_u16() {
9232            200u16 => ResponseValue::from_response(response).await,
9233            422u16 => Err(Error::ErrorResponse(
9234                ResponseValue::from_response(response).await?,
9235            )),
9236            _ => Err(Error::UnexpectedResponse(response)),
9237        }
9238    }
9239
9240    #[doc = "Get Webhook Subscription\n\nSends a `GET` request to `/v2/webhook/subscription/{id}`\n\n"]
9241    pub async fn get_webhook_subscription_v2_webhook_subscription_id_get<'a>(
9242        &'a self,
9243        id: &'a str,
9244    ) -> Result<ResponseValue<types::WebhookSubscriptionModel>, Error<types::HttpValidationError>>
9245    {
9246        let url = format!(
9247            "{}/v2/webhook/subscription/{}",
9248            self.baseurl,
9249            encode_path(&id.to_string()),
9250        );
9251        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
9252        header_map.append(
9253            ::reqwest::header::HeaderName::from_static("api-version"),
9254            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9255        );
9256        #[allow(unused_mut)]
9257        let mut request = self
9258            .client
9259            .get(url)
9260            .header(
9261                ::reqwest::header::ACCEPT,
9262                ::reqwest::header::HeaderValue::from_static("application/json"),
9263            )
9264            .headers(header_map)
9265            .build()?;
9266        let info = OperationInfo {
9267            operation_id: "get_webhook_subscription_v2_webhook_subscription_id_get",
9268        };
9269        self.pre(&mut request, &info).await?;
9270        let result = self.exec(request, &info).await;
9271        self.post(&result, &info).await?;
9272        let response = result?;
9273        match response.status().as_u16() {
9274            200u16 => ResponseValue::from_response(response).await,
9275            422u16 => Err(Error::ErrorResponse(
9276                ResponseValue::from_response(response).await?,
9277            )),
9278            _ => Err(Error::UnexpectedResponse(response)),
9279        }
9280    }
9281
9282    #[doc = "Update Webhook Subscription\n\nSends a `PUT` request to `/v2/webhook/subscription/{id}`\n\n"]
9283    pub async fn update_webhook_subscription_v2_webhook_subscription_id_put<'a>(
9284        &'a self,
9285        id: &'a str,
9286        body: &'a types::UpdateWebhookSubscriptionRequest,
9287    ) -> Result<ResponseValue<types::WebhookSubscriptionModel>, Error<types::HttpValidationError>>
9288    {
9289        let url = format!(
9290            "{}/v2/webhook/subscription/{}",
9291            self.baseurl,
9292            encode_path(&id.to_string()),
9293        );
9294        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
9295        header_map.append(
9296            ::reqwest::header::HeaderName::from_static("api-version"),
9297            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9298        );
9299        #[allow(unused_mut)]
9300        let mut request = self
9301            .client
9302            .put(url)
9303            .header(
9304                ::reqwest::header::ACCEPT,
9305                ::reqwest::header::HeaderValue::from_static("application/json"),
9306            )
9307            .json(&body)
9308            .headers(header_map)
9309            .build()?;
9310        let info = OperationInfo {
9311            operation_id: "update_webhook_subscription_v2_webhook_subscription_id_put",
9312        };
9313        self.pre(&mut request, &info).await?;
9314        let result = self.exec(request, &info).await;
9315        self.post(&result, &info).await?;
9316        let response = result?;
9317        match response.status().as_u16() {
9318            200u16 => ResponseValue::from_response(response).await,
9319            422u16 => Err(Error::ErrorResponse(
9320                ResponseValue::from_response(response).await?,
9321            )),
9322            _ => Err(Error::UnexpectedResponse(response)),
9323        }
9324    }
9325
9326    #[doc = "Delete Webhook Subscription\n\nSends a `DELETE` request to `/v2/webhook/subscription/{id}`\n\n"]
9327    pub async fn delete_webhook_subscription_v2_webhook_subscription_id_delete<'a>(
9328        &'a self,
9329        id: &'a str,
9330    ) -> Result<ResponseValue<()>, Error<types::HttpValidationError>> {
9331        let url = format!(
9332            "{}/v2/webhook/subscription/{}",
9333            self.baseurl,
9334            encode_path(&id.to_string()),
9335        );
9336        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
9337        header_map.append(
9338            ::reqwest::header::HeaderName::from_static("api-version"),
9339            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9340        );
9341        #[allow(unused_mut)]
9342        let mut request = self
9343            .client
9344            .delete(url)
9345            .header(
9346                ::reqwest::header::ACCEPT,
9347                ::reqwest::header::HeaderValue::from_static("application/json"),
9348            )
9349            .headers(header_map)
9350            .build()?;
9351        let info = OperationInfo {
9352            operation_id: "delete_webhook_subscription_v2_webhook_subscription_id_delete",
9353        };
9354        self.pre(&mut request, &info).await?;
9355        let result = self.exec(request, &info).await;
9356        self.post(&result, &info).await?;
9357        let response = result?;
9358        match response.status().as_u16() {
9359            204u16 => Ok(ResponseValue::empty(response)),
9360            422u16 => Err(Error::ErrorResponse(
9361                ResponseValue::from_response(response).await?,
9362            )),
9363            _ => Err(Error::UnexpectedResponse(response)),
9364        }
9365    }
9366}
9367
9368#[doc = r" Items consumers will typically use such as the Client."]
9369pub mod prelude {
9370    #[allow(unused_imports)]
9371    pub use super::Client;
9372}