bitwarden_api_api/apis/
organization_users_api.rs

1/*
2 * Bitwarden Internal API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: latest
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use std::sync::Arc;
12
13use async_trait::async_trait;
14#[cfg(feature = "mockall")]
15use mockall::automock;
16use reqwest;
17use serde::{Deserialize, Serialize, de::Error as _};
18
19use super::{Error, configuration};
20use crate::{
21    apis::{ContentType, ResponseContent},
22    models,
23};
24
25#[cfg_attr(feature = "mockall", automock)]
26#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
27#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
28pub trait OrganizationUsersApi: Send + Sync {
29    /// POST /organizations/{orgId}/users/{organizationUserId}/accept
30    async fn accept<'a>(
31        &self,
32        org_id: uuid::Uuid,
33        organization_user_id: uuid::Uuid,
34        organization_user_accept_request_model: Option<models::OrganizationUserAcceptRequestModel>,
35    ) -> Result<(), Error<AcceptError>>;
36
37    /// POST /organizations/{orgId}/users/{organizationUserId}/accept-init
38    async fn accept_init<'a>(
39        &self,
40        org_id: uuid::Uuid,
41        organization_user_id: uuid::Uuid,
42        organization_user_accept_init_request_model: Option<
43            models::OrganizationUserAcceptInitRequestModel,
44        >,
45    ) -> Result<(), Error<AcceptInitError>>;
46
47    /// POST /organizations/{orgId}/users/{id}/auto-confirm
48    async fn automatically_confirm_organization_user<'a>(
49        &self,
50        org_id: uuid::Uuid,
51        id: uuid::Uuid,
52        organization_user_confirm_request_model: Option<
53            models::OrganizationUserConfirmRequestModel,
54        >,
55    ) -> Result<(), Error<AutomaticallyConfirmOrganizationUserError>>;
56
57    /// POST /organizations/{orgId}/users/confirm
58    async fn bulk_confirm<'a>(
59        &self,
60        org_id: uuid::Uuid,
61        organization_user_bulk_confirm_request_model: Option<
62            models::OrganizationUserBulkConfirmRequestModel,
63        >,
64    ) -> Result<models::OrganizationUserBulkResponseModelListResponseModel, Error<BulkConfirmError>>;
65
66    /// DELETE /organizations/{orgId}/users/delete-account
67    async fn bulk_delete_account<'a>(
68        &self,
69        org_id: uuid::Uuid,
70        organization_user_bulk_request_model: Option<models::OrganizationUserBulkRequestModel>,
71    ) -> Result<
72        models::OrganizationUserBulkResponseModelListResponseModel,
73        Error<BulkDeleteAccountError>,
74    >;
75
76    /// PUT /organizations/{orgId}/users/enable-secrets-manager
77    async fn bulk_enable_secrets_manager<'a>(
78        &self,
79        org_id: uuid::Uuid,
80        organization_user_bulk_request_model: Option<models::OrganizationUserBulkRequestModel>,
81    ) -> Result<(), Error<BulkEnableSecretsManagerError>>;
82
83    /// POST /organizations/{orgId}/users/reinvite
84    async fn bulk_reinvite<'a>(
85        &self,
86        org_id: uuid::Uuid,
87        organization_user_bulk_request_model: Option<models::OrganizationUserBulkRequestModel>,
88    ) -> Result<models::OrganizationUserBulkResponseModelListResponseModel, Error<BulkReinviteError>>;
89
90    /// DELETE /organizations/{orgId}/users
91    async fn bulk_remove<'a>(
92        &self,
93        org_id: uuid::Uuid,
94        organization_user_bulk_request_model: Option<models::OrganizationUserBulkRequestModel>,
95    ) -> Result<models::OrganizationUserBulkResponseModelListResponseModel, Error<BulkRemoveError>>;
96
97    /// PUT /organizations/{orgId}/users/restore
98    async fn bulk_restore<'a>(
99        &self,
100        org_id: uuid::Uuid,
101        organization_user_bulk_request_model: Option<models::OrganizationUserBulkRequestModel>,
102    ) -> Result<models::OrganizationUserBulkResponseModelListResponseModel, Error<BulkRestoreError>>;
103
104    /// PUT /organizations/{orgId}/users/revoke
105    async fn bulk_revoke<'a>(
106        &self,
107        org_id: uuid::Uuid,
108        organization_user_bulk_request_model: Option<models::OrganizationUserBulkRequestModel>,
109    ) -> Result<models::OrganizationUserBulkResponseModelListResponseModel, Error<BulkRevokeError>>;
110
111    /// POST /organizations/{orgId}/users/{id}/confirm
112    async fn confirm<'a>(
113        &self,
114        org_id: uuid::Uuid,
115        id: uuid::Uuid,
116        organization_user_confirm_request_model: Option<
117            models::OrganizationUserConfirmRequestModel,
118        >,
119    ) -> Result<(), Error<ConfirmError>>;
120
121    /// DELETE /organizations/{orgId}/users/{id}/delete-account
122    async fn delete_account<'a>(
123        &self,
124        org_id: uuid::Uuid,
125        id: uuid::Uuid,
126    ) -> Result<(), Error<DeleteAccountError>>;
127
128    /// GET /organizations/{orgId}/users/{id}
129    async fn get<'a>(
130        &self,
131        org_id: uuid::Uuid,
132        id: uuid::Uuid,
133        include_groups: Option<bool>,
134    ) -> Result<models::OrganizationUserDetailsResponseModel, Error<GetError>>;
135
136    /// POST /organizations/{orgId}/users/account-recovery-details
137    async fn get_account_recovery_details<'a>(
138        &self,
139        org_id: uuid::Uuid,
140        organization_user_bulk_request_model: Option<models::OrganizationUserBulkRequestModel>,
141    ) -> Result<
142        models::OrganizationUserResetPasswordDetailsResponseModelListResponseModel,
143        Error<GetAccountRecoveryDetailsError>,
144    >;
145
146    /// GET /organizations/{orgId}/users
147    async fn get_all<'a>(
148        &self,
149        org_id: uuid::Uuid,
150        include_groups: Option<bool>,
151        include_collections: Option<bool>,
152    ) -> Result<models::OrganizationUserUserDetailsResponseModelListResponseModel, Error<GetAllError>>;
153
154    /// GET /organizations/{orgId}/users/mini-details
155    async fn get_mini_details<'a>(
156        &self,
157        org_id: uuid::Uuid,
158    ) -> Result<
159        models::OrganizationUserUserMiniDetailsResponseModelListResponseModel,
160        Error<GetMiniDetailsError>,
161    >;
162
163    /// GET /organizations/{orgId}/users/{id}/reset-password-details
164    async fn get_reset_password_details<'a>(
165        &self,
166        org_id: uuid::Uuid,
167        id: uuid::Uuid,
168    ) -> Result<
169        models::OrganizationUserResetPasswordDetailsResponseModel,
170        Error<GetResetPasswordDetailsError>,
171    >;
172
173    /// POST /organizations/{orgId}/users/invite
174    async fn invite<'a>(
175        &self,
176        org_id: uuid::Uuid,
177        organization_user_invite_request_model: Option<models::OrganizationUserInviteRequestModel>,
178    ) -> Result<(), Error<InviteError>>;
179
180    /// PUT /organizations/{orgId}/users/{id}
181    async fn put<'a>(
182        &self,
183        org_id: uuid::Uuid,
184        id: uuid::Uuid,
185        organization_user_update_request_model: Option<models::OrganizationUserUpdateRequestModel>,
186    ) -> Result<(), Error<PutError>>;
187
188    /// PUT /organizations/{orgId}/users/{id}/reset-password
189    async fn put_reset_password<'a>(
190        &self,
191        org_id: uuid::Uuid,
192        id: uuid::Uuid,
193        organization_user_reset_password_request_model: Option<
194            models::OrganizationUserResetPasswordRequestModel,
195        >,
196    ) -> Result<(), Error<PutResetPasswordError>>;
197
198    /// PUT /organizations/{orgId}/users/{userId}/reset-password-enrollment
199    async fn put_reset_password_enrollment<'a>(
200        &self,
201        org_id: uuid::Uuid,
202        user_id: uuid::Uuid,
203        organization_user_reset_password_enrollment_request_model: Option<
204            models::OrganizationUserResetPasswordEnrollmentRequestModel,
205        >,
206    ) -> Result<(), Error<PutResetPasswordEnrollmentError>>;
207
208    /// POST /organizations/{orgId}/users/{id}/reinvite
209    async fn reinvite<'a>(
210        &self,
211        org_id: uuid::Uuid,
212        id: uuid::Uuid,
213    ) -> Result<(), Error<ReinviteError>>;
214
215    /// DELETE /organizations/{orgId}/users/{id}
216    async fn remove<'a>(
217        &self,
218        org_id: uuid::Uuid,
219        id: uuid::Uuid,
220    ) -> Result<(), Error<RemoveError>>;
221
222    /// PUT /organizations/{orgId}/users/{id}/restore
223    async fn restore<'a>(
224        &self,
225        org_id: uuid::Uuid,
226        id: uuid::Uuid,
227    ) -> Result<(), Error<RestoreError>>;
228
229    /// PUT /organizations/{orgId}/users/{id}/revoke
230    async fn revoke<'a>(
231        &self,
232        org_id: uuid::Uuid,
233        id: uuid::Uuid,
234    ) -> Result<(), Error<RevokeError>>;
235
236    /// POST /organizations/{orgId}/users/public-keys
237    async fn user_public_keys<'a>(
238        &self,
239        org_id: uuid::Uuid,
240        organization_user_bulk_request_model: Option<models::OrganizationUserBulkRequestModel>,
241    ) -> Result<
242        models::OrganizationUserPublicKeyResponseModelListResponseModel,
243        Error<UserPublicKeysError>,
244    >;
245}
246
247pub struct OrganizationUsersApiClient {
248    configuration: Arc<configuration::Configuration>,
249}
250
251impl OrganizationUsersApiClient {
252    pub fn new(configuration: Arc<configuration::Configuration>) -> Self {
253        Self { configuration }
254    }
255}
256
257#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
258#[cfg_attr(not(target_arch = "wasm32"), async_trait)]
259impl OrganizationUsersApi for OrganizationUsersApiClient {
260    async fn accept<'a>(
261        &self,
262        org_id: uuid::Uuid,
263        organization_user_id: uuid::Uuid,
264        organization_user_accept_request_model: Option<models::OrganizationUserAcceptRequestModel>,
265    ) -> Result<(), Error<AcceptError>> {
266        let local_var_configuration = &self.configuration;
267
268        let local_var_client = &local_var_configuration.client;
269
270        let local_var_uri_str = format!(
271            "{}/organizations/{orgId}/users/{organizationUserId}/accept",
272            local_var_configuration.base_path,
273            orgId = org_id,
274            organizationUserId = organization_user_id
275        );
276        let mut local_var_req_builder =
277            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
278
279        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
280            local_var_req_builder = local_var_req_builder
281                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
282        }
283        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
284            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
285        };
286        local_var_req_builder = local_var_req_builder.json(&organization_user_accept_request_model);
287
288        let local_var_req = local_var_req_builder.build()?;
289        let local_var_resp = local_var_client.execute(local_var_req).await?;
290
291        let local_var_status = local_var_resp.status();
292        let local_var_content = local_var_resp.text().await?;
293
294        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
295            Ok(())
296        } else {
297            let local_var_entity: Option<AcceptError> =
298                serde_json::from_str(&local_var_content).ok();
299            let local_var_error = ResponseContent {
300                status: local_var_status,
301                content: local_var_content,
302                entity: local_var_entity,
303            };
304            Err(Error::ResponseError(local_var_error))
305        }
306    }
307
308    async fn accept_init<'a>(
309        &self,
310        org_id: uuid::Uuid,
311        organization_user_id: uuid::Uuid,
312        organization_user_accept_init_request_model: Option<
313            models::OrganizationUserAcceptInitRequestModel,
314        >,
315    ) -> Result<(), Error<AcceptInitError>> {
316        let local_var_configuration = &self.configuration;
317
318        let local_var_client = &local_var_configuration.client;
319
320        let local_var_uri_str = format!(
321            "{}/organizations/{orgId}/users/{organizationUserId}/accept-init",
322            local_var_configuration.base_path,
323            orgId = org_id,
324            organizationUserId = organization_user_id
325        );
326        let mut local_var_req_builder =
327            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
328
329        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
330            local_var_req_builder = local_var_req_builder
331                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
332        }
333        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
334            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
335        };
336        local_var_req_builder =
337            local_var_req_builder.json(&organization_user_accept_init_request_model);
338
339        let local_var_req = local_var_req_builder.build()?;
340        let local_var_resp = local_var_client.execute(local_var_req).await?;
341
342        let local_var_status = local_var_resp.status();
343        let local_var_content = local_var_resp.text().await?;
344
345        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
346            Ok(())
347        } else {
348            let local_var_entity: Option<AcceptInitError> =
349                serde_json::from_str(&local_var_content).ok();
350            let local_var_error = ResponseContent {
351                status: local_var_status,
352                content: local_var_content,
353                entity: local_var_entity,
354            };
355            Err(Error::ResponseError(local_var_error))
356        }
357    }
358
359    async fn automatically_confirm_organization_user<'a>(
360        &self,
361        org_id: uuid::Uuid,
362        id: uuid::Uuid,
363        organization_user_confirm_request_model: Option<
364            models::OrganizationUserConfirmRequestModel,
365        >,
366    ) -> Result<(), Error<AutomaticallyConfirmOrganizationUserError>> {
367        let local_var_configuration = &self.configuration;
368
369        let local_var_client = &local_var_configuration.client;
370
371        let local_var_uri_str = format!(
372            "{}/organizations/{orgId}/users/{id}/auto-confirm",
373            local_var_configuration.base_path,
374            orgId = org_id,
375            id = id
376        );
377        let mut local_var_req_builder =
378            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
379
380        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
381            local_var_req_builder = local_var_req_builder
382                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
383        }
384        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
385            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
386        };
387        local_var_req_builder =
388            local_var_req_builder.json(&organization_user_confirm_request_model);
389
390        let local_var_req = local_var_req_builder.build()?;
391        let local_var_resp = local_var_client.execute(local_var_req).await?;
392
393        let local_var_status = local_var_resp.status();
394        let local_var_content = local_var_resp.text().await?;
395
396        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
397            Ok(())
398        } else {
399            let local_var_entity: Option<AutomaticallyConfirmOrganizationUserError> =
400                serde_json::from_str(&local_var_content).ok();
401            let local_var_error = ResponseContent {
402                status: local_var_status,
403                content: local_var_content,
404                entity: local_var_entity,
405            };
406            Err(Error::ResponseError(local_var_error))
407        }
408    }
409
410    async fn bulk_confirm<'a>(
411        &self,
412        org_id: uuid::Uuid,
413        organization_user_bulk_confirm_request_model: Option<
414            models::OrganizationUserBulkConfirmRequestModel,
415        >,
416    ) -> Result<models::OrganizationUserBulkResponseModelListResponseModel, Error<BulkConfirmError>>
417    {
418        let local_var_configuration = &self.configuration;
419
420        let local_var_client = &local_var_configuration.client;
421
422        let local_var_uri_str = format!(
423            "{}/organizations/{orgId}/users/confirm",
424            local_var_configuration.base_path,
425            orgId = org_id
426        );
427        let mut local_var_req_builder =
428            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
429
430        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
431            local_var_req_builder = local_var_req_builder
432                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
433        }
434        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
435            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
436        };
437        local_var_req_builder =
438            local_var_req_builder.json(&organization_user_bulk_confirm_request_model);
439
440        let local_var_req = local_var_req_builder.build()?;
441        let local_var_resp = local_var_client.execute(local_var_req).await?;
442
443        let local_var_status = local_var_resp.status();
444        let local_var_content_type = local_var_resp
445            .headers()
446            .get("content-type")
447            .and_then(|v| v.to_str().ok())
448            .unwrap_or("application/octet-stream");
449        let local_var_content_type = super::ContentType::from(local_var_content_type);
450        let local_var_content = local_var_resp.text().await?;
451
452        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
453            match local_var_content_type {
454                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
455                ContentType::Text => {
456                    return Err(Error::from(serde_json::Error::custom(
457                        "Received `text/plain` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`",
458                    )));
459                }
460                ContentType::Unsupported(local_var_unknown_type) => {
461                    return Err(Error::from(serde_json::Error::custom(format!(
462                        "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`"
463                    ))));
464                }
465            }
466        } else {
467            let local_var_entity: Option<BulkConfirmError> =
468                serde_json::from_str(&local_var_content).ok();
469            let local_var_error = ResponseContent {
470                status: local_var_status,
471                content: local_var_content,
472                entity: local_var_entity,
473            };
474            Err(Error::ResponseError(local_var_error))
475        }
476    }
477
478    async fn bulk_delete_account<'a>(
479        &self,
480        org_id: uuid::Uuid,
481        organization_user_bulk_request_model: Option<models::OrganizationUserBulkRequestModel>,
482    ) -> Result<
483        models::OrganizationUserBulkResponseModelListResponseModel,
484        Error<BulkDeleteAccountError>,
485    > {
486        let local_var_configuration = &self.configuration;
487
488        let local_var_client = &local_var_configuration.client;
489
490        let local_var_uri_str = format!(
491            "{}/organizations/{orgId}/users/delete-account",
492            local_var_configuration.base_path,
493            orgId = org_id
494        );
495        let mut local_var_req_builder =
496            local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
497
498        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
499            local_var_req_builder = local_var_req_builder
500                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
501        }
502        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
503            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
504        };
505        local_var_req_builder = local_var_req_builder.json(&organization_user_bulk_request_model);
506
507        let local_var_req = local_var_req_builder.build()?;
508        let local_var_resp = local_var_client.execute(local_var_req).await?;
509
510        let local_var_status = local_var_resp.status();
511        let local_var_content_type = local_var_resp
512            .headers()
513            .get("content-type")
514            .and_then(|v| v.to_str().ok())
515            .unwrap_or("application/octet-stream");
516        let local_var_content_type = super::ContentType::from(local_var_content_type);
517        let local_var_content = local_var_resp.text().await?;
518
519        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
520            match local_var_content_type {
521                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
522                ContentType::Text => {
523                    return Err(Error::from(serde_json::Error::custom(
524                        "Received `text/plain` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`",
525                    )));
526                }
527                ContentType::Unsupported(local_var_unknown_type) => {
528                    return Err(Error::from(serde_json::Error::custom(format!(
529                        "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`"
530                    ))));
531                }
532            }
533        } else {
534            let local_var_entity: Option<BulkDeleteAccountError> =
535                serde_json::from_str(&local_var_content).ok();
536            let local_var_error = ResponseContent {
537                status: local_var_status,
538                content: local_var_content,
539                entity: local_var_entity,
540            };
541            Err(Error::ResponseError(local_var_error))
542        }
543    }
544
545    async fn bulk_enable_secrets_manager<'a>(
546        &self,
547        org_id: uuid::Uuid,
548        organization_user_bulk_request_model: Option<models::OrganizationUserBulkRequestModel>,
549    ) -> Result<(), Error<BulkEnableSecretsManagerError>> {
550        let local_var_configuration = &self.configuration;
551
552        let local_var_client = &local_var_configuration.client;
553
554        let local_var_uri_str = format!(
555            "{}/organizations/{orgId}/users/enable-secrets-manager",
556            local_var_configuration.base_path,
557            orgId = org_id
558        );
559        let mut local_var_req_builder =
560            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
561
562        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
563            local_var_req_builder = local_var_req_builder
564                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
565        }
566        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
567            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
568        };
569        local_var_req_builder = local_var_req_builder.json(&organization_user_bulk_request_model);
570
571        let local_var_req = local_var_req_builder.build()?;
572        let local_var_resp = local_var_client.execute(local_var_req).await?;
573
574        let local_var_status = local_var_resp.status();
575        let local_var_content = local_var_resp.text().await?;
576
577        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
578            Ok(())
579        } else {
580            let local_var_entity: Option<BulkEnableSecretsManagerError> =
581                serde_json::from_str(&local_var_content).ok();
582            let local_var_error = ResponseContent {
583                status: local_var_status,
584                content: local_var_content,
585                entity: local_var_entity,
586            };
587            Err(Error::ResponseError(local_var_error))
588        }
589    }
590
591    async fn bulk_reinvite<'a>(
592        &self,
593        org_id: uuid::Uuid,
594        organization_user_bulk_request_model: Option<models::OrganizationUserBulkRequestModel>,
595    ) -> Result<models::OrganizationUserBulkResponseModelListResponseModel, Error<BulkReinviteError>>
596    {
597        let local_var_configuration = &self.configuration;
598
599        let local_var_client = &local_var_configuration.client;
600
601        let local_var_uri_str = format!(
602            "{}/organizations/{orgId}/users/reinvite",
603            local_var_configuration.base_path,
604            orgId = org_id
605        );
606        let mut local_var_req_builder =
607            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
608
609        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
610            local_var_req_builder = local_var_req_builder
611                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
612        }
613        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
614            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
615        };
616        local_var_req_builder = local_var_req_builder.json(&organization_user_bulk_request_model);
617
618        let local_var_req = local_var_req_builder.build()?;
619        let local_var_resp = local_var_client.execute(local_var_req).await?;
620
621        let local_var_status = local_var_resp.status();
622        let local_var_content_type = local_var_resp
623            .headers()
624            .get("content-type")
625            .and_then(|v| v.to_str().ok())
626            .unwrap_or("application/octet-stream");
627        let local_var_content_type = super::ContentType::from(local_var_content_type);
628        let local_var_content = local_var_resp.text().await?;
629
630        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
631            match local_var_content_type {
632                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
633                ContentType::Text => {
634                    return Err(Error::from(serde_json::Error::custom(
635                        "Received `text/plain` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`",
636                    )));
637                }
638                ContentType::Unsupported(local_var_unknown_type) => {
639                    return Err(Error::from(serde_json::Error::custom(format!(
640                        "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`"
641                    ))));
642                }
643            }
644        } else {
645            let local_var_entity: Option<BulkReinviteError> =
646                serde_json::from_str(&local_var_content).ok();
647            let local_var_error = ResponseContent {
648                status: local_var_status,
649                content: local_var_content,
650                entity: local_var_entity,
651            };
652            Err(Error::ResponseError(local_var_error))
653        }
654    }
655
656    async fn bulk_remove<'a>(
657        &self,
658        org_id: uuid::Uuid,
659        organization_user_bulk_request_model: Option<models::OrganizationUserBulkRequestModel>,
660    ) -> Result<models::OrganizationUserBulkResponseModelListResponseModel, Error<BulkRemoveError>>
661    {
662        let local_var_configuration = &self.configuration;
663
664        let local_var_client = &local_var_configuration.client;
665
666        let local_var_uri_str = format!(
667            "{}/organizations/{orgId}/users",
668            local_var_configuration.base_path,
669            orgId = org_id
670        );
671        let mut local_var_req_builder =
672            local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
673
674        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
675            local_var_req_builder = local_var_req_builder
676                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
677        }
678        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
679            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
680        };
681        local_var_req_builder = local_var_req_builder.json(&organization_user_bulk_request_model);
682
683        let local_var_req = local_var_req_builder.build()?;
684        let local_var_resp = local_var_client.execute(local_var_req).await?;
685
686        let local_var_status = local_var_resp.status();
687        let local_var_content_type = local_var_resp
688            .headers()
689            .get("content-type")
690            .and_then(|v| v.to_str().ok())
691            .unwrap_or("application/octet-stream");
692        let local_var_content_type = super::ContentType::from(local_var_content_type);
693        let local_var_content = local_var_resp.text().await?;
694
695        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
696            match local_var_content_type {
697                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
698                ContentType::Text => {
699                    return Err(Error::from(serde_json::Error::custom(
700                        "Received `text/plain` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`",
701                    )));
702                }
703                ContentType::Unsupported(local_var_unknown_type) => {
704                    return Err(Error::from(serde_json::Error::custom(format!(
705                        "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`"
706                    ))));
707                }
708            }
709        } else {
710            let local_var_entity: Option<BulkRemoveError> =
711                serde_json::from_str(&local_var_content).ok();
712            let local_var_error = ResponseContent {
713                status: local_var_status,
714                content: local_var_content,
715                entity: local_var_entity,
716            };
717            Err(Error::ResponseError(local_var_error))
718        }
719    }
720
721    async fn bulk_restore<'a>(
722        &self,
723        org_id: uuid::Uuid,
724        organization_user_bulk_request_model: Option<models::OrganizationUserBulkRequestModel>,
725    ) -> Result<models::OrganizationUserBulkResponseModelListResponseModel, Error<BulkRestoreError>>
726    {
727        let local_var_configuration = &self.configuration;
728
729        let local_var_client = &local_var_configuration.client;
730
731        let local_var_uri_str = format!(
732            "{}/organizations/{orgId}/users/restore",
733            local_var_configuration.base_path,
734            orgId = org_id
735        );
736        let mut local_var_req_builder =
737            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
738
739        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
740            local_var_req_builder = local_var_req_builder
741                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
742        }
743        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
744            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
745        };
746        local_var_req_builder = local_var_req_builder.json(&organization_user_bulk_request_model);
747
748        let local_var_req = local_var_req_builder.build()?;
749        let local_var_resp = local_var_client.execute(local_var_req).await?;
750
751        let local_var_status = local_var_resp.status();
752        let local_var_content_type = local_var_resp
753            .headers()
754            .get("content-type")
755            .and_then(|v| v.to_str().ok())
756            .unwrap_or("application/octet-stream");
757        let local_var_content_type = super::ContentType::from(local_var_content_type);
758        let local_var_content = local_var_resp.text().await?;
759
760        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
761            match local_var_content_type {
762                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
763                ContentType::Text => {
764                    return Err(Error::from(serde_json::Error::custom(
765                        "Received `text/plain` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`",
766                    )));
767                }
768                ContentType::Unsupported(local_var_unknown_type) => {
769                    return Err(Error::from(serde_json::Error::custom(format!(
770                        "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`"
771                    ))));
772                }
773            }
774        } else {
775            let local_var_entity: Option<BulkRestoreError> =
776                serde_json::from_str(&local_var_content).ok();
777            let local_var_error = ResponseContent {
778                status: local_var_status,
779                content: local_var_content,
780                entity: local_var_entity,
781            };
782            Err(Error::ResponseError(local_var_error))
783        }
784    }
785
786    async fn bulk_revoke<'a>(
787        &self,
788        org_id: uuid::Uuid,
789        organization_user_bulk_request_model: Option<models::OrganizationUserBulkRequestModel>,
790    ) -> Result<models::OrganizationUserBulkResponseModelListResponseModel, Error<BulkRevokeError>>
791    {
792        let local_var_configuration = &self.configuration;
793
794        let local_var_client = &local_var_configuration.client;
795
796        let local_var_uri_str = format!(
797            "{}/organizations/{orgId}/users/revoke",
798            local_var_configuration.base_path,
799            orgId = org_id
800        );
801        let mut local_var_req_builder =
802            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
803
804        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
805            local_var_req_builder = local_var_req_builder
806                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
807        }
808        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
809            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
810        };
811        local_var_req_builder = local_var_req_builder.json(&organization_user_bulk_request_model);
812
813        let local_var_req = local_var_req_builder.build()?;
814        let local_var_resp = local_var_client.execute(local_var_req).await?;
815
816        let local_var_status = local_var_resp.status();
817        let local_var_content_type = local_var_resp
818            .headers()
819            .get("content-type")
820            .and_then(|v| v.to_str().ok())
821            .unwrap_or("application/octet-stream");
822        let local_var_content_type = super::ContentType::from(local_var_content_type);
823        let local_var_content = local_var_resp.text().await?;
824
825        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
826            match local_var_content_type {
827                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
828                ContentType::Text => {
829                    return Err(Error::from(serde_json::Error::custom(
830                        "Received `text/plain` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`",
831                    )));
832                }
833                ContentType::Unsupported(local_var_unknown_type) => {
834                    return Err(Error::from(serde_json::Error::custom(format!(
835                        "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::OrganizationUserBulkResponseModelListResponseModel`"
836                    ))));
837                }
838            }
839        } else {
840            let local_var_entity: Option<BulkRevokeError> =
841                serde_json::from_str(&local_var_content).ok();
842            let local_var_error = ResponseContent {
843                status: local_var_status,
844                content: local_var_content,
845                entity: local_var_entity,
846            };
847            Err(Error::ResponseError(local_var_error))
848        }
849    }
850
851    async fn confirm<'a>(
852        &self,
853        org_id: uuid::Uuid,
854        id: uuid::Uuid,
855        organization_user_confirm_request_model: Option<
856            models::OrganizationUserConfirmRequestModel,
857        >,
858    ) -> Result<(), Error<ConfirmError>> {
859        let local_var_configuration = &self.configuration;
860
861        let local_var_client = &local_var_configuration.client;
862
863        let local_var_uri_str = format!(
864            "{}/organizations/{orgId}/users/{id}/confirm",
865            local_var_configuration.base_path,
866            orgId = org_id,
867            id = id
868        );
869        let mut local_var_req_builder =
870            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
871
872        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
873            local_var_req_builder = local_var_req_builder
874                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
875        }
876        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
877            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
878        };
879        local_var_req_builder =
880            local_var_req_builder.json(&organization_user_confirm_request_model);
881
882        let local_var_req = local_var_req_builder.build()?;
883        let local_var_resp = local_var_client.execute(local_var_req).await?;
884
885        let local_var_status = local_var_resp.status();
886        let local_var_content = local_var_resp.text().await?;
887
888        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
889            Ok(())
890        } else {
891            let local_var_entity: Option<ConfirmError> =
892                serde_json::from_str(&local_var_content).ok();
893            let local_var_error = ResponseContent {
894                status: local_var_status,
895                content: local_var_content,
896                entity: local_var_entity,
897            };
898            Err(Error::ResponseError(local_var_error))
899        }
900    }
901
902    async fn delete_account<'a>(
903        &self,
904        org_id: uuid::Uuid,
905        id: uuid::Uuid,
906    ) -> Result<(), Error<DeleteAccountError>> {
907        let local_var_configuration = &self.configuration;
908
909        let local_var_client = &local_var_configuration.client;
910
911        let local_var_uri_str = format!(
912            "{}/organizations/{orgId}/users/{id}/delete-account",
913            local_var_configuration.base_path,
914            orgId = org_id,
915            id = id
916        );
917        let mut local_var_req_builder =
918            local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
919
920        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
921            local_var_req_builder = local_var_req_builder
922                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
923        }
924        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
925            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
926        };
927
928        let local_var_req = local_var_req_builder.build()?;
929        let local_var_resp = local_var_client.execute(local_var_req).await?;
930
931        let local_var_status = local_var_resp.status();
932        let local_var_content = local_var_resp.text().await?;
933
934        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
935            Ok(())
936        } else {
937            let local_var_entity: Option<DeleteAccountError> =
938                serde_json::from_str(&local_var_content).ok();
939            let local_var_error = ResponseContent {
940                status: local_var_status,
941                content: local_var_content,
942                entity: local_var_entity,
943            };
944            Err(Error::ResponseError(local_var_error))
945        }
946    }
947
948    async fn get<'a>(
949        &self,
950        org_id: uuid::Uuid,
951        id: uuid::Uuid,
952        include_groups: Option<bool>,
953    ) -> Result<models::OrganizationUserDetailsResponseModel, Error<GetError>> {
954        let local_var_configuration = &self.configuration;
955
956        let local_var_client = &local_var_configuration.client;
957
958        let local_var_uri_str = format!(
959            "{}/organizations/{orgId}/users/{id}",
960            local_var_configuration.base_path,
961            orgId = org_id,
962            id = id
963        );
964        let mut local_var_req_builder =
965            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
966
967        if let Some(ref param_value) = include_groups {
968            local_var_req_builder =
969                local_var_req_builder.query(&[("includeGroups", &param_value.to_string())]);
970        }
971        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
972            local_var_req_builder = local_var_req_builder
973                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
974        }
975        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
976            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
977        };
978
979        let local_var_req = local_var_req_builder.build()?;
980        let local_var_resp = local_var_client.execute(local_var_req).await?;
981
982        let local_var_status = local_var_resp.status();
983        let local_var_content_type = local_var_resp
984            .headers()
985            .get("content-type")
986            .and_then(|v| v.to_str().ok())
987            .unwrap_or("application/octet-stream");
988        let local_var_content_type = super::ContentType::from(local_var_content_type);
989        let local_var_content = local_var_resp.text().await?;
990
991        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
992            match local_var_content_type {
993                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
994                ContentType::Text => {
995                    return Err(Error::from(serde_json::Error::custom(
996                        "Received `text/plain` content type response that cannot be converted to `models::OrganizationUserDetailsResponseModel`",
997                    )));
998                }
999                ContentType::Unsupported(local_var_unknown_type) => {
1000                    return Err(Error::from(serde_json::Error::custom(format!(
1001                        "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::OrganizationUserDetailsResponseModel`"
1002                    ))));
1003                }
1004            }
1005        } else {
1006            let local_var_entity: Option<GetError> = serde_json::from_str(&local_var_content).ok();
1007            let local_var_error = ResponseContent {
1008                status: local_var_status,
1009                content: local_var_content,
1010                entity: local_var_entity,
1011            };
1012            Err(Error::ResponseError(local_var_error))
1013        }
1014    }
1015
1016    async fn get_account_recovery_details<'a>(
1017        &self,
1018        org_id: uuid::Uuid,
1019        organization_user_bulk_request_model: Option<models::OrganizationUserBulkRequestModel>,
1020    ) -> Result<
1021        models::OrganizationUserResetPasswordDetailsResponseModelListResponseModel,
1022        Error<GetAccountRecoveryDetailsError>,
1023    > {
1024        let local_var_configuration = &self.configuration;
1025
1026        let local_var_client = &local_var_configuration.client;
1027
1028        let local_var_uri_str = format!(
1029            "{}/organizations/{orgId}/users/account-recovery-details",
1030            local_var_configuration.base_path,
1031            orgId = org_id
1032        );
1033        let mut local_var_req_builder =
1034            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1035
1036        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1037            local_var_req_builder = local_var_req_builder
1038                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1039        }
1040        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
1041            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1042        };
1043        local_var_req_builder = local_var_req_builder.json(&organization_user_bulk_request_model);
1044
1045        let local_var_req = local_var_req_builder.build()?;
1046        let local_var_resp = local_var_client.execute(local_var_req).await?;
1047
1048        let local_var_status = local_var_resp.status();
1049        let local_var_content_type = local_var_resp
1050            .headers()
1051            .get("content-type")
1052            .and_then(|v| v.to_str().ok())
1053            .unwrap_or("application/octet-stream");
1054        let local_var_content_type = super::ContentType::from(local_var_content_type);
1055        let local_var_content = local_var_resp.text().await?;
1056
1057        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1058            match local_var_content_type {
1059                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
1060                ContentType::Text => {
1061                    return Err(Error::from(serde_json::Error::custom(
1062                        "Received `text/plain` content type response that cannot be converted to `models::OrganizationUserResetPasswordDetailsResponseModelListResponseModel`",
1063                    )));
1064                }
1065                ContentType::Unsupported(local_var_unknown_type) => {
1066                    return Err(Error::from(serde_json::Error::custom(format!(
1067                        "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::OrganizationUserResetPasswordDetailsResponseModelListResponseModel`"
1068                    ))));
1069                }
1070            }
1071        } else {
1072            let local_var_entity: Option<GetAccountRecoveryDetailsError> =
1073                serde_json::from_str(&local_var_content).ok();
1074            let local_var_error = ResponseContent {
1075                status: local_var_status,
1076                content: local_var_content,
1077                entity: local_var_entity,
1078            };
1079            Err(Error::ResponseError(local_var_error))
1080        }
1081    }
1082
1083    async fn get_all<'a>(
1084        &self,
1085        org_id: uuid::Uuid,
1086        include_groups: Option<bool>,
1087        include_collections: Option<bool>,
1088    ) -> Result<models::OrganizationUserUserDetailsResponseModelListResponseModel, Error<GetAllError>>
1089    {
1090        let local_var_configuration = &self.configuration;
1091
1092        let local_var_client = &local_var_configuration.client;
1093
1094        let local_var_uri_str = format!(
1095            "{}/organizations/{orgId}/users",
1096            local_var_configuration.base_path,
1097            orgId = org_id
1098        );
1099        let mut local_var_req_builder =
1100            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1101
1102        if let Some(ref param_value) = include_groups {
1103            local_var_req_builder =
1104                local_var_req_builder.query(&[("includeGroups", &param_value.to_string())]);
1105        }
1106        if let Some(ref param_value) = include_collections {
1107            local_var_req_builder =
1108                local_var_req_builder.query(&[("includeCollections", &param_value.to_string())]);
1109        }
1110        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1111            local_var_req_builder = local_var_req_builder
1112                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1113        }
1114        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
1115            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1116        };
1117
1118        let local_var_req = local_var_req_builder.build()?;
1119        let local_var_resp = local_var_client.execute(local_var_req).await?;
1120
1121        let local_var_status = local_var_resp.status();
1122        let local_var_content_type = local_var_resp
1123            .headers()
1124            .get("content-type")
1125            .and_then(|v| v.to_str().ok())
1126            .unwrap_or("application/octet-stream");
1127        let local_var_content_type = super::ContentType::from(local_var_content_type);
1128        let local_var_content = local_var_resp.text().await?;
1129
1130        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1131            match local_var_content_type {
1132                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
1133                ContentType::Text => {
1134                    return Err(Error::from(serde_json::Error::custom(
1135                        "Received `text/plain` content type response that cannot be converted to `models::OrganizationUserUserDetailsResponseModelListResponseModel`",
1136                    )));
1137                }
1138                ContentType::Unsupported(local_var_unknown_type) => {
1139                    return Err(Error::from(serde_json::Error::custom(format!(
1140                        "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::OrganizationUserUserDetailsResponseModelListResponseModel`"
1141                    ))));
1142                }
1143            }
1144        } else {
1145            let local_var_entity: Option<GetAllError> =
1146                serde_json::from_str(&local_var_content).ok();
1147            let local_var_error = ResponseContent {
1148                status: local_var_status,
1149                content: local_var_content,
1150                entity: local_var_entity,
1151            };
1152            Err(Error::ResponseError(local_var_error))
1153        }
1154    }
1155
1156    async fn get_mini_details<'a>(
1157        &self,
1158        org_id: uuid::Uuid,
1159    ) -> Result<
1160        models::OrganizationUserUserMiniDetailsResponseModelListResponseModel,
1161        Error<GetMiniDetailsError>,
1162    > {
1163        let local_var_configuration = &self.configuration;
1164
1165        let local_var_client = &local_var_configuration.client;
1166
1167        let local_var_uri_str = format!(
1168            "{}/organizations/{orgId}/users/mini-details",
1169            local_var_configuration.base_path,
1170            orgId = org_id
1171        );
1172        let mut local_var_req_builder =
1173            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1174
1175        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1176            local_var_req_builder = local_var_req_builder
1177                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1178        }
1179        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
1180            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1181        };
1182
1183        let local_var_req = local_var_req_builder.build()?;
1184        let local_var_resp = local_var_client.execute(local_var_req).await?;
1185
1186        let local_var_status = local_var_resp.status();
1187        let local_var_content_type = local_var_resp
1188            .headers()
1189            .get("content-type")
1190            .and_then(|v| v.to_str().ok())
1191            .unwrap_or("application/octet-stream");
1192        let local_var_content_type = super::ContentType::from(local_var_content_type);
1193        let local_var_content = local_var_resp.text().await?;
1194
1195        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1196            match local_var_content_type {
1197                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
1198                ContentType::Text => {
1199                    return Err(Error::from(serde_json::Error::custom(
1200                        "Received `text/plain` content type response that cannot be converted to `models::OrganizationUserUserMiniDetailsResponseModelListResponseModel`",
1201                    )));
1202                }
1203                ContentType::Unsupported(local_var_unknown_type) => {
1204                    return Err(Error::from(serde_json::Error::custom(format!(
1205                        "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::OrganizationUserUserMiniDetailsResponseModelListResponseModel`"
1206                    ))));
1207                }
1208            }
1209        } else {
1210            let local_var_entity: Option<GetMiniDetailsError> =
1211                serde_json::from_str(&local_var_content).ok();
1212            let local_var_error = ResponseContent {
1213                status: local_var_status,
1214                content: local_var_content,
1215                entity: local_var_entity,
1216            };
1217            Err(Error::ResponseError(local_var_error))
1218        }
1219    }
1220
1221    async fn get_reset_password_details<'a>(
1222        &self,
1223        org_id: uuid::Uuid,
1224        id: uuid::Uuid,
1225    ) -> Result<
1226        models::OrganizationUserResetPasswordDetailsResponseModel,
1227        Error<GetResetPasswordDetailsError>,
1228    > {
1229        let local_var_configuration = &self.configuration;
1230
1231        let local_var_client = &local_var_configuration.client;
1232
1233        let local_var_uri_str = format!(
1234            "{}/organizations/{orgId}/users/{id}/reset-password-details",
1235            local_var_configuration.base_path,
1236            orgId = org_id,
1237            id = id
1238        );
1239        let mut local_var_req_builder =
1240            local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1241
1242        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1243            local_var_req_builder = local_var_req_builder
1244                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1245        }
1246        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
1247            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1248        };
1249
1250        let local_var_req = local_var_req_builder.build()?;
1251        let local_var_resp = local_var_client.execute(local_var_req).await?;
1252
1253        let local_var_status = local_var_resp.status();
1254        let local_var_content_type = local_var_resp
1255            .headers()
1256            .get("content-type")
1257            .and_then(|v| v.to_str().ok())
1258            .unwrap_or("application/octet-stream");
1259        let local_var_content_type = super::ContentType::from(local_var_content_type);
1260        let local_var_content = local_var_resp.text().await?;
1261
1262        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1263            match local_var_content_type {
1264                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
1265                ContentType::Text => {
1266                    return Err(Error::from(serde_json::Error::custom(
1267                        "Received `text/plain` content type response that cannot be converted to `models::OrganizationUserResetPasswordDetailsResponseModel`",
1268                    )));
1269                }
1270                ContentType::Unsupported(local_var_unknown_type) => {
1271                    return Err(Error::from(serde_json::Error::custom(format!(
1272                        "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::OrganizationUserResetPasswordDetailsResponseModel`"
1273                    ))));
1274                }
1275            }
1276        } else {
1277            let local_var_entity: Option<GetResetPasswordDetailsError> =
1278                serde_json::from_str(&local_var_content).ok();
1279            let local_var_error = ResponseContent {
1280                status: local_var_status,
1281                content: local_var_content,
1282                entity: local_var_entity,
1283            };
1284            Err(Error::ResponseError(local_var_error))
1285        }
1286    }
1287
1288    async fn invite<'a>(
1289        &self,
1290        org_id: uuid::Uuid,
1291        organization_user_invite_request_model: Option<models::OrganizationUserInviteRequestModel>,
1292    ) -> Result<(), Error<InviteError>> {
1293        let local_var_configuration = &self.configuration;
1294
1295        let local_var_client = &local_var_configuration.client;
1296
1297        let local_var_uri_str = format!(
1298            "{}/organizations/{orgId}/users/invite",
1299            local_var_configuration.base_path,
1300            orgId = org_id
1301        );
1302        let mut local_var_req_builder =
1303            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1304
1305        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1306            local_var_req_builder = local_var_req_builder
1307                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1308        }
1309        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
1310            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1311        };
1312        local_var_req_builder = local_var_req_builder.json(&organization_user_invite_request_model);
1313
1314        let local_var_req = local_var_req_builder.build()?;
1315        let local_var_resp = local_var_client.execute(local_var_req).await?;
1316
1317        let local_var_status = local_var_resp.status();
1318        let local_var_content = local_var_resp.text().await?;
1319
1320        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1321            Ok(())
1322        } else {
1323            let local_var_entity: Option<InviteError> =
1324                serde_json::from_str(&local_var_content).ok();
1325            let local_var_error = ResponseContent {
1326                status: local_var_status,
1327                content: local_var_content,
1328                entity: local_var_entity,
1329            };
1330            Err(Error::ResponseError(local_var_error))
1331        }
1332    }
1333
1334    async fn put<'a>(
1335        &self,
1336        org_id: uuid::Uuid,
1337        id: uuid::Uuid,
1338        organization_user_update_request_model: Option<models::OrganizationUserUpdateRequestModel>,
1339    ) -> Result<(), Error<PutError>> {
1340        let local_var_configuration = &self.configuration;
1341
1342        let local_var_client = &local_var_configuration.client;
1343
1344        let local_var_uri_str = format!(
1345            "{}/organizations/{orgId}/users/{id}",
1346            local_var_configuration.base_path,
1347            orgId = org_id,
1348            id = id
1349        );
1350        let mut local_var_req_builder =
1351            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1352
1353        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1354            local_var_req_builder = local_var_req_builder
1355                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1356        }
1357        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
1358            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1359        };
1360        local_var_req_builder = local_var_req_builder.json(&organization_user_update_request_model);
1361
1362        let local_var_req = local_var_req_builder.build()?;
1363        let local_var_resp = local_var_client.execute(local_var_req).await?;
1364
1365        let local_var_status = local_var_resp.status();
1366        let local_var_content = local_var_resp.text().await?;
1367
1368        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1369            Ok(())
1370        } else {
1371            let local_var_entity: Option<PutError> = serde_json::from_str(&local_var_content).ok();
1372            let local_var_error = ResponseContent {
1373                status: local_var_status,
1374                content: local_var_content,
1375                entity: local_var_entity,
1376            };
1377            Err(Error::ResponseError(local_var_error))
1378        }
1379    }
1380
1381    async fn put_reset_password<'a>(
1382        &self,
1383        org_id: uuid::Uuid,
1384        id: uuid::Uuid,
1385        organization_user_reset_password_request_model: Option<
1386            models::OrganizationUserResetPasswordRequestModel,
1387        >,
1388    ) -> Result<(), Error<PutResetPasswordError>> {
1389        let local_var_configuration = &self.configuration;
1390
1391        let local_var_client = &local_var_configuration.client;
1392
1393        let local_var_uri_str = format!(
1394            "{}/organizations/{orgId}/users/{id}/reset-password",
1395            local_var_configuration.base_path,
1396            orgId = org_id,
1397            id = id
1398        );
1399        let mut local_var_req_builder =
1400            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1401
1402        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1403            local_var_req_builder = local_var_req_builder
1404                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1405        }
1406        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
1407            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1408        };
1409        local_var_req_builder =
1410            local_var_req_builder.json(&organization_user_reset_password_request_model);
1411
1412        let local_var_req = local_var_req_builder.build()?;
1413        let local_var_resp = local_var_client.execute(local_var_req).await?;
1414
1415        let local_var_status = local_var_resp.status();
1416        let local_var_content = local_var_resp.text().await?;
1417
1418        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1419            Ok(())
1420        } else {
1421            let local_var_entity: Option<PutResetPasswordError> =
1422                serde_json::from_str(&local_var_content).ok();
1423            let local_var_error = ResponseContent {
1424                status: local_var_status,
1425                content: local_var_content,
1426                entity: local_var_entity,
1427            };
1428            Err(Error::ResponseError(local_var_error))
1429        }
1430    }
1431
1432    async fn put_reset_password_enrollment<'a>(
1433        &self,
1434        org_id: uuid::Uuid,
1435        user_id: uuid::Uuid,
1436        organization_user_reset_password_enrollment_request_model: Option<
1437            models::OrganizationUserResetPasswordEnrollmentRequestModel,
1438        >,
1439    ) -> Result<(), Error<PutResetPasswordEnrollmentError>> {
1440        let local_var_configuration = &self.configuration;
1441
1442        let local_var_client = &local_var_configuration.client;
1443
1444        let local_var_uri_str = format!(
1445            "{}/organizations/{orgId}/users/{userId}/reset-password-enrollment",
1446            local_var_configuration.base_path,
1447            orgId = org_id,
1448            userId = user_id
1449        );
1450        let mut local_var_req_builder =
1451            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1452
1453        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1454            local_var_req_builder = local_var_req_builder
1455                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1456        }
1457        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
1458            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1459        };
1460        local_var_req_builder =
1461            local_var_req_builder.json(&organization_user_reset_password_enrollment_request_model);
1462
1463        let local_var_req = local_var_req_builder.build()?;
1464        let local_var_resp = local_var_client.execute(local_var_req).await?;
1465
1466        let local_var_status = local_var_resp.status();
1467        let local_var_content = local_var_resp.text().await?;
1468
1469        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1470            Ok(())
1471        } else {
1472            let local_var_entity: Option<PutResetPasswordEnrollmentError> =
1473                serde_json::from_str(&local_var_content).ok();
1474            let local_var_error = ResponseContent {
1475                status: local_var_status,
1476                content: local_var_content,
1477                entity: local_var_entity,
1478            };
1479            Err(Error::ResponseError(local_var_error))
1480        }
1481    }
1482
1483    async fn reinvite<'a>(
1484        &self,
1485        org_id: uuid::Uuid,
1486        id: uuid::Uuid,
1487    ) -> Result<(), Error<ReinviteError>> {
1488        let local_var_configuration = &self.configuration;
1489
1490        let local_var_client = &local_var_configuration.client;
1491
1492        let local_var_uri_str = format!(
1493            "{}/organizations/{orgId}/users/{id}/reinvite",
1494            local_var_configuration.base_path,
1495            orgId = org_id,
1496            id = id
1497        );
1498        let mut local_var_req_builder =
1499            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1500
1501        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1502            local_var_req_builder = local_var_req_builder
1503                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1504        }
1505        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
1506            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1507        };
1508
1509        let local_var_req = local_var_req_builder.build()?;
1510        let local_var_resp = local_var_client.execute(local_var_req).await?;
1511
1512        let local_var_status = local_var_resp.status();
1513        let local_var_content = local_var_resp.text().await?;
1514
1515        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1516            Ok(())
1517        } else {
1518            let local_var_entity: Option<ReinviteError> =
1519                serde_json::from_str(&local_var_content).ok();
1520            let local_var_error = ResponseContent {
1521                status: local_var_status,
1522                content: local_var_content,
1523                entity: local_var_entity,
1524            };
1525            Err(Error::ResponseError(local_var_error))
1526        }
1527    }
1528
1529    async fn remove<'a>(
1530        &self,
1531        org_id: uuid::Uuid,
1532        id: uuid::Uuid,
1533    ) -> Result<(), Error<RemoveError>> {
1534        let local_var_configuration = &self.configuration;
1535
1536        let local_var_client = &local_var_configuration.client;
1537
1538        let local_var_uri_str = format!(
1539            "{}/organizations/{orgId}/users/{id}",
1540            local_var_configuration.base_path,
1541            orgId = org_id,
1542            id = id
1543        );
1544        let mut local_var_req_builder =
1545            local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1546
1547        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1548            local_var_req_builder = local_var_req_builder
1549                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1550        }
1551        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
1552            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1553        };
1554
1555        let local_var_req = local_var_req_builder.build()?;
1556        let local_var_resp = local_var_client.execute(local_var_req).await?;
1557
1558        let local_var_status = local_var_resp.status();
1559        let local_var_content = local_var_resp.text().await?;
1560
1561        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1562            Ok(())
1563        } else {
1564            let local_var_entity: Option<RemoveError> =
1565                serde_json::from_str(&local_var_content).ok();
1566            let local_var_error = ResponseContent {
1567                status: local_var_status,
1568                content: local_var_content,
1569                entity: local_var_entity,
1570            };
1571            Err(Error::ResponseError(local_var_error))
1572        }
1573    }
1574
1575    async fn restore<'a>(
1576        &self,
1577        org_id: uuid::Uuid,
1578        id: uuid::Uuid,
1579    ) -> Result<(), Error<RestoreError>> {
1580        let local_var_configuration = &self.configuration;
1581
1582        let local_var_client = &local_var_configuration.client;
1583
1584        let local_var_uri_str = format!(
1585            "{}/organizations/{orgId}/users/{id}/restore",
1586            local_var_configuration.base_path,
1587            orgId = org_id,
1588            id = id
1589        );
1590        let mut local_var_req_builder =
1591            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1592
1593        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1594            local_var_req_builder = local_var_req_builder
1595                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1596        }
1597        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
1598            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1599        };
1600
1601        let local_var_req = local_var_req_builder.build()?;
1602        let local_var_resp = local_var_client.execute(local_var_req).await?;
1603
1604        let local_var_status = local_var_resp.status();
1605        let local_var_content = local_var_resp.text().await?;
1606
1607        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1608            Ok(())
1609        } else {
1610            let local_var_entity: Option<RestoreError> =
1611                serde_json::from_str(&local_var_content).ok();
1612            let local_var_error = ResponseContent {
1613                status: local_var_status,
1614                content: local_var_content,
1615                entity: local_var_entity,
1616            };
1617            Err(Error::ResponseError(local_var_error))
1618        }
1619    }
1620
1621    async fn revoke<'a>(
1622        &self,
1623        org_id: uuid::Uuid,
1624        id: uuid::Uuid,
1625    ) -> Result<(), Error<RevokeError>> {
1626        let local_var_configuration = &self.configuration;
1627
1628        let local_var_client = &local_var_configuration.client;
1629
1630        let local_var_uri_str = format!(
1631            "{}/organizations/{orgId}/users/{id}/revoke",
1632            local_var_configuration.base_path,
1633            orgId = org_id,
1634            id = id
1635        );
1636        let mut local_var_req_builder =
1637            local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1638
1639        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1640            local_var_req_builder = local_var_req_builder
1641                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1642        }
1643        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
1644            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1645        };
1646
1647        let local_var_req = local_var_req_builder.build()?;
1648        let local_var_resp = local_var_client.execute(local_var_req).await?;
1649
1650        let local_var_status = local_var_resp.status();
1651        let local_var_content = local_var_resp.text().await?;
1652
1653        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1654            Ok(())
1655        } else {
1656            let local_var_entity: Option<RevokeError> =
1657                serde_json::from_str(&local_var_content).ok();
1658            let local_var_error = ResponseContent {
1659                status: local_var_status,
1660                content: local_var_content,
1661                entity: local_var_entity,
1662            };
1663            Err(Error::ResponseError(local_var_error))
1664        }
1665    }
1666
1667    async fn user_public_keys<'a>(
1668        &self,
1669        org_id: uuid::Uuid,
1670        organization_user_bulk_request_model: Option<models::OrganizationUserBulkRequestModel>,
1671    ) -> Result<
1672        models::OrganizationUserPublicKeyResponseModelListResponseModel,
1673        Error<UserPublicKeysError>,
1674    > {
1675        let local_var_configuration = &self.configuration;
1676
1677        let local_var_client = &local_var_configuration.client;
1678
1679        let local_var_uri_str = format!(
1680            "{}/organizations/{orgId}/users/public-keys",
1681            local_var_configuration.base_path,
1682            orgId = org_id
1683        );
1684        let mut local_var_req_builder =
1685            local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1686
1687        if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1688            local_var_req_builder = local_var_req_builder
1689                .header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1690        }
1691        if let Some(ref local_var_token) = local_var_configuration.oauth_access_token {
1692            local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1693        };
1694        local_var_req_builder = local_var_req_builder.json(&organization_user_bulk_request_model);
1695
1696        let local_var_req = local_var_req_builder.build()?;
1697        let local_var_resp = local_var_client.execute(local_var_req).await?;
1698
1699        let local_var_status = local_var_resp.status();
1700        let local_var_content_type = local_var_resp
1701            .headers()
1702            .get("content-type")
1703            .and_then(|v| v.to_str().ok())
1704            .unwrap_or("application/octet-stream");
1705        let local_var_content_type = super::ContentType::from(local_var_content_type);
1706        let local_var_content = local_var_resp.text().await?;
1707
1708        if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1709            match local_var_content_type {
1710                ContentType::Json => serde_json::from_str(&local_var_content).map_err(Error::from),
1711                ContentType::Text => {
1712                    return Err(Error::from(serde_json::Error::custom(
1713                        "Received `text/plain` content type response that cannot be converted to `models::OrganizationUserPublicKeyResponseModelListResponseModel`",
1714                    )));
1715                }
1716                ContentType::Unsupported(local_var_unknown_type) => {
1717                    return Err(Error::from(serde_json::Error::custom(format!(
1718                        "Received `{local_var_unknown_type}` content type response that cannot be converted to `models::OrganizationUserPublicKeyResponseModelListResponseModel`"
1719                    ))));
1720                }
1721            }
1722        } else {
1723            let local_var_entity: Option<UserPublicKeysError> =
1724                serde_json::from_str(&local_var_content).ok();
1725            let local_var_error = ResponseContent {
1726                status: local_var_status,
1727                content: local_var_content,
1728                entity: local_var_entity,
1729            };
1730            Err(Error::ResponseError(local_var_error))
1731        }
1732    }
1733}
1734
1735/// struct for typed errors of method [`OrganizationUsersApi::accept`]
1736#[derive(Debug, Clone, Serialize, Deserialize)]
1737#[serde(untagged)]
1738pub enum AcceptError {
1739    UnknownValue(serde_json::Value),
1740}
1741/// struct for typed errors of method [`OrganizationUsersApi::accept_init`]
1742#[derive(Debug, Clone, Serialize, Deserialize)]
1743#[serde(untagged)]
1744pub enum AcceptInitError {
1745    UnknownValue(serde_json::Value),
1746}
1747/// struct for typed errors of method
1748/// [`OrganizationUsersApi::automatically_confirm_organization_user`]
1749#[derive(Debug, Clone, Serialize, Deserialize)]
1750#[serde(untagged)]
1751pub enum AutomaticallyConfirmOrganizationUserError {
1752    UnknownValue(serde_json::Value),
1753}
1754/// struct for typed errors of method [`OrganizationUsersApi::bulk_confirm`]
1755#[derive(Debug, Clone, Serialize, Deserialize)]
1756#[serde(untagged)]
1757pub enum BulkConfirmError {
1758    UnknownValue(serde_json::Value),
1759}
1760/// struct for typed errors of method [`OrganizationUsersApi::bulk_delete_account`]
1761#[derive(Debug, Clone, Serialize, Deserialize)]
1762#[serde(untagged)]
1763pub enum BulkDeleteAccountError {
1764    UnknownValue(serde_json::Value),
1765}
1766/// struct for typed errors of method [`OrganizationUsersApi::bulk_enable_secrets_manager`]
1767#[derive(Debug, Clone, Serialize, Deserialize)]
1768#[serde(untagged)]
1769pub enum BulkEnableSecretsManagerError {
1770    UnknownValue(serde_json::Value),
1771}
1772/// struct for typed errors of method [`OrganizationUsersApi::bulk_reinvite`]
1773#[derive(Debug, Clone, Serialize, Deserialize)]
1774#[serde(untagged)]
1775pub enum BulkReinviteError {
1776    UnknownValue(serde_json::Value),
1777}
1778/// struct for typed errors of method [`OrganizationUsersApi::bulk_remove`]
1779#[derive(Debug, Clone, Serialize, Deserialize)]
1780#[serde(untagged)]
1781pub enum BulkRemoveError {
1782    UnknownValue(serde_json::Value),
1783}
1784/// struct for typed errors of method [`OrganizationUsersApi::bulk_restore`]
1785#[derive(Debug, Clone, Serialize, Deserialize)]
1786#[serde(untagged)]
1787pub enum BulkRestoreError {
1788    UnknownValue(serde_json::Value),
1789}
1790/// struct for typed errors of method [`OrganizationUsersApi::bulk_revoke`]
1791#[derive(Debug, Clone, Serialize, Deserialize)]
1792#[serde(untagged)]
1793pub enum BulkRevokeError {
1794    UnknownValue(serde_json::Value),
1795}
1796/// struct for typed errors of method [`OrganizationUsersApi::confirm`]
1797#[derive(Debug, Clone, Serialize, Deserialize)]
1798#[serde(untagged)]
1799pub enum ConfirmError {
1800    UnknownValue(serde_json::Value),
1801}
1802/// struct for typed errors of method [`OrganizationUsersApi::delete_account`]
1803#[derive(Debug, Clone, Serialize, Deserialize)]
1804#[serde(untagged)]
1805pub enum DeleteAccountError {
1806    UnknownValue(serde_json::Value),
1807}
1808/// struct for typed errors of method [`OrganizationUsersApi::get`]
1809#[derive(Debug, Clone, Serialize, Deserialize)]
1810#[serde(untagged)]
1811pub enum GetError {
1812    UnknownValue(serde_json::Value),
1813}
1814/// struct for typed errors of method [`OrganizationUsersApi::get_account_recovery_details`]
1815#[derive(Debug, Clone, Serialize, Deserialize)]
1816#[serde(untagged)]
1817pub enum GetAccountRecoveryDetailsError {
1818    UnknownValue(serde_json::Value),
1819}
1820/// struct for typed errors of method [`OrganizationUsersApi::get_all`]
1821#[derive(Debug, Clone, Serialize, Deserialize)]
1822#[serde(untagged)]
1823pub enum GetAllError {
1824    UnknownValue(serde_json::Value),
1825}
1826/// struct for typed errors of method [`OrganizationUsersApi::get_mini_details`]
1827#[derive(Debug, Clone, Serialize, Deserialize)]
1828#[serde(untagged)]
1829pub enum GetMiniDetailsError {
1830    UnknownValue(serde_json::Value),
1831}
1832/// struct for typed errors of method [`OrganizationUsersApi::get_reset_password_details`]
1833#[derive(Debug, Clone, Serialize, Deserialize)]
1834#[serde(untagged)]
1835pub enum GetResetPasswordDetailsError {
1836    UnknownValue(serde_json::Value),
1837}
1838/// struct for typed errors of method [`OrganizationUsersApi::invite`]
1839#[derive(Debug, Clone, Serialize, Deserialize)]
1840#[serde(untagged)]
1841pub enum InviteError {
1842    UnknownValue(serde_json::Value),
1843}
1844/// struct for typed errors of method [`OrganizationUsersApi::put`]
1845#[derive(Debug, Clone, Serialize, Deserialize)]
1846#[serde(untagged)]
1847pub enum PutError {
1848    UnknownValue(serde_json::Value),
1849}
1850/// struct for typed errors of method [`OrganizationUsersApi::put_reset_password`]
1851#[derive(Debug, Clone, Serialize, Deserialize)]
1852#[serde(untagged)]
1853pub enum PutResetPasswordError {
1854    UnknownValue(serde_json::Value),
1855}
1856/// struct for typed errors of method [`OrganizationUsersApi::put_reset_password_enrollment`]
1857#[derive(Debug, Clone, Serialize, Deserialize)]
1858#[serde(untagged)]
1859pub enum PutResetPasswordEnrollmentError {
1860    UnknownValue(serde_json::Value),
1861}
1862/// struct for typed errors of method [`OrganizationUsersApi::reinvite`]
1863#[derive(Debug, Clone, Serialize, Deserialize)]
1864#[serde(untagged)]
1865pub enum ReinviteError {
1866    UnknownValue(serde_json::Value),
1867}
1868/// struct for typed errors of method [`OrganizationUsersApi::remove`]
1869#[derive(Debug, Clone, Serialize, Deserialize)]
1870#[serde(untagged)]
1871pub enum RemoveError {
1872    UnknownValue(serde_json::Value),
1873}
1874/// struct for typed errors of method [`OrganizationUsersApi::restore`]
1875#[derive(Debug, Clone, Serialize, Deserialize)]
1876#[serde(untagged)]
1877pub enum RestoreError {
1878    UnknownValue(serde_json::Value),
1879}
1880/// struct for typed errors of method [`OrganizationUsersApi::revoke`]
1881#[derive(Debug, Clone, Serialize, Deserialize)]
1882#[serde(untagged)]
1883pub enum RevokeError {
1884    UnknownValue(serde_json::Value),
1885}
1886/// struct for typed errors of method [`OrganizationUsersApi::user_public_keys`]
1887#[derive(Debug, Clone, Serialize, Deserialize)]
1888#[serde(untagged)]
1889pub enum UserPublicKeysError {
1890    UnknownValue(serde_json::Value),
1891}