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