Skip to main content

openapp_sdk_common/
generated.rs

1// @generated by `just sdk::core::openapi-gen` — DO NOT EDIT.
2// Source: packages/api-spec/openapi.json
3
4#![allow(
5    clippy::all,
6    clippy::pedantic,
7    clippy::nursery,
8    clippy::restriction,
9    clippy::cargo,
10    dead_code,
11    missing_debug_implementations,
12    unused_imports,
13    unused_variables,
14    rust_2018_idioms
15)]
16
17#[allow(unused_imports)]
18pub use progenitor_client::{ByteStream, ClientInfo, Error, ResponseValue};
19#[allow(unused_imports)]
20use progenitor_client::{ClientHooks, OperationInfo, RequestBuilderExt, encode_path};
21/// Types used as operation parameters and responses.
22#[allow(clippy::all)]
23pub mod types {
24    /// Error types.
25    pub mod error {
26        /// Error from a `TryFrom` or `FromStr` implementation.
27        pub struct ConversionError(::std::borrow::Cow<'static, str>);
28        impl ::std::error::Error for ConversionError {}
29        impl ::std::fmt::Display for ConversionError {
30            fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
31                ::std::fmt::Display::fmt(&self.0, f)
32            }
33        }
34        impl ::std::fmt::Debug for ConversionError {
35            fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
36                ::std::fmt::Debug::fmt(&self.0, f)
37            }
38        }
39        impl From<&'static str> for ConversionError {
40            fn from(value: &'static str) -> Self {
41                Self(value.into())
42            }
43        }
44        impl From<String> for ConversionError {
45            fn from(value: String) -> Self {
46                Self(value.into())
47            }
48        }
49    }
50    ///Request to accept EULA and provision user
51    ///
52    /// <details><summary>JSON schema</summary>
53    ///
54    /// ```json
55    ///{
56    ///  "description": "Request to accept EULA and provision user",
57    ///  "type": "object",
58    ///  "required": [
59    ///    "accepted"
60    ///  ],
61    ///  "properties": {
62    ///    "accepted": {
63    ///      "type": "boolean"
64    ///    }
65    ///  }
66    ///}
67    /// ```
68    /// </details>
69    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
70    pub struct AcceptEulaRequest {
71        pub accepted: bool,
72    }
73    ///Response after accepting EULA
74    ///
75    /// <details><summary>JSON schema</summary>
76    ///
77    /// ```json
78    ///{
79    ///  "description": "Response after accepting EULA",
80    ///  "type": "object",
81    ///  "required": [
82    ///    "message",
83    ///    "user_id"
84    ///  ],
85    ///  "properties": {
86    ///    "message": {
87    ///      "type": "string"
88    ///    },
89    ///    "user_id": {
90    ///      "type": "string"
91    ///    },
92    ///    "workspace_id": {
93    ///      "description": "Personal Workspace org id auto-created on self-signup. Absent for existing users\nbeing linked to Kratos credentials.",
94    ///      "type": [
95    ///        "string",
96    ///        "null"
97    ///      ]
98    ///    }
99    ///  }
100    ///}
101    /// ```
102    /// </details>
103    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
104    pub struct AcceptEulaResponse {
105        pub message: ::std::string::String,
106        pub user_id: ::std::string::String,
107        /**Personal Workspace org id auto-created on self-signup. Absent for existing users
108        being linked to Kratos credentials.*/
109        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
110        pub workspace_id: ::std::option::Option<::std::string::String>,
111    }
112    ///`AccessInviteGrantedPortal`
113    ///
114    /// <details><summary>JSON schema</summary>
115    ///
116    /// ```json
117    ///{
118    ///  "type": "object",
119    ///  "required": [
120    ///    "id",
121    ///    "name",
122    ///    "public_id"
123    ///  ],
124    ///  "properties": {
125    ///    "id": {
126    ///      "type": "string"
127    ///    },
128    ///    "name": {
129    ///      "$ref": "#/components/schemas/LocalizedString"
130    ///    },
131    ///    "public_id": {
132    ///      "type": "string"
133    ///    }
134    ///  }
135    ///}
136    /// ```
137    /// </details>
138    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
139    pub struct AccessInviteGrantedPortal {
140        pub id: ::std::string::String,
141        pub name: LocalizedString,
142        pub public_id: ::std::string::String,
143    }
144    ///`AccessInviteListItem`
145    ///
146    /// <details><summary>JSON schema</summary>
147    ///
148    /// ```json
149    ///{
150    ///  "type": "object",
151    ///  "required": [
152    ///    "granted_portals",
153    ///    "id",
154    ///    "is_enabled",
155    ///    "schedule",
156    ///    "schedule_combined",
157    ///    "schedule_entries",
158    ///    "schedule_kind",
159    ///    "state",
160    ///    "uses"
161    ///  ],
162    ///  "properties": {
163    ///    "created_at": {
164    ///      "type": [
165    ///        "string",
166    ///        "null"
167    ///      ]
168    ///    },
169    ///    "disabled_justification": {
170    ///      "type": [
171    ///        "string",
172    ///        "null"
173    ///      ]
174    ///    },
175    ///    "granted_portals": {
176    ///      "type": "array",
177    ///      "items": {
178    ///        "$ref": "#/components/schemas/AccessInviteGrantedPortal"
179    ///      }
180    ///    },
181    ///    "id": {
182    ///      "type": "string"
183    ///    },
184    ///    "invite_recurrence": {},
185    ///    "invitee_message": {},
186    ///    "is_enabled": {
187    ///      "type": "boolean"
188    ///    },
189    ///    "last_used_at": {
190    ///      "type": [
191    ///        "string",
192    ///        "null"
193    ///      ]
194    ///    },
195    ///    "max_uses": {
196    ///      "type": [
197    ///        "integer",
198    ///        "null"
199    ///      ],
200    ///      "format": "int32"
201    ///    },
202    ///    "name": {
203    ///      "type": [
204    ///        "string",
205    ///        "null"
206    ///      ]
207    ///    },
208    ///    "revoked_at": {
209    ///      "type": [
210    ///        "string",
211    ///        "null"
212    ///      ]
213    ///    },
214    ///    "schedule": {
215    ///      "$ref": "#/components/schemas/InviteScheduleSnapshot"
216    ///    },
217    ///    "schedule_combined": {
218    ///      "$ref": "#/components/schemas/InviteScheduleCombined"
219    ///    },
220    ///    "schedule_entries": {
221    ///      "type": "array",
222    ///      "items": {
223    ///        "$ref": "#/components/schemas/InviteScheduleEntrySnapshot"
224    ///      }
225    ///    },
226    ///    "schedule_kind": {
227    ///      "$ref": "#/components/schemas/InviteScheduleKind"
228    ///    },
229    ///    "state": {
230    ///      "type": "string"
231    ///    },
232    ///    "updated_at": {
233    ///      "type": [
234    ///        "string",
235    ///        "null"
236    ///      ]
237    ///    },
238    ///    "uses": {
239    ///      "type": "integer",
240    ///      "format": "int32"
241    ///    },
242    ///    "valid_from": {
243    ///      "type": [
244    ///        "string",
245    ///        "null"
246    ///      ]
247    ///    },
248    ///    "valid_to": {
249    ///      "type": [
250    ///        "string",
251    ///        "null"
252    ///      ]
253    ///    }
254    ///  }
255    ///}
256    /// ```
257    /// </details>
258    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
259    pub struct AccessInviteListItem {
260        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
261        pub created_at: ::std::option::Option<::std::string::String>,
262        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
263        pub disabled_justification: ::std::option::Option<::std::string::String>,
264        pub granted_portals: ::std::vec::Vec<AccessInviteGrantedPortal>,
265        pub id: ::std::string::String,
266        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
267        pub invite_recurrence: ::std::option::Option<::serde_json::Value>,
268        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
269        pub invitee_message: ::std::option::Option<::serde_json::Value>,
270        pub is_enabled: bool,
271        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
272        pub last_used_at: ::std::option::Option<::std::string::String>,
273        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
274        pub max_uses: ::std::option::Option<i32>,
275        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
276        pub name: ::std::option::Option<::std::string::String>,
277        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
278        pub revoked_at: ::std::option::Option<::std::string::String>,
279        pub schedule: InviteScheduleSnapshot,
280        pub schedule_combined: InviteScheduleCombined,
281        pub schedule_entries: ::std::vec::Vec<InviteScheduleEntrySnapshot>,
282        pub schedule_kind: InviteScheduleKind,
283        pub state: ::std::string::String,
284        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
285        pub updated_at: ::std::option::Option<::std::string::String>,
286        pub uses: i32,
287        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
288        pub valid_from: ::std::option::Option<::std::string::String>,
289        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
290        pub valid_to: ::std::option::Option<::std::string::String>,
291    }
292    ///`AccessPortalListItem`
293    ///
294    /// <details><summary>JSON schema</summary>
295    ///
296    /// ```json
297    ///{
298    ///  "type": "object",
299    ///  "required": [
300    ///    "id",
301    ///    "name",
302    ///    "public_id"
303    ///  ],
304    ///  "properties": {
305    ///    "created_at": {
306    ///      "type": [
307    ///        "string",
308    ///        "null"
309    ///      ]
310    ///    },
311    ///    "device_external_id": {
312    ///      "description": "Device external_id (same integration): portal links to virtual_access_portal device by standard external identity.",
313    ///      "type": [
314    ///        "string",
315    ///        "null"
316    ///      ]
317    ///    },
318    ///    "id": {
319    ///      "type": "string"
320    ///    },
321    ///    "name": {
322    ///      "$ref": "#/components/schemas/LocalizedString"
323    ///    },
324    ///    "public_id": {
325    ///      "type": "string"
326    ///    },
327    ///    "updated_at": {
328    ///      "type": [
329    ///        "string",
330    ///        "null"
331    ///      ]
332    ///    }
333    ///  }
334    ///}
335    /// ```
336    /// </details>
337    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
338    pub struct AccessPortalListItem {
339        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
340        pub created_at: ::std::option::Option<::std::string::String>,
341        ///Device external_id (same integration): portal links to virtual_access_portal device by standard external identity.
342        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
343        pub device_external_id: ::std::option::Option<::std::string::String>,
344        pub id: ::std::string::String,
345        pub name: LocalizedString,
346        pub public_id: ::std::string::String,
347        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
348        pub updated_at: ::std::option::Option<::std::string::String>,
349    }
350    ///`AddBuildingUserPayload`
351    ///
352    /// <details><summary>JSON schema</summary>
353    ///
354    /// ```json
355    ///{
356    ///  "type": "object",
357    ///  "required": [
358    ///    "role",
359    ///    "user_id"
360    ///  ],
361    ///  "properties": {
362    ///    "role": {
363    ///      "type": "string"
364    ///    },
365    ///    "user_id": {
366    ///      "type": "string"
367    ///    }
368    ///  }
369    ///}
370    /// ```
371    /// </details>
372    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
373    pub struct AddBuildingUserPayload {
374        pub role: ::std::string::String,
375        pub user_id: ::std::string::String,
376    }
377    ///Request type for adding/deleting roles (org_id -> list of role names).
378    ///
379    /// <details><summary>JSON schema</summary>
380    ///
381    /// ```json
382    ///{
383    ///  "description": "Request type for adding/deleting roles (org_id -> list of role names).",
384    ///  "type": "object",
385    ///  "additionalProperties": {
386    ///    "type": "array",
387    ///    "items": {
388    ///      "$ref": "#/components/schemas/Role"
389    ///    }
390    ///  }
391    ///}
392    /// ```
393    /// </details>
394    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
395    #[serde(transparent)]
396    pub struct AddRolesRequest(
397        pub ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<Role>>,
398    );
399    impl ::std::ops::Deref for AddRolesRequest {
400        type Target = ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<Role>>;
401        fn deref(
402            &self,
403        ) -> &::std::collections::HashMap<::std::string::String, ::std::vec::Vec<Role>> {
404            &self.0
405        }
406    }
407    impl ::std::convert::From<AddRolesRequest>
408        for ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<Role>>
409    {
410        fn from(value: AddRolesRequest) -> Self {
411            value.0
412        }
413    }
414    impl
415        ::std::convert::From<
416            ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<Role>>,
417        > for AddRolesRequest
418    {
419        fn from(
420            value: ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<Role>>,
421        ) -> Self {
422            Self(value)
423        }
424    }
425    ///Distinct apartment floors for a directory device (efficient SQL).
426    ///
427    /// <details><summary>JSON schema</summary>
428    ///
429    /// ```json
430    ///{
431    ///  "description": "Distinct apartment floors for a directory device (efficient SQL).",
432    ///  "type": "object",
433    ///  "required": [
434    ///    "floors"
435    ///  ],
436    ///  "properties": {
437    ///    "floors": {
438    ///      "type": "array",
439    ///      "items": {
440    ///        "$ref": "#/components/schemas/ApartmentFloorSummary"
441    ///      }
442    ///    }
443    ///  }
444    ///}
445    /// ```
446    /// </details>
447    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
448    pub struct ApartmentFloorListResponse {
449        pub floors: ::std::vec::Vec<ApartmentFloorSummary>,
450    }
451    ///One distinct floor row for a directory device (apartment entities).
452    ///
453    /// <details><summary>JSON schema</summary>
454    ///
455    /// ```json
456    ///{
457    ///  "description": "One distinct floor row for a directory device (apartment entities).",
458    ///  "type": "object",
459    ///  "required": [
460    ///    "floor",
461    ///    "key"
462    ///  ],
463    ///  "properties": {
464    ///    "floor": {},
465    ///    "floor_number": {
466    ///      "type": [
467    ///        "integer",
468    ///        "null"
469    ///      ],
470    ///      "format": "int64"
471    ///    },
472    ///    "key": {
473    ///      "type": "string"
474    ///    }
475    ///  }
476    ///}
477    /// ```
478    /// </details>
479    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
480    pub struct ApartmentFloorSummary {
481        pub floor: ::serde_json::Value,
482        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
483        pub floor_number: ::std::option::Option<i64>,
484        pub key: ::std::string::String,
485    }
486    ///A minimal, user-facing error body for public API responses.
487    ///
488    /// <details><summary>JSON schema</summary>
489    ///
490    /// ```json
491    ///{
492    ///  "description": "A minimal, user-facing error body for public API responses.",
493    ///  "type": "object",
494    ///  "required": [
495    ///    "message"
496    ///  ],
497    ///  "properties": {
498    ///    "error_code": {
499    ///      "description": "Optional stable code for clients to branch on (e.g. \"door_unreachable\").",
500    ///      "type": [
501    ///        "string",
502    ///        "null"
503    ///      ]
504    ///    },
505    ///    "message": {
506    ///      "type": "string"
507    ///    }
508    ///  }
509    ///}
510    /// ```
511    /// </details>
512    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
513    pub struct ApiErrorResponse {
514        ///Optional stable code for clients to branch on (e.g. "door_unreachable").
515        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
516        pub error_code: ::std::option::Option<::std::string::String>,
517        pub message: ::std::string::String,
518    }
519    ///Response for API key list item (no token).
520    ///
521    /// <details><summary>JSON schema</summary>
522    ///
523    /// ```json
524    ///{
525    ///  "description": "Response for API key list item (no token).",
526    ///  "type": "object",
527    ///  "required": [
528    ///    "base_url",
529    ///    "expires_at",
530    ///    "id",
531    ///    "name",
532    ///    "token_suffix"
533    ///  ],
534    ///  "properties": {
535    ///    "base_url": {
536    ///      "type": "string"
537    ///    },
538    ///    "created_at": {
539    ///      "type": [
540    ///        "string",
541    ///        "null"
542    ///      ]
543    ///    },
544    ///    "expires_at": {
545    ///      "type": "string"
546    ///    },
547    ///    "id": {
548    ///      "type": "string"
549    ///    },
550    ///    "last_used_at": {
551    ///      "type": [
552    ///        "string",
553    ///        "null"
554    ///      ]
555    ///    },
556    ///    "name": {
557    ///      "type": "string"
558    ///    },
559    ///    "revoked_at": {
560    ///      "type": [
561    ///        "string",
562    ///        "null"
563    ///      ]
564    ///    },
565    ///    "scoped_entity_ids": {
566    ///      "type": [
567    ///        "array",
568    ///        "null"
569    ///      ],
570    ///      "items": {
571    ///        "type": "string"
572    ///      }
573    ///    },
574    ///    "scoped_roles": {
575    ///      "type": [
576    ///        "array",
577    ///        "null"
578    ///      ],
579    ///      "items": {
580    ///        "type": "string"
581    ///      }
582    ///    },
583    ///    "token_suffix": {
584    ///      "type": "string"
585    ///    },
586    ///    "updated_at": {
587    ///      "type": [
588    ///        "string",
589    ///        "null"
590    ///      ]
591    ///    }
592    ///  }
593    ///}
594    /// ```
595    /// </details>
596    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
597    pub struct ApiKeyListItem {
598        pub base_url: ::std::string::String,
599        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
600        pub created_at: ::std::option::Option<::std::string::String>,
601        pub expires_at: ::std::string::String,
602        pub id: ::std::string::String,
603        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
604        pub last_used_at: ::std::option::Option<::std::string::String>,
605        pub name: ::std::string::String,
606        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
607        pub revoked_at: ::std::option::Option<::std::string::String>,
608        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
609        pub scoped_entity_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
610        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
611        pub scoped_roles: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
612        pub token_suffix: ::std::string::String,
613        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
614        pub updated_at: ::std::option::Option<::std::string::String>,
615    }
616    ///`BackendStatus`
617    ///
618    /// <details><summary>JSON schema</summary>
619    ///
620    /// ```json
621    ///{
622    ///  "type": "object",
623    ///  "required": [
624    ///    "environment",
625    ///    "version"
626    ///  ],
627    ///  "properties": {
628    ///    "environment": {
629    ///      "description": "Runtime environment (e.g. development, production).",
630    ///      "type": "string"
631    ///    },
632    ///    "version": {
633    ///      "description": "Application version from Cargo.",
634    ///      "type": "string"
635    ///    }
636    ///  }
637    ///}
638    /// ```
639    /// </details>
640    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
641    pub struct BackendStatus {
642        ///Runtime environment (e.g. development, production).
643        pub environment: ::std::string::String,
644        ///Application version from Cargo.
645        pub version: ::std::string::String,
646    }
647    /**Provider-emitted event after webhook validation. Handlers translate this into
648    internal state (e.g. `billing_subscriptions` rows, tier_id changes on the org).*/
649    ///
650    /// <details><summary>JSON schema</summary>
651    ///
652    /// ```json
653    ///{
654    ///  "description": "Provider-emitted event after webhook validation. Handlers translate this into\ninternal state (e.g. `billing_subscriptions` rows, tier_id changes on the org).",
655    ///  "type": "object",
656    ///  "required": [
657    ///    "kind",
658    ///    "provider",
659    ///    "raw"
660    ///  ],
661    ///  "properties": {
662    ///    "external_customer_id": {
663    ///      "type": [
664    ///        "string",
665    ///        "null"
666    ///      ]
667    ///    },
668    ///    "external_subscription_id": {
669    ///      "type": [
670    ///        "string",
671    ///        "null"
672    ///      ]
673    ///    },
674    ///    "kind": {
675    ///      "$ref": "#/components/schemas/BillingEventKind"
676    ///    },
677    ///    "provider": {
678    ///      "type": "string"
679    ///    },
680    ///    "raw": {},
681    ///    "status": {
682    ///      "type": [
683    ///        "string",
684    ///        "null"
685    ///      ]
686    ///    },
687    ///    "tier_slug": {
688    ///      "type": [
689    ///        "string",
690    ///        "null"
691    ///      ]
692    ///    }
693    ///  }
694    ///}
695    /// ```
696    /// </details>
697    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
698    pub struct BillingEvent {
699        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
700        pub external_customer_id: ::std::option::Option<::std::string::String>,
701        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
702        pub external_subscription_id: ::std::option::Option<::std::string::String>,
703        pub kind: BillingEventKind,
704        pub provider: ::std::string::String,
705        pub raw: ::serde_json::Value,
706        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
707        pub status: ::std::option::Option<::std::string::String>,
708        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
709        pub tier_slug: ::std::option::Option<::std::string::String>,
710    }
711    ///`BillingEventKind`
712    ///
713    /// <details><summary>JSON schema</summary>
714    ///
715    /// ```json
716    ///{
717    ///  "type": "string",
718    ///  "enum": [
719    ///    "subscription_created",
720    ///    "subscription_updated",
721    ///    "subscription_canceled",
722    ///    "invoice_paid",
723    ///    "invoice_failed",
724    ///    "other"
725    ///  ]
726    ///}
727    /// ```
728    /// </details>
729    #[derive(
730        ::serde::Deserialize,
731        ::serde::Serialize,
732        Clone,
733        Copy,
734        Debug,
735        Eq,
736        Hash,
737        Ord,
738        PartialEq,
739        PartialOrd,
740    )]
741    pub enum BillingEventKind {
742        #[serde(rename = "subscription_created")]
743        SubscriptionCreated,
744        #[serde(rename = "subscription_updated")]
745        SubscriptionUpdated,
746        #[serde(rename = "subscription_canceled")]
747        SubscriptionCanceled,
748        #[serde(rename = "invoice_paid")]
749        InvoicePaid,
750        #[serde(rename = "invoice_failed")]
751        InvoiceFailed,
752        #[serde(rename = "other")]
753        Other,
754    }
755    impl ::std::fmt::Display for BillingEventKind {
756        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
757            match *self {
758                Self::SubscriptionCreated => f.write_str("subscription_created"),
759                Self::SubscriptionUpdated => f.write_str("subscription_updated"),
760                Self::SubscriptionCanceled => f.write_str("subscription_canceled"),
761                Self::InvoicePaid => f.write_str("invoice_paid"),
762                Self::InvoiceFailed => f.write_str("invoice_failed"),
763                Self::Other => f.write_str("other"),
764            }
765        }
766    }
767    impl ::std::str::FromStr for BillingEventKind {
768        type Err = self::error::ConversionError;
769        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
770            match value {
771                "subscription_created" => Ok(Self::SubscriptionCreated),
772                "subscription_updated" => Ok(Self::SubscriptionUpdated),
773                "subscription_canceled" => Ok(Self::SubscriptionCanceled),
774                "invoice_paid" => Ok(Self::InvoicePaid),
775                "invoice_failed" => Ok(Self::InvoiceFailed),
776                "other" => Ok(Self::Other),
777                _ => Err("invalid value".into()),
778            }
779        }
780    }
781    impl ::std::convert::TryFrom<&str> for BillingEventKind {
782        type Error = self::error::ConversionError;
783        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
784            value.parse()
785        }
786    }
787    impl ::std::convert::TryFrom<&::std::string::String> for BillingEventKind {
788        type Error = self::error::ConversionError;
789        fn try_from(
790            value: &::std::string::String,
791        ) -> ::std::result::Result<Self, self::error::ConversionError> {
792            value.parse()
793        }
794    }
795    impl ::std::convert::TryFrom<::std::string::String> for BillingEventKind {
796        type Error = self::error::ConversionError;
797        fn try_from(
798            value: ::std::string::String,
799        ) -> ::std::result::Result<Self, self::error::ConversionError> {
800            value.parse()
801        }
802    }
803    ///`BillingPlanResponse`
804    ///
805    /// <details><summary>JSON schema</summary>
806    ///
807    /// ```json
808    ///{
809    ///  "type": "object",
810    ///  "required": [
811    ///    "org_id"
812    ///  ],
813    ///  "properties": {
814    ///    "org_id": {
815    ///      "type": "string"
816    ///    },
817    ///    "subscription": {},
818    ///    "tier_id": {
819    ///      "type": [
820    ///        "string",
821    ///        "null"
822    ///      ]
823    ///    }
824    ///  }
825    ///}
826    /// ```
827    /// </details>
828    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
829    pub struct BillingPlanResponse {
830        pub org_id: ::std::string::String,
831        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
832        pub subscription: ::std::option::Option<::serde_json::Value>,
833        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
834        pub tier_id: ::std::option::Option<::std::string::String>,
835    }
836    ///`BillingWebhookPayload`
837    ///
838    /// <details><summary>JSON schema</summary>
839    ///
840    /// ```json
841    ///{
842    ///  "type": "string",
843    ///  "format": "binary"
844    ///}
845    /// ```
846    /// </details>
847    #[derive(
848        ::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd,
849    )]
850    #[serde(transparent)]
851    pub struct BillingWebhookPayload(pub ::std::string::String);
852    impl ::std::ops::Deref for BillingWebhookPayload {
853        type Target = ::std::string::String;
854        fn deref(&self) -> &::std::string::String {
855            &self.0
856        }
857    }
858    impl ::std::convert::From<BillingWebhookPayload> for ::std::string::String {
859        fn from(value: BillingWebhookPayload) -> Self {
860            value.0
861        }
862    }
863    impl ::std::convert::From<::std::string::String> for BillingWebhookPayload {
864        fn from(value: ::std::string::String) -> Self {
865            Self(value)
866        }
867    }
868    impl ::std::str::FromStr for BillingWebhookPayload {
869        type Err = ::std::convert::Infallible;
870        fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
871            Ok(Self(value.to_string()))
872        }
873    }
874    impl ::std::fmt::Display for BillingWebhookPayload {
875        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
876            self.0.fmt(f)
877        }
878    }
879    ///`BillingWebhookResponse`
880    ///
881    /// <details><summary>JSON schema</summary>
882    ///
883    /// ```json
884    ///{
885    ///  "type": "object",
886    ///  "required": [
887    ///    "events",
888    ///    "provider"
889    ///  ],
890    ///  "properties": {
891    ///    "events": {
892    ///      "type": "array",
893    ///      "items": {
894    ///        "$ref": "#/components/schemas/BillingEvent"
895    ///      }
896    ///    },
897    ///    "provider": {
898    ///      "type": "string"
899    ///    }
900    ///  }
901    ///}
902    /// ```
903    /// </details>
904    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
905    pub struct BillingWebhookResponse {
906        pub events: ::std::vec::Vec<BillingEvent>,
907        pub provider: ::std::string::String,
908    }
909    ///`BuildingUserResponse`
910    ///
911    /// <details><summary>JSON schema</summary>
912    ///
913    /// ```json
914    ///{
915    ///  "type": "object",
916    ///  "required": [
917    ///    "apartments",
918    ///    "role",
919    ///    "user_id"
920    ///  ],
921    ///  "properties": {
922    ///    "apartments": {
923    ///      "type": "array",
924    ///      "items": {
925    ///        "type": "string"
926    ///      }
927    ///    },
928    ///    "role": {
929    ///      "type": "string"
930    ///    },
931    ///    "user_email": {
932    ///      "type": [
933    ///        "string",
934    ///        "null"
935    ///      ]
936    ///    },
937    ///    "user_id": {
938    ///      "type": "string"
939    ///    },
940    ///    "user_name": {}
941    ///  }
942    ///}
943    /// ```
944    /// </details>
945    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
946    pub struct BuildingUserResponse {
947        pub apartments: ::std::vec::Vec<::std::string::String>,
948        pub role: ::std::string::String,
949        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
950        pub user_email: ::std::option::Option<::std::string::String>,
951        pub user_id: ::std::string::String,
952        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
953        pub user_name: ::std::option::Option<::serde_json::Value>,
954    }
955    ///`CheckoutRequest`
956    ///
957    /// <details><summary>JSON schema</summary>
958    ///
959    /// ```json
960    ///{
961    ///  "type": "object",
962    ///  "required": [
963    ///    "tier_slug"
964    ///  ],
965    ///  "properties": {
966    ///    "tier_slug": {
967    ///      "type": "string"
968    ///    }
969    ///  }
970    ///}
971    /// ```
972    /// </details>
973    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
974    pub struct CheckoutRequest {
975        pub tier_slug: ::std::string::String,
976    }
977    ///`CreateAccessInviteRequest`
978    ///
979    /// <details><summary>JSON schema</summary>
980    ///
981    /// ```json
982    ///{
983    ///  "type": "object",
984    ///  "required": [
985    ///    "portal_ids"
986    ///  ],
987    ///  "properties": {
988    ///    "expires_in": {
989    ///      "type": [
990    ///        "string",
991    ///        "null"
992    ///      ]
993    ///    },
994    ///    "invite_recurrence": {},
995    ///    "invitee_message": {},
996    ///    "is_enabled": {
997    ///      "type": [
998    ///        "boolean",
999    ///        "null"
1000    ///      ]
1001    ///    },
1002    ///    "max_uses": {
1003    ///      "type": [
1004    ///        "integer",
1005    ///        "null"
1006    ///      ],
1007    ///      "format": "int32"
1008    ///    },
1009    ///    "name": {
1010    ///      "type": [
1011    ///        "string",
1012    ///        "null"
1013    ///      ]
1014    ///    },
1015    ///    "portal_ids": {
1016    ///      "type": "array",
1017    ///      "items": {
1018    ///        "type": "string"
1019    ///      }
1020    ///    },
1021    ///    "schedules": {
1022    ///      "description": "When set (non-empty), defines one or more schedule entries; legacy `valid_from` /\n`valid_to` / `invite_recurrence` are ignored for scheduling.",
1023    ///      "type": [
1024    ///        "array",
1025    ///        "null"
1026    ///      ],
1027    ///      "items": {
1028    ///        "$ref": "#/components/schemas/InviteScheduleEntryInput"
1029    ///      }
1030    ///    },
1031    ///    "valid_from": {
1032    ///      "type": [
1033    ///        "string",
1034    ///        "null"
1035    ///      ]
1036    ///    },
1037    ///    "valid_to": {
1038    ///      "type": [
1039    ///        "string",
1040    ///        "null"
1041    ///      ]
1042    ///    }
1043    ///  }
1044    ///}
1045    /// ```
1046    /// </details>
1047    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1048    pub struct CreateAccessInviteRequest {
1049        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1050        pub expires_in: ::std::option::Option<::std::string::String>,
1051        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1052        pub invite_recurrence: ::std::option::Option<::serde_json::Value>,
1053        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1054        pub invitee_message: ::std::option::Option<::serde_json::Value>,
1055        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1056        pub is_enabled: ::std::option::Option<bool>,
1057        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1058        pub max_uses: ::std::option::Option<i32>,
1059        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1060        pub name: ::std::option::Option<::std::string::String>,
1061        pub portal_ids: ::std::vec::Vec<::std::string::String>,
1062        /**When set (non-empty), defines one or more schedule entries; legacy `valid_from` /
1063        `valid_to` / `invite_recurrence` are ignored for scheduling.*/
1064        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1065        pub schedules: ::std::option::Option<::std::vec::Vec<InviteScheduleEntryInput>>,
1066        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1067        pub valid_from: ::std::option::Option<::std::string::String>,
1068        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1069        pub valid_to: ::std::option::Option<::std::string::String>,
1070    }
1071    ///`CreateAccessInviteResponse`
1072    ///
1073    /// <details><summary>JSON schema</summary>
1074    ///
1075    /// ```json
1076    ///{
1077    ///  "type": "object",
1078    ///  "required": [
1079    ///    "granted_portals",
1080    ///    "invite_link_id",
1081    ///    "invite_token",
1082    ///    "is_enabled",
1083    ///    "schedule",
1084    ///    "schedule_combined",
1085    ///    "schedule_entries",
1086    ///    "schedule_kind",
1087    ///    "uses",
1088    ///    "valid_from",
1089    ///    "valid_to"
1090    ///  ],
1091    ///  "properties": {
1092    ///    "granted_portals": {
1093    ///      "type": "array",
1094    ///      "items": {
1095    ///        "$ref": "#/components/schemas/AccessInviteGrantedPortal"
1096    ///      }
1097    ///    },
1098    ///    "invite_link_id": {
1099    ///      "type": "string"
1100    ///    },
1101    ///    "invite_recurrence": {},
1102    ///    "invite_token": {
1103    ///      "type": "string"
1104    ///    },
1105    ///    "invitee_message": {},
1106    ///    "is_enabled": {
1107    ///      "type": "boolean"
1108    ///    },
1109    ///    "max_uses": {
1110    ///      "type": [
1111    ///        "integer",
1112    ///        "null"
1113    ///      ],
1114    ///      "format": "int32"
1115    ///    },
1116    ///    "name": {
1117    ///      "type": [
1118    ///        "string",
1119    ///        "null"
1120    ///      ]
1121    ///    },
1122    ///    "schedule": {
1123    ///      "$ref": "#/components/schemas/InviteScheduleSnapshot"
1124    ///    },
1125    ///    "schedule_combined": {
1126    ///      "$ref": "#/components/schemas/InviteScheduleCombined"
1127    ///    },
1128    ///    "schedule_entries": {
1129    ///      "type": "array",
1130    ///      "items": {
1131    ///        "$ref": "#/components/schemas/InviteScheduleEntrySnapshot"
1132    ///      }
1133    ///    },
1134    ///    "schedule_kind": {
1135    ///      "$ref": "#/components/schemas/InviteScheduleKind"
1136    ///    },
1137    ///    "uses": {
1138    ///      "type": "integer",
1139    ///      "format": "int32"
1140    ///    },
1141    ///    "valid_from": {
1142    ///      "type": "string"
1143    ///    },
1144    ///    "valid_to": {
1145    ///      "type": "string"
1146    ///    }
1147    ///  }
1148    ///}
1149    /// ```
1150    /// </details>
1151    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1152    pub struct CreateAccessInviteResponse {
1153        pub granted_portals: ::std::vec::Vec<AccessInviteGrantedPortal>,
1154        pub invite_link_id: ::std::string::String,
1155        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1156        pub invite_recurrence: ::std::option::Option<::serde_json::Value>,
1157        pub invite_token: ::std::string::String,
1158        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1159        pub invitee_message: ::std::option::Option<::serde_json::Value>,
1160        pub is_enabled: bool,
1161        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1162        pub max_uses: ::std::option::Option<i32>,
1163        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1164        pub name: ::std::option::Option<::std::string::String>,
1165        pub schedule: InviteScheduleSnapshot,
1166        pub schedule_combined: InviteScheduleCombined,
1167        pub schedule_entries: ::std::vec::Vec<InviteScheduleEntrySnapshot>,
1168        pub schedule_kind: InviteScheduleKind,
1169        pub uses: i32,
1170        pub valid_from: ::std::string::String,
1171        pub valid_to: ::std::string::String,
1172    }
1173    ///`CreateAccessPortalRequest`
1174    ///
1175    /// <details><summary>JSON schema</summary>
1176    ///
1177    /// ```json
1178    ///{
1179    ///  "type": "object",
1180    ///  "required": [
1181    ///    "name"
1182    ///  ],
1183    ///  "properties": {
1184    ///    "device_external_id": {
1185    ///      "description": "Device external_id (virtual_access_portal device in this integration). Standard way to link portal to device.",
1186    ///      "type": [
1187    ///        "string",
1188    ///        "null"
1189    ///      ]
1190    ///    },
1191    ///    "name": {
1192    ///      "$ref": "#/components/schemas/LocalizedString"
1193    ///    }
1194    ///  }
1195    ///}
1196    /// ```
1197    /// </details>
1198    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1199    pub struct CreateAccessPortalRequest {
1200        ///Device external_id (virtual_access_portal device in this integration). Standard way to link portal to device.
1201        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1202        pub device_external_id: ::std::option::Option<::std::string::String>,
1203        pub name: LocalizedString,
1204    }
1205    ///`CreateAccessPortalResponse`
1206    ///
1207    /// <details><summary>JSON schema</summary>
1208    ///
1209    /// ```json
1210    ///{
1211    ///  "type": "object",
1212    ///  "required": [
1213    ///    "id",
1214    ///    "name",
1215    ///    "public_id"
1216    ///  ],
1217    ///  "properties": {
1218    ///    "device_external_id": {
1219    ///      "type": [
1220    ///        "string",
1221    ///        "null"
1222    ///      ]
1223    ///    },
1224    ///    "id": {
1225    ///      "type": "string"
1226    ///    },
1227    ///    "name": {
1228    ///      "$ref": "#/components/schemas/LocalizedString"
1229    ///    },
1230    ///    "public_id": {
1231    ///      "type": "string"
1232    ///    }
1233    ///  }
1234    ///}
1235    /// ```
1236    /// </details>
1237    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1238    pub struct CreateAccessPortalResponse {
1239        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1240        pub device_external_id: ::std::option::Option<::std::string::String>,
1241        pub id: ::std::string::String,
1242        pub name: LocalizedString,
1243        pub public_id: ::std::string::String,
1244    }
1245    ///`CreateApiKeyRequest`
1246    ///
1247    /// <details><summary>JSON schema</summary>
1248    ///
1249    /// ```json
1250    ///{
1251    ///  "type": "object",
1252    ///  "required": [
1253    ///    "name"
1254    ///  ],
1255    ///  "properties": {
1256    ///    "expires_at": {
1257    ///      "description": "RFC3339 absolute expiration timestamp. Mutually exclusive with expires_in.",
1258    ///      "type": [
1259    ///        "string",
1260    ///        "null"
1261    ///      ]
1262    ///    },
1263    ///    "expires_in": {
1264    ///      "description": "Duration from now, e.g. \"1d\", \"2w\", \"90d\", \"P30D\". Mutually exclusive with expires_at.",
1265    ///      "type": [
1266    ///        "string",
1267    ///        "null"
1268    ///      ]
1269    ///    },
1270    ///    "name": {
1271    ///      "type": "string"
1272    ///    },
1273    ///    "scoped_entity_ids": {
1274    ///      "type": [
1275    ///        "array",
1276    ///        "null"
1277    ///      ],
1278    ///      "items": {
1279    ///        "type": "string"
1280    ///      }
1281    ///    },
1282    ///    "scoped_roles": {
1283    ///      "type": [
1284    ///        "array",
1285    ///        "null"
1286    ///      ],
1287    ///      "items": {
1288    ///        "type": "string"
1289    ///      }
1290    ///    }
1291    ///  }
1292    ///}
1293    /// ```
1294    /// </details>
1295    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1296    pub struct CreateApiKeyRequest {
1297        ///RFC3339 absolute expiration timestamp. Mutually exclusive with expires_in.
1298        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1299        pub expires_at: ::std::option::Option<::std::string::String>,
1300        ///Duration from now, e.g. "1d", "2w", "90d", "P30D". Mutually exclusive with expires_at.
1301        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1302        pub expires_in: ::std::option::Option<::std::string::String>,
1303        pub name: ::std::string::String,
1304        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1305        pub scoped_entity_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
1306        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1307        pub scoped_roles: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
1308    }
1309    ///Response for API key creation (token shown once).
1310    ///
1311    /// <details><summary>JSON schema</summary>
1312    ///
1313    /// ```json
1314    ///{
1315    ///  "description": "Response for API key creation (token shown once).",
1316    ///  "type": "object",
1317    ///  "required": [
1318    ///    "base_url",
1319    ///    "expires_at",
1320    ///    "id",
1321    ///    "name",
1322    ///    "token_suffix"
1323    ///  ],
1324    ///  "properties": {
1325    ///    "base_url": {
1326    ///      "type": "string"
1327    ///    },
1328    ///    "created_at": {
1329    ///      "type": [
1330    ///        "string",
1331    ///        "null"
1332    ///      ]
1333    ///    },
1334    ///    "expires_at": {
1335    ///      "type": "string"
1336    ///    },
1337    ///    "id": {
1338    ///      "type": "string"
1339    ///    },
1340    ///    "name": {
1341    ///      "type": "string"
1342    ///    },
1343    ///    "scoped_entity_ids": {
1344    ///      "type": [
1345    ///        "array",
1346    ///        "null"
1347    ///      ],
1348    ///      "items": {
1349    ///        "type": "string"
1350    ///      }
1351    ///    },
1352    ///    "scoped_roles": {
1353    ///      "type": [
1354    ///        "array",
1355    ///        "null"
1356    ///      ],
1357    ///      "items": {
1358    ///        "type": "string"
1359    ///      }
1360    ///    },
1361    ///    "token": {
1362    ///      "type": [
1363    ///        "string",
1364    ///        "null"
1365    ///      ]
1366    ///    },
1367    ///    "token_suffix": {
1368    ///      "type": "string"
1369    ///    }
1370    ///  }
1371    ///}
1372    /// ```
1373    /// </details>
1374    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1375    pub struct CreateApiKeyResponse {
1376        pub base_url: ::std::string::String,
1377        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1378        pub created_at: ::std::option::Option<::std::string::String>,
1379        pub expires_at: ::std::string::String,
1380        pub id: ::std::string::String,
1381        pub name: ::std::string::String,
1382        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1383        pub scoped_entity_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
1384        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1385        pub scoped_roles: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
1386        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1387        pub token: ::std::option::Option<::std::string::String>,
1388        pub token_suffix: ::std::string::String,
1389    }
1390    ///`CreateDeviceRequest`
1391    ///
1392    /// <details><summary>JSON schema</summary>
1393    ///
1394    /// ```json
1395    ///{
1396    ///  "type": "object",
1397    ///  "required": [
1398    ///    "integration_id",
1399    ///    "name",
1400    ///    "org_id"
1401    ///  ],
1402    ///  "properties": {
1403    ///    "device_metadata": {},
1404    ///    "external_id": {
1405    ///      "type": [
1406    ///        "string",
1407    ///        "null"
1408    ///      ]
1409    ///    },
1410    ///    "integration_id": {
1411    ///      "type": "string"
1412    ///    },
1413    ///    "name": {
1414    ///      "$ref": "#/components/schemas/LocalizedString"
1415    ///    },
1416    ///    "org_id": {
1417    ///      "type": "string"
1418    ///    }
1419    ///  }
1420    ///}
1421    /// ```
1422    /// </details>
1423    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1424    pub struct CreateDeviceRequest {
1425        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1426        pub device_metadata: ::std::option::Option<::serde_json::Value>,
1427        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1428        pub external_id: ::std::option::Option<::std::string::String>,
1429        pub integration_id: ::std::string::String,
1430        pub name: LocalizedString,
1431        pub org_id: ::std::string::String,
1432    }
1433    ///`CreateEntityRequest`
1434    ///
1435    /// <details><summary>JSON schema</summary>
1436    ///
1437    /// ```json
1438    ///{
1439    ///  "type": "object",
1440    ///  "required": [
1441    ///    "device_id",
1442    ///    "entity_type"
1443    ///  ],
1444    ///  "properties": {
1445    ///    "channel_index": {
1446    ///      "type": [
1447    ///        "integer",
1448    ///        "null"
1449    ///      ],
1450    ///      "format": "int32"
1451    ///    },
1452    ///    "device_id": {
1453    ///      "type": "string"
1454    ///    },
1455    ///    "entity_type": {
1456    ///      "type": "string"
1457    ///    },
1458    ///    "external_id": {
1459    ///      "type": [
1460    ///        "string",
1461    ///        "null"
1462    ///      ]
1463    ///    },
1464    ///    "metadata": {
1465    ///      "description": "Arbitrary, persisted entity metadata (integration-specific).\n\nFor example, MQTT entities can store:\n- `command_topic`\n- `toggle_payload`\n\nValues are converted to strings (non-strings are JSON-stringified) to match `domain::Metadata`.",
1466    ///      "type": [
1467    ///        "object",
1468    ///        "null"
1469    ///      ],
1470    ///      "additionalProperties": {}
1471    ///    },
1472    ///    "name": {
1473    ///      "description": "Optional friendly name for the entity.",
1474    ///      "type": [
1475    ///        "string",
1476    ///        "null"
1477    ///      ]
1478    ///    },
1479    ///    "zone_id": {
1480    ///      "type": [
1481    ///        "string",
1482    ///        "null"
1483    ///      ]
1484    ///    }
1485    ///  }
1486    ///}
1487    /// ```
1488    /// </details>
1489    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1490    pub struct CreateEntityRequest {
1491        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1492        pub channel_index: ::std::option::Option<i32>,
1493        pub device_id: ::std::string::String,
1494        pub entity_type: ::std::string::String,
1495        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1496        pub external_id: ::std::option::Option<::std::string::String>,
1497        /**Arbitrary, persisted entity metadata (integration-specific).
1498
1499        For example, MQTT entities can store:
1500        - `command_topic`
1501        - `toggle_payload`
1502
1503        Values are converted to strings (non-strings are JSON-stringified) to match `domain::Metadata`.*/
1504        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1505        pub metadata:
1506            ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>,
1507        ///Optional friendly name for the entity.
1508        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1509        pub name: ::std::option::Option<::std::string::String>,
1510        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1511        pub zone_id: ::std::option::Option<::std::string::String>,
1512    }
1513    ///`CreateIntegrationRequest`
1514    ///
1515    /// <details><summary>JSON schema</summary>
1516    ///
1517    /// ```json
1518    ///{
1519    ///  "type": "object",
1520    ///  "required": [
1521    ///    "org_id",
1522    ///    "provider_type"
1523    ///  ],
1524    ///  "properties": {
1525    ///    "config": {},
1526    ///    "enabled": {
1527    ///      "type": "boolean"
1528    ///    },
1529    ///    "name": {
1530    ///      "oneOf": [
1531    ///        {
1532    ///          "type": "null"
1533    ///        },
1534    ///        {
1535    ///          "oneOf": [
1536    ///            {
1537    ///              "$ref": "#/components/schemas/LocalizedString"
1538    ///            }
1539    ///          ]
1540    ///        }
1541    ///      ]
1542    ///    },
1543    ///    "org_id": {
1544    ///      "type": "string"
1545    ///    },
1546    ///    "provider_type": {
1547    ///      "type": "string"
1548    ///    },
1549    ///    "secrets": {}
1550    ///  }
1551    ///}
1552    /// ```
1553    /// </details>
1554    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1555    pub struct CreateIntegrationRequest {
1556        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1557        pub config: ::std::option::Option<::serde_json::Value>,
1558        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1559        pub enabled: ::std::option::Option<bool>,
1560        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1561        pub name: ::std::option::Option<LocalizedString>,
1562        pub org_id: ::std::string::String,
1563        pub provider_type: ::std::string::String,
1564        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1565        pub secrets: ::std::option::Option<::serde_json::Value>,
1566    }
1567    ///`CreateOrganizationRequest`
1568    ///
1569    /// <details><summary>JSON schema</summary>
1570    ///
1571    /// ```json
1572    ///{
1573    ///  "type": "object",
1574    ///  "required": [
1575    ///    "name"
1576    ///  ],
1577    ///  "properties": {
1578    ///    "description": {
1579    ///      "type": [
1580    ///        "string",
1581    ///        "null"
1582    ///      ]
1583    ///    },
1584    ///    "id": {
1585    ///      "description": "Optional ID parameter (admin-only, not documented in API docs).",
1586    ///      "type": [
1587    ///        "string",
1588    ///        "null"
1589    ///      ]
1590    ///    },
1591    ///    "name": {
1592    ///      "$ref": "#/components/schemas/LocalizedString"
1593    ///    },
1594    ///    "parent_id": {
1595    ///      "type": [
1596    ///        "string",
1597    ///        "null"
1598    ///      ]
1599    ///    }
1600    ///  }
1601    ///}
1602    /// ```
1603    /// </details>
1604    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1605    pub struct CreateOrganizationRequest {
1606        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1607        pub description: ::std::option::Option<::std::string::String>,
1608        ///Optional ID parameter (admin-only, not documented in API docs).
1609        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1610        pub id: ::std::option::Option<::std::string::String>,
1611        pub name: LocalizedString,
1612        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1613        pub parent_id: ::std::option::Option<::std::string::String>,
1614    }
1615    ///`CreateUserRequest`
1616    ///
1617    /// <details><summary>JSON schema</summary>
1618    ///
1619    /// ```json
1620    ///{
1621    ///  "type": "object",
1622    ///  "required": [
1623    ///    "email",
1624    ///    "name"
1625    ///  ],
1626    ///  "properties": {
1627    ///    "email": {
1628    ///      "type": "string"
1629    ///    },
1630    ///    "first_name": {
1631    ///      "description": "Given name stored on the Kratos identity (`traits.name.first`) when creating the account.",
1632    ///      "type": [
1633    ///        "string",
1634    ///        "null"
1635    ///      ]
1636    ///    },
1637    ///    "id": {
1638    ///      "description": "Optional ID parameter (admin-only, not documented in API docs)\nThis field is intentionally not included in OpenAPI documentation",
1639    ///      "type": [
1640    ///        "string",
1641    ///        "null"
1642    ///      ]
1643    ///    },
1644    ///    "last_name": {
1645    ///      "description": "Family name stored on the Kratos identity (`traits.name.last`) when creating the account.",
1646    ///      "type": [
1647    ///        "string",
1648    ///        "null"
1649    ///      ]
1650    ///    },
1651    ///    "name": {
1652    ///      "$ref": "#/components/schemas/LocalizedString"
1653    ///    },
1654    ///    "password": {
1655    ///      "description": "Optional password for Kratos identity (provisioning only; same permission as id).\nWhen set, the Kratos identity is created with this password so the user can log in immediately.",
1656    ///      "type": [
1657    ///        "string",
1658    ///        "null"
1659    ///      ]
1660    ///    },
1661    ///    "roles": {
1662    ///      "description": "Org ID (string) to list of role names. Optional.",
1663    ///      "type": [
1664    ///        "object",
1665    ///        "null"
1666    ///      ]
1667    ///    }
1668    ///  }
1669    ///}
1670    /// ```
1671    /// </details>
1672    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1673    pub struct CreateUserRequest {
1674        pub email: ::std::string::String,
1675        ///Given name stored on the Kratos identity (`traits.name.first`) when creating the account.
1676        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1677        pub first_name: ::std::option::Option<::std::string::String>,
1678        /**Optional ID parameter (admin-only, not documented in API docs)
1679        This field is intentionally not included in OpenAPI documentation*/
1680        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1681        pub id: ::std::option::Option<::std::string::String>,
1682        ///Family name stored on the Kratos identity (`traits.name.last`) when creating the account.
1683        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1684        pub last_name: ::std::option::Option<::std::string::String>,
1685        pub name: LocalizedString,
1686        /**Optional password for Kratos identity (provisioning only; same permission as id).
1687        When set, the Kratos identity is created with this password so the user can log in immediately.*/
1688        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1689        pub password: ::std::option::Option<::std::string::String>,
1690        ///Org ID (string) to list of role names. Optional.
1691        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1692        pub roles:
1693            ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>,
1694    }
1695    ///`CreateZoneRequest`
1696    ///
1697    /// <details><summary>JSON schema</summary>
1698    ///
1699    /// ```json
1700    ///{
1701    ///  "type": "object",
1702    ///  "required": [
1703    ///    "integration_id",
1704    ///    "name"
1705    ///  ],
1706    ///  "properties": {
1707    ///    "external_id": {
1708    ///      "type": [
1709    ///        "string",
1710    ///        "null"
1711    ///      ]
1712    ///    },
1713    ///    "integration_id": {
1714    ///      "type": "string"
1715    ///    },
1716    ///    "name": {
1717    ///      "$ref": "#/components/schemas/LocalizedString"
1718    ///    },
1719    ///    "parent_zone_id": {
1720    ///      "type": [
1721    ///        "string",
1722    ///        "null"
1723    ///      ]
1724    ///    }
1725    ///  }
1726    ///}
1727    /// ```
1728    /// </details>
1729    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1730    pub struct CreateZoneRequest {
1731        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1732        pub external_id: ::std::option::Option<::std::string::String>,
1733        pub integration_id: ::std::string::String,
1734        pub name: LocalizedString,
1735        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1736        pub parent_zone_id: ::std::option::Option<::std::string::String>,
1737    }
1738    ///Request type for deleting roles (org_id -> list of role names).
1739    ///
1740    /// <details><summary>JSON schema</summary>
1741    ///
1742    /// ```json
1743    ///{
1744    ///  "description": "Request type for deleting roles (org_id -> list of role names).",
1745    ///  "type": "object",
1746    ///  "additionalProperties": {
1747    ///    "type": "array",
1748    ///    "items": {
1749    ///      "$ref": "#/components/schemas/Role"
1750    ///    }
1751    ///  }
1752    ///}
1753    /// ```
1754    /// </details>
1755    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1756    #[serde(transparent)]
1757    pub struct DeleteRolesRequest(
1758        pub ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<Role>>,
1759    );
1760    impl ::std::ops::Deref for DeleteRolesRequest {
1761        type Target = ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<Role>>;
1762        fn deref(
1763            &self,
1764        ) -> &::std::collections::HashMap<::std::string::String, ::std::vec::Vec<Role>> {
1765            &self.0
1766        }
1767    }
1768    impl ::std::convert::From<DeleteRolesRequest>
1769        for ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<Role>>
1770    {
1771        fn from(value: DeleteRolesRequest) -> Self {
1772            value.0
1773        }
1774    }
1775    impl
1776        ::std::convert::From<
1777            ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<Role>>,
1778        > for DeleteRolesRequest
1779    {
1780        fn from(
1781            value: ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<Role>>,
1782        ) -> Self {
1783            Self(value)
1784        }
1785    }
1786    ///A physical or virtual device belonging to an org and integration.
1787    ///
1788    /// <details><summary>JSON schema</summary>
1789    ///
1790    /// ```json
1791    ///{
1792    ///  "description": "A physical or virtual device belonging to an org and integration.",
1793    ///  "type": "object",
1794    ///  "required": [
1795    ///    "id",
1796    ///    "integration_id",
1797    ///    "name",
1798    ///    "org_id"
1799    ///  ],
1800    ///  "properties": {
1801    ///    "device_metadata": {
1802    ///      "description": "Device-specific JSON metadata (stored in Postgres `devices.metadata` JSONB column)."
1803    ///    },
1804    ///    "external_id": {
1805    ///      "description": "External ID from the integration provider.",
1806    ///      "type": [
1807    ///        "string",
1808    ///        "null"
1809    ///      ]
1810    ///    },
1811    ///    "id": {
1812    ///      "description": "Unique identifier (ULID).",
1813    ///      "type": "string"
1814    ///    },
1815    ///    "integration_id": {
1816    ///      "description": "Owning integration (e.g. Shelly Cloud account/connection).",
1817    ///      "type": "string"
1818    ///    },
1819    ///    "metadata": {
1820    ///      "oneOf": [
1821    ///        {
1822    ///          "type": "null"
1823    ///        },
1824    ///        {
1825    ///          "oneOf": [
1826    ///            {
1827    ///              "$ref": "#/components/schemas/HashMap"
1828    ///            }
1829    ///          ]
1830    ///        }
1831    ///      ]
1832    ///    },
1833    ///    "name": {
1834    ///      "$ref": "#/components/schemas/LocalizedString"
1835    ///    },
1836    ///    "org_id": {
1837    ///      "description": "Organization that owns this device.",
1838    ///      "type": "string"
1839    ///    }
1840    ///  }
1841    ///}
1842    /// ```
1843    /// </details>
1844    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1845    pub struct Device {
1846        ///Device-specific JSON metadata (stored in Postgres `devices.metadata` JSONB column).
1847        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1848        pub device_metadata: ::std::option::Option<::serde_json::Value>,
1849        ///External ID from the integration provider.
1850        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1851        pub external_id: ::std::option::Option<::std::string::String>,
1852        ///Unique identifier (ULID).
1853        pub id: ::std::string::String,
1854        ///Owning integration (e.g. Shelly Cloud account/connection).
1855        pub integration_id: ::std::string::String,
1856        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1857        pub metadata: ::std::option::Option<HashMap>,
1858        pub name: LocalizedString,
1859        ///Organization that owns this device.
1860        pub org_id: ::std::string::String,
1861    }
1862    ///`DeviceEntityMetadataDefinitionQuery`
1863    ///
1864    /// <details><summary>JSON schema</summary>
1865    ///
1866    /// ```json
1867    ///{
1868    ///  "type": "object",
1869    ///  "required": [
1870    ///    "entity_type"
1871    ///  ],
1872    ///  "properties": {
1873    ///    "entity_type": {
1874    ///      "type": "string"
1875    ///    }
1876    ///  }
1877    ///}
1878    /// ```
1879    /// </details>
1880    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1881    pub struct DeviceEntityMetadataDefinitionQuery {
1882        pub entity_type: ::std::string::String,
1883    }
1884    ///Device metadata definition response (schema + current data) for schema-driven edit UI.
1885    ///
1886    /// <details><summary>JSON schema</summary>
1887    ///
1888    /// ```json
1889    ///{
1890    ///  "description": "Device metadata definition response (schema + current data) for schema-driven edit UI.",
1891    ///  "type": "object",
1892    ///  "required": [
1893    ///    "data",
1894    ///    "provider_type",
1895    ///    "schema"
1896    ///  ],
1897    ///  "properties": {
1898    ///    "data": {
1899    ///      "description": "Current `device_metadata` as a JSON object."
1900    ///    },
1901    ///    "provider_type": {
1902    ///      "type": "string"
1903    ///    },
1904    ///    "schema": {
1905    ///      "description": "JSON Schema describing `devices.device_metadata` shape for this provider."
1906    ///    }
1907    ///  }
1908    ///}
1909    /// ```
1910    /// </details>
1911    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1912    pub struct DeviceMetadataDefinitionResponse {
1913        ///Current `device_metadata` as a JSON object.
1914        pub data: ::serde_json::Value,
1915        pub provider_type: ::std::string::String,
1916        ///JSON Schema describing `devices.device_metadata` shape for this provider.
1917        pub schema: ::serde_json::Value,
1918    }
1919    ///`DeviceResponse`
1920    ///
1921    /// <details><summary>JSON schema</summary>
1922    ///
1923    /// ```json
1924    ///{
1925    ///  "allOf": [
1926    ///    {
1927    ///      "$ref": "#/components/schemas/Device"
1928    ///    },
1929    ///    {
1930    ///      "oneOf": [
1931    ///        {
1932    ///          "type": "null"
1933    ///        },
1934    ///        {
1935    ///          "oneOf": [
1936    ///            {
1937    ///              "$ref": "#/components/schemas/StorageFeatures"
1938    ///            }
1939    ///          ]
1940    ///        }
1941    ///      ]
1942    ///    },
1943    ///    {
1944    ///      "type": "object",
1945    ///      "properties": {
1946    ///        "stale": {
1947    ///          "description": "Present when `include_stale=true` was requested and the provider supports stale detection.",
1948    ///          "type": [
1949    ///            "boolean",
1950    ///            "null"
1951    ///          ]
1952    ///        }
1953    ///      }
1954    ///    }
1955    ///  ]
1956    ///}
1957    /// ```
1958    /// </details>
1959    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1960    pub struct DeviceResponse {
1961        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1962        pub cache_hit: ::std::option::Option<bool>,
1963        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1964        pub cache_ttl: ::std::option::Option<i64>,
1965        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1966        pub created_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
1967        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1968        pub deleted_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
1969        ///Device-specific JSON metadata (stored in Postgres `devices.metadata` JSONB column).
1970        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1971        pub device_metadata: ::std::option::Option<::serde_json::Value>,
1972        ///External ID from the integration provider.
1973        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1974        pub external_id: ::std::option::Option<::std::string::String>,
1975        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1976        pub hard_delete_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
1977        ///Unique identifier (ULID).
1978        pub id: ::std::string::String,
1979        ///Owning integration (e.g. Shelly Cloud account/connection).
1980        pub integration_id: ::std::string::String,
1981        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1982        pub metadata: ::std::option::Option<HashMap>,
1983        pub name: LocalizedString,
1984        ///Organization that owns this device.
1985        pub org_id: ::std::string::String,
1986        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1987        pub purge_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
1988        ///Present when `include_stale=true` was requested and the provider supports stale detection.
1989        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1990        pub stale: ::std::option::Option<bool>,
1991        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1992        pub updated_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
1993    }
1994    ///`DoorRestrictionsResponse`
1995    ///
1996    /// <details><summary>JSON schema</summary>
1997    ///
1998    /// ```json
1999    ///{
2000    ///  "type": "object",
2001    ///  "required": [
2002    ///    "apartment_entity_ids"
2003    ///  ],
2004    ///  "properties": {
2005    ///    "apartment_entity_ids": {
2006    ///      "type": "array",
2007    ///      "items": {
2008    ///        "type": "string"
2009    ///      }
2010    ///    }
2011    ///  }
2012    ///}
2013    /// ```
2014    /// </details>
2015    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2016    pub struct DoorRestrictionsResponse {
2017        pub apartment_entity_ids: ::std::vec::Vec<::std::string::String>,
2018    }
2019    /**Resolved limit for `(subject, key, period)`, with provenance so the dashboard can
2020    explain to admins which line of policy is in effect.*/
2021    ///
2022    /// <details><summary>JSON schema</summary>
2023    ///
2024    /// ```json
2025    ///{
2026    ///  "description": "Resolved limit for `(subject, key, period)`, with provenance so the dashboard can\nexplain to admins which line of policy is in effect.",
2027    ///  "type": "object",
2028    ///  "required": [
2029    ///    "source"
2030    ///  ],
2031    ///  "properties": {
2032    ///    "source": {
2033    ///      "$ref": "#/components/schemas/LimitSource"
2034    ///    },
2035    ///    "value": {
2036    ///      "description": "The effective cap. `None` means \"unlimited\".",
2037    ///      "type": [
2038    ///        "integer",
2039    ///        "null"
2040    ///      ],
2041    ///      "format": "int64",
2042    ///      "minimum": 0.0
2043    ///    }
2044    ///  }
2045    ///}
2046    /// ```
2047    /// </details>
2048    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2049    pub struct EffectiveLimit {
2050        pub source: LimitSource,
2051        ///The effective cap. `None` means "unlimited".
2052        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2053        pub value: ::std::option::Option<i64>,
2054    }
2055    /**The actual controllable "button" or "sensor".
2056
2057    Examples: Relay 1, Temp Sensor, Light Switch.*/
2058    ///
2059    /// <details><summary>JSON schema</summary>
2060    ///
2061    /// ```json
2062    ///{
2063    ///  "description": "The actual controllable \"button\" or \"sensor\".\n\nExamples: Relay 1, Temp Sensor, Light Switch.",
2064    ///  "type": "object",
2065    ///  "required": [
2066    ///    "device_id",
2067    ///    "entity_type",
2068    ///    "id"
2069    ///  ],
2070    ///  "properties": {
2071    ///    "device_id": {
2072    ///      "description": "Parent device ID.",
2073    ///      "type": "string"
2074    ///    },
2075    ///    "entity_type": {
2076    ///      "$ref": "#/components/schemas/EntityType"
2077    ///    },
2078    ///    "external_id": {
2079    ///      "description": "External ID from the integration.",
2080    ///      "type": [
2081    ///        "string",
2082    ///        "null"
2083    ///      ]
2084    ///    },
2085    ///    "id": {
2086    ///      "description": "Unique identifier (ULID).",
2087    ///      "type": "string"
2088    ///    },
2089    ///    "metadata": {
2090    ///      "oneOf": [
2091    ///        {
2092    ///          "type": "null"
2093    ///        },
2094    ///        {
2095    ///          "oneOf": [
2096    ///            {
2097    ///              "$ref": "#/components/schemas/HashMap"
2098    ///            }
2099    ///          ]
2100    ///        }
2101    ///      ]
2102    ///    },
2103    ///    "name": {
2104    ///      "description": "Optional friendly name for the entity.",
2105    ///      "type": [
2106    ///        "string",
2107    ///        "null"
2108    ///      ]
2109    ///    },
2110    ///    "zone_id": {
2111    ///      "description": "Optional zone this entity belongs to.",
2112    ///      "type": [
2113    ///        "string",
2114    ///        "null"
2115    ///      ]
2116    ///    }
2117    ///  }
2118    ///}
2119    /// ```
2120    /// </details>
2121    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2122    pub struct Entity {
2123        ///Parent device ID.
2124        pub device_id: ::std::string::String,
2125        pub entity_type: EntityType,
2126        ///External ID from the integration.
2127        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2128        pub external_id: ::std::option::Option<::std::string::String>,
2129        ///Unique identifier (ULID).
2130        pub id: ::std::string::String,
2131        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2132        pub metadata: ::std::option::Option<HashMap>,
2133        ///Optional friendly name for the entity.
2134        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2135        pub name: ::std::option::Option<::std::string::String>,
2136        ///Optional zone this entity belongs to.
2137        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2138        pub zone_id: ::std::option::Option<::std::string::String>,
2139    }
2140    ///`EntityMetadataDefinitionResponse`
2141    ///
2142    /// <details><summary>JSON schema</summary>
2143    ///
2144    /// ```json
2145    ///{
2146    ///  "type": "object",
2147    ///  "required": [
2148    ///    "data",
2149    ///    "entity_type",
2150    ///    "provider_type",
2151    ///    "schema"
2152    ///  ],
2153    ///  "properties": {
2154    ///    "data": {
2155    ///      "description": "Current `entity_metadata` as a JSON object (best-effort decoded from string values)."
2156    ///    },
2157    ///    "entity_type": {
2158    ///      "type": "string"
2159    ///    },
2160    ///    "provider_type": {
2161    ///      "type": "string"
2162    ///    },
2163    ///    "schema": {
2164    ///      "description": "JSON Schema describing `entities.entity_metadata` shape for this provider/entity type."
2165    ///    }
2166    ///  }
2167    ///}
2168    /// ```
2169    /// </details>
2170    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2171    pub struct EntityMetadataDefinitionResponse {
2172        ///Current `entity_metadata` as a JSON object (best-effort decoded from string values).
2173        pub data: ::serde_json::Value,
2174        pub entity_type: ::std::string::String,
2175        pub provider_type: ::std::string::String,
2176        ///JSON Schema describing `entities.entity_metadata` shape for this provider/entity type.
2177        pub schema: ::serde_json::Value,
2178    }
2179    ///`EntityResponse`
2180    ///
2181    /// <details><summary>JSON schema</summary>
2182    ///
2183    /// ```json
2184    ///{
2185    ///  "allOf": [
2186    ///    {
2187    ///      "$ref": "#/components/schemas/Entity"
2188    ///    },
2189    ///    {
2190    ///      "oneOf": [
2191    ///        {
2192    ///          "type": "null"
2193    ///        },
2194    ///        {
2195    ///          "oneOf": [
2196    ///            {
2197    ///              "$ref": "#/components/schemas/StorageFeatures"
2198    ///            }
2199    ///          ]
2200    ///        }
2201    ///      ]
2202    ///    },
2203    ///    {
2204    ///      "type": "object",
2205    ///      "properties": {
2206    ///        "entity_metadata": {
2207    ///          "oneOf": [
2208    ///            {
2209    ///              "type": "null"
2210    ///            },
2211    ///            {
2212    ///              "oneOf": [
2213    ///                {
2214    ///                  "$ref": "#/components/schemas/HashMap"
2215    ///                }
2216    ///              ]
2217    ///            }
2218    ///          ]
2219    ///        },
2220    ///        "state": {}
2221    ///      }
2222    ///    }
2223    ///  ]
2224    ///}
2225    /// ```
2226    /// </details>
2227    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2228    pub struct EntityResponse {
2229        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2230        pub cache_hit: ::std::option::Option<bool>,
2231        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2232        pub cache_ttl: ::std::option::Option<i64>,
2233        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2234        pub created_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
2235        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2236        pub deleted_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
2237        ///Parent device ID.
2238        pub device_id: ::std::string::String,
2239        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2240        pub entity_metadata: ::std::option::Option<HashMap>,
2241        pub entity_type: EntityType,
2242        ///External ID from the integration.
2243        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2244        pub external_id: ::std::option::Option<::std::string::String>,
2245        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2246        pub hard_delete_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
2247        ///Unique identifier (ULID).
2248        pub id: ::std::string::String,
2249        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2250        pub metadata: ::std::option::Option<HashMap>,
2251        ///Optional friendly name for the entity.
2252        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2253        pub name: ::std::option::Option<::std::string::String>,
2254        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2255        pub purge_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
2256        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2257        pub state: ::std::option::Option<::serde_json::Value>,
2258        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2259        pub updated_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
2260        ///Optional zone this entity belongs to.
2261        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2262        pub zone_id: ::std::option::Option<::std::string::String>,
2263    }
2264    ///Entity type (apartment, switch, light, sensor...).
2265    ///
2266    /// <details><summary>JSON schema</summary>
2267    ///
2268    /// ```json
2269    ///{
2270    ///  "description": "Entity type (apartment, switch, light, sensor...).",
2271    ///  "type": "string",
2272    ///  "enum": [
2273    ///    "apartment",
2274    ///    "door",
2275    ///    "light",
2276    ///    "sensor",
2277    ///    "switch"
2278    ///  ]
2279    ///}
2280    /// ```
2281    /// </details>
2282    #[derive(
2283        ::serde::Deserialize,
2284        ::serde::Serialize,
2285        Clone,
2286        Copy,
2287        Debug,
2288        Eq,
2289        Hash,
2290        Ord,
2291        PartialEq,
2292        PartialOrd,
2293    )]
2294    pub enum EntityType {
2295        #[serde(rename = "apartment")]
2296        Apartment,
2297        #[serde(rename = "door")]
2298        Door,
2299        #[serde(rename = "light")]
2300        Light,
2301        #[serde(rename = "sensor")]
2302        Sensor,
2303        #[serde(rename = "switch")]
2304        Switch,
2305    }
2306    impl ::std::fmt::Display for EntityType {
2307        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2308            match *self {
2309                Self::Apartment => f.write_str("apartment"),
2310                Self::Door => f.write_str("door"),
2311                Self::Light => f.write_str("light"),
2312                Self::Sensor => f.write_str("sensor"),
2313                Self::Switch => f.write_str("switch"),
2314            }
2315        }
2316    }
2317    impl ::std::str::FromStr for EntityType {
2318        type Err = self::error::ConversionError;
2319        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2320            match value {
2321                "apartment" => Ok(Self::Apartment),
2322                "door" => Ok(Self::Door),
2323                "light" => Ok(Self::Light),
2324                "sensor" => Ok(Self::Sensor),
2325                "switch" => Ok(Self::Switch),
2326                _ => Err("invalid value".into()),
2327            }
2328        }
2329    }
2330    impl ::std::convert::TryFrom<&str> for EntityType {
2331        type Error = self::error::ConversionError;
2332        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2333            value.parse()
2334        }
2335    }
2336    impl ::std::convert::TryFrom<&::std::string::String> for EntityType {
2337        type Error = self::error::ConversionError;
2338        fn try_from(
2339            value: &::std::string::String,
2340        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2341            value.parse()
2342        }
2343    }
2344    impl ::std::convert::TryFrom<::std::string::String> for EntityType {
2345        type Error = self::error::ConversionError;
2346        fn try_from(
2347            value: ::std::string::String,
2348        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2349            value.parse()
2350        }
2351    }
2352    ///EULA content response
2353    ///
2354    /// <details><summary>JSON schema</summary>
2355    ///
2356    /// ```json
2357    ///{
2358    ///  "description": "EULA content response",
2359    ///  "type": "object",
2360    ///  "required": [
2361    ///    "content",
2362    ///    "version"
2363    ///  ],
2364    ///  "properties": {
2365    ///    "content": {
2366    ///      "type": "string"
2367    ///    },
2368    ///    "version": {
2369    ///      "type": "string"
2370    ///    }
2371    ///  }
2372    ///}
2373    /// ```
2374    /// </details>
2375    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2376    pub struct EulaResponse {
2377        pub content: ::std::string::String,
2378        pub version: ::std::string::String,
2379    }
2380    ///`ExecuteScriptingRequest`
2381    ///
2382    /// <details><summary>JSON schema</summary>
2383    ///
2384    /// ```json
2385    ///{
2386    ///  "type": "object",
2387    ///  "required": [
2388    ///    "script"
2389    ///  ],
2390    ///  "properties": {
2391    ///    "script": {
2392    ///      "type": "string"
2393    ///    }
2394    ///  }
2395    ///}
2396    /// ```
2397    /// </details>
2398    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2399    pub struct ExecuteScriptingRequest {
2400        pub script: ::std::string::String,
2401    }
2402    ///`ExecuteScriptingResponse`
2403    ///
2404    /// <details><summary>JSON schema</summary>
2405    ///
2406    /// ```json
2407    ///{
2408    ///  "type": "object",
2409    ///  "required": [
2410    ///    "result"
2411    ///  ],
2412    ///  "properties": {
2413    ///    "result": {}
2414    ///  }
2415    ///}
2416    /// ```
2417    /// </details>
2418    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2419    pub struct ExecuteScriptingResponse {
2420        pub result: ::serde_json::Value,
2421    }
2422    ///Response for get access portal by ID (includes integration_id for navigation).
2423    ///
2424    /// <details><summary>JSON schema</summary>
2425    ///
2426    /// ```json
2427    ///{
2428    ///  "description": "Response for get access portal by ID (includes integration_id for navigation).",
2429    ///  "allOf": [
2430    ///    {
2431    ///      "$ref": "#/components/schemas/AccessPortalListItem"
2432    ///    },
2433    ///    {
2434    ///      "type": "object",
2435    ///      "required": [
2436    ///        "integration_id"
2437    ///      ],
2438    ///      "properties": {
2439    ///        "integration_id": {
2440    ///          "type": "string"
2441    ///        }
2442    ///      }
2443    ///    }
2444    ///  ]
2445    ///}
2446    /// ```
2447    /// </details>
2448    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2449    pub struct GetAccessPortalResponse {
2450        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2451        pub created_at: ::std::option::Option<::std::string::String>,
2452        ///Device external_id (same integration): portal links to virtual_access_portal device by standard external identity.
2453        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2454        pub device_external_id: ::std::option::Option<::std::string::String>,
2455        pub id: ::std::string::String,
2456        pub integration_id: ::std::string::String,
2457        pub name: LocalizedString,
2458        pub public_id: ::std::string::String,
2459        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2460        pub updated_at: ::std::option::Option<::std::string::String>,
2461    }
2462    ///`HashMap`
2463    ///
2464    /// <details><summary>JSON schema</summary>
2465    ///
2466    /// ```json
2467    ///{
2468    ///  "type": "object",
2469    ///  "additionalProperties": {
2470    ///    "type": "string"
2471    ///  }
2472    ///}
2473    /// ```
2474    /// </details>
2475    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2476    #[serde(transparent)]
2477    pub struct HashMap(
2478        pub ::std::collections::HashMap<::std::string::String, ::std::string::String>,
2479    );
2480    impl ::std::ops::Deref for HashMap {
2481        type Target = ::std::collections::HashMap<::std::string::String, ::std::string::String>;
2482        fn deref(
2483            &self,
2484        ) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
2485            &self.0
2486        }
2487    }
2488    impl ::std::convert::From<HashMap>
2489        for ::std::collections::HashMap<::std::string::String, ::std::string::String>
2490    {
2491        fn from(value: HashMap) -> Self {
2492            value.0
2493        }
2494    }
2495    impl
2496        ::std::convert::From<
2497            ::std::collections::HashMap<::std::string::String, ::std::string::String>,
2498        > for HashMap
2499    {
2500        fn from(
2501            value: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
2502        ) -> Self {
2503            Self(value)
2504        }
2505    }
2506    /**Credential/Auth for a specific cloud instance.
2507
2508    Example: Shelly account "A", HomeAssistant instance "Home".*/
2509    ///
2510    /// <details><summary>JSON schema</summary>
2511    ///
2512    /// ```json
2513    ///{
2514    ///  "description": "Credential/Auth for a specific cloud instance.\n\nExample: Shelly account \"A\", HomeAssistant instance \"Home\".",
2515    ///  "type": "object",
2516    ///  "required": [
2517    ///    "enabled",
2518    ///    "health",
2519    ///    "id",
2520    ///    "name",
2521    ///    "org_id",
2522    ///    "provider_type"
2523    ///  ],
2524    ///  "properties": {
2525    ///    "config": {
2526    ///      "description": "Provider-specific non-secret configuration (JSON)."
2527    ///    },
2528    ///    "enabled": {
2529    ///      "description": "User-controlled flag: if false, this integration will not be used for actions/ops.",
2530    ///      "type": "boolean"
2531    ///    },
2532    ///    "health": {
2533    ///      "$ref": "#/components/schemas/IntegrationHealth"
2534    ///    },
2535    ///    "id": {
2536    ///      "description": "Unique identifier (ULID).",
2537    ///      "type": "string"
2538    ///    },
2539    ///    "metadata": {
2540    ///      "oneOf": [
2541    ///        {
2542    ///          "type": "null"
2543    ///        },
2544    ///        {
2545    ///          "oneOf": [
2546    ///            {
2547    ///              "$ref": "#/components/schemas/HashMap"
2548    ///            }
2549    ///          ]
2550    ///        }
2551    ///      ]
2552    ///    },
2553    ///    "name": {
2554    ///      "$ref": "#/components/schemas/LocalizedString"
2555    ///    },
2556    ///    "org_id": {
2557    ///      "description": "Organization that owns this integration.",
2558    ///      "type": "string"
2559    ///    },
2560    ///    "provider_type": {
2561    ///      "$ref": "#/components/schemas/ProviderType"
2562    ///    }
2563    ///  }
2564    ///}
2565    /// ```
2566    /// </details>
2567    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2568    pub struct Integration {
2569        ///Provider-specific non-secret configuration (JSON).
2570        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2571        pub config: ::std::option::Option<::serde_json::Value>,
2572        ///User-controlled flag: if false, this integration will not be used for actions/ops.
2573        pub enabled: bool,
2574        pub health: IntegrationHealth,
2575        ///Unique identifier (ULID).
2576        pub id: ::std::string::String,
2577        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2578        pub metadata: ::std::option::Option<HashMap>,
2579        pub name: LocalizedString,
2580        ///Organization that owns this integration.
2581        pub org_id: ::std::string::String,
2582        pub provider_type: ProviderType,
2583    }
2584    ///JSON Schema for `devices.device_metadata` for an integration's provider (no device instance required).
2585    ///
2586    /// <details><summary>JSON schema</summary>
2587    ///
2588    /// ```json
2589    ///{
2590    ///  "description": "JSON Schema for `devices.device_metadata` for an integration's provider (no device instance required).",
2591    ///  "type": "object",
2592    ///  "required": [
2593    ///    "provider_type",
2594    ///    "schema"
2595    ///  ],
2596    ///  "properties": {
2597    ///    "provider_type": {
2598    ///      "type": "string"
2599    ///    },
2600    ///    "schema": {
2601    ///      "description": "JSON Schema describing `devices.device_metadata` for this provider."
2602    ///    }
2603    ///  }
2604    ///}
2605    /// ```
2606    /// </details>
2607    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2608    pub struct IntegrationDeviceMetadataSchemaResponse {
2609        pub provider_type: ::std::string::String,
2610        ///JSON Schema describing `devices.device_metadata` for this provider.
2611        pub schema: ::serde_json::Value,
2612    }
2613    ///Integration status (active, disabled, error).
2614    ///
2615    /// <details><summary>JSON schema</summary>
2616    ///
2617    /// ```json
2618    ///{
2619    ///  "description": "Integration status (active, disabled, error).",
2620    ///  "type": "string",
2621    ///  "enum": [
2622    ///    "ok",
2623    ///    "error"
2624    ///  ]
2625    ///}
2626    /// ```
2627    /// </details>
2628    #[derive(
2629        ::serde::Deserialize,
2630        ::serde::Serialize,
2631        Clone,
2632        Copy,
2633        Debug,
2634        Eq,
2635        Hash,
2636        Ord,
2637        PartialEq,
2638        PartialOrd,
2639    )]
2640    pub enum IntegrationHealth {
2641        #[serde(rename = "ok")]
2642        Ok,
2643        #[serde(rename = "error")]
2644        Error,
2645    }
2646    impl ::std::fmt::Display for IntegrationHealth {
2647        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2648            match *self {
2649                Self::Ok => f.write_str("ok"),
2650                Self::Error => f.write_str("error"),
2651            }
2652        }
2653    }
2654    impl ::std::str::FromStr for IntegrationHealth {
2655        type Err = self::error::ConversionError;
2656        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2657            match value {
2658                "ok" => Ok(Self::Ok),
2659                "error" => Ok(Self::Error),
2660                _ => Err("invalid value".into()),
2661            }
2662        }
2663    }
2664    impl ::std::convert::TryFrom<&str> for IntegrationHealth {
2665        type Error = self::error::ConversionError;
2666        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2667            value.parse()
2668        }
2669    }
2670    impl ::std::convert::TryFrom<&::std::string::String> for IntegrationHealth {
2671        type Error = self::error::ConversionError;
2672        fn try_from(
2673            value: &::std::string::String,
2674        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2675            value.parse()
2676        }
2677    }
2678    impl ::std::convert::TryFrom<::std::string::String> for IntegrationHealth {
2679        type Error = self::error::ConversionError;
2680        fn try_from(
2681            value: ::std::string::String,
2682        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2683            value.parse()
2684        }
2685    }
2686    ///`IntegrationResponse`
2687    ///
2688    /// <details><summary>JSON schema</summary>
2689    ///
2690    /// ```json
2691    ///{
2692    ///  "allOf": [
2693    ///    {
2694    ///      "$ref": "#/components/schemas/Integration"
2695    ///    },
2696    ///    {
2697    ///      "oneOf": [
2698    ///        {
2699    ///          "type": "null"
2700    ///        },
2701    ///        {
2702    ///          "oneOf": [
2703    ///            {
2704    ///              "$ref": "#/components/schemas/StorageFeatures"
2705    ///            }
2706    ///          ]
2707    ///        }
2708    ///      ]
2709    ///    },
2710    ///    {
2711    ///      "type": "object",
2712    ///      "required": [
2713    ///        "provider_type_name"
2714    ///      ],
2715    ///      "properties": {
2716    ///        "provider_type_name": {
2717    ///          "$ref": "#/components/schemas/LocalizedString"
2718    ///        }
2719    ///      }
2720    ///    }
2721    ///  ]
2722    ///}
2723    /// ```
2724    /// </details>
2725    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2726    pub struct IntegrationResponse {
2727        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2728        pub cache_hit: ::std::option::Option<bool>,
2729        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2730        pub cache_ttl: ::std::option::Option<i64>,
2731        ///Provider-specific non-secret configuration (JSON).
2732        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2733        pub config: ::std::option::Option<::serde_json::Value>,
2734        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2735        pub created_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
2736        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2737        pub deleted_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
2738        ///User-controlled flag: if false, this integration will not be used for actions/ops.
2739        pub enabled: bool,
2740        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2741        pub hard_delete_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
2742        pub health: IntegrationHealth,
2743        ///Unique identifier (ULID).
2744        pub id: ::std::string::String,
2745        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2746        pub metadata: ::std::option::Option<HashMap>,
2747        pub name: LocalizedString,
2748        ///Organization that owns this integration.
2749        pub org_id: ::std::string::String,
2750        pub provider_type: ProviderType,
2751        pub provider_type_name: LocalizedString,
2752        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2753        pub purge_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
2754        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2755        pub updated_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
2756    }
2757    ///How the recurring series ends (from `invite_recurrence`), for admin/public display.
2758    ///
2759    /// <details><summary>JSON schema</summary>
2760    ///
2761    /// ```json
2762    ///{
2763    ///  "description": "How the recurring series ends (from `invite_recurrence`), for admin/public display.",
2764    ///  "oneOf": [
2765    ///    {
2766    ///      "type": "object",
2767    ///      "required": [
2768    ///        "kind"
2769    ///      ],
2770    ///      "properties": {
2771    ///        "kind": {
2772    ///          "type": "string",
2773    ///          "enum": [
2774    ///            "never"
2775    ///          ]
2776    ///        }
2777    ///      }
2778    ///    },
2779    ///    {
2780    ///      "type": "object",
2781    ///      "required": [
2782    ///        "at",
2783    ///        "kind"
2784    ///      ],
2785    ///      "properties": {
2786    ///        "at": {
2787    ///          "type": "string"
2788    ///        },
2789    ///        "kind": {
2790    ///          "type": "string",
2791    ///          "enum": [
2792    ///            "until"
2793    ///          ]
2794    ///        }
2795    ///      }
2796    ///    },
2797    ///    {
2798    ///      "type": "object",
2799    ///      "required": [
2800    ///        "kind",
2801    ///        "total"
2802    ///      ],
2803    ///      "properties": {
2804    ///        "kind": {
2805    ///          "type": "string",
2806    ///          "enum": [
2807    ///            "count"
2808    ///          ]
2809    ///        },
2810    ///        "total": {
2811    ///          "type": "integer",
2812    ///          "format": "int32",
2813    ///          "minimum": 0.0
2814    ///        }
2815    ///      }
2816    ///    }
2817    ///  ]
2818    ///}
2819    /// ```
2820    /// </details>
2821    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2822    #[serde(tag = "kind")]
2823    pub enum InviteRecurrenceSeriesEnd {
2824        #[serde(rename = "never")]
2825        Never,
2826        #[serde(rename = "until")]
2827        Until { at: ::std::string::String },
2828        #[serde(rename = "count")]
2829        Count { total: i32 },
2830    }
2831    ///`InviteScheduleCombined`
2832    ///
2833    /// <details><summary>JSON schema</summary>
2834    ///
2835    /// ```json
2836    ///{
2837    ///  "type": "object",
2838    ///  "properties": {
2839    ///    "open_ended_recurrence": {
2840    ///      "type": "boolean"
2841    ///    },
2842    ///    "since": {
2843    ///      "type": [
2844    ///        "string",
2845    ///        "null"
2846    ///      ]
2847    ///    },
2848    ///    "until": {
2849    ///      "type": [
2850    ///        "string",
2851    ///        "null"
2852    ///      ]
2853    ///    }
2854    ///  }
2855    ///}
2856    /// ```
2857    /// </details>
2858    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2859    pub struct InviteScheduleCombined {
2860        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2861        pub open_ended_recurrence: ::std::option::Option<bool>,
2862        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2863        pub since: ::std::option::Option<::std::string::String>,
2864        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2865        pub until: ::std::option::Option<::std::string::String>,
2866    }
2867    impl ::std::default::Default for InviteScheduleCombined {
2868        fn default() -> Self {
2869            Self {
2870                open_ended_recurrence: Default::default(),
2871                since: Default::default(),
2872                until: Default::default(),
2873            }
2874        }
2875    }
2876    ///`InviteScheduleEntryInput`
2877    ///
2878    /// <details><summary>JSON schema</summary>
2879    ///
2880    /// ```json
2881    ///{
2882    ///  "type": "object",
2883    ///  "required": [
2884    ///    "valid_from",
2885    ///    "valid_to"
2886    ///  ],
2887    ///  "properties": {
2888    ///    "id": {
2889    ///      "type": [
2890    ///        "string",
2891    ///        "null"
2892    ///      ]
2893    ///    },
2894    ///    "invite_recurrence": {},
2895    ///    "is_enabled": {
2896    ///      "type": "boolean"
2897    ///    },
2898    ///    "name": {
2899    ///      "type": [
2900    ///        "string",
2901    ///        "null"
2902    ///      ]
2903    ///    },
2904    ///    "valid_from": {
2905    ///      "type": "string"
2906    ///    },
2907    ///    "valid_to": {
2908    ///      "type": "string"
2909    ///    }
2910    ///  }
2911    ///}
2912    /// ```
2913    /// </details>
2914    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2915    pub struct InviteScheduleEntryInput {
2916        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2917        pub id: ::std::option::Option<::std::string::String>,
2918        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2919        pub invite_recurrence: ::std::option::Option<::serde_json::Value>,
2920        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2921        pub is_enabled: ::std::option::Option<bool>,
2922        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2923        pub name: ::std::option::Option<::std::string::String>,
2924        pub valid_from: ::std::string::String,
2925        pub valid_to: ::std::string::String,
2926    }
2927    ///`InviteScheduleEntrySnapshot`
2928    ///
2929    /// <details><summary>JSON schema</summary>
2930    ///
2931    /// ```json
2932    ///{
2933    ///  "type": "object",
2934    ///  "required": [
2935    ///    "id",
2936    ///    "is_enabled",
2937    ///    "schedule",
2938    ///    "valid_from",
2939    ///    "valid_to"
2940    ///  ],
2941    ///  "properties": {
2942    ///    "id": {
2943    ///      "type": "string"
2944    ///    },
2945    ///    "invite_recurrence": {},
2946    ///    "is_enabled": {
2947    ///      "type": "boolean"
2948    ///    },
2949    ///    "name": {
2950    ///      "type": [
2951    ///        "string",
2952    ///        "null"
2953    ///      ]
2954    ///    },
2955    ///    "schedule": {
2956    ///      "$ref": "#/components/schemas/InviteScheduleSnapshot"
2957    ///    },
2958    ///    "valid_from": {
2959    ///      "type": "string"
2960    ///    },
2961    ///    "valid_to": {
2962    ///      "type": "string"
2963    ///    }
2964    ///  }
2965    ///}
2966    /// ```
2967    /// </details>
2968    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2969    pub struct InviteScheduleEntrySnapshot {
2970        pub id: ::std::string::String,
2971        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2972        pub invite_recurrence: ::std::option::Option<::serde_json::Value>,
2973        pub is_enabled: bool,
2974        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2975        pub name: ::std::option::Option<::std::string::String>,
2976        pub schedule: InviteScheduleSnapshot,
2977        pub valid_from: ::std::string::String,
2978        pub valid_to: ::std::string::String,
2979    }
2980    ///`InviteScheduleKind`
2981    ///
2982    /// <details><summary>JSON schema</summary>
2983    ///
2984    /// ```json
2985    ///{
2986    ///  "type": "string",
2987    ///  "enum": [
2988    ///    "single_window",
2989    ///    "single_recurring",
2990    ///    "multiple"
2991    ///  ]
2992    ///}
2993    /// ```
2994    /// </details>
2995    #[derive(
2996        ::serde::Deserialize,
2997        ::serde::Serialize,
2998        Clone,
2999        Copy,
3000        Debug,
3001        Eq,
3002        Hash,
3003        Ord,
3004        PartialEq,
3005        PartialOrd,
3006    )]
3007    pub enum InviteScheduleKind {
3008        #[serde(rename = "single_window")]
3009        SingleWindow,
3010        #[serde(rename = "single_recurring")]
3011        SingleRecurring,
3012        #[serde(rename = "multiple")]
3013        Multiple,
3014    }
3015    impl ::std::fmt::Display for InviteScheduleKind {
3016        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3017            match *self {
3018                Self::SingleWindow => f.write_str("single_window"),
3019                Self::SingleRecurring => f.write_str("single_recurring"),
3020                Self::Multiple => f.write_str("multiple"),
3021            }
3022        }
3023    }
3024    impl ::std::str::FromStr for InviteScheduleKind {
3025        type Err = self::error::ConversionError;
3026        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3027            match value {
3028                "single_window" => Ok(Self::SingleWindow),
3029                "single_recurring" => Ok(Self::SingleRecurring),
3030                "multiple" => Ok(Self::Multiple),
3031                _ => Err("invalid value".into()),
3032            }
3033        }
3034    }
3035    impl ::std::convert::TryFrom<&str> for InviteScheduleKind {
3036        type Error = self::error::ConversionError;
3037        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3038            value.parse()
3039        }
3040    }
3041    impl ::std::convert::TryFrom<&::std::string::String> for InviteScheduleKind {
3042        type Error = self::error::ConversionError;
3043        fn try_from(
3044            value: &::std::string::String,
3045        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3046            value.parse()
3047        }
3048    }
3049    impl ::std::convert::TryFrom<::std::string::String> for InviteScheduleKind {
3050        type Error = self::error::ConversionError;
3051        fn try_from(
3052            value: ::std::string::String,
3053        ) -> ::std::result::Result<Self, self::error::ConversionError> {
3054            value.parse()
3055        }
3056    }
3057    ///`InviteScheduleSnapshot`
3058    ///
3059    /// <details><summary>JSON schema</summary>
3060    ///
3061    /// ```json
3062    ///{
3063    ///  "type": "object",
3064    ///  "required": [
3065    ///    "is_recurring",
3066    ///    "slot_duration_seconds"
3067    ///  ],
3068    ///  "properties": {
3069    ///    "active_window": {
3070    ///      "oneOf": [
3071    ///        {
3072    ///          "type": "null"
3073    ///        },
3074    ///        {
3075    ///          "oneOf": [
3076    ///            {
3077    ///              "$ref": "#/components/schemas/InviteWindow"
3078    ///            }
3079    ///          ]
3080    ///        }
3081    ///      ]
3082    ///    },
3083    ///    "is_recurring": {
3084    ///      "type": "boolean"
3085    ///    },
3086    ///    "next_window": {
3087    ///      "oneOf": [
3088    ///        {
3089    ///          "type": "null"
3090    ///        },
3091    ///        {
3092    ///          "oneOf": [
3093    ///            {
3094    ///              "$ref": "#/components/schemas/InviteWindow"
3095    ///            }
3096    ///          ]
3097    ///        }
3098    ///      ]
3099    ///    },
3100    ///    "series_end": {
3101    ///      "oneOf": [
3102    ///        {
3103    ///          "type": "null"
3104    ///        },
3105    ///        {
3106    ///          "oneOf": [
3107    ///            {
3108    ///              "$ref": "#/components/schemas/InviteRecurrenceSeriesEnd"
3109    ///            }
3110    ///          ]
3111    ///        }
3112    ///      ]
3113    ///    },
3114    ///    "slot_duration_seconds": {
3115    ///      "type": "integer",
3116    ///      "format": "int64"
3117    ///    }
3118    ///  }
3119    ///}
3120    /// ```
3121    /// </details>
3122    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3123    pub struct InviteScheduleSnapshot {
3124        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3125        pub active_window: ::std::option::Option<InviteWindow>,
3126        pub is_recurring: bool,
3127        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3128        pub next_window: ::std::option::Option<InviteWindow>,
3129        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3130        pub series_end: ::std::option::Option<InviteRecurrenceSeriesEnd>,
3131        pub slot_duration_seconds: i64,
3132    }
3133    ///`InviteWindow`
3134    ///
3135    /// <details><summary>JSON schema</summary>
3136    ///
3137    /// ```json
3138    ///{
3139    ///  "type": "object",
3140    ///  "required": [
3141    ///    "from",
3142    ///    "to"
3143    ///  ],
3144    ///  "properties": {
3145    ///    "from": {
3146    ///      "type": "string"
3147    ///    },
3148    ///    "to": {
3149    ///      "type": "string"
3150    ///    }
3151    ///  }
3152    ///}
3153    /// ```
3154    /// </details>
3155    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3156    pub struct InviteWindow {
3157        pub from: ::std::string::String,
3158        pub to: ::std::string::String,
3159    }
3160    ///`LanAgentBootstrapTokenRequest`
3161    ///
3162    /// <details><summary>JSON schema</summary>
3163    ///
3164    /// ```json
3165    ///{
3166    ///  "type": "object",
3167    ///  "required": [
3168    ///    "api_base_url",
3169    ///    "task_id"
3170    ///  ],
3171    ///  "properties": {
3172    ///    "api_base_url": {
3173    ///      "description": "Browser-visible API base (e.g. `https://app.example.com/api/v1`).",
3174    ///      "type": "string"
3175    ///    },
3176    ///    "device_id": {
3177    ///      "type": [
3178    ///        "string",
3179    ///        "null"
3180    ///      ]
3181    ///    },
3182    ///    "integration_id": {
3183    ///      "description": "Required for one-shot Waveshare tasks; omit for `serve`.",
3184    ///      "type": [
3185    ///        "string",
3186    ///        "null"
3187    ///      ]
3188    ///    },
3189    ///    "task_id": {
3190    ///      "type": "string"
3191    ///    }
3192    ///  }
3193    ///}
3194    /// ```
3195    /// </details>
3196    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3197    pub struct LanAgentBootstrapTokenRequest {
3198        ///Browser-visible API base (e.g. `https://app.example.com/api/v1`).
3199        pub api_base_url: ::std::string::String,
3200        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3201        pub device_id: ::std::option::Option<::std::string::String>,
3202        ///Required for one-shot Waveshare tasks; omit for `serve`.
3203        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3204        pub integration_id: ::std::option::Option<::std::string::String>,
3205        pub task_id: ::std::string::String,
3206    }
3207    ///`LanAgentBootstrapTokenResponse`
3208    ///
3209    /// <details><summary>JSON schema</summary>
3210    ///
3211    /// ```json
3212    ///{
3213    ///  "type": "object",
3214    ///  "required": [
3215    ///    "bootstrap_key",
3216    ///    "expires_in"
3217    ///  ],
3218    ///  "properties": {
3219    ///    "bootstrap_key": {
3220    ///      "description": "ULID for `GET /lan-agent/cli/bootstrap.sh?key=…`.",
3221    ///      "type": "string"
3222    ///    },
3223    ///    "expires_in": {
3224    ///      "type": "integer",
3225    ///      "format": "int64",
3226    ///      "minimum": 0.0
3227    ///    }
3228    ///  }
3229    ///}
3230    /// ```
3231    /// </details>
3232    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3233    pub struct LanAgentBootstrapTokenResponse {
3234        ///ULID for `GET /lan-agent/cli/bootstrap.sh?key=…`.
3235        pub bootstrap_key: ::std::string::String,
3236        pub expires_in: i64,
3237    }
3238    ///`LanAgentCliTokenResponse`
3239    ///
3240    /// <details><summary>JSON schema</summary>
3241    ///
3242    /// ```json
3243    ///{
3244    ///  "type": "object",
3245    ///  "required": [
3246    ///    "access_token",
3247    ///    "expires_in",
3248    ///    "token_type"
3249    ///  ],
3250    ///  "properties": {
3251    ///    "access_token": {
3252    ///      "type": "string"
3253    ///    },
3254    ///    "expires_in": {
3255    ///      "type": "integer",
3256    ///      "format": "int64",
3257    ///      "minimum": 0.0
3258    ///    },
3259    ///    "token_type": {
3260    ///      "type": "string"
3261    ///    }
3262    ///  }
3263    ///}
3264    /// ```
3265    /// </details>
3266    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3267    pub struct LanAgentCliTokenResponse {
3268        pub access_token: ::std::string::String,
3269        pub expires_in: i64,
3270        pub token_type: ::std::string::String,
3271    }
3272    ///`LanAgentMetaResponse`
3273    ///
3274    /// <details><summary>JSON schema</summary>
3275    ///
3276    /// ```json
3277    ///{
3278    ///  "type": "object",
3279    ///  "required": [
3280    ///    "lan_protocol_version",
3281    ///    "tasks_catalog"
3282    ///  ],
3283    ///  "properties": {
3284    ///    "lan_protocol_version": {
3285    ///      "type": "integer",
3286    ///      "format": "int32",
3287    ///      "minimum": 0.0
3288    ///    },
3289    ///    "latest_agent_version": {
3290    ///      "type": [
3291    ///        "string",
3292    ///        "null"
3293    ///      ]
3294    ///    },
3295    ///    "min_supported_agent_version": {
3296    ///      "type": [
3297    ///        "string",
3298    ///        "null"
3299    ///      ]
3300    ///    },
3301    ///    "tasks_catalog": {},
3302    ///    "upgrade_download_url": {
3303    ///      "type": [
3304    ///        "string",
3305    ///        "null"
3306    ///      ]
3307    ///    }
3308    ///  }
3309    ///}
3310    /// ```
3311    /// </details>
3312    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3313    pub struct LanAgentMetaResponse {
3314        pub lan_protocol_version: i32,
3315        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3316        pub latest_agent_version: ::std::option::Option<::std::string::String>,
3317        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3318        pub min_supported_agent_version: ::std::option::Option<::std::string::String>,
3319        pub tasks_catalog: ::serde_json::Value,
3320        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3321        pub upgrade_download_url: ::std::option::Option<::std::string::String>,
3322    }
3323    ///`LanAgentTaskSpecRequest`
3324    ///
3325    /// <details><summary>JSON schema</summary>
3326    ///
3327    /// ```json
3328    ///{
3329    ///  "type": "object",
3330    ///  "required": [
3331    ///    "lan_protocol_version",
3332    ///    "payload",
3333    ///    "task_id"
3334    ///  ],
3335    ///  "properties": {
3336    ///    "lan_protocol_version": {
3337    ///      "type": "integer",
3338    ///      "format": "int32",
3339    ///      "minimum": 0.0
3340    ///    },
3341    ///    "payload": {},
3342    ///    "task_id": {
3343    ///      "type": "string"
3344    ///    }
3345    ///  }
3346    ///}
3347    /// ```
3348    /// </details>
3349    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3350    pub struct LanAgentTaskSpecRequest {
3351        pub lan_protocol_version: i32,
3352        pub payload: ::serde_json::Value,
3353        pub task_id: ::std::string::String,
3354    }
3355    ///`LanAgentTaskSpecResponse`
3356    ///
3357    /// <details><summary>JSON schema</summary>
3358    ///
3359    /// ```json
3360    ///{
3361    ///  "type": "object",
3362    ///  "required": [
3363    ///    "lan_protocol_version",
3364    ///    "spec",
3365    ///    "task_id"
3366    ///  ],
3367    ///  "properties": {
3368    ///    "lan_protocol_version": {
3369    ///      "type": "integer",
3370    ///      "format": "int32",
3371    ///      "minimum": 0.0
3372    ///    },
3373    ///    "spec": {},
3374    ///    "task_id": {
3375    ///      "type": "string"
3376    ///    }
3377    ///  }
3378    ///}
3379    /// ```
3380    /// </details>
3381    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3382    pub struct LanAgentTaskSpecResponse {
3383        pub lan_protocol_version: i32,
3384        pub spec: ::serde_json::Value,
3385        pub task_id: ::std::string::String,
3386    }
3387    /**Map of light entity ULID to auto-off duration in seconds.
3388    Serializes as JSON object with string keys.*/
3389    ///
3390    /// <details><summary>JSON schema</summary>
3391    ///
3392    /// ```json
3393    ///{
3394    ///  "description": "Map of light entity ULID to auto-off duration in seconds.\nSerializes as JSON object with string keys.",
3395    ///  "type": "object",
3396    ///  "additionalProperties": {
3397    ///    "type": "integer",
3398    ///    "format": "int64",
3399    ///    "minimum": 0.0
3400    ///  }
3401    ///}
3402    /// ```
3403    /// </details>
3404    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3405    #[serde(transparent)]
3406    pub struct LightsAutoOffDuration(pub ::std::collections::HashMap<::std::string::String, i64>);
3407    impl ::std::ops::Deref for LightsAutoOffDuration {
3408        type Target = ::std::collections::HashMap<::std::string::String, i64>;
3409        fn deref(&self) -> &::std::collections::HashMap<::std::string::String, i64> {
3410            &self.0
3411        }
3412    }
3413    impl ::std::convert::From<LightsAutoOffDuration>
3414        for ::std::collections::HashMap<::std::string::String, i64>
3415    {
3416        fn from(value: LightsAutoOffDuration) -> Self {
3417            value.0
3418        }
3419    }
3420    impl ::std::convert::From<::std::collections::HashMap<::std::string::String, i64>>
3421        for LightsAutoOffDuration
3422    {
3423        fn from(value: ::std::collections::HashMap<::std::string::String, i64>) -> Self {
3424            Self(value)
3425        }
3426    }
3427    ///`LimitSource`
3428    ///
3429    /// <details><summary>JSON schema</summary>
3430    ///
3431    /// ```json
3432    ///{
3433    ///  "oneOf": [
3434    ///    {
3435    ///      "description": "A row in `quota_overrides`; carries the override id for traceability.",
3436    ///      "type": "object",
3437    ///      "required": [
3438    ///        "id",
3439    ///        "kind"
3440    ///      ],
3441    ///      "properties": {
3442    ///        "id": {
3443    ///          "type": "string"
3444    ///        },
3445    ///        "kind": {
3446    ///          "type": "string",
3447    ///          "enum": [
3448    ///            "override"
3449    ///          ]
3450    ///        }
3451    ///      }
3452    ///    },
3453    ///    {
3454    ///      "description": "A row in `tier_quotas`; carries the tier slug.",
3455    ///      "type": "object",
3456    ///      "required": [
3457    ///        "kind",
3458    ///        "slug"
3459    ///      ],
3460    ///      "properties": {
3461    ///        "kind": {
3462    ///          "type": "string",
3463    ///          "enum": [
3464    ///            "tier"
3465    ///          ]
3466    ///        },
3467    ///        "slug": {
3468    ///          "type": "string"
3469    ///        }
3470    ///      }
3471    ///    },
3472    ///    {
3473    ///      "description": "The hardcoded fallback in `catalog::DEFAULT_TIER_FOR_PERSONAL` when no\ntier is configured for the org (e.g. brand-new personal workspace).",
3474    ///      "type": "object",
3475    ///      "required": [
3476    ///        "kind"
3477    ///      ],
3478    ///      "properties": {
3479    ///        "kind": {
3480    ///          "type": "string",
3481    ///          "enum": [
3482    ///            "default"
3483    ///          ]
3484    ///        }
3485    ///      }
3486    ///    }
3487    ///  ]
3488    ///}
3489    /// ```
3490    /// </details>
3491    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3492    #[serde(tag = "kind")]
3493    pub enum LimitSource {
3494        ///A row in `quota_overrides`; carries the override id for traceability.
3495        #[serde(rename = "override")]
3496        Override { id: ::std::string::String },
3497        ///A row in `tier_quotas`; carries the tier slug.
3498        #[serde(rename = "tier")]
3499        Tier { slug: ::std::string::String },
3500        #[serde(rename = "default")]
3501        Default,
3502    }
3503    ///`ListDevicesQuery`
3504    ///
3505    /// <details><summary>JSON schema</summary>
3506    ///
3507    /// ```json
3508    ///{
3509    ///  "allOf": [
3510    ///    {
3511    ///      "$ref": "#/components/schemas/MultiResourceOutputOptionsQuery"
3512    ///    },
3513    ///    {
3514    ///      "$ref": "#/components/schemas/PaginationQuery"
3515    ///    },
3516    ///    {
3517    ///      "type": "object",
3518    ///      "properties": {
3519    ///        "device_kind": {
3520    ///          "description": "Optional filter: only devices with metadata.kind equal to this value (e.g. virtual_access_portal).\nRequires integration_id. Filtering done at SQL level.",
3521    ///          "type": [
3522    ///            "string",
3523    ///            "null"
3524    ///          ]
3525    ///        },
3526    ///        "external_id": {
3527    ///          "description": "Optional filter: only devices with this external_id. Requires integration_id and device_kind.\nReturns at most 1 device. Filtering done at SQL level.",
3528    ///          "type": [
3529    ///            "string",
3530    ///            "null"
3531    ///          ]
3532    ///        },
3533    ///        "has_external_id": {
3534    ///          "description": "When true, only devices with a non-empty `external_id`. Requires `integration_id`.",
3535    ///          "type": [
3536    ///            "boolean",
3537    ///            "null"
3538    ///          ]
3539    ///        },
3540    ///        "has_go2rtc_channel": {
3541    ///          "description": "When true, only devices whose metadata JSON has a non-empty `channel` (go2rtc cameras). Requires `integration_id`.",
3542    ///          "type": [
3543    ///            "boolean",
3544    ///            "null"
3545    ///          ]
3546    ///        },
3547    ///        "include_stale": {
3548    ///          "description": "When true with `integration_id`, include `stale` per device when the provider supports it.",
3549    ///          "type": [
3550    ///            "boolean",
3551    ///            "null"
3552    ///          ]
3553    ///        },
3554    ///        "integration_id": {
3555    ///          "description": "Optional filter: only devices belonging to this integration.",
3556    ///          "type": [
3557    ///            "string",
3558    ///            "null"
3559    ///          ]
3560    ///        },
3561    ///        "q": {
3562    ///          "description": "Case-insensitive substring match on localized device name (JSON). Best-effort when `integration_id` is set (SQL ILIKE).",
3563    ///          "type": [
3564    ///            "string",
3565    ///            "null"
3566    ///          ]
3567    ///        }
3568    ///      }
3569    ///    }
3570    ///  ]
3571    ///}
3572    /// ```
3573    /// </details>
3574    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3575    pub struct ListDevicesQuery {
3576        /**Optional filter: only devices with metadata.kind equal to this value (e.g. virtual_access_portal).
3577        Requires integration_id. Filtering done at SQL level.*/
3578        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3579        pub device_kind: ::std::option::Option<::std::string::String>,
3580        /**Optional filter: only devices with this external_id. Requires integration_id and device_kind.
3581        Returns at most 1 device. Filtering done at SQL level.*/
3582        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3583        pub external_id: ::std::option::Option<::std::string::String>,
3584        ///When true, only devices with a non-empty `external_id`. Requires `integration_id`.
3585        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3586        pub has_external_id: ::std::option::Option<bool>,
3587        ///When true, only devices whose metadata JSON has a non-empty `channel` (go2rtc cameras). Requires `integration_id`.
3588        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3589        pub has_go2rtc_channel: ::std::option::Option<bool>,
3590        pub include_deleted: bool,
3591        pub include_metadata: bool,
3592        ///When true with `integration_id`, include `stale` per device when the provider supports it.
3593        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3594        pub include_stale: ::std::option::Option<bool>,
3595        ///Optional filter: only devices belonging to this integration.
3596        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3597        pub integration_id: ::std::option::Option<::std::string::String>,
3598        ///Number of items per page. Default from config, max 200.
3599        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3600        pub limit: ::std::option::Option<i32>,
3601        ///Number of items to skip. Default 0.
3602        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3603        pub offset: ::std::option::Option<i32>,
3604        pub only_deleted: bool,
3605        ///Case-insensitive substring match on localized device name (JSON). Best-effort when `integration_id` is set (SQL ILIKE).
3606        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3607        pub q: ::std::option::Option<::std::string::String>,
3608    }
3609    ///List entities for the organization context (X-Org).
3610    ///
3611    /// <details><summary>JSON schema</summary>
3612    ///
3613    /// ```json
3614    ///{
3615    ///  "description": "List entities for the organization context (X-Org).",
3616    ///  "allOf": [
3617    ///    {
3618    ///      "$ref": "#/components/schemas/MultiResourceOutputOptionsQuery"
3619    ///    },
3620    ///    {
3621    ///      "$ref": "#/components/schemas/PaginationQuery"
3622    ///    },
3623    ///    {
3624    ///      "type": "object",
3625    ///      "properties": {
3626    ///        "zone_id": {
3627    ///          "description": "Optional filter: only entities in this zone.",
3628    ///          "type": [
3629    ///            "string",
3630    ///            "null"
3631    ///          ]
3632    ///        }
3633    ///      }
3634    ///    }
3635    ///  ]
3636    ///}
3637    /// ```
3638    /// </details>
3639    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3640    pub struct ListEntitiesQuery {
3641        pub include_deleted: bool,
3642        pub include_metadata: bool,
3643        ///Number of items per page. Default from config, max 200.
3644        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3645        pub limit: ::std::option::Option<i32>,
3646        ///Number of items to skip. Default 0.
3647        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3648        pub offset: ::std::option::Option<i32>,
3649        pub only_deleted: bool,
3650        ///Optional filter: only entities in this zone.
3651        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3652        pub zone_id: ::std::option::Option<::std::string::String>,
3653    }
3654    ///`ListIntegrationAccessInvitesResponse`
3655    ///
3656    /// <details><summary>JSON schema</summary>
3657    ///
3658    /// ```json
3659    ///{
3660    ///  "type": "object",
3661    ///  "required": [
3662    ///    "invites"
3663    ///  ],
3664    ///  "properties": {
3665    ///    "invites": {
3666    ///      "type": "array",
3667    ///      "items": {
3668    ///        "$ref": "#/components/schemas/AccessInviteListItem"
3669    ///      }
3670    ///    }
3671    ///  }
3672    ///}
3673    /// ```
3674    /// </details>
3675    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3676    pub struct ListIntegrationAccessInvitesResponse {
3677        pub invites: ::std::vec::Vec<AccessInviteListItem>,
3678    }
3679    ///`ListIntegrationAccessPortalsResponse`
3680    ///
3681    /// <details><summary>JSON schema</summary>
3682    ///
3683    /// ```json
3684    ///{
3685    ///  "type": "object",
3686    ///  "required": [
3687    ///    "portals"
3688    ///  ],
3689    ///  "properties": {
3690    ///    "portals": {
3691    ///      "type": "array",
3692    ///      "items": {
3693    ///        "$ref": "#/components/schemas/AccessPortalListItem"
3694    ///      }
3695    ///    }
3696    ///  }
3697    ///}
3698    /// ```
3699    /// </details>
3700    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3701    pub struct ListIntegrationAccessPortalsResponse {
3702        pub portals: ::std::vec::Vec<AccessPortalListItem>,
3703    }
3704    ///`ListIntegrationsQuery`
3705    ///
3706    /// <details><summary>JSON schema</summary>
3707    ///
3708    /// ```json
3709    ///{
3710    ///  "allOf": [
3711    ///    {
3712    ///      "$ref": "#/components/schemas/MultiResourceOutputOptionsQuery"
3713    ///    },
3714    ///    {
3715    ///      "$ref": "#/components/schemas/PaginationQuery"
3716    ///    },
3717    ///    {
3718    ///      "type": "object",
3719    ///      "properties": {
3720    ///        "provider_type": {
3721    ///          "description": "Optional filter: only integrations with this provider_type (e.g. virtual_access).",
3722    ///          "type": [
3723    ///            "string",
3724    ///            "null"
3725    ///          ]
3726    ///        },
3727    ///        "q": {
3728    ///          "description": "Optional case-insensitive substring match on integration `name` (localized JSON), same as devices list.",
3729    ///          "type": [
3730    ///            "string",
3731    ///            "null"
3732    ///          ]
3733    ///        }
3734    ///      }
3735    ///    }
3736    ///  ]
3737    ///}
3738    /// ```
3739    /// </details>
3740    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3741    pub struct ListIntegrationsQuery {
3742        pub include_deleted: bool,
3743        pub include_metadata: bool,
3744        ///Number of items per page. Default from config, max 200.
3745        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3746        pub limit: ::std::option::Option<i32>,
3747        ///Number of items to skip. Default 0.
3748        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3749        pub offset: ::std::option::Option<i32>,
3750        pub only_deleted: bool,
3751        ///Optional filter: only integrations with this provider_type (e.g. virtual_access).
3752        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3753        pub provider_type: ::std::option::Option<::std::string::String>,
3754        ///Optional case-insensitive substring match on integration `name` (localized JSON), same as devices list.
3755        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3756        pub q: ::std::option::Option<::std::string::String>,
3757    }
3758    ///`ListOrgUsersQuery`
3759    ///
3760    /// <details><summary>JSON schema</summary>
3761    ///
3762    /// ```json
3763    ///{
3764    ///  "allOf": [
3765    ///    {
3766    ///      "$ref": "#/components/schemas/MultiResourceOutputOptionsQuery"
3767    ///    },
3768    ///    {
3769    ///      "$ref": "#/components/schemas/PaginationQuery"
3770    ///    },
3771    ///    {
3772    ///      "type": "object",
3773    ///      "properties": {
3774    ///        "recursive": {
3775    ///          "type": [
3776    ///            "boolean",
3777    ///            "null"
3778    ///          ]
3779    ///        }
3780    ///      }
3781    ///    }
3782    ///  ]
3783    ///}
3784    /// ```
3785    /// </details>
3786    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3787    pub struct ListOrgUsersQuery {
3788        pub include_deleted: bool,
3789        pub include_metadata: bool,
3790        ///Number of items per page. Default from config, max 200.
3791        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3792        pub limit: ::std::option::Option<i32>,
3793        ///Number of items to skip. Default 0.
3794        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3795        pub offset: ::std::option::Option<i32>,
3796        pub only_deleted: bool,
3797        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3798        pub recursive: ::std::option::Option<bool>,
3799    }
3800    ///`ListOrgsQuery`
3801    ///
3802    /// <details><summary>JSON schema</summary>
3803    ///
3804    /// ```json
3805    ///{
3806    ///  "allOf": [
3807    ///    {
3808    ///      "$ref": "#/components/schemas/MultiResourceOutputOptionsQuery"
3809    ///    },
3810    ///    {
3811    ///      "$ref": "#/components/schemas/PaginationQuery"
3812    ///    }
3813    ///  ]
3814    ///}
3815    /// ```
3816    /// </details>
3817    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3818    pub struct ListOrgsQuery {
3819        pub include_deleted: bool,
3820        pub include_metadata: bool,
3821        ///Number of items per page. Default from config, max 200.
3822        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3823        pub limit: ::std::option::Option<i32>,
3824        ///Number of items to skip. Default 0.
3825        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3826        pub offset: ::std::option::Option<i32>,
3827        pub only_deleted: bool,
3828    }
3829    /**Localized string dictionary.
3830
3831    This matches the dashboard convention: `{ [locale: string]: string }`.
3832
3833    Notes:
3834    - Internally this is keyed by `icu_locale_core::Locale` for type-safety.
3835    - For JSON/OpenAPI purposes this is treated as a `{ [locale: string]: string }` object.*/
3836    ///
3837    /// <details><summary>JSON schema</summary>
3838    ///
3839    /// ```json
3840    ///{
3841    ///  "description": "Localized string dictionary.\n\nThis matches the dashboard convention: `{ [locale: string]: string }`.\n\nNotes:\n- Internally this is keyed by `icu_locale_core::Locale` for type-safety.\n- For JSON/OpenAPI purposes this is treated as a `{ [locale: string]: string }` object.",
3842    ///  "type": "object",
3843    ///  "required": [
3844    ///    "value"
3845    ///  ],
3846    ///  "properties": {
3847    ///    "value": {
3848    ///      "description": "OpenAPI representation: `HashMap<String, String>` (JSON object).",
3849    ///      "type": "object",
3850    ///      "additionalProperties": {
3851    ///        "type": "string"
3852    ///      }
3853    ///    }
3854    ///  }
3855    ///}
3856    /// ```
3857    /// </details>
3858    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3859    pub struct LocalizedString {
3860        ///OpenAPI representation: `HashMap<String, String>` (JSON object).
3861        pub value: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
3862    }
3863    ///`MeApartmentAsset`
3864    ///
3865    /// <details><summary>JSON schema</summary>
3866    ///
3867    /// ```json
3868    ///{
3869    ///  "type": "object",
3870    ///  "required": [
3871    ///    "call_eligible",
3872    ///    "entity_id",
3873    ///    "integration_id",
3874    ///    "org_id",
3875    ///    "receives_calls",
3876    ///    "role"
3877    ///  ],
3878    ///  "properties": {
3879    ///    "apartment_label": {},
3880    ///    "apartment_number": {
3881    ///      "type": [
3882    ///        "integer",
3883    ///        "null"
3884    ///      ],
3885    ///      "format": "int64"
3886    ///    },
3887    ///    "building_name": {},
3888    ///    "call_eligible": {
3889    ///      "description": "True when this user would be a callee for intercom calls (policy + role + receives_calls).",
3890    ///      "type": "boolean"
3891    ///    },
3892    ///    "display_name": {},
3893    ///    "dnd_enabled": {
3894    ///      "description": "True when calls are silenced for this apartment (global DND or per-apartment DND).",
3895    ///      "type": [
3896    ///        "boolean",
3897    ///        "null"
3898    ///      ]
3899    ///    },
3900    ///    "entity_id": {
3901    ///      "type": "string"
3902    ///    },
3903    ///    "floor": {},
3904    ///    "floor_number": {
3905    ///      "type": [
3906    ///        "integer",
3907    ///        "null"
3908    ///      ],
3909    ///      "format": "int64"
3910    ///    },
3911    ///    "integration_id": {
3912    ///      "type": "string"
3913    ///    },
3914    ///    "org_id": {
3915    ///      "type": "string"
3916    ///    },
3917    ///    "receives_calls": {
3918    ///      "type": "boolean"
3919    ///    },
3920    ///    "role": {
3921    ///      "type": "string"
3922    ///    }
3923    ///  }
3924    ///}
3925    /// ```
3926    /// </details>
3927    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3928    pub struct MeApartmentAsset {
3929        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3930        pub apartment_label: ::std::option::Option<::serde_json::Value>,
3931        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3932        pub apartment_number: ::std::option::Option<i64>,
3933        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3934        pub building_name: ::std::option::Option<::serde_json::Value>,
3935        ///True when this user would be a callee for intercom calls (policy + role + receives_calls).
3936        pub call_eligible: bool,
3937        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3938        pub display_name: ::std::option::Option<::serde_json::Value>,
3939        ///True when calls are silenced for this apartment (global DND or per-apartment DND).
3940        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3941        pub dnd_enabled: ::std::option::Option<bool>,
3942        pub entity_id: ::std::string::String,
3943        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3944        pub floor: ::std::option::Option<::serde_json::Value>,
3945        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3946        pub floor_number: ::std::option::Option<i64>,
3947        pub integration_id: ::std::string::String,
3948        pub org_id: ::std::string::String,
3949        pub receives_calls: bool,
3950        pub role: ::std::string::String,
3951    }
3952    ///`MeApartmentsResponse`
3953    ///
3954    /// <details><summary>JSON schema</summary>
3955    ///
3956    /// ```json
3957    ///{
3958    ///  "type": "object",
3959    ///  "required": [
3960    ///    "apartments"
3961    ///  ],
3962    ///  "properties": {
3963    ///    "apartments": {
3964    ///      "type": "array",
3965    ///      "items": {
3966    ///        "$ref": "#/components/schemas/MeApartmentAsset"
3967    ///      }
3968    ///    },
3969    ///    "dnd_global": {
3970    ///      "description": "True when user has global DND enabled (all calls silenced).",
3971    ///      "type": [
3972    ///        "boolean",
3973    ///        "null"
3974    ///      ]
3975    ///    }
3976    ///  }
3977    ///}
3978    /// ```
3979    /// </details>
3980    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3981    pub struct MeApartmentsResponse {
3982        pub apartments: ::std::vec::Vec<MeApartmentAsset>,
3983        ///True when user has global DND enabled (all calls silenced).
3984        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3985        pub dnd_global: ::std::option::Option<bool>,
3986    }
3987    ///`MeInvitationAsset`
3988    ///
3989    /// <details><summary>JSON schema</summary>
3990    ///
3991    /// ```json
3992    ///{
3993    ///  "type": "object",
3994    ///  "required": [
3995    ///    "integration_id",
3996    ///    "invite_link_id",
3997    ///    "org_id",
3998    ///    "portal_ids",
3999    ///    "state",
4000    ///    "uses"
4001    ///  ],
4002    ///  "properties": {
4003    ///    "building_name": {},
4004    ///    "claimed_at": {
4005    ///      "type": [
4006    ///        "string",
4007    ///        "null"
4008    ///      ]
4009    ///    },
4010    ///    "integration_id": {
4011    ///      "type": "string"
4012    ///    },
4013    ///    "invite_link_id": {
4014    ///      "type": "string"
4015    ///    },
4016    ///    "last_used_at": {
4017    ///      "type": [
4018    ///        "string",
4019    ///        "null"
4020    ///      ]
4021    ///    },
4022    ///    "max_uses": {
4023    ///      "type": [
4024    ///        "integer",
4025    ///        "null"
4026    ///      ],
4027    ///      "format": "int32"
4028    ///    },
4029    ///    "org_id": {
4030    ///      "type": "string"
4031    ///    },
4032    ///    "portal_ids": {
4033    ///      "description": "Portal IDs the invite grants (for display: \"Scan portal QR to open\").",
4034    ///      "type": "array",
4035    ///      "items": {
4036    ///        "type": "string"
4037    ///      }
4038    ///    },
4039    ///    "state": {
4040    ///      "type": "string"
4041    ///    },
4042    ///    "uses": {
4043    ///      "description": "Number of times the invite has been used.",
4044    ///      "type": "integer",
4045    ///      "format": "int32"
4046    ///    },
4047    ///    "valid_from": {
4048    ///      "type": [
4049    ///        "string",
4050    ///        "null"
4051    ///      ]
4052    ///    },
4053    ///    "valid_to": {
4054    ///      "type": [
4055    ///        "string",
4056    ///        "null"
4057    ///      ]
4058    ///    }
4059    ///  }
4060    ///}
4061    /// ```
4062    /// </details>
4063    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4064    pub struct MeInvitationAsset {
4065        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4066        pub building_name: ::std::option::Option<::serde_json::Value>,
4067        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4068        pub claimed_at: ::std::option::Option<::std::string::String>,
4069        pub integration_id: ::std::string::String,
4070        pub invite_link_id: ::std::string::String,
4071        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4072        pub last_used_at: ::std::option::Option<::std::string::String>,
4073        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4074        pub max_uses: ::std::option::Option<i32>,
4075        pub org_id: ::std::string::String,
4076        ///Portal IDs the invite grants (for display: "Scan portal QR to open").
4077        pub portal_ids: ::std::vec::Vec<::std::string::String>,
4078        pub state: ::std::string::String,
4079        ///Number of times the invite has been used.
4080        pub uses: i32,
4081        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4082        pub valid_from: ::std::option::Option<::std::string::String>,
4083        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4084        pub valid_to: ::std::option::Option<::std::string::String>,
4085    }
4086    ///`MeInvitationsResponse`
4087    ///
4088    /// <details><summary>JSON schema</summary>
4089    ///
4090    /// ```json
4091    ///{
4092    ///  "type": "object",
4093    ///  "required": [
4094    ///    "invitations"
4095    ///  ],
4096    ///  "properties": {
4097    ///    "invitations": {
4098    ///      "type": "array",
4099    ///      "items": {
4100    ///        "$ref": "#/components/schemas/MeInvitationAsset"
4101    ///      }
4102    ///    }
4103    ///  }
4104    ///}
4105    /// ```
4106    /// </details>
4107    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4108    pub struct MeInvitationsResponse {
4109        pub invitations: ::std::vec::Vec<MeInvitationAsset>,
4110    }
4111    ///`MePushSubscriptionStatusResponse`
4112    ///
4113    /// <details><summary>JSON schema</summary>
4114    ///
4115    /// ```json
4116    ///{
4117    ///  "type": "object",
4118    ///  "required": [
4119    ///    "has_subscription",
4120    ///    "push_configured"
4121    ///  ],
4122    ///  "properties": {
4123    ///    "has_subscription": {
4124    ///      "type": "boolean"
4125    ///    },
4126    ///    "push_configured": {
4127    ///      "description": "True when VAPID is configured; false means call notifications cannot be sent.",
4128    ///      "type": "boolean"
4129    ///    }
4130    ///  }
4131    ///}
4132    /// ```
4133    /// </details>
4134    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4135    pub struct MePushSubscriptionStatusResponse {
4136        pub has_subscription: bool,
4137        ///True when VAPID is configured; false means call notifications cannot be sent.
4138        pub push_configured: bool,
4139    }
4140    ///`MePushVapidPublicKeyResponse`
4141    ///
4142    /// <details><summary>JSON schema</summary>
4143    ///
4144    /// ```json
4145    ///{
4146    ///  "type": "object",
4147    ///  "required": [
4148    ///    "public_key"
4149    ///  ],
4150    ///  "properties": {
4151    ///    "public_key": {
4152    ///      "type": "string"
4153    ///    }
4154    ///  }
4155    ///}
4156    /// ```
4157    /// </details>
4158    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4159    pub struct MePushVapidPublicKeyResponse {
4160        pub public_key: ::std::string::String,
4161    }
4162    /**Options for list and other multi-resource operations.
4163    Contains single-resource options in a flat manner plus `only_deleted` and pagination.*/
4164    ///
4165    /// <details><summary>JSON schema</summary>
4166    ///
4167    /// ```json
4168    ///{
4169    ///  "description": "Options for list and other multi-resource operations.\nContains single-resource options in a flat manner plus `only_deleted` and pagination.",
4170    ///  "type": "object",
4171    ///  "required": [
4172    ///    "limit",
4173    ///    "offset",
4174    ///    "only_deleted",
4175    ///    "single"
4176    ///  ],
4177    ///  "properties": {
4178    ///    "limit": {
4179    ///      "description": "Pagination: max items to return. Default from config when not specified.",
4180    ///      "type": "integer",
4181    ///      "format": "int32",
4182    ///      "minimum": 0.0
4183    ///    },
4184    ///    "offset": {
4185    ///      "description": "Pagination: items to skip. Default 0 when not specified.",
4186    ///      "type": "integer",
4187    ///      "format": "int32",
4188    ///      "minimum": 0.0
4189    ///    },
4190    ///    "only_deleted": {
4191    ///      "description": "If true, return *only* soft-deleted items.\n\nNote: This implies `include_deleted=true` at the API boundary, but repository/storage\nimplementations should treat this as a separate filter.",
4192    ///      "type": "boolean"
4193    ///    },
4194    ///    "single": {
4195    ///      "$ref": "#/components/schemas/SingleResourceOutputOptions"
4196    ///    }
4197    ///  }
4198    ///}
4199    /// ```
4200    /// </details>
4201    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4202    pub struct MultiResourceOutputOptions {
4203        ///Pagination: max items to return. Default from config when not specified.
4204        pub limit: i32,
4205        ///Pagination: items to skip. Default 0 when not specified.
4206        pub offset: i32,
4207        /**If true, return *only* soft-deleted items.
4208
4209        Note: This implies `include_deleted=true` at the API boundary, but repository/storage
4210        implementations should treat this as a separate filter.*/
4211        pub only_deleted: bool,
4212        pub single: SingleResourceOutputOptions,
4213    }
4214    ///`MultiResourceOutputOptionsQuery`
4215    ///
4216    /// <details><summary>JSON schema</summary>
4217    ///
4218    /// ```json
4219    ///{
4220    ///  "type": "object",
4221    ///  "required": [
4222    ///    "include_deleted",
4223    ///    "include_metadata",
4224    ///    "only_deleted"
4225    ///  ],
4226    ///  "properties": {
4227    ///    "include_deleted": {
4228    ///      "type": "boolean"
4229    ///    },
4230    ///    "include_metadata": {
4231    ///      "type": "boolean"
4232    ///    },
4233    ///    "only_deleted": {
4234    ///      "type": "boolean"
4235    ///    }
4236    ///  }
4237    ///}
4238    /// ```
4239    /// </details>
4240    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4241    pub struct MultiResourceOutputOptionsQuery {
4242        pub include_deleted: bool,
4243        pub include_metadata: bool,
4244        pub only_deleted: bool,
4245    }
4246    ///`NotifyPortalMessageBody`
4247    ///
4248    /// <details><summary>JSON schema</summary>
4249    ///
4250    /// ```json
4251    ///{
4252    ///  "type": "object",
4253    ///  "required": [
4254    ///    "text"
4255    ///  ],
4256    ///  "properties": {
4257    ///    "text": {
4258    ///      "type": "string"
4259    ///    }
4260    ///  }
4261    ///}
4262    /// ```
4263    /// </details>
4264    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4265    pub struct NotifyPortalMessageBody {
4266        pub text: ::std::string::String,
4267    }
4268    /**Permissions the current user has in this org (for UI: gray out / tooltips).
4269    Returns a list of permission keys (e.g. "users:create", "users:list") that the user is granted.*/
4270    ///
4271    /// <details><summary>JSON schema</summary>
4272    ///
4273    /// ```json
4274    ///{
4275    ///  "description": "Permissions the current user has in this org (for UI: gray out / tooltips).\nReturns a list of permission keys (e.g. \"users:create\", \"users:list\") that the user is granted.",
4276    ///  "type": "object",
4277    ///  "required": [
4278    ///    "permissions"
4279    ///  ],
4280    ///  "properties": {
4281    ///    "permissions": {
4282    ///      "type": "array",
4283    ///      "items": {
4284    ///        "type": "string"
4285    ///      }
4286    ///    }
4287    ///  }
4288    ///}
4289    /// ```
4290    /// </details>
4291    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4292    pub struct OrgPermissionsResponse {
4293        pub permissions: ::std::vec::Vec<::std::string::String>,
4294    }
4295    ///An organization (tenant) with optional parent for hierarchy.
4296    ///
4297    /// <details><summary>JSON schema</summary>
4298    ///
4299    /// ```json
4300    ///{
4301    ///  "description": "An organization (tenant) with optional parent for hierarchy.",
4302    ///  "type": "object",
4303    ///  "required": [
4304    ///    "id",
4305    ///    "name",
4306    ///    "user_roles"
4307    ///  ],
4308    ///  "properties": {
4309    ///    "description": {
4310    ///      "description": "Optional description.",
4311    ///      "type": [
4312    ///        "string",
4313    ///        "null"
4314    ///      ]
4315    ///    },
4316    ///    "id": {
4317    ///      "description": "Unique identifier (ULID).",
4318    ///      "type": "string"
4319    ///    },
4320    ///    "metadata": {
4321    ///      "oneOf": [
4322    ///        {
4323    ///          "type": "null"
4324    ///        },
4325    ///        {
4326    ///          "oneOf": [
4327    ///            {
4328    ///              "$ref": "#/components/schemas/HashMap"
4329    ///            }
4330    ///          ]
4331    ///        }
4332    ///      ]
4333    ///    },
4334    ///    "name": {
4335    ///      "$ref": "#/components/schemas/LocalizedString"
4336    ///    },
4337    ///    "parent_id": {
4338    ///      "description": "Parent organization ID for hierarchy.",
4339    ///      "type": [
4340    ///        "string",
4341    ///        "null"
4342    ///      ]
4343    ///    },
4344    ///    "user_roles": {
4345    ///      "description": "User ID to roles mapping for this org (keys are org IDs as strings).",
4346    ///      "type": "object",
4347    ///      "additionalProperties": {
4348    ///        "type": "array",
4349    ///        "items": {
4350    ///          "$ref": "#/components/schemas/Role"
4351    ///        }
4352    ///      }
4353    ///    }
4354    ///  }
4355    ///}
4356    /// ```
4357    /// </details>
4358    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4359    pub struct Organization {
4360        ///Optional description.
4361        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4362        pub description: ::std::option::Option<::std::string::String>,
4363        ///Unique identifier (ULID).
4364        pub id: ::std::string::String,
4365        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4366        pub metadata: ::std::option::Option<HashMap>,
4367        pub name: LocalizedString,
4368        ///Parent organization ID for hierarchy.
4369        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4370        pub parent_id: ::std::option::Option<::std::string::String>,
4371        ///User ID to roles mapping for this org (keys are org IDs as strings).
4372        pub user_roles: ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<Role>>,
4373    }
4374    ///`OrganizationResponse`
4375    ///
4376    /// <details><summary>JSON schema</summary>
4377    ///
4378    /// ```json
4379    ///{
4380    ///  "allOf": [
4381    ///    {
4382    ///      "$ref": "#/components/schemas/Organization"
4383    ///    },
4384    ///    {
4385    ///      "oneOf": [
4386    ///        {
4387    ///          "type": "null"
4388    ///        },
4389    ///        {
4390    ///          "oneOf": [
4391    ///            {
4392    ///              "$ref": "#/components/schemas/StorageFeatures"
4393    ///            }
4394    ///          ]
4395    ///        }
4396    ///      ]
4397    ///    },
4398    ///    {
4399    ///      "type": "object",
4400    ///      "properties": {
4401    ///        "parent_name": {
4402    ///          "oneOf": [
4403    ///            {
4404    ///              "type": "null"
4405    ///            },
4406    ///            {
4407    ///              "oneOf": [
4408    ///                {
4409    ///                  "$ref": "#/components/schemas/LocalizedString"
4410    ///                }
4411    ///              ]
4412    ///            }
4413    ///          ]
4414    ///        }
4415    ///      }
4416    ///    }
4417    ///  ]
4418    ///}
4419    /// ```
4420    /// </details>
4421    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4422    pub struct OrganizationResponse {
4423        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4424        pub cache_hit: ::std::option::Option<bool>,
4425        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4426        pub cache_ttl: ::std::option::Option<i64>,
4427        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4428        pub created_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
4429        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4430        pub deleted_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
4431        ///Optional description.
4432        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4433        pub description: ::std::option::Option<::std::string::String>,
4434        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4435        pub hard_delete_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
4436        ///Unique identifier (ULID).
4437        pub id: ::std::string::String,
4438        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4439        pub metadata: ::std::option::Option<HashMap>,
4440        pub name: LocalizedString,
4441        ///Parent organization ID for hierarchy.
4442        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4443        pub parent_id: ::std::option::Option<::std::string::String>,
4444        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4445        pub parent_name: ::std::option::Option<LocalizedString>,
4446        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4447        pub purge_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
4448        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4449        pub updated_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
4450        ///User ID to roles mapping for this org (keys are org IDs as strings).
4451        pub user_roles: ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<Role>>,
4452    }
4453    ///Paginated response body for list endpoints.
4454    ///
4455    /// <details><summary>JSON schema</summary>
4456    ///
4457    /// ```json
4458    ///{
4459    ///  "description": "Paginated response body for list endpoints.",
4460    ///  "type": "object",
4461    ///  "required": [
4462    ///    "items",
4463    ///    "total"
4464    ///  ],
4465    ///  "properties": {
4466    ///    "items": {
4467    ///      "type": "array",
4468    ///      "items": {
4469    ///        "$ref": "#/components/schemas/UserResponse"
4470    ///      }
4471    ///    },
4472    ///    "total": {
4473    ///      "type": "integer",
4474    ///      "format": "int64",
4475    ///      "minimum": 0.0
4476    ///    }
4477    ///  }
4478    ///}
4479    /// ```
4480    /// </details>
4481    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4482    pub struct PaginatedResponse {
4483        pub items: ::std::vec::Vec<UserResponse>,
4484        pub total: i64,
4485    }
4486    ///Paginated response body for list endpoints.
4487    ///
4488    /// <details><summary>JSON schema</summary>
4489    ///
4490    /// ```json
4491    ///{
4492    ///  "description": "Paginated response body for list endpoints.",
4493    ///  "type": "object",
4494    ///  "required": [
4495    ///    "items",
4496    ///    "total"
4497    ///  ],
4498    ///  "properties": {
4499    ///    "items": {
4500    ///      "type": "array",
4501    ///      "items": {
4502    ///        "allOf": [
4503    ///          {
4504    ///            "$ref": "#/components/schemas/Entity"
4505    ///          },
4506    ///          {
4507    ///            "oneOf": [
4508    ///              {
4509    ///                "type": "null"
4510    ///              },
4511    ///              {
4512    ///                "oneOf": [
4513    ///                  {
4514    ///                    "$ref": "#/components/schemas/StorageFeatures"
4515    ///                  }
4516    ///                ]
4517    ///              }
4518    ///            ]
4519    ///          },
4520    ///          {
4521    ///            "type": "object",
4522    ///            "properties": {
4523    ///              "entity_metadata": {
4524    ///                "oneOf": [
4525    ///                  {
4526    ///                    "type": "null"
4527    ///                  },
4528    ///                  {
4529    ///                    "oneOf": [
4530    ///                      {
4531    ///                        "$ref": "#/components/schemas/HashMap"
4532    ///                      }
4533    ///                    ]
4534    ///                  }
4535    ///                ]
4536    ///              },
4537    ///              "state": {}
4538    ///            }
4539    ///          }
4540    ///        ]
4541    ///      }
4542    ///    },
4543    ///    "total": {
4544    ///      "type": "integer",
4545    ///      "format": "int64",
4546    ///      "minimum": 0.0
4547    ///    }
4548    ///  }
4549    ///}
4550    /// ```
4551    /// </details>
4552    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4553    pub struct PaginatedResponseEntityResponse {
4554        pub items: ::std::vec::Vec<PaginatedResponseEntityResponseItemsItem>,
4555        pub total: i64,
4556    }
4557    ///`PaginatedResponseEntityResponseItemsItem`
4558    ///
4559    /// <details><summary>JSON schema</summary>
4560    ///
4561    /// ```json
4562    ///{
4563    ///  "allOf": [
4564    ///    {
4565    ///      "$ref": "#/components/schemas/Entity"
4566    ///    },
4567    ///    {
4568    ///      "oneOf": [
4569    ///        {
4570    ///          "type": "null"
4571    ///        },
4572    ///        {
4573    ///          "oneOf": [
4574    ///            {
4575    ///              "$ref": "#/components/schemas/StorageFeatures"
4576    ///            }
4577    ///          ]
4578    ///        }
4579    ///      ]
4580    ///    },
4581    ///    {
4582    ///      "type": "object",
4583    ///      "properties": {
4584    ///        "entity_metadata": {
4585    ///          "oneOf": [
4586    ///            {
4587    ///              "type": "null"
4588    ///            },
4589    ///            {
4590    ///              "oneOf": [
4591    ///                {
4592    ///                  "$ref": "#/components/schemas/HashMap"
4593    ///                }
4594    ///              ]
4595    ///            }
4596    ///          ]
4597    ///        },
4598    ///        "state": {}
4599    ///      }
4600    ///    }
4601    ///  ]
4602    ///}
4603    /// ```
4604    /// </details>
4605    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4606    pub struct PaginatedResponseEntityResponseItemsItem {
4607        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4608        pub cache_hit: ::std::option::Option<bool>,
4609        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4610        pub cache_ttl: ::std::option::Option<i64>,
4611        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4612        pub created_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
4613        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4614        pub deleted_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
4615        ///Parent device ID.
4616        pub device_id: ::std::string::String,
4617        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4618        pub entity_metadata: ::std::option::Option<HashMap>,
4619        pub entity_type: EntityType,
4620        ///External ID from the integration.
4621        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4622        pub external_id: ::std::option::Option<::std::string::String>,
4623        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4624        pub hard_delete_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
4625        ///Unique identifier (ULID).
4626        pub id: ::std::string::String,
4627        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4628        pub metadata: ::std::option::Option<HashMap>,
4629        ///Optional friendly name for the entity.
4630        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4631        pub name: ::std::option::Option<::std::string::String>,
4632        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4633        pub purge_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
4634        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4635        pub state: ::std::option::Option<::serde_json::Value>,
4636        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4637        pub updated_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
4638        ///Optional zone this entity belongs to.
4639        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4640        pub zone_id: ::std::option::Option<::std::string::String>,
4641    }
4642    /**Pagination query parameters. Flatten into list-endpoint query structs.
4643    When not provided, defaults to first page (limit from config, offset=0).*/
4644    ///
4645    /// <details><summary>JSON schema</summary>
4646    ///
4647    /// ```json
4648    ///{
4649    ///  "description": "Pagination query parameters. Flatten into list-endpoint query structs.\nWhen not provided, defaults to first page (limit from config, offset=0).",
4650    ///  "type": "object",
4651    ///  "properties": {
4652    ///    "limit": {
4653    ///      "description": "Number of items per page. Default from config, max 200.",
4654    ///      "type": "integer",
4655    ///      "format": "int32",
4656    ///      "minimum": 0.0
4657    ///    },
4658    ///    "offset": {
4659    ///      "description": "Number of items to skip. Default 0.",
4660    ///      "type": "integer",
4661    ///      "format": "int32",
4662    ///      "minimum": 0.0
4663    ///    }
4664    ///  }
4665    ///}
4666    /// ```
4667    /// </details>
4668    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4669    pub struct PaginationQuery {
4670        ///Number of items per page. Default from config, max 200.
4671        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4672        pub limit: ::std::option::Option<i32>,
4673        ///Number of items to skip. Default 0.
4674        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4675        pub offset: ::std::option::Option<i32>,
4676    }
4677    impl ::std::default::Default for PaginationQuery {
4678        fn default() -> Self {
4679            Self {
4680                limit: Default::default(),
4681                offset: Default::default(),
4682            }
4683        }
4684    }
4685    ///Shallow-merge into existing `entity_metadata` (PATCH). Does not replace the whole map.
4686    ///
4687    /// <details><summary>JSON schema</summary>
4688    ///
4689    /// ```json
4690    ///{
4691    ///  "description": "Shallow-merge into existing `entity_metadata` (PATCH). Does not replace the whole map.",
4692    ///  "type": "object",
4693    ///  "required": [
4694    ///    "metadata"
4695    ///  ],
4696    ///  "properties": {
4697    ///    "metadata": {
4698    ///      "description": "Keys to merge into persisted metadata. Omitted keys are left unchanged.\nJSON `null` removes a key (e.g. clear `floor` when setting `floor_number`).",
4699    ///      "type": "object",
4700    ///      "additionalProperties": {}
4701    ///    }
4702    ///  }
4703    ///}
4704    /// ```
4705    /// </details>
4706    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4707    pub struct PatchEntityRequest {
4708        /**Keys to merge into persisted metadata. Omitted keys are left unchanged.
4709        JSON `null` removes a key (e.g. clear `floor` when setting `floor_number`).*/
4710        pub metadata: ::serde_json::Map<::std::string::String, ::serde_json::Value>,
4711    }
4712    ///`PeerJsConfig`
4713    ///
4714    /// <details><summary>JSON schema</summary>
4715    ///
4716    /// ```json
4717    ///{
4718    ///  "type": "object",
4719    ///  "required": [
4720    ///    "host",
4721    ///    "path",
4722    ///    "port",
4723    ///    "secure"
4724    ///  ],
4725    ///  "properties": {
4726    ///    "host": {
4727    ///      "type": "string"
4728    ///    },
4729    ///    "path": {
4730    ///      "type": "string"
4731    ///    },
4732    ///    "port": {
4733    ///      "type": "integer",
4734    ///      "format": "int32",
4735    ///      "minimum": 0.0
4736    ///    },
4737    ///    "secure": {
4738    ///      "type": "boolean"
4739    ///    }
4740    ///  }
4741    ///}
4742    /// ```
4743    /// </details>
4744    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4745    pub struct PeerJsConfig {
4746        pub host: ::std::string::String,
4747        pub path: ::std::string::String,
4748        pub port: i32,
4749        pub secure: bool,
4750    }
4751    ///`PlanQuotaResponse`
4752    ///
4753    /// <details><summary>JSON schema</summary>
4754    ///
4755    /// ```json
4756    ///{
4757    ///  "type": "object",
4758    ///  "required": [
4759    ///    "period",
4760    ///    "quota_key"
4761    ///  ],
4762    ///  "properties": {
4763    ///    "limit_value": {
4764    ///      "type": [
4765    ///        "integer",
4766    ///        "null"
4767    ///      ],
4768    ///      "format": "int64"
4769    ///    },
4770    ///    "period": {
4771    ///      "type": "string"
4772    ///    },
4773    ///    "quota_key": {
4774    ///      "type": "string"
4775    ///    }
4776    ///  }
4777    ///}
4778    /// ```
4779    /// </details>
4780    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4781    pub struct PlanQuotaResponse {
4782        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4783        pub limit_value: ::std::option::Option<i64>,
4784        pub period: ::std::string::String,
4785        pub quota_key: ::std::string::String,
4786    }
4787    ///`PlanResponse`
4788    ///
4789    /// <details><summary>JSON schema</summary>
4790    ///
4791    /// ```json
4792    ///{
4793    ///  "type": "object",
4794    ///  "required": [
4795    ///    "is_default_for_personal",
4796    ///    "is_published",
4797    ///    "name",
4798    ///    "quotas",
4799    ///    "slug",
4800    ///    "sort_order"
4801    ///  ],
4802    ///  "properties": {
4803    ///    "description": {},
4804    ///    "is_default_for_personal": {
4805    ///      "type": "boolean"
4806    ///    },
4807    ///    "is_published": {
4808    ///      "type": "boolean"
4809    ///    },
4810    ///    "name": {},
4811    ///    "quotas": {
4812    ///      "type": "array",
4813    ///      "items": {
4814    ///        "$ref": "#/components/schemas/PlanQuotaResponse"
4815    ///      }
4816    ///    },
4817    ///    "slug": {
4818    ///      "type": "string"
4819    ///    },
4820    ///    "sort_order": {
4821    ///      "type": "integer",
4822    ///      "format": "int32"
4823    ///    }
4824    ///  }
4825    ///}
4826    /// ```
4827    /// </details>
4828    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4829    pub struct PlanResponse {
4830        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4831        pub description: ::std::option::Option<::serde_json::Value>,
4832        pub is_default_for_personal: bool,
4833        pub is_published: bool,
4834        pub name: ::serde_json::Value,
4835        pub quotas: ::std::vec::Vec<PlanQuotaResponse>,
4836        pub slug: ::std::string::String,
4837        pub sort_order: i32,
4838    }
4839    ///`PlansResponse`
4840    ///
4841    /// <details><summary>JSON schema</summary>
4842    ///
4843    /// ```json
4844    ///{
4845    ///  "type": "object",
4846    ///  "required": [
4847    ///    "plans"
4848    ///  ],
4849    ///  "properties": {
4850    ///    "plans": {
4851    ///      "type": "array",
4852    ///      "items": {
4853    ///        "$ref": "#/components/schemas/PlanResponse"
4854    ///      }
4855    ///    }
4856    ///  }
4857    ///}
4858    /// ```
4859    /// </details>
4860    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4861    pub struct PlansResponse {
4862        pub plans: ::std::vec::Vec<PlanResponse>,
4863    }
4864    ///`PortalRequest`
4865    ///
4866    /// <details><summary>JSON schema</summary>
4867    ///
4868    /// ```json
4869    ///{
4870    ///  "type": "object",
4871    ///  "required": [
4872    ///    "return_url"
4873    ///  ],
4874    ///  "properties": {
4875    ///    "return_url": {
4876    ///      "type": "string"
4877    ///    }
4878    ///  }
4879    ///}
4880    /// ```
4881    /// </details>
4882    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4883    pub struct PortalRequest {
4884        pub return_url: ::std::string::String,
4885    }
4886    ///`PortalResponse`
4887    ///
4888    /// <details><summary>JSON schema</summary>
4889    ///
4890    /// ```json
4891    ///{
4892    ///  "type": "object",
4893    ///  "required": [
4894    ///    "url"
4895    ///  ],
4896    ///  "properties": {
4897    ///    "url": {
4898    ///      "type": "string"
4899    ///    }
4900    ///  }
4901    ///}
4902    /// ```
4903    /// </details>
4904    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4905    pub struct PortalResponse {
4906        pub url: ::std::string::String,
4907    }
4908    ///`PostMePushSubscriptionPayload`
4909    ///
4910    /// <details><summary>JSON schema</summary>
4911    ///
4912    /// ```json
4913    ///{
4914    ///  "type": "object",
4915    ///  "required": [
4916    ///    "auth",
4917    ///    "endpoint",
4918    ///    "p256dh"
4919    ///  ],
4920    ///  "properties": {
4921    ///    "auth": {
4922    ///      "type": "string"
4923    ///    },
4924    ///    "endpoint": {
4925    ///      "type": "string"
4926    ///    },
4927    ///    "p256dh": {
4928    ///      "type": "string"
4929    ///    }
4930    ///  }
4931    ///}
4932    /// ```
4933    /// </details>
4934    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4935    pub struct PostMePushSubscriptionPayload {
4936        pub auth: ::std::string::String,
4937        pub endpoint: ::std::string::String,
4938        pub p256dh: ::std::string::String,
4939    }
4940    ///Integration provider type (e.g. homeassistant, knx, mqtt).
4941    ///
4942    /// <details><summary>JSON schema</summary>
4943    ///
4944    /// ```json
4945    ///{
4946    ///  "description": "Integration provider type (e.g. homeassistant, knx, mqtt).",
4947    ///  "type": "string",
4948    ///  "enum": [
4949    ///    "go2rtc",
4950    ///    "home_assistant",
4951    ///    "knx",
4952    ///    "mqtt",
4953    ///    "palgate_cloud",
4954    ///    "shelly_cloud",
4955    ///    "shelly_websocket",
4956    ///    "virtual_budget",
4957    ///    "virtual_access",
4958    ///    "virtual_demo",
4959    ///    "waveshare"
4960    ///  ]
4961    ///}
4962    /// ```
4963    /// </details>
4964    #[derive(
4965        ::serde::Deserialize,
4966        ::serde::Serialize,
4967        Clone,
4968        Copy,
4969        Debug,
4970        Eq,
4971        Hash,
4972        Ord,
4973        PartialEq,
4974        PartialOrd,
4975    )]
4976    pub enum ProviderType {
4977        #[serde(rename = "go2rtc")]
4978        Go2rtc,
4979        #[serde(rename = "home_assistant")]
4980        HomeAssistant,
4981        #[serde(rename = "knx")]
4982        Knx,
4983        #[serde(rename = "mqtt")]
4984        Mqtt,
4985        #[serde(rename = "palgate_cloud")]
4986        PalgateCloud,
4987        #[serde(rename = "shelly_cloud")]
4988        ShellyCloud,
4989        #[serde(rename = "shelly_websocket")]
4990        ShellyWebsocket,
4991        #[serde(rename = "virtual_budget")]
4992        VirtualBudget,
4993        #[serde(rename = "virtual_access")]
4994        VirtualAccess,
4995        #[serde(rename = "virtual_demo")]
4996        VirtualDemo,
4997        #[serde(rename = "waveshare")]
4998        Waveshare,
4999    }
5000    impl ::std::fmt::Display for ProviderType {
5001        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5002            match *self {
5003                Self::Go2rtc => f.write_str("go2rtc"),
5004                Self::HomeAssistant => f.write_str("home_assistant"),
5005                Self::Knx => f.write_str("knx"),
5006                Self::Mqtt => f.write_str("mqtt"),
5007                Self::PalgateCloud => f.write_str("palgate_cloud"),
5008                Self::ShellyCloud => f.write_str("shelly_cloud"),
5009                Self::ShellyWebsocket => f.write_str("shelly_websocket"),
5010                Self::VirtualBudget => f.write_str("virtual_budget"),
5011                Self::VirtualAccess => f.write_str("virtual_access"),
5012                Self::VirtualDemo => f.write_str("virtual_demo"),
5013                Self::Waveshare => f.write_str("waveshare"),
5014            }
5015        }
5016    }
5017    impl ::std::str::FromStr for ProviderType {
5018        type Err = self::error::ConversionError;
5019        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5020            match value {
5021                "go2rtc" => Ok(Self::Go2rtc),
5022                "home_assistant" => Ok(Self::HomeAssistant),
5023                "knx" => Ok(Self::Knx),
5024                "mqtt" => Ok(Self::Mqtt),
5025                "palgate_cloud" => Ok(Self::PalgateCloud),
5026                "shelly_cloud" => Ok(Self::ShellyCloud),
5027                "shelly_websocket" => Ok(Self::ShellyWebsocket),
5028                "virtual_budget" => Ok(Self::VirtualBudget),
5029                "virtual_access" => Ok(Self::VirtualAccess),
5030                "virtual_demo" => Ok(Self::VirtualDemo),
5031                "waveshare" => Ok(Self::Waveshare),
5032                _ => Err("invalid value".into()),
5033            }
5034        }
5035    }
5036    impl ::std::convert::TryFrom<&str> for ProviderType {
5037        type Error = self::error::ConversionError;
5038        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5039            value.parse()
5040        }
5041    }
5042    impl ::std::convert::TryFrom<&::std::string::String> for ProviderType {
5043        type Error = self::error::ConversionError;
5044        fn try_from(
5045            value: &::std::string::String,
5046        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5047            value.parse()
5048        }
5049    }
5050    impl ::std::convert::TryFrom<::std::string::String> for ProviderType {
5051        type Error = self::error::ConversionError;
5052        fn try_from(
5053            value: ::std::string::String,
5054        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5055            value.parse()
5056        }
5057    }
5058    ///`PublicInviteExecuteRequest`
5059    ///
5060    /// <details><summary>JSON schema</summary>
5061    ///
5062    /// ```json
5063    ///{
5064    ///  "type": "object",
5065    ///  "required": [
5066    ///    "grant_id"
5067    ///  ],
5068    ///  "properties": {
5069    ///    "grant_id": {
5070    ///      "type": "string"
5071    ///    }
5072    ///  }
5073    ///}
5074    /// ```
5075    /// </details>
5076    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5077    pub struct PublicInviteExecuteRequest {
5078        pub grant_id: ::std::string::String,
5079    }
5080    ///`PublicInviteExecuteResponse`
5081    ///
5082    /// <details><summary>JSON schema</summary>
5083    ///
5084    /// ```json
5085    ///{
5086    ///  "type": "object",
5087    ///  "required": [
5088    ///    "ok"
5089    ///  ],
5090    ///  "properties": {
5091    ///    "door_auto_close_duration": {
5092    ///      "type": [
5093    ///        "integer",
5094    ///        "null"
5095    ///      ],
5096    ///      "format": "int64",
5097    ///      "minimum": 0.0
5098    ///    },
5099    ///    "lights_auto_off_duration": {
5100    ///      "oneOf": [
5101    ///        {
5102    ///          "type": "null"
5103    ///        },
5104    ///        {
5105    ///          "oneOf": [
5106    ///            {
5107    ///              "$ref": "#/components/schemas/LightsAutoOffDuration"
5108    ///            }
5109    ///          ]
5110    ///        }
5111    ///      ]
5112    ///    },
5113    ///    "message": {
5114    ///      "type": [
5115    ///        "string",
5116    ///        "null"
5117    ///      ]
5118    ///    },
5119    ///    "ok": {
5120    ///      "type": "boolean"
5121    ///    }
5122    ///  }
5123    ///}
5124    /// ```
5125    /// </details>
5126    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5127    pub struct PublicInviteExecuteResponse {
5128        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5129        pub door_auto_close_duration: ::std::option::Option<i64>,
5130        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5131        pub lights_auto_off_duration: ::std::option::Option<LightsAutoOffDuration>,
5132        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5133        pub message: ::std::option::Option<::std::string::String>,
5134        pub ok: bool,
5135    }
5136    ///`PublicInviteGrant`
5137    ///
5138    /// <details><summary>JSON schema</summary>
5139    ///
5140    /// ```json
5141    ///{
5142    ///  "oneOf": [
5143    ///    {
5144    ///      "type": "object",
5145    ///      "required": [
5146    ///        "has_lights",
5147    ///        "id",
5148    ///        "kind",
5149    ///        "public_portal_id"
5150    ///      ],
5151    ///      "properties": {
5152    ///        "door_image_url": {
5153    ///          "description": "Presigned URL for door image (loaded asynchronously as card background).",
5154    ///          "type": [
5155    ///            "string",
5156    ///            "null"
5157    ///          ]
5158    ///        },
5159    ///        "has_lights": {
5160    ///          "description": "Whether the portal has light devices configured (controls light button visibility).",
5161    ///          "type": "boolean"
5162    ///        },
5163    ///        "id": {
5164    ///          "type": "string"
5165    ///        },
5166    ///        "kind": {
5167    ///          "type": "string",
5168    ///          "enum": [
5169    ///            "portal_open"
5170    ///          ]
5171    ///        },
5172    ///        "label": {
5173    ///          "description": "Localized portal name: string or object { \"en\": \"...\", \"he\": \"...\" }."
5174    ///        },
5175    ///        "public_portal_id": {
5176    ///          "type": "string"
5177    ///        }
5178    ///      }
5179    ///    },
5180    ///    {
5181    ///      "type": "object",
5182    ///      "required": [
5183    ///        "action_id",
5184    ///        "entity_id",
5185    ///        "id",
5186    ///        "kind"
5187    ///      ],
5188    ///      "properties": {
5189    ///        "action_id": {
5190    ///          "type": "string"
5191    ///        },
5192    ///        "entity_id": {
5193    ///          "type": "string"
5194    ///        },
5195    ///        "id": {
5196    ///          "type": "string"
5197    ///        },
5198    ///        "kind": {
5199    ///          "type": "string",
5200    ///          "enum": [
5201    ///            "entity_action"
5202    ///          ]
5203    ///        },
5204    ///        "label": {},
5205    ///        "payload": {}
5206    ///      }
5207    ///    }
5208    ///  ]
5209    ///}
5210    /// ```
5211    /// </details>
5212    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5213    #[serde(tag = "kind")]
5214    pub enum PublicInviteGrant {
5215        #[serde(rename = "portal_open")]
5216        PortalOpen {
5217            ///Presigned URL for door image (loaded asynchronously as card background).
5218            #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5219            door_image_url: ::std::option::Option<::std::string::String>,
5220            ///Whether the portal has light devices configured (controls light button visibility).
5221            has_lights: bool,
5222            id: ::std::string::String,
5223            ///Localized portal name: string or object { "en": "...", "he": "..." }.
5224            #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5225            label: ::std::option::Option<::serde_json::Value>,
5226            public_portal_id: ::std::string::String,
5227        },
5228        #[serde(rename = "entity_action")]
5229        EntityAction {
5230            action_id: ::std::string::String,
5231            entity_id: ::std::string::String,
5232            id: ::std::string::String,
5233            #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5234            label: ::std::option::Option<::serde_json::Value>,
5235            #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5236            payload: ::std::option::Option<::serde_json::Value>,
5237        },
5238    }
5239    ///`PublicInviteResponse`
5240    ///
5241    /// <details><summary>JSON schema</summary>
5242    ///
5243    /// ```json
5244    ///{
5245    ///  "type": "object",
5246    ///  "required": [
5247    ///    "grants",
5248    ///    "invite_token",
5249    ///    "state"
5250    ///  ],
5251    ///  "properties": {
5252    ///    "already_claimed": {
5253    ///      "type": [
5254    ///        "boolean",
5255    ///        "null"
5256    ///      ]
5257    ///    },
5258    ///    "branding": {},
5259    ///    "building": {
5260    ///      "description": "Building (integration) summary: `name` (LocalizedString) and optional `location` fields\nfrom integration config (`address`, `city`, `country`)."
5261    ///    },
5262    ///    "grants": {
5263    ///      "type": "array",
5264    ///      "items": {
5265    ///        "$ref": "#/components/schemas/PublicInviteGrant"
5266    ///      }
5267    ///    },
5268    ///    "invite_token": {
5269    ///      "type": "string"
5270    ///    },
5271    ///    "invitee_message": {},
5272    ///    "name": {
5273    ///      "description": "Optional admin-defined label (management UI \"name\"); exposed for link previews and guests who already know the invite by name.",
5274    ///      "type": [
5275    ///        "string",
5276    ///        "null"
5277    ///      ]
5278    ///    },
5279    ///    "schedule": {
5280    ///      "oneOf": [
5281    ///        {
5282    ///          "type": "null"
5283    ///        },
5284    ///        {
5285    ///          "oneOf": [
5286    ///            {
5287    ///              "$ref": "#/components/schemas/InviteScheduleSnapshot"
5288    ///            }
5289    ///          ]
5290    ///        }
5291    ///      ]
5292    ///    },
5293    ///    "schedule_combined": {
5294    ///      "oneOf": [
5295    ///        {
5296    ///          "type": "null"
5297    ///        },
5298    ///        {
5299    ///          "oneOf": [
5300    ///            {
5301    ///              "$ref": "#/components/schemas/InviteScheduleCombined"
5302    ///            }
5303    ///          ]
5304    ///        }
5305    ///      ]
5306    ///    },
5307    ///    "schedule_entries": {
5308    ///      "type": [
5309    ///        "array",
5310    ///        "null"
5311    ///      ],
5312    ///      "items": {
5313    ///        "$ref": "#/components/schemas/InviteScheduleEntrySnapshot"
5314    ///      }
5315    ///    },
5316    ///    "schedule_kind": {
5317    ///      "oneOf": [
5318    ///        {
5319    ///          "type": "null"
5320    ///        },
5321    ///        {
5322    ///          "oneOf": [
5323    ///            {
5324    ///              "$ref": "#/components/schemas/InviteScheduleKind"
5325    ///            }
5326    ///          ]
5327    ///        }
5328    ///      ]
5329    ///    },
5330    ///    "state": {
5331    ///      "$ref": "#/components/schemas/PublicInviteState"
5332    ///    },
5333    ///    "valid_from": {
5334    ///      "type": [
5335    ///        "string",
5336    ///        "null"
5337    ///      ]
5338    ///    },
5339    ///    "valid_to": {
5340    ///      "type": [
5341    ///        "string",
5342    ///        "null"
5343    ///      ]
5344    ///    }
5345    ///  }
5346    ///}
5347    /// ```
5348    /// </details>
5349    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5350    pub struct PublicInviteResponse {
5351        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5352        pub already_claimed: ::std::option::Option<bool>,
5353        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5354        pub branding: ::std::option::Option<::serde_json::Value>,
5355        /**Building (integration) summary: `name` (LocalizedString) and optional `location` fields
5356        from integration config (`address`, `city`, `country`).*/
5357        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5358        pub building: ::std::option::Option<::serde_json::Value>,
5359        pub grants: ::std::vec::Vec<PublicInviteGrant>,
5360        pub invite_token: ::std::string::String,
5361        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5362        pub invitee_message: ::std::option::Option<::serde_json::Value>,
5363        ///Optional admin-defined label (management UI "name"); exposed for link previews and guests who already know the invite by name.
5364        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5365        pub name: ::std::option::Option<::std::string::String>,
5366        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5367        pub schedule: ::std::option::Option<InviteScheduleSnapshot>,
5368        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5369        pub schedule_combined: ::std::option::Option<InviteScheduleCombined>,
5370        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5371        pub schedule_entries: ::std::option::Option<::std::vec::Vec<InviteScheduleEntrySnapshot>>,
5372        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5373        pub schedule_kind: ::std::option::Option<InviteScheduleKind>,
5374        pub state: PublicInviteState,
5375        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5376        pub valid_from: ::std::option::Option<::std::string::String>,
5377        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5378        pub valid_to: ::std::option::Option<::std::string::String>,
5379    }
5380    ///`PublicInviteState`
5381    ///
5382    /// <details><summary>JSON schema</summary>
5383    ///
5384    /// ```json
5385    ///{
5386    ///  "type": "string",
5387    ///  "enum": [
5388    ///    "active",
5389    ///    "expired",
5390    ///    "revoked",
5391    ///    "scheduled",
5392    ///    "disabled",
5393    ///    "not_found"
5394    ///  ]
5395    ///}
5396    /// ```
5397    /// </details>
5398    #[derive(
5399        ::serde::Deserialize,
5400        ::serde::Serialize,
5401        Clone,
5402        Copy,
5403        Debug,
5404        Eq,
5405        Hash,
5406        Ord,
5407        PartialEq,
5408        PartialOrd,
5409    )]
5410    pub enum PublicInviteState {
5411        #[serde(rename = "active")]
5412        Active,
5413        #[serde(rename = "expired")]
5414        Expired,
5415        #[serde(rename = "revoked")]
5416        Revoked,
5417        #[serde(rename = "scheduled")]
5418        Scheduled,
5419        #[serde(rename = "disabled")]
5420        Disabled,
5421        #[serde(rename = "not_found")]
5422        NotFound,
5423    }
5424    impl ::std::fmt::Display for PublicInviteState {
5425        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5426            match *self {
5427                Self::Active => f.write_str("active"),
5428                Self::Expired => f.write_str("expired"),
5429                Self::Revoked => f.write_str("revoked"),
5430                Self::Scheduled => f.write_str("scheduled"),
5431                Self::Disabled => f.write_str("disabled"),
5432                Self::NotFound => f.write_str("not_found"),
5433            }
5434        }
5435    }
5436    impl ::std::str::FromStr for PublicInviteState {
5437        type Err = self::error::ConversionError;
5438        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5439            match value {
5440                "active" => Ok(Self::Active),
5441                "expired" => Ok(Self::Expired),
5442                "revoked" => Ok(Self::Revoked),
5443                "scheduled" => Ok(Self::Scheduled),
5444                "disabled" => Ok(Self::Disabled),
5445                "not_found" => Ok(Self::NotFound),
5446                _ => Err("invalid value".into()),
5447            }
5448        }
5449    }
5450    impl ::std::convert::TryFrom<&str> for PublicInviteState {
5451        type Error = self::error::ConversionError;
5452        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5453            value.parse()
5454        }
5455    }
5456    impl ::std::convert::TryFrom<&::std::string::String> for PublicInviteState {
5457        type Error = self::error::ConversionError;
5458        fn try_from(
5459            value: &::std::string::String,
5460        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5461            value.parse()
5462        }
5463    }
5464    impl ::std::convert::TryFrom<::std::string::String> for PublicInviteState {
5465        type Error = self::error::ConversionError;
5466        fn try_from(
5467            value: ::std::string::String,
5468        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5469            value.parse()
5470        }
5471    }
5472    ///`PublicPortalCreateSessionRequest`
5473    ///
5474    /// <details><summary>JSON schema</summary>
5475    ///
5476    /// ```json
5477    ///{
5478    ///  "type": "object",
5479    ///  "required": [
5480    ///    "mode",
5481    ///    "target_entity_id"
5482    ///  ],
5483    ///  "properties": {
5484    ///    "mode": {
5485    ///      "type": "string"
5486    ///    },
5487    ///    "target_entity_id": {
5488    ///      "type": "string"
5489    ///    }
5490    ///  }
5491    ///}
5492    /// ```
5493    /// </details>
5494    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5495    pub struct PublicPortalCreateSessionRequest {
5496        pub mode: ::std::string::String,
5497        pub target_entity_id: ::std::string::String,
5498    }
5499    ///`PublicPortalCreateSessionResponse`
5500    ///
5501    /// <details><summary>JSON schema</summary>
5502    ///
5503    /// ```json
5504    ///{
5505    ///  "type": "object",
5506    ///  "required": [
5507    ///    "callee_peer_id",
5508    ///    "callees_notified",
5509    ///    "caller_peer_id",
5510    ///    "caller_token",
5511    ///    "expires_at",
5512    ///    "peerjs",
5513    ///    "session_id"
5514    ///  ],
5515    ///  "properties": {
5516    ///    "callee_peer_id": {
5517    ///      "type": "string"
5518    ///    },
5519    ///    "callees_notified": {
5520    ///      "description": "True when at least one callee had a push subscription so notification was sent (or attempted).",
5521    ///      "type": "boolean"
5522    ///    },
5523    ///    "caller_peer_id": {
5524    ///      "type": "string"
5525    ///    },
5526    ///    "caller_token": {
5527    ///      "type": "string"
5528    ///    },
5529    ///    "expires_at": {
5530    ///      "type": "string"
5531    ///    },
5532    ///    "peerjs": {
5533    ///      "$ref": "#/components/schemas/PeerJsConfig"
5534    ///    },
5535    ///    "session_id": {
5536    ///      "type": "string"
5537    ///    }
5538    ///  }
5539    ///}
5540    /// ```
5541    /// </details>
5542    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5543    pub struct PublicPortalCreateSessionResponse {
5544        pub callee_peer_id: ::std::string::String,
5545        ///True when at least one callee had a push subscription so notification was sent (or attempted).
5546        pub callees_notified: bool,
5547        pub caller_peer_id: ::std::string::String,
5548        pub caller_token: ::std::string::String,
5549        pub expires_at: ::std::string::String,
5550        pub peerjs: PeerJsConfig,
5551        pub session_id: ::std::string::String,
5552    }
5553    ///`PublicPortalLight`
5554    ///
5555    /// <details><summary>JSON schema</summary>
5556    ///
5557    /// ```json
5558    ///{
5559    ///  "type": "object",
5560    ///  "required": [
5561    ///    "entity_id"
5562    ///  ],
5563    ///  "properties": {
5564    ///    "effective_auto_off_duration": {
5565    ///      "type": [
5566    ///        "integer",
5567    ///        "null"
5568    ///      ],
5569    ///      "format": "int64",
5570    ///      "minimum": 0.0
5571    ///    },
5572    ///    "entity_id": {
5573    ///      "type": "string"
5574    ///    },
5575    ///    "label": {}
5576    ///  }
5577    ///}
5578    /// ```
5579    /// </details>
5580    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5581    pub struct PublicPortalLight {
5582        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5583        pub effective_auto_off_duration: ::std::option::Option<i64>,
5584        pub entity_id: ::std::string::String,
5585        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5586        pub label: ::std::option::Option<::serde_json::Value>,
5587    }
5588    ///`PublicPortalMode`
5589    ///
5590    /// <details><summary>JSON schema</summary>
5591    ///
5592    /// ```json
5593    ///{
5594    ///  "type": "string",
5595    ///  "enum": [
5596    ///    "guest_directory",
5597    ///    "resident_quick_open",
5598    ///    "guest_quick_open"
5599    ///  ]
5600    ///}
5601    /// ```
5602    /// </details>
5603    #[derive(
5604        ::serde::Deserialize,
5605        ::serde::Serialize,
5606        Clone,
5607        Copy,
5608        Debug,
5609        Eq,
5610        Hash,
5611        Ord,
5612        PartialEq,
5613        PartialOrd,
5614    )]
5615    pub enum PublicPortalMode {
5616        #[serde(rename = "guest_directory")]
5617        GuestDirectory,
5618        #[serde(rename = "resident_quick_open")]
5619        ResidentQuickOpen,
5620        #[serde(rename = "guest_quick_open")]
5621        GuestQuickOpen,
5622    }
5623    impl ::std::fmt::Display for PublicPortalMode {
5624        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5625            match *self {
5626                Self::GuestDirectory => f.write_str("guest_directory"),
5627                Self::ResidentQuickOpen => f.write_str("resident_quick_open"),
5628                Self::GuestQuickOpen => f.write_str("guest_quick_open"),
5629            }
5630        }
5631    }
5632    impl ::std::str::FromStr for PublicPortalMode {
5633        type Err = self::error::ConversionError;
5634        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5635            match value {
5636                "guest_directory" => Ok(Self::GuestDirectory),
5637                "resident_quick_open" => Ok(Self::ResidentQuickOpen),
5638                "guest_quick_open" => Ok(Self::GuestQuickOpen),
5639                _ => Err("invalid value".into()),
5640            }
5641        }
5642    }
5643    impl ::std::convert::TryFrom<&str> for PublicPortalMode {
5644        type Error = self::error::ConversionError;
5645        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5646            value.parse()
5647        }
5648    }
5649    impl ::std::convert::TryFrom<&::std::string::String> for PublicPortalMode {
5650        type Error = self::error::ConversionError;
5651        fn try_from(
5652            value: &::std::string::String,
5653        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5654            value.parse()
5655        }
5656    }
5657    impl ::std::convert::TryFrom<::std::string::String> for PublicPortalMode {
5658        type Error = self::error::ConversionError;
5659        fn try_from(
5660            value: ::std::string::String,
5661        ) -> ::std::result::Result<Self, self::error::ConversionError> {
5662            value.parse()
5663        }
5664    }
5665    ///`PublicPortalOpenRateLimit`
5666    ///
5667    /// <details><summary>JSON schema</summary>
5668    ///
5669    /// ```json
5670    ///{
5671    ///  "type": "object",
5672    ///  "required": [
5673    ///    "integration_id",
5674    ///    "min_interval_ms"
5675    ///  ],
5676    ///  "properties": {
5677    ///    "integration_id": {
5678    ///      "type": "string"
5679    ///    },
5680    ///    "min_interval_ms": {
5681    ///      "type": "integer",
5682    ///      "format": "int64",
5683    ///      "minimum": 0.0
5684    ///    }
5685    ///  }
5686    ///}
5687    /// ```
5688    /// </details>
5689    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5690    pub struct PublicPortalOpenRateLimit {
5691        pub integration_id: ::std::string::String,
5692        pub min_interval_ms: i64,
5693    }
5694    ///`PublicPortalReachableResponse`
5695    ///
5696    /// <details><summary>JSON schema</summary>
5697    ///
5698    /// ```json
5699    ///{
5700    ///  "type": "object",
5701    ///  "required": [
5702    ///    "reachable"
5703    ///  ],
5704    ///  "properties": {
5705    ///    "reachable": {
5706    ///      "type": "boolean"
5707    ///    }
5708    ///  }
5709    ///}
5710    /// ```
5711    /// </details>
5712    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5713    pub struct PublicPortalReachableResponse {
5714        pub reachable: bool,
5715    }
5716    ///`PublicPortalResponse`
5717    ///
5718    /// <details><summary>JSON schema</summary>
5719    ///
5720    /// ```json
5721    ///{
5722    ///  "type": "object",
5723    ///  "required": [
5724    ///    "mode",
5725    ///    "public_portal_id"
5726    ///  ],
5727    ///  "properties": {
5728    ///    "branding": {},
5729    ///    "door_effective_auto_off_duration": {
5730    ///      "type": [
5731    ///        "integer",
5732    ///        "null"
5733    ///      ],
5734    ///      "format": "int64",
5735    ///      "minimum": 0.0
5736    ///    },
5737    ///    "door_image_url": {
5738    ///      "description": "Image URL for the door (presigned S3 URL from media service).",
5739    ///      "type": [
5740    ///        "string",
5741    ///        "null"
5742    ///      ]
5743    ///    },
5744    ///    "lights": {
5745    ///      "type": [
5746    ///        "array",
5747    ///        "null"
5748    ///      ],
5749    ///      "items": {
5750    ///        "$ref": "#/components/schemas/PublicPortalLight"
5751    ///      }
5752    ///    },
5753    ///    "mode": {
5754    ///      "$ref": "#/components/schemas/PublicPortalMode"
5755    ///    },
5756    ///    "name": {
5757    ///      "oneOf": [
5758    ///        {
5759    ///          "type": "null"
5760    ///        },
5761    ///        {
5762    ///          "oneOf": [
5763    ///            {
5764    ///              "$ref": "#/components/schemas/LocalizedString"
5765    ///            }
5766    ///          ]
5767    ///        }
5768    ///      ]
5769    ///    },
5770    ///    "open_rate_limit": {
5771    ///      "oneOf": [
5772    ///        {
5773    ///          "type": "null"
5774    ///        },
5775    ///        {
5776    ///          "oneOf": [
5777    ///            {
5778    ///              "$ref": "#/components/schemas/PublicPortalOpenRateLimit"
5779    ///            }
5780    ///          ]
5781    ///        }
5782    ///      ]
5783    ///    },
5784    ///    "public_portal_id": {
5785    ///      "type": "string"
5786    ///    }
5787    ///  }
5788    ///}
5789    /// ```
5790    /// </details>
5791    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5792    pub struct PublicPortalResponse {
5793        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5794        pub branding: ::std::option::Option<::serde_json::Value>,
5795        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5796        pub door_effective_auto_off_duration: ::std::option::Option<i64>,
5797        ///Image URL for the door (presigned S3 URL from media service).
5798        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5799        pub door_image_url: ::std::option::Option<::std::string::String>,
5800        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5801        pub lights: ::std::option::Option<::std::vec::Vec<PublicPortalLight>>,
5802        pub mode: PublicPortalMode,
5803        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5804        pub name: ::std::option::Option<LocalizedString>,
5805        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5806        pub open_rate_limit: ::std::option::Option<PublicPortalOpenRateLimit>,
5807        pub public_portal_id: ::std::string::String,
5808    }
5809    ///`PublicPortalTarget`
5810    ///
5811    /// <details><summary>JSON schema</summary>
5812    ///
5813    /// ```json
5814    ///{
5815    ///  "type": "object",
5816    ///  "required": [
5817    ///    "allowed_actions",
5818    ///    "display_name",
5819    ///    "floor",
5820    ///    "target_id"
5821    ///  ],
5822    ///  "properties": {
5823    ///    "allowed_actions": {
5824    ///      "type": "array",
5825    ///      "items": {
5826    ///        "type": "string"
5827    ///      }
5828    ///    },
5829    ///    "apartment_label": {},
5830    ///    "apartment_number": {
5831    ///      "type": [
5832    ///        "integer",
5833    ///        "null"
5834    ///      ],
5835    ///      "format": "int64"
5836    ///    },
5837    ///    "call_available": {
5838    ///      "description": "True when at least one resident (receives_calls) exists. When false, voice/video are excluded from allowed_actions.",
5839    ///      "type": [
5840    ///        "boolean",
5841    ///        "null"
5842    ///      ]
5843    ///    },
5844    ///    "display_name": {},
5845    ///    "floor": {},
5846    ///    "floor_number": {
5847    ///      "type": [
5848    ///        "integer",
5849    ///        "null"
5850    ///      ],
5851    ///      "format": "int64"
5852    ///    },
5853    ///    "image": {
5854    ///      "type": [
5855    ///        "string",
5856    ///        "null"
5857    ///      ]
5858    ///    },
5859    ///    "require_video": {
5860    ///      "type": [
5861    ///        "boolean",
5862    ///        "null"
5863    ///      ]
5864    ///    },
5865    ///    "target_id": {
5866    ///      "type": "string"
5867    ///    }
5868    ///  }
5869    ///}
5870    /// ```
5871    /// </details>
5872    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5873    pub struct PublicPortalTarget {
5874        pub allowed_actions: ::std::vec::Vec<::std::string::String>,
5875        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5876        pub apartment_label: ::std::option::Option<::serde_json::Value>,
5877        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5878        pub apartment_number: ::std::option::Option<i64>,
5879        ///True when at least one resident (receives_calls) exists. When false, voice/video are excluded from allowed_actions.
5880        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5881        pub call_available: ::std::option::Option<bool>,
5882        pub display_name: ::serde_json::Value,
5883        pub floor: ::serde_json::Value,
5884        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5885        pub floor_number: ::std::option::Option<i64>,
5886        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5887        pub image: ::std::option::Option<::std::string::String>,
5888        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5889        pub require_video: ::std::option::Option<bool>,
5890        pub target_id: ::std::string::String,
5891    }
5892    ///`PublicPortalTargetsResponse`
5893    ///
5894    /// <details><summary>JSON schema</summary>
5895    ///
5896    /// ```json
5897    ///{
5898    ///  "type": "object",
5899    ///  "required": [
5900    ///    "targets"
5901    ///  ],
5902    ///  "properties": {
5903    ///    "floor_order": {
5904    ///      "description": "Building `floor_order` from virtual_access integration config (canonical keys).",
5905    ///      "type": [
5906    ///        "array",
5907    ///        "null"
5908    ///      ],
5909    ///      "items": {
5910    ///        "type": "string"
5911    ///      }
5912    ///    },
5913    ///    "targets": {
5914    ///      "type": "array",
5915    ///      "items": {
5916    ///        "$ref": "#/components/schemas/PublicPortalTarget"
5917    ///      }
5918    ///    }
5919    ///  }
5920    ///}
5921    /// ```
5922    /// </details>
5923    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5924    pub struct PublicPortalTargetsResponse {
5925        ///Building `floor_order` from virtual_access integration config (canonical keys).
5926        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5927        pub floor_order: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
5928        pub targets: ::std::vec::Vec<PublicPortalTarget>,
5929    }
5930    ///`PublicSessionResponse`
5931    ///
5932    /// <details><summary>JSON schema</summary>
5933    ///
5934    /// ```json
5935    ///{
5936    ///  "type": "object",
5937    ///  "required": [
5938    ///    "callee_peer_id",
5939    ///    "caller_peer_id",
5940    ///    "peerjs",
5941    ///    "role",
5942    ///    "session_id",
5943    ///    "state"
5944    ///  ],
5945    ///  "properties": {
5946    ///    "building_display_name": {
5947    ///      "description": "Integration / building name (localized JSON)."
5948    ///    },
5949    ///    "call_target_display_name": {
5950    ///      "description": "Localized apartment / unit title for call UI (caller/callee)."
5951    ///    },
5952    ///    "call_target_location_line": {
5953    ///      "description": "Single line for apartment + floor (e.g. \"3 · Floor 2\").",
5954    ///      "type": [
5955    ///        "string",
5956    ///        "null"
5957    ///      ]
5958    ///    },
5959    ///    "callee_peer_id": {
5960    ///      "type": "string"
5961    ///    },
5962    ///    "callees_notified": {
5963    ///      "description": "Whether at least one callee received a push notification. Caller uses this to skip peer-unavailable retries when false.",
5964    ///      "type": [
5965    ///        "boolean",
5966    ///        "null"
5967    ///      ]
5968    ///    },
5969    ///    "caller_peer_id": {
5970    ///      "type": "string"
5971    ///    },
5972    ///    "expires_at": {
5973    ///      "type": [
5974    ///        "string",
5975    ///        "null"
5976    ///      ]
5977    ///    },
5978    ///    "has_lights": {
5979    ///      "description": "Whether the portal has light devices configured. Callee-only.",
5980    ///      "type": [
5981    ///        "boolean",
5982    ///        "null"
5983    ///      ]
5984    ///    },
5985    ///    "mode": {
5986    ///      "description": "Call mode: \"voice\" or \"video\". Video on by default when mode is \"video\".",
5987    ///      "type": [
5988    ///        "string",
5989    ///        "null"
5990    ///      ]
5991    ///    },
5992    ///    "peerjs": {
5993    ///      "$ref": "#/components/schemas/PeerJsConfig"
5994    ///    },
5995    ///    "portal_camera_device_ids": {
5996    ///      "type": [
5997    ///        "array",
5998    ///        "null"
5999    ///      ],
6000    ///      "items": {
6001    ///        "type": "string"
6002    ///      }
6003    ///    },
6004    ///    "role": {
6005    ///      "$ref": "#/components/schemas/PublicSessionRole"
6006    ///    },
6007    ///    "session_id": {
6008    ///      "type": "string"
6009    ///    },
6010    ///    "state": {
6011    ///      "type": "string"
6012    ///    }
6013    ///  }
6014    ///}
6015    /// ```
6016    /// </details>
6017    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6018    pub struct PublicSessionResponse {
6019        ///Integration / building name (localized JSON).
6020        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6021        pub building_display_name: ::std::option::Option<::serde_json::Value>,
6022        ///Localized apartment / unit title for call UI (caller/callee).
6023        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6024        pub call_target_display_name: ::std::option::Option<::serde_json::Value>,
6025        ///Single line for apartment + floor (e.g. "3 · Floor 2").
6026        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6027        pub call_target_location_line: ::std::option::Option<::std::string::String>,
6028        pub callee_peer_id: ::std::string::String,
6029        ///Whether at least one callee received a push notification. Caller uses this to skip peer-unavailable retries when false.
6030        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6031        pub callees_notified: ::std::option::Option<bool>,
6032        pub caller_peer_id: ::std::string::String,
6033        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6034        pub expires_at: ::std::option::Option<::std::string::String>,
6035        ///Whether the portal has light devices configured. Callee-only.
6036        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6037        pub has_lights: ::std::option::Option<bool>,
6038        ///Call mode: "voice" or "video". Video on by default when mode is "video".
6039        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6040        pub mode: ::std::option::Option<::std::string::String>,
6041        pub peerjs: PeerJsConfig,
6042        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6043        pub portal_camera_device_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
6044        pub role: PublicSessionRole,
6045        pub session_id: ::std::string::String,
6046        pub state: ::std::string::String,
6047    }
6048    ///`PublicSessionRole`
6049    ///
6050    /// <details><summary>JSON schema</summary>
6051    ///
6052    /// ```json
6053    ///{
6054    ///  "type": "string",
6055    ///  "enum": [
6056    ///    "caller",
6057    ///    "callee"
6058    ///  ]
6059    ///}
6060    /// ```
6061    /// </details>
6062    #[derive(
6063        ::serde::Deserialize,
6064        ::serde::Serialize,
6065        Clone,
6066        Copy,
6067        Debug,
6068        Eq,
6069        Hash,
6070        Ord,
6071        PartialEq,
6072        PartialOrd,
6073    )]
6074    pub enum PublicSessionRole {
6075        #[serde(rename = "caller")]
6076        Caller,
6077        #[serde(rename = "callee")]
6078        Callee,
6079    }
6080    impl ::std::fmt::Display for PublicSessionRole {
6081        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6082            match *self {
6083                Self::Caller => f.write_str("caller"),
6084                Self::Callee => f.write_str("callee"),
6085            }
6086        }
6087    }
6088    impl ::std::str::FromStr for PublicSessionRole {
6089        type Err = self::error::ConversionError;
6090        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6091            match value {
6092                "caller" => Ok(Self::Caller),
6093                "callee" => Ok(Self::Callee),
6094                _ => Err("invalid value".into()),
6095            }
6096        }
6097    }
6098    impl ::std::convert::TryFrom<&str> for PublicSessionRole {
6099        type Error = self::error::ConversionError;
6100        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6101            value.parse()
6102        }
6103    }
6104    impl ::std::convert::TryFrom<&::std::string::String> for PublicSessionRole {
6105        type Error = self::error::ConversionError;
6106        fn try_from(
6107            value: &::std::string::String,
6108        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6109            value.parse()
6110        }
6111    }
6112    impl ::std::convert::TryFrom<::std::string::String> for PublicSessionRole {
6113        type Error = self::error::ConversionError;
6114        fn try_from(
6115            value: ::std::string::String,
6116        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6117            value.parse()
6118        }
6119    }
6120    ///`PublicSessionStreamsResponse`
6121    ///
6122    /// <details><summary>JSON schema</summary>
6123    ///
6124    /// ```json
6125    ///{
6126    ///  "type": "object",
6127    ///  "required": [
6128    ///    "device_ids"
6129    ///  ],
6130    ///  "properties": {
6131    ///    "device_ids": {
6132    ///      "description": "Camera device IDs for the portal. Stream URLs resolved client-side or via future API.",
6133    ///      "type": "array",
6134    ///      "items": {
6135    ///        "type": "string"
6136    ///      }
6137    ///    }
6138    ///  }
6139    ///}
6140    /// ```
6141    /// </details>
6142    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6143    pub struct PublicSessionStreamsResponse {
6144        ///Camera device IDs for the portal. Stream URLs resolved client-side or via future API.
6145        pub device_ids: ::std::vec::Vec<::std::string::String>,
6146    }
6147    /**A metered resource. Lifetime keys count current rows in their source-of-truth
6148    table; temporal keys accumulate via `usage_events` + `quota_counters`.
6149
6150    String form (used in DB columns and JSON responses) is snake_case via `EnumString`.*/
6151    ///
6152    /// <details><summary>JSON schema</summary>
6153    ///
6154    /// ```json
6155    ///{
6156    ///  "description": "A metered resource. Lifetime keys count current rows in their source-of-truth\ntable; temporal keys accumulate via `usage_events` + `quota_counters`.\n\nString form (used in DB columns and JSON responses) is snake_case via `EnumString`.",
6157    ///  "type": "string",
6158    ///  "enum": [
6159    ///    "org_users",
6160    ///    "integrations",
6161    ///    "devices",
6162    ///    "entities",
6163    ///    "zones",
6164    ///    "api_keys",
6165    ///    "door_opens",
6166    ///    "portal_views",
6167    ///    "video_sessions",
6168    ///    "video_session_duration_seconds",
6169    ///    "scripting_executions"
6170    ///  ]
6171    ///}
6172    /// ```
6173    /// </details>
6174    #[derive(
6175        ::serde::Deserialize,
6176        ::serde::Serialize,
6177        Clone,
6178        Copy,
6179        Debug,
6180        Eq,
6181        Hash,
6182        Ord,
6183        PartialEq,
6184        PartialOrd,
6185    )]
6186    pub enum QuotaKey {
6187        #[serde(rename = "org_users")]
6188        OrgUsers,
6189        #[serde(rename = "integrations")]
6190        Integrations,
6191        #[serde(rename = "devices")]
6192        Devices,
6193        #[serde(rename = "entities")]
6194        Entities,
6195        #[serde(rename = "zones")]
6196        Zones,
6197        #[serde(rename = "api_keys")]
6198        ApiKeys,
6199        #[serde(rename = "door_opens")]
6200        DoorOpens,
6201        #[serde(rename = "portal_views")]
6202        PortalViews,
6203        #[serde(rename = "video_sessions")]
6204        VideoSessions,
6205        #[serde(rename = "video_session_duration_seconds")]
6206        VideoSessionDurationSeconds,
6207        #[serde(rename = "scripting_executions")]
6208        ScriptingExecutions,
6209    }
6210    impl ::std::fmt::Display for QuotaKey {
6211        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6212            match *self {
6213                Self::OrgUsers => f.write_str("org_users"),
6214                Self::Integrations => f.write_str("integrations"),
6215                Self::Devices => f.write_str("devices"),
6216                Self::Entities => f.write_str("entities"),
6217                Self::Zones => f.write_str("zones"),
6218                Self::ApiKeys => f.write_str("api_keys"),
6219                Self::DoorOpens => f.write_str("door_opens"),
6220                Self::PortalViews => f.write_str("portal_views"),
6221                Self::VideoSessions => f.write_str("video_sessions"),
6222                Self::VideoSessionDurationSeconds => f.write_str("video_session_duration_seconds"),
6223                Self::ScriptingExecutions => f.write_str("scripting_executions"),
6224            }
6225        }
6226    }
6227    impl ::std::str::FromStr for QuotaKey {
6228        type Err = self::error::ConversionError;
6229        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6230            match value {
6231                "org_users" => Ok(Self::OrgUsers),
6232                "integrations" => Ok(Self::Integrations),
6233                "devices" => Ok(Self::Devices),
6234                "entities" => Ok(Self::Entities),
6235                "zones" => Ok(Self::Zones),
6236                "api_keys" => Ok(Self::ApiKeys),
6237                "door_opens" => Ok(Self::DoorOpens),
6238                "portal_views" => Ok(Self::PortalViews),
6239                "video_sessions" => Ok(Self::VideoSessions),
6240                "video_session_duration_seconds" => Ok(Self::VideoSessionDurationSeconds),
6241                "scripting_executions" => Ok(Self::ScriptingExecutions),
6242                _ => Err("invalid value".into()),
6243            }
6244        }
6245    }
6246    impl ::std::convert::TryFrom<&str> for QuotaKey {
6247        type Error = self::error::ConversionError;
6248        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6249            value.parse()
6250        }
6251    }
6252    impl ::std::convert::TryFrom<&::std::string::String> for QuotaKey {
6253        type Error = self::error::ConversionError;
6254        fn try_from(
6255            value: &::std::string::String,
6256        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6257            value.parse()
6258        }
6259    }
6260    impl ::std::convert::TryFrom<::std::string::String> for QuotaKey {
6261        type Error = self::error::ConversionError;
6262        fn try_from(
6263            value: ::std::string::String,
6264        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6265            value.parse()
6266        }
6267    }
6268    ///`QuotaOverrideRequest`
6269    ///
6270    /// <details><summary>JSON schema</summary>
6271    ///
6272    /// ```json
6273    ///{
6274    ///  "type": "object",
6275    ///  "required": [
6276    ///    "limit_value",
6277    ///    "quota_key",
6278    ///    "subject_id",
6279    ///    "subject_type"
6280    ///  ],
6281    ///  "properties": {
6282    ///    "expires_at": {
6283    ///      "type": [
6284    ///        "string",
6285    ///        "null"
6286    ///      ]
6287    ///    },
6288    ///    "limit_value": {
6289    ///      "type": "integer",
6290    ///      "format": "int64"
6291    ///    },
6292    ///    "period": {
6293    ///      "type": [
6294    ///        "string",
6295    ///        "null"
6296    ///      ]
6297    ///    },
6298    ///    "quota_key": {
6299    ///      "type": "string"
6300    ///    },
6301    ///    "reason": {
6302    ///      "type": [
6303    ///        "string",
6304    ///        "null"
6305    ///      ]
6306    ///    },
6307    ///    "subject_id": {
6308    ///      "type": "string"
6309    ///    },
6310    ///    "subject_type": {
6311    ///      "type": "string"
6312    ///    }
6313    ///  }
6314    ///}
6315    /// ```
6316    /// </details>
6317    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6318    pub struct QuotaOverrideRequest {
6319        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6320        pub expires_at: ::std::option::Option<::std::string::String>,
6321        pub limit_value: i64,
6322        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6323        pub period: ::std::option::Option<::std::string::String>,
6324        pub quota_key: ::std::string::String,
6325        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6326        pub reason: ::std::option::Option<::std::string::String>,
6327        pub subject_id: ::std::string::String,
6328        pub subject_type: ::std::string::String,
6329    }
6330    /**Window kind for a quota. `Lifetime` is "ever / right now"; `Day`/`Week`/`Month`
6331    reset on calendar boundaries (UTC); `PerSession` resets per opaque session id.*/
6332    ///
6333    /// <details><summary>JSON schema</summary>
6334    ///
6335    /// ```json
6336    ///{
6337    ///  "description": "Window kind for a quota. `Lifetime` is \"ever / right now\"; `Day`/`Week`/`Month`\nreset on calendar boundaries (UTC); `PerSession` resets per opaque session id.",
6338    ///  "type": "string",
6339    ///  "enum": [
6340    ///    "lifetime",
6341    ///    "day",
6342    ///    "week",
6343    ///    "month",
6344    ///    "per_session"
6345    ///  ]
6346    ///}
6347    /// ```
6348    /// </details>
6349    #[derive(
6350        ::serde::Deserialize,
6351        ::serde::Serialize,
6352        Clone,
6353        Copy,
6354        Debug,
6355        Eq,
6356        Hash,
6357        Ord,
6358        PartialEq,
6359        PartialOrd,
6360    )]
6361    pub enum QuotaPeriod {
6362        #[serde(rename = "lifetime")]
6363        Lifetime,
6364        #[serde(rename = "day")]
6365        Day,
6366        #[serde(rename = "week")]
6367        Week,
6368        #[serde(rename = "month")]
6369        Month,
6370        #[serde(rename = "per_session")]
6371        PerSession,
6372    }
6373    impl ::std::fmt::Display for QuotaPeriod {
6374        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6375            match *self {
6376                Self::Lifetime => f.write_str("lifetime"),
6377                Self::Day => f.write_str("day"),
6378                Self::Week => f.write_str("week"),
6379                Self::Month => f.write_str("month"),
6380                Self::PerSession => f.write_str("per_session"),
6381            }
6382        }
6383    }
6384    impl ::std::str::FromStr for QuotaPeriod {
6385        type Err = self::error::ConversionError;
6386        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6387            match value {
6388                "lifetime" => Ok(Self::Lifetime),
6389                "day" => Ok(Self::Day),
6390                "week" => Ok(Self::Week),
6391                "month" => Ok(Self::Month),
6392                "per_session" => Ok(Self::PerSession),
6393                _ => Err("invalid value".into()),
6394            }
6395        }
6396    }
6397    impl ::std::convert::TryFrom<&str> for QuotaPeriod {
6398        type Error = self::error::ConversionError;
6399        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6400            value.parse()
6401        }
6402    }
6403    impl ::std::convert::TryFrom<&::std::string::String> for QuotaPeriod {
6404        type Error = self::error::ConversionError;
6405        fn try_from(
6406            value: &::std::string::String,
6407        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6408            value.parse()
6409        }
6410    }
6411    impl ::std::convert::TryFrom<::std::string::String> for QuotaPeriod {
6412        type Error = self::error::ConversionError;
6413        fn try_from(
6414            value: ::std::string::String,
6415        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6416            value.parse()
6417        }
6418    }
6419    ///Full quota report for an org; powers `/dashboard/billing`.
6420    ///
6421    /// <details><summary>JSON schema</summary>
6422    ///
6423    /// ```json
6424    ///{
6425    ///  "description": "Full quota report for an org; powers `/dashboard/billing`.",
6426    ///  "type": "object",
6427    ///  "required": [
6428    ///    "items",
6429    ///    "org_id"
6430    ///  ],
6431    ///  "properties": {
6432    ///    "items": {
6433    ///      "type": "array",
6434    ///      "items": {
6435    ///        "$ref": "#/components/schemas/QuotaUsage"
6436    ///      }
6437    ///    },
6438    ///    "org_id": {
6439    ///      "type": "string"
6440    ///    },
6441    ///    "tier_slug": {
6442    ///      "type": [
6443    ///        "string",
6444    ///        "null"
6445    ///      ]
6446    ///    }
6447    ///  }
6448    ///}
6449    /// ```
6450    /// </details>
6451    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6452    pub struct QuotaReport {
6453        pub items: ::std::vec::Vec<QuotaUsage>,
6454        pub org_id: ::std::string::String,
6455        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6456        pub tier_slug: ::std::option::Option<::std::string::String>,
6457    }
6458    ///Single (key, period) entry in a usage report.
6459    ///
6460    /// <details><summary>JSON schema</summary>
6461    ///
6462    /// ```json
6463    ///{
6464    ///  "description": "Single (key, period) entry in a usage report.",
6465    ///  "type": "object",
6466    ///  "required": [
6467    ///    "current",
6468    ///    "key",
6469    ///    "limit",
6470    ///    "period",
6471    ///    "period_label"
6472    ///  ],
6473    ///  "properties": {
6474    ///    "current": {
6475    ///      "type": "integer",
6476    ///      "format": "int64",
6477    ///      "minimum": 0.0
6478    ///    },
6479    ///    "key": {
6480    ///      "$ref": "#/components/schemas/QuotaKey"
6481    ///    },
6482    ///    "limit": {
6483    ///      "$ref": "#/components/schemas/EffectiveLimit"
6484    ///    },
6485    ///    "period": {
6486    ///      "$ref": "#/components/schemas/QuotaPeriod"
6487    ///    },
6488    ///    "period_end": {
6489    ///      "description": "Window end (RFC3339). `null` for `Lifetime`.",
6490    ///      "type": [
6491    ///        "string",
6492    ///        "null"
6493    ///      ]
6494    ///    },
6495    ///    "period_label": {
6496    ///      "description": "Window label (e.g. `lifetime`, `month:2026-04`). Stable across reports.",
6497    ///      "type": "string"
6498    ///    },
6499    ///    "period_start": {
6500    ///      "description": "Window start (RFC3339). `null` for `Lifetime`.",
6501    ///      "type": [
6502    ///        "string",
6503    ///        "null"
6504    ///      ]
6505    ///    }
6506    ///  }
6507    ///}
6508    /// ```
6509    /// </details>
6510    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6511    pub struct QuotaUsage {
6512        pub current: i64,
6513        pub key: QuotaKey,
6514        pub limit: EffectiveLimit,
6515        pub period: QuotaPeriod,
6516        ///Window end (RFC3339). `null` for `Lifetime`.
6517        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6518        pub period_end: ::std::option::Option<::std::string::String>,
6519        ///Window label (e.g. `lifetime`, `month:2026-04`). Stable across reports.
6520        pub period_label: ::std::string::String,
6521        ///Window start (RFC3339). `null` for `Lifetime`.
6522        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6523        pub period_start: ::std::option::Option<::std::string::String>,
6524    }
6525    ///A role name (e.g. admin, users:read) assigned to a user in an org.
6526    ///
6527    /// <details><summary>JSON schema</summary>
6528    ///
6529    /// ```json
6530    ///{
6531    ///  "description": "A role name (e.g. admin, users:read) assigned to a user in an org.",
6532    ///  "type": "string"
6533    ///}
6534    /// ```
6535    /// </details>
6536    #[derive(
6537        ::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd,
6538    )]
6539    #[serde(transparent)]
6540    pub struct Role(pub ::std::string::String);
6541    impl ::std::ops::Deref for Role {
6542        type Target = ::std::string::String;
6543        fn deref(&self) -> &::std::string::String {
6544            &self.0
6545        }
6546    }
6547    impl ::std::convert::From<Role> for ::std::string::String {
6548        fn from(value: Role) -> Self {
6549            value.0
6550        }
6551    }
6552    impl ::std::convert::From<::std::string::String> for Role {
6553        fn from(value: ::std::string::String) -> Self {
6554            Self(value)
6555        }
6556    }
6557    impl ::std::str::FromStr for Role {
6558        type Err = ::std::convert::Infallible;
6559        fn from_str(value: &str) -> ::std::result::Result<Self, Self::Err> {
6560            Ok(Self(value.to_string()))
6561        }
6562    }
6563    impl ::std::fmt::Display for Role {
6564        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6565            self.0.fmt(f)
6566        }
6567    }
6568    ///`SearchUsersQuery`
6569    ///
6570    /// <details><summary>JSON schema</summary>
6571    ///
6572    /// ```json
6573    ///{
6574    ///  "type": "object",
6575    ///  "properties": {
6576    ///    "exclude_ids": {
6577    ///      "description": "Comma-separated user IDs to exclude",
6578    ///      "type": [
6579    ///        "string",
6580    ///        "null"
6581    ///      ]
6582    ///    },
6583    ///    "limit": {
6584    ///      "type": "integer",
6585    ///      "minimum": 0.0
6586    ///    },
6587    ///    "offset": {
6588    ///      "type": "integer",
6589    ///      "minimum": 0.0
6590    ///    },
6591    ///    "org_id": {
6592    ///      "description": "Filter by org subtree (ignored when `scope=all`).",
6593    ///      "type": [
6594    ///        "string",
6595    ///        "null"
6596    ///      ]
6597    ///    },
6598    ///    "q": {
6599    ///      "description": "Search text (ILIKE on name and email)",
6600    ///      "type": [
6601    ///        "string",
6602    ///        "null"
6603    ///      ]
6604    ///    },
6605    ///    "scope": {
6606    ///      "description": "`all`: search every user in the database (requires `users:list` on the root org). Otherwise org-scoped.",
6607    ///      "type": [
6608    ///        "string",
6609    ///        "null"
6610    ///      ]
6611    ///    }
6612    ///  }
6613    ///}
6614    /// ```
6615    /// </details>
6616    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6617    pub struct SearchUsersQuery {
6618        ///Comma-separated user IDs to exclude
6619        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6620        pub exclude_ids: ::std::option::Option<::std::string::String>,
6621        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6622        pub limit: ::std::option::Option<u64>,
6623        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6624        pub offset: ::std::option::Option<u64>,
6625        ///Filter by org subtree (ignored when `scope=all`).
6626        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6627        pub org_id: ::std::option::Option<::std::string::String>,
6628        ///Search text (ILIKE on name and email)
6629        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6630        pub q: ::std::option::Option<::std::string::String>,
6631        ///`all`: search every user in the database (requires `users:list` on the root org). Otherwise org-scoped.
6632        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6633        pub scope: ::std::option::Option<::std::string::String>,
6634    }
6635    impl ::std::default::Default for SearchUsersQuery {
6636        fn default() -> Self {
6637            Self {
6638                exclude_ids: Default::default(),
6639                limit: Default::default(),
6640                offset: Default::default(),
6641                org_id: Default::default(),
6642                q: Default::default(),
6643                scope: Default::default(),
6644            }
6645        }
6646    }
6647    ///`SetDoorRestrictionsPayload`
6648    ///
6649    /// <details><summary>JSON schema</summary>
6650    ///
6651    /// ```json
6652    ///{
6653    ///  "type": "object",
6654    ///  "required": [
6655    ///    "apartment_entity_ids"
6656    ///  ],
6657    ///  "properties": {
6658    ///    "apartment_entity_ids": {
6659    ///      "type": "array",
6660    ///      "items": {
6661    ///        "type": "string"
6662    ///      }
6663    ///    }
6664    ///  }
6665    ///}
6666    /// ```
6667    /// </details>
6668    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6669    pub struct SetDoorRestrictionsPayload {
6670        pub apartment_entity_ids: ::std::vec::Vec<::std::string::String>,
6671    }
6672    /**Options for single-resource operations (get/create/update/delete/restore).
6673    Used when listing/filtering by `only_deleted` is not applicable.*/
6674    ///
6675    /// <details><summary>JSON schema</summary>
6676    ///
6677    /// ```json
6678    ///{
6679    ///  "description": "Options for single-resource operations (get/create/update/delete/restore).\nUsed when listing/filtering by `only_deleted` is not applicable.",
6680    ///  "type": "object",
6681    ///  "required": [
6682    ///    "include_deleted",
6683    ///    "include_metadata"
6684    ///  ],
6685    ///  "properties": {
6686    ///    "include_deleted": {
6687    ///      "description": "If true, include soft-deleted items in results.",
6688    ///      "type": "boolean"
6689    ///    },
6690    ///    "include_metadata": {
6691    ///      "description": "If true, include storage metadata (e.g. created_at, deleted_at) in results.",
6692    ///      "type": "boolean"
6693    ///    }
6694    ///  }
6695    ///}
6696    /// ```
6697    /// </details>
6698    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6699    pub struct SingleResourceOutputOptions {
6700        ///If true, include soft-deleted items in results.
6701        pub include_deleted: bool,
6702        ///If true, include storage metadata (e.g. created_at, deleted_at) in results.
6703        pub include_metadata: bool,
6704    }
6705    /**Query parameters for single-resource operations (get/create/update/delete/restore).
6706    Omits `only_deleted` since it only applies to list endpoints.*/
6707    ///
6708    /// <details><summary>JSON schema</summary>
6709    ///
6710    /// ```json
6711    ///{
6712    ///  "description": "Query parameters for single-resource operations (get/create/update/delete/restore).\nOmits `only_deleted` since it only applies to list endpoints.",
6713    ///  "type": "object",
6714    ///  "required": [
6715    ///    "include_deleted",
6716    ///    "include_metadata"
6717    ///  ],
6718    ///  "properties": {
6719    ///    "include_deleted": {
6720    ///      "type": "boolean"
6721    ///    },
6722    ///    "include_metadata": {
6723    ///      "type": "boolean"
6724    ///    }
6725    ///  }
6726    ///}
6727    /// ```
6728    /// </details>
6729    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6730    pub struct SingleResourceOutputOptionsQuery {
6731        pub include_deleted: bool,
6732        pub include_metadata: bool,
6733    }
6734    ///`StorageFeatures`
6735    ///
6736    /// <details><summary>JSON schema</summary>
6737    ///
6738    /// ```json
6739    ///{
6740    ///  "type": "object",
6741    ///  "properties": {
6742    ///    "cache_hit": {
6743    ///      "type": [
6744    ///        "boolean",
6745    ///        "null"
6746    ///      ]
6747    ///    },
6748    ///    "cache_ttl": {
6749    ///      "type": [
6750    ///        "integer",
6751    ///        "null"
6752    ///      ],
6753    ///      "format": "int64",
6754    ///      "minimum": 0.0
6755    ///    },
6756    ///    "created_at": {
6757    ///      "type": [
6758    ///        "string",
6759    ///        "null"
6760    ///      ],
6761    ///      "format": "date-time"
6762    ///    },
6763    ///    "deleted_at": {
6764    ///      "type": [
6765    ///        "string",
6766    ///        "null"
6767    ///      ],
6768    ///      "format": "date-time"
6769    ///    },
6770    ///    "hard_delete_at": {
6771    ///      "type": [
6772    ///        "string",
6773    ///        "null"
6774    ///      ],
6775    ///      "format": "date-time"
6776    ///    },
6777    ///    "purge_at": {
6778    ///      "type": [
6779    ///        "string",
6780    ///        "null"
6781    ///      ],
6782    ///      "format": "date-time"
6783    ///    },
6784    ///    "updated_at": {
6785    ///      "type": [
6786    ///        "string",
6787    ///        "null"
6788    ///      ],
6789    ///      "format": "date-time"
6790    ///    }
6791    ///  }
6792    ///}
6793    /// ```
6794    /// </details>
6795    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6796    pub struct StorageFeatures {
6797        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6798        pub cache_hit: ::std::option::Option<bool>,
6799        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6800        pub cache_ttl: ::std::option::Option<i64>,
6801        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6802        pub created_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
6803        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6804        pub deleted_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
6805        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6806        pub hard_delete_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
6807        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6808        pub purge_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
6809        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6810        pub updated_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
6811    }
6812    impl ::std::default::Default for StorageFeatures {
6813        fn default() -> Self {
6814            Self {
6815                cache_hit: Default::default(),
6816                cache_ttl: Default::default(),
6817                created_at: Default::default(),
6818                deleted_at: Default::default(),
6819                hard_delete_at: Default::default(),
6820                purge_at: Default::default(),
6821                updated_at: Default::default(),
6822            }
6823        }
6824    }
6825    ///External subscription reference.
6826    ///
6827    /// <details><summary>JSON schema</summary>
6828    ///
6829    /// ```json
6830    ///{
6831    ///  "description": "External subscription reference.",
6832    ///  "type": "object",
6833    ///  "required": [
6834    ///    "external_id",
6835    ///    "provider",
6836    ///    "status",
6837    ///    "tier_slug"
6838    ///  ],
6839    ///  "properties": {
6840    ///    "external_id": {
6841    ///      "type": "string"
6842    ///    },
6843    ///    "provider": {
6844    ///      "type": "string"
6845    ///    },
6846    ///    "status": {
6847    ///      "type": "string"
6848    ///    },
6849    ///    "tier_slug": {
6850    ///      "type": "string"
6851    ///    }
6852    ///  }
6853    ///}
6854    /// ```
6855    /// </details>
6856    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6857    pub struct SubscriptionRef {
6858        pub external_id: ::std::string::String,
6859        pub provider: ::std::string::String,
6860        pub status: ::std::string::String,
6861        pub tier_slug: ::std::string::String,
6862    }
6863    ///`UpdateAccessInviteRequest`
6864    ///
6865    /// <details><summary>JSON schema</summary>
6866    ///
6867    /// ```json
6868    ///{
6869    ///  "type": "object",
6870    ///  "properties": {
6871    ///    "disabled_justification": {
6872    ///      "type": [
6873    ///        "string",
6874    ///        "null"
6875    ///      ]
6876    ///    },
6877    ///    "expires_in": {
6878    ///      "type": [
6879    ///        "string",
6880    ///        "null"
6881    ///      ]
6882    ///    },
6883    ///    "invite_recurrence": {},
6884    ///    "invitee_message": {},
6885    ///    "is_enabled": {
6886    ///      "type": [
6887    ///        "boolean",
6888    ///        "null"
6889    ///      ]
6890    ///    },
6891    ///    "max_uses": {
6892    ///      "type": [
6893    ///        "integer",
6894    ///        "null"
6895    ///      ],
6896    ///      "format": "int32"
6897    ///    },
6898    ///    "name": {
6899    ///      "type": [
6900    ///        "string",
6901    ///        "null"
6902    ///      ]
6903    ///    },
6904    ///    "portal_ids": {
6905    ///      "type": [
6906    ///        "array",
6907    ///        "null"
6908    ///      ],
6909    ///      "items": {
6910    ///        "type": "string"
6911    ///      }
6912    ///    },
6913    ///    "schedules": {
6914    ///      "description": "When set, replaces all schedule entries. Required when changing times/recurrence on an\ninvite that already has multiple schedule entries.",
6915    ///      "type": [
6916    ///        "array",
6917    ///        "null"
6918    ///      ],
6919    ///      "items": {
6920    ///        "$ref": "#/components/schemas/InviteScheduleEntryInput"
6921    ///      }
6922    ///    },
6923    ///    "valid_from": {
6924    ///      "type": [
6925    ///        "string",
6926    ///        "null"
6927    ///      ]
6928    ///    },
6929    ///    "valid_to": {
6930    ///      "type": [
6931    ///        "string",
6932    ///        "null"
6933    ///      ]
6934    ///    }
6935    ///  }
6936    ///}
6937    /// ```
6938    /// </details>
6939    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6940    pub struct UpdateAccessInviteRequest {
6941        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6942        pub disabled_justification: ::std::option::Option<::std::string::String>,
6943        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6944        pub expires_in: ::std::option::Option<::std::string::String>,
6945        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6946        pub invite_recurrence: ::std::option::Option<::serde_json::Value>,
6947        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6948        pub invitee_message: ::std::option::Option<::serde_json::Value>,
6949        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6950        pub is_enabled: ::std::option::Option<bool>,
6951        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6952        pub max_uses: ::std::option::Option<i32>,
6953        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6954        pub name: ::std::option::Option<::std::string::String>,
6955        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6956        pub portal_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
6957        /**When set, replaces all schedule entries. Required when changing times/recurrence on an
6958        invite that already has multiple schedule entries.*/
6959        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6960        pub schedules: ::std::option::Option<::std::vec::Vec<InviteScheduleEntryInput>>,
6961        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6962        pub valid_from: ::std::option::Option<::std::string::String>,
6963        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6964        pub valid_to: ::std::option::Option<::std::string::String>,
6965    }
6966    impl ::std::default::Default for UpdateAccessInviteRequest {
6967        fn default() -> Self {
6968            Self {
6969                disabled_justification: Default::default(),
6970                expires_in: Default::default(),
6971                invite_recurrence: Default::default(),
6972                invitee_message: Default::default(),
6973                is_enabled: Default::default(),
6974                max_uses: Default::default(),
6975                name: Default::default(),
6976                portal_ids: Default::default(),
6977                schedules: Default::default(),
6978                valid_from: Default::default(),
6979                valid_to: Default::default(),
6980            }
6981        }
6982    }
6983    ///`UpdateAccessPortalRequest`
6984    ///
6985    /// <details><summary>JSON schema</summary>
6986    ///
6987    /// ```json
6988    ///{
6989    ///  "type": "object",
6990    ///  "properties": {
6991    ///    "device_external_id": {
6992    ///      "description": "Device external_id. Must be a virtual_access_portal device in this integration. Use null to unlink.",
6993    ///      "type": [
6994    ///        "string",
6995    ///        "null"
6996    ///      ]
6997    ///    },
6998    ///    "name": {
6999    ///      "oneOf": [
7000    ///        {
7001    ///          "type": "null"
7002    ///        },
7003    ///        {
7004    ///          "oneOf": [
7005    ///            {
7006    ///              "$ref": "#/components/schemas/LocalizedString"
7007    ///            }
7008    ///          ]
7009    ///        }
7010    ///      ]
7011    ///    }
7012    ///  }
7013    ///}
7014    /// ```
7015    /// </details>
7016    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7017    pub struct UpdateAccessPortalRequest {
7018        ///Device external_id. Must be a virtual_access_portal device in this integration. Use null to unlink.
7019        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7020        pub device_external_id: ::std::option::Option<::std::string::String>,
7021        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7022        pub name: ::std::option::Option<LocalizedString>,
7023    }
7024    impl ::std::default::Default for UpdateAccessPortalRequest {
7025        fn default() -> Self {
7026            Self {
7027                device_external_id: Default::default(),
7028                name: Default::default(),
7029            }
7030        }
7031    }
7032    ///`UpdateApiKeyRequest`
7033    ///
7034    /// <details><summary>JSON schema</summary>
7035    ///
7036    /// ```json
7037    ///{
7038    ///  "type": "object",
7039    ///  "required": [
7040    ///    "name"
7041    ///  ],
7042    ///  "properties": {
7043    ///    "expires_at": {
7044    ///      "description": "RFC3339 absolute expiration timestamp. Mutually exclusive with expires_in. Optional; if omitted, expiry is unchanged.",
7045    ///      "type": [
7046    ///        "string",
7047    ///        "null"
7048    ///      ]
7049    ///    },
7050    ///    "expires_in": {
7051    ///      "description": "Duration from now, e.g. \"1d\", \"2w\", \"90d\". Mutually exclusive with expires_at. Optional; if omitted, expiry is unchanged.",
7052    ///      "type": [
7053    ///        "string",
7054    ///        "null"
7055    ///      ]
7056    ///    },
7057    ///    "name": {
7058    ///      "type": "string"
7059    ///    }
7060    ///  }
7061    ///}
7062    /// ```
7063    /// </details>
7064    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7065    pub struct UpdateApiKeyRequest {
7066        ///RFC3339 absolute expiration timestamp. Mutually exclusive with expires_in. Optional; if omitted, expiry is unchanged.
7067        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7068        pub expires_at: ::std::option::Option<::std::string::String>,
7069        ///Duration from now, e.g. "1d", "2w", "90d". Mutually exclusive with expires_at. Optional; if omitted, expiry is unchanged.
7070        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7071        pub expires_in: ::std::option::Option<::std::string::String>,
7072        pub name: ::std::string::String,
7073    }
7074    ///`UpdateDeviceRequest`
7075    ///
7076    /// <details><summary>JSON schema</summary>
7077    ///
7078    /// ```json
7079    ///{
7080    ///  "type": "object",
7081    ///  "properties": {
7082    ///    "device_metadata": {},
7083    ///    "external_id": {
7084    ///      "type": [
7085    ///        "string",
7086    ///        "null"
7087    ///      ]
7088    ///    },
7089    ///    "name": {
7090    ///      "oneOf": [
7091    ///        {
7092    ///          "type": "null"
7093    ///        },
7094    ///        {
7095    ///          "oneOf": [
7096    ///            {
7097    ///              "$ref": "#/components/schemas/LocalizedString"
7098    ///            }
7099    ///          ]
7100    ///        }
7101    ///      ]
7102    ///    }
7103    ///  }
7104    ///}
7105    /// ```
7106    /// </details>
7107    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7108    pub struct UpdateDeviceRequest {
7109        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7110        pub device_metadata: ::std::option::Option<::serde_json::Value>,
7111        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7112        pub external_id: ::std::option::Option<::std::string::String>,
7113        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7114        pub name: ::std::option::Option<LocalizedString>,
7115    }
7116    impl ::std::default::Default for UpdateDeviceRequest {
7117        fn default() -> Self {
7118            Self {
7119                device_metadata: Default::default(),
7120                external_id: Default::default(),
7121                name: Default::default(),
7122            }
7123        }
7124    }
7125    ///`UpdateEntityRequest`
7126    ///
7127    /// <details><summary>JSON schema</summary>
7128    ///
7129    /// ```json
7130    ///{
7131    ///  "type": "object",
7132    ///  "properties": {
7133    ///    "channel_index": {
7134    ///      "type": [
7135    ///        "integer",
7136    ///        "null"
7137    ///      ],
7138    ///      "format": "int32"
7139    ///    },
7140    ///    "entity_type": {
7141    ///      "type": [
7142    ///        "string",
7143    ///        "null"
7144    ///      ]
7145    ///    },
7146    ///    "external_id": {
7147    ///      "type": [
7148    ///        "string",
7149    ///        "null"
7150    ///      ]
7151    ///    },
7152    ///    "metadata": {
7153    ///      "description": "Update (replace) persisted entity metadata.\n\n- `None`: no change\n- `Some(None)`: clear metadata\n- `Some(Some(map))`: replace with provided map",
7154    ///      "type": [
7155    ///        "object",
7156    ///        "null"
7157    ///      ],
7158    ///      "additionalProperties": {}
7159    ///    },
7160    ///    "name": {
7161    ///      "description": "Update entity name.\n\n- `None`: no change\n- `Some(None)`: clear\n- `Some(Some(name))`: set (trimmed; empty becomes clear)",
7162    ///      "type": [
7163    ///        "string",
7164    ///        "null"
7165    ///      ]
7166    ///    },
7167    ///    "zone_id": {
7168    ///      "type": [
7169    ///        "string",
7170    ///        "null"
7171    ///      ]
7172    ///    }
7173    ///  }
7174    ///}
7175    /// ```
7176    /// </details>
7177    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7178    pub struct UpdateEntityRequest {
7179        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7180        pub channel_index: ::std::option::Option<i32>,
7181        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7182        pub entity_type: ::std::option::Option<::std::string::String>,
7183        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7184        pub external_id: ::std::option::Option<::std::string::String>,
7185        /**Update (replace) persisted entity metadata.
7186
7187        - `None`: no change
7188        - `Some(None)`: clear metadata
7189        - `Some(Some(map))`: replace with provided map*/
7190        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7191        pub metadata:
7192            ::std::option::Option<::serde_json::Map<::std::string::String, ::serde_json::Value>>,
7193        /**Update entity name.
7194
7195        - `None`: no change
7196        - `Some(None)`: clear
7197        - `Some(Some(name))`: set (trimmed; empty becomes clear)*/
7198        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7199        pub name: ::std::option::Option<::std::string::String>,
7200        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7201        pub zone_id: ::std::option::Option<::std::string::String>,
7202    }
7203    impl ::std::default::Default for UpdateEntityRequest {
7204        fn default() -> Self {
7205            Self {
7206                channel_index: Default::default(),
7207                entity_type: Default::default(),
7208                external_id: Default::default(),
7209                metadata: Default::default(),
7210                name: Default::default(),
7211                zone_id: Default::default(),
7212            }
7213        }
7214    }
7215    ///`UpdateIntegrationRequest`
7216    ///
7217    /// <details><summary>JSON schema</summary>
7218    ///
7219    /// ```json
7220    ///{
7221    ///  "type": "object",
7222    ///  "properties": {
7223    ///    "config": {
7224    ///      "description": "Tri-state patch semantics for `config`:\n- field omitted: do not change config\n- `\"config\": null`: clear config (set to None)\n- `\"config\": { ... }`: replace config (do not merge)"
7225    ///    },
7226    ///    "enabled": {
7227    ///      "type": [
7228    ///        "boolean",
7229    ///        "null"
7230    ///      ]
7231    ///    },
7232    ///    "name": {
7233    ///      "oneOf": [
7234    ///        {
7235    ///          "type": "null"
7236    ///        },
7237    ///        {
7238    ///          "oneOf": [
7239    ///            {
7240    ///              "$ref": "#/components/schemas/LocalizedString"
7241    ///            }
7242    ///          ]
7243    ///        }
7244    ///      ]
7245    ///    },
7246    ///    "provider_type": {
7247    ///      "type": [
7248    ///        "string",
7249    ///        "null"
7250    ///      ]
7251    ///    },
7252    ///    "secrets": {
7253    ///      "description": "Tri-state patch semantics for `secrets` (stored in Secrets Manager):\n- field omitted: do not change secrets\n- `\"secrets\": null`: clear secrets\n- `\"secrets\": { ... }`: replace secrets"
7254    ///    }
7255    ///  }
7256    ///}
7257    /// ```
7258    /// </details>
7259    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7260    pub struct UpdateIntegrationRequest {
7261        /**Tri-state patch semantics for `config`:
7262        - field omitted: do not change config
7263        - `"config": null`: clear config (set to None)
7264        - `"config": { ... }`: replace config (do not merge)*/
7265        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7266        pub config: ::std::option::Option<::serde_json::Value>,
7267        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7268        pub enabled: ::std::option::Option<bool>,
7269        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7270        pub name: ::std::option::Option<LocalizedString>,
7271        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7272        pub provider_type: ::std::option::Option<::std::string::String>,
7273        /**Tri-state patch semantics for `secrets` (stored in Secrets Manager):
7274        - field omitted: do not change secrets
7275        - `"secrets": null`: clear secrets
7276        - `"secrets": { ... }`: replace secrets*/
7277        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7278        pub secrets: ::std::option::Option<::serde_json::Value>,
7279    }
7280    impl ::std::default::Default for UpdateIntegrationRequest {
7281        fn default() -> Self {
7282            Self {
7283                config: Default::default(),
7284                enabled: Default::default(),
7285                name: Default::default(),
7286                provider_type: Default::default(),
7287                secrets: Default::default(),
7288            }
7289        }
7290    }
7291    ///`UpdateOrganizationRequest`
7292    ///
7293    /// <details><summary>JSON schema</summary>
7294    ///
7295    /// ```json
7296    ///{
7297    ///  "type": "object",
7298    ///  "properties": {
7299    ///    "description": {
7300    ///      "type": [
7301    ///        "string",
7302    ///        "null"
7303    ///      ]
7304    ///    },
7305    ///    "name": {
7306    ///      "oneOf": [
7307    ///        {
7308    ///          "type": "null"
7309    ///        },
7310    ///        {
7311    ///          "oneOf": [
7312    ///            {
7313    ///              "$ref": "#/components/schemas/LocalizedString"
7314    ///            }
7315    ///          ]
7316    ///        }
7317    ///      ]
7318    ///    }
7319    ///  }
7320    ///}
7321    /// ```
7322    /// </details>
7323    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7324    pub struct UpdateOrganizationRequest {
7325        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7326        pub description: ::std::option::Option<::std::string::String>,
7327        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7328        pub name: ::std::option::Option<LocalizedString>,
7329    }
7330    impl ::std::default::Default for UpdateOrganizationRequest {
7331        fn default() -> Self {
7332            Self {
7333                description: Default::default(),
7334                name: Default::default(),
7335            }
7336        }
7337    }
7338    ///`UpdateUserRequest`
7339    ///
7340    /// <details><summary>JSON schema</summary>
7341    ///
7342    /// ```json
7343    ///{
7344    ///  "type": "object",
7345    ///  "properties": {
7346    ///    "email": {
7347    ///      "type": [
7348    ///        "string",
7349    ///        "null"
7350    ///      ]
7351    ///    },
7352    ///    "id": {
7353    ///      "type": [
7354    ///        "string",
7355    ///        "null"
7356    ///      ]
7357    ///    },
7358    ///    "name": {
7359    ///      "oneOf": [
7360    ///        {
7361    ///          "type": "null"
7362    ///        },
7363    ///        {
7364    ///          "oneOf": [
7365    ///            {
7366    ///              "$ref": "#/components/schemas/LocalizedString"
7367    ///            }
7368    ///          ]
7369    ///        }
7370    ///      ]
7371    ///    }
7372    ///  }
7373    ///}
7374    /// ```
7375    /// </details>
7376    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7377    pub struct UpdateUserRequest {
7378        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7379        pub email: ::std::option::Option<::std::string::String>,
7380        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7381        pub id: ::std::option::Option<::std::string::String>,
7382        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7383        pub name: ::std::option::Option<LocalizedString>,
7384    }
7385    impl ::std::default::Default for UpdateUserRequest {
7386        fn default() -> Self {
7387            Self {
7388                email: Default::default(),
7389                id: Default::default(),
7390                name: Default::default(),
7391            }
7392        }
7393    }
7394    ///`UpdateZoneRequest`
7395    ///
7396    /// <details><summary>JSON schema</summary>
7397    ///
7398    /// ```json
7399    ///{
7400    ///  "type": "object",
7401    ///  "properties": {
7402    ///    "external_id": {
7403    ///      "type": [
7404    ///        "string",
7405    ///        "null"
7406    ///      ]
7407    ///    },
7408    ///    "name": {
7409    ///      "oneOf": [
7410    ///        {
7411    ///          "type": "null"
7412    ///        },
7413    ///        {
7414    ///          "oneOf": [
7415    ///            {
7416    ///              "$ref": "#/components/schemas/LocalizedString"
7417    ///            }
7418    ///          ]
7419    ///        }
7420    ///      ]
7421    ///    },
7422    ///    "parent_zone_id": {
7423    ///      "type": [
7424    ///        "string",
7425    ///        "null"
7426    ///      ]
7427    ///    }
7428    ///  }
7429    ///}
7430    /// ```
7431    /// </details>
7432    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7433    pub struct UpdateZoneRequest {
7434        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7435        pub external_id: ::std::option::Option<::std::string::String>,
7436        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7437        pub name: ::std::option::Option<LocalizedString>,
7438        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7439        pub parent_zone_id: ::std::option::Option<::std::string::String>,
7440    }
7441    impl ::std::default::Default for UpdateZoneRequest {
7442        fn default() -> Self {
7443            Self {
7444                external_id: Default::default(),
7445                name: Default::default(),
7446                parent_zone_id: Default::default(),
7447            }
7448        }
7449    }
7450    ///A provisioned user (identity) in the system.
7451    ///
7452    /// <details><summary>JSON schema</summary>
7453    ///
7454    /// ```json
7455    ///{
7456    ///  "description": "A provisioned user (identity) in the system.",
7457    ///  "type": "object",
7458    ///  "required": [
7459    ///    "email",
7460    ///    "id",
7461    ///    "name"
7462    ///  ],
7463    ///  "properties": {
7464    ///    "email": {
7465    ///      "description": "Email address (used for login and provisioning).",
7466    ///      "type": "string"
7467    ///    },
7468    ///    "id": {
7469    ///      "description": "Unique identifier (ULID).",
7470    ///      "type": "string"
7471    ///    },
7472    ///    "metadata": {
7473    ///      "oneOf": [
7474    ///        {
7475    ///          "type": "null"
7476    ///        },
7477    ///        {
7478    ///          "oneOf": [
7479    ///            {
7480    ///              "$ref": "#/components/schemas/HashMap"
7481    ///            }
7482    ///          ]
7483    ///        }
7484    ///      ]
7485    ///    },
7486    ///    "name": {
7487    ///      "$ref": "#/components/schemas/LocalizedString"
7488    ///    }
7489    ///  }
7490    ///}
7491    /// ```
7492    /// </details>
7493    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7494    pub struct User {
7495        ///Email address (used for login and provisioning).
7496        pub email: ::std::string::String,
7497        ///Unique identifier (ULID).
7498        pub id: ::std::string::String,
7499        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7500        pub metadata: ::std::option::Option<HashMap>,
7501        pub name: LocalizedString,
7502    }
7503    ///`UserResponse`
7504    ///
7505    /// <details><summary>JSON schema</summary>
7506    ///
7507    /// ```json
7508    ///{
7509    ///  "allOf": [
7510    ///    {
7511    ///      "$ref": "#/components/schemas/User"
7512    ///    },
7513    ///    {
7514    ///      "oneOf": [
7515    ///        {
7516    ///          "type": "null"
7517    ///        },
7518    ///        {
7519    ///          "oneOf": [
7520    ///            {
7521    ///              "$ref": "#/components/schemas/StorageFeatures"
7522    ///            }
7523    ///          ]
7524    ///        }
7525    ///      ]
7526    ///    },
7527    ///    {
7528    ///      "type": "object",
7529    ///      "required": [
7530    ///        "roles"
7531    ///      ],
7532    ///      "properties": {
7533    ///        "roles": {
7534    ///          "type": "object",
7535    ///          "additionalProperties": {
7536    ///            "type": "array",
7537    ///            "items": {
7538    ///              "$ref": "#/components/schemas/Role"
7539    ///            }
7540    ///          }
7541    ///        }
7542    ///      }
7543    ///    }
7544    ///  ]
7545    ///}
7546    /// ```
7547    /// </details>
7548    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7549    pub struct UserResponse {
7550        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7551        pub cache_hit: ::std::option::Option<bool>,
7552        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7553        pub cache_ttl: ::std::option::Option<i64>,
7554        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7555        pub created_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
7556        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7557        pub deleted_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
7558        ///Email address (used for login and provisioning).
7559        pub email: ::std::string::String,
7560        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7561        pub hard_delete_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
7562        ///Unique identifier (ULID).
7563        pub id: ::std::string::String,
7564        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7565        pub metadata: ::std::option::Option<HashMap>,
7566        pub name: LocalizedString,
7567        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7568        pub purge_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
7569        pub roles: ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<Role>>,
7570        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7571        pub updated_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
7572    }
7573    /**A logical or physical space (recursive for hierarchy).
7574
7575    Example: Floor 1 > Living Room > TV Nook*/
7576    ///
7577    /// <details><summary>JSON schema</summary>
7578    ///
7579    /// ```json
7580    ///{
7581    ///  "description": "A logical or physical space (recursive for hierarchy).\n\nExample: Floor 1 > Living Room > TV Nook",
7582    ///  "type": "object",
7583    ///  "required": [
7584    ///    "id",
7585    ///    "integration_id",
7586    ///    "name"
7587    ///  ],
7588    ///  "properties": {
7589    ///    "external_id": {
7590    ///      "description": "External ID from the integration.",
7591    ///      "type": [
7592    ///        "string",
7593    ///        "null"
7594    ///      ]
7595    ///    },
7596    ///    "id": {
7597    ///      "description": "Unique identifier (ULID).",
7598    ///      "type": "string"
7599    ///    },
7600    ///    "integration_id": {
7601    ///      "description": "Integration this zone belongs to.",
7602    ///      "type": "string"
7603    ///    },
7604    ///    "metadata": {
7605    ///      "oneOf": [
7606    ///        {
7607    ///          "type": "null"
7608    ///        },
7609    ///        {
7610    ///          "oneOf": [
7611    ///            {
7612    ///              "$ref": "#/components/schemas/HashMap"
7613    ///            }
7614    ///          ]
7615    ///        }
7616    ///      ]
7617    ///    },
7618    ///    "name": {
7619    ///      "$ref": "#/components/schemas/LocalizedString"
7620    ///    },
7621    ///    "parent_zone_id": {
7622    ///      "description": "Parent zone for hierarchy.",
7623    ///      "type": [
7624    ///        "string",
7625    ///        "null"
7626    ///      ]
7627    ///    }
7628    ///  }
7629    ///}
7630    /// ```
7631    /// </details>
7632    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7633    pub struct Zone {
7634        ///External ID from the integration.
7635        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7636        pub external_id: ::std::option::Option<::std::string::String>,
7637        ///Unique identifier (ULID).
7638        pub id: ::std::string::String,
7639        ///Integration this zone belongs to.
7640        pub integration_id: ::std::string::String,
7641        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7642        pub metadata: ::std::option::Option<HashMap>,
7643        pub name: LocalizedString,
7644        ///Parent zone for hierarchy.
7645        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7646        pub parent_zone_id: ::std::option::Option<::std::string::String>,
7647    }
7648    ///`ZoneResponse`
7649    ///
7650    /// <details><summary>JSON schema</summary>
7651    ///
7652    /// ```json
7653    ///{
7654    ///  "allOf": [
7655    ///    {
7656    ///      "$ref": "#/components/schemas/Zone"
7657    ///    },
7658    ///    {
7659    ///      "oneOf": [
7660    ///        {
7661    ///          "type": "null"
7662    ///        },
7663    ///        {
7664    ///          "oneOf": [
7665    ///            {
7666    ///              "$ref": "#/components/schemas/StorageFeatures"
7667    ///            }
7668    ///          ]
7669    ///        }
7670    ///      ]
7671    ///    }
7672    ///  ]
7673    ///}
7674    /// ```
7675    /// </details>
7676    #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7677    pub struct ZoneResponse {
7678        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7679        pub cache_hit: ::std::option::Option<bool>,
7680        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7681        pub cache_ttl: ::std::option::Option<i64>,
7682        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7683        pub created_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
7684        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7685        pub deleted_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
7686        ///External ID from the integration.
7687        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7688        pub external_id: ::std::option::Option<::std::string::String>,
7689        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7690        pub hard_delete_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
7691        ///Unique identifier (ULID).
7692        pub id: ::std::string::String,
7693        ///Integration this zone belongs to.
7694        pub integration_id: ::std::string::String,
7695        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7696        pub metadata: ::std::option::Option<HashMap>,
7697        pub name: LocalizedString,
7698        ///Parent zone for hierarchy.
7699        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7700        pub parent_zone_id: ::std::option::Option<::std::string::String>,
7701        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7702        pub purge_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
7703        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7704        pub updated_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
7705    }
7706}
7707#[derive(Clone, Debug)]
7708/**Client for OpenApp API
7709
7710IoT Device Management (Gates/Doors/Provisioning) API
7711
7712Version: v1*/
7713pub struct Client {
7714    pub(crate) baseurl: String,
7715    pub(crate) client: reqwest::Client,
7716}
7717impl Client {
7718    /// Create a new client.
7719    ///
7720    /// `baseurl` is the base URL provided to the internal
7721    /// `reqwest::Client`, and should include a scheme and hostname,
7722    /// as well as port and a path stem if applicable.
7723    pub fn new(baseurl: &str) -> Self {
7724        #[cfg(not(target_arch = "wasm32"))]
7725        let client = {
7726            let dur = ::std::time::Duration::from_secs(15u64);
7727            reqwest::ClientBuilder::new()
7728                .connect_timeout(dur)
7729                .timeout(dur)
7730        };
7731        #[cfg(target_arch = "wasm32")]
7732        let client = reqwest::ClientBuilder::new();
7733        Self::new_with_client(baseurl, client.build().unwrap())
7734    }
7735    /// Construct a new client with an existing `reqwest::Client`,
7736    /// allowing more control over its configuration.
7737    ///
7738    /// `baseurl` is the base URL provided to the internal
7739    /// `reqwest::Client`, and should include a scheme and hostname,
7740    /// as well as port and a path stem if applicable.
7741    pub fn new_with_client(baseurl: &str, client: reqwest::Client) -> Self {
7742        Self {
7743            baseurl: baseurl.to_string(),
7744            client,
7745        }
7746    }
7747}
7748impl ClientInfo<()> for Client {
7749    fn api_version() -> &'static str {
7750        "v1"
7751    }
7752    fn baseurl(&self) -> &str {
7753        self.baseurl.as_str()
7754    }
7755    fn client(&self) -> &reqwest::Client {
7756        &self.client
7757    }
7758    fn inner(&self) -> &() {
7759        &()
7760    }
7761}
7762impl ClientHooks<()> for &Client {}
7763#[allow(clippy::all)]
7764impl Client {
7765    /**Sends a `GET` request to `/admin/quota_overrides`
7766
7767    */
7768    pub async fn get_admin_quota_overrides<'a>(&'a self) -> Result<ResponseValue<()>, Error<()>> {
7769        let url = format!("{}/admin/quota_overrides", self.baseurl,);
7770        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7771        header_map.append(
7772            ::reqwest::header::HeaderName::from_static("api-version"),
7773            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7774        );
7775        #[allow(unused_mut)]
7776        let mut request = self.client.get(url).headers(header_map).build()?;
7777        let info = OperationInfo {
7778            operation_id: "get_admin_quota_overrides",
7779        };
7780        self.pre(&mut request, &info).await?;
7781        let result = self.exec(request, &info).await;
7782        self.post(&result, &info).await?;
7783        let response = result?;
7784        match response.status().as_u16() {
7785            200u16 => Ok(ResponseValue::empty(response)),
7786            _ => Err(Error::UnexpectedResponse(response)),
7787        }
7788    }
7789    /**Sends a `POST` request to `/admin/quota_overrides`
7790
7791    */
7792    pub async fn post_admin_quota_override<'a>(
7793        &'a self,
7794        body: &'a types::QuotaOverrideRequest,
7795    ) -> Result<ResponseValue<()>, Error<()>> {
7796        let url = format!("{}/admin/quota_overrides", self.baseurl,);
7797        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7798        header_map.append(
7799            ::reqwest::header::HeaderName::from_static("api-version"),
7800            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7801        );
7802        #[allow(unused_mut)]
7803        let mut request = self
7804            .client
7805            .post(url)
7806            .json(&body)
7807            .headers(header_map)
7808            .build()?;
7809        let info = OperationInfo {
7810            operation_id: "post_admin_quota_override",
7811        };
7812        self.pre(&mut request, &info).await?;
7813        let result = self.exec(request, &info).await;
7814        self.post(&result, &info).await?;
7815        let response = result?;
7816        match response.status().as_u16() {
7817            200u16 => Ok(ResponseValue::empty(response)),
7818            _ => Err(Error::UnexpectedResponse(response)),
7819        }
7820    }
7821    /**Sends a `GET` request to `/api-keys`
7822
7823    */
7824    pub async fn list_api_keys<'a>(
7825        &'a self,
7826    ) -> Result<ResponseValue<::std::vec::Vec<types::ApiKeyListItem>>, Error<()>> {
7827        let url = format!("{}/api-keys", self.baseurl,);
7828        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7829        header_map.append(
7830            ::reqwest::header::HeaderName::from_static("api-version"),
7831            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7832        );
7833        #[allow(unused_mut)]
7834        let mut request = self
7835            .client
7836            .get(url)
7837            .header(
7838                ::reqwest::header::ACCEPT,
7839                ::reqwest::header::HeaderValue::from_static("application/json"),
7840            )
7841            .headers(header_map)
7842            .build()?;
7843        let info = OperationInfo {
7844            operation_id: "list_api_keys",
7845        };
7846        self.pre(&mut request, &info).await?;
7847        let result = self.exec(request, &info).await;
7848        self.post(&result, &info).await?;
7849        let response = result?;
7850        match response.status().as_u16() {
7851            200u16 => ResponseValue::from_response(response).await,
7852            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
7853            500u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
7854            _ => Err(Error::UnexpectedResponse(response)),
7855        }
7856    }
7857    /**Sends a `POST` request to `/api-keys`
7858
7859    */
7860    pub async fn create_api_key<'a>(
7861        &'a self,
7862        body: &'a types::CreateApiKeyRequest,
7863    ) -> Result<ResponseValue<types::CreateApiKeyResponse>, Error<()>> {
7864        let url = format!("{}/api-keys", self.baseurl,);
7865        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7866        header_map.append(
7867            ::reqwest::header::HeaderName::from_static("api-version"),
7868            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7869        );
7870        #[allow(unused_mut)]
7871        let mut request = self
7872            .client
7873            .post(url)
7874            .header(
7875                ::reqwest::header::ACCEPT,
7876                ::reqwest::header::HeaderValue::from_static("application/json"),
7877            )
7878            .json(&body)
7879            .headers(header_map)
7880            .build()?;
7881        let info = OperationInfo {
7882            operation_id: "create_api_key",
7883        };
7884        self.pre(&mut request, &info).await?;
7885        let result = self.exec(request, &info).await;
7886        self.post(&result, &info).await?;
7887        let response = result?;
7888        match response.status().as_u16() {
7889            201u16 => ResponseValue::from_response(response).await,
7890            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
7891            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
7892            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
7893            500u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
7894            _ => Err(Error::UnexpectedResponse(response)),
7895        }
7896    }
7897    /**Sends a `DELETE` request to `/api-keys/{id}`
7898
7899    Arguments:
7900    - `id`: API key ID
7901    */
7902    pub async fn revoke_api_key<'a>(&'a self, id: &'a str) -> Result<ResponseValue<()>, Error<()>> {
7903        let url = format!("{}/api-keys/{}", self.baseurl, encode_path(&id.to_string()),);
7904        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7905        header_map.append(
7906            ::reqwest::header::HeaderName::from_static("api-version"),
7907            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7908        );
7909        #[allow(unused_mut)]
7910        let mut request = self.client.delete(url).headers(header_map).build()?;
7911        let info = OperationInfo {
7912            operation_id: "revoke_api_key",
7913        };
7914        self.pre(&mut request, &info).await?;
7915        let result = self.exec(request, &info).await;
7916        self.post(&result, &info).await?;
7917        let response = result?;
7918        match response.status().as_u16() {
7919            204u16 => Ok(ResponseValue::empty(response)),
7920            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
7921            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
7922            500u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
7923            _ => Err(Error::UnexpectedResponse(response)),
7924        }
7925    }
7926    /**Sends a `PATCH` request to `/api-keys/{id}`
7927
7928    Arguments:
7929    - `id`: API key ID
7930    - `body`
7931    */
7932    pub async fn update_api_key<'a>(
7933        &'a self,
7934        id: &'a str,
7935        body: &'a types::UpdateApiKeyRequest,
7936    ) -> Result<ResponseValue<()>, Error<()>> {
7937        let url = format!("{}/api-keys/{}", self.baseurl, encode_path(&id.to_string()),);
7938        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7939        header_map.append(
7940            ::reqwest::header::HeaderName::from_static("api-version"),
7941            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7942        );
7943        #[allow(unused_mut)]
7944        let mut request = self
7945            .client
7946            .patch(url)
7947            .json(&body)
7948            .headers(header_map)
7949            .build()?;
7950        let info = OperationInfo {
7951            operation_id: "update_api_key",
7952        };
7953        self.pre(&mut request, &info).await?;
7954        let result = self.exec(request, &info).await;
7955        self.post(&result, &info).await?;
7956        let response = result?;
7957        match response.status().as_u16() {
7958            204u16 => Ok(ResponseValue::empty(response)),
7959            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
7960            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
7961            500u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
7962            _ => Err(Error::UnexpectedResponse(response)),
7963        }
7964    }
7965    /**Sends a `DELETE` request to `/api-keys/{id}/purge`
7966
7967    Arguments:
7968    - `id`: API key ID
7969    */
7970    pub async fn purge_api_key<'a>(&'a self, id: &'a str) -> Result<ResponseValue<()>, Error<()>> {
7971        let url = format!(
7972            "{}/api-keys/{}/purge",
7973            self.baseurl,
7974            encode_path(&id.to_string()),
7975        );
7976        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
7977        header_map.append(
7978            ::reqwest::header::HeaderName::from_static("api-version"),
7979            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
7980        );
7981        #[allow(unused_mut)]
7982        let mut request = self.client.delete(url).headers(header_map).build()?;
7983        let info = OperationInfo {
7984            operation_id: "purge_api_key",
7985        };
7986        self.pre(&mut request, &info).await?;
7987        let result = self.exec(request, &info).await;
7988        self.post(&result, &info).await?;
7989        let response = result?;
7990        match response.status().as_u16() {
7991            204u16 => Ok(ResponseValue::empty(response)),
7992            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
7993            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
7994            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
7995            409u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
7996            500u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
7997            _ => Err(Error::UnexpectedResponse(response)),
7998        }
7999    }
8000    /**Sends a `POST` request to `/api-keys/{id}/restore`
8001
8002    Arguments:
8003    - `id`: API key ID
8004    */
8005    pub async fn restore_api_key<'a>(
8006        &'a self,
8007        id: &'a str,
8008    ) -> Result<ResponseValue<()>, Error<()>> {
8009        let url = format!(
8010            "{}/api-keys/{}/restore",
8011            self.baseurl,
8012            encode_path(&id.to_string()),
8013        );
8014        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8015        header_map.append(
8016            ::reqwest::header::HeaderName::from_static("api-version"),
8017            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8018        );
8019        #[allow(unused_mut)]
8020        let mut request = self.client.post(url).headers(header_map).build()?;
8021        let info = OperationInfo {
8022            operation_id: "restore_api_key",
8023        };
8024        self.pre(&mut request, &info).await?;
8025        let result = self.exec(request, &info).await;
8026        self.post(&result, &info).await?;
8027        let response = result?;
8028        match response.status().as_u16() {
8029            204u16 => Ok(ResponseValue::empty(response)),
8030            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
8031            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
8032            409u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
8033            500u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
8034            _ => Err(Error::UnexpectedResponse(response)),
8035        }
8036    }
8037    /**Same as [`get_auth_session`] but under a path that is not stripped by some edge WAF rules
8038    (which block URL segments named `session` or `whoami`)
8039
8040    Sends a `GET` request to `/auth/kratos-identity`
8041
8042    */
8043    pub async fn get_auth_kratos_identity<'a>(&'a self) -> Result<ResponseValue<()>, Error<()>> {
8044        let url = format!("{}/auth/kratos-identity", self.baseurl,);
8045        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8046        header_map.append(
8047            ::reqwest::header::HeaderName::from_static("api-version"),
8048            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8049        );
8050        #[allow(unused_mut)]
8051        let mut request = self.client.get(url).headers(header_map).build()?;
8052        let info = OperationInfo {
8053            operation_id: "get_auth_kratos_identity",
8054        };
8055        self.pre(&mut request, &info).await?;
8056        let result = self.exec(request, &info).await;
8057        self.post(&result, &info).await?;
8058        let response = result?;
8059        match response.status().as_u16() {
8060            200u16 => Ok(ResponseValue::empty(response)),
8061            _ => Err(Error::UnexpectedResponse(response)),
8062        }
8063    }
8064    /**Logout: clear session cookie so the browser becomes logged out
8065
8066    Sends a `POST` request to `/auth/logout`
8067
8068    */
8069    pub async fn post_auth_logout<'a>(&'a self) -> Result<ResponseValue<()>, Error<()>> {
8070        let url = format!("{}/auth/logout", self.baseurl,);
8071        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8072        header_map.append(
8073            ::reqwest::header::HeaderName::from_static("api-version"),
8074            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8075        );
8076        #[allow(unused_mut)]
8077        let mut request = self.client.post(url).headers(header_map).build()?;
8078        let info = OperationInfo {
8079            operation_id: "post_auth_logout",
8080        };
8081        self.pre(&mut request, &info).await?;
8082        let result = self.exec(request, &info).await;
8083        self.post(&result, &info).await?;
8084        let response = result?;
8085        match response.status().as_u16() {
8086            204u16 => Ok(ResponseValue::empty(response)),
8087            _ => Err(Error::UnexpectedResponse(response)),
8088        }
8089    }
8090    /**Lightweight provisioning check. Returns 204 if user is provisioned, 401 if not.
8091    No DB access; relies on X-User header set by middleware when provisioned
8092
8093    Sends a `GET` request to `/auth/provisioned`
8094
8095    */
8096    pub async fn get_auth_provisioned<'a>(&'a self) -> Result<ResponseValue<()>, Error<()>> {
8097        let url = format!("{}/auth/provisioned", self.baseurl,);
8098        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8099        header_map.append(
8100            ::reqwest::header::HeaderName::from_static("api-version"),
8101            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8102        );
8103        #[allow(unused_mut)]
8104        let mut request = self.client.get(url).headers(header_map).build()?;
8105        let info = OperationInfo {
8106            operation_id: "get_auth_provisioned",
8107        };
8108        self.pre(&mut request, &info).await?;
8109        let result = self.exec(request, &info).await;
8110        self.post(&result, &info).await?;
8111        let response = result?;
8112        match response.status().as_u16() {
8113            204u16 => Ok(ResponseValue::empty(response)),
8114            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
8115            _ => Err(Error::UnexpectedResponse(response)),
8116        }
8117    }
8118    /**Get current Kratos session if present, otherwise `null`. Public endpoint (anonymous allowed)
8119
8120    Sends a `GET` request to `/auth/session`
8121
8122    */
8123    pub async fn get_auth_session<'a>(&'a self) -> Result<ResponseValue<()>, Error<()>> {
8124        let url = format!("{}/auth/session", self.baseurl,);
8125        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8126        header_map.append(
8127            ::reqwest::header::HeaderName::from_static("api-version"),
8128            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8129        );
8130        #[allow(unused_mut)]
8131        let mut request = self.client.get(url).headers(header_map).build()?;
8132        let info = OperationInfo {
8133            operation_id: "get_auth_session",
8134        };
8135        self.pre(&mut request, &info).await?;
8136        let result = self.exec(request, &info).await;
8137        self.post(&result, &info).await?;
8138        let response = result?;
8139        match response.status().as_u16() {
8140            200u16 => Ok(ResponseValue::empty(response)),
8141            _ => Err(Error::UnexpectedResponse(response)),
8142        }
8143    }
8144    /**Sends a `POST` request to `/auth/sign-out`
8145
8146    */
8147    pub async fn post_auth_sign_out<'a>(&'a self) -> Result<ResponseValue<()>, Error<()>> {
8148        let url = format!("{}/auth/sign-out", self.baseurl,);
8149        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8150        header_map.append(
8151            ::reqwest::header::HeaderName::from_static("api-version"),
8152            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8153        );
8154        #[allow(unused_mut)]
8155        let mut request = self.client.post(url).headers(header_map).build()?;
8156        let info = OperationInfo {
8157            operation_id: "post_auth_sign_out",
8158        };
8159        self.pre(&mut request, &info).await?;
8160        let result = self.exec(request, &info).await;
8161        self.post(&result, &info).await?;
8162        let response = result?;
8163        match response.status().as_u16() {
8164            204u16 => Ok(ResponseValue::empty(response)),
8165            _ => Err(Error::UnexpectedResponse(response)),
8166        }
8167    }
8168    /**Sends a `GET` request to `/auth/whoami`
8169
8170    */
8171    pub async fn get_auth_whoami<'a>(&'a self) -> Result<ResponseValue<()>, Error<()>> {
8172        let url = format!("{}/auth/whoami", self.baseurl,);
8173        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8174        header_map.append(
8175            ::reqwest::header::HeaderName::from_static("api-version"),
8176            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8177        );
8178        #[allow(unused_mut)]
8179        let mut request = self.client.get(url).headers(header_map).build()?;
8180        let info = OperationInfo {
8181            operation_id: "get_auth_whoami",
8182        };
8183        self.pre(&mut request, &info).await?;
8184        let result = self.exec(request, &info).await;
8185        self.post(&result, &info).await?;
8186        let response = result?;
8187        match response.status().as_u16() {
8188            200u16 => Ok(ResponseValue::empty(response)),
8189            _ => Err(Error::UnexpectedResponse(response)),
8190        }
8191    }
8192    /**Sends a `POST` request to `/billing/webhooks/{provider}`
8193
8194    Arguments:
8195    - `provider`
8196    - `body`: Raw billing provider webhook payload
8197    */
8198    pub async fn post_billing_webhook<'a, B: Into<reqwest::Body>>(
8199        &'a self,
8200        provider: &'a str,
8201        body: B,
8202    ) -> Result<ResponseValue<types::BillingWebhookResponse>, Error<()>> {
8203        let url = format!(
8204            "{}/billing/webhooks/{}",
8205            self.baseurl,
8206            encode_path(&provider.to_string()),
8207        );
8208        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8209        header_map.append(
8210            ::reqwest::header::HeaderName::from_static("api-version"),
8211            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8212        );
8213        #[allow(unused_mut)]
8214        let mut request = self
8215            .client
8216            .post(url)
8217            .header(
8218                ::reqwest::header::ACCEPT,
8219                ::reqwest::header::HeaderValue::from_static("application/json"),
8220            )
8221            .header(
8222                ::reqwest::header::CONTENT_TYPE,
8223                ::reqwest::header::HeaderValue::from_static("application/octet-stream"),
8224            )
8225            .body(body)
8226            .headers(header_map)
8227            .build()?;
8228        let info = OperationInfo {
8229            operation_id: "post_billing_webhook",
8230        };
8231        self.pre(&mut request, &info).await?;
8232        let result = self.exec(request, &info).await;
8233        self.post(&result, &info).await?;
8234        let response = result?;
8235        match response.status().as_u16() {
8236            200u16 => ResponseValue::from_response(response).await,
8237            _ => Err(Error::UnexpectedResponse(response)),
8238        }
8239    }
8240    /**List devices for the organization context (X-Org)
8241
8242    Sends a `GET` request to `/devices`
8243
8244    Arguments:
8245    - `device_kind`: Optional filter: only devices with metadata.kind equal to this value (e.g. virtual_access_portal).
8246    Requires integration_id. Filtering done at SQL level.
8247    - `external_id`: Optional filter: only devices with this external_id. Requires integration_id and device_kind.
8248    Returns at most 1 device. Filtering done at SQL level.
8249    - `has_external_id`: When true, only devices with a non-empty `external_id`. Requires `integration_id`.
8250    - `has_go2rtc_channel`: When true, only devices whose metadata JSON has a non-empty `channel` (go2rtc cameras). Requires `integration_id`.
8251    - `include_deleted`
8252    - `include_metadata`
8253    - `include_stale`: When true with `integration_id`, include `stale` per device when the provider supports it.
8254    - `integration_id`: Optional filter: only devices belonging to this integration.
8255    - `limit`: Number of items per page. Default from config, max 200.
8256    - `offset`: Number of items to skip. Default 0.
8257    - `only_deleted`
8258    - `q`: Case-insensitive substring match on localized device name (JSON). Best-effort when `integration_id` is set (SQL ILIKE).
8259    - `x_org`
8260    */
8261    pub async fn list_devices<'a>(
8262        &'a self,
8263        device_kind: Option<&'a str>,
8264        external_id: Option<&'a str>,
8265        has_external_id: Option<bool>,
8266        has_go2rtc_channel: Option<bool>,
8267        include_deleted: bool,
8268        include_metadata: bool,
8269        include_stale: Option<bool>,
8270        integration_id: Option<&'a str>,
8271        limit: Option<i32>,
8272        offset: Option<i32>,
8273        only_deleted: bool,
8274        q: Option<&'a str>,
8275        x_org: &'a str,
8276    ) -> Result<ResponseValue<::std::vec::Vec<types::DeviceResponse>>, Error<types::ApiErrorResponse>>
8277    {
8278        let url = format!("{}/devices", self.baseurl,);
8279        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
8280        header_map.append(
8281            ::reqwest::header::HeaderName::from_static("api-version"),
8282            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8283        );
8284        header_map.append("X-Org", x_org.to_string().try_into()?);
8285        #[allow(unused_mut)]
8286        let mut request = self
8287            .client
8288            .get(url)
8289            .header(
8290                ::reqwest::header::ACCEPT,
8291                ::reqwest::header::HeaderValue::from_static("application/json"),
8292            )
8293            .query(&progenitor_client::QueryParam::new(
8294                "device_kind",
8295                &device_kind,
8296            ))
8297            .query(&progenitor_client::QueryParam::new(
8298                "external_id",
8299                &external_id,
8300            ))
8301            .query(&progenitor_client::QueryParam::new(
8302                "has_external_id",
8303                &has_external_id,
8304            ))
8305            .query(&progenitor_client::QueryParam::new(
8306                "has_go2rtc_channel",
8307                &has_go2rtc_channel,
8308            ))
8309            .query(&progenitor_client::QueryParam::new(
8310                "include_deleted",
8311                &include_deleted,
8312            ))
8313            .query(&progenitor_client::QueryParam::new(
8314                "include_metadata",
8315                &include_metadata,
8316            ))
8317            .query(&progenitor_client::QueryParam::new(
8318                "include_stale",
8319                &include_stale,
8320            ))
8321            .query(&progenitor_client::QueryParam::new(
8322                "integration_id",
8323                &integration_id,
8324            ))
8325            .query(&progenitor_client::QueryParam::new("limit", &limit))
8326            .query(&progenitor_client::QueryParam::new("offset", &offset))
8327            .query(&progenitor_client::QueryParam::new(
8328                "only_deleted",
8329                &only_deleted,
8330            ))
8331            .query(&progenitor_client::QueryParam::new("q", &q))
8332            .headers(header_map)
8333            .build()?;
8334        let info = OperationInfo {
8335            operation_id: "list_devices",
8336        };
8337        self.pre(&mut request, &info).await?;
8338        let result = self.exec(request, &info).await;
8339        self.post(&result, &info).await?;
8340        let response = result?;
8341        match response.status().as_u16() {
8342            200u16 => ResponseValue::from_response(response).await,
8343            401u16 => Err(Error::ErrorResponse(
8344                ResponseValue::from_response(response).await?,
8345            )),
8346            403u16 => Err(Error::ErrorResponse(
8347                ResponseValue::from_response(response).await?,
8348            )),
8349            500u16 => Err(Error::ErrorResponse(
8350                ResponseValue::from_response(response).await?,
8351            )),
8352            _ => Err(Error::UnexpectedResponse(response)),
8353        }
8354    }
8355    /**Create a device in an organization
8356
8357    Sends a `POST` request to `/devices`
8358
8359    Arguments:
8360    - `include_deleted`
8361    - `include_metadata`
8362    - `x_org`: Organization context (required)
8363    - `body`
8364    */
8365    pub async fn create_device<'a>(
8366        &'a self,
8367        include_deleted: Option<bool>,
8368        include_metadata: Option<bool>,
8369        x_org: &'a str,
8370        body: &'a types::CreateDeviceRequest,
8371    ) -> Result<ResponseValue<types::DeviceResponse>, Error<types::ApiErrorResponse>> {
8372        let url = format!("{}/devices", self.baseurl,);
8373        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
8374        header_map.append(
8375            ::reqwest::header::HeaderName::from_static("api-version"),
8376            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8377        );
8378        header_map.append("X-Org", x_org.to_string().try_into()?);
8379        #[allow(unused_mut)]
8380        let mut request = self
8381            .client
8382            .post(url)
8383            .header(
8384                ::reqwest::header::ACCEPT,
8385                ::reqwest::header::HeaderValue::from_static("application/json"),
8386            )
8387            .json(&body)
8388            .query(&progenitor_client::QueryParam::new(
8389                "include_deleted",
8390                &include_deleted,
8391            ))
8392            .query(&progenitor_client::QueryParam::new(
8393                "include_metadata",
8394                &include_metadata,
8395            ))
8396            .headers(header_map)
8397            .build()?;
8398        let info = OperationInfo {
8399            operation_id: "create_device",
8400        };
8401        self.pre(&mut request, &info).await?;
8402        let result = self.exec(request, &info).await;
8403        self.post(&result, &info).await?;
8404        let response = result?;
8405        match response.status().as_u16() {
8406            200u16 => ResponseValue::from_response(response).await,
8407            400u16 => Err(Error::ErrorResponse(
8408                ResponseValue::from_response(response).await?,
8409            )),
8410            401u16 => Err(Error::ErrorResponse(
8411                ResponseValue::from_response(response).await?,
8412            )),
8413            403u16 => Err(Error::ErrorResponse(
8414                ResponseValue::from_response(response).await?,
8415            )),
8416            422u16 => Err(Error::ErrorResponse(
8417                ResponseValue::from_response(response).await?,
8418            )),
8419            500u16 => Err(Error::ErrorResponse(
8420                ResponseValue::from_response(response).await?,
8421            )),
8422            _ => Err(Error::UnexpectedResponse(response)),
8423        }
8424    }
8425    /**Sends a `GET` request to `/devices/{device_id}/apartment-floors`
8426
8427    */
8428    pub async fn list_device_apartment_floors<'a>(
8429        &'a self,
8430        device_id: &'a str,
8431        x_org: &'a str,
8432    ) -> Result<ResponseValue<types::ApartmentFloorListResponse>, Error<types::ApiErrorResponse>>
8433    {
8434        let url = format!(
8435            "{}/devices/{}/apartment-floors",
8436            self.baseurl,
8437            encode_path(&device_id.to_string()),
8438        );
8439        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
8440        header_map.append(
8441            ::reqwest::header::HeaderName::from_static("api-version"),
8442            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8443        );
8444        header_map.append("X-Org", x_org.to_string().try_into()?);
8445        #[allow(unused_mut)]
8446        let mut request = self
8447            .client
8448            .get(url)
8449            .header(
8450                ::reqwest::header::ACCEPT,
8451                ::reqwest::header::HeaderValue::from_static("application/json"),
8452            )
8453            .headers(header_map)
8454            .build()?;
8455        let info = OperationInfo {
8456            operation_id: "list_device_apartment_floors",
8457        };
8458        self.pre(&mut request, &info).await?;
8459        let result = self.exec(request, &info).await;
8460        self.post(&result, &info).await?;
8461        let response = result?;
8462        match response.status().as_u16() {
8463            200u16 => ResponseValue::from_response(response).await,
8464            400u16 => Err(Error::ErrorResponse(
8465                ResponseValue::from_response(response).await?,
8466            )),
8467            401u16 => Err(Error::ErrorResponse(
8468                ResponseValue::from_response(response).await?,
8469            )),
8470            403u16 => Err(Error::ErrorResponse(
8471                ResponseValue::from_response(response).await?,
8472            )),
8473            500u16 => Err(Error::ErrorResponse(
8474                ResponseValue::from_response(response).await?,
8475            )),
8476            _ => Err(Error::UnexpectedResponse(response)),
8477        }
8478    }
8479    /**List entities for a device
8480
8481    Sends a `GET` request to `/devices/{device_id}/entities`
8482
8483    Arguments:
8484    - `device_id`
8485    - `entity_type`: When set, only entities of this type are returned (e.g. `apartment`).
8486    - `include_deleted`
8487    - `include_metadata`
8488    - `limit`: Number of items per page. Default from config, max 200.
8489    - `offset`: Number of items to skip. Default 0.
8490    - `only_deleted`
8491    - `x_org`
8492    */
8493    pub async fn list_device_entities<'a>(
8494        &'a self,
8495        device_id: &'a str,
8496        entity_type: Option<&'a str>,
8497        include_deleted: Option<bool>,
8498        include_metadata: Option<bool>,
8499        limit: Option<i32>,
8500        offset: Option<i32>,
8501        only_deleted: Option<bool>,
8502        x_org: &'a str,
8503    ) -> Result<ResponseValue<types::PaginatedResponse>, Error<types::ApiErrorResponse>> {
8504        let url = format!(
8505            "{}/devices/{}/entities",
8506            self.baseurl,
8507            encode_path(&device_id.to_string()),
8508        );
8509        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
8510        header_map.append(
8511            ::reqwest::header::HeaderName::from_static("api-version"),
8512            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8513        );
8514        header_map.append("X-Org", x_org.to_string().try_into()?);
8515        #[allow(unused_mut)]
8516        let mut request = self
8517            .client
8518            .get(url)
8519            .header(
8520                ::reqwest::header::ACCEPT,
8521                ::reqwest::header::HeaderValue::from_static("application/json"),
8522            )
8523            .query(&progenitor_client::QueryParam::new(
8524                "entity_type",
8525                &entity_type,
8526            ))
8527            .query(&progenitor_client::QueryParam::new(
8528                "include_deleted",
8529                &include_deleted,
8530            ))
8531            .query(&progenitor_client::QueryParam::new(
8532                "include_metadata",
8533                &include_metadata,
8534            ))
8535            .query(&progenitor_client::QueryParam::new("limit", &limit))
8536            .query(&progenitor_client::QueryParam::new("offset", &offset))
8537            .query(&progenitor_client::QueryParam::new(
8538                "only_deleted",
8539                &only_deleted,
8540            ))
8541            .headers(header_map)
8542            .build()?;
8543        let info = OperationInfo {
8544            operation_id: "list_device_entities",
8545        };
8546        self.pre(&mut request, &info).await?;
8547        let result = self.exec(request, &info).await;
8548        self.post(&result, &info).await?;
8549        let response = result?;
8550        match response.status().as_u16() {
8551            200u16 => ResponseValue::from_response(response).await,
8552            400u16 => Err(Error::ErrorResponse(
8553                ResponseValue::from_response(response).await?,
8554            )),
8555            401u16 => Err(Error::ErrorResponse(
8556                ResponseValue::from_response(response).await?,
8557            )),
8558            403u16 => Err(Error::ErrorResponse(
8559                ResponseValue::from_response(response).await?,
8560            )),
8561            500u16 => Err(Error::ErrorResponse(
8562                ResponseValue::from_response(response).await?,
8563            )),
8564            _ => Err(Error::UnexpectedResponse(response)),
8565        }
8566    }
8567    /**Get provider-specific JSON schema for `entity_metadata`, for creating a new entity on a device
8568
8569    Sends a `GET` request to `/devices/{device_id}/entities/metadata-definition`
8570
8571    */
8572    pub async fn get_device_entity_metadata_definition<'a>(
8573        &'a self,
8574        device_id: &'a str,
8575        entity_type: &'a str,
8576        x_org: &'a str,
8577    ) -> Result<ResponseValue<types::EntityMetadataDefinitionResponse>, Error<()>> {
8578        let url = format!(
8579            "{}/devices/{}/entities/metadata-definition",
8580            self.baseurl,
8581            encode_path(&device_id.to_string()),
8582        );
8583        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
8584        header_map.append(
8585            ::reqwest::header::HeaderName::from_static("api-version"),
8586            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8587        );
8588        header_map.append("X-Org", x_org.to_string().try_into()?);
8589        #[allow(unused_mut)]
8590        let mut request = self
8591            .client
8592            .get(url)
8593            .header(
8594                ::reqwest::header::ACCEPT,
8595                ::reqwest::header::HeaderValue::from_static("application/json"),
8596            )
8597            .query(&progenitor_client::QueryParam::new(
8598                "entity_type",
8599                &entity_type,
8600            ))
8601            .headers(header_map)
8602            .build()?;
8603        let info = OperationInfo {
8604            operation_id: "get_device_entity_metadata_definition",
8605        };
8606        self.pre(&mut request, &info).await?;
8607        let result = self.exec(request, &info).await;
8608        self.post(&result, &info).await?;
8609        let response = result?;
8610        match response.status().as_u16() {
8611            200u16 => ResponseValue::from_response(response).await,
8612            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
8613            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
8614            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
8615            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
8616            _ => Err(Error::UnexpectedResponse(response)),
8617        }
8618    }
8619    /**Get a device by ID
8620
8621    Sends a `GET` request to `/devices/{id}`
8622
8623    Arguments:
8624    - `id`: Device ULID
8625    - `include_deleted`
8626    - `include_metadata`
8627    - `include_stale`: When true, include `stale` if the integration provider supports stale device detection.
8628    - `x_org`
8629    */
8630    pub async fn get_device<'a>(
8631        &'a self,
8632        id: &'a str,
8633        include_deleted: bool,
8634        include_metadata: bool,
8635        include_stale: Option<bool>,
8636        x_org: &'a str,
8637    ) -> Result<ResponseValue<types::DeviceResponse>, Error<types::ApiErrorResponse>> {
8638        let url = format!("{}/devices/{}", self.baseurl, encode_path(&id.to_string()),);
8639        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
8640        header_map.append(
8641            ::reqwest::header::HeaderName::from_static("api-version"),
8642            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8643        );
8644        header_map.append("X-Org", x_org.to_string().try_into()?);
8645        #[allow(unused_mut)]
8646        let mut request = self
8647            .client
8648            .get(url)
8649            .header(
8650                ::reqwest::header::ACCEPT,
8651                ::reqwest::header::HeaderValue::from_static("application/json"),
8652            )
8653            .query(&progenitor_client::QueryParam::new(
8654                "include_deleted",
8655                &include_deleted,
8656            ))
8657            .query(&progenitor_client::QueryParam::new(
8658                "include_metadata",
8659                &include_metadata,
8660            ))
8661            .query(&progenitor_client::QueryParam::new(
8662                "include_stale",
8663                &include_stale,
8664            ))
8665            .headers(header_map)
8666            .build()?;
8667        let info = OperationInfo {
8668            operation_id: "get_device",
8669        };
8670        self.pre(&mut request, &info).await?;
8671        let result = self.exec(request, &info).await;
8672        self.post(&result, &info).await?;
8673        let response = result?;
8674        match response.status().as_u16() {
8675            200u16 => ResponseValue::from_response(response).await,
8676            400u16 => Err(Error::ErrorResponse(
8677                ResponseValue::from_response(response).await?,
8678            )),
8679            401u16 => Err(Error::ErrorResponse(
8680                ResponseValue::from_response(response).await?,
8681            )),
8682            403u16 => Err(Error::ErrorResponse(
8683                ResponseValue::from_response(response).await?,
8684            )),
8685            404u16 => Err(Error::ErrorResponse(
8686                ResponseValue::from_response(response).await?,
8687            )),
8688            500u16 => Err(Error::ErrorResponse(
8689                ResponseValue::from_response(response).await?,
8690            )),
8691            _ => Err(Error::UnexpectedResponse(response)),
8692        }
8693    }
8694    /**Update a device
8695
8696    Sends a `PUT` request to `/devices/{id}`
8697
8698    */
8699    pub async fn update_device<'a>(
8700        &'a self,
8701        id: &'a str,
8702        include_deleted: Option<bool>,
8703        include_metadata: Option<bool>,
8704        x_org: &'a str,
8705        body: &'a types::UpdateDeviceRequest,
8706    ) -> Result<ResponseValue<types::DeviceResponse>, Error<types::ApiErrorResponse>> {
8707        let url = format!("{}/devices/{}", self.baseurl, encode_path(&id.to_string()),);
8708        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
8709        header_map.append(
8710            ::reqwest::header::HeaderName::from_static("api-version"),
8711            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8712        );
8713        header_map.append("X-Org", x_org.to_string().try_into()?);
8714        #[allow(unused_mut)]
8715        let mut request = self
8716            .client
8717            .put(url)
8718            .header(
8719                ::reqwest::header::ACCEPT,
8720                ::reqwest::header::HeaderValue::from_static("application/json"),
8721            )
8722            .json(&body)
8723            .query(&progenitor_client::QueryParam::new(
8724                "include_deleted",
8725                &include_deleted,
8726            ))
8727            .query(&progenitor_client::QueryParam::new(
8728                "include_metadata",
8729                &include_metadata,
8730            ))
8731            .headers(header_map)
8732            .build()?;
8733        let info = OperationInfo {
8734            operation_id: "update_device",
8735        };
8736        self.pre(&mut request, &info).await?;
8737        let result = self.exec(request, &info).await;
8738        self.post(&result, &info).await?;
8739        let response = result?;
8740        match response.status().as_u16() {
8741            200u16 => ResponseValue::from_response(response).await,
8742            400u16 => Err(Error::ErrorResponse(
8743                ResponseValue::from_response(response).await?,
8744            )),
8745            401u16 => Err(Error::ErrorResponse(
8746                ResponseValue::from_response(response).await?,
8747            )),
8748            403u16 => Err(Error::ErrorResponse(
8749                ResponseValue::from_response(response).await?,
8750            )),
8751            404u16 => Err(Error::ErrorResponse(
8752                ResponseValue::from_response(response).await?,
8753            )),
8754            500u16 => Err(Error::ErrorResponse(
8755                ResponseValue::from_response(response).await?,
8756            )),
8757            _ => Err(Error::UnexpectedResponse(response)),
8758        }
8759    }
8760    /**Soft-delete a device
8761
8762    Sends a `DELETE` request to `/devices/{id}`
8763
8764    Arguments:
8765    - `id`
8766    - `include_deleted`
8767    - `include_metadata`
8768    - `recursive`: If true, delete (or purge) all device entities first.
8769    - `x_org`
8770    */
8771    pub async fn delete_device<'a>(
8772        &'a self,
8773        id: &'a str,
8774        include_deleted: Option<bool>,
8775        include_metadata: Option<bool>,
8776        recursive: Option<bool>,
8777        x_org: &'a str,
8778    ) -> Result<ResponseValue<types::DeviceResponse>, Error<types::ApiErrorResponse>> {
8779        let url = format!("{}/devices/{}", self.baseurl, encode_path(&id.to_string()),);
8780        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
8781        header_map.append(
8782            ::reqwest::header::HeaderName::from_static("api-version"),
8783            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8784        );
8785        header_map.append("X-Org", x_org.to_string().try_into()?);
8786        #[allow(unused_mut)]
8787        let mut request = self
8788            .client
8789            .delete(url)
8790            .header(
8791                ::reqwest::header::ACCEPT,
8792                ::reqwest::header::HeaderValue::from_static("application/json"),
8793            )
8794            .query(&progenitor_client::QueryParam::new(
8795                "include_deleted",
8796                &include_deleted,
8797            ))
8798            .query(&progenitor_client::QueryParam::new(
8799                "include_metadata",
8800                &include_metadata,
8801            ))
8802            .query(&progenitor_client::QueryParam::new("recursive", &recursive))
8803            .headers(header_map)
8804            .build()?;
8805        let info = OperationInfo {
8806            operation_id: "delete_device",
8807        };
8808        self.pre(&mut request, &info).await?;
8809        let result = self.exec(request, &info).await;
8810        self.post(&result, &info).await?;
8811        let response = result?;
8812        match response.status().as_u16() {
8813            200u16 => ResponseValue::from_response(response).await,
8814            400u16 => Err(Error::ErrorResponse(
8815                ResponseValue::from_response(response).await?,
8816            )),
8817            401u16 => Err(Error::ErrorResponse(
8818                ResponseValue::from_response(response).await?,
8819            )),
8820            403u16 => Err(Error::ErrorResponse(
8821                ResponseValue::from_response(response).await?,
8822            )),
8823            404u16 => Err(Error::ErrorResponse(
8824                ResponseValue::from_response(response).await?,
8825            )),
8826            422u16 => Err(Error::ErrorResponse(
8827                ResponseValue::from_response(response).await?,
8828            )),
8829            500u16 => Err(Error::ErrorResponse(
8830                ResponseValue::from_response(response).await?,
8831            )),
8832            _ => Err(Error::UnexpectedResponse(response)),
8833        }
8834    }
8835    /**GET /devices/{id}/door-restrictions — list apartment entity IDs allowed to open this door.
8836    Empty = no restrictions (all building residents can open). Only for virtual_access_portal devices
8837
8838    Sends a `GET` request to `/devices/{id}/door-restrictions`
8839
8840    */
8841    pub async fn get_door_restrictions<'a>(
8842        &'a self,
8843        id: &'a str,
8844    ) -> Result<ResponseValue<types::DoorRestrictionsResponse>, Error<()>> {
8845        let url = format!(
8846            "{}/devices/{}/door-restrictions",
8847            self.baseurl,
8848            encode_path(&id.to_string()),
8849        );
8850        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
8851        header_map.append(
8852            ::reqwest::header::HeaderName::from_static("api-version"),
8853            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8854        );
8855        #[allow(unused_mut)]
8856        let mut request = self
8857            .client
8858            .get(url)
8859            .header(
8860                ::reqwest::header::ACCEPT,
8861                ::reqwest::header::HeaderValue::from_static("application/json"),
8862            )
8863            .headers(header_map)
8864            .build()?;
8865        let info = OperationInfo {
8866            operation_id: "get_door_restrictions",
8867        };
8868        self.pre(&mut request, &info).await?;
8869        let result = self.exec(request, &info).await;
8870        self.post(&result, &info).await?;
8871        let response = result?;
8872        match response.status().as_u16() {
8873            200u16 => ResponseValue::from_response(response).await,
8874            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
8875            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
8876            _ => Err(Error::UnexpectedResponse(response)),
8877        }
8878    }
8879    /**Get provider-specific JSON schema for `device_metadata`, for a given device
8880
8881    Sends a `GET` request to `/devices/{id}/metadata-definition`
8882
8883    */
8884    pub async fn get_device_metadata_definition<'a>(
8885        &'a self,
8886        id: &'a str,
8887        x_org: &'a str,
8888    ) -> Result<ResponseValue<types::DeviceMetadataDefinitionResponse>, Error<()>> {
8889        let url = format!(
8890            "{}/devices/{}/metadata-definition",
8891            self.baseurl,
8892            encode_path(&id.to_string()),
8893        );
8894        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
8895        header_map.append(
8896            ::reqwest::header::HeaderName::from_static("api-version"),
8897            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8898        );
8899        header_map.append("X-Org", x_org.to_string().try_into()?);
8900        #[allow(unused_mut)]
8901        let mut request = self
8902            .client
8903            .get(url)
8904            .header(
8905                ::reqwest::header::ACCEPT,
8906                ::reqwest::header::HeaderValue::from_static("application/json"),
8907            )
8908            .headers(header_map)
8909            .build()?;
8910        let info = OperationInfo {
8911            operation_id: "get_device_metadata_definition",
8912        };
8913        self.pre(&mut request, &info).await?;
8914        let result = self.exec(request, &info).await;
8915        self.post(&result, &info).await?;
8916        let response = result?;
8917        match response.status().as_u16() {
8918            200u16 => ResponseValue::from_response(response).await,
8919            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
8920            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
8921            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
8922            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
8923            _ => Err(Error::UnexpectedResponse(response)),
8924        }
8925    }
8926    /**Permanently delete (purge) a device
8927
8928    Sends a `DELETE` request to `/devices/{id}/purge`
8929
8930    Arguments:
8931    - `id`
8932    - `include_deleted`
8933    - `include_metadata`
8934    - `recursive`: If true, delete (or purge) all device entities first.
8935    - `x_org`
8936    */
8937    pub async fn hard_delete_device<'a>(
8938        &'a self,
8939        id: &'a str,
8940        include_deleted: Option<bool>,
8941        include_metadata: Option<bool>,
8942        recursive: Option<bool>,
8943        x_org: &'a str,
8944    ) -> Result<ResponseValue<types::DeviceResponse>, Error<types::ApiErrorResponse>> {
8945        let url = format!(
8946            "{}/devices/{}/purge",
8947            self.baseurl,
8948            encode_path(&id.to_string()),
8949        );
8950        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
8951        header_map.append(
8952            ::reqwest::header::HeaderName::from_static("api-version"),
8953            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
8954        );
8955        header_map.append("X-Org", x_org.to_string().try_into()?);
8956        #[allow(unused_mut)]
8957        let mut request = self
8958            .client
8959            .delete(url)
8960            .header(
8961                ::reqwest::header::ACCEPT,
8962                ::reqwest::header::HeaderValue::from_static("application/json"),
8963            )
8964            .query(&progenitor_client::QueryParam::new(
8965                "include_deleted",
8966                &include_deleted,
8967            ))
8968            .query(&progenitor_client::QueryParam::new(
8969                "include_metadata",
8970                &include_metadata,
8971            ))
8972            .query(&progenitor_client::QueryParam::new("recursive", &recursive))
8973            .headers(header_map)
8974            .build()?;
8975        let info = OperationInfo {
8976            operation_id: "hard_delete_device",
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            400u16 => Err(Error::ErrorResponse(
8985                ResponseValue::from_response(response).await?,
8986            )),
8987            401u16 => Err(Error::ErrorResponse(
8988                ResponseValue::from_response(response).await?,
8989            )),
8990            403u16 => Err(Error::ErrorResponse(
8991                ResponseValue::from_response(response).await?,
8992            )),
8993            404u16 => Err(Error::ErrorResponse(
8994                ResponseValue::from_response(response).await?,
8995            )),
8996            422u16 => Err(Error::ErrorResponse(
8997                ResponseValue::from_response(response).await?,
8998            )),
8999            500u16 => Err(Error::ErrorResponse(
9000                ResponseValue::from_response(response).await?,
9001            )),
9002            _ => Err(Error::UnexpectedResponse(response)),
9003        }
9004    }
9005    /**Restore a soft-deleted device
9006
9007    Sends a `POST` request to `/devices/{id}/restore`
9008
9009    */
9010    pub async fn restore_device<'a>(
9011        &'a self,
9012        id: &'a str,
9013        include_deleted: Option<bool>,
9014        include_metadata: Option<bool>,
9015        x_org: &'a str,
9016    ) -> Result<ResponseValue<types::DeviceResponse>, Error<types::ApiErrorResponse>> {
9017        let url = format!(
9018            "{}/devices/{}/restore",
9019            self.baseurl,
9020            encode_path(&id.to_string()),
9021        );
9022        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
9023        header_map.append(
9024            ::reqwest::header::HeaderName::from_static("api-version"),
9025            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9026        );
9027        header_map.append("X-Org", x_org.to_string().try_into()?);
9028        #[allow(unused_mut)]
9029        let mut request = self
9030            .client
9031            .post(url)
9032            .header(
9033                ::reqwest::header::ACCEPT,
9034                ::reqwest::header::HeaderValue::from_static("application/json"),
9035            )
9036            .query(&progenitor_client::QueryParam::new(
9037                "include_deleted",
9038                &include_deleted,
9039            ))
9040            .query(&progenitor_client::QueryParam::new(
9041                "include_metadata",
9042                &include_metadata,
9043            ))
9044            .headers(header_map)
9045            .build()?;
9046        let info = OperationInfo {
9047            operation_id: "restore_device",
9048        };
9049        self.pre(&mut request, &info).await?;
9050        let result = self.exec(request, &info).await;
9051        self.post(&result, &info).await?;
9052        let response = result?;
9053        match response.status().as_u16() {
9054            200u16 => ResponseValue::from_response(response).await,
9055            400u16 => Err(Error::ErrorResponse(
9056                ResponseValue::from_response(response).await?,
9057            )),
9058            401u16 => Err(Error::ErrorResponse(
9059                ResponseValue::from_response(response).await?,
9060            )),
9061            403u16 => Err(Error::ErrorResponse(
9062                ResponseValue::from_response(response).await?,
9063            )),
9064            404u16 => Err(Error::ErrorResponse(
9065                ResponseValue::from_response(response).await?,
9066            )),
9067            422u16 => Err(Error::ErrorResponse(
9068                ResponseValue::from_response(response).await?,
9069            )),
9070            500u16 => Err(Error::ErrorResponse(
9071                ResponseValue::from_response(response).await?,
9072            )),
9073            _ => Err(Error::UnexpectedResponse(response)),
9074        }
9075    }
9076    /**Sends a `GET` request to `/entities`
9077
9078    Arguments:
9079    - `include_deleted`
9080    - `include_metadata`
9081    - `limit`: Number of items per page. Default from config, max 200.
9082    - `offset`: Number of items to skip. Default 0.
9083    - `only_deleted`
9084    - `zone_id`: Optional filter: only entities in this zone.
9085    - `x_org`
9086    */
9087    pub async fn list_entities<'a>(
9088        &'a self,
9089        include_deleted: bool,
9090        include_metadata: bool,
9091        limit: Option<i32>,
9092        offset: Option<i32>,
9093        only_deleted: bool,
9094        zone_id: Option<&'a str>,
9095        x_org: &'a str,
9096    ) -> Result<ResponseValue<types::PaginatedResponse>, Error<types::ApiErrorResponse>> {
9097        let url = format!("{}/entities", self.baseurl,);
9098        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
9099        header_map.append(
9100            ::reqwest::header::HeaderName::from_static("api-version"),
9101            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9102        );
9103        header_map.append("X-Org", x_org.to_string().try_into()?);
9104        #[allow(unused_mut)]
9105        let mut request = self
9106            .client
9107            .get(url)
9108            .header(
9109                ::reqwest::header::ACCEPT,
9110                ::reqwest::header::HeaderValue::from_static("application/json"),
9111            )
9112            .query(&progenitor_client::QueryParam::new(
9113                "include_deleted",
9114                &include_deleted,
9115            ))
9116            .query(&progenitor_client::QueryParam::new(
9117                "include_metadata",
9118                &include_metadata,
9119            ))
9120            .query(&progenitor_client::QueryParam::new("limit", &limit))
9121            .query(&progenitor_client::QueryParam::new("offset", &offset))
9122            .query(&progenitor_client::QueryParam::new(
9123                "only_deleted",
9124                &only_deleted,
9125            ))
9126            .query(&progenitor_client::QueryParam::new("zone_id", &zone_id))
9127            .headers(header_map)
9128            .build()?;
9129        let info = OperationInfo {
9130            operation_id: "list_entities",
9131        };
9132        self.pre(&mut request, &info).await?;
9133        let result = self.exec(request, &info).await;
9134        self.post(&result, &info).await?;
9135        let response = result?;
9136        match response.status().as_u16() {
9137            200u16 => ResponseValue::from_response(response).await,
9138            401u16 => Err(Error::ErrorResponse(
9139                ResponseValue::from_response(response).await?,
9140            )),
9141            403u16 => Err(Error::ErrorResponse(
9142                ResponseValue::from_response(response).await?,
9143            )),
9144            500u16 => Err(Error::ErrorResponse(
9145                ResponseValue::from_response(response).await?,
9146            )),
9147            _ => Err(Error::UnexpectedResponse(response)),
9148        }
9149    }
9150    /**Create an entity on a device
9151
9152    Sends a `POST` request to `/entities`
9153
9154    */
9155    pub async fn create_entity<'a>(
9156        &'a self,
9157        include_deleted: Option<bool>,
9158        include_metadata: Option<bool>,
9159        x_org: &'a str,
9160        body: &'a types::CreateEntityRequest,
9161    ) -> Result<ResponseValue<types::EntityResponse>, Error<types::ApiErrorResponse>> {
9162        let url = format!("{}/entities", self.baseurl,);
9163        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
9164        header_map.append(
9165            ::reqwest::header::HeaderName::from_static("api-version"),
9166            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9167        );
9168        header_map.append("X-Org", x_org.to_string().try_into()?);
9169        #[allow(unused_mut)]
9170        let mut request = self
9171            .client
9172            .post(url)
9173            .header(
9174                ::reqwest::header::ACCEPT,
9175                ::reqwest::header::HeaderValue::from_static("application/json"),
9176            )
9177            .json(&body)
9178            .query(&progenitor_client::QueryParam::new(
9179                "include_deleted",
9180                &include_deleted,
9181            ))
9182            .query(&progenitor_client::QueryParam::new(
9183                "include_metadata",
9184                &include_metadata,
9185            ))
9186            .headers(header_map)
9187            .build()?;
9188        let info = OperationInfo {
9189            operation_id: "create_entity",
9190        };
9191        self.pre(&mut request, &info).await?;
9192        let result = self.exec(request, &info).await;
9193        self.post(&result, &info).await?;
9194        let response = result?;
9195        match response.status().as_u16() {
9196            200u16 => ResponseValue::from_response(response).await,
9197            400u16 => Err(Error::ErrorResponse(
9198                ResponseValue::from_response(response).await?,
9199            )),
9200            401u16 => Err(Error::ErrorResponse(
9201                ResponseValue::from_response(response).await?,
9202            )),
9203            403u16 => Err(Error::ErrorResponse(
9204                ResponseValue::from_response(response).await?,
9205            )),
9206            404u16 => Err(Error::ErrorResponse(
9207                ResponseValue::from_response(response).await?,
9208            )),
9209            422u16 => Err(Error::ErrorResponse(
9210                ResponseValue::from_response(response).await?,
9211            )),
9212            500u16 => Err(Error::ErrorResponse(
9213                ResponseValue::from_response(response).await?,
9214            )),
9215            _ => Err(Error::UnexpectedResponse(response)),
9216        }
9217    }
9218    /**Get an entity by ID
9219
9220    Sends a `GET` request to `/entities/{id}`
9221
9222    */
9223    pub async fn get_entity<'a>(
9224        &'a self,
9225        id: &'a str,
9226        include_deleted: Option<bool>,
9227        include_metadata: Option<bool>,
9228        x_org: &'a str,
9229    ) -> Result<ResponseValue<types::EntityResponse>, Error<types::ApiErrorResponse>> {
9230        let url = format!("{}/entities/{}", self.baseurl, encode_path(&id.to_string()),);
9231        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
9232        header_map.append(
9233            ::reqwest::header::HeaderName::from_static("api-version"),
9234            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9235        );
9236        header_map.append("X-Org", x_org.to_string().try_into()?);
9237        #[allow(unused_mut)]
9238        let mut request = self
9239            .client
9240            .get(url)
9241            .header(
9242                ::reqwest::header::ACCEPT,
9243                ::reqwest::header::HeaderValue::from_static("application/json"),
9244            )
9245            .query(&progenitor_client::QueryParam::new(
9246                "include_deleted",
9247                &include_deleted,
9248            ))
9249            .query(&progenitor_client::QueryParam::new(
9250                "include_metadata",
9251                &include_metadata,
9252            ))
9253            .headers(header_map)
9254            .build()?;
9255        let info = OperationInfo {
9256            operation_id: "get_entity",
9257        };
9258        self.pre(&mut request, &info).await?;
9259        let result = self.exec(request, &info).await;
9260        self.post(&result, &info).await?;
9261        let response = result?;
9262        match response.status().as_u16() {
9263            200u16 => ResponseValue::from_response(response).await,
9264            400u16 => Err(Error::ErrorResponse(
9265                ResponseValue::from_response(response).await?,
9266            )),
9267            401u16 => Err(Error::ErrorResponse(
9268                ResponseValue::from_response(response).await?,
9269            )),
9270            403u16 => Err(Error::ErrorResponse(
9271                ResponseValue::from_response(response).await?,
9272            )),
9273            404u16 => Err(Error::ErrorResponse(
9274                ResponseValue::from_response(response).await?,
9275            )),
9276            500u16 => Err(Error::ErrorResponse(
9277                ResponseValue::from_response(response).await?,
9278            )),
9279            _ => Err(Error::UnexpectedResponse(response)),
9280        }
9281    }
9282    /**Update an entity
9283
9284    Sends a `PUT` request to `/entities/{id}`
9285
9286    */
9287    pub async fn update_entity<'a>(
9288        &'a self,
9289        id: &'a str,
9290        include_deleted: Option<bool>,
9291        include_metadata: Option<bool>,
9292        x_org: &'a str,
9293        body: &'a types::UpdateEntityRequest,
9294    ) -> Result<ResponseValue<types::EntityResponse>, Error<types::ApiErrorResponse>> {
9295        let url = format!("{}/entities/{}", self.baseurl, encode_path(&id.to_string()),);
9296        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
9297        header_map.append(
9298            ::reqwest::header::HeaderName::from_static("api-version"),
9299            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9300        );
9301        header_map.append("X-Org", x_org.to_string().try_into()?);
9302        #[allow(unused_mut)]
9303        let mut request = self
9304            .client
9305            .put(url)
9306            .header(
9307                ::reqwest::header::ACCEPT,
9308                ::reqwest::header::HeaderValue::from_static("application/json"),
9309            )
9310            .json(&body)
9311            .query(&progenitor_client::QueryParam::new(
9312                "include_deleted",
9313                &include_deleted,
9314            ))
9315            .query(&progenitor_client::QueryParam::new(
9316                "include_metadata",
9317                &include_metadata,
9318            ))
9319            .headers(header_map)
9320            .build()?;
9321        let info = OperationInfo {
9322            operation_id: "update_entity",
9323        };
9324        self.pre(&mut request, &info).await?;
9325        let result = self.exec(request, &info).await;
9326        self.post(&result, &info).await?;
9327        let response = result?;
9328        match response.status().as_u16() {
9329            200u16 => ResponseValue::from_response(response).await,
9330            400u16 => Err(Error::ErrorResponse(
9331                ResponseValue::from_response(response).await?,
9332            )),
9333            401u16 => Err(Error::ErrorResponse(
9334                ResponseValue::from_response(response).await?,
9335            )),
9336            403u16 => Err(Error::ErrorResponse(
9337                ResponseValue::from_response(response).await?,
9338            )),
9339            404u16 => Err(Error::ErrorResponse(
9340                ResponseValue::from_response(response).await?,
9341            )),
9342            422u16 => Err(Error::ErrorResponse(
9343                ResponseValue::from_response(response).await?,
9344            )),
9345            500u16 => Err(Error::ErrorResponse(
9346                ResponseValue::from_response(response).await?,
9347            )),
9348            _ => Err(Error::UnexpectedResponse(response)),
9349        }
9350    }
9351    /**Soft-delete an entity
9352
9353    Sends a `DELETE` request to `/entities/{id}`
9354
9355    */
9356    pub async fn delete_entity<'a>(
9357        &'a self,
9358        id: &'a str,
9359        include_deleted: Option<bool>,
9360        include_metadata: Option<bool>,
9361        x_org: &'a str,
9362    ) -> Result<ResponseValue<types::EntityResponse>, Error<types::ApiErrorResponse>> {
9363        let url = format!("{}/entities/{}", self.baseurl, encode_path(&id.to_string()),);
9364        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
9365        header_map.append(
9366            ::reqwest::header::HeaderName::from_static("api-version"),
9367            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9368        );
9369        header_map.append("X-Org", x_org.to_string().try_into()?);
9370        #[allow(unused_mut)]
9371        let mut request = self
9372            .client
9373            .delete(url)
9374            .header(
9375                ::reqwest::header::ACCEPT,
9376                ::reqwest::header::HeaderValue::from_static("application/json"),
9377            )
9378            .query(&progenitor_client::QueryParam::new(
9379                "include_deleted",
9380                &include_deleted,
9381            ))
9382            .query(&progenitor_client::QueryParam::new(
9383                "include_metadata",
9384                &include_metadata,
9385            ))
9386            .headers(header_map)
9387            .build()?;
9388        let info = OperationInfo {
9389            operation_id: "delete_entity",
9390        };
9391        self.pre(&mut request, &info).await?;
9392        let result = self.exec(request, &info).await;
9393        self.post(&result, &info).await?;
9394        let response = result?;
9395        match response.status().as_u16() {
9396            200u16 => ResponseValue::from_response(response).await,
9397            400u16 => Err(Error::ErrorResponse(
9398                ResponseValue::from_response(response).await?,
9399            )),
9400            401u16 => Err(Error::ErrorResponse(
9401                ResponseValue::from_response(response).await?,
9402            )),
9403            403u16 => Err(Error::ErrorResponse(
9404                ResponseValue::from_response(response).await?,
9405            )),
9406            404u16 => Err(Error::ErrorResponse(
9407                ResponseValue::from_response(response).await?,
9408            )),
9409            422u16 => Err(Error::ErrorResponse(
9410                ResponseValue::from_response(response).await?,
9411            )),
9412            500u16 => Err(Error::ErrorResponse(
9413                ResponseValue::from_response(response).await?,
9414            )),
9415            _ => Err(Error::UnexpectedResponse(response)),
9416        }
9417    }
9418    /**Partially update entity metadata (shallow merge). Other fields (`name`, etc.) are unchanged
9419
9420    Sends a `PATCH` request to `/entities/{id}`
9421
9422    */
9423    pub async fn patch_entity<'a>(
9424        &'a self,
9425        id: &'a str,
9426        include_deleted: Option<bool>,
9427        include_metadata: Option<bool>,
9428        x_org: &'a str,
9429        body: &'a types::PatchEntityRequest,
9430    ) -> Result<ResponseValue<types::EntityResponse>, Error<types::ApiErrorResponse>> {
9431        let url = format!("{}/entities/{}", self.baseurl, encode_path(&id.to_string()),);
9432        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
9433        header_map.append(
9434            ::reqwest::header::HeaderName::from_static("api-version"),
9435            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9436        );
9437        header_map.append("X-Org", x_org.to_string().try_into()?);
9438        #[allow(unused_mut)]
9439        let mut request = self
9440            .client
9441            .patch(url)
9442            .header(
9443                ::reqwest::header::ACCEPT,
9444                ::reqwest::header::HeaderValue::from_static("application/json"),
9445            )
9446            .json(&body)
9447            .query(&progenitor_client::QueryParam::new(
9448                "include_deleted",
9449                &include_deleted,
9450            ))
9451            .query(&progenitor_client::QueryParam::new(
9452                "include_metadata",
9453                &include_metadata,
9454            ))
9455            .headers(header_map)
9456            .build()?;
9457        let info = OperationInfo {
9458            operation_id: "patch_entity",
9459        };
9460        self.pre(&mut request, &info).await?;
9461        let result = self.exec(request, &info).await;
9462        self.post(&result, &info).await?;
9463        let response = result?;
9464        match response.status().as_u16() {
9465            200u16 => ResponseValue::from_response(response).await,
9466            400u16 => Err(Error::ErrorResponse(
9467                ResponseValue::from_response(response).await?,
9468            )),
9469            401u16 => Err(Error::ErrorResponse(
9470                ResponseValue::from_response(response).await?,
9471            )),
9472            403u16 => Err(Error::ErrorResponse(
9473                ResponseValue::from_response(response).await?,
9474            )),
9475            404u16 => Err(Error::ErrorResponse(
9476                ResponseValue::from_response(response).await?,
9477            )),
9478            422u16 => Err(Error::ErrorResponse(
9479                ResponseValue::from_response(response).await?,
9480            )),
9481            500u16 => Err(Error::ErrorResponse(
9482                ResponseValue::from_response(response).await?,
9483            )),
9484            _ => Err(Error::UnexpectedResponse(response)),
9485        }
9486    }
9487    /**Execute an entity action using the integration engine
9488
9489    Sends a `POST` request to `/entities/{id}/actions/{action_id}`
9490
9491    */
9492    pub async fn execute_entity_action<'a>(
9493        &'a self,
9494        id: &'a str,
9495        action_id: &'a str,
9496        body: &'a ::serde_json::Value,
9497    ) -> Result<ResponseValue<()>, Error<()>> {
9498        let url = format!(
9499            "{}/entities/{}/actions/{}",
9500            self.baseurl,
9501            encode_path(&id.to_string()),
9502            encode_path(&action_id.to_string()),
9503        );
9504        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
9505        header_map.append(
9506            ::reqwest::header::HeaderName::from_static("api-version"),
9507            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9508        );
9509        #[allow(unused_mut)]
9510        let mut request = self
9511            .client
9512            .post(url)
9513            .json(&body)
9514            .headers(header_map)
9515            .build()?;
9516        let info = OperationInfo {
9517            operation_id: "execute_entity_action",
9518        };
9519        self.pre(&mut request, &info).await?;
9520        let result = self.exec(request, &info).await;
9521        self.post(&result, &info).await?;
9522        let response = result?;
9523        match response.status().as_u16() {
9524            200u16 => Ok(ResponseValue::empty(response)),
9525            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
9526            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
9527            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
9528            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
9529            501u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
9530            _ => Err(Error::UnexpectedResponse(response)),
9531        }
9532    }
9533    /**Get provider-specific JSON schema for `entity_metadata`, for a given entity
9534
9535    Sends a `GET` request to `/entities/{id}/metadata-definition`
9536
9537    */
9538    pub async fn get_entity_metadata_definition<'a>(
9539        &'a self,
9540        id: &'a str,
9541        x_org: &'a str,
9542    ) -> Result<ResponseValue<types::EntityMetadataDefinitionResponse>, Error<()>> {
9543        let url = format!(
9544            "{}/entities/{}/metadata-definition",
9545            self.baseurl,
9546            encode_path(&id.to_string()),
9547        );
9548        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
9549        header_map.append(
9550            ::reqwest::header::HeaderName::from_static("api-version"),
9551            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9552        );
9553        header_map.append("X-Org", x_org.to_string().try_into()?);
9554        #[allow(unused_mut)]
9555        let mut request = self
9556            .client
9557            .get(url)
9558            .header(
9559                ::reqwest::header::ACCEPT,
9560                ::reqwest::header::HeaderValue::from_static("application/json"),
9561            )
9562            .headers(header_map)
9563            .build()?;
9564        let info = OperationInfo {
9565            operation_id: "get_entity_metadata_definition",
9566        };
9567        self.pre(&mut request, &info).await?;
9568        let result = self.exec(request, &info).await;
9569        self.post(&result, &info).await?;
9570        let response = result?;
9571        match response.status().as_u16() {
9572            200u16 => ResponseValue::from_response(response).await,
9573            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
9574            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
9575            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
9576            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
9577            _ => Err(Error::UnexpectedResponse(response)),
9578        }
9579    }
9580    /**Permanently delete (purge) an entity
9581
9582    Sends a `DELETE` request to `/entities/{id}/purge`
9583
9584    */
9585    pub async fn hard_delete_entity<'a>(
9586        &'a self,
9587        id: &'a str,
9588        include_deleted: Option<bool>,
9589        include_metadata: Option<bool>,
9590        x_org: &'a str,
9591    ) -> Result<ResponseValue<types::EntityResponse>, Error<types::ApiErrorResponse>> {
9592        let url = format!(
9593            "{}/entities/{}/purge",
9594            self.baseurl,
9595            encode_path(&id.to_string()),
9596        );
9597        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
9598        header_map.append(
9599            ::reqwest::header::HeaderName::from_static("api-version"),
9600            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9601        );
9602        header_map.append("X-Org", x_org.to_string().try_into()?);
9603        #[allow(unused_mut)]
9604        let mut request = self
9605            .client
9606            .delete(url)
9607            .header(
9608                ::reqwest::header::ACCEPT,
9609                ::reqwest::header::HeaderValue::from_static("application/json"),
9610            )
9611            .query(&progenitor_client::QueryParam::new(
9612                "include_deleted",
9613                &include_deleted,
9614            ))
9615            .query(&progenitor_client::QueryParam::new(
9616                "include_metadata",
9617                &include_metadata,
9618            ))
9619            .headers(header_map)
9620            .build()?;
9621        let info = OperationInfo {
9622            operation_id: "hard_delete_entity",
9623        };
9624        self.pre(&mut request, &info).await?;
9625        let result = self.exec(request, &info).await;
9626        self.post(&result, &info).await?;
9627        let response = result?;
9628        match response.status().as_u16() {
9629            200u16 => ResponseValue::from_response(response).await,
9630            400u16 => Err(Error::ErrorResponse(
9631                ResponseValue::from_response(response).await?,
9632            )),
9633            401u16 => Err(Error::ErrorResponse(
9634                ResponseValue::from_response(response).await?,
9635            )),
9636            403u16 => Err(Error::ErrorResponse(
9637                ResponseValue::from_response(response).await?,
9638            )),
9639            404u16 => Err(Error::ErrorResponse(
9640                ResponseValue::from_response(response).await?,
9641            )),
9642            422u16 => Err(Error::ErrorResponse(
9643                ResponseValue::from_response(response).await?,
9644            )),
9645            500u16 => Err(Error::ErrorResponse(
9646                ResponseValue::from_response(response).await?,
9647            )),
9648            _ => Err(Error::UnexpectedResponse(response)),
9649        }
9650    }
9651    /**Restore a soft-deleted entity
9652
9653    Sends a `POST` request to `/entities/{id}/restore`
9654
9655    */
9656    pub async fn restore_entity<'a>(
9657        &'a self,
9658        id: &'a str,
9659        include_deleted: Option<bool>,
9660        include_metadata: Option<bool>,
9661        x_org: &'a str,
9662    ) -> Result<ResponseValue<types::EntityResponse>, Error<types::ApiErrorResponse>> {
9663        let url = format!(
9664            "{}/entities/{}/restore",
9665            self.baseurl,
9666            encode_path(&id.to_string()),
9667        );
9668        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
9669        header_map.append(
9670            ::reqwest::header::HeaderName::from_static("api-version"),
9671            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9672        );
9673        header_map.append("X-Org", x_org.to_string().try_into()?);
9674        #[allow(unused_mut)]
9675        let mut request = self
9676            .client
9677            .post(url)
9678            .header(
9679                ::reqwest::header::ACCEPT,
9680                ::reqwest::header::HeaderValue::from_static("application/json"),
9681            )
9682            .query(&progenitor_client::QueryParam::new(
9683                "include_deleted",
9684                &include_deleted,
9685            ))
9686            .query(&progenitor_client::QueryParam::new(
9687                "include_metadata",
9688                &include_metadata,
9689            ))
9690            .headers(header_map)
9691            .build()?;
9692        let info = OperationInfo {
9693            operation_id: "restore_entity",
9694        };
9695        self.pre(&mut request, &info).await?;
9696        let result = self.exec(request, &info).await;
9697        self.post(&result, &info).await?;
9698        let response = result?;
9699        match response.status().as_u16() {
9700            200u16 => ResponseValue::from_response(response).await,
9701            400u16 => Err(Error::ErrorResponse(
9702                ResponseValue::from_response(response).await?,
9703            )),
9704            401u16 => Err(Error::ErrorResponse(
9705                ResponseValue::from_response(response).await?,
9706            )),
9707            403u16 => Err(Error::ErrorResponse(
9708                ResponseValue::from_response(response).await?,
9709            )),
9710            404u16 => Err(Error::ErrorResponse(
9711                ResponseValue::from_response(response).await?,
9712            )),
9713            422u16 => Err(Error::ErrorResponse(
9714                ResponseValue::from_response(response).await?,
9715            )),
9716            500u16 => Err(Error::ErrorResponse(
9717                ResponseValue::from_response(response).await?,
9718            )),
9719            _ => Err(Error::UnexpectedResponse(response)),
9720        }
9721    }
9722    /**Get EULA text. Anonymous GET is allowed at the edge so reading the agreement is never blocked by auth
9723
9724    Sends a `GET` request to `/eula`
9725
9726    */
9727    pub async fn get_eula<'a>(&'a self) -> Result<ResponseValue<types::EulaResponse>, Error<()>> {
9728        let url = format!("{}/eula", self.baseurl,);
9729        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
9730        header_map.append(
9731            ::reqwest::header::HeaderName::from_static("api-version"),
9732            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9733        );
9734        #[allow(unused_mut)]
9735        let mut request = self
9736            .client
9737            .get(url)
9738            .header(
9739                ::reqwest::header::ACCEPT,
9740                ::reqwest::header::HeaderValue::from_static("application/json"),
9741            )
9742            .headers(header_map)
9743            .build()?;
9744        let info = OperationInfo {
9745            operation_id: "get_eula",
9746        };
9747        self.pre(&mut request, &info).await?;
9748        let result = self.exec(request, &info).await;
9749        self.post(&result, &info).await?;
9750        let response = result?;
9751        match response.status().as_u16() {
9752            200u16 => ResponseValue::from_response(response).await,
9753            _ => Err(Error::UnexpectedResponse(response)),
9754        }
9755    }
9756    /**Accept EULA and provision user. Requires X-User-Email (set by Oathkeeper cookie_session)
9757
9758    Sends a `POST` request to `/eula/accept`
9759
9760    */
9761    pub async fn accept_eula<'a>(
9762        &'a self,
9763        body: &'a types::AcceptEulaRequest,
9764    ) -> Result<ResponseValue<types::AcceptEulaResponse>, Error<()>> {
9765        let url = format!("{}/eula/accept", self.baseurl,);
9766        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
9767        header_map.append(
9768            ::reqwest::header::HeaderName::from_static("api-version"),
9769            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9770        );
9771        #[allow(unused_mut)]
9772        let mut request = self
9773            .client
9774            .post(url)
9775            .header(
9776                ::reqwest::header::ACCEPT,
9777                ::reqwest::header::HeaderValue::from_static("application/json"),
9778            )
9779            .json(&body)
9780            .headers(header_map)
9781            .build()?;
9782        let info = OperationInfo {
9783            operation_id: "accept_eula",
9784        };
9785        self.pre(&mut request, &info).await?;
9786        let result = self.exec(request, &info).await;
9787        self.post(&result, &info).await?;
9788        let response = result?;
9789        match response.status().as_u16() {
9790            200u16 => ResponseValue::from_response(response).await,
9791            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
9792            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
9793            _ => Err(Error::UnexpectedResponse(response)),
9794        }
9795    }
9796    /**List integrations for the organization context (X-Org)
9797
9798    Sends a `GET` request to `/integrations`
9799
9800    Arguments:
9801    - `include_deleted`
9802    - `include_metadata`
9803    - `limit`: Number of items per page. Default from config, max 200.
9804    - `offset`: Number of items to skip. Default 0.
9805    - `only_deleted`
9806    - `provider_type`: Optional filter: only integrations with this provider_type (e.g. virtual_access).
9807    - `q`: Optional case-insensitive substring match on integration `name` (localized JSON), same as devices list.
9808    - `x_org`
9809    */
9810    pub async fn list_integrations<'a>(
9811        &'a self,
9812        include_deleted: bool,
9813        include_metadata: bool,
9814        limit: Option<i32>,
9815        offset: Option<i32>,
9816        only_deleted: bool,
9817        provider_type: Option<&'a str>,
9818        q: Option<&'a str>,
9819        x_org: &'a str,
9820    ) -> Result<ResponseValue<types::PaginatedResponse>, Error<types::ApiErrorResponse>> {
9821        let url = format!("{}/integrations", self.baseurl,);
9822        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
9823        header_map.append(
9824            ::reqwest::header::HeaderName::from_static("api-version"),
9825            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9826        );
9827        header_map.append("X-Org", x_org.to_string().try_into()?);
9828        #[allow(unused_mut)]
9829        let mut request = self
9830            .client
9831            .get(url)
9832            .header(
9833                ::reqwest::header::ACCEPT,
9834                ::reqwest::header::HeaderValue::from_static("application/json"),
9835            )
9836            .query(&progenitor_client::QueryParam::new(
9837                "include_deleted",
9838                &include_deleted,
9839            ))
9840            .query(&progenitor_client::QueryParam::new(
9841                "include_metadata",
9842                &include_metadata,
9843            ))
9844            .query(&progenitor_client::QueryParam::new("limit", &limit))
9845            .query(&progenitor_client::QueryParam::new("offset", &offset))
9846            .query(&progenitor_client::QueryParam::new(
9847                "only_deleted",
9848                &only_deleted,
9849            ))
9850            .query(&progenitor_client::QueryParam::new(
9851                "provider_type",
9852                &provider_type,
9853            ))
9854            .query(&progenitor_client::QueryParam::new("q", &q))
9855            .headers(header_map)
9856            .build()?;
9857        let info = OperationInfo {
9858            operation_id: "list_integrations",
9859        };
9860        self.pre(&mut request, &info).await?;
9861        let result = self.exec(request, &info).await;
9862        self.post(&result, &info).await?;
9863        let response = result?;
9864        match response.status().as_u16() {
9865            200u16 => ResponseValue::from_response(response).await,
9866            401u16 => Err(Error::ErrorResponse(
9867                ResponseValue::from_response(response).await?,
9868            )),
9869            403u16 => Err(Error::ErrorResponse(
9870                ResponseValue::from_response(response).await?,
9871            )),
9872            500u16 => Err(Error::ErrorResponse(
9873                ResponseValue::from_response(response).await?,
9874            )),
9875            _ => Err(Error::UnexpectedResponse(response)),
9876        }
9877    }
9878    /**Create an integration in an organization
9879
9880    Sends a `POST` request to `/integrations`
9881
9882    */
9883    pub async fn create_integration<'a>(
9884        &'a self,
9885        include_deleted: Option<bool>,
9886        include_metadata: Option<bool>,
9887        x_org: &'a str,
9888        body: &'a types::CreateIntegrationRequest,
9889    ) -> Result<ResponseValue<types::IntegrationResponse>, Error<()>> {
9890        let url = format!("{}/integrations", self.baseurl,);
9891        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
9892        header_map.append(
9893            ::reqwest::header::HeaderName::from_static("api-version"),
9894            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9895        );
9896        header_map.append("X-Org", x_org.to_string().try_into()?);
9897        #[allow(unused_mut)]
9898        let mut request = self
9899            .client
9900            .post(url)
9901            .header(
9902                ::reqwest::header::ACCEPT,
9903                ::reqwest::header::HeaderValue::from_static("application/json"),
9904            )
9905            .json(&body)
9906            .query(&progenitor_client::QueryParam::new(
9907                "include_deleted",
9908                &include_deleted,
9909            ))
9910            .query(&progenitor_client::QueryParam::new(
9911                "include_metadata",
9912                &include_metadata,
9913            ))
9914            .headers(header_map)
9915            .build()?;
9916        let info = OperationInfo {
9917            operation_id: "create_integration",
9918        };
9919        self.pre(&mut request, &info).await?;
9920        let result = self.exec(request, &info).await;
9921        self.post(&result, &info).await?;
9922        let response = result?;
9923        match response.status().as_u16() {
9924            200u16 => ResponseValue::from_response(response).await,
9925            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
9926            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
9927            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
9928            _ => Err(Error::UnexpectedResponse(response)),
9929        }
9930    }
9931    /**Get an access portal by ID. Resolves the portal's building (integration) for direct links
9932
9933    Sends a `GET` request to `/integrations/access-portals/{portal_id}`
9934
9935    */
9936    pub async fn get_access_portal_by_id<'a>(
9937        &'a self,
9938        portal_id: &'a str,
9939        x_org: &'a str,
9940    ) -> Result<ResponseValue<types::GetAccessPortalResponse>, Error<()>> {
9941        let url = format!(
9942            "{}/integrations/access-portals/{}",
9943            self.baseurl,
9944            encode_path(&portal_id.to_string()),
9945        );
9946        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
9947        header_map.append(
9948            ::reqwest::header::HeaderName::from_static("api-version"),
9949            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9950        );
9951        header_map.append("X-Org", x_org.to_string().try_into()?);
9952        #[allow(unused_mut)]
9953        let mut request = self
9954            .client
9955            .get(url)
9956            .header(
9957                ::reqwest::header::ACCEPT,
9958                ::reqwest::header::HeaderValue::from_static("application/json"),
9959            )
9960            .headers(header_map)
9961            .build()?;
9962        let info = OperationInfo {
9963            operation_id: "get_access_portal_by_id",
9964        };
9965        self.pre(&mut request, &info).await?;
9966        let result = self.exec(request, &info).await;
9967        self.post(&result, &info).await?;
9968        let response = result?;
9969        match response.status().as_u16() {
9970            200u16 => ResponseValue::from_response(response).await,
9971            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
9972            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
9973            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
9974            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
9975            _ => Err(Error::UnexpectedResponse(response)),
9976        }
9977    }
9978    /**List supported integration provider types (canonical values)
9979
9980    Sends a `GET` request to `/integrations/provider-types`
9981
9982    */
9983    pub async fn list_integration_provider_types<'a>(
9984        &'a self,
9985    ) -> Result<
9986        ResponseValue<
9987            ::std::collections::HashMap<
9988                ::std::string::String,
9989                ::std::collections::HashMap<::std::string::String, ::std::string::String>,
9990            >,
9991        >,
9992        Error<()>,
9993    > {
9994        let url = format!("{}/integrations/provider-types", self.baseurl,);
9995        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
9996        header_map.append(
9997            ::reqwest::header::HeaderName::from_static("api-version"),
9998            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
9999        );
10000        #[allow(unused_mut)]
10001        let mut request = self
10002            .client
10003            .get(url)
10004            .header(
10005                ::reqwest::header::ACCEPT,
10006                ::reqwest::header::HeaderValue::from_static("application/json"),
10007            )
10008            .headers(header_map)
10009            .build()?;
10010        let info = OperationInfo {
10011            operation_id: "list_integration_provider_types",
10012        };
10013        self.pre(&mut request, &info).await?;
10014        let result = self.exec(request, &info).await;
10015        self.post(&result, &info).await?;
10016        let response = result?;
10017        match response.status().as_u16() {
10018            200u16 => ResponseValue::from_response(response).await,
10019            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10020            _ => Err(Error::UnexpectedResponse(response)),
10021        }
10022    }
10023    /**Get a provider definition (capabilities, actions, schemas) for UI/CLI
10024
10025    Sends a `GET` request to `/integrations/provider-types/{provider_type}/definition`
10026
10027    */
10028    pub async fn get_integration_provider_definition<'a>(
10029        &'a self,
10030        provider_type: &'a str,
10031    ) -> Result<ResponseValue<()>, Error<()>> {
10032        let url = format!(
10033            "{}/integrations/provider-types/{}/definition",
10034            self.baseurl,
10035            encode_path(&provider_type.to_string()),
10036        );
10037        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
10038        header_map.append(
10039            ::reqwest::header::HeaderName::from_static("api-version"),
10040            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
10041        );
10042        #[allow(unused_mut)]
10043        let mut request = self.client.get(url).headers(header_map).build()?;
10044        let info = OperationInfo {
10045            operation_id: "get_integration_provider_definition",
10046        };
10047        self.pre(&mut request, &info).await?;
10048        let result = self.exec(request, &info).await;
10049        self.post(&result, &info).await?;
10050        let response = result?;
10051        match response.status().as_u16() {
10052            200u16 => Ok(ResponseValue::empty(response)),
10053            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10054            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10055            _ => Err(Error::UnexpectedResponse(response)),
10056        }
10057    }
10058    /**Sends a `GET` request to `/integrations/{id}`
10059
10060    */
10061    pub async fn get_integration<'a>(
10062        &'a self,
10063        id: &'a str,
10064        include_deleted: Option<bool>,
10065        include_metadata: Option<bool>,
10066        x_org: &'a str,
10067    ) -> Result<ResponseValue<types::IntegrationResponse>, Error<types::ApiErrorResponse>> {
10068        let url = format!(
10069            "{}/integrations/{}",
10070            self.baseurl,
10071            encode_path(&id.to_string()),
10072        );
10073        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
10074        header_map.append(
10075            ::reqwest::header::HeaderName::from_static("api-version"),
10076            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
10077        );
10078        header_map.append("X-Org", x_org.to_string().try_into()?);
10079        #[allow(unused_mut)]
10080        let mut request = self
10081            .client
10082            .get(url)
10083            .header(
10084                ::reqwest::header::ACCEPT,
10085                ::reqwest::header::HeaderValue::from_static("application/json"),
10086            )
10087            .query(&progenitor_client::QueryParam::new(
10088                "include_deleted",
10089                &include_deleted,
10090            ))
10091            .query(&progenitor_client::QueryParam::new(
10092                "include_metadata",
10093                &include_metadata,
10094            ))
10095            .headers(header_map)
10096            .build()?;
10097        let info = OperationInfo {
10098            operation_id: "get_integration",
10099        };
10100        self.pre(&mut request, &info).await?;
10101        let result = self.exec(request, &info).await;
10102        self.post(&result, &info).await?;
10103        let response = result?;
10104        match response.status().as_u16() {
10105            200u16 => ResponseValue::from_response(response).await,
10106            400u16 => Err(Error::ErrorResponse(
10107                ResponseValue::from_response(response).await?,
10108            )),
10109            401u16 => Err(Error::ErrorResponse(
10110                ResponseValue::from_response(response).await?,
10111            )),
10112            403u16 => Err(Error::ErrorResponse(
10113                ResponseValue::from_response(response).await?,
10114            )),
10115            404u16 => Err(Error::ErrorResponse(
10116                ResponseValue::from_response(response).await?,
10117            )),
10118            500u16 => Err(Error::ErrorResponse(
10119                ResponseValue::from_response(response).await?,
10120            )),
10121            _ => Err(Error::UnexpectedResponse(response)),
10122        }
10123    }
10124    /**Update an integration
10125
10126    Sends a `PUT` request to `/integrations/{id}`
10127
10128    */
10129    pub async fn update_integration<'a>(
10130        &'a self,
10131        id: &'a str,
10132        include_deleted: Option<bool>,
10133        include_metadata: Option<bool>,
10134        x_org: &'a str,
10135        body: &'a types::UpdateIntegrationRequest,
10136    ) -> Result<ResponseValue<types::IntegrationResponse>, Error<()>> {
10137        let url = format!(
10138            "{}/integrations/{}",
10139            self.baseurl,
10140            encode_path(&id.to_string()),
10141        );
10142        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
10143        header_map.append(
10144            ::reqwest::header::HeaderName::from_static("api-version"),
10145            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
10146        );
10147        header_map.append("X-Org", x_org.to_string().try_into()?);
10148        #[allow(unused_mut)]
10149        let mut request = self
10150            .client
10151            .put(url)
10152            .header(
10153                ::reqwest::header::ACCEPT,
10154                ::reqwest::header::HeaderValue::from_static("application/json"),
10155            )
10156            .json(&body)
10157            .query(&progenitor_client::QueryParam::new(
10158                "include_deleted",
10159                &include_deleted,
10160            ))
10161            .query(&progenitor_client::QueryParam::new(
10162                "include_metadata",
10163                &include_metadata,
10164            ))
10165            .headers(header_map)
10166            .build()?;
10167        let info = OperationInfo {
10168            operation_id: "update_integration",
10169        };
10170        self.pre(&mut request, &info).await?;
10171        let result = self.exec(request, &info).await;
10172        self.post(&result, &info).await?;
10173        let response = result?;
10174        match response.status().as_u16() {
10175            200u16 => ResponseValue::from_response(response).await,
10176            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10177            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10178            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10179            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10180            _ => Err(Error::UnexpectedResponse(response)),
10181        }
10182    }
10183    /**List access invites for an integration
10184
10185    Sends a `GET` request to `/integrations/{id}/access-invites`
10186
10187    */
10188    pub async fn list_integration_access_invites<'a>(
10189        &'a self,
10190        id: &'a str,
10191        x_org: &'a str,
10192    ) -> Result<
10193        ResponseValue<types::ListIntegrationAccessInvitesResponse>,
10194        Error<types::ApiErrorResponse>,
10195    > {
10196        let url = format!(
10197            "{}/integrations/{}/access-invites",
10198            self.baseurl,
10199            encode_path(&id.to_string()),
10200        );
10201        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
10202        header_map.append(
10203            ::reqwest::header::HeaderName::from_static("api-version"),
10204            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
10205        );
10206        header_map.append("X-Org", x_org.to_string().try_into()?);
10207        #[allow(unused_mut)]
10208        let mut request = self
10209            .client
10210            .get(url)
10211            .header(
10212                ::reqwest::header::ACCEPT,
10213                ::reqwest::header::HeaderValue::from_static("application/json"),
10214            )
10215            .headers(header_map)
10216            .build()?;
10217        let info = OperationInfo {
10218            operation_id: "list_integration_access_invites",
10219        };
10220        self.pre(&mut request, &info).await?;
10221        let result = self.exec(request, &info).await;
10222        self.post(&result, &info).await?;
10223        let response = result?;
10224        match response.status().as_u16() {
10225            200u16 => ResponseValue::from_response(response).await,
10226            400u16 => Err(Error::ErrorResponse(
10227                ResponseValue::from_response(response).await?,
10228            )),
10229            401u16 => Err(Error::ErrorResponse(
10230                ResponseValue::from_response(response).await?,
10231            )),
10232            403u16 => Err(Error::ErrorResponse(
10233                ResponseValue::from_response(response).await?,
10234            )),
10235            404u16 => Err(Error::ErrorResponse(
10236                ResponseValue::from_response(response).await?,
10237            )),
10238            _ => Err(Error::UnexpectedResponse(response)),
10239        }
10240    }
10241    /**Create an access invite granting portal_open on one or more portals
10242
10243    Sends a `POST` request to `/integrations/{id}/access-invites`
10244
10245    */
10246    pub async fn create_integration_access_invite<'a>(
10247        &'a self,
10248        id: &'a str,
10249        x_org: &'a str,
10250        body: &'a types::CreateAccessInviteRequest,
10251    ) -> Result<ResponseValue<types::CreateAccessInviteResponse>, Error<types::ApiErrorResponse>>
10252    {
10253        let url = format!(
10254            "{}/integrations/{}/access-invites",
10255            self.baseurl,
10256            encode_path(&id.to_string()),
10257        );
10258        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
10259        header_map.append(
10260            ::reqwest::header::HeaderName::from_static("api-version"),
10261            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
10262        );
10263        header_map.append("X-Org", x_org.to_string().try_into()?);
10264        #[allow(unused_mut)]
10265        let mut request = self
10266            .client
10267            .post(url)
10268            .header(
10269                ::reqwest::header::ACCEPT,
10270                ::reqwest::header::HeaderValue::from_static("application/json"),
10271            )
10272            .json(&body)
10273            .headers(header_map)
10274            .build()?;
10275        let info = OperationInfo {
10276            operation_id: "create_integration_access_invite",
10277        };
10278        self.pre(&mut request, &info).await?;
10279        let result = self.exec(request, &info).await;
10280        self.post(&result, &info).await?;
10281        let response = result?;
10282        match response.status().as_u16() {
10283            200u16 => ResponseValue::from_response(response).await,
10284            400u16 => Err(Error::ErrorResponse(
10285                ResponseValue::from_response(response).await?,
10286            )),
10287            401u16 => Err(Error::ErrorResponse(
10288                ResponseValue::from_response(response).await?,
10289            )),
10290            403u16 => Err(Error::ErrorResponse(
10291                ResponseValue::from_response(response).await?,
10292            )),
10293            404u16 => Err(Error::ErrorResponse(
10294                ResponseValue::from_response(response).await?,
10295            )),
10296            _ => Err(Error::UnexpectedResponse(response)),
10297        }
10298    }
10299    /**Update an access invite (portals, validity, max_uses). Only active invites can be updated
10300
10301    Sends a `PUT` request to `/integrations/{id}/access-invites/{invite_link_id}`
10302
10303    */
10304    pub async fn update_integration_access_invite<'a>(
10305        &'a self,
10306        id: &'a str,
10307        invite_link_id: &'a str,
10308        x_org: &'a str,
10309        body: &'a types::UpdateAccessInviteRequest,
10310    ) -> Result<ResponseValue<types::AccessInviteListItem>, Error<types::ApiErrorResponse>> {
10311        let url = format!(
10312            "{}/integrations/{}/access-invites/{}",
10313            self.baseurl,
10314            encode_path(&id.to_string()),
10315            encode_path(&invite_link_id.to_string()),
10316        );
10317        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
10318        header_map.append(
10319            ::reqwest::header::HeaderName::from_static("api-version"),
10320            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
10321        );
10322        header_map.append("X-Org", x_org.to_string().try_into()?);
10323        #[allow(unused_mut)]
10324        let mut request = self
10325            .client
10326            .put(url)
10327            .header(
10328                ::reqwest::header::ACCEPT,
10329                ::reqwest::header::HeaderValue::from_static("application/json"),
10330            )
10331            .json(&body)
10332            .headers(header_map)
10333            .build()?;
10334        let info = OperationInfo {
10335            operation_id: "update_integration_access_invite",
10336        };
10337        self.pre(&mut request, &info).await?;
10338        let result = self.exec(request, &info).await;
10339        self.post(&result, &info).await?;
10340        let response = result?;
10341        match response.status().as_u16() {
10342            200u16 => ResponseValue::from_response(response).await,
10343            400u16 => Err(Error::ErrorResponse(
10344                ResponseValue::from_response(response).await?,
10345            )),
10346            401u16 => Err(Error::ErrorResponse(
10347                ResponseValue::from_response(response).await?,
10348            )),
10349            403u16 => Err(Error::ErrorResponse(
10350                ResponseValue::from_response(response).await?,
10351            )),
10352            404u16 => Err(Error::ErrorResponse(
10353                ResponseValue::from_response(response).await?,
10354            )),
10355            _ => Err(Error::UnexpectedResponse(response)),
10356        }
10357    }
10358    /**Delete an access invite (permanently)
10359
10360    Sends a `DELETE` request to `/integrations/{id}/access-invites/{invite_link_id}`
10361
10362    */
10363    pub async fn delete_integration_access_invite<'a>(
10364        &'a self,
10365        id: &'a str,
10366        invite_link_id: &'a str,
10367        x_org: &'a str,
10368    ) -> Result<ResponseValue<()>, Error<()>> {
10369        let url = format!(
10370            "{}/integrations/{}/access-invites/{}",
10371            self.baseurl,
10372            encode_path(&id.to_string()),
10373            encode_path(&invite_link_id.to_string()),
10374        );
10375        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
10376        header_map.append(
10377            ::reqwest::header::HeaderName::from_static("api-version"),
10378            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
10379        );
10380        header_map.append("X-Org", x_org.to_string().try_into()?);
10381        #[allow(unused_mut)]
10382        let mut request = self.client.delete(url).headers(header_map).build()?;
10383        let info = OperationInfo {
10384            operation_id: "delete_integration_access_invite",
10385        };
10386        self.pre(&mut request, &info).await?;
10387        let result = self.exec(request, &info).await;
10388        self.post(&result, &info).await?;
10389        let response = result?;
10390        match response.status().as_u16() {
10391            200u16 => Ok(ResponseValue::empty(response)),
10392            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10393            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10394            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10395            _ => Err(Error::UnexpectedResponse(response)),
10396        }
10397    }
10398    /**Restore (un-revoke) an access invite
10399
10400    Sends a `POST` request to `/integrations/{id}/access-invites/{invite_link_id}/restore`
10401
10402    */
10403    pub async fn restore_integration_access_invite<'a>(
10404        &'a self,
10405        id: &'a str,
10406        invite_link_id: &'a str,
10407        x_org: &'a str,
10408    ) -> Result<ResponseValue<types::AccessInviteListItem>, Error<types::ApiErrorResponse>> {
10409        let url = format!(
10410            "{}/integrations/{}/access-invites/{}/restore",
10411            self.baseurl,
10412            encode_path(&id.to_string()),
10413            encode_path(&invite_link_id.to_string()),
10414        );
10415        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
10416        header_map.append(
10417            ::reqwest::header::HeaderName::from_static("api-version"),
10418            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
10419        );
10420        header_map.append("X-Org", x_org.to_string().try_into()?);
10421        #[allow(unused_mut)]
10422        let mut request = self
10423            .client
10424            .post(url)
10425            .header(
10426                ::reqwest::header::ACCEPT,
10427                ::reqwest::header::HeaderValue::from_static("application/json"),
10428            )
10429            .headers(header_map)
10430            .build()?;
10431        let info = OperationInfo {
10432            operation_id: "restore_integration_access_invite",
10433        };
10434        self.pre(&mut request, &info).await?;
10435        let result = self.exec(request, &info).await;
10436        self.post(&result, &info).await?;
10437        let response = result?;
10438        match response.status().as_u16() {
10439            200u16 => ResponseValue::from_response(response).await,
10440            400u16 => Err(Error::ErrorResponse(
10441                ResponseValue::from_response(response).await?,
10442            )),
10443            401u16 => Err(Error::ErrorResponse(
10444                ResponseValue::from_response(response).await?,
10445            )),
10446            403u16 => Err(Error::ErrorResponse(
10447                ResponseValue::from_response(response).await?,
10448            )),
10449            404u16 => Err(Error::ErrorResponse(
10450                ResponseValue::from_response(response).await?,
10451            )),
10452            _ => Err(Error::UnexpectedResponse(response)),
10453        }
10454    }
10455    /**List public access portals for an integration (for admin links to public portal pages)
10456
10457    Sends a `GET` request to `/integrations/{id}/access-portals`
10458
10459    */
10460    pub async fn list_integration_access_portals<'a>(
10461        &'a self,
10462        id: &'a str,
10463        x_org: &'a str,
10464    ) -> Result<ResponseValue<types::ListIntegrationAccessPortalsResponse>, Error<()>> {
10465        let url = format!(
10466            "{}/integrations/{}/access-portals",
10467            self.baseurl,
10468            encode_path(&id.to_string()),
10469        );
10470        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
10471        header_map.append(
10472            ::reqwest::header::HeaderName::from_static("api-version"),
10473            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
10474        );
10475        header_map.append("X-Org", x_org.to_string().try_into()?);
10476        #[allow(unused_mut)]
10477        let mut request = self
10478            .client
10479            .get(url)
10480            .header(
10481                ::reqwest::header::ACCEPT,
10482                ::reqwest::header::HeaderValue::from_static("application/json"),
10483            )
10484            .headers(header_map)
10485            .build()?;
10486        let info = OperationInfo {
10487            operation_id: "list_integration_access_portals",
10488        };
10489        self.pre(&mut request, &info).await?;
10490        let result = self.exec(request, &info).await;
10491        self.post(&result, &info).await?;
10492        let response = result?;
10493        match response.status().as_u16() {
10494            200u16 => ResponseValue::from_response(response).await,
10495            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10496            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10497            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10498            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10499            _ => Err(Error::UnexpectedResponse(response)),
10500        }
10501    }
10502    /**Create a public access portal for an integration
10503
10504    Sends a `POST` request to `/integrations/{id}/access-portals`
10505
10506    */
10507    pub async fn create_integration_access_portal<'a>(
10508        &'a self,
10509        id: &'a str,
10510        x_org: &'a str,
10511        body: &'a types::CreateAccessPortalRequest,
10512    ) -> Result<ResponseValue<types::CreateAccessPortalResponse>, Error<()>> {
10513        let url = format!(
10514            "{}/integrations/{}/access-portals",
10515            self.baseurl,
10516            encode_path(&id.to_string()),
10517        );
10518        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
10519        header_map.append(
10520            ::reqwest::header::HeaderName::from_static("api-version"),
10521            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
10522        );
10523        header_map.append("X-Org", x_org.to_string().try_into()?);
10524        #[allow(unused_mut)]
10525        let mut request = self
10526            .client
10527            .post(url)
10528            .header(
10529                ::reqwest::header::ACCEPT,
10530                ::reqwest::header::HeaderValue::from_static("application/json"),
10531            )
10532            .json(&body)
10533            .headers(header_map)
10534            .build()?;
10535        let info = OperationInfo {
10536            operation_id: "create_integration_access_portal",
10537        };
10538        self.pre(&mut request, &info).await?;
10539        let result = self.exec(request, &info).await;
10540        self.post(&result, &info).await?;
10541        let response = result?;
10542        match response.status().as_u16() {
10543            200u16 => ResponseValue::from_response(response).await,
10544            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10545            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10546            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10547            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10548            _ => Err(Error::UnexpectedResponse(response)),
10549        }
10550    }
10551    /**Update a public access portal
10552
10553    Sends a `PUT` request to `/integrations/{id}/access-portals/{portal_id}`
10554
10555    */
10556    pub async fn update_integration_access_portal<'a>(
10557        &'a self,
10558        id: &'a str,
10559        portal_id: &'a str,
10560        x_org: &'a str,
10561        body: &'a types::UpdateAccessPortalRequest,
10562    ) -> Result<ResponseValue<types::AccessPortalListItem>, Error<()>> {
10563        let url = format!(
10564            "{}/integrations/{}/access-portals/{}",
10565            self.baseurl,
10566            encode_path(&id.to_string()),
10567            encode_path(&portal_id.to_string()),
10568        );
10569        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
10570        header_map.append(
10571            ::reqwest::header::HeaderName::from_static("api-version"),
10572            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
10573        );
10574        header_map.append("X-Org", x_org.to_string().try_into()?);
10575        #[allow(unused_mut)]
10576        let mut request = self
10577            .client
10578            .put(url)
10579            .header(
10580                ::reqwest::header::ACCEPT,
10581                ::reqwest::header::HeaderValue::from_static("application/json"),
10582            )
10583            .json(&body)
10584            .headers(header_map)
10585            .build()?;
10586        let info = OperationInfo {
10587            operation_id: "update_integration_access_portal",
10588        };
10589        self.pre(&mut request, &info).await?;
10590        let result = self.exec(request, &info).await;
10591        self.post(&result, &info).await?;
10592        let response = result?;
10593        match response.status().as_u16() {
10594            200u16 => ResponseValue::from_response(response).await,
10595            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10596            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10597            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10598            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10599            _ => Err(Error::UnexpectedResponse(response)),
10600        }
10601    }
10602    /**Delete a public access portal
10603
10604    Sends a `DELETE` request to `/integrations/{id}/access-portals/{portal_id}`
10605
10606    */
10607    pub async fn delete_integration_access_portal<'a>(
10608        &'a self,
10609        id: &'a str,
10610        portal_id: &'a str,
10611        x_org: &'a str,
10612    ) -> Result<ResponseValue<()>, Error<()>> {
10613        let url = format!(
10614            "{}/integrations/{}/access-portals/{}",
10615            self.baseurl,
10616            encode_path(&id.to_string()),
10617            encode_path(&portal_id.to_string()),
10618        );
10619        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
10620        header_map.append(
10621            ::reqwest::header::HeaderName::from_static("api-version"),
10622            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
10623        );
10624        header_map.append("X-Org", x_org.to_string().try_into()?);
10625        #[allow(unused_mut)]
10626        let mut request = self.client.delete(url).headers(header_map).build()?;
10627        let info = OperationInfo {
10628            operation_id: "delete_integration_access_portal",
10629        };
10630        self.pre(&mut request, &info).await?;
10631        let result = self.exec(request, &info).await;
10632        self.post(&result, &info).await?;
10633        let response = result?;
10634        match response.status().as_u16() {
10635            200u16 => Ok(ResponseValue::empty(response)),
10636            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10637            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10638            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10639            _ => Err(Error::UnexpectedResponse(response)),
10640        }
10641    }
10642    /**List building users (users with virtual_access:integration:{id}:* role)
10643
10644    Sends a `GET` request to `/integrations/{id}/building-users`
10645
10646    */
10647    pub async fn list_building_users<'a>(
10648        &'a self,
10649        id: &'a str,
10650        x_org: &'a str,
10651    ) -> Result<ResponseValue<()>, Error<()>> {
10652        let url = format!(
10653            "{}/integrations/{}/building-users",
10654            self.baseurl,
10655            encode_path(&id.to_string()),
10656        );
10657        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
10658        header_map.append(
10659            ::reqwest::header::HeaderName::from_static("api-version"),
10660            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
10661        );
10662        header_map.append("X-Org", x_org.to_string().try_into()?);
10663        #[allow(unused_mut)]
10664        let mut request = self.client.get(url).headers(header_map).build()?;
10665        let info = OperationInfo {
10666            operation_id: "list_building_users",
10667        };
10668        self.pre(&mut request, &info).await?;
10669        let result = self.exec(request, &info).await;
10670        self.post(&result, &info).await?;
10671        let response = result?;
10672        match response.status().as_u16() {
10673            200u16 => Ok(ResponseValue::empty(response)),
10674            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10675            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10676            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10677            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10678            500u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10679            _ => Err(Error::UnexpectedResponse(response)),
10680        }
10681    }
10682    /**Add user to building (adds org role; creates membership if missing)
10683
10684    Sends a `POST` request to `/integrations/{id}/building-users`
10685
10686    */
10687    pub async fn add_building_user<'a>(
10688        &'a self,
10689        id: &'a str,
10690        x_org: &'a str,
10691        body: &'a types::AddBuildingUserPayload,
10692    ) -> Result<ResponseValue<()>, Error<()>> {
10693        let url = format!(
10694            "{}/integrations/{}/building-users",
10695            self.baseurl,
10696            encode_path(&id.to_string()),
10697        );
10698        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
10699        header_map.append(
10700            ::reqwest::header::HeaderName::from_static("api-version"),
10701            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
10702        );
10703        header_map.append("X-Org", x_org.to_string().try_into()?);
10704        #[allow(unused_mut)]
10705        let mut request = self
10706            .client
10707            .post(url)
10708            .json(&body)
10709            .headers(header_map)
10710            .build()?;
10711        let info = OperationInfo {
10712            operation_id: "add_building_user",
10713        };
10714        self.pre(&mut request, &info).await?;
10715        let result = self.exec(request, &info).await;
10716        self.post(&result, &info).await?;
10717        let response = result?;
10718        match response.status().as_u16() {
10719            201u16 => Ok(ResponseValue::empty(response)),
10720            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10721            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10722            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10723            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10724            500u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10725            _ => Err(Error::UnexpectedResponse(response)),
10726        }
10727    }
10728    /**Remove user from building (removes org roles and apartment assignments)
10729
10730    Sends a `DELETE` request to `/integrations/{id}/building-users/{user_id}`
10731
10732    */
10733    pub async fn delete_building_user<'a>(
10734        &'a self,
10735        id: &'a str,
10736        user_id: &'a str,
10737        x_org: &'a str,
10738    ) -> Result<ResponseValue<()>, Error<()>> {
10739        let url = format!(
10740            "{}/integrations/{}/building-users/{}",
10741            self.baseurl,
10742            encode_path(&id.to_string()),
10743            encode_path(&user_id.to_string()),
10744        );
10745        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
10746        header_map.append(
10747            ::reqwest::header::HeaderName::from_static("api-version"),
10748            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
10749        );
10750        header_map.append("X-Org", x_org.to_string().try_into()?);
10751        #[allow(unused_mut)]
10752        let mut request = self.client.delete(url).headers(header_map).build()?;
10753        let info = OperationInfo {
10754            operation_id: "delete_building_user",
10755        };
10756        self.pre(&mut request, &info).await?;
10757        let result = self.exec(request, &info).await;
10758        self.post(&result, &info).await?;
10759        let response = result?;
10760        match response.status().as_u16() {
10761            204u16 => Ok(ResponseValue::empty(response)),
10762            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10763            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10764            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10765            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10766            500u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10767            _ => Err(Error::UnexpectedResponse(response)),
10768        }
10769    }
10770    /**Get provider-specific JSON Schema for `device_metadata` for this integration (for generic UI labels)
10771
10772    Sends a `GET` request to `/integrations/{id}/device-metadata-schema`
10773
10774    */
10775    pub async fn get_integration_device_metadata_schema<'a>(
10776        &'a self,
10777        id: &'a str,
10778        x_org: &'a str,
10779    ) -> Result<ResponseValue<types::IntegrationDeviceMetadataSchemaResponse>, Error<()>> {
10780        let url = format!(
10781            "{}/integrations/{}/device-metadata-schema",
10782            self.baseurl,
10783            encode_path(&id.to_string()),
10784        );
10785        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
10786        header_map.append(
10787            ::reqwest::header::HeaderName::from_static("api-version"),
10788            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
10789        );
10790        header_map.append("X-Org", x_org.to_string().try_into()?);
10791        #[allow(unused_mut)]
10792        let mut request = self
10793            .client
10794            .get(url)
10795            .header(
10796                ::reqwest::header::ACCEPT,
10797                ::reqwest::header::HeaderValue::from_static("application/json"),
10798            )
10799            .headers(header_map)
10800            .build()?;
10801        let info = OperationInfo {
10802            operation_id: "get_integration_device_metadata_schema",
10803        };
10804        self.pre(&mut request, &info).await?;
10805        let result = self.exec(request, &info).await;
10806        self.post(&result, &info).await?;
10807        let response = result?;
10808        match response.status().as_u16() {
10809            200u16 => ResponseValue::from_response(response).await,
10810            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10811            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10812            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10813            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10814            _ => Err(Error::UnexpectedResponse(response)),
10815        }
10816    }
10817    /**List devices discovered from the upstream provider for this integration
10818
10819    Sends a `GET` request to `/integrations/{id}/discovered-devices`
10820
10821    */
10822    pub async fn get_integration_discovered_devices<'a>(
10823        &'a self,
10824        id: &'a str,
10825        include_deleted: Option<bool>,
10826        include_metadata: Option<bool>,
10827        x_org: &'a str,
10828    ) -> Result<ResponseValue<::serde_json::Value>, Error<()>> {
10829        let url = format!(
10830            "{}/integrations/{}/discovered-devices",
10831            self.baseurl,
10832            encode_path(&id.to_string()),
10833        );
10834        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
10835        header_map.append(
10836            ::reqwest::header::HeaderName::from_static("api-version"),
10837            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
10838        );
10839        header_map.append("X-Org", x_org.to_string().try_into()?);
10840        #[allow(unused_mut)]
10841        let mut request = self
10842            .client
10843            .get(url)
10844            .header(
10845                ::reqwest::header::ACCEPT,
10846                ::reqwest::header::HeaderValue::from_static("application/json"),
10847            )
10848            .query(&progenitor_client::QueryParam::new(
10849                "include_deleted",
10850                &include_deleted,
10851            ))
10852            .query(&progenitor_client::QueryParam::new(
10853                "include_metadata",
10854                &include_metadata,
10855            ))
10856            .headers(header_map)
10857            .build()?;
10858        let info = OperationInfo {
10859            operation_id: "get_integration_discovered_devices",
10860        };
10861        self.pre(&mut request, &info).await?;
10862        let result = self.exec(request, &info).await;
10863        self.post(&result, &info).await?;
10864        let response = result?;
10865        match response.status().as_u16() {
10866            200u16 => ResponseValue::from_response(response).await,
10867            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10868            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10869            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10870            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10871            501u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10872            502u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
10873            _ => Err(Error::UnexpectedResponse(response)),
10874        }
10875    }
10876    /**List resource entities for devices belonging to an integration
10877
10878    Sends a `GET` request to `/integrations/{id}/entities`
10879
10880    Arguments:
10881    - `id`
10882    - `entity_type`: Comma-separated entity types (e.g. `door,switch`). Omit for all types.
10883    - `include_deleted`
10884    - `include_metadata`
10885    - `limit`: Number of items per page. Default from config, max 200.
10886    - `offset`: Number of items to skip. Default 0.
10887    - `only_deleted`
10888    - `x_org`
10889    */
10890    pub async fn list_integration_entities<'a>(
10891        &'a self,
10892        id: &'a str,
10893        entity_type: Option<&'a str>,
10894        include_deleted: bool,
10895        include_metadata: bool,
10896        limit: Option<i32>,
10897        offset: Option<i32>,
10898        only_deleted: bool,
10899        x_org: &'a str,
10900    ) -> Result<ResponseValue<types::PaginatedResponseEntityResponse>, Error<types::ApiErrorResponse>>
10901    {
10902        let url = format!(
10903            "{}/integrations/{}/entities",
10904            self.baseurl,
10905            encode_path(&id.to_string()),
10906        );
10907        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
10908        header_map.append(
10909            ::reqwest::header::HeaderName::from_static("api-version"),
10910            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
10911        );
10912        header_map.append("X-Org", x_org.to_string().try_into()?);
10913        #[allow(unused_mut)]
10914        let mut request = self
10915            .client
10916            .get(url)
10917            .header(
10918                ::reqwest::header::ACCEPT,
10919                ::reqwest::header::HeaderValue::from_static("application/json"),
10920            )
10921            .query(&progenitor_client::QueryParam::new(
10922                "entity_type",
10923                &entity_type,
10924            ))
10925            .query(&progenitor_client::QueryParam::new(
10926                "include_deleted",
10927                &include_deleted,
10928            ))
10929            .query(&progenitor_client::QueryParam::new(
10930                "include_metadata",
10931                &include_metadata,
10932            ))
10933            .query(&progenitor_client::QueryParam::new("limit", &limit))
10934            .query(&progenitor_client::QueryParam::new("offset", &offset))
10935            .query(&progenitor_client::QueryParam::new(
10936                "only_deleted",
10937                &only_deleted,
10938            ))
10939            .headers(header_map)
10940            .build()?;
10941        let info = OperationInfo {
10942            operation_id: "list_integration_entities",
10943        };
10944        self.pre(&mut request, &info).await?;
10945        let result = self.exec(request, &info).await;
10946        self.post(&result, &info).await?;
10947        let response = result?;
10948        match response.status().as_u16() {
10949            200u16 => ResponseValue::from_response(response).await,
10950            400u16 => Err(Error::ErrorResponse(
10951                ResponseValue::from_response(response).await?,
10952            )),
10953            401u16 => Err(Error::ErrorResponse(
10954                ResponseValue::from_response(response).await?,
10955            )),
10956            403u16 => Err(Error::ErrorResponse(
10957                ResponseValue::from_response(response).await?,
10958            )),
10959            404u16 => Err(Error::ErrorResponse(
10960                ResponseValue::from_response(response).await?,
10961            )),
10962            500u16 => Err(Error::ErrorResponse(
10963                ResponseValue::from_response(response).await?,
10964            )),
10965            _ => Err(Error::UnexpectedResponse(response)),
10966        }
10967    }
10968    /**List provider-specific ops available for an integration
10969
10970    Sends a `GET` request to `/integrations/{id}/ops`
10971
10972    */
10973    pub async fn list_integration_ops<'a>(
10974        &'a self,
10975        id: &'a str,
10976        include_deleted: Option<bool>,
10977        include_metadata: Option<bool>,
10978        x_org: &'a str,
10979    ) -> Result<ResponseValue<()>, Error<()>> {
10980        let url = format!(
10981            "{}/integrations/{}/ops",
10982            self.baseurl,
10983            encode_path(&id.to_string()),
10984        );
10985        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
10986        header_map.append(
10987            ::reqwest::header::HeaderName::from_static("api-version"),
10988            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
10989        );
10990        header_map.append("X-Org", x_org.to_string().try_into()?);
10991        #[allow(unused_mut)]
10992        let mut request = self
10993            .client
10994            .get(url)
10995            .query(&progenitor_client::QueryParam::new(
10996                "include_deleted",
10997                &include_deleted,
10998            ))
10999            .query(&progenitor_client::QueryParam::new(
11000                "include_metadata",
11001                &include_metadata,
11002            ))
11003            .headers(header_map)
11004            .build()?;
11005        let info = OperationInfo {
11006            operation_id: "list_integration_ops",
11007        };
11008        self.pre(&mut request, &info).await?;
11009        let result = self.exec(request, &info).await;
11010        self.post(&result, &info).await?;
11011        let response = result?;
11012        match response.status().as_u16() {
11013            200u16 => Ok(ResponseValue::empty(response)),
11014            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11015            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11016            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11017            _ => Err(Error::UnexpectedResponse(response)),
11018        }
11019    }
11020    /**Execute a provider-specific op for an integration
11021
11022    Sends a `POST` request to `/integrations/{id}/ops/{op_id}`
11023
11024    */
11025    pub async fn execute_integration_op<'a>(
11026        &'a self,
11027        id: &'a str,
11028        op_id: &'a str,
11029        x_org: &'a str,
11030        body: &'a ::serde_json::Value,
11031    ) -> Result<ResponseValue<()>, Error<()>> {
11032        let url = format!(
11033            "{}/integrations/{}/ops/{}",
11034            self.baseurl,
11035            encode_path(&id.to_string()),
11036            encode_path(&op_id.to_string()),
11037        );
11038        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
11039        header_map.append(
11040            ::reqwest::header::HeaderName::from_static("api-version"),
11041            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
11042        );
11043        header_map.append("X-Org", x_org.to_string().try_into()?);
11044        #[allow(unused_mut)]
11045        let mut request = self
11046            .client
11047            .post(url)
11048            .json(&body)
11049            .headers(header_map)
11050            .build()?;
11051        let info = OperationInfo {
11052            operation_id: "execute_integration_op",
11053        };
11054        self.pre(&mut request, &info).await?;
11055        let result = self.exec(request, &info).await;
11056        self.post(&result, &info).await?;
11057        let response = result?;
11058        match response.status().as_u16() {
11059            200u16 => Ok(ResponseValue::empty(response)),
11060            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11061            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11062            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11063            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11064            501u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11065            _ => Err(Error::UnexpectedResponse(response)),
11066        }
11067    }
11068    /**Permanently delete (purge) an integration
11069
11070    Sends a `DELETE` request to `/integrations/{id}/purge`
11071
11072    */
11073    pub async fn hard_delete_integration<'a>(
11074        &'a self,
11075        id: &'a str,
11076        include_deleted: Option<bool>,
11077        include_metadata: Option<bool>,
11078        x_org: &'a str,
11079    ) -> Result<ResponseValue<types::IntegrationResponse>, Error<types::ApiErrorResponse>> {
11080        let url = format!(
11081            "{}/integrations/{}/purge",
11082            self.baseurl,
11083            encode_path(&id.to_string()),
11084        );
11085        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
11086        header_map.append(
11087            ::reqwest::header::HeaderName::from_static("api-version"),
11088            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
11089        );
11090        header_map.append("X-Org", x_org.to_string().try_into()?);
11091        #[allow(unused_mut)]
11092        let mut request = self
11093            .client
11094            .delete(url)
11095            .header(
11096                ::reqwest::header::ACCEPT,
11097                ::reqwest::header::HeaderValue::from_static("application/json"),
11098            )
11099            .query(&progenitor_client::QueryParam::new(
11100                "include_deleted",
11101                &include_deleted,
11102            ))
11103            .query(&progenitor_client::QueryParam::new(
11104                "include_metadata",
11105                &include_metadata,
11106            ))
11107            .headers(header_map)
11108            .build()?;
11109        let info = OperationInfo {
11110            operation_id: "hard_delete_integration",
11111        };
11112        self.pre(&mut request, &info).await?;
11113        let result = self.exec(request, &info).await;
11114        self.post(&result, &info).await?;
11115        let response = result?;
11116        match response.status().as_u16() {
11117            200u16 => ResponseValue::from_response(response).await,
11118            400u16 => Err(Error::ErrorResponse(
11119                ResponseValue::from_response(response).await?,
11120            )),
11121            401u16 => Err(Error::ErrorResponse(
11122                ResponseValue::from_response(response).await?,
11123            )),
11124            403u16 => Err(Error::ErrorResponse(
11125                ResponseValue::from_response(response).await?,
11126            )),
11127            404u16 => Err(Error::ErrorResponse(
11128                ResponseValue::from_response(response).await?,
11129            )),
11130            422u16 => Err(Error::ErrorResponse(
11131                ResponseValue::from_response(response).await?,
11132            )),
11133            500u16 => Err(Error::ErrorResponse(
11134                ResponseValue::from_response(response).await?,
11135            )),
11136            _ => Err(Error::UnexpectedResponse(response)),
11137        }
11138    }
11139    /**Restore a soft-deleted integration
11140
11141    Sends a `POST` request to `/integrations/{id}/restore`
11142
11143    */
11144    pub async fn restore_integration<'a>(
11145        &'a self,
11146        id: &'a str,
11147        include_deleted: Option<bool>,
11148        include_metadata: Option<bool>,
11149        x_org: &'a str,
11150    ) -> Result<ResponseValue<types::IntegrationResponse>, Error<types::ApiErrorResponse>> {
11151        let url = format!(
11152            "{}/integrations/{}/restore",
11153            self.baseurl,
11154            encode_path(&id.to_string()),
11155        );
11156        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
11157        header_map.append(
11158            ::reqwest::header::HeaderName::from_static("api-version"),
11159            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
11160        );
11161        header_map.append("X-Org", x_org.to_string().try_into()?);
11162        #[allow(unused_mut)]
11163        let mut request = self
11164            .client
11165            .post(url)
11166            .header(
11167                ::reqwest::header::ACCEPT,
11168                ::reqwest::header::HeaderValue::from_static("application/json"),
11169            )
11170            .query(&progenitor_client::QueryParam::new(
11171                "include_deleted",
11172                &include_deleted,
11173            ))
11174            .query(&progenitor_client::QueryParam::new(
11175                "include_metadata",
11176                &include_metadata,
11177            ))
11178            .headers(header_map)
11179            .build()?;
11180        let info = OperationInfo {
11181            operation_id: "restore_integration",
11182        };
11183        self.pre(&mut request, &info).await?;
11184        let result = self.exec(request, &info).await;
11185        self.post(&result, &info).await?;
11186        let response = result?;
11187        match response.status().as_u16() {
11188            200u16 => ResponseValue::from_response(response).await,
11189            400u16 => Err(Error::ErrorResponse(
11190                ResponseValue::from_response(response).await?,
11191            )),
11192            401u16 => Err(Error::ErrorResponse(
11193                ResponseValue::from_response(response).await?,
11194            )),
11195            403u16 => Err(Error::ErrorResponse(
11196                ResponseValue::from_response(response).await?,
11197            )),
11198            404u16 => Err(Error::ErrorResponse(
11199                ResponseValue::from_response(response).await?,
11200            )),
11201            422u16 => Err(Error::ErrorResponse(
11202                ResponseValue::from_response(response).await?,
11203            )),
11204            500u16 => Err(Error::ErrorResponse(
11205                ResponseValue::from_response(response).await?,
11206            )),
11207            _ => Err(Error::UnexpectedResponse(response)),
11208        }
11209    }
11210    /**POST /integrations/{id}/lan-agent/task-spec
11211
11212    Sends a `POST` request to `/integrations/{integration_id}/lan-agent/task-spec`
11213
11214    Arguments:
11215    - `integration_id`: Integration ULID
11216    - `x_org`: Organization ULID
11217    - `body`
11218    */
11219    pub async fn post_integration_lan_agent_task_spec<'a>(
11220        &'a self,
11221        integration_id: &'a str,
11222        x_org: &'a str,
11223        body: &'a types::LanAgentTaskSpecRequest,
11224    ) -> Result<ResponseValue<types::LanAgentTaskSpecResponse>, Error<()>> {
11225        let url = format!(
11226            "{}/integrations/{}/lan-agent/task-spec",
11227            self.baseurl,
11228            encode_path(&integration_id.to_string()),
11229        );
11230        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
11231        header_map.append(
11232            ::reqwest::header::HeaderName::from_static("api-version"),
11233            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
11234        );
11235        header_map.append("X-Org", x_org.to_string().try_into()?);
11236        #[allow(unused_mut)]
11237        let mut request = self
11238            .client
11239            .post(url)
11240            .header(
11241                ::reqwest::header::ACCEPT,
11242                ::reqwest::header::HeaderValue::from_static("application/json"),
11243            )
11244            .json(&body)
11245            .headers(header_map)
11246            .build()?;
11247        let info = OperationInfo {
11248            operation_id: "post_integration_lan_agent_task_spec",
11249        };
11250        self.pre(&mut request, &info).await?;
11251        let result = self.exec(request, &info).await;
11252        self.post(&result, &info).await?;
11253        let response = result?;
11254        match response.status().as_u16() {
11255            200u16 => ResponseValue::from_response(response).await,
11256            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11257            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11258            426u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11259            _ => Err(Error::UnexpectedResponse(response)),
11260        }
11261    }
11262    /**GET /integrations/{id}/lan-agent/tasks
11263
11264    Sends a `GET` request to `/integrations/{integration_id}/lan-agent/tasks`
11265
11266    Arguments:
11267    - `integration_id`: Integration ULID
11268    - `x_org`: Organization ULID
11269    */
11270    pub async fn get_integration_lan_agent_tasks<'a>(
11271        &'a self,
11272        integration_id: &'a str,
11273        x_org: &'a str,
11274    ) -> Result<ResponseValue<()>, Error<()>> {
11275        let url = format!(
11276            "{}/integrations/{}/lan-agent/tasks",
11277            self.baseurl,
11278            encode_path(&integration_id.to_string()),
11279        );
11280        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
11281        header_map.append(
11282            ::reqwest::header::HeaderName::from_static("api-version"),
11283            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
11284        );
11285        header_map.append("X-Org", x_org.to_string().try_into()?);
11286        #[allow(unused_mut)]
11287        let mut request = self.client.get(url).headers(header_map).build()?;
11288        let info = OperationInfo {
11289            operation_id: "get_integration_lan_agent_tasks",
11290        };
11291        self.pre(&mut request, &info).await?;
11292        let result = self.exec(request, &info).await;
11293        self.post(&result, &info).await?;
11294        let response = result?;
11295        match response.status().as_u16() {
11296            200u16 => Ok(ResponseValue::empty(response)),
11297            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11298            _ => Err(Error::UnexpectedResponse(response)),
11299        }
11300    }
11301    /**List zones for an integration
11302
11303    Sends a `GET` request to `/integrations/{integration_id}/zones`
11304
11305    */
11306    pub async fn list_integration_zones<'a>(
11307        &'a self,
11308        integration_id: &'a str,
11309        include_deleted: Option<bool>,
11310        include_metadata: Option<bool>,
11311        only_deleted: Option<bool>,
11312        x_org: &'a str,
11313    ) -> Result<ResponseValue<::std::vec::Vec<types::ZoneResponse>>, Error<types::ApiErrorResponse>>
11314    {
11315        let url = format!(
11316            "{}/integrations/{}/zones",
11317            self.baseurl,
11318            encode_path(&integration_id.to_string()),
11319        );
11320        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
11321        header_map.append(
11322            ::reqwest::header::HeaderName::from_static("api-version"),
11323            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
11324        );
11325        header_map.append("X-Org", x_org.to_string().try_into()?);
11326        #[allow(unused_mut)]
11327        let mut request = self
11328            .client
11329            .get(url)
11330            .header(
11331                ::reqwest::header::ACCEPT,
11332                ::reqwest::header::HeaderValue::from_static("application/json"),
11333            )
11334            .query(&progenitor_client::QueryParam::new(
11335                "include_deleted",
11336                &include_deleted,
11337            ))
11338            .query(&progenitor_client::QueryParam::new(
11339                "include_metadata",
11340                &include_metadata,
11341            ))
11342            .query(&progenitor_client::QueryParam::new(
11343                "only_deleted",
11344                &only_deleted,
11345            ))
11346            .headers(header_map)
11347            .build()?;
11348        let info = OperationInfo {
11349            operation_id: "list_integration_zones",
11350        };
11351        self.pre(&mut request, &info).await?;
11352        let result = self.exec(request, &info).await;
11353        self.post(&result, &info).await?;
11354        let response = result?;
11355        match response.status().as_u16() {
11356            200u16 => ResponseValue::from_response(response).await,
11357            400u16 => Err(Error::ErrorResponse(
11358                ResponseValue::from_response(response).await?,
11359            )),
11360            401u16 => Err(Error::ErrorResponse(
11361                ResponseValue::from_response(response).await?,
11362            )),
11363            403u16 => Err(Error::ErrorResponse(
11364                ResponseValue::from_response(response).await?,
11365            )),
11366            500u16 => Err(Error::ErrorResponse(
11367                ResponseValue::from_response(response).await?,
11368            )),
11369            _ => Err(Error::UnexpectedResponse(response)),
11370        }
11371    }
11372    /**POST /lan-agent/cli/bootstrap-token — ULID for `bootstrap.sh?key=…` (JWT in Redis)
11373
11374    Sends a `POST` request to `/lan-agent/cli/bootstrap-token`
11375
11376    */
11377    pub async fn post_lan_agent_cli_bootstrap_token<'a>(
11378        &'a self,
11379        body: &'a types::LanAgentBootstrapTokenRequest,
11380    ) -> Result<ResponseValue<types::LanAgentBootstrapTokenResponse>, Error<()>> {
11381        let url = format!("{}/lan-agent/cli/bootstrap-token", self.baseurl,);
11382        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
11383        header_map.append(
11384            ::reqwest::header::HeaderName::from_static("api-version"),
11385            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
11386        );
11387        #[allow(unused_mut)]
11388        let mut request = self
11389            .client
11390            .post(url)
11391            .header(
11392                ::reqwest::header::ACCEPT,
11393                ::reqwest::header::HeaderValue::from_static("application/json"),
11394            )
11395            .json(&body)
11396            .headers(header_map)
11397            .build()?;
11398        let info = OperationInfo {
11399            operation_id: "post_lan_agent_cli_bootstrap_token",
11400        };
11401        self.pre(&mut request, &info).await?;
11402        let result = self.exec(request, &info).await;
11403        self.post(&result, &info).await?;
11404        let response = result?;
11405        match response.status().as_u16() {
11406            200u16 => ResponseValue::from_response(response).await,
11407            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11408            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11409            500u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11410            503u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11411            _ => Err(Error::UnexpectedResponse(response)),
11412        }
11413    }
11414    /**GET /lan-agent/cli/bootstrap.sh?key=… — bash that downloads a versioned binary and runs the task
11415
11416    Sends a `GET` request to `/lan-agent/cli/bootstrap.sh`
11417
11418    Arguments:
11419    - `key`: ULID from `POST /lan-agent/cli/bootstrap-token`.
11420    */
11421    pub async fn get_lan_agent_cli_bootstrap_sh<'a>(
11422        &'a self,
11423        key: &'a str,
11424    ) -> Result<ResponseValue<ByteStream>, Error<()>> {
11425        let url = format!("{}/lan-agent/cli/bootstrap.sh", self.baseurl,);
11426        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
11427        header_map.append(
11428            ::reqwest::header::HeaderName::from_static("api-version"),
11429            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
11430        );
11431        #[allow(unused_mut)]
11432        let mut request = self
11433            .client
11434            .get(url)
11435            .query(&progenitor_client::QueryParam::new("key", &key))
11436            .headers(header_map)
11437            .build()?;
11438        let info = OperationInfo {
11439            operation_id: "get_lan_agent_cli_bootstrap_sh",
11440        };
11441        self.pre(&mut request, &info).await?;
11442        let result = self.exec(request, &info).await;
11443        self.post(&result, &info).await?;
11444        let response = result?;
11445        match response.status().as_u16() {
11446            200u16 => Ok(ResponseValue::stream(response)),
11447            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11448            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11449            503u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11450            _ => Err(Error::UnexpectedResponse(response)),
11451        }
11452    }
11453    /**POST /lan-agent/cli/token — session cookie or Bearer; returns JWT for LAN agent (iss=oathkeeper)
11454
11455    Sends a `POST` request to `/lan-agent/cli/token`
11456
11457    */
11458    pub async fn post_lan_agent_cli_token<'a>(
11459        &'a self,
11460    ) -> Result<ResponseValue<types::LanAgentCliTokenResponse>, Error<()>> {
11461        let url = format!("{}/lan-agent/cli/token", self.baseurl,);
11462        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
11463        header_map.append(
11464            ::reqwest::header::HeaderName::from_static("api-version"),
11465            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
11466        );
11467        #[allow(unused_mut)]
11468        let mut request = self
11469            .client
11470            .post(url)
11471            .header(
11472                ::reqwest::header::ACCEPT,
11473                ::reqwest::header::HeaderValue::from_static("application/json"),
11474            )
11475            .headers(header_map)
11476            .build()?;
11477        let info = OperationInfo {
11478            operation_id: "post_lan_agent_cli_token",
11479        };
11480        self.pre(&mut request, &info).await?;
11481        let result = self.exec(request, &info).await;
11482        self.post(&result, &info).await?;
11483        let response = result?;
11484        match response.status().as_u16() {
11485            200u16 => ResponseValue::from_response(response).await,
11486            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11487            500u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11488            _ => Err(Error::UnexpectedResponse(response)),
11489        }
11490    }
11491    /**GET /lan-agent/meta
11492
11493    Sends a `GET` request to `/lan-agent/meta`
11494
11495    */
11496    pub async fn get_lan_agent_meta<'a>(
11497        &'a self,
11498    ) -> Result<ResponseValue<types::LanAgentMetaResponse>, Error<()>> {
11499        let url = format!("{}/lan-agent/meta", self.baseurl,);
11500        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
11501        header_map.append(
11502            ::reqwest::header::HeaderName::from_static("api-version"),
11503            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
11504        );
11505        #[allow(unused_mut)]
11506        let mut request = self
11507            .client
11508            .get(url)
11509            .header(
11510                ::reqwest::header::ACCEPT,
11511                ::reqwest::header::HeaderValue::from_static("application/json"),
11512            )
11513            .headers(header_map)
11514            .build()?;
11515        let info = OperationInfo {
11516            operation_id: "get_lan_agent_meta",
11517        };
11518        self.pre(&mut request, &info).await?;
11519        let result = self.exec(request, &info).await;
11520        self.post(&result, &info).await?;
11521        let response = result?;
11522        match response.status().as_u16() {
11523            200u16 => ResponseValue::from_response(response).await,
11524            _ => Err(Error::UnexpectedResponse(response)),
11525        }
11526    }
11527    /**GET /me/apartments — returns apartments the current user is a resident of
11528
11529    Sends a `GET` request to `/me/apartments`
11530
11531    */
11532    pub async fn get_me_apartments<'a>(
11533        &'a self,
11534    ) -> Result<ResponseValue<types::MeApartmentsResponse>, Error<()>> {
11535        let url = format!("{}/me/apartments", self.baseurl,);
11536        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
11537        header_map.append(
11538            ::reqwest::header::HeaderName::from_static("api-version"),
11539            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
11540        );
11541        #[allow(unused_mut)]
11542        let mut request = self
11543            .client
11544            .get(url)
11545            .header(
11546                ::reqwest::header::ACCEPT,
11547                ::reqwest::header::HeaderValue::from_static("application/json"),
11548            )
11549            .headers(header_map)
11550            .build()?;
11551        let info = OperationInfo {
11552            operation_id: "get_me_apartments",
11553        };
11554        self.pre(&mut request, &info).await?;
11555        let result = self.exec(request, &info).await;
11556        self.post(&result, &info).await?;
11557        let response = result?;
11558        match response.status().as_u16() {
11559            200u16 => ResponseValue::from_response(response).await,
11560            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11561            _ => Err(Error::UnexpectedResponse(response)),
11562        }
11563    }
11564    /**GET /me/invitations — returns invitations the current user has claimed
11565
11566    Sends a `GET` request to `/me/invitations`
11567
11568    */
11569    pub async fn get_me_invitations<'a>(
11570        &'a self,
11571    ) -> Result<ResponseValue<types::MeInvitationsResponse>, Error<()>> {
11572        let url = format!("{}/me/invitations", self.baseurl,);
11573        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
11574        header_map.append(
11575            ::reqwest::header::HeaderName::from_static("api-version"),
11576            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
11577        );
11578        #[allow(unused_mut)]
11579        let mut request = self
11580            .client
11581            .get(url)
11582            .header(
11583                ::reqwest::header::ACCEPT,
11584                ::reqwest::header::HeaderValue::from_static("application/json"),
11585            )
11586            .headers(header_map)
11587            .build()?;
11588        let info = OperationInfo {
11589            operation_id: "get_me_invitations",
11590        };
11591        self.pre(&mut request, &info).await?;
11592        let result = self.exec(request, &info).await;
11593        self.post(&result, &info).await?;
11594        let response = result?;
11595        match response.status().as_u16() {
11596            200u16 => ResponseValue::from_response(response).await,
11597            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11598            _ => Err(Error::UnexpectedResponse(response)),
11599        }
11600    }
11601    /**GET /me/push-subscription-status — returns whether the current user has any push subscription
11602
11603    Sends a `GET` request to `/me/push-subscription-status`
11604
11605    */
11606    pub async fn get_me_push_subscription_status<'a>(
11607        &'a self,
11608    ) -> Result<ResponseValue<types::MePushSubscriptionStatusResponse>, Error<()>> {
11609        let url = format!("{}/me/push-subscription-status", self.baseurl,);
11610        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
11611        header_map.append(
11612            ::reqwest::header::HeaderName::from_static("api-version"),
11613            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
11614        );
11615        #[allow(unused_mut)]
11616        let mut request = self
11617            .client
11618            .get(url)
11619            .header(
11620                ::reqwest::header::ACCEPT,
11621                ::reqwest::header::HeaderValue::from_static("application/json"),
11622            )
11623            .headers(header_map)
11624            .build()?;
11625        let info = OperationInfo {
11626            operation_id: "get_me_push_subscription_status",
11627        };
11628        self.pre(&mut request, &info).await?;
11629        let result = self.exec(request, &info).await;
11630        self.post(&result, &info).await?;
11631        let response = result?;
11632        match response.status().as_u16() {
11633            200u16 => ResponseValue::from_response(response).await,
11634            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11635            _ => Err(Error::UnexpectedResponse(response)),
11636        }
11637    }
11638    /**POST /me/push-subscriptions — store Web Push subscription for call notifications
11639
11640    Sends a `POST` request to `/me/push-subscriptions`
11641
11642    */
11643    pub async fn post_me_push_subscription<'a>(
11644        &'a self,
11645        body: &'a types::PostMePushSubscriptionPayload,
11646    ) -> Result<ResponseValue<()>, Error<()>> {
11647        let url = format!("{}/me/push-subscriptions", self.baseurl,);
11648        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
11649        header_map.append(
11650            ::reqwest::header::HeaderName::from_static("api-version"),
11651            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
11652        );
11653        #[allow(unused_mut)]
11654        let mut request = self
11655            .client
11656            .post(url)
11657            .json(&body)
11658            .headers(header_map)
11659            .build()?;
11660        let info = OperationInfo {
11661            operation_id: "post_me_push_subscription",
11662        };
11663        self.pre(&mut request, &info).await?;
11664        let result = self.exec(request, &info).await;
11665        self.post(&result, &info).await?;
11666        let response = result?;
11667        match response.status().as_u16() {
11668            200u16 => Ok(ResponseValue::empty(response)),
11669            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11670            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11671            _ => Err(Error::UnexpectedResponse(response)),
11672        }
11673    }
11674    /**GET /me/push-vapid-public-key — returns VAPID public key for client subscription. 404 when not configured
11675
11676    Sends a `GET` request to `/me/push-vapid-public-key`
11677
11678    */
11679    pub async fn get_me_push_vapid_public_key<'a>(
11680        &'a self,
11681    ) -> Result<ResponseValue<types::MePushVapidPublicKeyResponse>, Error<()>> {
11682        let url = format!("{}/me/push-vapid-public-key", self.baseurl,);
11683        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
11684        header_map.append(
11685            ::reqwest::header::HeaderName::from_static("api-version"),
11686            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
11687        );
11688        #[allow(unused_mut)]
11689        let mut request = self
11690            .client
11691            .get(url)
11692            .header(
11693                ::reqwest::header::ACCEPT,
11694                ::reqwest::header::HeaderValue::from_static("application/json"),
11695            )
11696            .headers(header_map)
11697            .build()?;
11698        let info = OperationInfo {
11699            operation_id: "get_me_push_vapid_public_key",
11700        };
11701        self.pre(&mut request, &info).await?;
11702        let result = self.exec(request, &info).await;
11703        self.post(&result, &info).await?;
11704        let response = result?;
11705        match response.status().as_u16() {
11706            200u16 => ResponseValue::from_response(response).await,
11707            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
11708            _ => Err(Error::UnexpectedResponse(response)),
11709        }
11710    }
11711    /**List organizations the user has access to
11712
11713    Sends a `GET` request to `/orgs`
11714
11715    Arguments:
11716    - `include_deleted`
11717    - `include_metadata`
11718    - `limit`: Number of items per page. Default from config, max 200.
11719    - `offset`: Number of items to skip. Default 0.
11720    - `only_deleted`
11721    */
11722    pub async fn list_orgs<'a>(
11723        &'a self,
11724        include_deleted: bool,
11725        include_metadata: bool,
11726        limit: Option<i32>,
11727        offset: Option<i32>,
11728        only_deleted: bool,
11729    ) -> Result<ResponseValue<types::PaginatedResponse>, Error<types::ApiErrorResponse>> {
11730        let url = format!("{}/orgs", self.baseurl,);
11731        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
11732        header_map.append(
11733            ::reqwest::header::HeaderName::from_static("api-version"),
11734            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
11735        );
11736        #[allow(unused_mut)]
11737        let mut request = self
11738            .client
11739            .get(url)
11740            .header(
11741                ::reqwest::header::ACCEPT,
11742                ::reqwest::header::HeaderValue::from_static("application/json"),
11743            )
11744            .query(&progenitor_client::QueryParam::new(
11745                "include_deleted",
11746                &include_deleted,
11747            ))
11748            .query(&progenitor_client::QueryParam::new(
11749                "include_metadata",
11750                &include_metadata,
11751            ))
11752            .query(&progenitor_client::QueryParam::new("limit", &limit))
11753            .query(&progenitor_client::QueryParam::new("offset", &offset))
11754            .query(&progenitor_client::QueryParam::new(
11755                "only_deleted",
11756                &only_deleted,
11757            ))
11758            .headers(header_map)
11759            .build()?;
11760        let info = OperationInfo {
11761            operation_id: "list_orgs",
11762        };
11763        self.pre(&mut request, &info).await?;
11764        let result = self.exec(request, &info).await;
11765        self.post(&result, &info).await?;
11766        let response = result?;
11767        match response.status().as_u16() {
11768            200u16 => ResponseValue::from_response(response).await,
11769            401u16 => Err(Error::ErrorResponse(
11770                ResponseValue::from_response(response).await?,
11771            )),
11772            500u16 => Err(Error::ErrorResponse(
11773                ResponseValue::from_response(response).await?,
11774            )),
11775            _ => Err(Error::UnexpectedResponse(response)),
11776        }
11777    }
11778    /**Create an organization (body: name, description?, parent_id?)
11779
11780    Sends a `POST` request to `/orgs`
11781
11782    */
11783    pub async fn create_org<'a>(
11784        &'a self,
11785        include_deleted: Option<bool>,
11786        include_metadata: Option<bool>,
11787        body: &'a types::CreateOrganizationRequest,
11788    ) -> Result<ResponseValue<types::OrganizationResponse>, Error<types::ApiErrorResponse>> {
11789        let url = format!("{}/orgs", self.baseurl,);
11790        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
11791        header_map.append(
11792            ::reqwest::header::HeaderName::from_static("api-version"),
11793            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
11794        );
11795        #[allow(unused_mut)]
11796        let mut request = self
11797            .client
11798            .post(url)
11799            .header(
11800                ::reqwest::header::ACCEPT,
11801                ::reqwest::header::HeaderValue::from_static("application/json"),
11802            )
11803            .json(&body)
11804            .query(&progenitor_client::QueryParam::new(
11805                "include_deleted",
11806                &include_deleted,
11807            ))
11808            .query(&progenitor_client::QueryParam::new(
11809                "include_metadata",
11810                &include_metadata,
11811            ))
11812            .headers(header_map)
11813            .build()?;
11814        let info = OperationInfo {
11815            operation_id: "create_org",
11816        };
11817        self.pre(&mut request, &info).await?;
11818        let result = self.exec(request, &info).await;
11819        self.post(&result, &info).await?;
11820        let response = result?;
11821        match response.status().as_u16() {
11822            200u16 => ResponseValue::from_response(response).await,
11823            400u16 => Err(Error::ErrorResponse(
11824                ResponseValue::from_response(response).await?,
11825            )),
11826            401u16 => Err(Error::ErrorResponse(
11827                ResponseValue::from_response(response).await?,
11828            )),
11829            403u16 => Err(Error::ErrorResponse(
11830                ResponseValue::from_response(response).await?,
11831            )),
11832            409u16 => Err(Error::ErrorResponse(
11833                ResponseValue::from_response(response).await?,
11834            )),
11835            500u16 => Err(Error::ErrorResponse(
11836                ResponseValue::from_response(response).await?,
11837            )),
11838            _ => Err(Error::UnexpectedResponse(response)),
11839        }
11840    }
11841    /**Get an organization by ID
11842
11843    Sends a `GET` request to `/orgs/{id}`
11844
11845    */
11846    pub async fn get_org<'a>(
11847        &'a self,
11848        id: &'a str,
11849        include_deleted: Option<bool>,
11850        include_metadata: Option<bool>,
11851    ) -> Result<ResponseValue<types::OrganizationResponse>, Error<types::ApiErrorResponse>> {
11852        let url = format!("{}/orgs/{}", self.baseurl, encode_path(&id.to_string()),);
11853        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
11854        header_map.append(
11855            ::reqwest::header::HeaderName::from_static("api-version"),
11856            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
11857        );
11858        #[allow(unused_mut)]
11859        let mut request = self
11860            .client
11861            .get(url)
11862            .header(
11863                ::reqwest::header::ACCEPT,
11864                ::reqwest::header::HeaderValue::from_static("application/json"),
11865            )
11866            .query(&progenitor_client::QueryParam::new(
11867                "include_deleted",
11868                &include_deleted,
11869            ))
11870            .query(&progenitor_client::QueryParam::new(
11871                "include_metadata",
11872                &include_metadata,
11873            ))
11874            .headers(header_map)
11875            .build()?;
11876        let info = OperationInfo {
11877            operation_id: "get_org",
11878        };
11879        self.pre(&mut request, &info).await?;
11880        let result = self.exec(request, &info).await;
11881        self.post(&result, &info).await?;
11882        let response = result?;
11883        match response.status().as_u16() {
11884            200u16 => ResponseValue::from_response(response).await,
11885            400u16 => Err(Error::ErrorResponse(
11886                ResponseValue::from_response(response).await?,
11887            )),
11888            401u16 => Err(Error::ErrorResponse(
11889                ResponseValue::from_response(response).await?,
11890            )),
11891            403u16 => Err(Error::ErrorResponse(
11892                ResponseValue::from_response(response).await?,
11893            )),
11894            404u16 => Err(Error::ErrorResponse(
11895                ResponseValue::from_response(response).await?,
11896            )),
11897            500u16 => Err(Error::ErrorResponse(
11898                ResponseValue::from_response(response).await?,
11899            )),
11900            _ => Err(Error::UnexpectedResponse(response)),
11901        }
11902    }
11903    /**Update an organization (body: name?, description?)
11904
11905    Sends a `PUT` request to `/orgs/{id}`
11906
11907    */
11908    pub async fn update_org<'a>(
11909        &'a self,
11910        id: &'a str,
11911        include_deleted: Option<bool>,
11912        include_metadata: Option<bool>,
11913        body: &'a types::UpdateOrganizationRequest,
11914    ) -> Result<ResponseValue<types::OrganizationResponse>, Error<types::ApiErrorResponse>> {
11915        let url = format!("{}/orgs/{}", self.baseurl, encode_path(&id.to_string()),);
11916        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
11917        header_map.append(
11918            ::reqwest::header::HeaderName::from_static("api-version"),
11919            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
11920        );
11921        #[allow(unused_mut)]
11922        let mut request = self
11923            .client
11924            .put(url)
11925            .header(
11926                ::reqwest::header::ACCEPT,
11927                ::reqwest::header::HeaderValue::from_static("application/json"),
11928            )
11929            .json(&body)
11930            .query(&progenitor_client::QueryParam::new(
11931                "include_deleted",
11932                &include_deleted,
11933            ))
11934            .query(&progenitor_client::QueryParam::new(
11935                "include_metadata",
11936                &include_metadata,
11937            ))
11938            .headers(header_map)
11939            .build()?;
11940        let info = OperationInfo {
11941            operation_id: "update_org",
11942        };
11943        self.pre(&mut request, &info).await?;
11944        let result = self.exec(request, &info).await;
11945        self.post(&result, &info).await?;
11946        let response = result?;
11947        match response.status().as_u16() {
11948            200u16 => ResponseValue::from_response(response).await,
11949            400u16 => Err(Error::ErrorResponse(
11950                ResponseValue::from_response(response).await?,
11951            )),
11952            401u16 => Err(Error::ErrorResponse(
11953                ResponseValue::from_response(response).await?,
11954            )),
11955            403u16 => Err(Error::ErrorResponse(
11956                ResponseValue::from_response(response).await?,
11957            )),
11958            404u16 => Err(Error::ErrorResponse(
11959                ResponseValue::from_response(response).await?,
11960            )),
11961            422u16 => Err(Error::ErrorResponse(
11962                ResponseValue::from_response(response).await?,
11963            )),
11964            500u16 => Err(Error::ErrorResponse(
11965                ResponseValue::from_response(response).await?,
11966            )),
11967            _ => Err(Error::UnexpectedResponse(response)),
11968        }
11969    }
11970    /**Soft-delete an organization
11971
11972    Sends a `DELETE` request to `/orgs/{id}`
11973
11974    */
11975    pub async fn delete_org<'a>(
11976        &'a self,
11977        id: &'a str,
11978        include_deleted: Option<bool>,
11979        include_metadata: Option<bool>,
11980    ) -> Result<ResponseValue<types::OrganizationResponse>, Error<types::ApiErrorResponse>> {
11981        let url = format!("{}/orgs/{}", self.baseurl, encode_path(&id.to_string()),);
11982        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
11983        header_map.append(
11984            ::reqwest::header::HeaderName::from_static("api-version"),
11985            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
11986        );
11987        #[allow(unused_mut)]
11988        let mut request = self
11989            .client
11990            .delete(url)
11991            .header(
11992                ::reqwest::header::ACCEPT,
11993                ::reqwest::header::HeaderValue::from_static("application/json"),
11994            )
11995            .query(&progenitor_client::QueryParam::new(
11996                "include_deleted",
11997                &include_deleted,
11998            ))
11999            .query(&progenitor_client::QueryParam::new(
12000                "include_metadata",
12001                &include_metadata,
12002            ))
12003            .headers(header_map)
12004            .build()?;
12005        let info = OperationInfo {
12006            operation_id: "delete_org",
12007        };
12008        self.pre(&mut request, &info).await?;
12009        let result = self.exec(request, &info).await;
12010        self.post(&result, &info).await?;
12011        let response = result?;
12012        match response.status().as_u16() {
12013            200u16 => ResponseValue::from_response(response).await,
12014            400u16 => Err(Error::ErrorResponse(
12015                ResponseValue::from_response(response).await?,
12016            )),
12017            401u16 => Err(Error::ErrorResponse(
12018                ResponseValue::from_response(response).await?,
12019            )),
12020            403u16 => Err(Error::ErrorResponse(
12021                ResponseValue::from_response(response).await?,
12022            )),
12023            404u16 => Err(Error::ErrorResponse(
12024                ResponseValue::from_response(response).await?,
12025            )),
12026            409u16 => Err(Error::ErrorResponse(
12027                ResponseValue::from_response(response).await?,
12028            )),
12029            422u16 => Err(Error::ErrorResponse(
12030                ResponseValue::from_response(response).await?,
12031            )),
12032            500u16 => Err(Error::ErrorResponse(
12033                ResponseValue::from_response(response).await?,
12034            )),
12035            _ => Err(Error::UnexpectedResponse(response)),
12036        }
12037    }
12038    /**Sends a `POST` request to `/orgs/{id}/billing/checkout`
12039
12040    */
12041    pub async fn post_org_billing_checkout<'a>(
12042        &'a self,
12043        id: &'a str,
12044        body: &'a types::CheckoutRequest,
12045    ) -> Result<ResponseValue<types::SubscriptionRef>, Error<()>> {
12046        let url = format!(
12047            "{}/orgs/{}/billing/checkout",
12048            self.baseurl,
12049            encode_path(&id.to_string()),
12050        );
12051        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
12052        header_map.append(
12053            ::reqwest::header::HeaderName::from_static("api-version"),
12054            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
12055        );
12056        #[allow(unused_mut)]
12057        let mut request = self
12058            .client
12059            .post(url)
12060            .header(
12061                ::reqwest::header::ACCEPT,
12062                ::reqwest::header::HeaderValue::from_static("application/json"),
12063            )
12064            .json(&body)
12065            .headers(header_map)
12066            .build()?;
12067        let info = OperationInfo {
12068            operation_id: "post_org_billing_checkout",
12069        };
12070        self.pre(&mut request, &info).await?;
12071        let result = self.exec(request, &info).await;
12072        self.post(&result, &info).await?;
12073        let response = result?;
12074        match response.status().as_u16() {
12075            200u16 => ResponseValue::from_response(response).await,
12076            _ => Err(Error::UnexpectedResponse(response)),
12077        }
12078    }
12079    /**Sends a `GET` request to `/orgs/{id}/billing/plan`
12080
12081    */
12082    pub async fn get_org_billing_plan<'a>(
12083        &'a self,
12084        id: &'a str,
12085    ) -> Result<ResponseValue<types::BillingPlanResponse>, Error<()>> {
12086        let url = format!(
12087            "{}/orgs/{}/billing/plan",
12088            self.baseurl,
12089            encode_path(&id.to_string()),
12090        );
12091        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
12092        header_map.append(
12093            ::reqwest::header::HeaderName::from_static("api-version"),
12094            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
12095        );
12096        #[allow(unused_mut)]
12097        let mut request = self
12098            .client
12099            .get(url)
12100            .header(
12101                ::reqwest::header::ACCEPT,
12102                ::reqwest::header::HeaderValue::from_static("application/json"),
12103            )
12104            .headers(header_map)
12105            .build()?;
12106        let info = OperationInfo {
12107            operation_id: "get_org_billing_plan",
12108        };
12109        self.pre(&mut request, &info).await?;
12110        let result = self.exec(request, &info).await;
12111        self.post(&result, &info).await?;
12112        let response = result?;
12113        match response.status().as_u16() {
12114            200u16 => ResponseValue::from_response(response).await,
12115            _ => Err(Error::UnexpectedResponse(response)),
12116        }
12117    }
12118    /**Sends a `POST` request to `/orgs/{id}/billing/portal`
12119
12120    */
12121    pub async fn post_org_billing_portal<'a>(
12122        &'a self,
12123        id: &'a str,
12124        body: &'a types::PortalRequest,
12125    ) -> Result<ResponseValue<types::PortalResponse>, Error<()>> {
12126        let url = format!(
12127            "{}/orgs/{}/billing/portal",
12128            self.baseurl,
12129            encode_path(&id.to_string()),
12130        );
12131        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
12132        header_map.append(
12133            ::reqwest::header::HeaderName::from_static("api-version"),
12134            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
12135        );
12136        #[allow(unused_mut)]
12137        let mut request = self
12138            .client
12139            .post(url)
12140            .header(
12141                ::reqwest::header::ACCEPT,
12142                ::reqwest::header::HeaderValue::from_static("application/json"),
12143            )
12144            .json(&body)
12145            .headers(header_map)
12146            .build()?;
12147        let info = OperationInfo {
12148            operation_id: "post_org_billing_portal",
12149        };
12150        self.pre(&mut request, &info).await?;
12151        let result = self.exec(request, &info).await;
12152        self.post(&result, &info).await?;
12153        let response = result?;
12154        match response.status().as_u16() {
12155            200u16 => ResponseValue::from_response(response).await,
12156            501u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
12157            _ => Err(Error::UnexpectedResponse(response)),
12158        }
12159    }
12160    /**Sends a `GET` request to `/orgs/{id}/billing/upgrade-options`
12161
12162    */
12163    pub async fn get_org_billing_upgrade_options<'a>(
12164        &'a self,
12165        id: &'a str,
12166    ) -> Result<ResponseValue<types::PlansResponse>, Error<()>> {
12167        let url = format!(
12168            "{}/orgs/{}/billing/upgrade-options",
12169            self.baseurl,
12170            encode_path(&id.to_string()),
12171        );
12172        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
12173        header_map.append(
12174            ::reqwest::header::HeaderName::from_static("api-version"),
12175            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
12176        );
12177        #[allow(unused_mut)]
12178        let mut request = self
12179            .client
12180            .get(url)
12181            .header(
12182                ::reqwest::header::ACCEPT,
12183                ::reqwest::header::HeaderValue::from_static("application/json"),
12184            )
12185            .headers(header_map)
12186            .build()?;
12187        let info = OperationInfo {
12188            operation_id: "get_org_billing_upgrade_options",
12189        };
12190        self.pre(&mut request, &info).await?;
12191        let result = self.exec(request, &info).await;
12192        self.post(&result, &info).await?;
12193        let response = result?;
12194        match response.status().as_u16() {
12195            200u16 => ResponseValue::from_response(response).await,
12196            _ => Err(Error::UnexpectedResponse(response)),
12197        }
12198    }
12199    /**Sends a `GET` request to `/orgs/{id}/billing/usage`
12200
12201    */
12202    pub async fn get_org_billing_usage<'a>(
12203        &'a self,
12204        id: &'a str,
12205    ) -> Result<ResponseValue<types::QuotaReport>, Error<()>> {
12206        let url = format!(
12207            "{}/orgs/{}/billing/usage",
12208            self.baseurl,
12209            encode_path(&id.to_string()),
12210        );
12211        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
12212        header_map.append(
12213            ::reqwest::header::HeaderName::from_static("api-version"),
12214            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
12215        );
12216        #[allow(unused_mut)]
12217        let mut request = self
12218            .client
12219            .get(url)
12220            .header(
12221                ::reqwest::header::ACCEPT,
12222                ::reqwest::header::HeaderValue::from_static("application/json"),
12223            )
12224            .headers(header_map)
12225            .build()?;
12226        let info = OperationInfo {
12227            operation_id: "get_org_billing_usage",
12228        };
12229        self.pre(&mut request, &info).await?;
12230        let result = self.exec(request, &info).await;
12231        self.post(&result, &info).await?;
12232        let response = result?;
12233        match response.status().as_u16() {
12234            200u16 => ResponseValue::from_response(response).await,
12235            _ => Err(Error::UnexpectedResponse(response)),
12236        }
12237    }
12238    /**Get current user's permissions for an organization
12239
12240    Sends a `GET` request to `/orgs/{id}/permissions`
12241
12242    */
12243    pub async fn get_org_permissions<'a>(
12244        &'a self,
12245        id: &'a str,
12246    ) -> Result<ResponseValue<types::OrgPermissionsResponse>, Error<()>> {
12247        let url = format!(
12248            "{}/orgs/{}/permissions",
12249            self.baseurl,
12250            encode_path(&id.to_string()),
12251        );
12252        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
12253        header_map.append(
12254            ::reqwest::header::HeaderName::from_static("api-version"),
12255            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
12256        );
12257        #[allow(unused_mut)]
12258        let mut request = self
12259            .client
12260            .get(url)
12261            .header(
12262                ::reqwest::header::ACCEPT,
12263                ::reqwest::header::HeaderValue::from_static("application/json"),
12264            )
12265            .headers(header_map)
12266            .build()?;
12267        let info = OperationInfo {
12268            operation_id: "get_org_permissions",
12269        };
12270        self.pre(&mut request, &info).await?;
12271        let result = self.exec(request, &info).await;
12272        self.post(&result, &info).await?;
12273        let response = result?;
12274        match response.status().as_u16() {
12275            200u16 => ResponseValue::from_response(response).await,
12276            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
12277            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
12278            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
12279            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
12280            _ => Err(Error::UnexpectedResponse(response)),
12281        }
12282    }
12283    /**Permanently delete (purge) an organization
12284
12285    Sends a `DELETE` request to `/orgs/{id}/purge`
12286
12287    */
12288    pub async fn hard_delete_org<'a>(
12289        &'a self,
12290        id: &'a str,
12291        include_deleted: Option<bool>,
12292        include_metadata: Option<bool>,
12293    ) -> Result<ResponseValue<types::OrganizationResponse>, Error<types::ApiErrorResponse>> {
12294        let url = format!(
12295            "{}/orgs/{}/purge",
12296            self.baseurl,
12297            encode_path(&id.to_string()),
12298        );
12299        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
12300        header_map.append(
12301            ::reqwest::header::HeaderName::from_static("api-version"),
12302            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
12303        );
12304        #[allow(unused_mut)]
12305        let mut request = self
12306            .client
12307            .delete(url)
12308            .header(
12309                ::reqwest::header::ACCEPT,
12310                ::reqwest::header::HeaderValue::from_static("application/json"),
12311            )
12312            .query(&progenitor_client::QueryParam::new(
12313                "include_deleted",
12314                &include_deleted,
12315            ))
12316            .query(&progenitor_client::QueryParam::new(
12317                "include_metadata",
12318                &include_metadata,
12319            ))
12320            .headers(header_map)
12321            .build()?;
12322        let info = OperationInfo {
12323            operation_id: "hard_delete_org",
12324        };
12325        self.pre(&mut request, &info).await?;
12326        let result = self.exec(request, &info).await;
12327        self.post(&result, &info).await?;
12328        let response = result?;
12329        match response.status().as_u16() {
12330            200u16 => ResponseValue::from_response(response).await,
12331            400u16 => Err(Error::ErrorResponse(
12332                ResponseValue::from_response(response).await?,
12333            )),
12334            401u16 => Err(Error::ErrorResponse(
12335                ResponseValue::from_response(response).await?,
12336            )),
12337            403u16 => Err(Error::ErrorResponse(
12338                ResponseValue::from_response(response).await?,
12339            )),
12340            404u16 => Err(Error::ErrorResponse(
12341                ResponseValue::from_response(response).await?,
12342            )),
12343            409u16 => Err(Error::ErrorResponse(
12344                ResponseValue::from_response(response).await?,
12345            )),
12346            422u16 => Err(Error::ErrorResponse(
12347                ResponseValue::from_response(response).await?,
12348            )),
12349            500u16 => Err(Error::ErrorResponse(
12350                ResponseValue::from_response(response).await?,
12351            )),
12352            _ => Err(Error::UnexpectedResponse(response)),
12353        }
12354    }
12355    /**List users in an organization (and optionally descendant orgs)
12356
12357    Sends a `GET` request to `/orgs/{org_id}/users`
12358
12359    Arguments:
12360    - `org_id`
12361    - `include_deleted`
12362    - `include_metadata`
12363    - `limit`: Number of items per page. Default from config, max 200.
12364    - `offset`: Number of items to skip. Default 0.
12365    - `only_deleted`
12366    - `recursive`
12367    - `x_org`
12368    */
12369    pub async fn list_org_users<'a>(
12370        &'a self,
12371        org_id: &'a str,
12372        include_deleted: bool,
12373        include_metadata: bool,
12374        limit: Option<i32>,
12375        offset: Option<i32>,
12376        only_deleted: bool,
12377        recursive: Option<bool>,
12378        x_org: &'a str,
12379    ) -> Result<ResponseValue<types::PaginatedResponse>, Error<types::ApiErrorResponse>> {
12380        let url = format!(
12381            "{}/orgs/{}/users",
12382            self.baseurl,
12383            encode_path(&org_id.to_string()),
12384        );
12385        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
12386        header_map.append(
12387            ::reqwest::header::HeaderName::from_static("api-version"),
12388            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
12389        );
12390        header_map.append("X-Org", x_org.to_string().try_into()?);
12391        #[allow(unused_mut)]
12392        let mut request = self
12393            .client
12394            .get(url)
12395            .header(
12396                ::reqwest::header::ACCEPT,
12397                ::reqwest::header::HeaderValue::from_static("application/json"),
12398            )
12399            .query(&progenitor_client::QueryParam::new(
12400                "include_deleted",
12401                &include_deleted,
12402            ))
12403            .query(&progenitor_client::QueryParam::new(
12404                "include_metadata",
12405                &include_metadata,
12406            ))
12407            .query(&progenitor_client::QueryParam::new("limit", &limit))
12408            .query(&progenitor_client::QueryParam::new("offset", &offset))
12409            .query(&progenitor_client::QueryParam::new(
12410                "only_deleted",
12411                &only_deleted,
12412            ))
12413            .query(&progenitor_client::QueryParam::new("recursive", &recursive))
12414            .headers(header_map)
12415            .build()?;
12416        let info = OperationInfo {
12417            operation_id: "list_org_users",
12418        };
12419        self.pre(&mut request, &info).await?;
12420        let result = self.exec(request, &info).await;
12421        self.post(&result, &info).await?;
12422        let response = result?;
12423        match response.status().as_u16() {
12424            200u16 => ResponseValue::from_response(response).await,
12425            400u16 => Err(Error::ErrorResponse(
12426                ResponseValue::from_response(response).await?,
12427            )),
12428            401u16 => Err(Error::ErrorResponse(
12429                ResponseValue::from_response(response).await?,
12430            )),
12431            403u16 => Err(Error::ErrorResponse(
12432                ResponseValue::from_response(response).await?,
12433            )),
12434            404u16 => Err(Error::ErrorResponse(
12435                ResponseValue::from_response(response).await?,
12436            )),
12437            500u16 => Err(Error::ErrorResponse(
12438                ResponseValue::from_response(response).await?,
12439            )),
12440            _ => Err(Error::UnexpectedResponse(response)),
12441        }
12442    }
12443    /**Sends a `GET` request to `/plans`
12444
12445    */
12446    pub async fn get_plans<'a>(&'a self) -> Result<ResponseValue<types::PlansResponse>, Error<()>> {
12447        let url = format!("{}/plans", self.baseurl,);
12448        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
12449        header_map.append(
12450            ::reqwest::header::HeaderName::from_static("api-version"),
12451            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
12452        );
12453        #[allow(unused_mut)]
12454        let mut request = self
12455            .client
12456            .get(url)
12457            .header(
12458                ::reqwest::header::ACCEPT,
12459                ::reqwest::header::HeaderValue::from_static("application/json"),
12460            )
12461            .headers(header_map)
12462            .build()?;
12463        let info = OperationInfo {
12464            operation_id: "get_plans",
12465        };
12466        self.pre(&mut request, &info).await?;
12467        let result = self.exec(request, &info).await;
12468        self.post(&result, &info).await?;
12469        let response = result?;
12470        match response.status().as_u16() {
12471            200u16 => ResponseValue::from_response(response).await,
12472            _ => Err(Error::UnexpectedResponse(response)),
12473        }
12474    }
12475    /**Sends a `GET` request to `/public/access/invites/{inviteToken}`
12476
12477    */
12478    pub async fn get_public_invite<'a>(
12479        &'a self,
12480        invite_token: &'a str,
12481    ) -> Result<ResponseValue<types::PublicInviteResponse>, Error<types::ApiErrorResponse>> {
12482        let url = format!(
12483            "{}/public/access/invites/{}",
12484            self.baseurl,
12485            encode_path(&invite_token.to_string()),
12486        );
12487        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
12488        header_map.append(
12489            ::reqwest::header::HeaderName::from_static("api-version"),
12490            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
12491        );
12492        #[allow(unused_mut)]
12493        let mut request = self
12494            .client
12495            .get(url)
12496            .header(
12497                ::reqwest::header::ACCEPT,
12498                ::reqwest::header::HeaderValue::from_static("application/json"),
12499            )
12500            .headers(header_map)
12501            .build()?;
12502        let info = OperationInfo {
12503            operation_id: "get_public_invite",
12504        };
12505        self.pre(&mut request, &info).await?;
12506        let result = self.exec(request, &info).await;
12507        self.post(&result, &info).await?;
12508        let response = result?;
12509        match response.status().as_u16() {
12510            200u16 => ResponseValue::from_response(response).await,
12511            400u16 => Err(Error::ErrorResponse(
12512                ResponseValue::from_response(response).await?,
12513            )),
12514            _ => Err(Error::UnexpectedResponse(response)),
12515        }
12516    }
12517    /**Sends a `POST` request to `/public/access/invites/{inviteToken}/claim`
12518
12519    */
12520    pub async fn post_public_invite_claim<'a>(
12521        &'a self,
12522        invite_token: &'a str,
12523    ) -> Result<ResponseValue<()>, Error<types::ApiErrorResponse>> {
12524        let url = format!(
12525            "{}/public/access/invites/{}/claim",
12526            self.baseurl,
12527            encode_path(&invite_token.to_string()),
12528        );
12529        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
12530        header_map.append(
12531            ::reqwest::header::HeaderName::from_static("api-version"),
12532            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
12533        );
12534        #[allow(unused_mut)]
12535        let mut request = self
12536            .client
12537            .post(url)
12538            .header(
12539                ::reqwest::header::ACCEPT,
12540                ::reqwest::header::HeaderValue::from_static("application/json"),
12541            )
12542            .headers(header_map)
12543            .build()?;
12544        let info = OperationInfo {
12545            operation_id: "post_public_invite_claim",
12546        };
12547        self.pre(&mut request, &info).await?;
12548        let result = self.exec(request, &info).await;
12549        self.post(&result, &info).await?;
12550        let response = result?;
12551        match response.status().as_u16() {
12552            200u16 => Ok(ResponseValue::empty(response)),
12553            401u16 => Err(Error::ErrorResponse(
12554                ResponseValue::from_response(response).await?,
12555            )),
12556            _ => Err(Error::UnexpectedResponse(response)),
12557        }
12558    }
12559    /**Sends a `POST` request to `/public/access/invites/{inviteToken}/execute`
12560
12561    */
12562    pub async fn post_public_invite_execute<'a>(
12563        &'a self,
12564        invite_token: &'a str,
12565        body: &'a types::PublicInviteExecuteRequest,
12566    ) -> Result<ResponseValue<types::PublicInviteExecuteResponse>, Error<types::ApiErrorResponse>>
12567    {
12568        let url = format!(
12569            "{}/public/access/invites/{}/execute",
12570            self.baseurl,
12571            encode_path(&invite_token.to_string()),
12572        );
12573        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
12574        header_map.append(
12575            ::reqwest::header::HeaderName::from_static("api-version"),
12576            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
12577        );
12578        #[allow(unused_mut)]
12579        let mut request = self
12580            .client
12581            .post(url)
12582            .header(
12583                ::reqwest::header::ACCEPT,
12584                ::reqwest::header::HeaderValue::from_static("application/json"),
12585            )
12586            .json(&body)
12587            .headers(header_map)
12588            .build()?;
12589        let info = OperationInfo {
12590            operation_id: "post_public_invite_execute",
12591        };
12592        self.pre(&mut request, &info).await?;
12593        let result = self.exec(request, &info).await;
12594        self.post(&result, &info).await?;
12595        let response = result?;
12596        match response.status().as_u16() {
12597            200u16 => ResponseValue::from_response(response).await,
12598            403u16 => Err(Error::ErrorResponse(
12599                ResponseValue::from_response(response).await?,
12600            )),
12601            404u16 => Err(Error::ErrorResponse(
12602                ResponseValue::from_response(response).await?,
12603            )),
12604            _ => Err(Error::UnexpectedResponse(response)),
12605        }
12606    }
12607    /**Sends a `POST` request to `/public/access/invites/{inviteToken}/session`
12608
12609    */
12610    pub async fn post_public_invite_session<'a>(
12611        &'a self,
12612        invite_token: &'a str,
12613    ) -> Result<ResponseValue<()>, Error<types::ApiErrorResponse>> {
12614        let url = format!(
12615            "{}/public/access/invites/{}/session",
12616            self.baseurl,
12617            encode_path(&invite_token.to_string()),
12618        );
12619        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
12620        header_map.append(
12621            ::reqwest::header::HeaderName::from_static("api-version"),
12622            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
12623        );
12624        #[allow(unused_mut)]
12625        let mut request = self
12626            .client
12627            .post(url)
12628            .header(
12629                ::reqwest::header::ACCEPT,
12630                ::reqwest::header::HeaderValue::from_static("application/json"),
12631            )
12632            .headers(header_map)
12633            .build()?;
12634        let info = OperationInfo {
12635            operation_id: "post_public_invite_session",
12636        };
12637        self.pre(&mut request, &info).await?;
12638        let result = self.exec(request, &info).await;
12639        self.post(&result, &info).await?;
12640        let response = result?;
12641        match response.status().as_u16() {
12642            200u16 => Ok(ResponseValue::empty(response)),
12643            400u16 => Err(Error::ErrorResponse(
12644                ResponseValue::from_response(response).await?,
12645            )),
12646            _ => Err(Error::UnexpectedResponse(response)),
12647        }
12648    }
12649    /**Sends a `GET` request to `/public/access/portals/{publicPortalId}`
12650
12651    */
12652    pub async fn get_public_portal<'a>(
12653        &'a self,
12654        public_portal_id: &'a str,
12655    ) -> Result<ResponseValue<types::PublicPortalResponse>, Error<types::ApiErrorResponse>> {
12656        let url = format!(
12657            "{}/public/access/portals/{}",
12658            self.baseurl,
12659            encode_path(&public_portal_id.to_string()),
12660        );
12661        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
12662        header_map.append(
12663            ::reqwest::header::HeaderName::from_static("api-version"),
12664            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
12665        );
12666        #[allow(unused_mut)]
12667        let mut request = self
12668            .client
12669            .get(url)
12670            .header(
12671                ::reqwest::header::ACCEPT,
12672                ::reqwest::header::HeaderValue::from_static("application/json"),
12673            )
12674            .headers(header_map)
12675            .build()?;
12676        let info = OperationInfo {
12677            operation_id: "get_public_portal",
12678        };
12679        self.pre(&mut request, &info).await?;
12680        let result = self.exec(request, &info).await;
12681        self.post(&result, &info).await?;
12682        let response = result?;
12683        match response.status().as_u16() {
12684            200u16 => ResponseValue::from_response(response).await,
12685            404u16 => Err(Error::ErrorResponse(
12686                ResponseValue::from_response(response).await?,
12687            )),
12688            _ => Err(Error::UnexpectedResponse(response)),
12689        }
12690    }
12691    /**Sends a `POST` request to `/public/access/portals/{publicPortalId}/lights`
12692
12693    */
12694    pub async fn post_public_portal_lights<'a>(
12695        &'a self,
12696        public_portal_id: &'a str,
12697    ) -> Result<ResponseValue<()>, Error<types::ApiErrorResponse>> {
12698        let url = format!(
12699            "{}/public/access/portals/{}/lights",
12700            self.baseurl,
12701            encode_path(&public_portal_id.to_string()),
12702        );
12703        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
12704        header_map.append(
12705            ::reqwest::header::HeaderName::from_static("api-version"),
12706            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
12707        );
12708        #[allow(unused_mut)]
12709        let mut request = self
12710            .client
12711            .post(url)
12712            .header(
12713                ::reqwest::header::ACCEPT,
12714                ::reqwest::header::HeaderValue::from_static("application/json"),
12715            )
12716            .headers(header_map)
12717            .build()?;
12718        let info = OperationInfo {
12719            operation_id: "post_public_portal_lights",
12720        };
12721        self.pre(&mut request, &info).await?;
12722        let result = self.exec(request, &info).await;
12723        self.post(&result, &info).await?;
12724        let response = result?;
12725        match response.status().as_u16() {
12726            200u16 => Ok(ResponseValue::empty(response)),
12727            403u16 => Err(Error::ErrorResponse(
12728                ResponseValue::from_response(response).await?,
12729            )),
12730            _ => Err(Error::UnexpectedResponse(response)),
12731        }
12732    }
12733    /**Sends a `POST` request to `/public/access/portals/{publicPortalId}/open`
12734
12735    */
12736    pub async fn post_public_portal_open<'a>(
12737        &'a self,
12738        public_portal_id: &'a str,
12739    ) -> Result<ResponseValue<()>, Error<types::ApiErrorResponse>> {
12740        let url = format!(
12741            "{}/public/access/portals/{}/open",
12742            self.baseurl,
12743            encode_path(&public_portal_id.to_string()),
12744        );
12745        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
12746        header_map.append(
12747            ::reqwest::header::HeaderName::from_static("api-version"),
12748            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
12749        );
12750        #[allow(unused_mut)]
12751        let mut request = self
12752            .client
12753            .post(url)
12754            .header(
12755                ::reqwest::header::ACCEPT,
12756                ::reqwest::header::HeaderValue::from_static("application/json"),
12757            )
12758            .headers(header_map)
12759            .build()?;
12760        let info = OperationInfo {
12761            operation_id: "post_public_portal_open",
12762        };
12763        self.pre(&mut request, &info).await?;
12764        let result = self.exec(request, &info).await;
12765        self.post(&result, &info).await?;
12766        let response = result?;
12767        match response.status().as_u16() {
12768            200u16 => Ok(ResponseValue::empty(response)),
12769            403u16 => Err(Error::ErrorResponse(
12770                ResponseValue::from_response(response).await?,
12771            )),
12772            _ => Err(Error::UnexpectedResponse(response)),
12773        }
12774    }
12775    /**Sends a `GET` request to `/public/access/portals/{publicPortalId}/reachable`
12776
12777    */
12778    pub async fn get_public_portal_reachable<'a>(
12779        &'a self,
12780        public_portal_id: &'a str,
12781    ) -> Result<ResponseValue<types::PublicPortalReachableResponse>, Error<types::ApiErrorResponse>>
12782    {
12783        let url = format!(
12784            "{}/public/access/portals/{}/reachable",
12785            self.baseurl,
12786            encode_path(&public_portal_id.to_string()),
12787        );
12788        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
12789        header_map.append(
12790            ::reqwest::header::HeaderName::from_static("api-version"),
12791            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
12792        );
12793        #[allow(unused_mut)]
12794        let mut request = self
12795            .client
12796            .get(url)
12797            .header(
12798                ::reqwest::header::ACCEPT,
12799                ::reqwest::header::HeaderValue::from_static("application/json"),
12800            )
12801            .headers(header_map)
12802            .build()?;
12803        let info = OperationInfo {
12804            operation_id: "get_public_portal_reachable",
12805        };
12806        self.pre(&mut request, &info).await?;
12807        let result = self.exec(request, &info).await;
12808        self.post(&result, &info).await?;
12809        let response = result?;
12810        match response.status().as_u16() {
12811            200u16 => ResponseValue::from_response(response).await,
12812            404u16 => Err(Error::ErrorResponse(
12813                ResponseValue::from_response(response).await?,
12814            )),
12815            _ => Err(Error::UnexpectedResponse(response)),
12816        }
12817    }
12818    /**Sends a `POST` request to `/public/access/portals/{publicPortalId}/sessions`
12819
12820    */
12821    pub async fn post_public_portal_sessions<'a>(
12822        &'a self,
12823        public_portal_id: &'a str,
12824        body: &'a types::PublicPortalCreateSessionRequest,
12825    ) -> Result<
12826        ResponseValue<types::PublicPortalCreateSessionResponse>,
12827        Error<types::ApiErrorResponse>,
12828    > {
12829        let url = format!(
12830            "{}/public/access/portals/{}/sessions",
12831            self.baseurl,
12832            encode_path(&public_portal_id.to_string()),
12833        );
12834        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
12835        header_map.append(
12836            ::reqwest::header::HeaderName::from_static("api-version"),
12837            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
12838        );
12839        #[allow(unused_mut)]
12840        let mut request = self
12841            .client
12842            .post(url)
12843            .header(
12844                ::reqwest::header::ACCEPT,
12845                ::reqwest::header::HeaderValue::from_static("application/json"),
12846            )
12847            .json(&body)
12848            .headers(header_map)
12849            .build()?;
12850        let info = OperationInfo {
12851            operation_id: "post_public_portal_sessions",
12852        };
12853        self.pre(&mut request, &info).await?;
12854        let result = self.exec(request, &info).await;
12855        self.post(&result, &info).await?;
12856        let response = result?;
12857        match response.status().as_u16() {
12858            200u16 => ResponseValue::from_response(response).await,
12859            400u16 => Err(Error::ErrorResponse(
12860                ResponseValue::from_response(response).await?,
12861            )),
12862            403u16 => Err(Error::ErrorResponse(
12863                ResponseValue::from_response(response).await?,
12864            )),
12865            404u16 => Err(Error::ErrorResponse(
12866                ResponseValue::from_response(response).await?,
12867            )),
12868            _ => Err(Error::UnexpectedResponse(response)),
12869        }
12870    }
12871    /**Sends a `GET` request to `/public/access/portals/{publicPortalId}/targets`
12872
12873    */
12874    pub async fn get_public_portal_targets<'a>(
12875        &'a self,
12876        public_portal_id: &'a str,
12877    ) -> Result<ResponseValue<types::PublicPortalTargetsResponse>, Error<types::ApiErrorResponse>>
12878    {
12879        let url = format!(
12880            "{}/public/access/portals/{}/targets",
12881            self.baseurl,
12882            encode_path(&public_portal_id.to_string()),
12883        );
12884        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
12885        header_map.append(
12886            ::reqwest::header::HeaderName::from_static("api-version"),
12887            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
12888        );
12889        #[allow(unused_mut)]
12890        let mut request = self
12891            .client
12892            .get(url)
12893            .header(
12894                ::reqwest::header::ACCEPT,
12895                ::reqwest::header::HeaderValue::from_static("application/json"),
12896            )
12897            .headers(header_map)
12898            .build()?;
12899        let info = OperationInfo {
12900            operation_id: "get_public_portal_targets",
12901        };
12902        self.pre(&mut request, &info).await?;
12903        let result = self.exec(request, &info).await;
12904        self.post(&result, &info).await?;
12905        let response = result?;
12906        match response.status().as_u16() {
12907            200u16 => ResponseValue::from_response(response).await,
12908            404u16 => Err(Error::ErrorResponse(
12909                ResponseValue::from_response(response).await?,
12910            )),
12911            _ => Err(Error::UnexpectedResponse(response)),
12912        }
12913    }
12914    /**Sends a `GET` request to `/public/access/sessions/{sessionId}`
12915
12916    Arguments:
12917    - `session_id`
12918    - `token`: Session token (alternative to Bearer when headers stripped)
12919    */
12920    pub async fn get_public_session<'a>(
12921        &'a self,
12922        session_id: &'a str,
12923        token: Option<&'a str>,
12924    ) -> Result<ResponseValue<types::PublicSessionResponse>, Error<types::ApiErrorResponse>> {
12925        let url = format!(
12926            "{}/public/access/sessions/{}",
12927            self.baseurl,
12928            encode_path(&session_id.to_string()),
12929        );
12930        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
12931        header_map.append(
12932            ::reqwest::header::HeaderName::from_static("api-version"),
12933            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
12934        );
12935        #[allow(unused_mut)]
12936        let mut request = self
12937            .client
12938            .get(url)
12939            .header(
12940                ::reqwest::header::ACCEPT,
12941                ::reqwest::header::HeaderValue::from_static("application/json"),
12942            )
12943            .query(&progenitor_client::QueryParam::new("token", &token))
12944            .headers(header_map)
12945            .build()?;
12946        let info = OperationInfo {
12947            operation_id: "get_public_session",
12948        };
12949        self.pre(&mut request, &info).await?;
12950        let result = self.exec(request, &info).await;
12951        self.post(&result, &info).await?;
12952        let response = result?;
12953        match response.status().as_u16() {
12954            200u16 => ResponseValue::from_response(response).await,
12955            401u16 => Err(Error::ErrorResponse(
12956                ResponseValue::from_response(response).await?,
12957            )),
12958            403u16 => Err(Error::ErrorResponse(
12959                ResponseValue::from_response(response).await?,
12960            )),
12961            404u16 => Err(Error::ErrorResponse(
12962                ResponseValue::from_response(response).await?,
12963            )),
12964            _ => Err(Error::UnexpectedResponse(response)),
12965        }
12966    }
12967    /**Caller hangs up while ringing so callees polling GET session can dismiss incoming UI
12968
12969    Sends a `POST` request to `/public/access/sessions/{sessionId}/cancel`
12970
12971    */
12972    pub async fn post_public_session_cancel<'a>(
12973        &'a self,
12974        session_id: &'a str,
12975        token: Option<&'a str>,
12976    ) -> Result<ResponseValue<()>, Error<types::ApiErrorResponse>> {
12977        let url = format!(
12978            "{}/public/access/sessions/{}/cancel",
12979            self.baseurl,
12980            encode_path(&session_id.to_string()),
12981        );
12982        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
12983        header_map.append(
12984            ::reqwest::header::HeaderName::from_static("api-version"),
12985            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
12986        );
12987        #[allow(unused_mut)]
12988        let mut request = self
12989            .client
12990            .post(url)
12991            .header(
12992                ::reqwest::header::ACCEPT,
12993                ::reqwest::header::HeaderValue::from_static("application/json"),
12994            )
12995            .query(&progenitor_client::QueryParam::new("token", &token))
12996            .headers(header_map)
12997            .build()?;
12998        let info = OperationInfo {
12999            operation_id: "post_public_session_cancel",
13000        };
13001        self.pre(&mut request, &info).await?;
13002        let result = self.exec(request, &info).await;
13003        self.post(&result, &info).await?;
13004        let response = result?;
13005        match response.status().as_u16() {
13006            200u16 => Ok(ResponseValue::empty(response)),
13007            403u16 => Err(Error::ErrorResponse(
13008                ResponseValue::from_response(response).await?,
13009            )),
13010            404u16 => Err(Error::ErrorResponse(
13011                ResponseValue::from_response(response).await?,
13012            )),
13013            _ => Err(Error::UnexpectedResponse(response)),
13014        }
13015    }
13016    /**Callee rejects the ring before answering; caller can observe `state` via GET session
13017
13018    Sends a `POST` request to `/public/access/sessions/{sessionId}/decline`
13019
13020    */
13021    pub async fn post_public_session_decline<'a>(
13022        &'a self,
13023        session_id: &'a str,
13024        token: Option<&'a str>,
13025    ) -> Result<ResponseValue<()>, Error<types::ApiErrorResponse>> {
13026        let url = format!(
13027            "{}/public/access/sessions/{}/decline",
13028            self.baseurl,
13029            encode_path(&session_id.to_string()),
13030        );
13031        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
13032        header_map.append(
13033            ::reqwest::header::HeaderName::from_static("api-version"),
13034            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
13035        );
13036        #[allow(unused_mut)]
13037        let mut request = self
13038            .client
13039            .post(url)
13040            .header(
13041                ::reqwest::header::ACCEPT,
13042                ::reqwest::header::HeaderValue::from_static("application/json"),
13043            )
13044            .query(&progenitor_client::QueryParam::new("token", &token))
13045            .headers(header_map)
13046            .build()?;
13047        let info = OperationInfo {
13048            operation_id: "post_public_session_decline",
13049        };
13050        self.pre(&mut request, &info).await?;
13051        let result = self.exec(request, &info).await;
13052        self.post(&result, &info).await?;
13053        let response = result?;
13054        match response.status().as_u16() {
13055            200u16 => Ok(ResponseValue::empty(response)),
13056            403u16 => Err(Error::ErrorResponse(
13057                ResponseValue::from_response(response).await?,
13058            )),
13059            404u16 => Err(Error::ErrorResponse(
13060                ResponseValue::from_response(response).await?,
13061            )),
13062            _ => Err(Error::UnexpectedResponse(response)),
13063        }
13064    }
13065    /**Sends a `POST` request to `/public/access/sessions/{sessionId}/lights`
13066
13067    */
13068    pub async fn post_public_session_lights<'a>(
13069        &'a self,
13070        session_id: &'a str,
13071        token: Option<&'a str>,
13072    ) -> Result<ResponseValue<()>, Error<types::ApiErrorResponse>> {
13073        let url = format!(
13074            "{}/public/access/sessions/{}/lights",
13075            self.baseurl,
13076            encode_path(&session_id.to_string()),
13077        );
13078        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
13079        header_map.append(
13080            ::reqwest::header::HeaderName::from_static("api-version"),
13081            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
13082        );
13083        #[allow(unused_mut)]
13084        let mut request = self
13085            .client
13086            .post(url)
13087            .header(
13088                ::reqwest::header::ACCEPT,
13089                ::reqwest::header::HeaderValue::from_static("application/json"),
13090            )
13091            .query(&progenitor_client::QueryParam::new("token", &token))
13092            .headers(header_map)
13093            .build()?;
13094        let info = OperationInfo {
13095            operation_id: "post_public_session_lights",
13096        };
13097        self.pre(&mut request, &info).await?;
13098        let result = self.exec(request, &info).await;
13099        self.post(&result, &info).await?;
13100        let response = result?;
13101        match response.status().as_u16() {
13102            200u16 => Ok(ResponseValue::empty(response)),
13103            403u16 => Err(Error::ErrorResponse(
13104                ResponseValue::from_response(response).await?,
13105            )),
13106            404u16 => Err(Error::ErrorResponse(
13107                ResponseValue::from_response(response).await?,
13108            )),
13109            _ => Err(Error::UnexpectedResponse(response)),
13110        }
13111    }
13112    /**Caller notifies apartment residents with the chat message text (Web Push)
13113
13114    Sends a `POST` request to `/public/access/sessions/{sessionId}/notify-message`
13115
13116    */
13117    pub async fn post_public_session_notify_message<'a>(
13118        &'a self,
13119        session_id: &'a str,
13120        token: Option<&'a str>,
13121        body: &'a types::NotifyPortalMessageBody,
13122    ) -> Result<ResponseValue<()>, Error<types::ApiErrorResponse>> {
13123        let url = format!(
13124            "{}/public/access/sessions/{}/notify-message",
13125            self.baseurl,
13126            encode_path(&session_id.to_string()),
13127        );
13128        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
13129        header_map.append(
13130            ::reqwest::header::HeaderName::from_static("api-version"),
13131            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
13132        );
13133        #[allow(unused_mut)]
13134        let mut request = self
13135            .client
13136            .post(url)
13137            .header(
13138                ::reqwest::header::ACCEPT,
13139                ::reqwest::header::HeaderValue::from_static("application/json"),
13140            )
13141            .json(&body)
13142            .query(&progenitor_client::QueryParam::new("token", &token))
13143            .headers(header_map)
13144            .build()?;
13145        let info = OperationInfo {
13146            operation_id: "post_public_session_notify_message",
13147        };
13148        self.pre(&mut request, &info).await?;
13149        let result = self.exec(request, &info).await;
13150        self.post(&result, &info).await?;
13151        let response = result?;
13152        match response.status().as_u16() {
13153            200u16 => Ok(ResponseValue::empty(response)),
13154            400u16 => Err(Error::ErrorResponse(
13155                ResponseValue::from_response(response).await?,
13156            )),
13157            403u16 => Err(Error::ErrorResponse(
13158                ResponseValue::from_response(response).await?,
13159            )),
13160            404u16 => Err(Error::ErrorResponse(
13161                ResponseValue::from_response(response).await?,
13162            )),
13163            _ => Err(Error::UnexpectedResponse(response)),
13164        }
13165    }
13166    /**Sends a `POST` request to `/public/access/sessions/{sessionId}/open`
13167
13168    */
13169    pub async fn post_public_session_open<'a>(
13170        &'a self,
13171        session_id: &'a str,
13172        token: Option<&'a str>,
13173    ) -> Result<ResponseValue<()>, Error<types::ApiErrorResponse>> {
13174        let url = format!(
13175            "{}/public/access/sessions/{}/open",
13176            self.baseurl,
13177            encode_path(&session_id.to_string()),
13178        );
13179        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
13180        header_map.append(
13181            ::reqwest::header::HeaderName::from_static("api-version"),
13182            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
13183        );
13184        #[allow(unused_mut)]
13185        let mut request = self
13186            .client
13187            .post(url)
13188            .header(
13189                ::reqwest::header::ACCEPT,
13190                ::reqwest::header::HeaderValue::from_static("application/json"),
13191            )
13192            .query(&progenitor_client::QueryParam::new("token", &token))
13193            .headers(header_map)
13194            .build()?;
13195        let info = OperationInfo {
13196            operation_id: "post_public_session_open",
13197        };
13198        self.pre(&mut request, &info).await?;
13199        let result = self.exec(request, &info).await;
13200        self.post(&result, &info).await?;
13201        let response = result?;
13202        match response.status().as_u16() {
13203            200u16 => Ok(ResponseValue::empty(response)),
13204            403u16 => Err(Error::ErrorResponse(
13205                ResponseValue::from_response(response).await?,
13206            )),
13207            404u16 => Err(Error::ErrorResponse(
13208                ResponseValue::from_response(response).await?,
13209            )),
13210            _ => Err(Error::UnexpectedResponse(response)),
13211        }
13212    }
13213    /**Sends a `GET` request to `/public/access/sessions/{sessionId}/streams`
13214
13215    */
13216    pub async fn get_public_session_streams<'a>(
13217        &'a self,
13218        session_id: &'a str,
13219        token: Option<&'a str>,
13220    ) -> Result<ResponseValue<types::PublicSessionStreamsResponse>, Error<types::ApiErrorResponse>>
13221    {
13222        let url = format!(
13223            "{}/public/access/sessions/{}/streams",
13224            self.baseurl,
13225            encode_path(&session_id.to_string()),
13226        );
13227        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
13228        header_map.append(
13229            ::reqwest::header::HeaderName::from_static("api-version"),
13230            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
13231        );
13232        #[allow(unused_mut)]
13233        let mut request = self
13234            .client
13235            .get(url)
13236            .header(
13237                ::reqwest::header::ACCEPT,
13238                ::reqwest::header::HeaderValue::from_static("application/json"),
13239            )
13240            .query(&progenitor_client::QueryParam::new("token", &token))
13241            .headers(header_map)
13242            .build()?;
13243        let info = OperationInfo {
13244            operation_id: "get_public_session_streams",
13245        };
13246        self.pre(&mut request, &info).await?;
13247        let result = self.exec(request, &info).await;
13248        self.post(&result, &info).await?;
13249        let response = result?;
13250        match response.status().as_u16() {
13251            200u16 => ResponseValue::from_response(response).await,
13252            403u16 => Err(Error::ErrorResponse(
13253                ResponseValue::from_response(response).await?,
13254            )),
13255            404u16 => Err(Error::ErrorResponse(
13256                ResponseValue::from_response(response).await?,
13257            )),
13258            _ => Err(Error::UnexpectedResponse(response)),
13259        }
13260    }
13261    /**Execute an OpenApp Scripting program. Requires execute permission in at least one org
13262
13263    Sends a `POST` request to `/scripting/execute`
13264
13265    */
13266    pub async fn execute_scripting<'a>(
13267        &'a self,
13268        body: &'a types::ExecuteScriptingRequest,
13269    ) -> Result<ResponseValue<types::ExecuteScriptingResponse>, Error<()>> {
13270        let url = format!("{}/scripting/execute", self.baseurl,);
13271        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
13272        header_map.append(
13273            ::reqwest::header::HeaderName::from_static("api-version"),
13274            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
13275        );
13276        #[allow(unused_mut)]
13277        let mut request = self
13278            .client
13279            .post(url)
13280            .header(
13281                ::reqwest::header::ACCEPT,
13282                ::reqwest::header::HeaderValue::from_static("application/json"),
13283            )
13284            .json(&body)
13285            .headers(header_map)
13286            .build()?;
13287        let info = OperationInfo {
13288            operation_id: "execute_scripting",
13289        };
13290        self.pre(&mut request, &info).await?;
13291        let result = self.exec(request, &info).await;
13292        self.post(&result, &info).await?;
13293        let response = result?;
13294        match response.status().as_u16() {
13295            200u16 => ResponseValue::from_response(response).await,
13296            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
13297            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
13298            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
13299            _ => Err(Error::UnexpectedResponse(response)),
13300        }
13301    }
13302    /**Get backend status and version
13303
13304    Sends a `GET` request to `/status`
13305
13306    */
13307    pub async fn get_backend_status<'a>(
13308        &'a self,
13309    ) -> Result<ResponseValue<types::BackendStatus>, Error<()>> {
13310        let url = format!("{}/status", self.baseurl,);
13311        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
13312        header_map.append(
13313            ::reqwest::header::HeaderName::from_static("api-version"),
13314            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
13315        );
13316        #[allow(unused_mut)]
13317        let mut request = self
13318            .client
13319            .get(url)
13320            .header(
13321                ::reqwest::header::ACCEPT,
13322                ::reqwest::header::HeaderValue::from_static("application/json"),
13323            )
13324            .headers(header_map)
13325            .build()?;
13326        let info = OperationInfo {
13327            operation_id: "get_backend_status",
13328        };
13329        self.pre(&mut request, &info).await?;
13330        let result = self.exec(request, &info).await;
13331        self.post(&result, &info).await?;
13332        let response = result?;
13333        match response.status().as_u16() {
13334            200u16 => ResponseValue::from_response(response).await,
13335            _ => Err(Error::UnexpectedResponse(response)),
13336        }
13337    }
13338    /**Create a user in the organization context
13339
13340    Sends a `POST` request to `/users`
13341
13342    */
13343    pub async fn create_user<'a>(
13344        &'a self,
13345        include_deleted: Option<bool>,
13346        include_metadata: Option<bool>,
13347        only_deleted: Option<bool>,
13348        x_org: &'a str,
13349        body: &'a types::CreateUserRequest,
13350    ) -> Result<ResponseValue<types::UserResponse>, Error<types::ApiErrorResponse>> {
13351        let url = format!("{}/users", self.baseurl,);
13352        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
13353        header_map.append(
13354            ::reqwest::header::HeaderName::from_static("api-version"),
13355            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
13356        );
13357        header_map.append("X-Org", x_org.to_string().try_into()?);
13358        #[allow(unused_mut)]
13359        let mut request = self
13360            .client
13361            .post(url)
13362            .header(
13363                ::reqwest::header::ACCEPT,
13364                ::reqwest::header::HeaderValue::from_static("application/json"),
13365            )
13366            .json(&body)
13367            .query(&progenitor_client::QueryParam::new(
13368                "include_deleted",
13369                &include_deleted,
13370            ))
13371            .query(&progenitor_client::QueryParam::new(
13372                "include_metadata",
13373                &include_metadata,
13374            ))
13375            .query(&progenitor_client::QueryParam::new(
13376                "only_deleted",
13377                &only_deleted,
13378            ))
13379            .headers(header_map)
13380            .build()?;
13381        let info = OperationInfo {
13382            operation_id: "create_user",
13383        };
13384        self.pre(&mut request, &info).await?;
13385        let result = self.exec(request, &info).await;
13386        self.post(&result, &info).await?;
13387        let response = result?;
13388        match response.status().as_u16() {
13389            200u16 => ResponseValue::from_response(response).await,
13390            400u16 => Err(Error::ErrorResponse(
13391                ResponseValue::from_response(response).await?,
13392            )),
13393            401u16 => Err(Error::ErrorResponse(
13394                ResponseValue::from_response(response).await?,
13395            )),
13396            403u16 => Err(Error::ErrorResponse(
13397                ResponseValue::from_response(response).await?,
13398            )),
13399            409u16 => Err(Error::ErrorResponse(
13400                ResponseValue::from_response(response).await?,
13401            )),
13402            422u16 => Err(Error::ErrorResponse(
13403                ResponseValue::from_response(response).await?,
13404            )),
13405            500u16 => Err(Error::ErrorResponse(
13406                ResponseValue::from_response(response).await?,
13407            )),
13408            _ => Err(Error::UnexpectedResponse(response)),
13409        }
13410    }
13411    /**Search users by name/email. Requires `users:list` in the org (`X-Org` or `org_id`), or on the root org when `scope=all`
13412
13413    Sends a `GET` request to `/users/search`
13414
13415    Arguments:
13416    - `exclude_ids`: Comma-separated user IDs to exclude
13417    - `limit`
13418    - `offset`
13419    - `org_id`: Filter by org subtree (ignored when `scope=all`).
13420    - `q`: Search text (ILIKE on name and email)
13421    - `scope`: `all`: search every user in the database (requires `users:list` on the root org). Otherwise org-scoped.
13422    */
13423    pub async fn search_users<'a>(
13424        &'a self,
13425        exclude_ids: Option<&'a str>,
13426        limit: Option<u64>,
13427        offset: Option<u64>,
13428        org_id: Option<&'a str>,
13429        q: Option<&'a str>,
13430        scope: Option<&'a str>,
13431    ) -> Result<ResponseValue<types::PaginatedResponse>, Error<types::ApiErrorResponse>> {
13432        let url = format!("{}/users/search", self.baseurl,);
13433        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
13434        header_map.append(
13435            ::reqwest::header::HeaderName::from_static("api-version"),
13436            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
13437        );
13438        #[allow(unused_mut)]
13439        let mut request = self
13440            .client
13441            .get(url)
13442            .header(
13443                ::reqwest::header::ACCEPT,
13444                ::reqwest::header::HeaderValue::from_static("application/json"),
13445            )
13446            .query(&progenitor_client::QueryParam::new(
13447                "exclude_ids",
13448                &exclude_ids,
13449            ))
13450            .query(&progenitor_client::QueryParam::new("limit", &limit))
13451            .query(&progenitor_client::QueryParam::new("offset", &offset))
13452            .query(&progenitor_client::QueryParam::new("org_id", &org_id))
13453            .query(&progenitor_client::QueryParam::new("q", &q))
13454            .query(&progenitor_client::QueryParam::new("scope", &scope))
13455            .headers(header_map)
13456            .build()?;
13457        let info = OperationInfo {
13458            operation_id: "search_users",
13459        };
13460        self.pre(&mut request, &info).await?;
13461        let result = self.exec(request, &info).await;
13462        self.post(&result, &info).await?;
13463        let response = result?;
13464        match response.status().as_u16() {
13465            200u16 => ResponseValue::from_response(response).await,
13466            400u16 => Err(Error::ErrorResponse(
13467                ResponseValue::from_response(response).await?,
13468            )),
13469            401u16 => Err(Error::ErrorResponse(
13470                ResponseValue::from_response(response).await?,
13471            )),
13472            403u16 => Err(Error::ErrorResponse(
13473                ResponseValue::from_response(response).await?,
13474            )),
13475            500u16 => Err(Error::ErrorResponse(
13476                ResponseValue::from_response(response).await?,
13477            )),
13478            _ => Err(Error::UnexpectedResponse(response)),
13479        }
13480    }
13481    /**Get a user by ID
13482
13483    Sends a `GET` request to `/users/{id}`
13484
13485    */
13486    pub async fn get_user<'a>(
13487        &'a self,
13488        id: &'a str,
13489        include_deleted: Option<bool>,
13490        include_metadata: Option<bool>,
13491        x_org: &'a str,
13492    ) -> Result<ResponseValue<types::UserResponse>, Error<types::ApiErrorResponse>> {
13493        let url = format!("{}/users/{}", self.baseurl, encode_path(&id.to_string()),);
13494        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
13495        header_map.append(
13496            ::reqwest::header::HeaderName::from_static("api-version"),
13497            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
13498        );
13499        header_map.append("X-Org", x_org.to_string().try_into()?);
13500        #[allow(unused_mut)]
13501        let mut request = self
13502            .client
13503            .get(url)
13504            .header(
13505                ::reqwest::header::ACCEPT,
13506                ::reqwest::header::HeaderValue::from_static("application/json"),
13507            )
13508            .query(&progenitor_client::QueryParam::new(
13509                "include_deleted",
13510                &include_deleted,
13511            ))
13512            .query(&progenitor_client::QueryParam::new(
13513                "include_metadata",
13514                &include_metadata,
13515            ))
13516            .headers(header_map)
13517            .build()?;
13518        let info = OperationInfo {
13519            operation_id: "get_user",
13520        };
13521        self.pre(&mut request, &info).await?;
13522        let result = self.exec(request, &info).await;
13523        self.post(&result, &info).await?;
13524        let response = result?;
13525        match response.status().as_u16() {
13526            200u16 => ResponseValue::from_response(response).await,
13527            400u16 => Err(Error::ErrorResponse(
13528                ResponseValue::from_response(response).await?,
13529            )),
13530            401u16 => Err(Error::ErrorResponse(
13531                ResponseValue::from_response(response).await?,
13532            )),
13533            403u16 => Err(Error::ErrorResponse(
13534                ResponseValue::from_response(response).await?,
13535            )),
13536            404u16 => Err(Error::ErrorResponse(
13537                ResponseValue::from_response(response).await?,
13538            )),
13539            500u16 => Err(Error::ErrorResponse(
13540                ResponseValue::from_response(response).await?,
13541            )),
13542            _ => Err(Error::UnexpectedResponse(response)),
13543        }
13544    }
13545    /**Update a user by ID
13546
13547    Sends a `PUT` request to `/users/{id}`
13548
13549    */
13550    pub async fn update_user<'a>(
13551        &'a self,
13552        id: &'a str,
13553        include_deleted: Option<bool>,
13554        include_metadata: Option<bool>,
13555        x_org: &'a str,
13556        body: &'a types::UpdateUserRequest,
13557    ) -> Result<ResponseValue<types::UserResponse>, Error<types::ApiErrorResponse>> {
13558        let url = format!("{}/users/{}", self.baseurl, encode_path(&id.to_string()),);
13559        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
13560        header_map.append(
13561            ::reqwest::header::HeaderName::from_static("api-version"),
13562            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
13563        );
13564        header_map.append("X-Org", x_org.to_string().try_into()?);
13565        #[allow(unused_mut)]
13566        let mut request = self
13567            .client
13568            .put(url)
13569            .header(
13570                ::reqwest::header::ACCEPT,
13571                ::reqwest::header::HeaderValue::from_static("application/json"),
13572            )
13573            .json(&body)
13574            .query(&progenitor_client::QueryParam::new(
13575                "include_deleted",
13576                &include_deleted,
13577            ))
13578            .query(&progenitor_client::QueryParam::new(
13579                "include_metadata",
13580                &include_metadata,
13581            ))
13582            .headers(header_map)
13583            .build()?;
13584        let info = OperationInfo {
13585            operation_id: "update_user",
13586        };
13587        self.pre(&mut request, &info).await?;
13588        let result = self.exec(request, &info).await;
13589        self.post(&result, &info).await?;
13590        let response = result?;
13591        match response.status().as_u16() {
13592            200u16 => ResponseValue::from_response(response).await,
13593            400u16 => Err(Error::ErrorResponse(
13594                ResponseValue::from_response(response).await?,
13595            )),
13596            401u16 => Err(Error::ErrorResponse(
13597                ResponseValue::from_response(response).await?,
13598            )),
13599            403u16 => Err(Error::ErrorResponse(
13600                ResponseValue::from_response(response).await?,
13601            )),
13602            404u16 => Err(Error::ErrorResponse(
13603                ResponseValue::from_response(response).await?,
13604            )),
13605            422u16 => Err(Error::ErrorResponse(
13606                ResponseValue::from_response(response).await?,
13607            )),
13608            500u16 => Err(Error::ErrorResponse(
13609                ResponseValue::from_response(response).await?,
13610            )),
13611            _ => Err(Error::UnexpectedResponse(response)),
13612        }
13613    }
13614    /**Soft-delete a user
13615
13616    Sends a `DELETE` request to `/users/{id}`
13617
13618    */
13619    pub async fn delete_user<'a>(
13620        &'a self,
13621        id: &'a str,
13622        include_deleted: Option<bool>,
13623        include_metadata: Option<bool>,
13624        x_org: &'a str,
13625    ) -> Result<ResponseValue<types::UserResponse>, Error<types::ApiErrorResponse>> {
13626        let url = format!("{}/users/{}", self.baseurl, encode_path(&id.to_string()),);
13627        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
13628        header_map.append(
13629            ::reqwest::header::HeaderName::from_static("api-version"),
13630            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
13631        );
13632        header_map.append("X-Org", x_org.to_string().try_into()?);
13633        #[allow(unused_mut)]
13634        let mut request = self
13635            .client
13636            .delete(url)
13637            .header(
13638                ::reqwest::header::ACCEPT,
13639                ::reqwest::header::HeaderValue::from_static("application/json"),
13640            )
13641            .query(&progenitor_client::QueryParam::new(
13642                "include_deleted",
13643                &include_deleted,
13644            ))
13645            .query(&progenitor_client::QueryParam::new(
13646                "include_metadata",
13647                &include_metadata,
13648            ))
13649            .headers(header_map)
13650            .build()?;
13651        let info = OperationInfo {
13652            operation_id: "delete_user",
13653        };
13654        self.pre(&mut request, &info).await?;
13655        let result = self.exec(request, &info).await;
13656        self.post(&result, &info).await?;
13657        let response = result?;
13658        match response.status().as_u16() {
13659            200u16 => ResponseValue::from_response(response).await,
13660            400u16 => Err(Error::ErrorResponse(
13661                ResponseValue::from_response(response).await?,
13662            )),
13663            401u16 => Err(Error::ErrorResponse(
13664                ResponseValue::from_response(response).await?,
13665            )),
13666            403u16 => Err(Error::ErrorResponse(
13667                ResponseValue::from_response(response).await?,
13668            )),
13669            404u16 => Err(Error::ErrorResponse(
13670                ResponseValue::from_response(response).await?,
13671            )),
13672            409u16 => Err(Error::ErrorResponse(
13673                ResponseValue::from_response(response).await?,
13674            )),
13675            422u16 => Err(Error::ErrorResponse(
13676                ResponseValue::from_response(response).await?,
13677            )),
13678            500u16 => Err(Error::ErrorResponse(
13679                ResponseValue::from_response(response).await?,
13680            )),
13681            _ => Err(Error::UnexpectedResponse(response)),
13682        }
13683    }
13684    /**Permanently delete (purge) a user
13685
13686    Sends a `DELETE` request to `/users/{id}/purge`
13687
13688    */
13689    pub async fn hard_delete_user<'a>(
13690        &'a self,
13691        id: &'a str,
13692        include_deleted: Option<bool>,
13693        include_metadata: Option<bool>,
13694        x_org: &'a str,
13695    ) -> Result<ResponseValue<types::UserResponse>, Error<types::ApiErrorResponse>> {
13696        let url = format!(
13697            "{}/users/{}/purge",
13698            self.baseurl,
13699            encode_path(&id.to_string()),
13700        );
13701        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
13702        header_map.append(
13703            ::reqwest::header::HeaderName::from_static("api-version"),
13704            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
13705        );
13706        header_map.append("X-Org", x_org.to_string().try_into()?);
13707        #[allow(unused_mut)]
13708        let mut request = self
13709            .client
13710            .delete(url)
13711            .header(
13712                ::reqwest::header::ACCEPT,
13713                ::reqwest::header::HeaderValue::from_static("application/json"),
13714            )
13715            .query(&progenitor_client::QueryParam::new(
13716                "include_deleted",
13717                &include_deleted,
13718            ))
13719            .query(&progenitor_client::QueryParam::new(
13720                "include_metadata",
13721                &include_metadata,
13722            ))
13723            .headers(header_map)
13724            .build()?;
13725        let info = OperationInfo {
13726            operation_id: "hard_delete_user",
13727        };
13728        self.pre(&mut request, &info).await?;
13729        let result = self.exec(request, &info).await;
13730        self.post(&result, &info).await?;
13731        let response = result?;
13732        match response.status().as_u16() {
13733            200u16 => ResponseValue::from_response(response).await,
13734            400u16 => Err(Error::ErrorResponse(
13735                ResponseValue::from_response(response).await?,
13736            )),
13737            401u16 => Err(Error::ErrorResponse(
13738                ResponseValue::from_response(response).await?,
13739            )),
13740            403u16 => Err(Error::ErrorResponse(
13741                ResponseValue::from_response(response).await?,
13742            )),
13743            404u16 => Err(Error::ErrorResponse(
13744                ResponseValue::from_response(response).await?,
13745            )),
13746            409u16 => Err(Error::ErrorResponse(
13747                ResponseValue::from_response(response).await?,
13748            )),
13749            422u16 => Err(Error::ErrorResponse(
13750                ResponseValue::from_response(response).await?,
13751            )),
13752            500u16 => Err(Error::ErrorResponse(
13753                ResponseValue::from_response(response).await?,
13754            )),
13755            _ => Err(Error::UnexpectedResponse(response)),
13756        }
13757    }
13758    /**Add roles to a user. Requires users:create (or admin) in each org where roles are added
13759
13760    Sends a `POST` request to `/users/{id}/roles`
13761
13762    */
13763    pub async fn add_roles<'a>(
13764        &'a self,
13765        id: &'a str,
13766        x_org: &'a str,
13767        body: &'a types::AddRolesRequest,
13768    ) -> Result<ResponseValue<types::UserResponse>, Error<()>> {
13769        let url = format!(
13770            "{}/users/{}/roles",
13771            self.baseurl,
13772            encode_path(&id.to_string()),
13773        );
13774        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
13775        header_map.append(
13776            ::reqwest::header::HeaderName::from_static("api-version"),
13777            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
13778        );
13779        header_map.append("X-Org", x_org.to_string().try_into()?);
13780        #[allow(unused_mut)]
13781        let mut request = self
13782            .client
13783            .post(url)
13784            .header(
13785                ::reqwest::header::ACCEPT,
13786                ::reqwest::header::HeaderValue::from_static("application/json"),
13787            )
13788            .json(&body)
13789            .headers(header_map)
13790            .build()?;
13791        let info = OperationInfo {
13792            operation_id: "add_roles",
13793        };
13794        self.pre(&mut request, &info).await?;
13795        let result = self.exec(request, &info).await;
13796        self.post(&result, &info).await?;
13797        let response = result?;
13798        match response.status().as_u16() {
13799            200u16 => ResponseValue::from_response(response).await,
13800            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
13801            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
13802            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
13803            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
13804            _ => Err(Error::UnexpectedResponse(response)),
13805        }
13806    }
13807    /**Delete roles from a user. Requires users:create (or admin) in each org where roles are deleted
13808
13809    Sends a `DELETE` request to `/users/{id}/roles`
13810
13811    */
13812    pub async fn delete_roles<'a>(
13813        &'a self,
13814        id: &'a str,
13815        x_org: &'a str,
13816        body: &'a types::DeleteRolesRequest,
13817    ) -> Result<ResponseValue<types::UserResponse>, Error<()>> {
13818        let url = format!(
13819            "{}/users/{}/roles",
13820            self.baseurl,
13821            encode_path(&id.to_string()),
13822        );
13823        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
13824        header_map.append(
13825            ::reqwest::header::HeaderName::from_static("api-version"),
13826            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
13827        );
13828        header_map.append("X-Org", x_org.to_string().try_into()?);
13829        #[allow(unused_mut)]
13830        let mut request = self
13831            .client
13832            .delete(url)
13833            .header(
13834                ::reqwest::header::ACCEPT,
13835                ::reqwest::header::HeaderValue::from_static("application/json"),
13836            )
13837            .json(&body)
13838            .headers(header_map)
13839            .build()?;
13840        let info = OperationInfo {
13841            operation_id: "delete_roles",
13842        };
13843        self.pre(&mut request, &info).await?;
13844        let result = self.exec(request, &info).await;
13845        self.post(&result, &info).await?;
13846        let response = result?;
13847        match response.status().as_u16() {
13848            200u16 => ResponseValue::from_response(response).await,
13849            400u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
13850            401u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
13851            403u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
13852            404u16 => Err(Error::ErrorResponse(ResponseValue::empty(response))),
13853            _ => Err(Error::UnexpectedResponse(response)),
13854        }
13855    }
13856    /**Create a zone for an integration
13857
13858    Sends a `POST` request to `/zones`
13859
13860    */
13861    pub async fn create_zone<'a>(
13862        &'a self,
13863        include_deleted: Option<bool>,
13864        include_metadata: Option<bool>,
13865        x_org: &'a str,
13866        body: &'a types::CreateZoneRequest,
13867    ) -> Result<ResponseValue<types::ZoneResponse>, Error<types::ApiErrorResponse>> {
13868        let url = format!("{}/zones", self.baseurl,);
13869        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
13870        header_map.append(
13871            ::reqwest::header::HeaderName::from_static("api-version"),
13872            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
13873        );
13874        header_map.append("X-Org", x_org.to_string().try_into()?);
13875        #[allow(unused_mut)]
13876        let mut request = self
13877            .client
13878            .post(url)
13879            .header(
13880                ::reqwest::header::ACCEPT,
13881                ::reqwest::header::HeaderValue::from_static("application/json"),
13882            )
13883            .json(&body)
13884            .query(&progenitor_client::QueryParam::new(
13885                "include_deleted",
13886                &include_deleted,
13887            ))
13888            .query(&progenitor_client::QueryParam::new(
13889                "include_metadata",
13890                &include_metadata,
13891            ))
13892            .headers(header_map)
13893            .build()?;
13894        let info = OperationInfo {
13895            operation_id: "create_zone",
13896        };
13897        self.pre(&mut request, &info).await?;
13898        let result = self.exec(request, &info).await;
13899        self.post(&result, &info).await?;
13900        let response = result?;
13901        match response.status().as_u16() {
13902            200u16 => ResponseValue::from_response(response).await,
13903            400u16 => Err(Error::ErrorResponse(
13904                ResponseValue::from_response(response).await?,
13905            )),
13906            401u16 => Err(Error::ErrorResponse(
13907                ResponseValue::from_response(response).await?,
13908            )),
13909            403u16 => Err(Error::ErrorResponse(
13910                ResponseValue::from_response(response).await?,
13911            )),
13912            404u16 => Err(Error::ErrorResponse(
13913                ResponseValue::from_response(response).await?,
13914            )),
13915            422u16 => Err(Error::ErrorResponse(
13916                ResponseValue::from_response(response).await?,
13917            )),
13918            500u16 => Err(Error::ErrorResponse(
13919                ResponseValue::from_response(response).await?,
13920            )),
13921            _ => Err(Error::UnexpectedResponse(response)),
13922        }
13923    }
13924    /**Get a zone by ID
13925
13926    Sends a `GET` request to `/zones/{id}`
13927
13928    */
13929    pub async fn get_zone<'a>(
13930        &'a self,
13931        id: &'a str,
13932        include_deleted: Option<bool>,
13933        include_metadata: Option<bool>,
13934        x_org: &'a str,
13935    ) -> Result<ResponseValue<types::ZoneResponse>, Error<types::ApiErrorResponse>> {
13936        let url = format!("{}/zones/{}", self.baseurl, encode_path(&id.to_string()),);
13937        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
13938        header_map.append(
13939            ::reqwest::header::HeaderName::from_static("api-version"),
13940            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
13941        );
13942        header_map.append("X-Org", x_org.to_string().try_into()?);
13943        #[allow(unused_mut)]
13944        let mut request = self
13945            .client
13946            .get(url)
13947            .header(
13948                ::reqwest::header::ACCEPT,
13949                ::reqwest::header::HeaderValue::from_static("application/json"),
13950            )
13951            .query(&progenitor_client::QueryParam::new(
13952                "include_deleted",
13953                &include_deleted,
13954            ))
13955            .query(&progenitor_client::QueryParam::new(
13956                "include_metadata",
13957                &include_metadata,
13958            ))
13959            .headers(header_map)
13960            .build()?;
13961        let info = OperationInfo {
13962            operation_id: "get_zone",
13963        };
13964        self.pre(&mut request, &info).await?;
13965        let result = self.exec(request, &info).await;
13966        self.post(&result, &info).await?;
13967        let response = result?;
13968        match response.status().as_u16() {
13969            200u16 => ResponseValue::from_response(response).await,
13970            400u16 => Err(Error::ErrorResponse(
13971                ResponseValue::from_response(response).await?,
13972            )),
13973            401u16 => Err(Error::ErrorResponse(
13974                ResponseValue::from_response(response).await?,
13975            )),
13976            403u16 => Err(Error::ErrorResponse(
13977                ResponseValue::from_response(response).await?,
13978            )),
13979            404u16 => Err(Error::ErrorResponse(
13980                ResponseValue::from_response(response).await?,
13981            )),
13982            500u16 => Err(Error::ErrorResponse(
13983                ResponseValue::from_response(response).await?,
13984            )),
13985            _ => Err(Error::UnexpectedResponse(response)),
13986        }
13987    }
13988    /**Update a zone
13989
13990    Sends a `PUT` request to `/zones/{id}`
13991
13992    */
13993    pub async fn update_zone<'a>(
13994        &'a self,
13995        id: &'a str,
13996        include_deleted: Option<bool>,
13997        include_metadata: Option<bool>,
13998        x_org: &'a str,
13999        body: &'a types::UpdateZoneRequest,
14000    ) -> Result<ResponseValue<types::ZoneResponse>, Error<types::ApiErrorResponse>> {
14001        let url = format!("{}/zones/{}", self.baseurl, encode_path(&id.to_string()),);
14002        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
14003        header_map.append(
14004            ::reqwest::header::HeaderName::from_static("api-version"),
14005            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
14006        );
14007        header_map.append("X-Org", x_org.to_string().try_into()?);
14008        #[allow(unused_mut)]
14009        let mut request = self
14010            .client
14011            .put(url)
14012            .header(
14013                ::reqwest::header::ACCEPT,
14014                ::reqwest::header::HeaderValue::from_static("application/json"),
14015            )
14016            .json(&body)
14017            .query(&progenitor_client::QueryParam::new(
14018                "include_deleted",
14019                &include_deleted,
14020            ))
14021            .query(&progenitor_client::QueryParam::new(
14022                "include_metadata",
14023                &include_metadata,
14024            ))
14025            .headers(header_map)
14026            .build()?;
14027        let info = OperationInfo {
14028            operation_id: "update_zone",
14029        };
14030        self.pre(&mut request, &info).await?;
14031        let result = self.exec(request, &info).await;
14032        self.post(&result, &info).await?;
14033        let response = result?;
14034        match response.status().as_u16() {
14035            200u16 => ResponseValue::from_response(response).await,
14036            400u16 => Err(Error::ErrorResponse(
14037                ResponseValue::from_response(response).await?,
14038            )),
14039            401u16 => Err(Error::ErrorResponse(
14040                ResponseValue::from_response(response).await?,
14041            )),
14042            403u16 => Err(Error::ErrorResponse(
14043                ResponseValue::from_response(response).await?,
14044            )),
14045            404u16 => Err(Error::ErrorResponse(
14046                ResponseValue::from_response(response).await?,
14047            )),
14048            422u16 => Err(Error::ErrorResponse(
14049                ResponseValue::from_response(response).await?,
14050            )),
14051            500u16 => Err(Error::ErrorResponse(
14052                ResponseValue::from_response(response).await?,
14053            )),
14054            _ => Err(Error::UnexpectedResponse(response)),
14055        }
14056    }
14057    /**Soft-delete a zone
14058
14059    Sends a `DELETE` request to `/zones/{id}`
14060
14061    */
14062    pub async fn delete_zone<'a>(
14063        &'a self,
14064        id: &'a str,
14065        include_deleted: Option<bool>,
14066        include_metadata: Option<bool>,
14067        x_org: &'a str,
14068    ) -> Result<ResponseValue<types::ZoneResponse>, Error<types::ApiErrorResponse>> {
14069        let url = format!("{}/zones/{}", self.baseurl, encode_path(&id.to_string()),);
14070        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
14071        header_map.append(
14072            ::reqwest::header::HeaderName::from_static("api-version"),
14073            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
14074        );
14075        header_map.append("X-Org", x_org.to_string().try_into()?);
14076        #[allow(unused_mut)]
14077        let mut request = self
14078            .client
14079            .delete(url)
14080            .header(
14081                ::reqwest::header::ACCEPT,
14082                ::reqwest::header::HeaderValue::from_static("application/json"),
14083            )
14084            .query(&progenitor_client::QueryParam::new(
14085                "include_deleted",
14086                &include_deleted,
14087            ))
14088            .query(&progenitor_client::QueryParam::new(
14089                "include_metadata",
14090                &include_metadata,
14091            ))
14092            .headers(header_map)
14093            .build()?;
14094        let info = OperationInfo {
14095            operation_id: "delete_zone",
14096        };
14097        self.pre(&mut request, &info).await?;
14098        let result = self.exec(request, &info).await;
14099        self.post(&result, &info).await?;
14100        let response = result?;
14101        match response.status().as_u16() {
14102            200u16 => ResponseValue::from_response(response).await,
14103            400u16 => Err(Error::ErrorResponse(
14104                ResponseValue::from_response(response).await?,
14105            )),
14106            401u16 => Err(Error::ErrorResponse(
14107                ResponseValue::from_response(response).await?,
14108            )),
14109            403u16 => Err(Error::ErrorResponse(
14110                ResponseValue::from_response(response).await?,
14111            )),
14112            404u16 => Err(Error::ErrorResponse(
14113                ResponseValue::from_response(response).await?,
14114            )),
14115            422u16 => Err(Error::ErrorResponse(
14116                ResponseValue::from_response(response).await?,
14117            )),
14118            500u16 => Err(Error::ErrorResponse(
14119                ResponseValue::from_response(response).await?,
14120            )),
14121            _ => Err(Error::UnexpectedResponse(response)),
14122        }
14123    }
14124    /**Permanently delete (purge) a zone
14125
14126    Sends a `DELETE` request to `/zones/{id}/purge`
14127
14128    */
14129    pub async fn hard_delete_zone<'a>(
14130        &'a self,
14131        id: &'a str,
14132        include_deleted: Option<bool>,
14133        include_metadata: Option<bool>,
14134        x_org: &'a str,
14135    ) -> Result<ResponseValue<types::ZoneResponse>, Error<types::ApiErrorResponse>> {
14136        let url = format!(
14137            "{}/zones/{}/purge",
14138            self.baseurl,
14139            encode_path(&id.to_string()),
14140        );
14141        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(2usize);
14142        header_map.append(
14143            ::reqwest::header::HeaderName::from_static("api-version"),
14144            ::reqwest::header::HeaderValue::from_static(Self::api_version()),
14145        );
14146        header_map.append("X-Org", x_org.to_string().try_into()?);
14147        #[allow(unused_mut)]
14148        let mut request = self
14149            .client
14150            .delete(url)
14151            .header(
14152                ::reqwest::header::ACCEPT,
14153                ::reqwest::header::HeaderValue::from_static("application/json"),
14154            )
14155            .query(&progenitor_client::QueryParam::new(
14156                "include_deleted",
14157                &include_deleted,
14158            ))
14159            .query(&progenitor_client::QueryParam::new(
14160                "include_metadata",
14161                &include_metadata,
14162            ))
14163            .headers(header_map)
14164            .build()?;
14165        let info = OperationInfo {
14166            operation_id: "hard_delete_zone",
14167        };
14168        self.pre(&mut request, &info).await?;
14169        let result = self.exec(request, &info).await;
14170        self.post(&result, &info).await?;
14171        let response = result?;
14172        match response.status().as_u16() {
14173            200u16 => ResponseValue::from_response(response).await,
14174            400u16 => Err(Error::ErrorResponse(
14175                ResponseValue::from_response(response).await?,
14176            )),
14177            401u16 => Err(Error::ErrorResponse(
14178                ResponseValue::from_response(response).await?,
14179            )),
14180            403u16 => Err(Error::ErrorResponse(
14181                ResponseValue::from_response(response).await?,
14182            )),
14183            404u16 => Err(Error::ErrorResponse(
14184                ResponseValue::from_response(response).await?,
14185            )),
14186            422u16 => Err(Error::ErrorResponse(
14187                ResponseValue::from_response(response).await?,
14188            )),
14189            500u16 => Err(Error::ErrorResponse(
14190                ResponseValue::from_response(response).await?,
14191            )),
14192            _ => Err(Error::UnexpectedResponse(response)),
14193        }
14194    }
14195}
14196/// Items consumers will typically use such as the Client.
14197pub mod prelude {
14198    #[allow(unused_imports)]
14199    pub use super::Client;
14200}