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