fusionauth_rust_client/apis/
default_api.rs

1/*
2 * FusionAuth API
3 *
4 * This is a FusionAuth server. Find out more at [https://fusionauth.io](https://fusionauth.io). You need to [set up an API key](https://fusionauth.io/docs/v1/tech/apis/authentication#managing-api-keys) in the FusionAuth instance you are using to test out the API calls.
5 *
6 * The version of the OpenAPI document: 1.55.1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12use reqwest;
13use serde::{Deserialize, Serialize};
14use crate::{apis::ResponseContent, models};
15use super::{Error, configuration};
16
17
18/// struct for typed errors of method [`action_user_with_id`]
19#[derive(Debug, Clone, Serialize, Deserialize)]
20#[serde(untagged)]
21pub enum ActionUserWithIdError {
22    DefaultResponse(models::Errors),
23    UnknownValue(serde_json::Value),
24}
25
26/// struct for typed errors of method [`activate_reactor_with_id`]
27#[derive(Debug, Clone, Serialize, Deserialize)]
28#[serde(untagged)]
29pub enum ActivateReactorWithIdError {
30    DefaultResponse(models::Errors),
31    UnknownValue(serde_json::Value),
32}
33
34/// struct for typed errors of method [`add_user_to_family_with_id`]
35#[derive(Debug, Clone, Serialize, Deserialize)]
36#[serde(untagged)]
37pub enum AddUserToFamilyWithIdError {
38    DefaultResponse(models::Errors),
39    UnknownValue(serde_json::Value),
40}
41
42/// struct for typed errors of method [`approve_device_with_id`]
43#[derive(Debug, Clone, Serialize, Deserialize)]
44#[serde(untagged)]
45pub enum ApproveDeviceWithIdError {
46    DefaultResponse(models::Errors),
47    UnknownValue(serde_json::Value),
48}
49
50/// struct for typed errors of method [`cancel_action_with_id`]
51#[derive(Debug, Clone, Serialize, Deserialize)]
52#[serde(untagged)]
53pub enum CancelActionWithIdError {
54    DefaultResponse(models::Errors),
55    UnknownValue(serde_json::Value),
56}
57
58/// struct for typed errors of method [`change_password_by_identity_with_id`]
59#[derive(Debug, Clone, Serialize, Deserialize)]
60#[serde(untagged)]
61pub enum ChangePasswordByIdentityWithIdError {
62    DefaultResponse(models::Errors),
63    UnknownValue(serde_json::Value),
64}
65
66/// struct for typed errors of method [`change_password_with_id`]
67#[derive(Debug, Clone, Serialize, Deserialize)]
68#[serde(untagged)]
69pub enum ChangePasswordWithIdError {
70    DefaultResponse(models::Errors),
71    UnknownValue(serde_json::Value),
72}
73
74/// struct for typed errors of method [`check_change_password_using_id_with_id`]
75#[derive(Debug, Clone, Serialize, Deserialize)]
76#[serde(untagged)]
77pub enum CheckChangePasswordUsingIdWithIdError {
78    DefaultResponse(models::Errors),
79    UnknownValue(serde_json::Value),
80}
81
82/// struct for typed errors of method [`comment_on_user_with_id`]
83#[derive(Debug, Clone, Serialize, Deserialize)]
84#[serde(untagged)]
85pub enum CommentOnUserWithIdError {
86    DefaultResponse(models::Errors),
87    UnknownValue(serde_json::Value),
88}
89
90/// struct for typed errors of method [`complete_web_authn_assertion_with_id`]
91#[derive(Debug, Clone, Serialize, Deserialize)]
92#[serde(untagged)]
93pub enum CompleteWebAuthnAssertionWithIdError {
94    DefaultResponse(models::Errors),
95    UnknownValue(serde_json::Value),
96}
97
98/// struct for typed errors of method [`complete_web_authn_login_with_id`]
99#[derive(Debug, Clone, Serialize, Deserialize)]
100#[serde(untagged)]
101pub enum CompleteWebAuthnLoginWithIdError {
102    DefaultResponse(models::Errors),
103    UnknownValue(serde_json::Value),
104}
105
106/// struct for typed errors of method [`complete_web_authn_registration_with_id`]
107#[derive(Debug, Clone, Serialize, Deserialize)]
108#[serde(untagged)]
109pub enum CompleteWebAuthnRegistrationWithIdError {
110    DefaultResponse(models::Errors),
111    UnknownValue(serde_json::Value),
112}
113
114/// struct for typed errors of method [`create_api_key`]
115#[derive(Debug, Clone, Serialize, Deserialize)]
116#[serde(untagged)]
117pub enum CreateApiKeyError {
118    DefaultResponse(models::Errors),
119    UnknownValue(serde_json::Value),
120}
121
122/// struct for typed errors of method [`create_api_key_with_id`]
123#[derive(Debug, Clone, Serialize, Deserialize)]
124#[serde(untagged)]
125pub enum CreateApiKeyWithIdError {
126    DefaultResponse(models::Errors),
127    UnknownValue(serde_json::Value),
128}
129
130/// struct for typed errors of method [`create_application`]
131#[derive(Debug, Clone, Serialize, Deserialize)]
132#[serde(untagged)]
133pub enum CreateApplicationError {
134    DefaultResponse(models::Errors),
135    UnknownValue(serde_json::Value),
136}
137
138/// struct for typed errors of method [`create_application_role`]
139#[derive(Debug, Clone, Serialize, Deserialize)]
140#[serde(untagged)]
141pub enum CreateApplicationRoleError {
142    DefaultResponse(models::Errors),
143    UnknownValue(serde_json::Value),
144}
145
146/// struct for typed errors of method [`create_application_role_with_id`]
147#[derive(Debug, Clone, Serialize, Deserialize)]
148#[serde(untagged)]
149pub enum CreateApplicationRoleWithIdError {
150    DefaultResponse(models::Errors),
151    UnknownValue(serde_json::Value),
152}
153
154/// struct for typed errors of method [`create_application_with_id`]
155#[derive(Debug, Clone, Serialize, Deserialize)]
156#[serde(untagged)]
157pub enum CreateApplicationWithIdError {
158    DefaultResponse(models::Errors),
159    UnknownValue(serde_json::Value),
160}
161
162/// struct for typed errors of method [`create_audit_log_with_id`]
163#[derive(Debug, Clone, Serialize, Deserialize)]
164#[serde(untagged)]
165pub enum CreateAuditLogWithIdError {
166    DefaultResponse(models::Errors),
167    UnknownValue(serde_json::Value),
168}
169
170/// struct for typed errors of method [`create_connector`]
171#[derive(Debug, Clone, Serialize, Deserialize)]
172#[serde(untagged)]
173pub enum CreateConnectorError {
174    DefaultResponse(models::Errors),
175    UnknownValue(serde_json::Value),
176}
177
178/// struct for typed errors of method [`create_connector_with_id`]
179#[derive(Debug, Clone, Serialize, Deserialize)]
180#[serde(untagged)]
181pub enum CreateConnectorWithIdError {
182    DefaultResponse(models::Errors),
183    UnknownValue(serde_json::Value),
184}
185
186/// struct for typed errors of method [`create_consent`]
187#[derive(Debug, Clone, Serialize, Deserialize)]
188#[serde(untagged)]
189pub enum CreateConsentError {
190    DefaultResponse(models::Errors),
191    UnknownValue(serde_json::Value),
192}
193
194/// struct for typed errors of method [`create_consent_with_id`]
195#[derive(Debug, Clone, Serialize, Deserialize)]
196#[serde(untagged)]
197pub enum CreateConsentWithIdError {
198    DefaultResponse(models::Errors),
199    UnknownValue(serde_json::Value),
200}
201
202/// struct for typed errors of method [`create_email_template`]
203#[derive(Debug, Clone, Serialize, Deserialize)]
204#[serde(untagged)]
205pub enum CreateEmailTemplateError {
206    DefaultResponse(models::Errors),
207    UnknownValue(serde_json::Value),
208}
209
210/// struct for typed errors of method [`create_email_template_with_id`]
211#[derive(Debug, Clone, Serialize, Deserialize)]
212#[serde(untagged)]
213pub enum CreateEmailTemplateWithIdError {
214    DefaultResponse(models::Errors),
215    UnknownValue(serde_json::Value),
216}
217
218/// struct for typed errors of method [`create_entity`]
219#[derive(Debug, Clone, Serialize, Deserialize)]
220#[serde(untagged)]
221pub enum CreateEntityError {
222    DefaultResponse(models::Errors),
223    UnknownValue(serde_json::Value),
224}
225
226/// struct for typed errors of method [`create_entity_type`]
227#[derive(Debug, Clone, Serialize, Deserialize)]
228#[serde(untagged)]
229pub enum CreateEntityTypeError {
230    DefaultResponse(models::Errors),
231    UnknownValue(serde_json::Value),
232}
233
234/// struct for typed errors of method [`create_entity_type_permission`]
235#[derive(Debug, Clone, Serialize, Deserialize)]
236#[serde(untagged)]
237pub enum CreateEntityTypePermissionError {
238    DefaultResponse(models::Errors),
239    UnknownValue(serde_json::Value),
240}
241
242/// struct for typed errors of method [`create_entity_type_permission_with_id`]
243#[derive(Debug, Clone, Serialize, Deserialize)]
244#[serde(untagged)]
245pub enum CreateEntityTypePermissionWithIdError {
246    DefaultResponse(models::Errors),
247    UnknownValue(serde_json::Value),
248}
249
250/// struct for typed errors of method [`create_entity_type_with_id`]
251#[derive(Debug, Clone, Serialize, Deserialize)]
252#[serde(untagged)]
253pub enum CreateEntityTypeWithIdError {
254    DefaultResponse(models::Errors),
255    UnknownValue(serde_json::Value),
256}
257
258/// struct for typed errors of method [`create_entity_with_id`]
259#[derive(Debug, Clone, Serialize, Deserialize)]
260#[serde(untagged)]
261pub enum CreateEntityWithIdError {
262    DefaultResponse(models::Errors),
263    UnknownValue(serde_json::Value),
264}
265
266/// struct for typed errors of method [`create_family`]
267#[derive(Debug, Clone, Serialize, Deserialize)]
268#[serde(untagged)]
269pub enum CreateFamilyError {
270    DefaultResponse(models::Errors),
271    UnknownValue(serde_json::Value),
272}
273
274/// struct for typed errors of method [`create_family_with_id`]
275#[derive(Debug, Clone, Serialize, Deserialize)]
276#[serde(untagged)]
277pub enum CreateFamilyWithIdError {
278    DefaultResponse(models::Errors),
279    UnknownValue(serde_json::Value),
280}
281
282/// struct for typed errors of method [`create_form`]
283#[derive(Debug, Clone, Serialize, Deserialize)]
284#[serde(untagged)]
285pub enum CreateFormError {
286    DefaultResponse(models::Errors),
287    UnknownValue(serde_json::Value),
288}
289
290/// struct for typed errors of method [`create_form_field`]
291#[derive(Debug, Clone, Serialize, Deserialize)]
292#[serde(untagged)]
293pub enum CreateFormFieldError {
294    DefaultResponse(models::Errors),
295    UnknownValue(serde_json::Value),
296}
297
298/// struct for typed errors of method [`create_form_field_with_id`]
299#[derive(Debug, Clone, Serialize, Deserialize)]
300#[serde(untagged)]
301pub enum CreateFormFieldWithIdError {
302    DefaultResponse(models::Errors),
303    UnknownValue(serde_json::Value),
304}
305
306/// struct for typed errors of method [`create_form_with_id`]
307#[derive(Debug, Clone, Serialize, Deserialize)]
308#[serde(untagged)]
309pub enum CreateFormWithIdError {
310    DefaultResponse(models::Errors),
311    UnknownValue(serde_json::Value),
312}
313
314/// struct for typed errors of method [`create_group`]
315#[derive(Debug, Clone, Serialize, Deserialize)]
316#[serde(untagged)]
317pub enum CreateGroupError {
318    DefaultResponse(models::Errors),
319    UnknownValue(serde_json::Value),
320}
321
322/// struct for typed errors of method [`create_group_members_with_id`]
323#[derive(Debug, Clone, Serialize, Deserialize)]
324#[serde(untagged)]
325pub enum CreateGroupMembersWithIdError {
326    DefaultResponse(models::Errors),
327    UnknownValue(serde_json::Value),
328}
329
330/// struct for typed errors of method [`create_group_with_id`]
331#[derive(Debug, Clone, Serialize, Deserialize)]
332#[serde(untagged)]
333pub enum CreateGroupWithIdError {
334    DefaultResponse(models::Errors),
335    UnknownValue(serde_json::Value),
336}
337
338/// struct for typed errors of method [`create_identity_provider`]
339#[derive(Debug, Clone, Serialize, Deserialize)]
340#[serde(untagged)]
341pub enum CreateIdentityProviderError {
342    DefaultResponse(models::Errors),
343    UnknownValue(serde_json::Value),
344}
345
346/// struct for typed errors of method [`create_identity_provider_with_id`]
347#[derive(Debug, Clone, Serialize, Deserialize)]
348#[serde(untagged)]
349pub enum CreateIdentityProviderWithIdError {
350    DefaultResponse(models::Errors),
351    UnknownValue(serde_json::Value),
352}
353
354/// struct for typed errors of method [`create_introspect`]
355#[derive(Debug, Clone, Serialize, Deserialize)]
356#[serde(untagged)]
357pub enum CreateIntrospectError {
358    DefaultResponse(models::OAuthError),
359    UnknownValue(serde_json::Value),
360}
361
362/// struct for typed errors of method [`create_ip_access_control_list`]
363#[derive(Debug, Clone, Serialize, Deserialize)]
364#[serde(untagged)]
365pub enum CreateIpAccessControlListError {
366    DefaultResponse(models::Errors),
367    UnknownValue(serde_json::Value),
368}
369
370/// struct for typed errors of method [`create_ip_access_control_list_with_id`]
371#[derive(Debug, Clone, Serialize, Deserialize)]
372#[serde(untagged)]
373pub enum CreateIpAccessControlListWithIdError {
374    DefaultResponse(models::Errors),
375    UnknownValue(serde_json::Value),
376}
377
378/// struct for typed errors of method [`create_lambda`]
379#[derive(Debug, Clone, Serialize, Deserialize)]
380#[serde(untagged)]
381pub enum CreateLambdaError {
382    DefaultResponse(models::Errors),
383    UnknownValue(serde_json::Value),
384}
385
386/// struct for typed errors of method [`create_lambda_with_id`]
387#[derive(Debug, Clone, Serialize, Deserialize)]
388#[serde(untagged)]
389pub enum CreateLambdaWithIdError {
390    DefaultResponse(models::Errors),
391    UnknownValue(serde_json::Value),
392}
393
394/// struct for typed errors of method [`create_logout`]
395#[derive(Debug, Clone, Serialize, Deserialize)]
396#[serde(untagged)]
397pub enum CreateLogoutError {
398    DefaultResponse(),
399    UnknownValue(serde_json::Value),
400}
401
402/// struct for typed errors of method [`create_message_template`]
403#[derive(Debug, Clone, Serialize, Deserialize)]
404#[serde(untagged)]
405pub enum CreateMessageTemplateError {
406    DefaultResponse(models::Errors),
407    UnknownValue(serde_json::Value),
408}
409
410/// struct for typed errors of method [`create_message_template_with_id`]
411#[derive(Debug, Clone, Serialize, Deserialize)]
412#[serde(untagged)]
413pub enum CreateMessageTemplateWithIdError {
414    DefaultResponse(models::Errors),
415    UnknownValue(serde_json::Value),
416}
417
418/// struct for typed errors of method [`create_messenger`]
419#[derive(Debug, Clone, Serialize, Deserialize)]
420#[serde(untagged)]
421pub enum CreateMessengerError {
422    DefaultResponse(models::Errors),
423    UnknownValue(serde_json::Value),
424}
425
426/// struct for typed errors of method [`create_messenger_with_id`]
427#[derive(Debug, Clone, Serialize, Deserialize)]
428#[serde(untagged)]
429pub enum CreateMessengerWithIdError {
430    DefaultResponse(models::Errors),
431    UnknownValue(serde_json::Value),
432}
433
434/// struct for typed errors of method [`create_o_auth_scope`]
435#[derive(Debug, Clone, Serialize, Deserialize)]
436#[serde(untagged)]
437pub enum CreateOAuthScopeError {
438    DefaultResponse(models::Errors),
439    UnknownValue(serde_json::Value),
440}
441
442/// struct for typed errors of method [`create_o_auth_scope_with_id`]
443#[derive(Debug, Clone, Serialize, Deserialize)]
444#[serde(untagged)]
445pub enum CreateOAuthScopeWithIdError {
446    DefaultResponse(models::Errors),
447    UnknownValue(serde_json::Value),
448}
449
450/// struct for typed errors of method [`create_tenant`]
451#[derive(Debug, Clone, Serialize, Deserialize)]
452#[serde(untagged)]
453pub enum CreateTenantError {
454    DefaultResponse(models::Errors),
455    UnknownValue(serde_json::Value),
456}
457
458/// struct for typed errors of method [`create_tenant_with_id`]
459#[derive(Debug, Clone, Serialize, Deserialize)]
460#[serde(untagged)]
461pub enum CreateTenantWithIdError {
462    DefaultResponse(models::Errors),
463    UnknownValue(serde_json::Value),
464}
465
466/// struct for typed errors of method [`create_theme`]
467#[derive(Debug, Clone, Serialize, Deserialize)]
468#[serde(untagged)]
469pub enum CreateThemeError {
470    DefaultResponse(models::Errors),
471    UnknownValue(serde_json::Value),
472}
473
474/// struct for typed errors of method [`create_theme_with_id`]
475#[derive(Debug, Clone, Serialize, Deserialize)]
476#[serde(untagged)]
477pub enum CreateThemeWithIdError {
478    DefaultResponse(models::Errors),
479    UnknownValue(serde_json::Value),
480}
481
482/// struct for typed errors of method [`create_token`]
483#[derive(Debug, Clone, Serialize, Deserialize)]
484#[serde(untagged)]
485pub enum CreateTokenError {
486    DefaultResponse(models::OAuthError),
487    UnknownValue(serde_json::Value),
488}
489
490/// struct for typed errors of method [`create_user`]
491#[derive(Debug, Clone, Serialize, Deserialize)]
492#[serde(untagged)]
493pub enum CreateUserError {
494    DefaultResponse(models::Errors),
495    UnknownValue(serde_json::Value),
496}
497
498/// struct for typed errors of method [`create_user_action`]
499#[derive(Debug, Clone, Serialize, Deserialize)]
500#[serde(untagged)]
501pub enum CreateUserActionError {
502    DefaultResponse(models::Errors),
503    UnknownValue(serde_json::Value),
504}
505
506/// struct for typed errors of method [`create_user_action_reason`]
507#[derive(Debug, Clone, Serialize, Deserialize)]
508#[serde(untagged)]
509pub enum CreateUserActionReasonError {
510    DefaultResponse(models::Errors),
511    UnknownValue(serde_json::Value),
512}
513
514/// struct for typed errors of method [`create_user_action_reason_with_id`]
515#[derive(Debug, Clone, Serialize, Deserialize)]
516#[serde(untagged)]
517pub enum CreateUserActionReasonWithIdError {
518    DefaultResponse(models::Errors),
519    UnknownValue(serde_json::Value),
520}
521
522/// struct for typed errors of method [`create_user_action_with_id`]
523#[derive(Debug, Clone, Serialize, Deserialize)]
524#[serde(untagged)]
525pub enum CreateUserActionWithIdError {
526    DefaultResponse(models::Errors),
527    UnknownValue(serde_json::Value),
528}
529
530/// struct for typed errors of method [`create_user_consent`]
531#[derive(Debug, Clone, Serialize, Deserialize)]
532#[serde(untagged)]
533pub enum CreateUserConsentError {
534    DefaultResponse(models::Errors),
535    UnknownValue(serde_json::Value),
536}
537
538/// struct for typed errors of method [`create_user_consent_with_id`]
539#[derive(Debug, Clone, Serialize, Deserialize)]
540#[serde(untagged)]
541pub enum CreateUserConsentWithIdError {
542    DefaultResponse(models::Errors),
543    UnknownValue(serde_json::Value),
544}
545
546/// struct for typed errors of method [`create_user_link_with_id`]
547#[derive(Debug, Clone, Serialize, Deserialize)]
548#[serde(untagged)]
549pub enum CreateUserLinkWithIdError {
550    DefaultResponse(models::Errors),
551    UnknownValue(serde_json::Value),
552}
553
554/// struct for typed errors of method [`create_user_verify_email`]
555#[derive(Debug, Clone, Serialize, Deserialize)]
556#[serde(untagged)]
557pub enum CreateUserVerifyEmailError {
558    DefaultResponse(models::Errors),
559    UnknownValue(serde_json::Value),
560}
561
562/// struct for typed errors of method [`create_user_with_id`]
563#[derive(Debug, Clone, Serialize, Deserialize)]
564#[serde(untagged)]
565pub enum CreateUserWithIdError {
566    DefaultResponse(models::Errors),
567    UnknownValue(serde_json::Value),
568}
569
570/// struct for typed errors of method [`create_webhook`]
571#[derive(Debug, Clone, Serialize, Deserialize)]
572#[serde(untagged)]
573pub enum CreateWebhookError {
574    DefaultResponse(models::Errors),
575    UnknownValue(serde_json::Value),
576}
577
578/// struct for typed errors of method [`create_webhook_with_id`]
579#[derive(Debug, Clone, Serialize, Deserialize)]
580#[serde(untagged)]
581pub enum CreateWebhookWithIdError {
582    DefaultResponse(models::Errors),
583    UnknownValue(serde_json::Value),
584}
585
586/// struct for typed errors of method [`delete_api_key_with_id`]
587#[derive(Debug, Clone, Serialize, Deserialize)]
588#[serde(untagged)]
589pub enum DeleteApiKeyWithIdError {
590    DefaultResponse(models::Errors),
591    UnknownValue(serde_json::Value),
592}
593
594/// struct for typed errors of method [`delete_application_role_with_id`]
595#[derive(Debug, Clone, Serialize, Deserialize)]
596#[serde(untagged)]
597pub enum DeleteApplicationRoleWithIdError {
598    DefaultResponse(models::Errors),
599    UnknownValue(serde_json::Value),
600}
601
602/// struct for typed errors of method [`delete_application_with_id`]
603#[derive(Debug, Clone, Serialize, Deserialize)]
604#[serde(untagged)]
605pub enum DeleteApplicationWithIdError {
606    DefaultResponse(models::Errors),
607    UnknownValue(serde_json::Value),
608}
609
610/// struct for typed errors of method [`delete_connector_with_id`]
611#[derive(Debug, Clone, Serialize, Deserialize)]
612#[serde(untagged)]
613pub enum DeleteConnectorWithIdError {
614    DefaultResponse(models::Errors),
615    UnknownValue(serde_json::Value),
616}
617
618/// struct for typed errors of method [`delete_consent_with_id`]
619#[derive(Debug, Clone, Serialize, Deserialize)]
620#[serde(untagged)]
621pub enum DeleteConsentWithIdError {
622    DefaultResponse(models::Errors),
623    UnknownValue(serde_json::Value),
624}
625
626/// struct for typed errors of method [`delete_email_template_with_id`]
627#[derive(Debug, Clone, Serialize, Deserialize)]
628#[serde(untagged)]
629pub enum DeleteEmailTemplateWithIdError {
630    DefaultResponse(models::Errors),
631    UnknownValue(serde_json::Value),
632}
633
634/// struct for typed errors of method [`delete_entity_grant_with_id`]
635#[derive(Debug, Clone, Serialize, Deserialize)]
636#[serde(untagged)]
637pub enum DeleteEntityGrantWithIdError {
638    DefaultResponse(models::Errors),
639    UnknownValue(serde_json::Value),
640}
641
642/// struct for typed errors of method [`delete_entity_type_permission_with_id`]
643#[derive(Debug, Clone, Serialize, Deserialize)]
644#[serde(untagged)]
645pub enum DeleteEntityTypePermissionWithIdError {
646    DefaultResponse(models::Errors),
647    UnknownValue(serde_json::Value),
648}
649
650/// struct for typed errors of method [`delete_entity_type_with_id`]
651#[derive(Debug, Clone, Serialize, Deserialize)]
652#[serde(untagged)]
653pub enum DeleteEntityTypeWithIdError {
654    DefaultResponse(models::Errors),
655    UnknownValue(serde_json::Value),
656}
657
658/// struct for typed errors of method [`delete_entity_with_id`]
659#[derive(Debug, Clone, Serialize, Deserialize)]
660#[serde(untagged)]
661pub enum DeleteEntityWithIdError {
662    DefaultResponse(models::Errors),
663    UnknownValue(serde_json::Value),
664}
665
666/// struct for typed errors of method [`delete_form_field_with_id`]
667#[derive(Debug, Clone, Serialize, Deserialize)]
668#[serde(untagged)]
669pub enum DeleteFormFieldWithIdError {
670    DefaultResponse(models::Errors),
671    UnknownValue(serde_json::Value),
672}
673
674/// struct for typed errors of method [`delete_form_with_id`]
675#[derive(Debug, Clone, Serialize, Deserialize)]
676#[serde(untagged)]
677pub enum DeleteFormWithIdError {
678    DefaultResponse(models::Errors),
679    UnknownValue(serde_json::Value),
680}
681
682/// struct for typed errors of method [`delete_group_members_with_id`]
683#[derive(Debug, Clone, Serialize, Deserialize)]
684#[serde(untagged)]
685pub enum DeleteGroupMembersWithIdError {
686    DefaultResponse(models::Errors),
687    UnknownValue(serde_json::Value),
688}
689
690/// struct for typed errors of method [`delete_group_with_id`]
691#[derive(Debug, Clone, Serialize, Deserialize)]
692#[serde(untagged)]
693pub enum DeleteGroupWithIdError {
694    DefaultResponse(models::Errors),
695    UnknownValue(serde_json::Value),
696}
697
698/// struct for typed errors of method [`delete_identity_provider_with_id`]
699#[derive(Debug, Clone, Serialize, Deserialize)]
700#[serde(untagged)]
701pub enum DeleteIdentityProviderWithIdError {
702    DefaultResponse(models::Errors),
703    UnknownValue(serde_json::Value),
704}
705
706/// struct for typed errors of method [`delete_ip_access_control_list_with_id`]
707#[derive(Debug, Clone, Serialize, Deserialize)]
708#[serde(untagged)]
709pub enum DeleteIpAccessControlListWithIdError {
710    DefaultResponse(models::Errors),
711    UnknownValue(serde_json::Value),
712}
713
714/// struct for typed errors of method [`delete_jwt_refresh`]
715#[derive(Debug, Clone, Serialize, Deserialize)]
716#[serde(untagged)]
717pub enum DeleteJwtRefreshError {
718    DefaultResponse(models::Errors),
719    UnknownValue(serde_json::Value),
720}
721
722/// struct for typed errors of method [`delete_key_with_id`]
723#[derive(Debug, Clone, Serialize, Deserialize)]
724#[serde(untagged)]
725pub enum DeleteKeyWithIdError {
726    DefaultResponse(models::Errors),
727    UnknownValue(serde_json::Value),
728}
729
730/// struct for typed errors of method [`delete_lambda_with_id`]
731#[derive(Debug, Clone, Serialize, Deserialize)]
732#[serde(untagged)]
733pub enum DeleteLambdaWithIdError {
734    DefaultResponse(models::Errors),
735    UnknownValue(serde_json::Value),
736}
737
738/// struct for typed errors of method [`delete_message_template_with_id`]
739#[derive(Debug, Clone, Serialize, Deserialize)]
740#[serde(untagged)]
741pub enum DeleteMessageTemplateWithIdError {
742    DefaultResponse(models::Errors),
743    UnknownValue(serde_json::Value),
744}
745
746/// struct for typed errors of method [`delete_messenger_with_id`]
747#[derive(Debug, Clone, Serialize, Deserialize)]
748#[serde(untagged)]
749pub enum DeleteMessengerWithIdError {
750    DefaultResponse(models::Errors),
751    UnknownValue(serde_json::Value),
752}
753
754/// struct for typed errors of method [`delete_o_auth_scope_with_id`]
755#[derive(Debug, Clone, Serialize, Deserialize)]
756#[serde(untagged)]
757pub enum DeleteOAuthScopeWithIdError {
758    DefaultResponse(models::Errors),
759    UnknownValue(serde_json::Value),
760}
761
762/// struct for typed errors of method [`delete_tenant_with_id`]
763#[derive(Debug, Clone, Serialize, Deserialize)]
764#[serde(untagged)]
765pub enum DeleteTenantWithIdError {
766    DefaultResponse(models::Errors),
767    UnknownValue(serde_json::Value),
768}
769
770/// struct for typed errors of method [`delete_theme_with_id`]
771#[derive(Debug, Clone, Serialize, Deserialize)]
772#[serde(untagged)]
773pub enum DeleteThemeWithIdError {
774    DefaultResponse(models::Errors),
775    UnknownValue(serde_json::Value),
776}
777
778/// struct for typed errors of method [`delete_user_action_reason_with_id`]
779#[derive(Debug, Clone, Serialize, Deserialize)]
780#[serde(untagged)]
781pub enum DeleteUserActionReasonWithIdError {
782    DefaultResponse(models::Errors),
783    UnknownValue(serde_json::Value),
784}
785
786/// struct for typed errors of method [`delete_user_action_with_id`]
787#[derive(Debug, Clone, Serialize, Deserialize)]
788#[serde(untagged)]
789pub enum DeleteUserActionWithIdError {
790    DefaultResponse(models::Errors),
791    UnknownValue(serde_json::Value),
792}
793
794/// struct for typed errors of method [`delete_user_bulk`]
795#[derive(Debug, Clone, Serialize, Deserialize)]
796#[serde(untagged)]
797pub enum DeleteUserBulkError {
798    DefaultResponse(models::Errors),
799    UnknownValue(serde_json::Value),
800}
801
802/// struct for typed errors of method [`delete_user_link_with_id`]
803#[derive(Debug, Clone, Serialize, Deserialize)]
804#[serde(untagged)]
805pub enum DeleteUserLinkWithIdError {
806    DefaultResponse(models::Errors),
807    UnknownValue(serde_json::Value),
808}
809
810/// struct for typed errors of method [`delete_user_registration_with_id`]
811#[derive(Debug, Clone, Serialize, Deserialize)]
812#[serde(untagged)]
813pub enum DeleteUserRegistrationWithIdError {
814    DefaultResponse(models::Errors),
815    UnknownValue(serde_json::Value),
816}
817
818/// struct for typed errors of method [`delete_user_two_factor_with_id`]
819#[derive(Debug, Clone, Serialize, Deserialize)]
820#[serde(untagged)]
821pub enum DeleteUserTwoFactorWithIdError {
822    DefaultResponse(models::Errors),
823    UnknownValue(serde_json::Value),
824}
825
826/// struct for typed errors of method [`delete_user_with_id`]
827#[derive(Debug, Clone, Serialize, Deserialize)]
828#[serde(untagged)]
829pub enum DeleteUserWithIdError {
830    DefaultResponse(models::Errors),
831    UnknownValue(serde_json::Value),
832}
833
834/// struct for typed errors of method [`delete_web_authn_credential_with_id`]
835#[derive(Debug, Clone, Serialize, Deserialize)]
836#[serde(untagged)]
837pub enum DeleteWebAuthnCredentialWithIdError {
838    DefaultResponse(models::Errors),
839    UnknownValue(serde_json::Value),
840}
841
842/// struct for typed errors of method [`delete_webhook_with_id`]
843#[derive(Debug, Clone, Serialize, Deserialize)]
844#[serde(untagged)]
845pub enum DeleteWebhookWithIdError {
846    DefaultResponse(models::Errors),
847    UnknownValue(serde_json::Value),
848}
849
850/// struct for typed errors of method [`enable_two_factor_with_id`]
851#[derive(Debug, Clone, Serialize, Deserialize)]
852#[serde(untagged)]
853pub enum EnableTwoFactorWithIdError {
854    DefaultResponse(models::Errors),
855    UnknownValue(serde_json::Value),
856}
857
858/// struct for typed errors of method [`exchange_refresh_token_for_jwt_with_id`]
859#[derive(Debug, Clone, Serialize, Deserialize)]
860#[serde(untagged)]
861pub enum ExchangeRefreshTokenForJwtWithIdError {
862    DefaultResponse(models::Errors),
863    UnknownValue(serde_json::Value),
864}
865
866/// struct for typed errors of method [`forgot_password_with_id`]
867#[derive(Debug, Clone, Serialize, Deserialize)]
868#[serde(untagged)]
869pub enum ForgotPasswordWithIdError {
870    DefaultResponse(models::Errors),
871    UnknownValue(serde_json::Value),
872}
873
874/// struct for typed errors of method [`generate_key`]
875#[derive(Debug, Clone, Serialize, Deserialize)]
876#[serde(untagged)]
877pub enum GenerateKeyError {
878    DefaultResponse(models::Errors),
879    UnknownValue(serde_json::Value),
880}
881
882/// struct for typed errors of method [`generate_key_with_id`]
883#[derive(Debug, Clone, Serialize, Deserialize)]
884#[serde(untagged)]
885pub enum GenerateKeyWithIdError {
886    DefaultResponse(models::Errors),
887    UnknownValue(serde_json::Value),
888}
889
890/// struct for typed errors of method [`generate_two_factor_recovery_codes_with_id`]
891#[derive(Debug, Clone, Serialize, Deserialize)]
892#[serde(untagged)]
893pub enum GenerateTwoFactorRecoveryCodesWithIdError {
894    DefaultResponse(models::Errors),
895    UnknownValue(serde_json::Value),
896}
897
898/// struct for typed errors of method [`generate_two_factor_secret_using_jwt_with_id`]
899#[derive(Debug, Clone, Serialize, Deserialize)]
900#[serde(untagged)]
901pub enum GenerateTwoFactorSecretUsingJwtWithIdError {
902    DefaultResponse(),
903    UnknownValue(serde_json::Value),
904}
905
906/// struct for typed errors of method [`identity_provider_login_with_id`]
907#[derive(Debug, Clone, Serialize, Deserialize)]
908#[serde(untagged)]
909pub enum IdentityProviderLoginWithIdError {
910    DefaultResponse(models::Errors),
911    UnknownValue(serde_json::Value),
912}
913
914/// struct for typed errors of method [`import_key`]
915#[derive(Debug, Clone, Serialize, Deserialize)]
916#[serde(untagged)]
917pub enum ImportKeyError {
918    DefaultResponse(models::Errors),
919    UnknownValue(serde_json::Value),
920}
921
922/// struct for typed errors of method [`import_key_with_id`]
923#[derive(Debug, Clone, Serialize, Deserialize)]
924#[serde(untagged)]
925pub enum ImportKeyWithIdError {
926    DefaultResponse(models::Errors),
927    UnknownValue(serde_json::Value),
928}
929
930/// struct for typed errors of method [`import_refresh_tokens_with_id`]
931#[derive(Debug, Clone, Serialize, Deserialize)]
932#[serde(untagged)]
933pub enum ImportRefreshTokensWithIdError {
934    DefaultResponse(models::Errors),
935    UnknownValue(serde_json::Value),
936}
937
938/// struct for typed errors of method [`import_users_with_id`]
939#[derive(Debug, Clone, Serialize, Deserialize)]
940#[serde(untagged)]
941pub enum ImportUsersWithIdError {
942    DefaultResponse(models::Errors),
943    UnknownValue(serde_json::Value),
944}
945
946/// struct for typed errors of method [`import_web_authn_credential_with_id`]
947#[derive(Debug, Clone, Serialize, Deserialize)]
948#[serde(untagged)]
949pub enum ImportWebAuthnCredentialWithIdError {
950    DefaultResponse(models::Errors),
951    UnknownValue(serde_json::Value),
952}
953
954/// struct for typed errors of method [`issue_jwt_with_id`]
955#[derive(Debug, Clone, Serialize, Deserialize)]
956#[serde(untagged)]
957pub enum IssueJwtWithIdError {
958    DefaultResponse(models::Errors),
959    UnknownValue(serde_json::Value),
960}
961
962/// struct for typed errors of method [`login_ping_with_id`]
963#[derive(Debug, Clone, Serialize, Deserialize)]
964#[serde(untagged)]
965pub enum LoginPingWithIdError {
966    DefaultResponse(models::Errors),
967    UnknownValue(serde_json::Value),
968}
969
970/// struct for typed errors of method [`login_ping_with_request_with_id`]
971#[derive(Debug, Clone, Serialize, Deserialize)]
972#[serde(untagged)]
973pub enum LoginPingWithRequestWithIdError {
974    DefaultResponse(models::Errors),
975    UnknownValue(serde_json::Value),
976}
977
978/// struct for typed errors of method [`login_with_id`]
979#[derive(Debug, Clone, Serialize, Deserialize)]
980#[serde(untagged)]
981pub enum LoginWithIdError {
982    DefaultResponse(models::Errors),
983    UnknownValue(serde_json::Value),
984}
985
986/// struct for typed errors of method [`lookup_identity_provider_with_id`]
987#[derive(Debug, Clone, Serialize, Deserialize)]
988#[serde(untagged)]
989pub enum LookupIdentityProviderWithIdError {
990    DefaultResponse(),
991    UnknownValue(serde_json::Value),
992}
993
994/// struct for typed errors of method [`modify_action_with_id`]
995#[derive(Debug, Clone, Serialize, Deserialize)]
996#[serde(untagged)]
997pub enum ModifyActionWithIdError {
998    DefaultResponse(models::Errors),
999    UnknownValue(serde_json::Value),
1000}
1001
1002/// struct for typed errors of method [`passwordless_login_with_id`]
1003#[derive(Debug, Clone, Serialize, Deserialize)]
1004#[serde(untagged)]
1005pub enum PasswordlessLoginWithIdError {
1006    DefaultResponse(models::Errors),
1007    UnknownValue(serde_json::Value),
1008}
1009
1010/// struct for typed errors of method [`patch_application_role_with_id`]
1011#[derive(Debug, Clone, Serialize, Deserialize)]
1012#[serde(untagged)]
1013pub enum PatchApplicationRoleWithIdError {
1014    DefaultResponse(models::Errors),
1015    UnknownValue(serde_json::Value),
1016}
1017
1018/// struct for typed errors of method [`patch_application_with_id`]
1019#[derive(Debug, Clone, Serialize, Deserialize)]
1020#[serde(untagged)]
1021pub enum PatchApplicationWithIdError {
1022    DefaultResponse(models::Errors),
1023    UnknownValue(serde_json::Value),
1024}
1025
1026/// struct for typed errors of method [`patch_connector_with_id`]
1027#[derive(Debug, Clone, Serialize, Deserialize)]
1028#[serde(untagged)]
1029pub enum PatchConnectorWithIdError {
1030    DefaultResponse(models::Errors),
1031    UnknownValue(serde_json::Value),
1032}
1033
1034/// struct for typed errors of method [`patch_consent_with_id`]
1035#[derive(Debug, Clone, Serialize, Deserialize)]
1036#[serde(untagged)]
1037pub enum PatchConsentWithIdError {
1038    DefaultResponse(models::Errors),
1039    UnknownValue(serde_json::Value),
1040}
1041
1042/// struct for typed errors of method [`patch_email_template_with_id`]
1043#[derive(Debug, Clone, Serialize, Deserialize)]
1044#[serde(untagged)]
1045pub enum PatchEmailTemplateWithIdError {
1046    DefaultResponse(models::Errors),
1047    UnknownValue(serde_json::Value),
1048}
1049
1050/// struct for typed errors of method [`patch_entity_type_with_id`]
1051#[derive(Debug, Clone, Serialize, Deserialize)]
1052#[serde(untagged)]
1053pub enum PatchEntityTypeWithIdError {
1054    DefaultResponse(models::Errors),
1055    UnknownValue(serde_json::Value),
1056}
1057
1058/// struct for typed errors of method [`patch_group_with_id`]
1059#[derive(Debug, Clone, Serialize, Deserialize)]
1060#[serde(untagged)]
1061pub enum PatchGroupWithIdError {
1062    DefaultResponse(models::Errors),
1063    UnknownValue(serde_json::Value),
1064}
1065
1066/// struct for typed errors of method [`patch_identity_provider_with_id`]
1067#[derive(Debug, Clone, Serialize, Deserialize)]
1068#[serde(untagged)]
1069pub enum PatchIdentityProviderWithIdError {
1070    DefaultResponse(models::Errors),
1071    UnknownValue(serde_json::Value),
1072}
1073
1074/// struct for typed errors of method [`patch_integrations_with_id`]
1075#[derive(Debug, Clone, Serialize, Deserialize)]
1076#[serde(untagged)]
1077pub enum PatchIntegrationsWithIdError {
1078    DefaultResponse(models::Errors),
1079    UnknownValue(serde_json::Value),
1080}
1081
1082/// struct for typed errors of method [`patch_lambda_with_id`]
1083#[derive(Debug, Clone, Serialize, Deserialize)]
1084#[serde(untagged)]
1085pub enum PatchLambdaWithIdError {
1086    DefaultResponse(models::Errors),
1087    UnknownValue(serde_json::Value),
1088}
1089
1090/// struct for typed errors of method [`patch_message_template_with_id`]
1091#[derive(Debug, Clone, Serialize, Deserialize)]
1092#[serde(untagged)]
1093pub enum PatchMessageTemplateWithIdError {
1094    DefaultResponse(models::Errors),
1095    UnknownValue(serde_json::Value),
1096}
1097
1098/// struct for typed errors of method [`patch_messenger_with_id`]
1099#[derive(Debug, Clone, Serialize, Deserialize)]
1100#[serde(untagged)]
1101pub enum PatchMessengerWithIdError {
1102    DefaultResponse(models::Errors),
1103    UnknownValue(serde_json::Value),
1104}
1105
1106/// struct for typed errors of method [`patch_o_auth_scope_with_id`]
1107#[derive(Debug, Clone, Serialize, Deserialize)]
1108#[serde(untagged)]
1109pub enum PatchOAuthScopeWithIdError {
1110    DefaultResponse(models::Errors),
1111    UnknownValue(serde_json::Value),
1112}
1113
1114/// struct for typed errors of method [`patch_registration_with_id`]
1115#[derive(Debug, Clone, Serialize, Deserialize)]
1116#[serde(untagged)]
1117pub enum PatchRegistrationWithIdError {
1118    DefaultResponse(models::Errors),
1119    UnknownValue(serde_json::Value),
1120}
1121
1122/// struct for typed errors of method [`patch_system_configuration_with_id`]
1123#[derive(Debug, Clone, Serialize, Deserialize)]
1124#[serde(untagged)]
1125pub enum PatchSystemConfigurationWithIdError {
1126    DefaultResponse(models::Errors),
1127    UnknownValue(serde_json::Value),
1128}
1129
1130/// struct for typed errors of method [`patch_tenant_with_id`]
1131#[derive(Debug, Clone, Serialize, Deserialize)]
1132#[serde(untagged)]
1133pub enum PatchTenantWithIdError {
1134    DefaultResponse(models::Errors),
1135    UnknownValue(serde_json::Value),
1136}
1137
1138/// struct for typed errors of method [`patch_theme_with_id`]
1139#[derive(Debug, Clone, Serialize, Deserialize)]
1140#[serde(untagged)]
1141pub enum PatchThemeWithIdError {
1142    DefaultResponse(models::Errors),
1143    UnknownValue(serde_json::Value),
1144}
1145
1146/// struct for typed errors of method [`patch_user_action_reason_with_id`]
1147#[derive(Debug, Clone, Serialize, Deserialize)]
1148#[serde(untagged)]
1149pub enum PatchUserActionReasonWithIdError {
1150    DefaultResponse(models::Errors),
1151    UnknownValue(serde_json::Value),
1152}
1153
1154/// struct for typed errors of method [`patch_user_action_with_id`]
1155#[derive(Debug, Clone, Serialize, Deserialize)]
1156#[serde(untagged)]
1157pub enum PatchUserActionWithIdError {
1158    DefaultResponse(models::Errors),
1159    UnknownValue(serde_json::Value),
1160}
1161
1162/// struct for typed errors of method [`patch_user_consent_with_id`]
1163#[derive(Debug, Clone, Serialize, Deserialize)]
1164#[serde(untagged)]
1165pub enum PatchUserConsentWithIdError {
1166    DefaultResponse(models::Errors),
1167    UnknownValue(serde_json::Value),
1168}
1169
1170/// struct for typed errors of method [`patch_user_with_id`]
1171#[derive(Debug, Clone, Serialize, Deserialize)]
1172#[serde(untagged)]
1173pub enum PatchUserWithIdError {
1174    DefaultResponse(models::Errors),
1175    UnknownValue(serde_json::Value),
1176}
1177
1178/// struct for typed errors of method [`reconcile_jwt_with_id`]
1179#[derive(Debug, Clone, Serialize, Deserialize)]
1180#[serde(untagged)]
1181pub enum ReconcileJwtWithIdError {
1182    DefaultResponse(models::Errors),
1183    UnknownValue(serde_json::Value),
1184}
1185
1186/// struct for typed errors of method [`register`]
1187#[derive(Debug, Clone, Serialize, Deserialize)]
1188#[serde(untagged)]
1189pub enum RegisterError {
1190    DefaultResponse(models::Errors),
1191    UnknownValue(serde_json::Value),
1192}
1193
1194/// struct for typed errors of method [`register_with_id`]
1195#[derive(Debug, Clone, Serialize, Deserialize)]
1196#[serde(untagged)]
1197pub enum RegisterWithIdError {
1198    DefaultResponse(models::Errors),
1199    UnknownValue(serde_json::Value),
1200}
1201
1202/// struct for typed errors of method [`reindex_with_id`]
1203#[derive(Debug, Clone, Serialize, Deserialize)]
1204#[serde(untagged)]
1205pub enum ReindexWithIdError {
1206    DefaultResponse(models::Errors),
1207    UnknownValue(serde_json::Value),
1208}
1209
1210/// struct for typed errors of method [`remove_user_from_family_with_id`]
1211#[derive(Debug, Clone, Serialize, Deserialize)]
1212#[serde(untagged)]
1213pub enum RemoveUserFromFamilyWithIdError {
1214    DefaultResponse(models::Errors),
1215    UnknownValue(serde_json::Value),
1216}
1217
1218/// struct for typed errors of method [`retrieve_action_with_id`]
1219#[derive(Debug, Clone, Serialize, Deserialize)]
1220#[serde(untagged)]
1221pub enum RetrieveActionWithIdError {
1222    DefaultResponse(models::Errors),
1223    UnknownValue(serde_json::Value),
1224}
1225
1226/// struct for typed errors of method [`retrieve_api_key_with_id`]
1227#[derive(Debug, Clone, Serialize, Deserialize)]
1228#[serde(untagged)]
1229pub enum RetrieveApiKeyWithIdError {
1230    DefaultResponse(models::Errors),
1231    UnknownValue(serde_json::Value),
1232}
1233
1234/// struct for typed errors of method [`retrieve_application`]
1235#[derive(Debug, Clone, Serialize, Deserialize)]
1236#[serde(untagged)]
1237pub enum RetrieveApplicationError {
1238    DefaultResponse(),
1239    UnknownValue(serde_json::Value),
1240}
1241
1242/// struct for typed errors of method [`retrieve_application_with_id`]
1243#[derive(Debug, Clone, Serialize, Deserialize)]
1244#[serde(untagged)]
1245pub enum RetrieveApplicationWithIdError {
1246    DefaultResponse(),
1247    UnknownValue(serde_json::Value),
1248}
1249
1250/// struct for typed errors of method [`retrieve_audit_log_with_id`]
1251#[derive(Debug, Clone, Serialize, Deserialize)]
1252#[serde(untagged)]
1253pub enum RetrieveAuditLogWithIdError {
1254    DefaultResponse(models::Errors),
1255    UnknownValue(serde_json::Value),
1256}
1257
1258/// struct for typed errors of method [`retrieve_connector_with_id`]
1259#[derive(Debug, Clone, Serialize, Deserialize)]
1260#[serde(untagged)]
1261pub enum RetrieveConnectorWithIdError {
1262    DefaultResponse(),
1263    UnknownValue(serde_json::Value),
1264}
1265
1266/// struct for typed errors of method [`retrieve_consent_with_id`]
1267#[derive(Debug, Clone, Serialize, Deserialize)]
1268#[serde(untagged)]
1269pub enum RetrieveConsentWithIdError {
1270    DefaultResponse(),
1271    UnknownValue(serde_json::Value),
1272}
1273
1274/// struct for typed errors of method [`retrieve_daily_active_report_with_id`]
1275#[derive(Debug, Clone, Serialize, Deserialize)]
1276#[serde(untagged)]
1277pub enum RetrieveDailyActiveReportWithIdError {
1278    DefaultResponse(models::Errors),
1279    UnknownValue(serde_json::Value),
1280}
1281
1282/// struct for typed errors of method [`retrieve_device_user_code`]
1283#[derive(Debug, Clone, Serialize, Deserialize)]
1284#[serde(untagged)]
1285pub enum RetrieveDeviceUserCodeError {
1286    DefaultResponse(),
1287    UnknownValue(serde_json::Value),
1288}
1289
1290/// struct for typed errors of method [`retrieve_email_template`]
1291#[derive(Debug, Clone, Serialize, Deserialize)]
1292#[serde(untagged)]
1293pub enum RetrieveEmailTemplateError {
1294    DefaultResponse(),
1295    UnknownValue(serde_json::Value),
1296}
1297
1298/// struct for typed errors of method [`retrieve_email_template_preview_with_id`]
1299#[derive(Debug, Clone, Serialize, Deserialize)]
1300#[serde(untagged)]
1301pub enum RetrieveEmailTemplatePreviewWithIdError {
1302    DefaultResponse(models::Errors),
1303    UnknownValue(serde_json::Value),
1304}
1305
1306/// struct for typed errors of method [`retrieve_email_template_with_id`]
1307#[derive(Debug, Clone, Serialize, Deserialize)]
1308#[serde(untagged)]
1309pub enum RetrieveEmailTemplateWithIdError {
1310    DefaultResponse(),
1311    UnknownValue(serde_json::Value),
1312}
1313
1314/// struct for typed errors of method [`retrieve_entity_grant_with_id`]
1315#[derive(Debug, Clone, Serialize, Deserialize)]
1316#[serde(untagged)]
1317pub enum RetrieveEntityGrantWithIdError {
1318    DefaultResponse(models::Errors),
1319    UnknownValue(serde_json::Value),
1320}
1321
1322/// struct for typed errors of method [`retrieve_entity_type_with_id`]
1323#[derive(Debug, Clone, Serialize, Deserialize)]
1324#[serde(untagged)]
1325pub enum RetrieveEntityTypeWithIdError {
1326    DefaultResponse(models::Errors),
1327    UnknownValue(serde_json::Value),
1328}
1329
1330/// struct for typed errors of method [`retrieve_entity_with_id`]
1331#[derive(Debug, Clone, Serialize, Deserialize)]
1332#[serde(untagged)]
1333pub enum RetrieveEntityWithIdError {
1334    DefaultResponse(models::Errors),
1335    UnknownValue(serde_json::Value),
1336}
1337
1338/// struct for typed errors of method [`retrieve_event_log_with_id`]
1339#[derive(Debug, Clone, Serialize, Deserialize)]
1340#[serde(untagged)]
1341pub enum RetrieveEventLogWithIdError {
1342    DefaultResponse(models::Errors),
1343    UnknownValue(serde_json::Value),
1344}
1345
1346/// struct for typed errors of method [`retrieve_families_with_id`]
1347#[derive(Debug, Clone, Serialize, Deserialize)]
1348#[serde(untagged)]
1349pub enum RetrieveFamiliesWithIdError {
1350    DefaultResponse(),
1351    UnknownValue(serde_json::Value),
1352}
1353
1354/// struct for typed errors of method [`retrieve_family_members_by_family_id_with_id`]
1355#[derive(Debug, Clone, Serialize, Deserialize)]
1356#[serde(untagged)]
1357pub enum RetrieveFamilyMembersByFamilyIdWithIdError {
1358    DefaultResponse(),
1359    UnknownValue(serde_json::Value),
1360}
1361
1362/// struct for typed errors of method [`retrieve_form_field_with_id`]
1363#[derive(Debug, Clone, Serialize, Deserialize)]
1364#[serde(untagged)]
1365pub enum RetrieveFormFieldWithIdError {
1366    DefaultResponse(),
1367    UnknownValue(serde_json::Value),
1368}
1369
1370/// struct for typed errors of method [`retrieve_form_with_id`]
1371#[derive(Debug, Clone, Serialize, Deserialize)]
1372#[serde(untagged)]
1373pub enum RetrieveFormWithIdError {
1374    DefaultResponse(),
1375    UnknownValue(serde_json::Value),
1376}
1377
1378/// struct for typed errors of method [`retrieve_group_with_id`]
1379#[derive(Debug, Clone, Serialize, Deserialize)]
1380#[serde(untagged)]
1381pub enum RetrieveGroupWithIdError {
1382    DefaultResponse(models::Errors),
1383    UnknownValue(serde_json::Value),
1384}
1385
1386/// struct for typed errors of method [`retrieve_identity_provider_by_type_with_id`]
1387#[derive(Debug, Clone, Serialize, Deserialize)]
1388#[serde(untagged)]
1389pub enum RetrieveIdentityProviderByTypeWithIdError {
1390    DefaultResponse(models::Errors),
1391    UnknownValue(serde_json::Value),
1392}
1393
1394/// struct for typed errors of method [`retrieve_identity_provider_link`]
1395#[derive(Debug, Clone, Serialize, Deserialize)]
1396#[serde(untagged)]
1397pub enum RetrieveIdentityProviderLinkError {
1398    DefaultResponse(models::Errors),
1399    UnknownValue(serde_json::Value),
1400}
1401
1402/// struct for typed errors of method [`retrieve_identity_provider_with_id`]
1403#[derive(Debug, Clone, Serialize, Deserialize)]
1404#[serde(untagged)]
1405pub enum RetrieveIdentityProviderWithIdError {
1406    DefaultResponse(models::Errors),
1407    UnknownValue(serde_json::Value),
1408}
1409
1410/// struct for typed errors of method [`retrieve_ip_access_control_list_with_id`]
1411#[derive(Debug, Clone, Serialize, Deserialize)]
1412#[serde(untagged)]
1413pub enum RetrieveIpAccessControlListWithIdError {
1414    DefaultResponse(),
1415    UnknownValue(serde_json::Value),
1416}
1417
1418/// struct for typed errors of method [`retrieve_json_web_key_set_with_id`]
1419#[derive(Debug, Clone, Serialize, Deserialize)]
1420#[serde(untagged)]
1421pub enum RetrieveJsonWebKeySetWithIdError {
1422    DefaultResponse(),
1423    UnknownValue(serde_json::Value),
1424}
1425
1426/// struct for typed errors of method [`retrieve_jwt_public_key`]
1427#[derive(Debug, Clone, Serialize, Deserialize)]
1428#[serde(untagged)]
1429pub enum RetrieveJwtPublicKeyError {
1430    DefaultResponse(),
1431    UnknownValue(serde_json::Value),
1432}
1433
1434/// struct for typed errors of method [`retrieve_key_with_id`]
1435#[derive(Debug, Clone, Serialize, Deserialize)]
1436#[serde(untagged)]
1437pub enum RetrieveKeyWithIdError {
1438    DefaultResponse(models::Errors),
1439    UnknownValue(serde_json::Value),
1440}
1441
1442/// struct for typed errors of method [`retrieve_keys_with_id`]
1443#[derive(Debug, Clone, Serialize, Deserialize)]
1444#[serde(untagged)]
1445pub enum RetrieveKeysWithIdError {
1446    DefaultResponse(),
1447    UnknownValue(serde_json::Value),
1448}
1449
1450/// struct for typed errors of method [`retrieve_lambda_with_id`]
1451#[derive(Debug, Clone, Serialize, Deserialize)]
1452#[serde(untagged)]
1453pub enum RetrieveLambdaWithIdError {
1454    DefaultResponse(models::Errors),
1455    UnknownValue(serde_json::Value),
1456}
1457
1458/// struct for typed errors of method [`retrieve_lambdas_by_type_with_id`]
1459#[derive(Debug, Clone, Serialize, Deserialize)]
1460#[serde(untagged)]
1461pub enum RetrieveLambdasByTypeWithIdError {
1462    DefaultResponse(),
1463    UnknownValue(serde_json::Value),
1464}
1465
1466/// struct for typed errors of method [`retrieve_message_template`]
1467#[derive(Debug, Clone, Serialize, Deserialize)]
1468#[serde(untagged)]
1469pub enum RetrieveMessageTemplateError {
1470    DefaultResponse(),
1471    UnknownValue(serde_json::Value),
1472}
1473
1474/// struct for typed errors of method [`retrieve_message_template_preview_with_id`]
1475#[derive(Debug, Clone, Serialize, Deserialize)]
1476#[serde(untagged)]
1477pub enum RetrieveMessageTemplatePreviewWithIdError {
1478    DefaultResponse(models::Errors),
1479    UnknownValue(serde_json::Value),
1480}
1481
1482/// struct for typed errors of method [`retrieve_message_template_with_id`]
1483#[derive(Debug, Clone, Serialize, Deserialize)]
1484#[serde(untagged)]
1485pub enum RetrieveMessageTemplateWithIdError {
1486    DefaultResponse(),
1487    UnknownValue(serde_json::Value),
1488}
1489
1490/// struct for typed errors of method [`retrieve_messenger_with_id`]
1491#[derive(Debug, Clone, Serialize, Deserialize)]
1492#[serde(untagged)]
1493pub enum RetrieveMessengerWithIdError {
1494    DefaultResponse(),
1495    UnknownValue(serde_json::Value),
1496}
1497
1498/// struct for typed errors of method [`retrieve_monthly_active_report_with_id`]
1499#[derive(Debug, Clone, Serialize, Deserialize)]
1500#[serde(untagged)]
1501pub enum RetrieveMonthlyActiveReportWithIdError {
1502    DefaultResponse(models::Errors),
1503    UnknownValue(serde_json::Value),
1504}
1505
1506/// struct for typed errors of method [`retrieve_o_auth_scope_with_id`]
1507#[derive(Debug, Clone, Serialize, Deserialize)]
1508#[serde(untagged)]
1509pub enum RetrieveOAuthScopeWithIdError {
1510    DefaultResponse(models::Errors),
1511    UnknownValue(serde_json::Value),
1512}
1513
1514/// struct for typed errors of method [`retrieve_oauth_configuration_with_id`]
1515#[derive(Debug, Clone, Serialize, Deserialize)]
1516#[serde(untagged)]
1517pub enum RetrieveOauthConfigurationWithIdError {
1518    DefaultResponse(models::Errors),
1519    UnknownValue(serde_json::Value),
1520}
1521
1522/// struct for typed errors of method [`retrieve_open_id_configuration_with_id`]
1523#[derive(Debug, Clone, Serialize, Deserialize)]
1524#[serde(untagged)]
1525pub enum RetrieveOpenIdConfigurationWithIdError {
1526    DefaultResponse(),
1527    UnknownValue(serde_json::Value),
1528}
1529
1530/// struct for typed errors of method [`retrieve_password_validation_rules_with_id`]
1531#[derive(Debug, Clone, Serialize, Deserialize)]
1532#[serde(untagged)]
1533pub enum RetrievePasswordValidationRulesWithIdError {
1534    DefaultResponse(),
1535    UnknownValue(serde_json::Value),
1536}
1537
1538/// struct for typed errors of method [`retrieve_password_validation_rules_with_tenant_id_with_id`]
1539#[derive(Debug, Clone, Serialize, Deserialize)]
1540#[serde(untagged)]
1541pub enum RetrievePasswordValidationRulesWithTenantIdWithIdError {
1542    DefaultResponse(),
1543    UnknownValue(serde_json::Value),
1544}
1545
1546/// struct for typed errors of method [`retrieve_pending_children_with_id`]
1547#[derive(Debug, Clone, Serialize, Deserialize)]
1548#[serde(untagged)]
1549pub enum RetrievePendingChildrenWithIdError {
1550    DefaultResponse(models::Errors),
1551    UnknownValue(serde_json::Value),
1552}
1553
1554/// struct for typed errors of method [`retrieve_pending_link_with_id`]
1555#[derive(Debug, Clone, Serialize, Deserialize)]
1556#[serde(untagged)]
1557pub enum RetrievePendingLinkWithIdError {
1558    DefaultResponse(models::Errors),
1559    UnknownValue(serde_json::Value),
1560}
1561
1562/// struct for typed errors of method [`retrieve_reactor_metrics_with_id`]
1563#[derive(Debug, Clone, Serialize, Deserialize)]
1564#[serde(untagged)]
1565pub enum RetrieveReactorMetricsWithIdError {
1566    DefaultResponse(),
1567    UnknownValue(serde_json::Value),
1568}
1569
1570/// struct for typed errors of method [`retrieve_refresh_token_by_id_with_id`]
1571#[derive(Debug, Clone, Serialize, Deserialize)]
1572#[serde(untagged)]
1573pub enum RetrieveRefreshTokenByIdWithIdError {
1574    DefaultResponse(models::Errors),
1575    UnknownValue(serde_json::Value),
1576}
1577
1578/// struct for typed errors of method [`retrieve_refresh_tokens_with_id`]
1579#[derive(Debug, Clone, Serialize, Deserialize)]
1580#[serde(untagged)]
1581pub enum RetrieveRefreshTokensWithIdError {
1582    DefaultResponse(models::Errors),
1583    UnknownValue(serde_json::Value),
1584}
1585
1586/// struct for typed errors of method [`retrieve_registration_report_with_id`]
1587#[derive(Debug, Clone, Serialize, Deserialize)]
1588#[serde(untagged)]
1589pub enum RetrieveRegistrationReportWithIdError {
1590    DefaultResponse(models::Errors),
1591    UnknownValue(serde_json::Value),
1592}
1593
1594/// struct for typed errors of method [`retrieve_registration_with_id`]
1595#[derive(Debug, Clone, Serialize, Deserialize)]
1596#[serde(untagged)]
1597pub enum RetrieveRegistrationWithIdError {
1598    DefaultResponse(models::Errors),
1599    UnknownValue(serde_json::Value),
1600}
1601
1602/// struct for typed errors of method [`retrieve_report_login`]
1603#[derive(Debug, Clone, Serialize, Deserialize)]
1604#[serde(untagged)]
1605pub enum RetrieveReportLoginError {
1606    DefaultResponse(models::Errors),
1607    UnknownValue(serde_json::Value),
1608}
1609
1610/// struct for typed errors of method [`retrieve_status`]
1611#[derive(Debug, Clone, Serialize, Deserialize)]
1612#[serde(untagged)]
1613pub enum RetrieveStatusError {
1614    DefaultResponse(),
1615    UnknownValue(serde_json::Value),
1616}
1617
1618/// struct for typed errors of method [`retrieve_system_health_with_id`]
1619#[derive(Debug, Clone, Serialize, Deserialize)]
1620#[serde(untagged)]
1621pub enum RetrieveSystemHealthWithIdError {
1622    DefaultResponse(),
1623    UnknownValue(serde_json::Value),
1624}
1625
1626/// struct for typed errors of method [`retrieve_tenant_with_id`]
1627#[derive(Debug, Clone, Serialize, Deserialize)]
1628#[serde(untagged)]
1629pub enum RetrieveTenantWithIdError {
1630    DefaultResponse(models::Errors),
1631    UnknownValue(serde_json::Value),
1632}
1633
1634/// struct for typed errors of method [`retrieve_theme_with_id`]
1635#[derive(Debug, Clone, Serialize, Deserialize)]
1636#[serde(untagged)]
1637pub enum RetrieveThemeWithIdError {
1638    DefaultResponse(models::Errors),
1639    UnknownValue(serde_json::Value),
1640}
1641
1642/// struct for typed errors of method [`retrieve_total_report_with_id`]
1643#[derive(Debug, Clone, Serialize, Deserialize)]
1644#[serde(untagged)]
1645pub enum RetrieveTotalReportWithIdError {
1646    DefaultResponse(),
1647    UnknownValue(serde_json::Value),
1648}
1649
1650/// struct for typed errors of method [`retrieve_two_factor_recovery_codes_with_id`]
1651#[derive(Debug, Clone, Serialize, Deserialize)]
1652#[serde(untagged)]
1653pub enum RetrieveTwoFactorRecoveryCodesWithIdError {
1654    DefaultResponse(models::Errors),
1655    UnknownValue(serde_json::Value),
1656}
1657
1658/// struct for typed errors of method [`retrieve_two_factor_status_with_id`]
1659#[derive(Debug, Clone, Serialize, Deserialize)]
1660#[serde(untagged)]
1661pub enum RetrieveTwoFactorStatusWithIdError {
1662    DefaultResponse(models::Errors),
1663    UnknownValue(serde_json::Value),
1664}
1665
1666/// struct for typed errors of method [`retrieve_user`]
1667#[derive(Debug, Clone, Serialize, Deserialize)]
1668#[serde(untagged)]
1669pub enum RetrieveUserError {
1670    DefaultResponse(models::Errors),
1671    UnknownValue(serde_json::Value),
1672}
1673
1674/// struct for typed errors of method [`retrieve_user_action`]
1675#[derive(Debug, Clone, Serialize, Deserialize)]
1676#[serde(untagged)]
1677pub enum RetrieveUserActionError {
1678    DefaultResponse(),
1679    UnknownValue(serde_json::Value),
1680}
1681
1682/// struct for typed errors of method [`retrieve_user_action_reason`]
1683#[derive(Debug, Clone, Serialize, Deserialize)]
1684#[serde(untagged)]
1685pub enum RetrieveUserActionReasonError {
1686    DefaultResponse(),
1687    UnknownValue(serde_json::Value),
1688}
1689
1690/// struct for typed errors of method [`retrieve_user_action_reason_with_id`]
1691#[derive(Debug, Clone, Serialize, Deserialize)]
1692#[serde(untagged)]
1693pub enum RetrieveUserActionReasonWithIdError {
1694    DefaultResponse(),
1695    UnknownValue(serde_json::Value),
1696}
1697
1698/// struct for typed errors of method [`retrieve_user_action_with_id`]
1699#[derive(Debug, Clone, Serialize, Deserialize)]
1700#[serde(untagged)]
1701pub enum RetrieveUserActionWithIdError {
1702    DefaultResponse(),
1703    UnknownValue(serde_json::Value),
1704}
1705
1706/// struct for typed errors of method [`retrieve_user_actioning`]
1707#[derive(Debug, Clone, Serialize, Deserialize)]
1708#[serde(untagged)]
1709pub enum RetrieveUserActioningError {
1710    DefaultResponse(models::Errors),
1711    UnknownValue(serde_json::Value),
1712}
1713
1714/// struct for typed errors of method [`retrieve_user_change_password`]
1715#[derive(Debug, Clone, Serialize, Deserialize)]
1716#[serde(untagged)]
1717pub enum RetrieveUserChangePasswordError {
1718    DefaultResponse(models::Errors),
1719    UnknownValue(serde_json::Value),
1720}
1721
1722/// struct for typed errors of method [`retrieve_user_comments_with_id`]
1723#[derive(Debug, Clone, Serialize, Deserialize)]
1724#[serde(untagged)]
1725pub enum RetrieveUserCommentsWithIdError {
1726    DefaultResponse(models::Errors),
1727    UnknownValue(serde_json::Value),
1728}
1729
1730/// struct for typed errors of method [`retrieve_user_consent_with_id`]
1731#[derive(Debug, Clone, Serialize, Deserialize)]
1732#[serde(untagged)]
1733pub enum RetrieveUserConsentWithIdError {
1734    DefaultResponse(),
1735    UnknownValue(serde_json::Value),
1736}
1737
1738/// struct for typed errors of method [`retrieve_user_consents_with_id`]
1739#[derive(Debug, Clone, Serialize, Deserialize)]
1740#[serde(untagged)]
1741pub enum RetrieveUserConsentsWithIdError {
1742    DefaultResponse(),
1743    UnknownValue(serde_json::Value),
1744}
1745
1746/// struct for typed errors of method [`retrieve_user_info_from_access_token_with_id`]
1747#[derive(Debug, Clone, Serialize, Deserialize)]
1748#[serde(untagged)]
1749pub enum RetrieveUserInfoFromAccessTokenWithIdError {
1750    DefaultResponse(models::OAuthError),
1751    UnknownValue(serde_json::Value),
1752}
1753
1754/// struct for typed errors of method [`retrieve_user_recent_login`]
1755#[derive(Debug, Clone, Serialize, Deserialize)]
1756#[serde(untagged)]
1757pub enum RetrieveUserRecentLoginError {
1758    DefaultResponse(models::Errors),
1759    UnknownValue(serde_json::Value),
1760}
1761
1762/// struct for typed errors of method [`retrieve_user_with_id`]
1763#[derive(Debug, Clone, Serialize, Deserialize)]
1764#[serde(untagged)]
1765pub enum RetrieveUserWithIdError {
1766    DefaultResponse(models::Errors),
1767    UnknownValue(serde_json::Value),
1768}
1769
1770/// struct for typed errors of method [`retrieve_version_with_id`]
1771#[derive(Debug, Clone, Serialize, Deserialize)]
1772#[serde(untagged)]
1773pub enum RetrieveVersionWithIdError {
1774    DefaultResponse(models::Errors),
1775    UnknownValue(serde_json::Value),
1776}
1777
1778/// struct for typed errors of method [`retrieve_web_authn_credential_with_id`]
1779#[derive(Debug, Clone, Serialize, Deserialize)]
1780#[serde(untagged)]
1781pub enum RetrieveWebAuthnCredentialWithIdError {
1782    DefaultResponse(models::Errors),
1783    UnknownValue(serde_json::Value),
1784}
1785
1786/// struct for typed errors of method [`retrieve_web_authn_credentials_for_user_with_id`]
1787#[derive(Debug, Clone, Serialize, Deserialize)]
1788#[serde(untagged)]
1789pub enum RetrieveWebAuthnCredentialsForUserWithIdError {
1790    DefaultResponse(models::Errors),
1791    UnknownValue(serde_json::Value),
1792}
1793
1794/// struct for typed errors of method [`retrieve_webhook`]
1795#[derive(Debug, Clone, Serialize, Deserialize)]
1796#[serde(untagged)]
1797pub enum RetrieveWebhookError {
1798    DefaultResponse(),
1799    UnknownValue(serde_json::Value),
1800}
1801
1802/// struct for typed errors of method [`retrieve_webhook_attempt_log_with_id`]
1803#[derive(Debug, Clone, Serialize, Deserialize)]
1804#[serde(untagged)]
1805pub enum RetrieveWebhookAttemptLogWithIdError {
1806    DefaultResponse(models::Errors),
1807    UnknownValue(serde_json::Value),
1808}
1809
1810/// struct for typed errors of method [`retrieve_webhook_event_log_with_id`]
1811#[derive(Debug, Clone, Serialize, Deserialize)]
1812#[serde(untagged)]
1813pub enum RetrieveWebhookEventLogWithIdError {
1814    DefaultResponse(models::Errors),
1815    UnknownValue(serde_json::Value),
1816}
1817
1818/// struct for typed errors of method [`retrieve_webhook_with_id`]
1819#[derive(Debug, Clone, Serialize, Deserialize)]
1820#[serde(untagged)]
1821pub enum RetrieveWebhookWithIdError {
1822    DefaultResponse(),
1823    UnknownValue(serde_json::Value),
1824}
1825
1826/// struct for typed errors of method [`revoke_refresh_token_by_id_with_id`]
1827#[derive(Debug, Clone, Serialize, Deserialize)]
1828#[serde(untagged)]
1829pub enum RevokeRefreshTokenByIdWithIdError {
1830    DefaultResponse(models::Errors),
1831    UnknownValue(serde_json::Value),
1832}
1833
1834/// struct for typed errors of method [`revoke_user_consent_with_id`]
1835#[derive(Debug, Clone, Serialize, Deserialize)]
1836#[serde(untagged)]
1837pub enum RevokeUserConsentWithIdError {
1838    DefaultResponse(),
1839    UnknownValue(serde_json::Value),
1840}
1841
1842/// struct for typed errors of method [`search_applications_with_id`]
1843#[derive(Debug, Clone, Serialize, Deserialize)]
1844#[serde(untagged)]
1845pub enum SearchApplicationsWithIdError {
1846    DefaultResponse(models::Errors),
1847    UnknownValue(serde_json::Value),
1848}
1849
1850/// struct for typed errors of method [`search_audit_logs_with_id`]
1851#[derive(Debug, Clone, Serialize, Deserialize)]
1852#[serde(untagged)]
1853pub enum SearchAuditLogsWithIdError {
1854    DefaultResponse(models::Errors),
1855    UnknownValue(serde_json::Value),
1856}
1857
1858/// struct for typed errors of method [`search_consents_with_id`]
1859#[derive(Debug, Clone, Serialize, Deserialize)]
1860#[serde(untagged)]
1861pub enum SearchConsentsWithIdError {
1862    DefaultResponse(models::Errors),
1863    UnknownValue(serde_json::Value),
1864}
1865
1866/// struct for typed errors of method [`search_email_templates_with_id`]
1867#[derive(Debug, Clone, Serialize, Deserialize)]
1868#[serde(untagged)]
1869pub enum SearchEmailTemplatesWithIdError {
1870    DefaultResponse(models::Errors),
1871    UnknownValue(serde_json::Value),
1872}
1873
1874/// struct for typed errors of method [`search_entities_by_ids_with_id`]
1875#[derive(Debug, Clone, Serialize, Deserialize)]
1876#[serde(untagged)]
1877pub enum SearchEntitiesByIdsWithIdError {
1878    DefaultResponse(models::Errors),
1879    UnknownValue(serde_json::Value),
1880}
1881
1882/// struct for typed errors of method [`search_entities_with_id`]
1883#[derive(Debug, Clone, Serialize, Deserialize)]
1884#[serde(untagged)]
1885pub enum SearchEntitiesWithIdError {
1886    DefaultResponse(models::Errors),
1887    UnknownValue(serde_json::Value),
1888}
1889
1890/// struct for typed errors of method [`search_entity_grants_with_id`]
1891#[derive(Debug, Clone, Serialize, Deserialize)]
1892#[serde(untagged)]
1893pub enum SearchEntityGrantsWithIdError {
1894    DefaultResponse(models::Errors),
1895    UnknownValue(serde_json::Value),
1896}
1897
1898/// struct for typed errors of method [`search_entity_types_with_id`]
1899#[derive(Debug, Clone, Serialize, Deserialize)]
1900#[serde(untagged)]
1901pub enum SearchEntityTypesWithIdError {
1902    DefaultResponse(models::Errors),
1903    UnknownValue(serde_json::Value),
1904}
1905
1906/// struct for typed errors of method [`search_event_logs_with_id`]
1907#[derive(Debug, Clone, Serialize, Deserialize)]
1908#[serde(untagged)]
1909pub enum SearchEventLogsWithIdError {
1910    DefaultResponse(models::Errors),
1911    UnknownValue(serde_json::Value),
1912}
1913
1914/// struct for typed errors of method [`search_group_members_with_id`]
1915#[derive(Debug, Clone, Serialize, Deserialize)]
1916#[serde(untagged)]
1917pub enum SearchGroupMembersWithIdError {
1918    DefaultResponse(models::Errors),
1919    UnknownValue(serde_json::Value),
1920}
1921
1922/// struct for typed errors of method [`search_groups_with_id`]
1923#[derive(Debug, Clone, Serialize, Deserialize)]
1924#[serde(untagged)]
1925pub enum SearchGroupsWithIdError {
1926    DefaultResponse(models::Errors),
1927    UnknownValue(serde_json::Value),
1928}
1929
1930/// struct for typed errors of method [`search_identity_providers_with_id`]
1931#[derive(Debug, Clone, Serialize, Deserialize)]
1932#[serde(untagged)]
1933pub enum SearchIdentityProvidersWithIdError {
1934    DefaultResponse(models::Errors),
1935    UnknownValue(serde_json::Value),
1936}
1937
1938/// struct for typed errors of method [`search_ip_access_control_lists_with_id`]
1939#[derive(Debug, Clone, Serialize, Deserialize)]
1940#[serde(untagged)]
1941pub enum SearchIpAccessControlListsWithIdError {
1942    DefaultResponse(models::Errors),
1943    UnknownValue(serde_json::Value),
1944}
1945
1946/// struct for typed errors of method [`search_keys_with_id`]
1947#[derive(Debug, Clone, Serialize, Deserialize)]
1948#[serde(untagged)]
1949pub enum SearchKeysWithIdError {
1950    DefaultResponse(models::Errors),
1951    UnknownValue(serde_json::Value),
1952}
1953
1954/// struct for typed errors of method [`search_lambdas_with_id`]
1955#[derive(Debug, Clone, Serialize, Deserialize)]
1956#[serde(untagged)]
1957pub enum SearchLambdasWithIdError {
1958    DefaultResponse(models::Errors),
1959    UnknownValue(serde_json::Value),
1960}
1961
1962/// struct for typed errors of method [`search_login_records_with_id`]
1963#[derive(Debug, Clone, Serialize, Deserialize)]
1964#[serde(untagged)]
1965pub enum SearchLoginRecordsWithIdError {
1966    DefaultResponse(models::Errors),
1967    UnknownValue(serde_json::Value),
1968}
1969
1970/// struct for typed errors of method [`search_tenants_with_id`]
1971#[derive(Debug, Clone, Serialize, Deserialize)]
1972#[serde(untagged)]
1973pub enum SearchTenantsWithIdError {
1974    DefaultResponse(models::Errors),
1975    UnknownValue(serde_json::Value),
1976}
1977
1978/// struct for typed errors of method [`search_themes_with_id`]
1979#[derive(Debug, Clone, Serialize, Deserialize)]
1980#[serde(untagged)]
1981pub enum SearchThemesWithIdError {
1982    DefaultResponse(models::Errors),
1983    UnknownValue(serde_json::Value),
1984}
1985
1986/// struct for typed errors of method [`search_user_comments_with_id`]
1987#[derive(Debug, Clone, Serialize, Deserialize)]
1988#[serde(untagged)]
1989pub enum SearchUserCommentsWithIdError {
1990    DefaultResponse(models::Errors),
1991    UnknownValue(serde_json::Value),
1992}
1993
1994/// struct for typed errors of method [`search_users_by_ids_with_id`]
1995#[derive(Debug, Clone, Serialize, Deserialize)]
1996#[serde(untagged)]
1997pub enum SearchUsersByIdsWithIdError {
1998    DefaultResponse(models::Errors),
1999    UnknownValue(serde_json::Value),
2000}
2001
2002/// struct for typed errors of method [`search_users_by_query_with_id`]
2003#[derive(Debug, Clone, Serialize, Deserialize)]
2004#[serde(untagged)]
2005pub enum SearchUsersByQueryWithIdError {
2006    DefaultResponse(models::Errors),
2007    UnknownValue(serde_json::Value),
2008}
2009
2010/// struct for typed errors of method [`search_webhook_event_logs_with_id`]
2011#[derive(Debug, Clone, Serialize, Deserialize)]
2012#[serde(untagged)]
2013pub enum SearchWebhookEventLogsWithIdError {
2014    DefaultResponse(models::Errors),
2015    UnknownValue(serde_json::Value),
2016}
2017
2018/// struct for typed errors of method [`search_webhooks_with_id`]
2019#[derive(Debug, Clone, Serialize, Deserialize)]
2020#[serde(untagged)]
2021pub enum SearchWebhooksWithIdError {
2022    DefaultResponse(models::Errors),
2023    UnknownValue(serde_json::Value),
2024}
2025
2026/// struct for typed errors of method [`send_email_with_id`]
2027#[derive(Debug, Clone, Serialize, Deserialize)]
2028#[serde(untagged)]
2029pub enum SendEmailWithIdError {
2030    DefaultResponse(models::Errors),
2031    UnknownValue(serde_json::Value),
2032}
2033
2034/// struct for typed errors of method [`send_family_request_email_with_id`]
2035#[derive(Debug, Clone, Serialize, Deserialize)]
2036#[serde(untagged)]
2037pub enum SendFamilyRequestEmailWithIdError {
2038    DefaultResponse(models::Errors),
2039    UnknownValue(serde_json::Value),
2040}
2041
2042/// struct for typed errors of method [`send_passwordless_code_with_id`]
2043#[derive(Debug, Clone, Serialize, Deserialize)]
2044#[serde(untagged)]
2045pub enum SendPasswordlessCodeWithIdError {
2046    DefaultResponse(models::Errors),
2047    UnknownValue(serde_json::Value),
2048}
2049
2050/// struct for typed errors of method [`send_two_factor_code_for_enable_disable_with_id`]
2051#[derive(Debug, Clone, Serialize, Deserialize)]
2052#[serde(untagged)]
2053pub enum SendTwoFactorCodeForEnableDisableWithIdError {
2054    DefaultResponse(models::Errors),
2055    UnknownValue(serde_json::Value),
2056}
2057
2058/// struct for typed errors of method [`send_two_factor_code_for_login_using_method_with_id`]
2059#[derive(Debug, Clone, Serialize, Deserialize)]
2060#[serde(untagged)]
2061pub enum SendTwoFactorCodeForLoginUsingMethodWithIdError {
2062    DefaultResponse(models::Errors),
2063    UnknownValue(serde_json::Value),
2064}
2065
2066/// struct for typed errors of method [`start_identity_provider_login_with_id`]
2067#[derive(Debug, Clone, Serialize, Deserialize)]
2068#[serde(untagged)]
2069pub enum StartIdentityProviderLoginWithIdError {
2070    DefaultResponse(models::Errors),
2071    UnknownValue(serde_json::Value),
2072}
2073
2074/// struct for typed errors of method [`start_passwordless_login_with_id`]
2075#[derive(Debug, Clone, Serialize, Deserialize)]
2076#[serde(untagged)]
2077pub enum StartPasswordlessLoginWithIdError {
2078    DefaultResponse(models::Errors),
2079    UnknownValue(serde_json::Value),
2080}
2081
2082/// struct for typed errors of method [`start_two_factor_login_with_id`]
2083#[derive(Debug, Clone, Serialize, Deserialize)]
2084#[serde(untagged)]
2085pub enum StartTwoFactorLoginWithIdError {
2086    DefaultResponse(models::Errors),
2087    UnknownValue(serde_json::Value),
2088}
2089
2090/// struct for typed errors of method [`start_web_authn_login_with_id`]
2091#[derive(Debug, Clone, Serialize, Deserialize)]
2092#[serde(untagged)]
2093pub enum StartWebAuthnLoginWithIdError {
2094    DefaultResponse(models::Errors),
2095    UnknownValue(serde_json::Value),
2096}
2097
2098/// struct for typed errors of method [`start_web_authn_registration_with_id`]
2099#[derive(Debug, Clone, Serialize, Deserialize)]
2100#[serde(untagged)]
2101pub enum StartWebAuthnRegistrationWithIdError {
2102    DefaultResponse(models::Errors),
2103    UnknownValue(serde_json::Value),
2104}
2105
2106/// struct for typed errors of method [`two_factor_login_with_id`]
2107#[derive(Debug, Clone, Serialize, Deserialize)]
2108#[serde(untagged)]
2109pub enum TwoFactorLoginWithIdError {
2110    DefaultResponse(models::Errors),
2111    UnknownValue(serde_json::Value),
2112}
2113
2114/// struct for typed errors of method [`update_api_key_with_id`]
2115#[derive(Debug, Clone, Serialize, Deserialize)]
2116#[serde(untagged)]
2117pub enum UpdateApiKeyWithIdError {
2118    DefaultResponse(models::Errors),
2119    UnknownValue(serde_json::Value),
2120}
2121
2122/// struct for typed errors of method [`update_application_role_with_id`]
2123#[derive(Debug, Clone, Serialize, Deserialize)]
2124#[serde(untagged)]
2125pub enum UpdateApplicationRoleWithIdError {
2126    DefaultResponse(models::Errors),
2127    UnknownValue(serde_json::Value),
2128}
2129
2130/// struct for typed errors of method [`update_application_with_id`]
2131#[derive(Debug, Clone, Serialize, Deserialize)]
2132#[serde(untagged)]
2133pub enum UpdateApplicationWithIdError {
2134    DefaultResponse(models::Errors),
2135    UnknownValue(serde_json::Value),
2136}
2137
2138/// struct for typed errors of method [`update_connector_with_id`]
2139#[derive(Debug, Clone, Serialize, Deserialize)]
2140#[serde(untagged)]
2141pub enum UpdateConnectorWithIdError {
2142    DefaultResponse(models::Errors),
2143    UnknownValue(serde_json::Value),
2144}
2145
2146/// struct for typed errors of method [`update_consent_with_id`]
2147#[derive(Debug, Clone, Serialize, Deserialize)]
2148#[serde(untagged)]
2149pub enum UpdateConsentWithIdError {
2150    DefaultResponse(models::Errors),
2151    UnknownValue(serde_json::Value),
2152}
2153
2154/// struct for typed errors of method [`update_email_template_with_id`]
2155#[derive(Debug, Clone, Serialize, Deserialize)]
2156#[serde(untagged)]
2157pub enum UpdateEmailTemplateWithIdError {
2158    DefaultResponse(models::Errors),
2159    UnknownValue(serde_json::Value),
2160}
2161
2162/// struct for typed errors of method [`update_entity_type_permission_with_id`]
2163#[derive(Debug, Clone, Serialize, Deserialize)]
2164#[serde(untagged)]
2165pub enum UpdateEntityTypePermissionWithIdError {
2166    DefaultResponse(models::Errors),
2167    UnknownValue(serde_json::Value),
2168}
2169
2170/// struct for typed errors of method [`update_entity_type_with_id`]
2171#[derive(Debug, Clone, Serialize, Deserialize)]
2172#[serde(untagged)]
2173pub enum UpdateEntityTypeWithIdError {
2174    DefaultResponse(models::Errors),
2175    UnknownValue(serde_json::Value),
2176}
2177
2178/// struct for typed errors of method [`update_entity_with_id`]
2179#[derive(Debug, Clone, Serialize, Deserialize)]
2180#[serde(untagged)]
2181pub enum UpdateEntityWithIdError {
2182    DefaultResponse(models::Errors),
2183    UnknownValue(serde_json::Value),
2184}
2185
2186/// struct for typed errors of method [`update_form_field_with_id`]
2187#[derive(Debug, Clone, Serialize, Deserialize)]
2188#[serde(untagged)]
2189pub enum UpdateFormFieldWithIdError {
2190    DefaultResponse(models::Errors),
2191    UnknownValue(serde_json::Value),
2192}
2193
2194/// struct for typed errors of method [`update_form_with_id`]
2195#[derive(Debug, Clone, Serialize, Deserialize)]
2196#[serde(untagged)]
2197pub enum UpdateFormWithIdError {
2198    DefaultResponse(models::Errors),
2199    UnknownValue(serde_json::Value),
2200}
2201
2202/// struct for typed errors of method [`update_group_members_with_id`]
2203#[derive(Debug, Clone, Serialize, Deserialize)]
2204#[serde(untagged)]
2205pub enum UpdateGroupMembersWithIdError {
2206    DefaultResponse(models::Errors),
2207    UnknownValue(serde_json::Value),
2208}
2209
2210/// struct for typed errors of method [`update_group_with_id`]
2211#[derive(Debug, Clone, Serialize, Deserialize)]
2212#[serde(untagged)]
2213pub enum UpdateGroupWithIdError {
2214    DefaultResponse(models::Errors),
2215    UnknownValue(serde_json::Value),
2216}
2217
2218/// struct for typed errors of method [`update_identity_provider_with_id`]
2219#[derive(Debug, Clone, Serialize, Deserialize)]
2220#[serde(untagged)]
2221pub enum UpdateIdentityProviderWithIdError {
2222    DefaultResponse(models::Errors),
2223    UnknownValue(serde_json::Value),
2224}
2225
2226/// struct for typed errors of method [`update_integrations_with_id`]
2227#[derive(Debug, Clone, Serialize, Deserialize)]
2228#[serde(untagged)]
2229pub enum UpdateIntegrationsWithIdError {
2230    DefaultResponse(models::Errors),
2231    UnknownValue(serde_json::Value),
2232}
2233
2234/// struct for typed errors of method [`update_ip_access_control_list_with_id`]
2235#[derive(Debug, Clone, Serialize, Deserialize)]
2236#[serde(untagged)]
2237pub enum UpdateIpAccessControlListWithIdError {
2238    DefaultResponse(models::Errors),
2239    UnknownValue(serde_json::Value),
2240}
2241
2242/// struct for typed errors of method [`update_key_with_id`]
2243#[derive(Debug, Clone, Serialize, Deserialize)]
2244#[serde(untagged)]
2245pub enum UpdateKeyWithIdError {
2246    DefaultResponse(models::Errors),
2247    UnknownValue(serde_json::Value),
2248}
2249
2250/// struct for typed errors of method [`update_lambda_with_id`]
2251#[derive(Debug, Clone, Serialize, Deserialize)]
2252#[serde(untagged)]
2253pub enum UpdateLambdaWithIdError {
2254    DefaultResponse(models::Errors),
2255    UnknownValue(serde_json::Value),
2256}
2257
2258/// struct for typed errors of method [`update_message_template_with_id`]
2259#[derive(Debug, Clone, Serialize, Deserialize)]
2260#[serde(untagged)]
2261pub enum UpdateMessageTemplateWithIdError {
2262    DefaultResponse(models::Errors),
2263    UnknownValue(serde_json::Value),
2264}
2265
2266/// struct for typed errors of method [`update_messenger_with_id`]
2267#[derive(Debug, Clone, Serialize, Deserialize)]
2268#[serde(untagged)]
2269pub enum UpdateMessengerWithIdError {
2270    DefaultResponse(models::Errors),
2271    UnknownValue(serde_json::Value),
2272}
2273
2274/// struct for typed errors of method [`update_o_auth_scope_with_id`]
2275#[derive(Debug, Clone, Serialize, Deserialize)]
2276#[serde(untagged)]
2277pub enum UpdateOAuthScopeWithIdError {
2278    DefaultResponse(models::Errors),
2279    UnknownValue(serde_json::Value),
2280}
2281
2282/// struct for typed errors of method [`update_registration_with_id`]
2283#[derive(Debug, Clone, Serialize, Deserialize)]
2284#[serde(untagged)]
2285pub enum UpdateRegistrationWithIdError {
2286    DefaultResponse(models::Errors),
2287    UnknownValue(serde_json::Value),
2288}
2289
2290/// struct for typed errors of method [`update_system_configuration_with_id`]
2291#[derive(Debug, Clone, Serialize, Deserialize)]
2292#[serde(untagged)]
2293pub enum UpdateSystemConfigurationWithIdError {
2294    DefaultResponse(models::Errors),
2295    UnknownValue(serde_json::Value),
2296}
2297
2298/// struct for typed errors of method [`update_tenant_with_id`]
2299#[derive(Debug, Clone, Serialize, Deserialize)]
2300#[serde(untagged)]
2301pub enum UpdateTenantWithIdError {
2302    DefaultResponse(models::Errors),
2303    UnknownValue(serde_json::Value),
2304}
2305
2306/// struct for typed errors of method [`update_theme_with_id`]
2307#[derive(Debug, Clone, Serialize, Deserialize)]
2308#[serde(untagged)]
2309pub enum UpdateThemeWithIdError {
2310    DefaultResponse(models::Errors),
2311    UnknownValue(serde_json::Value),
2312}
2313
2314/// struct for typed errors of method [`update_user_action_reason_with_id`]
2315#[derive(Debug, Clone, Serialize, Deserialize)]
2316#[serde(untagged)]
2317pub enum UpdateUserActionReasonWithIdError {
2318    DefaultResponse(models::Errors),
2319    UnknownValue(serde_json::Value),
2320}
2321
2322/// struct for typed errors of method [`update_user_action_with_id`]
2323#[derive(Debug, Clone, Serialize, Deserialize)]
2324#[serde(untagged)]
2325pub enum UpdateUserActionWithIdError {
2326    DefaultResponse(models::Errors),
2327    UnknownValue(serde_json::Value),
2328}
2329
2330/// struct for typed errors of method [`update_user_consent_with_id`]
2331#[derive(Debug, Clone, Serialize, Deserialize)]
2332#[serde(untagged)]
2333pub enum UpdateUserConsentWithIdError {
2334    DefaultResponse(models::Errors),
2335    UnknownValue(serde_json::Value),
2336}
2337
2338/// struct for typed errors of method [`update_user_verify_email`]
2339#[derive(Debug, Clone, Serialize, Deserialize)]
2340#[serde(untagged)]
2341pub enum UpdateUserVerifyEmailError {
2342    DefaultResponse(),
2343    UnknownValue(serde_json::Value),
2344}
2345
2346/// struct for typed errors of method [`update_user_verify_registration`]
2347#[derive(Debug, Clone, Serialize, Deserialize)]
2348#[serde(untagged)]
2349pub enum UpdateUserVerifyRegistrationError {
2350    DefaultResponse(),
2351    UnknownValue(serde_json::Value),
2352}
2353
2354/// struct for typed errors of method [`update_user_with_id`]
2355#[derive(Debug, Clone, Serialize, Deserialize)]
2356#[serde(untagged)]
2357pub enum UpdateUserWithIdError {
2358    DefaultResponse(models::Errors),
2359    UnknownValue(serde_json::Value),
2360}
2361
2362/// struct for typed errors of method [`update_webhook_with_id`]
2363#[derive(Debug, Clone, Serialize, Deserialize)]
2364#[serde(untagged)]
2365pub enum UpdateWebhookWithIdError {
2366    DefaultResponse(models::Errors),
2367    UnknownValue(serde_json::Value),
2368}
2369
2370/// struct for typed errors of method [`upsert_entity_grant_with_id`]
2371#[derive(Debug, Clone, Serialize, Deserialize)]
2372#[serde(untagged)]
2373pub enum UpsertEntityGrantWithIdError {
2374    DefaultResponse(models::Errors),
2375    UnknownValue(serde_json::Value),
2376}
2377
2378/// struct for typed errors of method [`validate_device_with_id`]
2379#[derive(Debug, Clone, Serialize, Deserialize)]
2380#[serde(untagged)]
2381pub enum ValidateDeviceWithIdError {
2382    DefaultResponse(),
2383    UnknownValue(serde_json::Value),
2384}
2385
2386/// struct for typed errors of method [`validate_jwt_with_id`]
2387#[derive(Debug, Clone, Serialize, Deserialize)]
2388#[serde(untagged)]
2389pub enum ValidateJwtWithIdError {
2390    DefaultResponse(),
2391    UnknownValue(serde_json::Value),
2392}
2393
2394/// struct for typed errors of method [`vend_jwt_with_id`]
2395#[derive(Debug, Clone, Serialize, Deserialize)]
2396#[serde(untagged)]
2397pub enum VendJwtWithIdError {
2398    DefaultResponse(models::Errors),
2399    UnknownValue(serde_json::Value),
2400}
2401
2402/// struct for typed errors of method [`verify_user_registration_with_id`]
2403#[derive(Debug, Clone, Serialize, Deserialize)]
2404#[serde(untagged)]
2405pub enum VerifyUserRegistrationWithIdError {
2406    DefaultResponse(models::Errors),
2407    UnknownValue(serde_json::Value),
2408}
2409
2410
2411/// Takes an action on a user. The user being actioned is called the \"actionee\" and the user taking the action is called the \"actioner\". Both user ids are required in the request object.
2412pub async fn action_user_with_id(configuration: &configuration::Configuration, action_request: Option<models::ActionRequest>) -> Result<models::ActionResponse, Error<ActionUserWithIdError>> {
2413    let local_var_configuration = configuration;
2414
2415    let local_var_client = &local_var_configuration.client;
2416
2417    let local_var_uri_str = format!("{}/api/user/action", local_var_configuration.base_path);
2418    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2419
2420    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2421        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2422    }
2423    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2424        let local_var_key = local_var_apikey.key.clone();
2425        let local_var_value = match local_var_apikey.prefix {
2426            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2427            None => local_var_key,
2428        };
2429        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2430    };
2431    local_var_req_builder = local_var_req_builder.json(&action_request);
2432
2433    let local_var_req = local_var_req_builder.build()?;
2434    let local_var_resp = local_var_client.execute(local_var_req).await?;
2435
2436    let local_var_status = local_var_resp.status();
2437
2438    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2439        let local_var_content = local_var_resp.text().await?;
2440        serde_json::from_str(&local_var_content).map_err(Error::from)
2441    } else {
2442        let local_var_content = local_var_resp.text().await?;
2443        let local_var_entity: Option<ActionUserWithIdError> = serde_json::from_str(&local_var_content).ok();
2444        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2445        Err(Error::ResponseError(local_var_error))
2446    }
2447}
2448
2449/// Activates the FusionAuth Reactor using a license Id and optionally a license text (for air-gapped deployments)
2450pub async fn activate_reactor_with_id(configuration: &configuration::Configuration, reactor_request: Option<models::ReactorRequest>) -> Result<(), Error<ActivateReactorWithIdError>> {
2451    let local_var_configuration = configuration;
2452
2453    let local_var_client = &local_var_configuration.client;
2454
2455    let local_var_uri_str = format!("{}/api/reactor", local_var_configuration.base_path);
2456    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2457
2458    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2459        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2460    }
2461    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2462        let local_var_key = local_var_apikey.key.clone();
2463        let local_var_value = match local_var_apikey.prefix {
2464            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2465            None => local_var_key,
2466        };
2467        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2468    };
2469    local_var_req_builder = local_var_req_builder.json(&reactor_request);
2470
2471    let local_var_req = local_var_req_builder.build()?;
2472    let local_var_resp = local_var_client.execute(local_var_req).await?;
2473
2474    let local_var_status = local_var_resp.status();
2475
2476    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2477        Ok(())
2478    } else {
2479        let local_var_content = local_var_resp.text().await?;
2480        let local_var_entity: Option<ActivateReactorWithIdError> = serde_json::from_str(&local_var_content).ok();
2481        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2482        Err(Error::ResponseError(local_var_error))
2483    }
2484}
2485
2486/// Adds a user to an existing family. The family Id must be specified.
2487pub async fn add_user_to_family_with_id(configuration: &configuration::Configuration, family_id: &str, x_fusion_auth_tenant_id: Option<&str>, family_request: Option<models::FamilyRequest>) -> Result<models::FamilyResponse, Error<AddUserToFamilyWithIdError>> {
2488    let local_var_configuration = configuration;
2489
2490    let local_var_client = &local_var_configuration.client;
2491
2492    let local_var_uri_str = format!("{}/api/user/family/{familyId}", local_var_configuration.base_path, familyId=crate::apis::urlencode(family_id));
2493    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
2494
2495    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2496        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2497    }
2498    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
2499        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
2500    }
2501    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2502        let local_var_key = local_var_apikey.key.clone();
2503        let local_var_value = match local_var_apikey.prefix {
2504            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2505            None => local_var_key,
2506        };
2507        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2508    };
2509    local_var_req_builder = local_var_req_builder.json(&family_request);
2510
2511    let local_var_req = local_var_req_builder.build()?;
2512    let local_var_resp = local_var_client.execute(local_var_req).await?;
2513
2514    let local_var_status = local_var_resp.status();
2515
2516    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2517        let local_var_content = local_var_resp.text().await?;
2518        serde_json::from_str(&local_var_content).map_err(Error::from)
2519    } else {
2520        let local_var_content = local_var_resp.text().await?;
2521        let local_var_entity: Option<AddUserToFamilyWithIdError> = serde_json::from_str(&local_var_content).ok();
2522        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2523        Err(Error::ResponseError(local_var_error))
2524    }
2525}
2526
2527/// Approve a device grant.
2528pub async fn approve_device_with_id(configuration: &configuration::Configuration, ) -> Result<models::DeviceApprovalResponse, Error<ApproveDeviceWithIdError>> {
2529    let local_var_configuration = configuration;
2530
2531    let local_var_client = &local_var_configuration.client;
2532
2533    let local_var_uri_str = format!("{}/oauth2/device/approve", local_var_configuration.base_path);
2534    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2535
2536    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2537        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2538    }
2539    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2540        let local_var_key = local_var_apikey.key.clone();
2541        let local_var_value = match local_var_apikey.prefix {
2542            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2543            None => local_var_key,
2544        };
2545        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2546    };
2547
2548    let local_var_req = local_var_req_builder.build()?;
2549    let local_var_resp = local_var_client.execute(local_var_req).await?;
2550
2551    let local_var_status = local_var_resp.status();
2552
2553    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2554        let local_var_content = local_var_resp.text().await?;
2555        serde_json::from_str(&local_var_content).map_err(Error::from)
2556    } else {
2557        let local_var_content = local_var_resp.text().await?;
2558        let local_var_entity: Option<ApproveDeviceWithIdError> = serde_json::from_str(&local_var_content).ok();
2559        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2560        Err(Error::ResponseError(local_var_error))
2561    }
2562}
2563
2564/// Cancels the user action.
2565pub async fn cancel_action_with_id(configuration: &configuration::Configuration, action_id: &str, action_request: Option<models::ActionRequest>) -> Result<models::ActionResponse, Error<CancelActionWithIdError>> {
2566    let local_var_configuration = configuration;
2567
2568    let local_var_client = &local_var_configuration.client;
2569
2570    let local_var_uri_str = format!("{}/api/user/action/{actionId}", local_var_configuration.base_path, actionId=crate::apis::urlencode(action_id));
2571    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
2572
2573    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2574        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2575    }
2576    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2577        let local_var_key = local_var_apikey.key.clone();
2578        let local_var_value = match local_var_apikey.prefix {
2579            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2580            None => local_var_key,
2581        };
2582        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2583    };
2584    local_var_req_builder = local_var_req_builder.json(&action_request);
2585
2586    let local_var_req = local_var_req_builder.build()?;
2587    let local_var_resp = local_var_client.execute(local_var_req).await?;
2588
2589    let local_var_status = local_var_resp.status();
2590
2591    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2592        let local_var_content = local_var_resp.text().await?;
2593        serde_json::from_str(&local_var_content).map_err(Error::from)
2594    } else {
2595        let local_var_content = local_var_resp.text().await?;
2596        let local_var_entity: Option<CancelActionWithIdError> = serde_json::from_str(&local_var_content).ok();
2597        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2598        Err(Error::ResponseError(local_var_error))
2599    }
2600}
2601
2602/// Changes a user's password using their identity (loginId and password). Using a loginId instead of the changePasswordId bypasses the email verification and allows a password to be changed directly without first calling the #forgotPassword method.
2603pub async fn change_password_by_identity_with_id(configuration: &configuration::Configuration, change_password_request: Option<models::ChangePasswordRequest>) -> Result<(), Error<ChangePasswordByIdentityWithIdError>> {
2604    let local_var_configuration = configuration;
2605
2606    let local_var_client = &local_var_configuration.client;
2607
2608    let local_var_uri_str = format!("{}/api/user/change-password", local_var_configuration.base_path);
2609    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2610
2611    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2612        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2613    }
2614    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2615        let local_var_key = local_var_apikey.key.clone();
2616        let local_var_value = match local_var_apikey.prefix {
2617            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2618            None => local_var_key,
2619        };
2620        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2621    };
2622    local_var_req_builder = local_var_req_builder.json(&change_password_request);
2623
2624    let local_var_req = local_var_req_builder.build()?;
2625    let local_var_resp = local_var_client.execute(local_var_req).await?;
2626
2627    let local_var_status = local_var_resp.status();
2628
2629    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2630        Ok(())
2631    } else {
2632        let local_var_content = local_var_resp.text().await?;
2633        let local_var_entity: Option<ChangePasswordByIdentityWithIdError> = serde_json::from_str(&local_var_content).ok();
2634        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2635        Err(Error::ResponseError(local_var_error))
2636    }
2637}
2638
2639/// Changes a user's password using the change password Id. This usually occurs after an email has been sent to the user and they clicked on a link to reset their password.  As of version 1.32.2, prefer sending the changePasswordId in the request body. To do this, omit the first parameter, and set the value in the request body.
2640pub async fn change_password_with_id(configuration: &configuration::Configuration, change_password_id: &str, change_password_request: Option<models::ChangePasswordRequest>) -> Result<models::ChangePasswordResponse, Error<ChangePasswordWithIdError>> {
2641    let local_var_configuration = configuration;
2642
2643    let local_var_client = &local_var_configuration.client;
2644
2645    let local_var_uri_str = format!("{}/api/user/change-password/{changePasswordId}", local_var_configuration.base_path, changePasswordId=crate::apis::urlencode(change_password_id));
2646    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2647
2648    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2649        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2650    }
2651    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2652        let local_var_key = local_var_apikey.key.clone();
2653        let local_var_value = match local_var_apikey.prefix {
2654            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2655            None => local_var_key,
2656        };
2657        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2658    };
2659    local_var_req_builder = local_var_req_builder.json(&change_password_request);
2660
2661    let local_var_req = local_var_req_builder.build()?;
2662    let local_var_resp = local_var_client.execute(local_var_req).await?;
2663
2664    let local_var_status = local_var_resp.status();
2665
2666    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2667        let local_var_content = local_var_resp.text().await?;
2668        serde_json::from_str(&local_var_content).map_err(Error::from)
2669    } else {
2670        let local_var_content = local_var_resp.text().await?;
2671        let local_var_entity: Option<ChangePasswordWithIdError> = serde_json::from_str(&local_var_content).ok();
2672        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2673        Err(Error::ResponseError(local_var_error))
2674    }
2675}
2676
2677/// Check to see if the user must obtain a Trust Token Id in order to complete a change password request. When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change your password, you must obtain a Trust Token by completing a Two-Factor Step-Up authentication.  An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API.
2678pub async fn check_change_password_using_id_with_id(configuration: &configuration::Configuration, change_password_id: &str) -> Result<(), Error<CheckChangePasswordUsingIdWithIdError>> {
2679    let local_var_configuration = configuration;
2680
2681    let local_var_client = &local_var_configuration.client;
2682
2683    let local_var_uri_str = format!("{}/api/user/change-password/{changePasswordId}", local_var_configuration.base_path, changePasswordId=crate::apis::urlencode(change_password_id));
2684    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2685
2686    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2687        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2688    }
2689    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2690        let local_var_key = local_var_apikey.key.clone();
2691        let local_var_value = match local_var_apikey.prefix {
2692            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2693            None => local_var_key,
2694        };
2695        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2696    };
2697
2698    let local_var_req = local_var_req_builder.build()?;
2699    let local_var_resp = local_var_client.execute(local_var_req).await?;
2700
2701    let local_var_status = local_var_resp.status();
2702
2703    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2704        Ok(())
2705    } else {
2706        let local_var_content = local_var_resp.text().await?;
2707        let local_var_entity: Option<CheckChangePasswordUsingIdWithIdError> = serde_json::from_str(&local_var_content).ok();
2708        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2709        Err(Error::ResponseError(local_var_error))
2710    }
2711}
2712
2713/// Adds a comment to the user's account.
2714pub async fn comment_on_user_with_id(configuration: &configuration::Configuration, x_fusion_auth_tenant_id: Option<&str>, user_comment_request: Option<models::UserCommentRequest>) -> Result<models::UserCommentResponse, Error<CommentOnUserWithIdError>> {
2715    let local_var_configuration = configuration;
2716
2717    let local_var_client = &local_var_configuration.client;
2718
2719    let local_var_uri_str = format!("{}/api/user/comment", local_var_configuration.base_path);
2720    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2721
2722    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2723        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2724    }
2725    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
2726        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
2727    }
2728    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2729        let local_var_key = local_var_apikey.key.clone();
2730        let local_var_value = match local_var_apikey.prefix {
2731            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2732            None => local_var_key,
2733        };
2734        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2735    };
2736    local_var_req_builder = local_var_req_builder.json(&user_comment_request);
2737
2738    let local_var_req = local_var_req_builder.build()?;
2739    let local_var_resp = local_var_client.execute(local_var_req).await?;
2740
2741    let local_var_status = local_var_resp.status();
2742
2743    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2744        let local_var_content = local_var_resp.text().await?;
2745        serde_json::from_str(&local_var_content).map_err(Error::from)
2746    } else {
2747        let local_var_content = local_var_resp.text().await?;
2748        let local_var_entity: Option<CommentOnUserWithIdError> = serde_json::from_str(&local_var_content).ok();
2749        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2750        Err(Error::ResponseError(local_var_error))
2751    }
2752}
2753
2754/// Complete a WebAuthn authentication ceremony by validating the signature against the previously generated challenge without logging the user in
2755pub async fn complete_web_authn_assertion_with_id(configuration: &configuration::Configuration, web_authn_login_request: Option<models::WebAuthnLoginRequest>) -> Result<models::WebAuthnAssertResponse, Error<CompleteWebAuthnAssertionWithIdError>> {
2756    let local_var_configuration = configuration;
2757
2758    let local_var_client = &local_var_configuration.client;
2759
2760    let local_var_uri_str = format!("{}/api/webauthn/assert", local_var_configuration.base_path);
2761    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2762
2763    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2764        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2765    }
2766    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2767        let local_var_key = local_var_apikey.key.clone();
2768        let local_var_value = match local_var_apikey.prefix {
2769            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2770            None => local_var_key,
2771        };
2772        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2773    };
2774    local_var_req_builder = local_var_req_builder.json(&web_authn_login_request);
2775
2776    let local_var_req = local_var_req_builder.build()?;
2777    let local_var_resp = local_var_client.execute(local_var_req).await?;
2778
2779    let local_var_status = local_var_resp.status();
2780
2781    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2782        let local_var_content = local_var_resp.text().await?;
2783        serde_json::from_str(&local_var_content).map_err(Error::from)
2784    } else {
2785        let local_var_content = local_var_resp.text().await?;
2786        let local_var_entity: Option<CompleteWebAuthnAssertionWithIdError> = serde_json::from_str(&local_var_content).ok();
2787        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2788        Err(Error::ResponseError(local_var_error))
2789    }
2790}
2791
2792/// Complete a WebAuthn authentication ceremony by validating the signature against the previously generated challenge and then login the user in
2793pub async fn complete_web_authn_login_with_id(configuration: &configuration::Configuration, web_authn_login_request: Option<models::WebAuthnLoginRequest>) -> Result<models::LoginResponse, Error<CompleteWebAuthnLoginWithIdError>> {
2794    let local_var_configuration = configuration;
2795
2796    let local_var_client = &local_var_configuration.client;
2797
2798    let local_var_uri_str = format!("{}/api/webauthn/login", local_var_configuration.base_path);
2799    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2800
2801    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2802        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2803    }
2804    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2805        let local_var_key = local_var_apikey.key.clone();
2806        let local_var_value = match local_var_apikey.prefix {
2807            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2808            None => local_var_key,
2809        };
2810        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2811    };
2812    local_var_req_builder = local_var_req_builder.json(&web_authn_login_request);
2813
2814    let local_var_req = local_var_req_builder.build()?;
2815    let local_var_resp = local_var_client.execute(local_var_req).await?;
2816
2817    let local_var_status = local_var_resp.status();
2818
2819    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2820        let local_var_content = local_var_resp.text().await?;
2821        serde_json::from_str(&local_var_content).map_err(Error::from)
2822    } else {
2823        let local_var_content = local_var_resp.text().await?;
2824        let local_var_entity: Option<CompleteWebAuthnLoginWithIdError> = serde_json::from_str(&local_var_content).ok();
2825        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2826        Err(Error::ResponseError(local_var_error))
2827    }
2828}
2829
2830/// Complete a WebAuthn registration ceremony by validating the client request and saving the new credential
2831pub async fn complete_web_authn_registration_with_id(configuration: &configuration::Configuration, web_authn_register_complete_request: Option<models::WebAuthnRegisterCompleteRequest>) -> Result<models::WebAuthnRegisterCompleteResponse, Error<CompleteWebAuthnRegistrationWithIdError>> {
2832    let local_var_configuration = configuration;
2833
2834    let local_var_client = &local_var_configuration.client;
2835
2836    let local_var_uri_str = format!("{}/api/webauthn/register/complete", local_var_configuration.base_path);
2837    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2838
2839    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2840        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2841    }
2842    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2843        let local_var_key = local_var_apikey.key.clone();
2844        let local_var_value = match local_var_apikey.prefix {
2845            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2846            None => local_var_key,
2847        };
2848        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2849    };
2850    local_var_req_builder = local_var_req_builder.json(&web_authn_register_complete_request);
2851
2852    let local_var_req = local_var_req_builder.build()?;
2853    let local_var_resp = local_var_client.execute(local_var_req).await?;
2854
2855    let local_var_status = local_var_resp.status();
2856
2857    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2858        let local_var_content = local_var_resp.text().await?;
2859        serde_json::from_str(&local_var_content).map_err(Error::from)
2860    } else {
2861        let local_var_content = local_var_resp.text().await?;
2862        let local_var_entity: Option<CompleteWebAuthnRegistrationWithIdError> = serde_json::from_str(&local_var_content).ok();
2863        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2864        Err(Error::ResponseError(local_var_error))
2865    }
2866}
2867
2868/// Creates an API key. You can optionally specify a unique Id for the key, if not provided one will be generated. an API key can only be created with equal or lesser authority. An API key cannot create another API key unless it is granted  to that API key.  If an API key is locked to a tenant, it can only create API Keys for that same tenant.
2869pub async fn create_api_key(configuration: &configuration::Configuration, api_key_request: Option<models::ApiKeyRequest>) -> Result<models::ApiKeyResponse, Error<CreateApiKeyError>> {
2870    let local_var_configuration = configuration;
2871
2872    let local_var_client = &local_var_configuration.client;
2873
2874    let local_var_uri_str = format!("{}/api/api-key", local_var_configuration.base_path);
2875    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2876
2877    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2878        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2879    }
2880    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2881        let local_var_key = local_var_apikey.key.clone();
2882        let local_var_value = match local_var_apikey.prefix {
2883            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2884            None => local_var_key,
2885        };
2886        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2887    };
2888    local_var_req_builder = local_var_req_builder.json(&api_key_request);
2889
2890    let local_var_req = local_var_req_builder.build()?;
2891    let local_var_resp = local_var_client.execute(local_var_req).await?;
2892
2893    let local_var_status = local_var_resp.status();
2894
2895    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2896        let local_var_content = local_var_resp.text().await?;
2897        serde_json::from_str(&local_var_content).map_err(Error::from)
2898    } else {
2899        let local_var_content = local_var_resp.text().await?;
2900        let local_var_entity: Option<CreateApiKeyError> = serde_json::from_str(&local_var_content).ok();
2901        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2902        Err(Error::ResponseError(local_var_error))
2903    }
2904}
2905
2906/// Creates an API key. You can optionally specify a unique Id for the key, if not provided one will be generated. an API key can only be created with equal or lesser authority. An API key cannot create another API key unless it is granted  to that API key.  If an API key is locked to a tenant, it can only create API Keys for that same tenant. OR Updates an authentication API key by given id
2907pub async fn create_api_key_with_id(configuration: &configuration::Configuration, key_id: &str, api_key_request: Option<models::ApiKeyRequest>) -> Result<models::ApiKeyResponse, Error<CreateApiKeyWithIdError>> {
2908    let local_var_configuration = configuration;
2909
2910    let local_var_client = &local_var_configuration.client;
2911
2912    let local_var_uri_str = format!("{}/api/api-key/{keyId}", local_var_configuration.base_path, keyId=crate::apis::urlencode(key_id));
2913    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2914
2915    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2916        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2917    }
2918    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2919        let local_var_key = local_var_apikey.key.clone();
2920        let local_var_value = match local_var_apikey.prefix {
2921            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2922            None => local_var_key,
2923        };
2924        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2925    };
2926    local_var_req_builder = local_var_req_builder.json(&api_key_request);
2927
2928    let local_var_req = local_var_req_builder.build()?;
2929    let local_var_resp = local_var_client.execute(local_var_req).await?;
2930
2931    let local_var_status = local_var_resp.status();
2932
2933    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2934        let local_var_content = local_var_resp.text().await?;
2935        serde_json::from_str(&local_var_content).map_err(Error::from)
2936    } else {
2937        let local_var_content = local_var_resp.text().await?;
2938        let local_var_entity: Option<CreateApiKeyWithIdError> = serde_json::from_str(&local_var_content).ok();
2939        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2940        Err(Error::ResponseError(local_var_error))
2941    }
2942}
2943
2944/// Creates an application. You can optionally specify an Id for the application, if not provided one will be generated.
2945pub async fn create_application(configuration: &configuration::Configuration, x_fusion_auth_tenant_id: Option<&str>, application_request: Option<models::ApplicationRequest>) -> Result<models::ApplicationResponse, Error<CreateApplicationError>> {
2946    let local_var_configuration = configuration;
2947
2948    let local_var_client = &local_var_configuration.client;
2949
2950    let local_var_uri_str = format!("{}/api/application", local_var_configuration.base_path);
2951    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2952
2953    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2954        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2955    }
2956    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
2957        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
2958    }
2959    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2960        let local_var_key = local_var_apikey.key.clone();
2961        let local_var_value = match local_var_apikey.prefix {
2962            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2963            None => local_var_key,
2964        };
2965        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2966    };
2967    local_var_req_builder = local_var_req_builder.json(&application_request);
2968
2969    let local_var_req = local_var_req_builder.build()?;
2970    let local_var_resp = local_var_client.execute(local_var_req).await?;
2971
2972    let local_var_status = local_var_resp.status();
2973
2974    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2975        let local_var_content = local_var_resp.text().await?;
2976        serde_json::from_str(&local_var_content).map_err(Error::from)
2977    } else {
2978        let local_var_content = local_var_resp.text().await?;
2979        let local_var_entity: Option<CreateApplicationError> = serde_json::from_str(&local_var_content).ok();
2980        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2981        Err(Error::ResponseError(local_var_error))
2982    }
2983}
2984
2985/// Creates a new role for an application. You must specify the Id of the application you are creating the role for. You can optionally specify an Id for the role inside the ApplicationRole object itself, if not provided one will be generated.
2986pub async fn create_application_role(configuration: &configuration::Configuration, application_id: &str, x_fusion_auth_tenant_id: Option<&str>, application_request: Option<models::ApplicationRequest>) -> Result<models::ApplicationResponse, Error<CreateApplicationRoleError>> {
2987    let local_var_configuration = configuration;
2988
2989    let local_var_client = &local_var_configuration.client;
2990
2991    let local_var_uri_str = format!("{}/api/application/{applicationId}/role", local_var_configuration.base_path, applicationId=crate::apis::urlencode(application_id));
2992    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2993
2994    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2995        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2996    }
2997    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
2998        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
2999    }
3000    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3001        let local_var_key = local_var_apikey.key.clone();
3002        let local_var_value = match local_var_apikey.prefix {
3003            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3004            None => local_var_key,
3005        };
3006        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3007    };
3008    local_var_req_builder = local_var_req_builder.json(&application_request);
3009
3010    let local_var_req = local_var_req_builder.build()?;
3011    let local_var_resp = local_var_client.execute(local_var_req).await?;
3012
3013    let local_var_status = local_var_resp.status();
3014
3015    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3016        let local_var_content = local_var_resp.text().await?;
3017        serde_json::from_str(&local_var_content).map_err(Error::from)
3018    } else {
3019        let local_var_content = local_var_resp.text().await?;
3020        let local_var_entity: Option<CreateApplicationRoleError> = serde_json::from_str(&local_var_content).ok();
3021        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3022        Err(Error::ResponseError(local_var_error))
3023    }
3024}
3025
3026/// Creates a new role for an application. You must specify the Id of the application you are creating the role for. You can optionally specify an Id for the role inside the ApplicationRole object itself, if not provided one will be generated.
3027pub async fn create_application_role_with_id(configuration: &configuration::Configuration, application_id: &str, role_id: &str, x_fusion_auth_tenant_id: Option<&str>, application_request: Option<models::ApplicationRequest>) -> Result<models::ApplicationResponse, Error<CreateApplicationRoleWithIdError>> {
3028    let local_var_configuration = configuration;
3029
3030    let local_var_client = &local_var_configuration.client;
3031
3032    let local_var_uri_str = format!("{}/api/application/{applicationId}/role/{roleId}", local_var_configuration.base_path, applicationId=crate::apis::urlencode(application_id), roleId=crate::apis::urlencode(role_id));
3033    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3034
3035    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3036        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3037    }
3038    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
3039        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
3040    }
3041    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3042        let local_var_key = local_var_apikey.key.clone();
3043        let local_var_value = match local_var_apikey.prefix {
3044            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3045            None => local_var_key,
3046        };
3047        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3048    };
3049    local_var_req_builder = local_var_req_builder.json(&application_request);
3050
3051    let local_var_req = local_var_req_builder.build()?;
3052    let local_var_resp = local_var_client.execute(local_var_req).await?;
3053
3054    let local_var_status = local_var_resp.status();
3055
3056    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3057        let local_var_content = local_var_resp.text().await?;
3058        serde_json::from_str(&local_var_content).map_err(Error::from)
3059    } else {
3060        let local_var_content = local_var_resp.text().await?;
3061        let local_var_entity: Option<CreateApplicationRoleWithIdError> = serde_json::from_str(&local_var_content).ok();
3062        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3063        Err(Error::ResponseError(local_var_error))
3064    }
3065}
3066
3067/// Creates an application. You can optionally specify an Id for the application, if not provided one will be generated.
3068pub async fn create_application_with_id(configuration: &configuration::Configuration, application_id: &str, x_fusion_auth_tenant_id: Option<&str>, application_request: Option<models::ApplicationRequest>) -> Result<models::ApplicationResponse, Error<CreateApplicationWithIdError>> {
3069    let local_var_configuration = configuration;
3070
3071    let local_var_client = &local_var_configuration.client;
3072
3073    let local_var_uri_str = format!("{}/api/application/{applicationId}", local_var_configuration.base_path, applicationId=crate::apis::urlencode(application_id));
3074    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3075
3076    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3077        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3078    }
3079    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
3080        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
3081    }
3082    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3083        let local_var_key = local_var_apikey.key.clone();
3084        let local_var_value = match local_var_apikey.prefix {
3085            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3086            None => local_var_key,
3087        };
3088        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3089    };
3090    local_var_req_builder = local_var_req_builder.json(&application_request);
3091
3092    let local_var_req = local_var_req_builder.build()?;
3093    let local_var_resp = local_var_client.execute(local_var_req).await?;
3094
3095    let local_var_status = local_var_resp.status();
3096
3097    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3098        let local_var_content = local_var_resp.text().await?;
3099        serde_json::from_str(&local_var_content).map_err(Error::from)
3100    } else {
3101        let local_var_content = local_var_resp.text().await?;
3102        let local_var_entity: Option<CreateApplicationWithIdError> = serde_json::from_str(&local_var_content).ok();
3103        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3104        Err(Error::ResponseError(local_var_error))
3105    }
3106}
3107
3108/// Creates an audit log with the message and user name (usually an email). Audit logs should be written anytime you make changes to the FusionAuth database. When using the FusionAuth App web interface, any changes are automatically written to the audit log. However, if you are accessing the API, you must write the audit logs yourself.
3109pub async fn create_audit_log_with_id(configuration: &configuration::Configuration, audit_log_request: Option<models::AuditLogRequest>) -> Result<models::AuditLogResponse, Error<CreateAuditLogWithIdError>> {
3110    let local_var_configuration = configuration;
3111
3112    let local_var_client = &local_var_configuration.client;
3113
3114    let local_var_uri_str = format!("{}/api/system/audit-log", local_var_configuration.base_path);
3115    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3116
3117    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3118        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3119    }
3120    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3121        let local_var_key = local_var_apikey.key.clone();
3122        let local_var_value = match local_var_apikey.prefix {
3123            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3124            None => local_var_key,
3125        };
3126        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3127    };
3128    local_var_req_builder = local_var_req_builder.json(&audit_log_request);
3129
3130    let local_var_req = local_var_req_builder.build()?;
3131    let local_var_resp = local_var_client.execute(local_var_req).await?;
3132
3133    let local_var_status = local_var_resp.status();
3134
3135    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3136        let local_var_content = local_var_resp.text().await?;
3137        serde_json::from_str(&local_var_content).map_err(Error::from)
3138    } else {
3139        let local_var_content = local_var_resp.text().await?;
3140        let local_var_entity: Option<CreateAuditLogWithIdError> = serde_json::from_str(&local_var_content).ok();
3141        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3142        Err(Error::ResponseError(local_var_error))
3143    }
3144}
3145
3146/// Creates a connector.  You can optionally specify an Id for the connector, if not provided one will be generated.
3147pub async fn create_connector(configuration: &configuration::Configuration, connector_request: Option<models::ConnectorRequest>) -> Result<models::ConnectorResponse, Error<CreateConnectorError>> {
3148    let local_var_configuration = configuration;
3149
3150    let local_var_client = &local_var_configuration.client;
3151
3152    let local_var_uri_str = format!("{}/api/connector", local_var_configuration.base_path);
3153    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3154
3155    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3156        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3157    }
3158    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3159        let local_var_key = local_var_apikey.key.clone();
3160        let local_var_value = match local_var_apikey.prefix {
3161            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3162            None => local_var_key,
3163        };
3164        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3165    };
3166    local_var_req_builder = local_var_req_builder.json(&connector_request);
3167
3168    let local_var_req = local_var_req_builder.build()?;
3169    let local_var_resp = local_var_client.execute(local_var_req).await?;
3170
3171    let local_var_status = local_var_resp.status();
3172
3173    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3174        let local_var_content = local_var_resp.text().await?;
3175        serde_json::from_str(&local_var_content).map_err(Error::from)
3176    } else {
3177        let local_var_content = local_var_resp.text().await?;
3178        let local_var_entity: Option<CreateConnectorError> = serde_json::from_str(&local_var_content).ok();
3179        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3180        Err(Error::ResponseError(local_var_error))
3181    }
3182}
3183
3184/// Creates a connector.  You can optionally specify an Id for the connector, if not provided one will be generated.
3185pub async fn create_connector_with_id(configuration: &configuration::Configuration, connector_id: &str, connector_request: Option<models::ConnectorRequest>) -> Result<models::ConnectorResponse, Error<CreateConnectorWithIdError>> {
3186    let local_var_configuration = configuration;
3187
3188    let local_var_client = &local_var_configuration.client;
3189
3190    let local_var_uri_str = format!("{}/api/connector/{connectorId}", local_var_configuration.base_path, connectorId=crate::apis::urlencode(connector_id));
3191    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3192
3193    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3194        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3195    }
3196    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3197        let local_var_key = local_var_apikey.key.clone();
3198        let local_var_value = match local_var_apikey.prefix {
3199            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3200            None => local_var_key,
3201        };
3202        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3203    };
3204    local_var_req_builder = local_var_req_builder.json(&connector_request);
3205
3206    let local_var_req = local_var_req_builder.build()?;
3207    let local_var_resp = local_var_client.execute(local_var_req).await?;
3208
3209    let local_var_status = local_var_resp.status();
3210
3211    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3212        let local_var_content = local_var_resp.text().await?;
3213        serde_json::from_str(&local_var_content).map_err(Error::from)
3214    } else {
3215        let local_var_content = local_var_resp.text().await?;
3216        let local_var_entity: Option<CreateConnectorWithIdError> = serde_json::from_str(&local_var_content).ok();
3217        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3218        Err(Error::ResponseError(local_var_error))
3219    }
3220}
3221
3222/// Creates a user consent type. You can optionally specify an Id for the consent type, if not provided one will be generated.
3223pub async fn create_consent(configuration: &configuration::Configuration, x_fusion_auth_tenant_id: Option<&str>, consent_request: Option<models::ConsentRequest>) -> Result<models::ConsentResponse, Error<CreateConsentError>> {
3224    let local_var_configuration = configuration;
3225
3226    let local_var_client = &local_var_configuration.client;
3227
3228    let local_var_uri_str = format!("{}/api/consent", local_var_configuration.base_path);
3229    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3230
3231    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3232        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3233    }
3234    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
3235        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
3236    }
3237    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3238        let local_var_key = local_var_apikey.key.clone();
3239        let local_var_value = match local_var_apikey.prefix {
3240            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3241            None => local_var_key,
3242        };
3243        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3244    };
3245    local_var_req_builder = local_var_req_builder.json(&consent_request);
3246
3247    let local_var_req = local_var_req_builder.build()?;
3248    let local_var_resp = local_var_client.execute(local_var_req).await?;
3249
3250    let local_var_status = local_var_resp.status();
3251
3252    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3253        let local_var_content = local_var_resp.text().await?;
3254        serde_json::from_str(&local_var_content).map_err(Error::from)
3255    } else {
3256        let local_var_content = local_var_resp.text().await?;
3257        let local_var_entity: Option<CreateConsentError> = serde_json::from_str(&local_var_content).ok();
3258        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3259        Err(Error::ResponseError(local_var_error))
3260    }
3261}
3262
3263/// Creates a user consent type. You can optionally specify an Id for the consent type, if not provided one will be generated.
3264pub async fn create_consent_with_id(configuration: &configuration::Configuration, consent_id: &str, x_fusion_auth_tenant_id: Option<&str>, consent_request: Option<models::ConsentRequest>) -> Result<models::ConsentResponse, Error<CreateConsentWithIdError>> {
3265    let local_var_configuration = configuration;
3266
3267    let local_var_client = &local_var_configuration.client;
3268
3269    let local_var_uri_str = format!("{}/api/consent/{consentId}", local_var_configuration.base_path, consentId=crate::apis::urlencode(consent_id));
3270    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3271
3272    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3273        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3274    }
3275    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
3276        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
3277    }
3278    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3279        let local_var_key = local_var_apikey.key.clone();
3280        let local_var_value = match local_var_apikey.prefix {
3281            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3282            None => local_var_key,
3283        };
3284        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3285    };
3286    local_var_req_builder = local_var_req_builder.json(&consent_request);
3287
3288    let local_var_req = local_var_req_builder.build()?;
3289    let local_var_resp = local_var_client.execute(local_var_req).await?;
3290
3291    let local_var_status = local_var_resp.status();
3292
3293    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3294        let local_var_content = local_var_resp.text().await?;
3295        serde_json::from_str(&local_var_content).map_err(Error::from)
3296    } else {
3297        let local_var_content = local_var_resp.text().await?;
3298        let local_var_entity: Option<CreateConsentWithIdError> = serde_json::from_str(&local_var_content).ok();
3299        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3300        Err(Error::ResponseError(local_var_error))
3301    }
3302}
3303
3304/// Creates an email template. You can optionally specify an Id for the template, if not provided one will be generated.
3305pub async fn create_email_template(configuration: &configuration::Configuration, x_fusion_auth_tenant_id: Option<&str>, email_template_request: Option<models::EmailTemplateRequest>) -> Result<models::EmailTemplateResponse, Error<CreateEmailTemplateError>> {
3306    let local_var_configuration = configuration;
3307
3308    let local_var_client = &local_var_configuration.client;
3309
3310    let local_var_uri_str = format!("{}/api/email/template", local_var_configuration.base_path);
3311    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3312
3313    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3314        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3315    }
3316    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
3317        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
3318    }
3319    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3320        let local_var_key = local_var_apikey.key.clone();
3321        let local_var_value = match local_var_apikey.prefix {
3322            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3323            None => local_var_key,
3324        };
3325        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3326    };
3327    local_var_req_builder = local_var_req_builder.json(&email_template_request);
3328
3329    let local_var_req = local_var_req_builder.build()?;
3330    let local_var_resp = local_var_client.execute(local_var_req).await?;
3331
3332    let local_var_status = local_var_resp.status();
3333
3334    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3335        let local_var_content = local_var_resp.text().await?;
3336        serde_json::from_str(&local_var_content).map_err(Error::from)
3337    } else {
3338        let local_var_content = local_var_resp.text().await?;
3339        let local_var_entity: Option<CreateEmailTemplateError> = serde_json::from_str(&local_var_content).ok();
3340        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3341        Err(Error::ResponseError(local_var_error))
3342    }
3343}
3344
3345/// Creates an email template. You can optionally specify an Id for the template, if not provided one will be generated.
3346pub async fn create_email_template_with_id(configuration: &configuration::Configuration, email_template_id: &str, x_fusion_auth_tenant_id: Option<&str>, email_template_request: Option<models::EmailTemplateRequest>) -> Result<models::EmailTemplateResponse, Error<CreateEmailTemplateWithIdError>> {
3347    let local_var_configuration = configuration;
3348
3349    let local_var_client = &local_var_configuration.client;
3350
3351    let local_var_uri_str = format!("{}/api/email/template/{emailTemplateId}", local_var_configuration.base_path, emailTemplateId=crate::apis::urlencode(email_template_id));
3352    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3353
3354    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3355        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3356    }
3357    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
3358        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
3359    }
3360    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3361        let local_var_key = local_var_apikey.key.clone();
3362        let local_var_value = match local_var_apikey.prefix {
3363            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3364            None => local_var_key,
3365        };
3366        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3367    };
3368    local_var_req_builder = local_var_req_builder.json(&email_template_request);
3369
3370    let local_var_req = local_var_req_builder.build()?;
3371    let local_var_resp = local_var_client.execute(local_var_req).await?;
3372
3373    let local_var_status = local_var_resp.status();
3374
3375    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3376        let local_var_content = local_var_resp.text().await?;
3377        serde_json::from_str(&local_var_content).map_err(Error::from)
3378    } else {
3379        let local_var_content = local_var_resp.text().await?;
3380        let local_var_entity: Option<CreateEmailTemplateWithIdError> = serde_json::from_str(&local_var_content).ok();
3381        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3382        Err(Error::ResponseError(local_var_error))
3383    }
3384}
3385
3386/// Creates an Entity. You can optionally specify an Id for the Entity. If not provided one will be generated.
3387pub async fn create_entity(configuration: &configuration::Configuration, x_fusion_auth_tenant_id: Option<&str>, entity_request: Option<models::EntityRequest>) -> Result<models::EntityResponse, Error<CreateEntityError>> {
3388    let local_var_configuration = configuration;
3389
3390    let local_var_client = &local_var_configuration.client;
3391
3392    let local_var_uri_str = format!("{}/api/entity", local_var_configuration.base_path);
3393    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3394
3395    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3396        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3397    }
3398    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
3399        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
3400    }
3401    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3402        let local_var_key = local_var_apikey.key.clone();
3403        let local_var_value = match local_var_apikey.prefix {
3404            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3405            None => local_var_key,
3406        };
3407        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3408    };
3409    local_var_req_builder = local_var_req_builder.json(&entity_request);
3410
3411    let local_var_req = local_var_req_builder.build()?;
3412    let local_var_resp = local_var_client.execute(local_var_req).await?;
3413
3414    let local_var_status = local_var_resp.status();
3415
3416    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3417        let local_var_content = local_var_resp.text().await?;
3418        serde_json::from_str(&local_var_content).map_err(Error::from)
3419    } else {
3420        let local_var_content = local_var_resp.text().await?;
3421        let local_var_entity: Option<CreateEntityError> = serde_json::from_str(&local_var_content).ok();
3422        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3423        Err(Error::ResponseError(local_var_error))
3424    }
3425}
3426
3427/// Creates a Entity Type. You can optionally specify an Id for the Entity Type, if not provided one will be generated.
3428pub async fn create_entity_type(configuration: &configuration::Configuration, entity_type_request: Option<models::EntityTypeRequest>) -> Result<models::EntityTypeResponse, Error<CreateEntityTypeError>> {
3429    let local_var_configuration = configuration;
3430
3431    let local_var_client = &local_var_configuration.client;
3432
3433    let local_var_uri_str = format!("{}/api/entity/type", local_var_configuration.base_path);
3434    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3435
3436    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3437        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3438    }
3439    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3440        let local_var_key = local_var_apikey.key.clone();
3441        let local_var_value = match local_var_apikey.prefix {
3442            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3443            None => local_var_key,
3444        };
3445        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3446    };
3447    local_var_req_builder = local_var_req_builder.json(&entity_type_request);
3448
3449    let local_var_req = local_var_req_builder.build()?;
3450    let local_var_resp = local_var_client.execute(local_var_req).await?;
3451
3452    let local_var_status = local_var_resp.status();
3453
3454    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3455        let local_var_content = local_var_resp.text().await?;
3456        serde_json::from_str(&local_var_content).map_err(Error::from)
3457    } else {
3458        let local_var_content = local_var_resp.text().await?;
3459        let local_var_entity: Option<CreateEntityTypeError> = serde_json::from_str(&local_var_content).ok();
3460        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3461        Err(Error::ResponseError(local_var_error))
3462    }
3463}
3464
3465/// Creates a new permission for an entity type. You must specify the Id of the entity type you are creating the permission for. You can optionally specify an Id for the permission inside the EntityTypePermission object itself, if not provided one will be generated.
3466pub async fn create_entity_type_permission(configuration: &configuration::Configuration, entity_type_id: &str, entity_type_request: Option<models::EntityTypeRequest>) -> Result<models::EntityTypeResponse, Error<CreateEntityTypePermissionError>> {
3467    let local_var_configuration = configuration;
3468
3469    let local_var_client = &local_var_configuration.client;
3470
3471    let local_var_uri_str = format!("{}/api/entity/type/{entityTypeId}/permission", local_var_configuration.base_path, entityTypeId=crate::apis::urlencode(entity_type_id));
3472    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3473
3474    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3475        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3476    }
3477    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3478        let local_var_key = local_var_apikey.key.clone();
3479        let local_var_value = match local_var_apikey.prefix {
3480            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3481            None => local_var_key,
3482        };
3483        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3484    };
3485    local_var_req_builder = local_var_req_builder.json(&entity_type_request);
3486
3487    let local_var_req = local_var_req_builder.build()?;
3488    let local_var_resp = local_var_client.execute(local_var_req).await?;
3489
3490    let local_var_status = local_var_resp.status();
3491
3492    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3493        let local_var_content = local_var_resp.text().await?;
3494        serde_json::from_str(&local_var_content).map_err(Error::from)
3495    } else {
3496        let local_var_content = local_var_resp.text().await?;
3497        let local_var_entity: Option<CreateEntityTypePermissionError> = serde_json::from_str(&local_var_content).ok();
3498        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3499        Err(Error::ResponseError(local_var_error))
3500    }
3501}
3502
3503/// Creates a new permission for an entity type. You must specify the Id of the entity type you are creating the permission for. You can optionally specify an Id for the permission inside the EntityTypePermission object itself, if not provided one will be generated.
3504pub async fn create_entity_type_permission_with_id(configuration: &configuration::Configuration, entity_type_id: &str, permission_id: &str, entity_type_request: Option<models::EntityTypeRequest>) -> Result<models::EntityTypeResponse, Error<CreateEntityTypePermissionWithIdError>> {
3505    let local_var_configuration = configuration;
3506
3507    let local_var_client = &local_var_configuration.client;
3508
3509    let local_var_uri_str = format!("{}/api/entity/type/{entityTypeId}/permission/{permissionId}", local_var_configuration.base_path, entityTypeId=crate::apis::urlencode(entity_type_id), permissionId=crate::apis::urlencode(permission_id));
3510    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3511
3512    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3513        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3514    }
3515    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3516        let local_var_key = local_var_apikey.key.clone();
3517        let local_var_value = match local_var_apikey.prefix {
3518            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3519            None => local_var_key,
3520        };
3521        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3522    };
3523    local_var_req_builder = local_var_req_builder.json(&entity_type_request);
3524
3525    let local_var_req = local_var_req_builder.build()?;
3526    let local_var_resp = local_var_client.execute(local_var_req).await?;
3527
3528    let local_var_status = local_var_resp.status();
3529
3530    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3531        let local_var_content = local_var_resp.text().await?;
3532        serde_json::from_str(&local_var_content).map_err(Error::from)
3533    } else {
3534        let local_var_content = local_var_resp.text().await?;
3535        let local_var_entity: Option<CreateEntityTypePermissionWithIdError> = serde_json::from_str(&local_var_content).ok();
3536        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3537        Err(Error::ResponseError(local_var_error))
3538    }
3539}
3540
3541/// Creates a Entity Type. You can optionally specify an Id for the Entity Type, if not provided one will be generated.
3542pub async fn create_entity_type_with_id(configuration: &configuration::Configuration, entity_type_id: &str, entity_type_request: Option<models::EntityTypeRequest>) -> Result<models::EntityTypeResponse, Error<CreateEntityTypeWithIdError>> {
3543    let local_var_configuration = configuration;
3544
3545    let local_var_client = &local_var_configuration.client;
3546
3547    let local_var_uri_str = format!("{}/api/entity/type/{entityTypeId}", local_var_configuration.base_path, entityTypeId=crate::apis::urlencode(entity_type_id));
3548    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3549
3550    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3551        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3552    }
3553    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3554        let local_var_key = local_var_apikey.key.clone();
3555        let local_var_value = match local_var_apikey.prefix {
3556            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3557            None => local_var_key,
3558        };
3559        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3560    };
3561    local_var_req_builder = local_var_req_builder.json(&entity_type_request);
3562
3563    let local_var_req = local_var_req_builder.build()?;
3564    let local_var_resp = local_var_client.execute(local_var_req).await?;
3565
3566    let local_var_status = local_var_resp.status();
3567
3568    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3569        let local_var_content = local_var_resp.text().await?;
3570        serde_json::from_str(&local_var_content).map_err(Error::from)
3571    } else {
3572        let local_var_content = local_var_resp.text().await?;
3573        let local_var_entity: Option<CreateEntityTypeWithIdError> = serde_json::from_str(&local_var_content).ok();
3574        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3575        Err(Error::ResponseError(local_var_error))
3576    }
3577}
3578
3579/// Creates an Entity. You can optionally specify an Id for the Entity. If not provided one will be generated.
3580pub async fn create_entity_with_id(configuration: &configuration::Configuration, entity_id: &str, x_fusion_auth_tenant_id: Option<&str>, entity_request: Option<models::EntityRequest>) -> Result<models::EntityResponse, Error<CreateEntityWithIdError>> {
3581    let local_var_configuration = configuration;
3582
3583    let local_var_client = &local_var_configuration.client;
3584
3585    let local_var_uri_str = format!("{}/api/entity/{entityId}", local_var_configuration.base_path, entityId=crate::apis::urlencode(entity_id));
3586    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3587
3588    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3589        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3590    }
3591    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
3592        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
3593    }
3594    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3595        let local_var_key = local_var_apikey.key.clone();
3596        let local_var_value = match local_var_apikey.prefix {
3597            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3598            None => local_var_key,
3599        };
3600        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3601    };
3602    local_var_req_builder = local_var_req_builder.json(&entity_request);
3603
3604    let local_var_req = local_var_req_builder.build()?;
3605    let local_var_resp = local_var_client.execute(local_var_req).await?;
3606
3607    let local_var_status = local_var_resp.status();
3608
3609    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3610        let local_var_content = local_var_resp.text().await?;
3611        serde_json::from_str(&local_var_content).map_err(Error::from)
3612    } else {
3613        let local_var_content = local_var_resp.text().await?;
3614        let local_var_entity: Option<CreateEntityWithIdError> = serde_json::from_str(&local_var_content).ok();
3615        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3616        Err(Error::ResponseError(local_var_error))
3617    }
3618}
3619
3620/// Creates a family with the user Id in the request as the owner and sole member of the family. You can optionally specify an Id for the family, if not provided one will be generated.
3621pub async fn create_family(configuration: &configuration::Configuration, x_fusion_auth_tenant_id: Option<&str>, family_request: Option<models::FamilyRequest>) -> Result<models::FamilyResponse, Error<CreateFamilyError>> {
3622    let local_var_configuration = configuration;
3623
3624    let local_var_client = &local_var_configuration.client;
3625
3626    let local_var_uri_str = format!("{}/api/user/family", local_var_configuration.base_path);
3627    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3628
3629    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3630        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3631    }
3632    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
3633        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
3634    }
3635    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3636        let local_var_key = local_var_apikey.key.clone();
3637        let local_var_value = match local_var_apikey.prefix {
3638            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3639            None => local_var_key,
3640        };
3641        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3642    };
3643    local_var_req_builder = local_var_req_builder.json(&family_request);
3644
3645    let local_var_req = local_var_req_builder.build()?;
3646    let local_var_resp = local_var_client.execute(local_var_req).await?;
3647
3648    let local_var_status = local_var_resp.status();
3649
3650    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3651        let local_var_content = local_var_resp.text().await?;
3652        serde_json::from_str(&local_var_content).map_err(Error::from)
3653    } else {
3654        let local_var_content = local_var_resp.text().await?;
3655        let local_var_entity: Option<CreateFamilyError> = serde_json::from_str(&local_var_content).ok();
3656        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3657        Err(Error::ResponseError(local_var_error))
3658    }
3659}
3660
3661/// Creates a family with the user Id in the request as the owner and sole member of the family. You can optionally specify an Id for the family, if not provided one will be generated.
3662pub async fn create_family_with_id(configuration: &configuration::Configuration, family_id: &str, x_fusion_auth_tenant_id: Option<&str>, family_request: Option<models::FamilyRequest>) -> Result<models::FamilyResponse, Error<CreateFamilyWithIdError>> {
3663    let local_var_configuration = configuration;
3664
3665    let local_var_client = &local_var_configuration.client;
3666
3667    let local_var_uri_str = format!("{}/api/user/family/{familyId}", local_var_configuration.base_path, familyId=crate::apis::urlencode(family_id));
3668    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3669
3670    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3671        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3672    }
3673    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
3674        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
3675    }
3676    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3677        let local_var_key = local_var_apikey.key.clone();
3678        let local_var_value = match local_var_apikey.prefix {
3679            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3680            None => local_var_key,
3681        };
3682        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3683    };
3684    local_var_req_builder = local_var_req_builder.json(&family_request);
3685
3686    let local_var_req = local_var_req_builder.build()?;
3687    let local_var_resp = local_var_client.execute(local_var_req).await?;
3688
3689    let local_var_status = local_var_resp.status();
3690
3691    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3692        let local_var_content = local_var_resp.text().await?;
3693        serde_json::from_str(&local_var_content).map_err(Error::from)
3694    } else {
3695        let local_var_content = local_var_resp.text().await?;
3696        let local_var_entity: Option<CreateFamilyWithIdError> = serde_json::from_str(&local_var_content).ok();
3697        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3698        Err(Error::ResponseError(local_var_error))
3699    }
3700}
3701
3702/// Creates a form.  You can optionally specify an Id for the form, if not provided one will be generated.
3703pub async fn create_form(configuration: &configuration::Configuration, form_request: Option<models::FormRequest>) -> Result<models::FormResponse, Error<CreateFormError>> {
3704    let local_var_configuration = configuration;
3705
3706    let local_var_client = &local_var_configuration.client;
3707
3708    let local_var_uri_str = format!("{}/api/form", local_var_configuration.base_path);
3709    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3710
3711    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3712        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3713    }
3714    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3715        let local_var_key = local_var_apikey.key.clone();
3716        let local_var_value = match local_var_apikey.prefix {
3717            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3718            None => local_var_key,
3719        };
3720        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3721    };
3722    local_var_req_builder = local_var_req_builder.json(&form_request);
3723
3724    let local_var_req = local_var_req_builder.build()?;
3725    let local_var_resp = local_var_client.execute(local_var_req).await?;
3726
3727    let local_var_status = local_var_resp.status();
3728
3729    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3730        let local_var_content = local_var_resp.text().await?;
3731        serde_json::from_str(&local_var_content).map_err(Error::from)
3732    } else {
3733        let local_var_content = local_var_resp.text().await?;
3734        let local_var_entity: Option<CreateFormError> = serde_json::from_str(&local_var_content).ok();
3735        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3736        Err(Error::ResponseError(local_var_error))
3737    }
3738}
3739
3740/// Creates a form field.  You can optionally specify an Id for the form, if not provided one will be generated.
3741pub async fn create_form_field(configuration: &configuration::Configuration, form_field_request: Option<models::FormFieldRequest>) -> Result<models::FormFieldResponse, Error<CreateFormFieldError>> {
3742    let local_var_configuration = configuration;
3743
3744    let local_var_client = &local_var_configuration.client;
3745
3746    let local_var_uri_str = format!("{}/api/form/field", local_var_configuration.base_path);
3747    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3748
3749    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3750        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3751    }
3752    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3753        let local_var_key = local_var_apikey.key.clone();
3754        let local_var_value = match local_var_apikey.prefix {
3755            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3756            None => local_var_key,
3757        };
3758        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3759    };
3760    local_var_req_builder = local_var_req_builder.json(&form_field_request);
3761
3762    let local_var_req = local_var_req_builder.build()?;
3763    let local_var_resp = local_var_client.execute(local_var_req).await?;
3764
3765    let local_var_status = local_var_resp.status();
3766
3767    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3768        let local_var_content = local_var_resp.text().await?;
3769        serde_json::from_str(&local_var_content).map_err(Error::from)
3770    } else {
3771        let local_var_content = local_var_resp.text().await?;
3772        let local_var_entity: Option<CreateFormFieldError> = serde_json::from_str(&local_var_content).ok();
3773        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3774        Err(Error::ResponseError(local_var_error))
3775    }
3776}
3777
3778/// Creates a form field.  You can optionally specify an Id for the form, if not provided one will be generated.
3779pub async fn create_form_field_with_id(configuration: &configuration::Configuration, field_id: &str, form_field_request: Option<models::FormFieldRequest>) -> Result<models::FormFieldResponse, Error<CreateFormFieldWithIdError>> {
3780    let local_var_configuration = configuration;
3781
3782    let local_var_client = &local_var_configuration.client;
3783
3784    let local_var_uri_str = format!("{}/api/form/field/{fieldId}", local_var_configuration.base_path, fieldId=crate::apis::urlencode(field_id));
3785    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3786
3787    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3788        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3789    }
3790    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3791        let local_var_key = local_var_apikey.key.clone();
3792        let local_var_value = match local_var_apikey.prefix {
3793            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3794            None => local_var_key,
3795        };
3796        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3797    };
3798    local_var_req_builder = local_var_req_builder.json(&form_field_request);
3799
3800    let local_var_req = local_var_req_builder.build()?;
3801    let local_var_resp = local_var_client.execute(local_var_req).await?;
3802
3803    let local_var_status = local_var_resp.status();
3804
3805    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3806        let local_var_content = local_var_resp.text().await?;
3807        serde_json::from_str(&local_var_content).map_err(Error::from)
3808    } else {
3809        let local_var_content = local_var_resp.text().await?;
3810        let local_var_entity: Option<CreateFormFieldWithIdError> = serde_json::from_str(&local_var_content).ok();
3811        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3812        Err(Error::ResponseError(local_var_error))
3813    }
3814}
3815
3816/// Creates a form.  You can optionally specify an Id for the form, if not provided one will be generated.
3817pub async fn create_form_with_id(configuration: &configuration::Configuration, form_id: &str, form_request: Option<models::FormRequest>) -> Result<models::FormResponse, Error<CreateFormWithIdError>> {
3818    let local_var_configuration = configuration;
3819
3820    let local_var_client = &local_var_configuration.client;
3821
3822    let local_var_uri_str = format!("{}/api/form/{formId}", local_var_configuration.base_path, formId=crate::apis::urlencode(form_id));
3823    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3824
3825    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3826        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3827    }
3828    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3829        let local_var_key = local_var_apikey.key.clone();
3830        let local_var_value = match local_var_apikey.prefix {
3831            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3832            None => local_var_key,
3833        };
3834        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3835    };
3836    local_var_req_builder = local_var_req_builder.json(&form_request);
3837
3838    let local_var_req = local_var_req_builder.build()?;
3839    let local_var_resp = local_var_client.execute(local_var_req).await?;
3840
3841    let local_var_status = local_var_resp.status();
3842
3843    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3844        let local_var_content = local_var_resp.text().await?;
3845        serde_json::from_str(&local_var_content).map_err(Error::from)
3846    } else {
3847        let local_var_content = local_var_resp.text().await?;
3848        let local_var_entity: Option<CreateFormWithIdError> = serde_json::from_str(&local_var_content).ok();
3849        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3850        Err(Error::ResponseError(local_var_error))
3851    }
3852}
3853
3854/// Creates a group. You can optionally specify an Id for the group, if not provided one will be generated.
3855pub async fn create_group(configuration: &configuration::Configuration, x_fusion_auth_tenant_id: Option<&str>, group_request: Option<models::GroupRequest>) -> Result<models::GroupResponse, Error<CreateGroupError>> {
3856    let local_var_configuration = configuration;
3857
3858    let local_var_client = &local_var_configuration.client;
3859
3860    let local_var_uri_str = format!("{}/api/group", local_var_configuration.base_path);
3861    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3862
3863    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3864        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3865    }
3866    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
3867        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
3868    }
3869    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3870        let local_var_key = local_var_apikey.key.clone();
3871        let local_var_value = match local_var_apikey.prefix {
3872            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3873            None => local_var_key,
3874        };
3875        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3876    };
3877    local_var_req_builder = local_var_req_builder.json(&group_request);
3878
3879    let local_var_req = local_var_req_builder.build()?;
3880    let local_var_resp = local_var_client.execute(local_var_req).await?;
3881
3882    let local_var_status = local_var_resp.status();
3883
3884    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3885        let local_var_content = local_var_resp.text().await?;
3886        serde_json::from_str(&local_var_content).map_err(Error::from)
3887    } else {
3888        let local_var_content = local_var_resp.text().await?;
3889        let local_var_entity: Option<CreateGroupError> = serde_json::from_str(&local_var_content).ok();
3890        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3891        Err(Error::ResponseError(local_var_error))
3892    }
3893}
3894
3895/// Creates a member in a group.
3896pub async fn create_group_members_with_id(configuration: &configuration::Configuration, member_request: Option<models::MemberRequest>) -> Result<models::MemberResponse, Error<CreateGroupMembersWithIdError>> {
3897    let local_var_configuration = configuration;
3898
3899    let local_var_client = &local_var_configuration.client;
3900
3901    let local_var_uri_str = format!("{}/api/group/member", local_var_configuration.base_path);
3902    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3903
3904    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3905        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3906    }
3907    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3908        let local_var_key = local_var_apikey.key.clone();
3909        let local_var_value = match local_var_apikey.prefix {
3910            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3911            None => local_var_key,
3912        };
3913        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3914    };
3915    local_var_req_builder = local_var_req_builder.json(&member_request);
3916
3917    let local_var_req = local_var_req_builder.build()?;
3918    let local_var_resp = local_var_client.execute(local_var_req).await?;
3919
3920    let local_var_status = local_var_resp.status();
3921
3922    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3923        let local_var_content = local_var_resp.text().await?;
3924        serde_json::from_str(&local_var_content).map_err(Error::from)
3925    } else {
3926        let local_var_content = local_var_resp.text().await?;
3927        let local_var_entity: Option<CreateGroupMembersWithIdError> = serde_json::from_str(&local_var_content).ok();
3928        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3929        Err(Error::ResponseError(local_var_error))
3930    }
3931}
3932
3933/// Creates a group. You can optionally specify an Id for the group, if not provided one will be generated.
3934pub async fn create_group_with_id(configuration: &configuration::Configuration, group_id: &str, x_fusion_auth_tenant_id: Option<&str>, group_request: Option<models::GroupRequest>) -> Result<models::GroupResponse, Error<CreateGroupWithIdError>> {
3935    let local_var_configuration = configuration;
3936
3937    let local_var_client = &local_var_configuration.client;
3938
3939    let local_var_uri_str = format!("{}/api/group/{groupId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_id));
3940    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3941
3942    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3943        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3944    }
3945    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
3946        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
3947    }
3948    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3949        let local_var_key = local_var_apikey.key.clone();
3950        let local_var_value = match local_var_apikey.prefix {
3951            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3952            None => local_var_key,
3953        };
3954        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3955    };
3956    local_var_req_builder = local_var_req_builder.json(&group_request);
3957
3958    let local_var_req = local_var_req_builder.build()?;
3959    let local_var_resp = local_var_client.execute(local_var_req).await?;
3960
3961    let local_var_status = local_var_resp.status();
3962
3963    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3964        let local_var_content = local_var_resp.text().await?;
3965        serde_json::from_str(&local_var_content).map_err(Error::from)
3966    } else {
3967        let local_var_content = local_var_resp.text().await?;
3968        let local_var_entity: Option<CreateGroupWithIdError> = serde_json::from_str(&local_var_content).ok();
3969        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3970        Err(Error::ResponseError(local_var_error))
3971    }
3972}
3973
3974/// Creates an identity provider. You can optionally specify an Id for the identity provider, if not provided one will be generated.
3975pub async fn create_identity_provider(configuration: &configuration::Configuration, identity_provider_request: Option<models::IdentityProviderRequest>) -> Result<models::IdentityProviderResponse, Error<CreateIdentityProviderError>> {
3976    let local_var_configuration = configuration;
3977
3978    let local_var_client = &local_var_configuration.client;
3979
3980    let local_var_uri_str = format!("{}/api/identity-provider", local_var_configuration.base_path);
3981    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3982
3983    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3984        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3985    }
3986    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3987        let local_var_key = local_var_apikey.key.clone();
3988        let local_var_value = match local_var_apikey.prefix {
3989            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3990            None => local_var_key,
3991        };
3992        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3993    };
3994    local_var_req_builder = local_var_req_builder.json(&identity_provider_request);
3995
3996    let local_var_req = local_var_req_builder.build()?;
3997    let local_var_resp = local_var_client.execute(local_var_req).await?;
3998
3999    let local_var_status = local_var_resp.status();
4000
4001    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4002        let local_var_content = local_var_resp.text().await?;
4003        serde_json::from_str(&local_var_content).map_err(Error::from)
4004    } else {
4005        let local_var_content = local_var_resp.text().await?;
4006        let local_var_entity: Option<CreateIdentityProviderError> = serde_json::from_str(&local_var_content).ok();
4007        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4008        Err(Error::ResponseError(local_var_error))
4009    }
4010}
4011
4012/// Creates an identity provider. You can optionally specify an Id for the identity provider, if not provided one will be generated.
4013pub async fn create_identity_provider_with_id(configuration: &configuration::Configuration, identity_provider_id: &str, identity_provider_request: Option<models::IdentityProviderRequest>) -> Result<models::IdentityProviderResponse, Error<CreateIdentityProviderWithIdError>> {
4014    let local_var_configuration = configuration;
4015
4016    let local_var_client = &local_var_configuration.client;
4017
4018    let local_var_uri_str = format!("{}/api/identity-provider/{identityProviderId}", local_var_configuration.base_path, identityProviderId=crate::apis::urlencode(identity_provider_id));
4019    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4020
4021    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4022        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4023    }
4024    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4025        let local_var_key = local_var_apikey.key.clone();
4026        let local_var_value = match local_var_apikey.prefix {
4027            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4028            None => local_var_key,
4029        };
4030        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4031    };
4032    local_var_req_builder = local_var_req_builder.json(&identity_provider_request);
4033
4034    let local_var_req = local_var_req_builder.build()?;
4035    let local_var_resp = local_var_client.execute(local_var_req).await?;
4036
4037    let local_var_status = local_var_resp.status();
4038
4039    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4040        let local_var_content = local_var_resp.text().await?;
4041        serde_json::from_str(&local_var_content).map_err(Error::from)
4042    } else {
4043        let local_var_content = local_var_resp.text().await?;
4044        let local_var_entity: Option<CreateIdentityProviderWithIdError> = serde_json::from_str(&local_var_content).ok();
4045        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4046        Err(Error::ResponseError(local_var_error))
4047    }
4048}
4049
4050/// Inspect an access token issued as the result of the Client Credentials Grant. OR Inspect an access token issued as the result of the User based grant such as the Authorization Code Grant, Implicit Grant, the User Credentials Grant or the Refresh Grant.
4051pub async fn create_introspect(configuration: &configuration::Configuration, ) -> Result<serde_json::Value, Error<CreateIntrospectError>> {
4052    let local_var_configuration = configuration;
4053
4054    let local_var_client = &local_var_configuration.client;
4055
4056    let local_var_uri_str = format!("{}/oauth2/introspect", local_var_configuration.base_path);
4057    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4058
4059    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4060        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4061    }
4062    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4063        let local_var_key = local_var_apikey.key.clone();
4064        let local_var_value = match local_var_apikey.prefix {
4065            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4066            None => local_var_key,
4067        };
4068        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4069    };
4070
4071    let local_var_req = local_var_req_builder.build()?;
4072    let local_var_resp = local_var_client.execute(local_var_req).await?;
4073
4074    let local_var_status = local_var_resp.status();
4075
4076    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4077        let local_var_content = local_var_resp.text().await?;
4078        serde_json::from_str(&local_var_content).map_err(Error::from)
4079    } else {
4080        let local_var_content = local_var_resp.text().await?;
4081        let local_var_entity: Option<CreateIntrospectError> = serde_json::from_str(&local_var_content).ok();
4082        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4083        Err(Error::ResponseError(local_var_error))
4084    }
4085}
4086
4087/// Creates an IP Access Control List. You can optionally specify an Id on this create request, if one is not provided one will be generated.
4088pub async fn create_ip_access_control_list(configuration: &configuration::Configuration, ip_access_control_list_request: Option<models::IpAccessControlListRequest>) -> Result<models::IpAccessControlListResponse, Error<CreateIpAccessControlListError>> {
4089    let local_var_configuration = configuration;
4090
4091    let local_var_client = &local_var_configuration.client;
4092
4093    let local_var_uri_str = format!("{}/api/ip-acl", local_var_configuration.base_path);
4094    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4095
4096    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4097        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4098    }
4099    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4100        let local_var_key = local_var_apikey.key.clone();
4101        let local_var_value = match local_var_apikey.prefix {
4102            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4103            None => local_var_key,
4104        };
4105        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4106    };
4107    local_var_req_builder = local_var_req_builder.json(&ip_access_control_list_request);
4108
4109    let local_var_req = local_var_req_builder.build()?;
4110    let local_var_resp = local_var_client.execute(local_var_req).await?;
4111
4112    let local_var_status = local_var_resp.status();
4113
4114    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4115        let local_var_content = local_var_resp.text().await?;
4116        serde_json::from_str(&local_var_content).map_err(Error::from)
4117    } else {
4118        let local_var_content = local_var_resp.text().await?;
4119        let local_var_entity: Option<CreateIpAccessControlListError> = serde_json::from_str(&local_var_content).ok();
4120        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4121        Err(Error::ResponseError(local_var_error))
4122    }
4123}
4124
4125/// Creates an IP Access Control List. You can optionally specify an Id on this create request, if one is not provided one will be generated.
4126pub async fn create_ip_access_control_list_with_id(configuration: &configuration::Configuration, access_control_list_id: &str, ip_access_control_list_request: Option<models::IpAccessControlListRequest>) -> Result<models::IpAccessControlListResponse, Error<CreateIpAccessControlListWithIdError>> {
4127    let local_var_configuration = configuration;
4128
4129    let local_var_client = &local_var_configuration.client;
4130
4131    let local_var_uri_str = format!("{}/api/ip-acl/{accessControlListId}", local_var_configuration.base_path, accessControlListId=crate::apis::urlencode(access_control_list_id));
4132    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4133
4134    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4135        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4136    }
4137    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4138        let local_var_key = local_var_apikey.key.clone();
4139        let local_var_value = match local_var_apikey.prefix {
4140            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4141            None => local_var_key,
4142        };
4143        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4144    };
4145    local_var_req_builder = local_var_req_builder.json(&ip_access_control_list_request);
4146
4147    let local_var_req = local_var_req_builder.build()?;
4148    let local_var_resp = local_var_client.execute(local_var_req).await?;
4149
4150    let local_var_status = local_var_resp.status();
4151
4152    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4153        let local_var_content = local_var_resp.text().await?;
4154        serde_json::from_str(&local_var_content).map_err(Error::from)
4155    } else {
4156        let local_var_content = local_var_resp.text().await?;
4157        let local_var_entity: Option<CreateIpAccessControlListWithIdError> = serde_json::from_str(&local_var_content).ok();
4158        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4159        Err(Error::ResponseError(local_var_error))
4160    }
4161}
4162
4163/// Creates a Lambda. You can optionally specify an Id for the lambda, if not provided one will be generated.
4164pub async fn create_lambda(configuration: &configuration::Configuration, lambda_request: Option<models::LambdaRequest>) -> Result<models::LambdaResponse, Error<CreateLambdaError>> {
4165    let local_var_configuration = configuration;
4166
4167    let local_var_client = &local_var_configuration.client;
4168
4169    let local_var_uri_str = format!("{}/api/lambda", local_var_configuration.base_path);
4170    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4171
4172    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4173        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4174    }
4175    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4176        let local_var_key = local_var_apikey.key.clone();
4177        let local_var_value = match local_var_apikey.prefix {
4178            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4179            None => local_var_key,
4180        };
4181        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4182    };
4183    local_var_req_builder = local_var_req_builder.json(&lambda_request);
4184
4185    let local_var_req = local_var_req_builder.build()?;
4186    let local_var_resp = local_var_client.execute(local_var_req).await?;
4187
4188    let local_var_status = local_var_resp.status();
4189
4190    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4191        let local_var_content = local_var_resp.text().await?;
4192        serde_json::from_str(&local_var_content).map_err(Error::from)
4193    } else {
4194        let local_var_content = local_var_resp.text().await?;
4195        let local_var_entity: Option<CreateLambdaError> = serde_json::from_str(&local_var_content).ok();
4196        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4197        Err(Error::ResponseError(local_var_error))
4198    }
4199}
4200
4201/// Creates a Lambda. You can optionally specify an Id for the lambda, if not provided one will be generated.
4202pub async fn create_lambda_with_id(configuration: &configuration::Configuration, lambda_id: &str, lambda_request: Option<models::LambdaRequest>) -> Result<models::LambdaResponse, Error<CreateLambdaWithIdError>> {
4203    let local_var_configuration = configuration;
4204
4205    let local_var_client = &local_var_configuration.client;
4206
4207    let local_var_uri_str = format!("{}/api/lambda/{lambdaId}", local_var_configuration.base_path, lambdaId=crate::apis::urlencode(lambda_id));
4208    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4209
4210    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4211        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4212    }
4213    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4214        let local_var_key = local_var_apikey.key.clone();
4215        let local_var_value = match local_var_apikey.prefix {
4216            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4217            None => local_var_key,
4218        };
4219        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4220    };
4221    local_var_req_builder = local_var_req_builder.json(&lambda_request);
4222
4223    let local_var_req = local_var_req_builder.build()?;
4224    let local_var_resp = local_var_client.execute(local_var_req).await?;
4225
4226    let local_var_status = local_var_resp.status();
4227
4228    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4229        let local_var_content = local_var_resp.text().await?;
4230        serde_json::from_str(&local_var_content).map_err(Error::from)
4231    } else {
4232        let local_var_content = local_var_resp.text().await?;
4233        let local_var_entity: Option<CreateLambdaWithIdError> = serde_json::from_str(&local_var_content).ok();
4234        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4235        Err(Error::ResponseError(local_var_error))
4236    }
4237}
4238
4239/// The Logout API is intended to be used to remove the refresh token and access token cookies if they exist on the client and revoke the refresh token stored. This API does nothing if the request does not contain an access token or refresh token cookies. OR The Logout API is intended to be used to remove the refresh token and access token cookies if they exist on the client and revoke the refresh token stored. This API takes the refresh token in the JSON body.
4240pub async fn create_logout(configuration: &configuration::Configuration, global: Option<&str>, refresh_token: Option<&str>, logout_request: Option<models::LogoutRequest>) -> Result<(), Error<CreateLogoutError>> {
4241    let local_var_configuration = configuration;
4242
4243    let local_var_client = &local_var_configuration.client;
4244
4245    let local_var_uri_str = format!("{}/api/logout", local_var_configuration.base_path);
4246    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4247
4248    if let Some(ref local_var_str) = global {
4249        local_var_req_builder = local_var_req_builder.query(&[("global", &local_var_str.to_string())]);
4250    }
4251    if let Some(ref local_var_str) = refresh_token {
4252        local_var_req_builder = local_var_req_builder.query(&[("refreshToken", &local_var_str.to_string())]);
4253    }
4254    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4255        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4256    }
4257    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4258        let local_var_key = local_var_apikey.key.clone();
4259        let local_var_value = match local_var_apikey.prefix {
4260            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4261            None => local_var_key,
4262        };
4263        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4264    };
4265    local_var_req_builder = local_var_req_builder.json(&logout_request);
4266
4267    let local_var_req = local_var_req_builder.build()?;
4268    let local_var_resp = local_var_client.execute(local_var_req).await?;
4269
4270    let local_var_status = local_var_resp.status();
4271
4272    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4273        Ok(())
4274    } else {
4275        let local_var_content = local_var_resp.text().await?;
4276        let local_var_entity: Option<CreateLogoutError> = serde_json::from_str(&local_var_content).ok();
4277        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4278        Err(Error::ResponseError(local_var_error))
4279    }
4280}
4281
4282/// Creates an message template. You can optionally specify an Id for the template, if not provided one will be generated.
4283pub async fn create_message_template(configuration: &configuration::Configuration, message_template_request: Option<models::MessageTemplateRequest>) -> Result<models::MessageTemplateResponse, Error<CreateMessageTemplateError>> {
4284    let local_var_configuration = configuration;
4285
4286    let local_var_client = &local_var_configuration.client;
4287
4288    let local_var_uri_str = format!("{}/api/message/template", local_var_configuration.base_path);
4289    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4290
4291    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4292        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4293    }
4294    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4295        let local_var_key = local_var_apikey.key.clone();
4296        let local_var_value = match local_var_apikey.prefix {
4297            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4298            None => local_var_key,
4299        };
4300        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4301    };
4302    local_var_req_builder = local_var_req_builder.json(&message_template_request);
4303
4304    let local_var_req = local_var_req_builder.build()?;
4305    let local_var_resp = local_var_client.execute(local_var_req).await?;
4306
4307    let local_var_status = local_var_resp.status();
4308
4309    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4310        let local_var_content = local_var_resp.text().await?;
4311        serde_json::from_str(&local_var_content).map_err(Error::from)
4312    } else {
4313        let local_var_content = local_var_resp.text().await?;
4314        let local_var_entity: Option<CreateMessageTemplateError> = serde_json::from_str(&local_var_content).ok();
4315        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4316        Err(Error::ResponseError(local_var_error))
4317    }
4318}
4319
4320/// Creates an message template. You can optionally specify an Id for the template, if not provided one will be generated.
4321pub async fn create_message_template_with_id(configuration: &configuration::Configuration, message_template_id: &str, message_template_request: Option<models::MessageTemplateRequest>) -> Result<models::MessageTemplateResponse, Error<CreateMessageTemplateWithIdError>> {
4322    let local_var_configuration = configuration;
4323
4324    let local_var_client = &local_var_configuration.client;
4325
4326    let local_var_uri_str = format!("{}/api/message/template/{messageTemplateId}", local_var_configuration.base_path, messageTemplateId=crate::apis::urlencode(message_template_id));
4327    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4328
4329    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4330        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4331    }
4332    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4333        let local_var_key = local_var_apikey.key.clone();
4334        let local_var_value = match local_var_apikey.prefix {
4335            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4336            None => local_var_key,
4337        };
4338        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4339    };
4340    local_var_req_builder = local_var_req_builder.json(&message_template_request);
4341
4342    let local_var_req = local_var_req_builder.build()?;
4343    let local_var_resp = local_var_client.execute(local_var_req).await?;
4344
4345    let local_var_status = local_var_resp.status();
4346
4347    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4348        let local_var_content = local_var_resp.text().await?;
4349        serde_json::from_str(&local_var_content).map_err(Error::from)
4350    } else {
4351        let local_var_content = local_var_resp.text().await?;
4352        let local_var_entity: Option<CreateMessageTemplateWithIdError> = serde_json::from_str(&local_var_content).ok();
4353        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4354        Err(Error::ResponseError(local_var_error))
4355    }
4356}
4357
4358/// Creates a messenger.  You can optionally specify an Id for the messenger, if not provided one will be generated.
4359pub async fn create_messenger(configuration: &configuration::Configuration, messenger_request: Option<models::MessengerRequest>) -> Result<models::MessengerResponse, Error<CreateMessengerError>> {
4360    let local_var_configuration = configuration;
4361
4362    let local_var_client = &local_var_configuration.client;
4363
4364    let local_var_uri_str = format!("{}/api/messenger", local_var_configuration.base_path);
4365    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4366
4367    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4368        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4369    }
4370    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4371        let local_var_key = local_var_apikey.key.clone();
4372        let local_var_value = match local_var_apikey.prefix {
4373            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4374            None => local_var_key,
4375        };
4376        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4377    };
4378    local_var_req_builder = local_var_req_builder.json(&messenger_request);
4379
4380    let local_var_req = local_var_req_builder.build()?;
4381    let local_var_resp = local_var_client.execute(local_var_req).await?;
4382
4383    let local_var_status = local_var_resp.status();
4384
4385    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4386        let local_var_content = local_var_resp.text().await?;
4387        serde_json::from_str(&local_var_content).map_err(Error::from)
4388    } else {
4389        let local_var_content = local_var_resp.text().await?;
4390        let local_var_entity: Option<CreateMessengerError> = serde_json::from_str(&local_var_content).ok();
4391        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4392        Err(Error::ResponseError(local_var_error))
4393    }
4394}
4395
4396/// Creates a messenger.  You can optionally specify an Id for the messenger, if not provided one will be generated.
4397pub async fn create_messenger_with_id(configuration: &configuration::Configuration, messenger_id: &str, messenger_request: Option<models::MessengerRequest>) -> Result<models::MessengerResponse, Error<CreateMessengerWithIdError>> {
4398    let local_var_configuration = configuration;
4399
4400    let local_var_client = &local_var_configuration.client;
4401
4402    let local_var_uri_str = format!("{}/api/messenger/{messengerId}", local_var_configuration.base_path, messengerId=crate::apis::urlencode(messenger_id));
4403    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4404
4405    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4406        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4407    }
4408    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4409        let local_var_key = local_var_apikey.key.clone();
4410        let local_var_value = match local_var_apikey.prefix {
4411            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4412            None => local_var_key,
4413        };
4414        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4415    };
4416    local_var_req_builder = local_var_req_builder.json(&messenger_request);
4417
4418    let local_var_req = local_var_req_builder.build()?;
4419    let local_var_resp = local_var_client.execute(local_var_req).await?;
4420
4421    let local_var_status = local_var_resp.status();
4422
4423    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4424        let local_var_content = local_var_resp.text().await?;
4425        serde_json::from_str(&local_var_content).map_err(Error::from)
4426    } else {
4427        let local_var_content = local_var_resp.text().await?;
4428        let local_var_entity: Option<CreateMessengerWithIdError> = serde_json::from_str(&local_var_content).ok();
4429        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4430        Err(Error::ResponseError(local_var_error))
4431    }
4432}
4433
4434/// Creates a new custom OAuth scope for an application. You must specify the Id of the application you are creating the scope for. You can optionally specify an Id for the OAuth scope on the URL, if not provided one will be generated.
4435pub async fn create_o_auth_scope(configuration: &configuration::Configuration, application_id: &str, x_fusion_auth_tenant_id: Option<&str>, application_o_auth_scope_request: Option<models::ApplicationOAuthScopeRequest>) -> Result<models::ApplicationOAuthScopeResponse, Error<CreateOAuthScopeError>> {
4436    let local_var_configuration = configuration;
4437
4438    let local_var_client = &local_var_configuration.client;
4439
4440    let local_var_uri_str = format!("{}/api/application/{applicationId}/scope", local_var_configuration.base_path, applicationId=crate::apis::urlencode(application_id));
4441    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4442
4443    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4444        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4445    }
4446    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
4447        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
4448    }
4449    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4450        let local_var_key = local_var_apikey.key.clone();
4451        let local_var_value = match local_var_apikey.prefix {
4452            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4453            None => local_var_key,
4454        };
4455        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4456    };
4457    local_var_req_builder = local_var_req_builder.json(&application_o_auth_scope_request);
4458
4459    let local_var_req = local_var_req_builder.build()?;
4460    let local_var_resp = local_var_client.execute(local_var_req).await?;
4461
4462    let local_var_status = local_var_resp.status();
4463
4464    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4465        let local_var_content = local_var_resp.text().await?;
4466        serde_json::from_str(&local_var_content).map_err(Error::from)
4467    } else {
4468        let local_var_content = local_var_resp.text().await?;
4469        let local_var_entity: Option<CreateOAuthScopeError> = serde_json::from_str(&local_var_content).ok();
4470        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4471        Err(Error::ResponseError(local_var_error))
4472    }
4473}
4474
4475/// Creates a new custom OAuth scope for an application. You must specify the Id of the application you are creating the scope for. You can optionally specify an Id for the OAuth scope on the URL, if not provided one will be generated.
4476pub async fn create_o_auth_scope_with_id(configuration: &configuration::Configuration, application_id: &str, scope_id: &str, x_fusion_auth_tenant_id: Option<&str>, application_o_auth_scope_request: Option<models::ApplicationOAuthScopeRequest>) -> Result<models::ApplicationOAuthScopeResponse, Error<CreateOAuthScopeWithIdError>> {
4477    let local_var_configuration = configuration;
4478
4479    let local_var_client = &local_var_configuration.client;
4480
4481    let local_var_uri_str = format!("{}/api/application/{applicationId}/scope/{scopeId}", local_var_configuration.base_path, applicationId=crate::apis::urlencode(application_id), scopeId=crate::apis::urlencode(scope_id));
4482    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4483
4484    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4485        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4486    }
4487    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
4488        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
4489    }
4490    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4491        let local_var_key = local_var_apikey.key.clone();
4492        let local_var_value = match local_var_apikey.prefix {
4493            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4494            None => local_var_key,
4495        };
4496        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4497    };
4498    local_var_req_builder = local_var_req_builder.json(&application_o_auth_scope_request);
4499
4500    let local_var_req = local_var_req_builder.build()?;
4501    let local_var_resp = local_var_client.execute(local_var_req).await?;
4502
4503    let local_var_status = local_var_resp.status();
4504
4505    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4506        let local_var_content = local_var_resp.text().await?;
4507        serde_json::from_str(&local_var_content).map_err(Error::from)
4508    } else {
4509        let local_var_content = local_var_resp.text().await?;
4510        let local_var_entity: Option<CreateOAuthScopeWithIdError> = serde_json::from_str(&local_var_content).ok();
4511        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4512        Err(Error::ResponseError(local_var_error))
4513    }
4514}
4515
4516/// Creates a tenant. You can optionally specify an Id for the tenant, if not provided one will be generated.
4517pub async fn create_tenant(configuration: &configuration::Configuration, x_fusion_auth_tenant_id: Option<&str>, tenant_request: Option<models::TenantRequest>) -> Result<models::TenantResponse, Error<CreateTenantError>> {
4518    let local_var_configuration = configuration;
4519
4520    let local_var_client = &local_var_configuration.client;
4521
4522    let local_var_uri_str = format!("{}/api/tenant", local_var_configuration.base_path);
4523    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4524
4525    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4526        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4527    }
4528    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
4529        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
4530    }
4531    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4532        let local_var_key = local_var_apikey.key.clone();
4533        let local_var_value = match local_var_apikey.prefix {
4534            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4535            None => local_var_key,
4536        };
4537        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4538    };
4539    local_var_req_builder = local_var_req_builder.json(&tenant_request);
4540
4541    let local_var_req = local_var_req_builder.build()?;
4542    let local_var_resp = local_var_client.execute(local_var_req).await?;
4543
4544    let local_var_status = local_var_resp.status();
4545
4546    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4547        let local_var_content = local_var_resp.text().await?;
4548        serde_json::from_str(&local_var_content).map_err(Error::from)
4549    } else {
4550        let local_var_content = local_var_resp.text().await?;
4551        let local_var_entity: Option<CreateTenantError> = serde_json::from_str(&local_var_content).ok();
4552        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4553        Err(Error::ResponseError(local_var_error))
4554    }
4555}
4556
4557/// Creates a tenant. You can optionally specify an Id for the tenant, if not provided one will be generated.
4558pub async fn create_tenant_with_id(configuration: &configuration::Configuration, tenant_id: &str, x_fusion_auth_tenant_id: Option<&str>, tenant_request: Option<models::TenantRequest>) -> Result<models::TenantResponse, Error<CreateTenantWithIdError>> {
4559    let local_var_configuration = configuration;
4560
4561    let local_var_client = &local_var_configuration.client;
4562
4563    let local_var_uri_str = format!("{}/api/tenant/{tenantId}", local_var_configuration.base_path, tenantId=crate::apis::urlencode(tenant_id));
4564    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4565
4566    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4567        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4568    }
4569    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
4570        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
4571    }
4572    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4573        let local_var_key = local_var_apikey.key.clone();
4574        let local_var_value = match local_var_apikey.prefix {
4575            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4576            None => local_var_key,
4577        };
4578        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4579    };
4580    local_var_req_builder = local_var_req_builder.json(&tenant_request);
4581
4582    let local_var_req = local_var_req_builder.build()?;
4583    let local_var_resp = local_var_client.execute(local_var_req).await?;
4584
4585    let local_var_status = local_var_resp.status();
4586
4587    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4588        let local_var_content = local_var_resp.text().await?;
4589        serde_json::from_str(&local_var_content).map_err(Error::from)
4590    } else {
4591        let local_var_content = local_var_resp.text().await?;
4592        let local_var_entity: Option<CreateTenantWithIdError> = serde_json::from_str(&local_var_content).ok();
4593        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4594        Err(Error::ResponseError(local_var_error))
4595    }
4596}
4597
4598/// Creates a Theme. You can optionally specify an Id for the theme, if not provided one will be generated.
4599pub async fn create_theme(configuration: &configuration::Configuration, theme_request: Option<models::ThemeRequest>) -> Result<models::ThemeResponse, Error<CreateThemeError>> {
4600    let local_var_configuration = configuration;
4601
4602    let local_var_client = &local_var_configuration.client;
4603
4604    let local_var_uri_str = format!("{}/api/theme", local_var_configuration.base_path);
4605    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4606
4607    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4608        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4609    }
4610    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4611        let local_var_key = local_var_apikey.key.clone();
4612        let local_var_value = match local_var_apikey.prefix {
4613            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4614            None => local_var_key,
4615        };
4616        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4617    };
4618    local_var_req_builder = local_var_req_builder.json(&theme_request);
4619
4620    let local_var_req = local_var_req_builder.build()?;
4621    let local_var_resp = local_var_client.execute(local_var_req).await?;
4622
4623    let local_var_status = local_var_resp.status();
4624
4625    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4626        let local_var_content = local_var_resp.text().await?;
4627        serde_json::from_str(&local_var_content).map_err(Error::from)
4628    } else {
4629        let local_var_content = local_var_resp.text().await?;
4630        let local_var_entity: Option<CreateThemeError> = serde_json::from_str(&local_var_content).ok();
4631        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4632        Err(Error::ResponseError(local_var_error))
4633    }
4634}
4635
4636/// Creates a Theme. You can optionally specify an Id for the theme, if not provided one will be generated.
4637pub async fn create_theme_with_id(configuration: &configuration::Configuration, theme_id: &str, theme_request: Option<models::ThemeRequest>) -> Result<models::ThemeResponse, Error<CreateThemeWithIdError>> {
4638    let local_var_configuration = configuration;
4639
4640    let local_var_client = &local_var_configuration.client;
4641
4642    let local_var_uri_str = format!("{}/api/theme/{themeId}", local_var_configuration.base_path, themeId=crate::apis::urlencode(theme_id));
4643    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4644
4645    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4646        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4647    }
4648    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4649        let local_var_key = local_var_apikey.key.clone();
4650        let local_var_value = match local_var_apikey.prefix {
4651            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4652            None => local_var_key,
4653        };
4654        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4655    };
4656    local_var_req_builder = local_var_req_builder.json(&theme_request);
4657
4658    let local_var_req = local_var_req_builder.build()?;
4659    let local_var_resp = local_var_client.execute(local_var_req).await?;
4660
4661    let local_var_status = local_var_resp.status();
4662
4663    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4664        let local_var_content = local_var_resp.text().await?;
4665        serde_json::from_str(&local_var_content).map_err(Error::from)
4666    } else {
4667        let local_var_content = local_var_resp.text().await?;
4668        let local_var_entity: Option<CreateThemeWithIdError> = serde_json::from_str(&local_var_content).ok();
4669        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4670        Err(Error::ResponseError(local_var_error))
4671    }
4672}
4673
4674/// Exchange a Refresh Token for an Access Token. If you will be using the Refresh Token Grant, you will make a request to the Token endpoint to exchange the user’s refresh token for an access token. OR Exchange User Credentials for a Token. If you will be using the Resource Owner Password Credential Grant, you will make a request to the Token endpoint to exchange the user’s email and password for an access token. OR Exchanges an OAuth authorization code and code_verifier for an access token. Makes a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint and a code_verifier for an access token. OR Exchanges an OAuth authorization code for an access token. Makes a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint for an access token. OR Make a Client Credentials grant request to obtain an access token.
4675pub async fn create_token(configuration: &configuration::Configuration, ) -> Result<models::AccessToken, Error<CreateTokenError>> {
4676    let local_var_configuration = configuration;
4677
4678    let local_var_client = &local_var_configuration.client;
4679
4680    let local_var_uri_str = format!("{}/oauth2/token", local_var_configuration.base_path);
4681    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4682
4683    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4684        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4685    }
4686    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4687        let local_var_key = local_var_apikey.key.clone();
4688        let local_var_value = match local_var_apikey.prefix {
4689            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4690            None => local_var_key,
4691        };
4692        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4693    };
4694
4695    let local_var_req = local_var_req_builder.build()?;
4696    let local_var_resp = local_var_client.execute(local_var_req).await?;
4697
4698    let local_var_status = local_var_resp.status();
4699
4700    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4701        let local_var_content = local_var_resp.text().await?;
4702        serde_json::from_str(&local_var_content).map_err(Error::from)
4703    } else {
4704        let local_var_content = local_var_resp.text().await?;
4705        let local_var_entity: Option<CreateTokenError> = serde_json::from_str(&local_var_content).ok();
4706        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4707        Err(Error::ResponseError(local_var_error))
4708    }
4709}
4710
4711/// Creates a user. You can optionally specify an Id for the user, if not provided one will be generated.
4712pub async fn create_user(configuration: &configuration::Configuration, x_fusion_auth_tenant_id: Option<&str>, user_request: Option<models::UserRequest>) -> Result<models::UserResponse, Error<CreateUserError>> {
4713    let local_var_configuration = configuration;
4714
4715    let local_var_client = &local_var_configuration.client;
4716
4717    let local_var_uri_str = format!("{}/api/user", local_var_configuration.base_path);
4718    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4719
4720    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4721        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4722    }
4723    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
4724        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
4725    }
4726    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4727        let local_var_key = local_var_apikey.key.clone();
4728        let local_var_value = match local_var_apikey.prefix {
4729            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4730            None => local_var_key,
4731        };
4732        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4733    };
4734    local_var_req_builder = local_var_req_builder.json(&user_request);
4735
4736    let local_var_req = local_var_req_builder.build()?;
4737    let local_var_resp = local_var_client.execute(local_var_req).await?;
4738
4739    let local_var_status = local_var_resp.status();
4740
4741    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4742        let local_var_content = local_var_resp.text().await?;
4743        serde_json::from_str(&local_var_content).map_err(Error::from)
4744    } else {
4745        let local_var_content = local_var_resp.text().await?;
4746        let local_var_entity: Option<CreateUserError> = serde_json::from_str(&local_var_content).ok();
4747        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4748        Err(Error::ResponseError(local_var_error))
4749    }
4750}
4751
4752/// Creates a user action. This action cannot be taken on a user until this call successfully returns. Anytime after that the user action can be applied to any user.
4753pub async fn create_user_action(configuration: &configuration::Configuration, x_fusion_auth_tenant_id: Option<&str>, user_action_request: Option<models::UserActionRequest>) -> Result<models::UserActionResponse, Error<CreateUserActionError>> {
4754    let local_var_configuration = configuration;
4755
4756    let local_var_client = &local_var_configuration.client;
4757
4758    let local_var_uri_str = format!("{}/api/user-action", local_var_configuration.base_path);
4759    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4760
4761    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4762        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4763    }
4764    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
4765        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
4766    }
4767    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4768        let local_var_key = local_var_apikey.key.clone();
4769        let local_var_value = match local_var_apikey.prefix {
4770            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4771            None => local_var_key,
4772        };
4773        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4774    };
4775    local_var_req_builder = local_var_req_builder.json(&user_action_request);
4776
4777    let local_var_req = local_var_req_builder.build()?;
4778    let local_var_resp = local_var_client.execute(local_var_req).await?;
4779
4780    let local_var_status = local_var_resp.status();
4781
4782    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4783        let local_var_content = local_var_resp.text().await?;
4784        serde_json::from_str(&local_var_content).map_err(Error::from)
4785    } else {
4786        let local_var_content = local_var_resp.text().await?;
4787        let local_var_entity: Option<CreateUserActionError> = serde_json::from_str(&local_var_content).ok();
4788        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4789        Err(Error::ResponseError(local_var_error))
4790    }
4791}
4792
4793/// Creates a user reason. This user action reason cannot be used when actioning a user until this call completes successfully. Anytime after that the user action reason can be used.
4794pub async fn create_user_action_reason(configuration: &configuration::Configuration, user_action_reason_request: Option<models::UserActionReasonRequest>) -> Result<models::UserActionReasonResponse, Error<CreateUserActionReasonError>> {
4795    let local_var_configuration = configuration;
4796
4797    let local_var_client = &local_var_configuration.client;
4798
4799    let local_var_uri_str = format!("{}/api/user-action-reason", local_var_configuration.base_path);
4800    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4801
4802    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4803        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4804    }
4805    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4806        let local_var_key = local_var_apikey.key.clone();
4807        let local_var_value = match local_var_apikey.prefix {
4808            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4809            None => local_var_key,
4810        };
4811        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4812    };
4813    local_var_req_builder = local_var_req_builder.json(&user_action_reason_request);
4814
4815    let local_var_req = local_var_req_builder.build()?;
4816    let local_var_resp = local_var_client.execute(local_var_req).await?;
4817
4818    let local_var_status = local_var_resp.status();
4819
4820    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4821        let local_var_content = local_var_resp.text().await?;
4822        serde_json::from_str(&local_var_content).map_err(Error::from)
4823    } else {
4824        let local_var_content = local_var_resp.text().await?;
4825        let local_var_entity: Option<CreateUserActionReasonError> = serde_json::from_str(&local_var_content).ok();
4826        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4827        Err(Error::ResponseError(local_var_error))
4828    }
4829}
4830
4831/// Creates a user reason. This user action reason cannot be used when actioning a user until this call completes successfully. Anytime after that the user action reason can be used.
4832pub async fn create_user_action_reason_with_id(configuration: &configuration::Configuration, user_action_reason_id: &str, user_action_reason_request: Option<models::UserActionReasonRequest>) -> Result<models::UserActionReasonResponse, Error<CreateUserActionReasonWithIdError>> {
4833    let local_var_configuration = configuration;
4834
4835    let local_var_client = &local_var_configuration.client;
4836
4837    let local_var_uri_str = format!("{}/api/user-action-reason/{userActionReasonId}", local_var_configuration.base_path, userActionReasonId=crate::apis::urlencode(user_action_reason_id));
4838    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4839
4840    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4841        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4842    }
4843    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4844        let local_var_key = local_var_apikey.key.clone();
4845        let local_var_value = match local_var_apikey.prefix {
4846            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4847            None => local_var_key,
4848        };
4849        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4850    };
4851    local_var_req_builder = local_var_req_builder.json(&user_action_reason_request);
4852
4853    let local_var_req = local_var_req_builder.build()?;
4854    let local_var_resp = local_var_client.execute(local_var_req).await?;
4855
4856    let local_var_status = local_var_resp.status();
4857
4858    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4859        let local_var_content = local_var_resp.text().await?;
4860        serde_json::from_str(&local_var_content).map_err(Error::from)
4861    } else {
4862        let local_var_content = local_var_resp.text().await?;
4863        let local_var_entity: Option<CreateUserActionReasonWithIdError> = serde_json::from_str(&local_var_content).ok();
4864        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4865        Err(Error::ResponseError(local_var_error))
4866    }
4867}
4868
4869/// Creates a user action. This action cannot be taken on a user until this call successfully returns. Anytime after that the user action can be applied to any user.
4870pub async fn create_user_action_with_id(configuration: &configuration::Configuration, user_action_id: &str, x_fusion_auth_tenant_id: Option<&str>, user_action_request: Option<models::UserActionRequest>) -> Result<models::UserActionResponse, Error<CreateUserActionWithIdError>> {
4871    let local_var_configuration = configuration;
4872
4873    let local_var_client = &local_var_configuration.client;
4874
4875    let local_var_uri_str = format!("{}/api/user-action/{userActionId}", local_var_configuration.base_path, userActionId=crate::apis::urlencode(user_action_id));
4876    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4877
4878    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4879        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4880    }
4881    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
4882        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
4883    }
4884    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4885        let local_var_key = local_var_apikey.key.clone();
4886        let local_var_value = match local_var_apikey.prefix {
4887            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4888            None => local_var_key,
4889        };
4890        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4891    };
4892    local_var_req_builder = local_var_req_builder.json(&user_action_request);
4893
4894    let local_var_req = local_var_req_builder.build()?;
4895    let local_var_resp = local_var_client.execute(local_var_req).await?;
4896
4897    let local_var_status = local_var_resp.status();
4898
4899    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4900        let local_var_content = local_var_resp.text().await?;
4901        serde_json::from_str(&local_var_content).map_err(Error::from)
4902    } else {
4903        let local_var_content = local_var_resp.text().await?;
4904        let local_var_entity: Option<CreateUserActionWithIdError> = serde_json::from_str(&local_var_content).ok();
4905        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4906        Err(Error::ResponseError(local_var_error))
4907    }
4908}
4909
4910/// Creates a single User consent.
4911pub async fn create_user_consent(configuration: &configuration::Configuration, user_consent_request: Option<models::UserConsentRequest>) -> Result<models::UserConsentResponse, Error<CreateUserConsentError>> {
4912    let local_var_configuration = configuration;
4913
4914    let local_var_client = &local_var_configuration.client;
4915
4916    let local_var_uri_str = format!("{}/api/user/consent", local_var_configuration.base_path);
4917    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4918
4919    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4920        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4921    }
4922    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4923        let local_var_key = local_var_apikey.key.clone();
4924        let local_var_value = match local_var_apikey.prefix {
4925            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4926            None => local_var_key,
4927        };
4928        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4929    };
4930    local_var_req_builder = local_var_req_builder.json(&user_consent_request);
4931
4932    let local_var_req = local_var_req_builder.build()?;
4933    let local_var_resp = local_var_client.execute(local_var_req).await?;
4934
4935    let local_var_status = local_var_resp.status();
4936
4937    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4938        let local_var_content = local_var_resp.text().await?;
4939        serde_json::from_str(&local_var_content).map_err(Error::from)
4940    } else {
4941        let local_var_content = local_var_resp.text().await?;
4942        let local_var_entity: Option<CreateUserConsentError> = serde_json::from_str(&local_var_content).ok();
4943        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4944        Err(Error::ResponseError(local_var_error))
4945    }
4946}
4947
4948/// Creates a single User consent.
4949pub async fn create_user_consent_with_id(configuration: &configuration::Configuration, user_consent_id: &str, user_consent_request: Option<models::UserConsentRequest>) -> Result<models::UserConsentResponse, Error<CreateUserConsentWithIdError>> {
4950    let local_var_configuration = configuration;
4951
4952    let local_var_client = &local_var_configuration.client;
4953
4954    let local_var_uri_str = format!("{}/api/user/consent/{userConsentId}", local_var_configuration.base_path, userConsentId=crate::apis::urlencode(user_consent_id));
4955    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4956
4957    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4958        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4959    }
4960    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4961        let local_var_key = local_var_apikey.key.clone();
4962        let local_var_value = match local_var_apikey.prefix {
4963            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4964            None => local_var_key,
4965        };
4966        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4967    };
4968    local_var_req_builder = local_var_req_builder.json(&user_consent_request);
4969
4970    let local_var_req = local_var_req_builder.build()?;
4971    let local_var_resp = local_var_client.execute(local_var_req).await?;
4972
4973    let local_var_status = local_var_resp.status();
4974
4975    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4976        let local_var_content = local_var_resp.text().await?;
4977        serde_json::from_str(&local_var_content).map_err(Error::from)
4978    } else {
4979        let local_var_content = local_var_resp.text().await?;
4980        let local_var_entity: Option<CreateUserConsentWithIdError> = serde_json::from_str(&local_var_content).ok();
4981        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4982        Err(Error::ResponseError(local_var_error))
4983    }
4984}
4985
4986/// Link an external user from a 3rd party identity provider to a FusionAuth user.
4987pub async fn create_user_link_with_id(configuration: &configuration::Configuration, identity_provider_link_request: Option<models::IdentityProviderLinkRequest>) -> Result<models::IdentityProviderLinkResponse, Error<CreateUserLinkWithIdError>> {
4988    let local_var_configuration = configuration;
4989
4990    let local_var_client = &local_var_configuration.client;
4991
4992    let local_var_uri_str = format!("{}/api/identity-provider/link", local_var_configuration.base_path);
4993    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4994
4995    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4996        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4997    }
4998    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4999        let local_var_key = local_var_apikey.key.clone();
5000        let local_var_value = match local_var_apikey.prefix {
5001            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5002            None => local_var_key,
5003        };
5004        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5005    };
5006    local_var_req_builder = local_var_req_builder.json(&identity_provider_link_request);
5007
5008    let local_var_req = local_var_req_builder.build()?;
5009    let local_var_resp = local_var_client.execute(local_var_req).await?;
5010
5011    let local_var_status = local_var_resp.status();
5012
5013    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5014        let local_var_content = local_var_resp.text().await?;
5015        serde_json::from_str(&local_var_content).map_err(Error::from)
5016    } else {
5017        let local_var_content = local_var_resp.text().await?;
5018        let local_var_entity: Option<CreateUserLinkWithIdError> = serde_json::from_str(&local_var_content).ok();
5019        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5020        Err(Error::ResponseError(local_var_error))
5021    }
5022}
5023
5024/// Administratively verify a user's email address. Use this method to bypass email verification for the user.  The request body will contain the userId to be verified. An API key is required when sending the userId in the request body. OR Confirms a user's email address.   The request body will contain the verificationId. You may also be required to send a one-time use code based upon your configuration. When  the tenant is configured to gate a user until their email address is verified, this procedures requires two values instead of one.  The verificationId is a high entropy value and the one-time use code is a low entropy value that is easily entered in a user interactive form. The  two values together are able to confirm a user's email address and mark the user's email address as verified.
5025pub async fn create_user_verify_email(configuration: &configuration::Configuration, verify_email_request: Option<models::VerifyEmailRequest>) -> Result<(), Error<CreateUserVerifyEmailError>> {
5026    let local_var_configuration = configuration;
5027
5028    let local_var_client = &local_var_configuration.client;
5029
5030    let local_var_uri_str = format!("{}/api/user/verify-email", local_var_configuration.base_path);
5031    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
5032
5033    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5034        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5035    }
5036    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5037        let local_var_key = local_var_apikey.key.clone();
5038        let local_var_value = match local_var_apikey.prefix {
5039            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5040            None => local_var_key,
5041        };
5042        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5043    };
5044    local_var_req_builder = local_var_req_builder.json(&verify_email_request);
5045
5046    let local_var_req = local_var_req_builder.build()?;
5047    let local_var_resp = local_var_client.execute(local_var_req).await?;
5048
5049    let local_var_status = local_var_resp.status();
5050
5051    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5052        Ok(())
5053    } else {
5054        let local_var_content = local_var_resp.text().await?;
5055        let local_var_entity: Option<CreateUserVerifyEmailError> = serde_json::from_str(&local_var_content).ok();
5056        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5057        Err(Error::ResponseError(local_var_error))
5058    }
5059}
5060
5061/// Creates a user. You can optionally specify an Id for the user, if not provided one will be generated.
5062pub async fn create_user_with_id(configuration: &configuration::Configuration, user_id: &str, x_fusion_auth_tenant_id: Option<&str>, user_request: Option<models::UserRequest>) -> Result<models::UserResponse, Error<CreateUserWithIdError>> {
5063    let local_var_configuration = configuration;
5064
5065    let local_var_client = &local_var_configuration.client;
5066
5067    let local_var_uri_str = format!("{}/api/user/{userId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id));
5068    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
5069
5070    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5071        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5072    }
5073    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
5074        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
5075    }
5076    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5077        let local_var_key = local_var_apikey.key.clone();
5078        let local_var_value = match local_var_apikey.prefix {
5079            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5080            None => local_var_key,
5081        };
5082        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5083    };
5084    local_var_req_builder = local_var_req_builder.json(&user_request);
5085
5086    let local_var_req = local_var_req_builder.build()?;
5087    let local_var_resp = local_var_client.execute(local_var_req).await?;
5088
5089    let local_var_status = local_var_resp.status();
5090
5091    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5092        let local_var_content = local_var_resp.text().await?;
5093        serde_json::from_str(&local_var_content).map_err(Error::from)
5094    } else {
5095        let local_var_content = local_var_resp.text().await?;
5096        let local_var_entity: Option<CreateUserWithIdError> = serde_json::from_str(&local_var_content).ok();
5097        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5098        Err(Error::ResponseError(local_var_error))
5099    }
5100}
5101
5102/// Creates a webhook. You can optionally specify an Id for the webhook, if not provided one will be generated.
5103pub async fn create_webhook(configuration: &configuration::Configuration, webhook_request: Option<models::WebhookRequest>) -> Result<models::WebhookResponse, Error<CreateWebhookError>> {
5104    let local_var_configuration = configuration;
5105
5106    let local_var_client = &local_var_configuration.client;
5107
5108    let local_var_uri_str = format!("{}/api/webhook", local_var_configuration.base_path);
5109    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
5110
5111    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5112        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5113    }
5114    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5115        let local_var_key = local_var_apikey.key.clone();
5116        let local_var_value = match local_var_apikey.prefix {
5117            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5118            None => local_var_key,
5119        };
5120        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5121    };
5122    local_var_req_builder = local_var_req_builder.json(&webhook_request);
5123
5124    let local_var_req = local_var_req_builder.build()?;
5125    let local_var_resp = local_var_client.execute(local_var_req).await?;
5126
5127    let local_var_status = local_var_resp.status();
5128
5129    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5130        let local_var_content = local_var_resp.text().await?;
5131        serde_json::from_str(&local_var_content).map_err(Error::from)
5132    } else {
5133        let local_var_content = local_var_resp.text().await?;
5134        let local_var_entity: Option<CreateWebhookError> = serde_json::from_str(&local_var_content).ok();
5135        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5136        Err(Error::ResponseError(local_var_error))
5137    }
5138}
5139
5140/// Creates a webhook. You can optionally specify an Id for the webhook, if not provided one will be generated.
5141pub async fn create_webhook_with_id(configuration: &configuration::Configuration, webhook_id: &str, webhook_request: Option<models::WebhookRequest>) -> Result<models::WebhookResponse, Error<CreateWebhookWithIdError>> {
5142    let local_var_configuration = configuration;
5143
5144    let local_var_client = &local_var_configuration.client;
5145
5146    let local_var_uri_str = format!("{}/api/webhook/{webhookId}", local_var_configuration.base_path, webhookId=crate::apis::urlencode(webhook_id));
5147    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
5148
5149    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5150        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5151    }
5152    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5153        let local_var_key = local_var_apikey.key.clone();
5154        let local_var_value = match local_var_apikey.prefix {
5155            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5156            None => local_var_key,
5157        };
5158        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5159    };
5160    local_var_req_builder = local_var_req_builder.json(&webhook_request);
5161
5162    let local_var_req = local_var_req_builder.build()?;
5163    let local_var_resp = local_var_client.execute(local_var_req).await?;
5164
5165    let local_var_status = local_var_resp.status();
5166
5167    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5168        let local_var_content = local_var_resp.text().await?;
5169        serde_json::from_str(&local_var_content).map_err(Error::from)
5170    } else {
5171        let local_var_content = local_var_resp.text().await?;
5172        let local_var_entity: Option<CreateWebhookWithIdError> = serde_json::from_str(&local_var_content).ok();
5173        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5174        Err(Error::ResponseError(local_var_error))
5175    }
5176}
5177
5178/// Deletes the API key for the given Id.
5179pub async fn delete_api_key_with_id(configuration: &configuration::Configuration, key_id: &str) -> Result<(), Error<DeleteApiKeyWithIdError>> {
5180    let local_var_configuration = configuration;
5181
5182    let local_var_client = &local_var_configuration.client;
5183
5184    let local_var_uri_str = format!("{}/api/api-key/{keyId}", local_var_configuration.base_path, keyId=crate::apis::urlencode(key_id));
5185    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5186
5187    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5188        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5189    }
5190    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5191        let local_var_key = local_var_apikey.key.clone();
5192        let local_var_value = match local_var_apikey.prefix {
5193            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5194            None => local_var_key,
5195        };
5196        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5197    };
5198
5199    let local_var_req = local_var_req_builder.build()?;
5200    let local_var_resp = local_var_client.execute(local_var_req).await?;
5201
5202    let local_var_status = local_var_resp.status();
5203
5204    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5205        Ok(())
5206    } else {
5207        let local_var_content = local_var_resp.text().await?;
5208        let local_var_entity: Option<DeleteApiKeyWithIdError> = serde_json::from_str(&local_var_content).ok();
5209        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5210        Err(Error::ResponseError(local_var_error))
5211    }
5212}
5213
5214/// Hard deletes an application role. This is a dangerous operation and should not be used in most circumstances. This permanently removes the given role from all users that had it.
5215pub async fn delete_application_role_with_id(configuration: &configuration::Configuration, application_id: &str, role_id: &str, x_fusion_auth_tenant_id: Option<&str>) -> Result<(), Error<DeleteApplicationRoleWithIdError>> {
5216    let local_var_configuration = configuration;
5217
5218    let local_var_client = &local_var_configuration.client;
5219
5220    let local_var_uri_str = format!("{}/api/application/{applicationId}/role/{roleId}", local_var_configuration.base_path, applicationId=crate::apis::urlencode(application_id), roleId=crate::apis::urlencode(role_id));
5221    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5222
5223    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5224        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5225    }
5226    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
5227        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
5228    }
5229    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5230        let local_var_key = local_var_apikey.key.clone();
5231        let local_var_value = match local_var_apikey.prefix {
5232            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5233            None => local_var_key,
5234        };
5235        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5236    };
5237
5238    let local_var_req = local_var_req_builder.build()?;
5239    let local_var_resp = local_var_client.execute(local_var_req).await?;
5240
5241    let local_var_status = local_var_resp.status();
5242
5243    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5244        Ok(())
5245    } else {
5246        let local_var_content = local_var_resp.text().await?;
5247        let local_var_entity: Option<DeleteApplicationRoleWithIdError> = serde_json::from_str(&local_var_content).ok();
5248        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5249        Err(Error::ResponseError(local_var_error))
5250    }
5251}
5252
5253/// Hard deletes an application. This is a dangerous operation and should not be used in most circumstances. This will delete the application, any registrations for that application, metrics and reports for the application, all the roles for the application, and any other data associated with the application. This operation could take a very long time, depending on the amount of data in your database. OR Deactivates the application with the given Id.
5254pub async fn delete_application_with_id(configuration: &configuration::Configuration, application_id: &str, hard_delete: Option<&str>, x_fusion_auth_tenant_id: Option<&str>) -> Result<(), Error<DeleteApplicationWithIdError>> {
5255    let local_var_configuration = configuration;
5256
5257    let local_var_client = &local_var_configuration.client;
5258
5259    let local_var_uri_str = format!("{}/api/application/{applicationId}", local_var_configuration.base_path, applicationId=crate::apis::urlencode(application_id));
5260    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5261
5262    if let Some(ref local_var_str) = hard_delete {
5263        local_var_req_builder = local_var_req_builder.query(&[("hardDelete", &local_var_str.to_string())]);
5264    }
5265    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5266        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5267    }
5268    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
5269        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
5270    }
5271    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5272        let local_var_key = local_var_apikey.key.clone();
5273        let local_var_value = match local_var_apikey.prefix {
5274            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5275            None => local_var_key,
5276        };
5277        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5278    };
5279
5280    let local_var_req = local_var_req_builder.build()?;
5281    let local_var_resp = local_var_client.execute(local_var_req).await?;
5282
5283    let local_var_status = local_var_resp.status();
5284
5285    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5286        Ok(())
5287    } else {
5288        let local_var_content = local_var_resp.text().await?;
5289        let local_var_entity: Option<DeleteApplicationWithIdError> = serde_json::from_str(&local_var_content).ok();
5290        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5291        Err(Error::ResponseError(local_var_error))
5292    }
5293}
5294
5295/// Deletes the connector for the given Id.
5296pub async fn delete_connector_with_id(configuration: &configuration::Configuration, connector_id: &str) -> Result<(), Error<DeleteConnectorWithIdError>> {
5297    let local_var_configuration = configuration;
5298
5299    let local_var_client = &local_var_configuration.client;
5300
5301    let local_var_uri_str = format!("{}/api/connector/{connectorId}", local_var_configuration.base_path, connectorId=crate::apis::urlencode(connector_id));
5302    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5303
5304    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5305        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5306    }
5307    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5308        let local_var_key = local_var_apikey.key.clone();
5309        let local_var_value = match local_var_apikey.prefix {
5310            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5311            None => local_var_key,
5312        };
5313        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5314    };
5315
5316    let local_var_req = local_var_req_builder.build()?;
5317    let local_var_resp = local_var_client.execute(local_var_req).await?;
5318
5319    let local_var_status = local_var_resp.status();
5320
5321    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5322        Ok(())
5323    } else {
5324        let local_var_content = local_var_resp.text().await?;
5325        let local_var_entity: Option<DeleteConnectorWithIdError> = serde_json::from_str(&local_var_content).ok();
5326        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5327        Err(Error::ResponseError(local_var_error))
5328    }
5329}
5330
5331/// Deletes the consent for the given Id.
5332pub async fn delete_consent_with_id(configuration: &configuration::Configuration, consent_id: &str, x_fusion_auth_tenant_id: Option<&str>) -> Result<(), Error<DeleteConsentWithIdError>> {
5333    let local_var_configuration = configuration;
5334
5335    let local_var_client = &local_var_configuration.client;
5336
5337    let local_var_uri_str = format!("{}/api/consent/{consentId}", local_var_configuration.base_path, consentId=crate::apis::urlencode(consent_id));
5338    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5339
5340    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5341        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5342    }
5343    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
5344        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
5345    }
5346    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5347        let local_var_key = local_var_apikey.key.clone();
5348        let local_var_value = match local_var_apikey.prefix {
5349            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5350            None => local_var_key,
5351        };
5352        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5353    };
5354
5355    let local_var_req = local_var_req_builder.build()?;
5356    let local_var_resp = local_var_client.execute(local_var_req).await?;
5357
5358    let local_var_status = local_var_resp.status();
5359
5360    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5361        Ok(())
5362    } else {
5363        let local_var_content = local_var_resp.text().await?;
5364        let local_var_entity: Option<DeleteConsentWithIdError> = serde_json::from_str(&local_var_content).ok();
5365        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5366        Err(Error::ResponseError(local_var_error))
5367    }
5368}
5369
5370/// Deletes the email template for the given Id.
5371pub async fn delete_email_template_with_id(configuration: &configuration::Configuration, email_template_id: &str, x_fusion_auth_tenant_id: Option<&str>) -> Result<(), Error<DeleteEmailTemplateWithIdError>> {
5372    let local_var_configuration = configuration;
5373
5374    let local_var_client = &local_var_configuration.client;
5375
5376    let local_var_uri_str = format!("{}/api/email/template/{emailTemplateId}", local_var_configuration.base_path, emailTemplateId=crate::apis::urlencode(email_template_id));
5377    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5378
5379    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5380        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5381    }
5382    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
5383        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
5384    }
5385    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5386        let local_var_key = local_var_apikey.key.clone();
5387        let local_var_value = match local_var_apikey.prefix {
5388            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5389            None => local_var_key,
5390        };
5391        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5392    };
5393
5394    let local_var_req = local_var_req_builder.build()?;
5395    let local_var_resp = local_var_client.execute(local_var_req).await?;
5396
5397    let local_var_status = local_var_resp.status();
5398
5399    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5400        Ok(())
5401    } else {
5402        let local_var_content = local_var_resp.text().await?;
5403        let local_var_entity: Option<DeleteEmailTemplateWithIdError> = serde_json::from_str(&local_var_content).ok();
5404        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5405        Err(Error::ResponseError(local_var_error))
5406    }
5407}
5408
5409/// Deletes an Entity Grant for the given User or Entity.
5410pub async fn delete_entity_grant_with_id(configuration: &configuration::Configuration, entity_id: &str, recipient_entity_id: Option<&str>, user_id: Option<&str>, x_fusion_auth_tenant_id: Option<&str>) -> Result<(), Error<DeleteEntityGrantWithIdError>> {
5411    let local_var_configuration = configuration;
5412
5413    let local_var_client = &local_var_configuration.client;
5414
5415    let local_var_uri_str = format!("{}/api/entity/{entityId}/grant", local_var_configuration.base_path, entityId=crate::apis::urlencode(entity_id));
5416    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5417
5418    if let Some(ref local_var_str) = recipient_entity_id {
5419        local_var_req_builder = local_var_req_builder.query(&[("recipientEntityId", &local_var_str.to_string())]);
5420    }
5421    if let Some(ref local_var_str) = user_id {
5422        local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]);
5423    }
5424    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5425        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5426    }
5427    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
5428        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
5429    }
5430    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5431        let local_var_key = local_var_apikey.key.clone();
5432        let local_var_value = match local_var_apikey.prefix {
5433            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5434            None => local_var_key,
5435        };
5436        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5437    };
5438
5439    let local_var_req = local_var_req_builder.build()?;
5440    let local_var_resp = local_var_client.execute(local_var_req).await?;
5441
5442    let local_var_status = local_var_resp.status();
5443
5444    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5445        Ok(())
5446    } else {
5447        let local_var_content = local_var_resp.text().await?;
5448        let local_var_entity: Option<DeleteEntityGrantWithIdError> = serde_json::from_str(&local_var_content).ok();
5449        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5450        Err(Error::ResponseError(local_var_error))
5451    }
5452}
5453
5454/// Hard deletes a permission. This is a dangerous operation and should not be used in most circumstances. This permanently removes the given permission from all grants that had it.
5455pub async fn delete_entity_type_permission_with_id(configuration: &configuration::Configuration, entity_type_id: &str, permission_id: &str) -> Result<(), Error<DeleteEntityTypePermissionWithIdError>> {
5456    let local_var_configuration = configuration;
5457
5458    let local_var_client = &local_var_configuration.client;
5459
5460    let local_var_uri_str = format!("{}/api/entity/type/{entityTypeId}/permission/{permissionId}", local_var_configuration.base_path, entityTypeId=crate::apis::urlencode(entity_type_id), permissionId=crate::apis::urlencode(permission_id));
5461    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5462
5463    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5464        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5465    }
5466    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5467        let local_var_key = local_var_apikey.key.clone();
5468        let local_var_value = match local_var_apikey.prefix {
5469            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5470            None => local_var_key,
5471        };
5472        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5473    };
5474
5475    let local_var_req = local_var_req_builder.build()?;
5476    let local_var_resp = local_var_client.execute(local_var_req).await?;
5477
5478    let local_var_status = local_var_resp.status();
5479
5480    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5481        Ok(())
5482    } else {
5483        let local_var_content = local_var_resp.text().await?;
5484        let local_var_entity: Option<DeleteEntityTypePermissionWithIdError> = serde_json::from_str(&local_var_content).ok();
5485        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5486        Err(Error::ResponseError(local_var_error))
5487    }
5488}
5489
5490/// Deletes the Entity Type for the given Id.
5491pub async fn delete_entity_type_with_id(configuration: &configuration::Configuration, entity_type_id: &str) -> Result<(), Error<DeleteEntityTypeWithIdError>> {
5492    let local_var_configuration = configuration;
5493
5494    let local_var_client = &local_var_configuration.client;
5495
5496    let local_var_uri_str = format!("{}/api/entity/type/{entityTypeId}", local_var_configuration.base_path, entityTypeId=crate::apis::urlencode(entity_type_id));
5497    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5498
5499    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5500        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5501    }
5502    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5503        let local_var_key = local_var_apikey.key.clone();
5504        let local_var_value = match local_var_apikey.prefix {
5505            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5506            None => local_var_key,
5507        };
5508        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5509    };
5510
5511    let local_var_req = local_var_req_builder.build()?;
5512    let local_var_resp = local_var_client.execute(local_var_req).await?;
5513
5514    let local_var_status = local_var_resp.status();
5515
5516    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5517        Ok(())
5518    } else {
5519        let local_var_content = local_var_resp.text().await?;
5520        let local_var_entity: Option<DeleteEntityTypeWithIdError> = serde_json::from_str(&local_var_content).ok();
5521        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5522        Err(Error::ResponseError(local_var_error))
5523    }
5524}
5525
5526/// Deletes the Entity for the given Id.
5527pub async fn delete_entity_with_id(configuration: &configuration::Configuration, entity_id: &str, x_fusion_auth_tenant_id: Option<&str>) -> Result<(), Error<DeleteEntityWithIdError>> {
5528    let local_var_configuration = configuration;
5529
5530    let local_var_client = &local_var_configuration.client;
5531
5532    let local_var_uri_str = format!("{}/api/entity/{entityId}", local_var_configuration.base_path, entityId=crate::apis::urlencode(entity_id));
5533    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5534
5535    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5536        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5537    }
5538    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
5539        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
5540    }
5541    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5542        let local_var_key = local_var_apikey.key.clone();
5543        let local_var_value = match local_var_apikey.prefix {
5544            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5545            None => local_var_key,
5546        };
5547        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5548    };
5549
5550    let local_var_req = local_var_req_builder.build()?;
5551    let local_var_resp = local_var_client.execute(local_var_req).await?;
5552
5553    let local_var_status = local_var_resp.status();
5554
5555    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5556        Ok(())
5557    } else {
5558        let local_var_content = local_var_resp.text().await?;
5559        let local_var_entity: Option<DeleteEntityWithIdError> = serde_json::from_str(&local_var_content).ok();
5560        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5561        Err(Error::ResponseError(local_var_error))
5562    }
5563}
5564
5565/// Deletes the form field for the given Id.
5566pub async fn delete_form_field_with_id(configuration: &configuration::Configuration, field_id: &str) -> Result<(), Error<DeleteFormFieldWithIdError>> {
5567    let local_var_configuration = configuration;
5568
5569    let local_var_client = &local_var_configuration.client;
5570
5571    let local_var_uri_str = format!("{}/api/form/field/{fieldId}", local_var_configuration.base_path, fieldId=crate::apis::urlencode(field_id));
5572    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5573
5574    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5575        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5576    }
5577    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5578        let local_var_key = local_var_apikey.key.clone();
5579        let local_var_value = match local_var_apikey.prefix {
5580            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5581            None => local_var_key,
5582        };
5583        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5584    };
5585
5586    let local_var_req = local_var_req_builder.build()?;
5587    let local_var_resp = local_var_client.execute(local_var_req).await?;
5588
5589    let local_var_status = local_var_resp.status();
5590
5591    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5592        Ok(())
5593    } else {
5594        let local_var_content = local_var_resp.text().await?;
5595        let local_var_entity: Option<DeleteFormFieldWithIdError> = serde_json::from_str(&local_var_content).ok();
5596        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5597        Err(Error::ResponseError(local_var_error))
5598    }
5599}
5600
5601/// Deletes the form for the given Id.
5602pub async fn delete_form_with_id(configuration: &configuration::Configuration, form_id: &str) -> Result<(), Error<DeleteFormWithIdError>> {
5603    let local_var_configuration = configuration;
5604
5605    let local_var_client = &local_var_configuration.client;
5606
5607    let local_var_uri_str = format!("{}/api/form/{formId}", local_var_configuration.base_path, formId=crate::apis::urlencode(form_id));
5608    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5609
5610    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5611        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5612    }
5613    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5614        let local_var_key = local_var_apikey.key.clone();
5615        let local_var_value = match local_var_apikey.prefix {
5616            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5617            None => local_var_key,
5618        };
5619        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5620    };
5621
5622    let local_var_req = local_var_req_builder.build()?;
5623    let local_var_resp = local_var_client.execute(local_var_req).await?;
5624
5625    let local_var_status = local_var_resp.status();
5626
5627    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5628        Ok(())
5629    } else {
5630        let local_var_content = local_var_resp.text().await?;
5631        let local_var_entity: Option<DeleteFormWithIdError> = serde_json::from_str(&local_var_content).ok();
5632        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5633        Err(Error::ResponseError(local_var_error))
5634    }
5635}
5636
5637/// Removes users as members of a group.
5638pub async fn delete_group_members_with_id(configuration: &configuration::Configuration, member_delete_request: Option<models::MemberDeleteRequest>) -> Result<(), Error<DeleteGroupMembersWithIdError>> {
5639    let local_var_configuration = configuration;
5640
5641    let local_var_client = &local_var_configuration.client;
5642
5643    let local_var_uri_str = format!("{}/api/group/member", local_var_configuration.base_path);
5644    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5645
5646    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5647        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5648    }
5649    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5650        let local_var_key = local_var_apikey.key.clone();
5651        let local_var_value = match local_var_apikey.prefix {
5652            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5653            None => local_var_key,
5654        };
5655        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5656    };
5657    local_var_req_builder = local_var_req_builder.json(&member_delete_request);
5658
5659    let local_var_req = local_var_req_builder.build()?;
5660    let local_var_resp = local_var_client.execute(local_var_req).await?;
5661
5662    let local_var_status = local_var_resp.status();
5663
5664    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5665        Ok(())
5666    } else {
5667        let local_var_content = local_var_resp.text().await?;
5668        let local_var_entity: Option<DeleteGroupMembersWithIdError> = serde_json::from_str(&local_var_content).ok();
5669        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5670        Err(Error::ResponseError(local_var_error))
5671    }
5672}
5673
5674/// Deletes the group for the given Id.
5675pub async fn delete_group_with_id(configuration: &configuration::Configuration, group_id: &str, x_fusion_auth_tenant_id: Option<&str>) -> Result<(), Error<DeleteGroupWithIdError>> {
5676    let local_var_configuration = configuration;
5677
5678    let local_var_client = &local_var_configuration.client;
5679
5680    let local_var_uri_str = format!("{}/api/group/{groupId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_id));
5681    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5682
5683    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5684        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5685    }
5686    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
5687        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
5688    }
5689    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5690        let local_var_key = local_var_apikey.key.clone();
5691        let local_var_value = match local_var_apikey.prefix {
5692            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5693            None => local_var_key,
5694        };
5695        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5696    };
5697
5698    let local_var_req = local_var_req_builder.build()?;
5699    let local_var_resp = local_var_client.execute(local_var_req).await?;
5700
5701    let local_var_status = local_var_resp.status();
5702
5703    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5704        Ok(())
5705    } else {
5706        let local_var_content = local_var_resp.text().await?;
5707        let local_var_entity: Option<DeleteGroupWithIdError> = serde_json::from_str(&local_var_content).ok();
5708        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5709        Err(Error::ResponseError(local_var_error))
5710    }
5711}
5712
5713/// Deletes the identity provider for the given Id.
5714pub async fn delete_identity_provider_with_id(configuration: &configuration::Configuration, identity_provider_id: &str) -> Result<(), Error<DeleteIdentityProviderWithIdError>> {
5715    let local_var_configuration = configuration;
5716
5717    let local_var_client = &local_var_configuration.client;
5718
5719    let local_var_uri_str = format!("{}/api/identity-provider/{identityProviderId}", local_var_configuration.base_path, identityProviderId=crate::apis::urlencode(identity_provider_id));
5720    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5721
5722    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5723        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5724    }
5725    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5726        let local_var_key = local_var_apikey.key.clone();
5727        let local_var_value = match local_var_apikey.prefix {
5728            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5729            None => local_var_key,
5730        };
5731        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5732    };
5733
5734    let local_var_req = local_var_req_builder.build()?;
5735    let local_var_resp = local_var_client.execute(local_var_req).await?;
5736
5737    let local_var_status = local_var_resp.status();
5738
5739    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5740        Ok(())
5741    } else {
5742        let local_var_content = local_var_resp.text().await?;
5743        let local_var_entity: Option<DeleteIdentityProviderWithIdError> = serde_json::from_str(&local_var_content).ok();
5744        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5745        Err(Error::ResponseError(local_var_error))
5746    }
5747}
5748
5749/// Deletes the IP Access Control List for the given Id.
5750pub async fn delete_ip_access_control_list_with_id(configuration: &configuration::Configuration, ip_access_control_list_id: &str) -> Result<(), Error<DeleteIpAccessControlListWithIdError>> {
5751    let local_var_configuration = configuration;
5752
5753    let local_var_client = &local_var_configuration.client;
5754
5755    let local_var_uri_str = format!("{}/api/ip-acl/{ipAccessControlListId}", local_var_configuration.base_path, ipAccessControlListId=crate::apis::urlencode(ip_access_control_list_id));
5756    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5757
5758    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5759        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5760    }
5761    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5762        let local_var_key = local_var_apikey.key.clone();
5763        let local_var_value = match local_var_apikey.prefix {
5764            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5765            None => local_var_key,
5766        };
5767        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5768    };
5769
5770    let local_var_req = local_var_req_builder.build()?;
5771    let local_var_resp = local_var_client.execute(local_var_req).await?;
5772
5773    let local_var_status = local_var_resp.status();
5774
5775    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5776        Ok(())
5777    } else {
5778        let local_var_content = local_var_resp.text().await?;
5779        let local_var_entity: Option<DeleteIpAccessControlListWithIdError> = serde_json::from_str(&local_var_content).ok();
5780        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5781        Err(Error::ResponseError(local_var_error))
5782    }
5783}
5784
5785/// Revokes refresh tokens using the information in the JSON body. The handling for this method is the same as the revokeRefreshToken method and is based on the information you provide in the RefreshDeleteRequest object. See that method for additional information. OR Revoke all refresh tokens that belong to an application by applicationId. OR Revoke all refresh tokens that belong to a user by user Id. OR Revokes a single refresh token by using the actual refresh token value. This refresh token value is sensitive, so  be careful with this API request. OR Revoke all refresh tokens that belong to a user by user Id for a specific application by applicationId. OR Revokes refresh tokens.  Usage examples:   - Delete a single refresh token, pass in only the token.       revokeRefreshToken(token)    - Delete all refresh tokens for a user, pass in only the userId.       revokeRefreshToken(null, userId)    - Delete all refresh tokens for a user for a specific application, pass in both the userId and the applicationId.       revokeRefreshToken(null, userId, applicationId)    - Delete all refresh tokens for an application       revokeRefreshToken(null, null, applicationId)  Note: <code>null</code> may be handled differently depending upon the programming language.  See also: (method names may vary by language... but you'll figure it out)   - revokeRefreshTokenById  - revokeRefreshTokenByToken  - revokeRefreshTokensByUserId  - revokeRefreshTokensByApplicationId  - revokeRefreshTokensByUserIdForApplication
5786pub async fn delete_jwt_refresh(configuration: &configuration::Configuration, application_id: Option<&str>, user_id: Option<&str>, token: Option<&str>, refresh_token_revoke_request: Option<models::RefreshTokenRevokeRequest>) -> Result<(), Error<DeleteJwtRefreshError>> {
5787    let local_var_configuration = configuration;
5788
5789    let local_var_client = &local_var_configuration.client;
5790
5791    let local_var_uri_str = format!("{}/api/jwt/refresh", local_var_configuration.base_path);
5792    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5793
5794    if let Some(ref local_var_str) = application_id {
5795        local_var_req_builder = local_var_req_builder.query(&[("applicationId", &local_var_str.to_string())]);
5796    }
5797    if let Some(ref local_var_str) = user_id {
5798        local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]);
5799    }
5800    if let Some(ref local_var_str) = token {
5801        local_var_req_builder = local_var_req_builder.query(&[("token", &local_var_str.to_string())]);
5802    }
5803    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5804        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5805    }
5806    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5807        let local_var_key = local_var_apikey.key.clone();
5808        let local_var_value = match local_var_apikey.prefix {
5809            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5810            None => local_var_key,
5811        };
5812        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5813    };
5814    local_var_req_builder = local_var_req_builder.json(&refresh_token_revoke_request);
5815
5816    let local_var_req = local_var_req_builder.build()?;
5817    let local_var_resp = local_var_client.execute(local_var_req).await?;
5818
5819    let local_var_status = local_var_resp.status();
5820
5821    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5822        Ok(())
5823    } else {
5824        let local_var_content = local_var_resp.text().await?;
5825        let local_var_entity: Option<DeleteJwtRefreshError> = serde_json::from_str(&local_var_content).ok();
5826        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5827        Err(Error::ResponseError(local_var_error))
5828    }
5829}
5830
5831/// Deletes the key for the given Id.
5832pub async fn delete_key_with_id(configuration: &configuration::Configuration, key_id: &str) -> Result<(), Error<DeleteKeyWithIdError>> {
5833    let local_var_configuration = configuration;
5834
5835    let local_var_client = &local_var_configuration.client;
5836
5837    let local_var_uri_str = format!("{}/api/key/{keyId}", local_var_configuration.base_path, keyId=crate::apis::urlencode(key_id));
5838    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5839
5840    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5841        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5842    }
5843    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5844        let local_var_key = local_var_apikey.key.clone();
5845        let local_var_value = match local_var_apikey.prefix {
5846            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5847            None => local_var_key,
5848        };
5849        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5850    };
5851
5852    let local_var_req = local_var_req_builder.build()?;
5853    let local_var_resp = local_var_client.execute(local_var_req).await?;
5854
5855    let local_var_status = local_var_resp.status();
5856
5857    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5858        Ok(())
5859    } else {
5860        let local_var_content = local_var_resp.text().await?;
5861        let local_var_entity: Option<DeleteKeyWithIdError> = serde_json::from_str(&local_var_content).ok();
5862        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5863        Err(Error::ResponseError(local_var_error))
5864    }
5865}
5866
5867/// Deletes the lambda for the given Id.
5868pub async fn delete_lambda_with_id(configuration: &configuration::Configuration, lambda_id: &str) -> Result<(), Error<DeleteLambdaWithIdError>> {
5869    let local_var_configuration = configuration;
5870
5871    let local_var_client = &local_var_configuration.client;
5872
5873    let local_var_uri_str = format!("{}/api/lambda/{lambdaId}", local_var_configuration.base_path, lambdaId=crate::apis::urlencode(lambda_id));
5874    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5875
5876    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5877        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5878    }
5879    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5880        let local_var_key = local_var_apikey.key.clone();
5881        let local_var_value = match local_var_apikey.prefix {
5882            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5883            None => local_var_key,
5884        };
5885        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5886    };
5887
5888    let local_var_req = local_var_req_builder.build()?;
5889    let local_var_resp = local_var_client.execute(local_var_req).await?;
5890
5891    let local_var_status = local_var_resp.status();
5892
5893    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5894        Ok(())
5895    } else {
5896        let local_var_content = local_var_resp.text().await?;
5897        let local_var_entity: Option<DeleteLambdaWithIdError> = serde_json::from_str(&local_var_content).ok();
5898        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5899        Err(Error::ResponseError(local_var_error))
5900    }
5901}
5902
5903/// Deletes the message template for the given Id.
5904pub async fn delete_message_template_with_id(configuration: &configuration::Configuration, message_template_id: &str) -> Result<(), Error<DeleteMessageTemplateWithIdError>> {
5905    let local_var_configuration = configuration;
5906
5907    let local_var_client = &local_var_configuration.client;
5908
5909    let local_var_uri_str = format!("{}/api/message/template/{messageTemplateId}", local_var_configuration.base_path, messageTemplateId=crate::apis::urlencode(message_template_id));
5910    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5911
5912    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5913        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5914    }
5915    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5916        let local_var_key = local_var_apikey.key.clone();
5917        let local_var_value = match local_var_apikey.prefix {
5918            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5919            None => local_var_key,
5920        };
5921        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5922    };
5923
5924    let local_var_req = local_var_req_builder.build()?;
5925    let local_var_resp = local_var_client.execute(local_var_req).await?;
5926
5927    let local_var_status = local_var_resp.status();
5928
5929    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5930        Ok(())
5931    } else {
5932        let local_var_content = local_var_resp.text().await?;
5933        let local_var_entity: Option<DeleteMessageTemplateWithIdError> = serde_json::from_str(&local_var_content).ok();
5934        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5935        Err(Error::ResponseError(local_var_error))
5936    }
5937}
5938
5939/// Deletes the messenger for the given Id.
5940pub async fn delete_messenger_with_id(configuration: &configuration::Configuration, messenger_id: &str) -> Result<(), Error<DeleteMessengerWithIdError>> {
5941    let local_var_configuration = configuration;
5942
5943    let local_var_client = &local_var_configuration.client;
5944
5945    let local_var_uri_str = format!("{}/api/messenger/{messengerId}", local_var_configuration.base_path, messengerId=crate::apis::urlencode(messenger_id));
5946    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5947
5948    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5949        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5950    }
5951    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5952        let local_var_key = local_var_apikey.key.clone();
5953        let local_var_value = match local_var_apikey.prefix {
5954            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5955            None => local_var_key,
5956        };
5957        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5958    };
5959
5960    let local_var_req = local_var_req_builder.build()?;
5961    let local_var_resp = local_var_client.execute(local_var_req).await?;
5962
5963    let local_var_status = local_var_resp.status();
5964
5965    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5966        Ok(())
5967    } else {
5968        let local_var_content = local_var_resp.text().await?;
5969        let local_var_entity: Option<DeleteMessengerWithIdError> = serde_json::from_str(&local_var_content).ok();
5970        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5971        Err(Error::ResponseError(local_var_error))
5972    }
5973}
5974
5975/// Hard deletes a custom OAuth scope. OAuth workflows that are still requesting the deleted OAuth scope may fail depending on the application's unknown scope policy.
5976pub async fn delete_o_auth_scope_with_id(configuration: &configuration::Configuration, application_id: &str, scope_id: &str, x_fusion_auth_tenant_id: Option<&str>) -> Result<(), Error<DeleteOAuthScopeWithIdError>> {
5977    let local_var_configuration = configuration;
5978
5979    let local_var_client = &local_var_configuration.client;
5980
5981    let local_var_uri_str = format!("{}/api/application/{applicationId}/scope/{scopeId}", local_var_configuration.base_path, applicationId=crate::apis::urlencode(application_id), scopeId=crate::apis::urlencode(scope_id));
5982    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5983
5984    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5985        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5986    }
5987    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
5988        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
5989    }
5990    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5991        let local_var_key = local_var_apikey.key.clone();
5992        let local_var_value = match local_var_apikey.prefix {
5993            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5994            None => local_var_key,
5995        };
5996        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5997    };
5998
5999    let local_var_req = local_var_req_builder.build()?;
6000    let local_var_resp = local_var_client.execute(local_var_req).await?;
6001
6002    let local_var_status = local_var_resp.status();
6003
6004    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6005        Ok(())
6006    } else {
6007        let local_var_content = local_var_resp.text().await?;
6008        let local_var_entity: Option<DeleteOAuthScopeWithIdError> = serde_json::from_str(&local_var_content).ok();
6009        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6010        Err(Error::ResponseError(local_var_error))
6011    }
6012}
6013
6014/// Deletes the tenant for the given Id asynchronously. This method is helpful if you do not want to wait for the delete operation to complete. OR Deletes the tenant based on the given request (sent to the API as JSON). This permanently deletes all information, metrics, reports and data associated with the tenant and everything under the tenant (applications, users, etc). OR Deletes the tenant based on the given Id on the URL. This permanently deletes all information, metrics, reports and data associated with the tenant and everything under the tenant (applications, users, etc).
6015pub async fn delete_tenant_with_id(configuration: &configuration::Configuration, tenant_id: &str, r#async: Option<&str>, x_fusion_auth_tenant_id: Option<&str>, tenant_delete_request: Option<models::TenantDeleteRequest>) -> Result<(), Error<DeleteTenantWithIdError>> {
6016    let local_var_configuration = configuration;
6017
6018    let local_var_client = &local_var_configuration.client;
6019
6020    let local_var_uri_str = format!("{}/api/tenant/{tenantId}", local_var_configuration.base_path, tenantId=crate::apis::urlencode(tenant_id));
6021    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
6022
6023    if let Some(ref local_var_str) = r#async {
6024        local_var_req_builder = local_var_req_builder.query(&[("async", &local_var_str.to_string())]);
6025    }
6026    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6027        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6028    }
6029    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
6030        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
6031    }
6032    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6033        let local_var_key = local_var_apikey.key.clone();
6034        let local_var_value = match local_var_apikey.prefix {
6035            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6036            None => local_var_key,
6037        };
6038        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6039    };
6040    local_var_req_builder = local_var_req_builder.json(&tenant_delete_request);
6041
6042    let local_var_req = local_var_req_builder.build()?;
6043    let local_var_resp = local_var_client.execute(local_var_req).await?;
6044
6045    let local_var_status = local_var_resp.status();
6046
6047    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6048        Ok(())
6049    } else {
6050        let local_var_content = local_var_resp.text().await?;
6051        let local_var_entity: Option<DeleteTenantWithIdError> = serde_json::from_str(&local_var_content).ok();
6052        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6053        Err(Error::ResponseError(local_var_error))
6054    }
6055}
6056
6057/// Deletes the theme for the given Id.
6058pub async fn delete_theme_with_id(configuration: &configuration::Configuration, theme_id: &str) -> Result<(), Error<DeleteThemeWithIdError>> {
6059    let local_var_configuration = configuration;
6060
6061    let local_var_client = &local_var_configuration.client;
6062
6063    let local_var_uri_str = format!("{}/api/theme/{themeId}", local_var_configuration.base_path, themeId=crate::apis::urlencode(theme_id));
6064    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
6065
6066    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6067        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6068    }
6069    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6070        let local_var_key = local_var_apikey.key.clone();
6071        let local_var_value = match local_var_apikey.prefix {
6072            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6073            None => local_var_key,
6074        };
6075        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6076    };
6077
6078    let local_var_req = local_var_req_builder.build()?;
6079    let local_var_resp = local_var_client.execute(local_var_req).await?;
6080
6081    let local_var_status = local_var_resp.status();
6082
6083    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6084        Ok(())
6085    } else {
6086        let local_var_content = local_var_resp.text().await?;
6087        let local_var_entity: Option<DeleteThemeWithIdError> = serde_json::from_str(&local_var_content).ok();
6088        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6089        Err(Error::ResponseError(local_var_error))
6090    }
6091}
6092
6093/// Deletes the user action reason for the given Id.
6094pub async fn delete_user_action_reason_with_id(configuration: &configuration::Configuration, user_action_reason_id: &str) -> Result<(), Error<DeleteUserActionReasonWithIdError>> {
6095    let local_var_configuration = configuration;
6096
6097    let local_var_client = &local_var_configuration.client;
6098
6099    let local_var_uri_str = format!("{}/api/user-action-reason/{userActionReasonId}", local_var_configuration.base_path, userActionReasonId=crate::apis::urlencode(user_action_reason_id));
6100    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
6101
6102    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6103        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6104    }
6105    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6106        let local_var_key = local_var_apikey.key.clone();
6107        let local_var_value = match local_var_apikey.prefix {
6108            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6109            None => local_var_key,
6110        };
6111        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6112    };
6113
6114    let local_var_req = local_var_req_builder.build()?;
6115    let local_var_resp = local_var_client.execute(local_var_req).await?;
6116
6117    let local_var_status = local_var_resp.status();
6118
6119    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6120        Ok(())
6121    } else {
6122        let local_var_content = local_var_resp.text().await?;
6123        let local_var_entity: Option<DeleteUserActionReasonWithIdError> = serde_json::from_str(&local_var_content).ok();
6124        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6125        Err(Error::ResponseError(local_var_error))
6126    }
6127}
6128
6129/// Deactivates the user action with the given Id. OR Deletes the user action for the given Id. This permanently deletes the user action and also any history and logs of the action being applied to any users.
6130pub async fn delete_user_action_with_id(configuration: &configuration::Configuration, user_action_id: &str, x_fusion_auth_tenant_id: Option<&str>, hard_delete: Option<&str>) -> Result<(), Error<DeleteUserActionWithIdError>> {
6131    let local_var_configuration = configuration;
6132
6133    let local_var_client = &local_var_configuration.client;
6134
6135    let local_var_uri_str = format!("{}/api/user-action/{userActionId}", local_var_configuration.base_path, userActionId=crate::apis::urlencode(user_action_id));
6136    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
6137
6138    if let Some(ref local_var_str) = hard_delete {
6139        local_var_req_builder = local_var_req_builder.query(&[("hardDelete", &local_var_str.to_string())]);
6140    }
6141    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6142        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6143    }
6144    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
6145        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
6146    }
6147    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6148        let local_var_key = local_var_apikey.key.clone();
6149        let local_var_value = match local_var_apikey.prefix {
6150            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6151            None => local_var_key,
6152        };
6153        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6154    };
6155
6156    let local_var_req = local_var_req_builder.build()?;
6157    let local_var_resp = local_var_client.execute(local_var_req).await?;
6158
6159    let local_var_status = local_var_resp.status();
6160
6161    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6162        Ok(())
6163    } else {
6164        let local_var_content = local_var_resp.text().await?;
6165        let local_var_entity: Option<DeleteUserActionWithIdError> = serde_json::from_str(&local_var_content).ok();
6166        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6167        Err(Error::ResponseError(local_var_error))
6168    }
6169}
6170
6171/// Deactivates the users with the given ids. OR Deletes the users with the given ids, or users matching the provided JSON query or queryString. The order of preference is ids, query and then queryString, it is recommended to only provide one of the three for the request.  This method can be used to deactivate or permanently delete (hard-delete) users based upon the hardDelete boolean in the request body. Using the dryRun parameter you may also request the result of the action without actually deleting or deactivating any users.
6172pub async fn delete_user_bulk(configuration: &configuration::Configuration, user_ids: Option<&str>, dry_run: Option<&str>, hard_delete: Option<&str>, user_delete_request: Option<models::UserDeleteRequest>) -> Result<models::UserDeleteResponse, Error<DeleteUserBulkError>> {
6173    let local_var_configuration = configuration;
6174
6175    let local_var_client = &local_var_configuration.client;
6176
6177    let local_var_uri_str = format!("{}/api/user/bulk", local_var_configuration.base_path);
6178    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
6179
6180    if let Some(ref local_var_str) = user_ids {
6181        local_var_req_builder = local_var_req_builder.query(&[("userIds", &local_var_str.to_string())]);
6182    }
6183    if let Some(ref local_var_str) = dry_run {
6184        local_var_req_builder = local_var_req_builder.query(&[("dryRun", &local_var_str.to_string())]);
6185    }
6186    if let Some(ref local_var_str) = hard_delete {
6187        local_var_req_builder = local_var_req_builder.query(&[("hardDelete", &local_var_str.to_string())]);
6188    }
6189    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6190        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6191    }
6192    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6193        let local_var_key = local_var_apikey.key.clone();
6194        let local_var_value = match local_var_apikey.prefix {
6195            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6196            None => local_var_key,
6197        };
6198        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6199    };
6200    local_var_req_builder = local_var_req_builder.json(&user_delete_request);
6201
6202    let local_var_req = local_var_req_builder.build()?;
6203    let local_var_resp = local_var_client.execute(local_var_req).await?;
6204
6205    let local_var_status = local_var_resp.status();
6206
6207    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6208        let local_var_content = local_var_resp.text().await?;
6209        serde_json::from_str(&local_var_content).map_err(Error::from)
6210    } else {
6211        let local_var_content = local_var_resp.text().await?;
6212        let local_var_entity: Option<DeleteUserBulkError> = serde_json::from_str(&local_var_content).ok();
6213        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6214        Err(Error::ResponseError(local_var_error))
6215    }
6216}
6217
6218/// Remove an existing link that has been made from a 3rd party identity provider to a FusionAuth user.
6219pub async fn delete_user_link_with_id(configuration: &configuration::Configuration, identity_provider_id: Option<&str>, identity_provider_user_id: Option<&str>, user_id: Option<&str>) -> Result<models::IdentityProviderLinkResponse, Error<DeleteUserLinkWithIdError>> {
6220    let local_var_configuration = configuration;
6221
6222    let local_var_client = &local_var_configuration.client;
6223
6224    let local_var_uri_str = format!("{}/api/identity-provider/link", local_var_configuration.base_path);
6225    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
6226
6227    if let Some(ref local_var_str) = identity_provider_id {
6228        local_var_req_builder = local_var_req_builder.query(&[("identityProviderId", &local_var_str.to_string())]);
6229    }
6230    if let Some(ref local_var_str) = identity_provider_user_id {
6231        local_var_req_builder = local_var_req_builder.query(&[("identityProviderUserId", &local_var_str.to_string())]);
6232    }
6233    if let Some(ref local_var_str) = user_id {
6234        local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]);
6235    }
6236    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6237        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6238    }
6239    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6240        let local_var_key = local_var_apikey.key.clone();
6241        let local_var_value = match local_var_apikey.prefix {
6242            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6243            None => local_var_key,
6244        };
6245        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6246    };
6247
6248    let local_var_req = local_var_req_builder.build()?;
6249    let local_var_resp = local_var_client.execute(local_var_req).await?;
6250
6251    let local_var_status = local_var_resp.status();
6252
6253    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6254        let local_var_content = local_var_resp.text().await?;
6255        serde_json::from_str(&local_var_content).map_err(Error::from)
6256    } else {
6257        let local_var_content = local_var_resp.text().await?;
6258        let local_var_entity: Option<DeleteUserLinkWithIdError> = serde_json::from_str(&local_var_content).ok();
6259        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6260        Err(Error::ResponseError(local_var_error))
6261    }
6262}
6263
6264/// Deletes the user registration for the given user and application along with the given JSON body that contains the event information. OR Deletes the user registration for the given user and application.
6265pub async fn delete_user_registration_with_id(configuration: &configuration::Configuration, user_id: &str, application_id: &str, x_fusion_auth_tenant_id: Option<&str>, registration_delete_request: Option<models::RegistrationDeleteRequest>) -> Result<(), Error<DeleteUserRegistrationWithIdError>> {
6266    let local_var_configuration = configuration;
6267
6268    let local_var_client = &local_var_configuration.client;
6269
6270    let local_var_uri_str = format!("{}/api/user/registration/{userId}/{applicationId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id), applicationId=crate::apis::urlencode(application_id));
6271    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
6272
6273    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6274        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6275    }
6276    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
6277        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
6278    }
6279    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6280        let local_var_key = local_var_apikey.key.clone();
6281        let local_var_value = match local_var_apikey.prefix {
6282            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6283            None => local_var_key,
6284        };
6285        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6286    };
6287    local_var_req_builder = local_var_req_builder.json(&registration_delete_request);
6288
6289    let local_var_req = local_var_req_builder.build()?;
6290    let local_var_resp = local_var_client.execute(local_var_req).await?;
6291
6292    let local_var_status = local_var_resp.status();
6293
6294    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6295        Ok(())
6296    } else {
6297        let local_var_content = local_var_resp.text().await?;
6298        let local_var_entity: Option<DeleteUserRegistrationWithIdError> = serde_json::from_str(&local_var_content).ok();
6299        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6300        Err(Error::ResponseError(local_var_error))
6301    }
6302}
6303
6304/// Disable two-factor authentication for a user using a JSON body rather than URL parameters. OR Disable two-factor authentication for a user.
6305pub async fn delete_user_two_factor_with_id(configuration: &configuration::Configuration, user_id: &str, method_id: Option<&str>, code: Option<&str>, two_factor_disable_request: Option<models::TwoFactorDisableRequest>) -> Result<(), Error<DeleteUserTwoFactorWithIdError>> {
6306    let local_var_configuration = configuration;
6307
6308    let local_var_client = &local_var_configuration.client;
6309
6310    let local_var_uri_str = format!("{}/api/user/two-factor/{userId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id));
6311    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
6312
6313    if let Some(ref local_var_str) = method_id {
6314        local_var_req_builder = local_var_req_builder.query(&[("methodId", &local_var_str.to_string())]);
6315    }
6316    if let Some(ref local_var_str) = code {
6317        local_var_req_builder = local_var_req_builder.query(&[("code", &local_var_str.to_string())]);
6318    }
6319    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6320        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6321    }
6322    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6323        let local_var_key = local_var_apikey.key.clone();
6324        let local_var_value = match local_var_apikey.prefix {
6325            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6326            None => local_var_key,
6327        };
6328        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6329    };
6330    local_var_req_builder = local_var_req_builder.json(&two_factor_disable_request);
6331
6332    let local_var_req = local_var_req_builder.build()?;
6333    let local_var_resp = local_var_client.execute(local_var_req).await?;
6334
6335    let local_var_status = local_var_resp.status();
6336
6337    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6338        Ok(())
6339    } else {
6340        let local_var_content = local_var_resp.text().await?;
6341        let local_var_entity: Option<DeleteUserTwoFactorWithIdError> = serde_json::from_str(&local_var_content).ok();
6342        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6343        Err(Error::ResponseError(local_var_error))
6344    }
6345}
6346
6347/// Deactivates the user with the given Id. OR Deletes the user for the given Id. This permanently deletes all information, metrics, reports and data associated with the user. OR Deletes the user based on the given request (sent to the API as JSON). This permanently deletes all information, metrics, reports and data associated with the user.
6348pub async fn delete_user_with_id(configuration: &configuration::Configuration, user_id: &str, x_fusion_auth_tenant_id: Option<&str>, hard_delete: Option<&str>, user_delete_single_request: Option<models::UserDeleteSingleRequest>) -> Result<(), Error<DeleteUserWithIdError>> {
6349    let local_var_configuration = configuration;
6350
6351    let local_var_client = &local_var_configuration.client;
6352
6353    let local_var_uri_str = format!("{}/api/user/{userId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id));
6354    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
6355
6356    if let Some(ref local_var_str) = hard_delete {
6357        local_var_req_builder = local_var_req_builder.query(&[("hardDelete", &local_var_str.to_string())]);
6358    }
6359    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6360        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6361    }
6362    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
6363        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
6364    }
6365    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6366        let local_var_key = local_var_apikey.key.clone();
6367        let local_var_value = match local_var_apikey.prefix {
6368            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6369            None => local_var_key,
6370        };
6371        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6372    };
6373    local_var_req_builder = local_var_req_builder.json(&user_delete_single_request);
6374
6375    let local_var_req = local_var_req_builder.build()?;
6376    let local_var_resp = local_var_client.execute(local_var_req).await?;
6377
6378    let local_var_status = local_var_resp.status();
6379
6380    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6381        Ok(())
6382    } else {
6383        let local_var_content = local_var_resp.text().await?;
6384        let local_var_entity: Option<DeleteUserWithIdError> = serde_json::from_str(&local_var_content).ok();
6385        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6386        Err(Error::ResponseError(local_var_error))
6387    }
6388}
6389
6390/// Deletes the WebAuthn credential for the given Id.
6391pub async fn delete_web_authn_credential_with_id(configuration: &configuration::Configuration, id: &str) -> Result<(), Error<DeleteWebAuthnCredentialWithIdError>> {
6392    let local_var_configuration = configuration;
6393
6394    let local_var_client = &local_var_configuration.client;
6395
6396    let local_var_uri_str = format!("{}/api/webauthn/{id}", local_var_configuration.base_path, id=crate::apis::urlencode(id));
6397    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
6398
6399    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6400        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6401    }
6402    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6403        let local_var_key = local_var_apikey.key.clone();
6404        let local_var_value = match local_var_apikey.prefix {
6405            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6406            None => local_var_key,
6407        };
6408        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6409    };
6410
6411    let local_var_req = local_var_req_builder.build()?;
6412    let local_var_resp = local_var_client.execute(local_var_req).await?;
6413
6414    let local_var_status = local_var_resp.status();
6415
6416    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6417        Ok(())
6418    } else {
6419        let local_var_content = local_var_resp.text().await?;
6420        let local_var_entity: Option<DeleteWebAuthnCredentialWithIdError> = serde_json::from_str(&local_var_content).ok();
6421        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6422        Err(Error::ResponseError(local_var_error))
6423    }
6424}
6425
6426/// Deletes the webhook for the given Id.
6427pub async fn delete_webhook_with_id(configuration: &configuration::Configuration, webhook_id: &str) -> Result<(), Error<DeleteWebhookWithIdError>> {
6428    let local_var_configuration = configuration;
6429
6430    let local_var_client = &local_var_configuration.client;
6431
6432    let local_var_uri_str = format!("{}/api/webhook/{webhookId}", local_var_configuration.base_path, webhookId=crate::apis::urlencode(webhook_id));
6433    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
6434
6435    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6436        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6437    }
6438    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6439        let local_var_key = local_var_apikey.key.clone();
6440        let local_var_value = match local_var_apikey.prefix {
6441            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6442            None => local_var_key,
6443        };
6444        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6445    };
6446
6447    let local_var_req = local_var_req_builder.build()?;
6448    let local_var_resp = local_var_client.execute(local_var_req).await?;
6449
6450    let local_var_status = local_var_resp.status();
6451
6452    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6453        Ok(())
6454    } else {
6455        let local_var_content = local_var_resp.text().await?;
6456        let local_var_entity: Option<DeleteWebhookWithIdError> = serde_json::from_str(&local_var_content).ok();
6457        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6458        Err(Error::ResponseError(local_var_error))
6459    }
6460}
6461
6462/// Enable two-factor authentication for a user.
6463pub async fn enable_two_factor_with_id(configuration: &configuration::Configuration, user_id: &str, two_factor_request: Option<models::TwoFactorRequest>) -> Result<models::TwoFactorResponse, Error<EnableTwoFactorWithIdError>> {
6464    let local_var_configuration = configuration;
6465
6466    let local_var_client = &local_var_configuration.client;
6467
6468    let local_var_uri_str = format!("{}/api/user/two-factor/{userId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id));
6469    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
6470
6471    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6472        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6473    }
6474    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6475        let local_var_key = local_var_apikey.key.clone();
6476        let local_var_value = match local_var_apikey.prefix {
6477            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6478            None => local_var_key,
6479        };
6480        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6481    };
6482    local_var_req_builder = local_var_req_builder.json(&two_factor_request);
6483
6484    let local_var_req = local_var_req_builder.build()?;
6485    let local_var_resp = local_var_client.execute(local_var_req).await?;
6486
6487    let local_var_status = local_var_resp.status();
6488
6489    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6490        let local_var_content = local_var_resp.text().await?;
6491        serde_json::from_str(&local_var_content).map_err(Error::from)
6492    } else {
6493        let local_var_content = local_var_resp.text().await?;
6494        let local_var_entity: Option<EnableTwoFactorWithIdError> = serde_json::from_str(&local_var_content).ok();
6495        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6496        Err(Error::ResponseError(local_var_error))
6497    }
6498}
6499
6500/// Exchange a refresh token for a new JWT.
6501pub async fn exchange_refresh_token_for_jwt_with_id(configuration: &configuration::Configuration, refresh_request: Option<models::RefreshRequest>) -> Result<models::JwtRefreshResponse, Error<ExchangeRefreshTokenForJwtWithIdError>> {
6502    let local_var_configuration = configuration;
6503
6504    let local_var_client = &local_var_configuration.client;
6505
6506    let local_var_uri_str = format!("{}/api/jwt/refresh", local_var_configuration.base_path);
6507    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
6508
6509    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6510        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6511    }
6512    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6513        let local_var_key = local_var_apikey.key.clone();
6514        let local_var_value = match local_var_apikey.prefix {
6515            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6516            None => local_var_key,
6517        };
6518        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6519    };
6520    local_var_req_builder = local_var_req_builder.json(&refresh_request);
6521
6522    let local_var_req = local_var_req_builder.build()?;
6523    let local_var_resp = local_var_client.execute(local_var_req).await?;
6524
6525    let local_var_status = local_var_resp.status();
6526
6527    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6528        let local_var_content = local_var_resp.text().await?;
6529        serde_json::from_str(&local_var_content).map_err(Error::from)
6530    } else {
6531        let local_var_content = local_var_resp.text().await?;
6532        let local_var_entity: Option<ExchangeRefreshTokenForJwtWithIdError> = serde_json::from_str(&local_var_content).ok();
6533        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6534        Err(Error::ResponseError(local_var_error))
6535    }
6536}
6537
6538/// Begins the forgot password sequence, which kicks off an email to the user so that they can reset their password.
6539pub async fn forgot_password_with_id(configuration: &configuration::Configuration, forgot_password_request: Option<models::ForgotPasswordRequest>) -> Result<models::ForgotPasswordResponse, Error<ForgotPasswordWithIdError>> {
6540    let local_var_configuration = configuration;
6541
6542    let local_var_client = &local_var_configuration.client;
6543
6544    let local_var_uri_str = format!("{}/api/user/forgot-password", local_var_configuration.base_path);
6545    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
6546
6547    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6548        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6549    }
6550    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6551        let local_var_key = local_var_apikey.key.clone();
6552        let local_var_value = match local_var_apikey.prefix {
6553            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6554            None => local_var_key,
6555        };
6556        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6557    };
6558    local_var_req_builder = local_var_req_builder.json(&forgot_password_request);
6559
6560    let local_var_req = local_var_req_builder.build()?;
6561    let local_var_resp = local_var_client.execute(local_var_req).await?;
6562
6563    let local_var_status = local_var_resp.status();
6564
6565    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6566        let local_var_content = local_var_resp.text().await?;
6567        serde_json::from_str(&local_var_content).map_err(Error::from)
6568    } else {
6569        let local_var_content = local_var_resp.text().await?;
6570        let local_var_entity: Option<ForgotPasswordWithIdError> = serde_json::from_str(&local_var_content).ok();
6571        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6572        Err(Error::ResponseError(local_var_error))
6573    }
6574}
6575
6576/// Generate a new RSA or EC key pair or an HMAC secret.
6577pub async fn generate_key(configuration: &configuration::Configuration, key_request: Option<models::KeyRequest>) -> Result<models::KeyResponse, Error<GenerateKeyError>> {
6578    let local_var_configuration = configuration;
6579
6580    let local_var_client = &local_var_configuration.client;
6581
6582    let local_var_uri_str = format!("{}/api/key/generate", local_var_configuration.base_path);
6583    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
6584
6585    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6586        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6587    }
6588    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6589        let local_var_key = local_var_apikey.key.clone();
6590        let local_var_value = match local_var_apikey.prefix {
6591            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6592            None => local_var_key,
6593        };
6594        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6595    };
6596    local_var_req_builder = local_var_req_builder.json(&key_request);
6597
6598    let local_var_req = local_var_req_builder.build()?;
6599    let local_var_resp = local_var_client.execute(local_var_req).await?;
6600
6601    let local_var_status = local_var_resp.status();
6602
6603    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6604        let local_var_content = local_var_resp.text().await?;
6605        serde_json::from_str(&local_var_content).map_err(Error::from)
6606    } else {
6607        let local_var_content = local_var_resp.text().await?;
6608        let local_var_entity: Option<GenerateKeyError> = serde_json::from_str(&local_var_content).ok();
6609        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6610        Err(Error::ResponseError(local_var_error))
6611    }
6612}
6613
6614/// Generate a new RSA or EC key pair or an HMAC secret.
6615pub async fn generate_key_with_id(configuration: &configuration::Configuration, key_id: &str, key_request: Option<models::KeyRequest>) -> Result<models::KeyResponse, Error<GenerateKeyWithIdError>> {
6616    let local_var_configuration = configuration;
6617
6618    let local_var_client = &local_var_configuration.client;
6619
6620    let local_var_uri_str = format!("{}/api/key/generate/{keyId}", local_var_configuration.base_path, keyId=crate::apis::urlencode(key_id));
6621    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
6622
6623    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6624        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6625    }
6626    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6627        let local_var_key = local_var_apikey.key.clone();
6628        let local_var_value = match local_var_apikey.prefix {
6629            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6630            None => local_var_key,
6631        };
6632        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6633    };
6634    local_var_req_builder = local_var_req_builder.json(&key_request);
6635
6636    let local_var_req = local_var_req_builder.build()?;
6637    let local_var_resp = local_var_client.execute(local_var_req).await?;
6638
6639    let local_var_status = local_var_resp.status();
6640
6641    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6642        let local_var_content = local_var_resp.text().await?;
6643        serde_json::from_str(&local_var_content).map_err(Error::from)
6644    } else {
6645        let local_var_content = local_var_resp.text().await?;
6646        let local_var_entity: Option<GenerateKeyWithIdError> = serde_json::from_str(&local_var_content).ok();
6647        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6648        Err(Error::ResponseError(local_var_error))
6649    }
6650}
6651
6652/// Generate two-factor recovery codes for a user. Generating two-factor recovery codes will invalidate any existing recovery codes.
6653pub async fn generate_two_factor_recovery_codes_with_id(configuration: &configuration::Configuration, user_id: &str) -> Result<models::TwoFactorRecoveryCodeResponse, Error<GenerateTwoFactorRecoveryCodesWithIdError>> {
6654    let local_var_configuration = configuration;
6655
6656    let local_var_client = &local_var_configuration.client;
6657
6658    let local_var_uri_str = format!("{}/api/user/two-factor/recovery-code/{userId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id));
6659    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
6660
6661    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6662        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6663    }
6664    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6665        let local_var_key = local_var_apikey.key.clone();
6666        let local_var_value = match local_var_apikey.prefix {
6667            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6668            None => local_var_key,
6669        };
6670        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6671    };
6672
6673    let local_var_req = local_var_req_builder.build()?;
6674    let local_var_resp = local_var_client.execute(local_var_req).await?;
6675
6676    let local_var_status = local_var_resp.status();
6677
6678    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6679        let local_var_content = local_var_resp.text().await?;
6680        serde_json::from_str(&local_var_content).map_err(Error::from)
6681    } else {
6682        let local_var_content = local_var_resp.text().await?;
6683        let local_var_entity: Option<GenerateTwoFactorRecoveryCodesWithIdError> = serde_json::from_str(&local_var_content).ok();
6684        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6685        Err(Error::ResponseError(local_var_error))
6686    }
6687}
6688
6689/// Generate a Two Factor secret that can be used to enable Two Factor authentication for a User. The response will contain both the secret and a Base32 encoded form of the secret which can be shown to a User when using a 2 Step Authentication application such as Google Authenticator.
6690pub async fn generate_two_factor_secret_using_jwt_with_id(configuration: &configuration::Configuration, ) -> Result<models::SecretResponse, Error<GenerateTwoFactorSecretUsingJwtWithIdError>> {
6691    let local_var_configuration = configuration;
6692
6693    let local_var_client = &local_var_configuration.client;
6694
6695    let local_var_uri_str = format!("{}/api/two-factor/secret", local_var_configuration.base_path);
6696    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
6697
6698    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6699        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6700    }
6701    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
6702        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
6703    };
6704
6705    let local_var_req = local_var_req_builder.build()?;
6706    let local_var_resp = local_var_client.execute(local_var_req).await?;
6707
6708    let local_var_status = local_var_resp.status();
6709
6710    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6711        let local_var_content = local_var_resp.text().await?;
6712        serde_json::from_str(&local_var_content).map_err(Error::from)
6713    } else {
6714        let local_var_content = local_var_resp.text().await?;
6715        let local_var_entity: Option<GenerateTwoFactorSecretUsingJwtWithIdError> = serde_json::from_str(&local_var_content).ok();
6716        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6717        Err(Error::ResponseError(local_var_error))
6718    }
6719}
6720
6721/// Handles login via third-parties including Social login, external OAuth and OpenID Connect, and other login systems.
6722pub async fn identity_provider_login_with_id(configuration: &configuration::Configuration, x_fusion_auth_tenant_id: Option<&str>, identity_provider_login_request: Option<models::IdentityProviderLoginRequest>) -> Result<models::LoginResponse, Error<IdentityProviderLoginWithIdError>> {
6723    let local_var_configuration = configuration;
6724
6725    let local_var_client = &local_var_configuration.client;
6726
6727    let local_var_uri_str = format!("{}/api/identity-provider/login", local_var_configuration.base_path);
6728    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
6729
6730    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6731        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6732    }
6733    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
6734        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
6735    }
6736    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6737        let local_var_key = local_var_apikey.key.clone();
6738        let local_var_value = match local_var_apikey.prefix {
6739            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6740            None => local_var_key,
6741        };
6742        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6743    };
6744    local_var_req_builder = local_var_req_builder.json(&identity_provider_login_request);
6745
6746    let local_var_req = local_var_req_builder.build()?;
6747    let local_var_resp = local_var_client.execute(local_var_req).await?;
6748
6749    let local_var_status = local_var_resp.status();
6750
6751    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6752        let local_var_content = local_var_resp.text().await?;
6753        serde_json::from_str(&local_var_content).map_err(Error::from)
6754    } else {
6755        let local_var_content = local_var_resp.text().await?;
6756        let local_var_entity: Option<IdentityProviderLoginWithIdError> = serde_json::from_str(&local_var_content).ok();
6757        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6758        Err(Error::ResponseError(local_var_error))
6759    }
6760}
6761
6762/// Import an existing RSA or EC key pair or an HMAC secret.
6763pub async fn import_key(configuration: &configuration::Configuration, key_request: Option<models::KeyRequest>) -> Result<models::KeyResponse, Error<ImportKeyError>> {
6764    let local_var_configuration = configuration;
6765
6766    let local_var_client = &local_var_configuration.client;
6767
6768    let local_var_uri_str = format!("{}/api/key/import", local_var_configuration.base_path);
6769    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
6770
6771    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6772        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6773    }
6774    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6775        let local_var_key = local_var_apikey.key.clone();
6776        let local_var_value = match local_var_apikey.prefix {
6777            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6778            None => local_var_key,
6779        };
6780        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6781    };
6782    local_var_req_builder = local_var_req_builder.json(&key_request);
6783
6784    let local_var_req = local_var_req_builder.build()?;
6785    let local_var_resp = local_var_client.execute(local_var_req).await?;
6786
6787    let local_var_status = local_var_resp.status();
6788
6789    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6790        let local_var_content = local_var_resp.text().await?;
6791        serde_json::from_str(&local_var_content).map_err(Error::from)
6792    } else {
6793        let local_var_content = local_var_resp.text().await?;
6794        let local_var_entity: Option<ImportKeyError> = serde_json::from_str(&local_var_content).ok();
6795        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6796        Err(Error::ResponseError(local_var_error))
6797    }
6798}
6799
6800/// Import an existing RSA or EC key pair or an HMAC secret.
6801pub async fn import_key_with_id(configuration: &configuration::Configuration, key_id: &str, key_request: Option<models::KeyRequest>) -> Result<models::KeyResponse, Error<ImportKeyWithIdError>> {
6802    let local_var_configuration = configuration;
6803
6804    let local_var_client = &local_var_configuration.client;
6805
6806    let local_var_uri_str = format!("{}/api/key/import/{keyId}", local_var_configuration.base_path, keyId=crate::apis::urlencode(key_id));
6807    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
6808
6809    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6810        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6811    }
6812    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6813        let local_var_key = local_var_apikey.key.clone();
6814        let local_var_value = match local_var_apikey.prefix {
6815            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6816            None => local_var_key,
6817        };
6818        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6819    };
6820    local_var_req_builder = local_var_req_builder.json(&key_request);
6821
6822    let local_var_req = local_var_req_builder.build()?;
6823    let local_var_resp = local_var_client.execute(local_var_req).await?;
6824
6825    let local_var_status = local_var_resp.status();
6826
6827    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6828        let local_var_content = local_var_resp.text().await?;
6829        serde_json::from_str(&local_var_content).map_err(Error::from)
6830    } else {
6831        let local_var_content = local_var_resp.text().await?;
6832        let local_var_entity: Option<ImportKeyWithIdError> = serde_json::from_str(&local_var_content).ok();
6833        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6834        Err(Error::ResponseError(local_var_error))
6835    }
6836}
6837
6838/// Bulk imports refresh tokens. This request performs minimal validation and runs batch inserts of refresh tokens with the expectation that each token represents a user that already exists and is registered for the corresponding FusionAuth Application. This is done to increases the insert performance.  Therefore, if you encounter an error due to a database key violation, the response will likely offer a generic explanation. If you encounter an error, you may optionally enable additional validation to receive a JSON response body with specific validation errors. This will slow the request down but will allow you to identify the cause of the failure. See the validateDbConstraints request parameter.
6839pub async fn import_refresh_tokens_with_id(configuration: &configuration::Configuration, refresh_token_import_request: Option<models::RefreshTokenImportRequest>) -> Result<(), Error<ImportRefreshTokensWithIdError>> {
6840    let local_var_configuration = configuration;
6841
6842    let local_var_client = &local_var_configuration.client;
6843
6844    let local_var_uri_str = format!("{}/api/user/refresh-token/import", local_var_configuration.base_path);
6845    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
6846
6847    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6848        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6849    }
6850    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6851        let local_var_key = local_var_apikey.key.clone();
6852        let local_var_value = match local_var_apikey.prefix {
6853            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6854            None => local_var_key,
6855        };
6856        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6857    };
6858    local_var_req_builder = local_var_req_builder.json(&refresh_token_import_request);
6859
6860    let local_var_req = local_var_req_builder.build()?;
6861    let local_var_resp = local_var_client.execute(local_var_req).await?;
6862
6863    let local_var_status = local_var_resp.status();
6864
6865    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6866        Ok(())
6867    } else {
6868        let local_var_content = local_var_resp.text().await?;
6869        let local_var_entity: Option<ImportRefreshTokensWithIdError> = serde_json::from_str(&local_var_content).ok();
6870        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6871        Err(Error::ResponseError(local_var_error))
6872    }
6873}
6874
6875/// Bulk imports users. This request performs minimal validation and runs batch inserts of users with the expectation that each user does not yet exist and each registration corresponds to an existing FusionAuth Application. This is done to increases the insert performance.  Therefore, if you encounter an error due to a database key violation, the response will likely offer a generic explanation. If you encounter an error, you may optionally enable additional validation to receive a JSON response body with specific validation errors. This will slow the request down but will allow you to identify the cause of the failure. See the validateDbConstraints request parameter.
6876pub async fn import_users_with_id(configuration: &configuration::Configuration, import_request: Option<models::ImportRequest>) -> Result<(), Error<ImportUsersWithIdError>> {
6877    let local_var_configuration = configuration;
6878
6879    let local_var_client = &local_var_configuration.client;
6880
6881    let local_var_uri_str = format!("{}/api/user/import", local_var_configuration.base_path);
6882    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
6883
6884    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6885        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6886    }
6887    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6888        let local_var_key = local_var_apikey.key.clone();
6889        let local_var_value = match local_var_apikey.prefix {
6890            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6891            None => local_var_key,
6892        };
6893        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6894    };
6895    local_var_req_builder = local_var_req_builder.json(&import_request);
6896
6897    let local_var_req = local_var_req_builder.build()?;
6898    let local_var_resp = local_var_client.execute(local_var_req).await?;
6899
6900    let local_var_status = local_var_resp.status();
6901
6902    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6903        Ok(())
6904    } else {
6905        let local_var_content = local_var_resp.text().await?;
6906        let local_var_entity: Option<ImportUsersWithIdError> = serde_json::from_str(&local_var_content).ok();
6907        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6908        Err(Error::ResponseError(local_var_error))
6909    }
6910}
6911
6912/// Import a WebAuthn credential
6913pub async fn import_web_authn_credential_with_id(configuration: &configuration::Configuration, web_authn_credential_import_request: Option<models::WebAuthnCredentialImportRequest>) -> Result<(), Error<ImportWebAuthnCredentialWithIdError>> {
6914    let local_var_configuration = configuration;
6915
6916    let local_var_client = &local_var_configuration.client;
6917
6918    let local_var_uri_str = format!("{}/api/webauthn/import", local_var_configuration.base_path);
6919    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
6920
6921    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6922        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6923    }
6924    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6925        let local_var_key = local_var_apikey.key.clone();
6926        let local_var_value = match local_var_apikey.prefix {
6927            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6928            None => local_var_key,
6929        };
6930        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6931    };
6932    local_var_req_builder = local_var_req_builder.json(&web_authn_credential_import_request);
6933
6934    let local_var_req = local_var_req_builder.build()?;
6935    let local_var_resp = local_var_client.execute(local_var_req).await?;
6936
6937    let local_var_status = local_var_resp.status();
6938
6939    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6940        Ok(())
6941    } else {
6942        let local_var_content = local_var_resp.text().await?;
6943        let local_var_entity: Option<ImportWebAuthnCredentialWithIdError> = serde_json::from_str(&local_var_content).ok();
6944        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6945        Err(Error::ResponseError(local_var_error))
6946    }
6947}
6948
6949/// Issue a new access token (JWT) for the requested Application after ensuring the provided JWT is valid. A valid access token is properly signed and not expired. <p> This API may be used in an SSO configuration to issue new tokens for another application after the user has obtained a valid token from authentication.
6950pub async fn issue_jwt_with_id(configuration: &configuration::Configuration, application_id: Option<&str>, refresh_token: Option<&str>) -> Result<models::IssueResponse, Error<IssueJwtWithIdError>> {
6951    let local_var_configuration = configuration;
6952
6953    let local_var_client = &local_var_configuration.client;
6954
6955    let local_var_uri_str = format!("{}/api/jwt/issue", local_var_configuration.base_path);
6956    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
6957
6958    if let Some(ref local_var_str) = application_id {
6959        local_var_req_builder = local_var_req_builder.query(&[("applicationId", &local_var_str.to_string())]);
6960    }
6961    if let Some(ref local_var_str) = refresh_token {
6962        local_var_req_builder = local_var_req_builder.query(&[("refreshToken", &local_var_str.to_string())]);
6963    }
6964    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6965        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6966    }
6967    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
6968        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
6969    };
6970
6971    let local_var_req = local_var_req_builder.build()?;
6972    let local_var_resp = local_var_client.execute(local_var_req).await?;
6973
6974    let local_var_status = local_var_resp.status();
6975
6976    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6977        let local_var_content = local_var_resp.text().await?;
6978        serde_json::from_str(&local_var_content).map_err(Error::from)
6979    } else {
6980        let local_var_content = local_var_resp.text().await?;
6981        let local_var_entity: Option<IssueJwtWithIdError> = serde_json::from_str(&local_var_content).ok();
6982        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6983        Err(Error::ResponseError(local_var_error))
6984    }
6985}
6986
6987/// Sends a ping to FusionAuth indicating that the user was automatically logged into an application. When using FusionAuth's SSO or your own, you should call this if the user is already logged in centrally, but accesses an application where they no longer have a session. This helps correctly track login counts, times and helps with reporting.
6988pub async fn login_ping_with_id(configuration: &configuration::Configuration, user_id: &str, application_id: &str, caller_ip_address: Option<&str>, x_fusion_auth_tenant_id: Option<&str>) -> Result<models::LoginResponse, Error<LoginPingWithIdError>> {
6989    let local_var_configuration = configuration;
6990
6991    let local_var_client = &local_var_configuration.client;
6992
6993    let local_var_uri_str = format!("{}/api/login/{userId}/{applicationId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id), applicationId=crate::apis::urlencode(application_id));
6994    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
6995
6996    if let Some(ref local_var_str) = caller_ip_address {
6997        local_var_req_builder = local_var_req_builder.query(&[("callerIPAddress", &local_var_str.to_string())]);
6998    }
6999    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7000        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7001    }
7002    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
7003        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
7004    }
7005    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7006        let local_var_key = local_var_apikey.key.clone();
7007        let local_var_value = match local_var_apikey.prefix {
7008            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7009            None => local_var_key,
7010        };
7011        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7012    };
7013
7014    let local_var_req = local_var_req_builder.build()?;
7015    let local_var_resp = local_var_client.execute(local_var_req).await?;
7016
7017    let local_var_status = local_var_resp.status();
7018
7019    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7020        let local_var_content = local_var_resp.text().await?;
7021        serde_json::from_str(&local_var_content).map_err(Error::from)
7022    } else {
7023        let local_var_content = local_var_resp.text().await?;
7024        let local_var_entity: Option<LoginPingWithIdError> = serde_json::from_str(&local_var_content).ok();
7025        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7026        Err(Error::ResponseError(local_var_error))
7027    }
7028}
7029
7030/// Sends a ping to FusionAuth indicating that the user was automatically logged into an application. When using FusionAuth's SSO or your own, you should call this if the user is already logged in centrally, but accesses an application where they no longer have a session. This helps correctly track login counts, times and helps with reporting.
7031pub async fn login_ping_with_request_with_id(configuration: &configuration::Configuration, x_fusion_auth_tenant_id: Option<&str>, login_ping_request: Option<models::LoginPingRequest>) -> Result<models::LoginResponse, Error<LoginPingWithRequestWithIdError>> {
7032    let local_var_configuration = configuration;
7033
7034    let local_var_client = &local_var_configuration.client;
7035
7036    let local_var_uri_str = format!("{}/api/login", local_var_configuration.base_path);
7037    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
7038
7039    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7040        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7041    }
7042    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
7043        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
7044    }
7045    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7046        let local_var_key = local_var_apikey.key.clone();
7047        let local_var_value = match local_var_apikey.prefix {
7048            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7049            None => local_var_key,
7050        };
7051        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7052    };
7053    local_var_req_builder = local_var_req_builder.json(&login_ping_request);
7054
7055    let local_var_req = local_var_req_builder.build()?;
7056    let local_var_resp = local_var_client.execute(local_var_req).await?;
7057
7058    let local_var_status = local_var_resp.status();
7059
7060    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7061        let local_var_content = local_var_resp.text().await?;
7062        serde_json::from_str(&local_var_content).map_err(Error::from)
7063    } else {
7064        let local_var_content = local_var_resp.text().await?;
7065        let local_var_entity: Option<LoginPingWithRequestWithIdError> = serde_json::from_str(&local_var_content).ok();
7066        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7067        Err(Error::ResponseError(local_var_error))
7068    }
7069}
7070
7071/// Authenticates a user to FusionAuth.   This API optionally requires an API key. See <code>Application.loginConfiguration.requireAuthentication</code>.
7072pub async fn login_with_id(configuration: &configuration::Configuration, x_fusion_auth_tenant_id: Option<&str>, login_request: Option<models::LoginRequest>) -> Result<models::LoginResponse, Error<LoginWithIdError>> {
7073    let local_var_configuration = configuration;
7074
7075    let local_var_client = &local_var_configuration.client;
7076
7077    let local_var_uri_str = format!("{}/api/login", local_var_configuration.base_path);
7078    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
7079
7080    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7081        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7082    }
7083    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
7084        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
7085    }
7086    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7087        let local_var_key = local_var_apikey.key.clone();
7088        let local_var_value = match local_var_apikey.prefix {
7089            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7090            None => local_var_key,
7091        };
7092        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7093    };
7094    local_var_req_builder = local_var_req_builder.json(&login_request);
7095
7096    let local_var_req = local_var_req_builder.build()?;
7097    let local_var_resp = local_var_client.execute(local_var_req).await?;
7098
7099    let local_var_status = local_var_resp.status();
7100
7101    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7102        let local_var_content = local_var_resp.text().await?;
7103        serde_json::from_str(&local_var_content).map_err(Error::from)
7104    } else {
7105        let local_var_content = local_var_resp.text().await?;
7106        let local_var_entity: Option<LoginWithIdError> = serde_json::from_str(&local_var_content).ok();
7107        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7108        Err(Error::ResponseError(local_var_error))
7109    }
7110}
7111
7112/// Retrieves the identity provider for the given domain. A 200 response code indicates the domain is managed by a registered identity provider. A 404 indicates the domain is not managed.
7113pub async fn lookup_identity_provider_with_id(configuration: &configuration::Configuration, domain: Option<&str>) -> Result<models::LookupResponse, Error<LookupIdentityProviderWithIdError>> {
7114    let local_var_configuration = configuration;
7115
7116    let local_var_client = &local_var_configuration.client;
7117
7118    let local_var_uri_str = format!("{}/api/identity-provider/lookup", local_var_configuration.base_path);
7119    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
7120
7121    if let Some(ref local_var_str) = domain {
7122        local_var_req_builder = local_var_req_builder.query(&[("domain", &local_var_str.to_string())]);
7123    }
7124    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7125        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7126    }
7127    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7128        let local_var_key = local_var_apikey.key.clone();
7129        let local_var_value = match local_var_apikey.prefix {
7130            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7131            None => local_var_key,
7132        };
7133        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7134    };
7135
7136    let local_var_req = local_var_req_builder.build()?;
7137    let local_var_resp = local_var_client.execute(local_var_req).await?;
7138
7139    let local_var_status = local_var_resp.status();
7140
7141    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7142        let local_var_content = local_var_resp.text().await?;
7143        serde_json::from_str(&local_var_content).map_err(Error::from)
7144    } else {
7145        let local_var_content = local_var_resp.text().await?;
7146        let local_var_entity: Option<LookupIdentityProviderWithIdError> = serde_json::from_str(&local_var_content).ok();
7147        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7148        Err(Error::ResponseError(local_var_error))
7149    }
7150}
7151
7152/// Modifies a temporal user action by changing the expiration of the action and optionally adding a comment to the action.
7153pub async fn modify_action_with_id(configuration: &configuration::Configuration, action_id: &str, action_request: Option<models::ActionRequest>) -> Result<models::ActionResponse, Error<ModifyActionWithIdError>> {
7154    let local_var_configuration = configuration;
7155
7156    let local_var_client = &local_var_configuration.client;
7157
7158    let local_var_uri_str = format!("{}/api/user/action/{actionId}", local_var_configuration.base_path, actionId=crate::apis::urlencode(action_id));
7159    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
7160
7161    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7162        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7163    }
7164    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7165        let local_var_key = local_var_apikey.key.clone();
7166        let local_var_value = match local_var_apikey.prefix {
7167            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7168            None => local_var_key,
7169        };
7170        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7171    };
7172    local_var_req_builder = local_var_req_builder.json(&action_request);
7173
7174    let local_var_req = local_var_req_builder.build()?;
7175    let local_var_resp = local_var_client.execute(local_var_req).await?;
7176
7177    let local_var_status = local_var_resp.status();
7178
7179    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7180        let local_var_content = local_var_resp.text().await?;
7181        serde_json::from_str(&local_var_content).map_err(Error::from)
7182    } else {
7183        let local_var_content = local_var_resp.text().await?;
7184        let local_var_entity: Option<ModifyActionWithIdError> = serde_json::from_str(&local_var_content).ok();
7185        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7186        Err(Error::ResponseError(local_var_error))
7187    }
7188}
7189
7190/// Complete a login request using a passwordless code
7191pub async fn passwordless_login_with_id(configuration: &configuration::Configuration, passwordless_login_request: Option<models::PasswordlessLoginRequest>) -> Result<models::LoginResponse, Error<PasswordlessLoginWithIdError>> {
7192    let local_var_configuration = configuration;
7193
7194    let local_var_client = &local_var_configuration.client;
7195
7196    let local_var_uri_str = format!("{}/api/passwordless/login", local_var_configuration.base_path);
7197    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
7198
7199    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7200        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7201    }
7202    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7203        let local_var_key = local_var_apikey.key.clone();
7204        let local_var_value = match local_var_apikey.prefix {
7205            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7206            None => local_var_key,
7207        };
7208        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7209    };
7210    local_var_req_builder = local_var_req_builder.json(&passwordless_login_request);
7211
7212    let local_var_req = local_var_req_builder.build()?;
7213    let local_var_resp = local_var_client.execute(local_var_req).await?;
7214
7215    let local_var_status = local_var_resp.status();
7216
7217    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7218        let local_var_content = local_var_resp.text().await?;
7219        serde_json::from_str(&local_var_content).map_err(Error::from)
7220    } else {
7221        let local_var_content = local_var_resp.text().await?;
7222        let local_var_entity: Option<PasswordlessLoginWithIdError> = serde_json::from_str(&local_var_content).ok();
7223        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7224        Err(Error::ResponseError(local_var_error))
7225    }
7226}
7227
7228/// Updates, via PATCH, the application role with the given Id for the application.
7229pub async fn patch_application_role_with_id(configuration: &configuration::Configuration, application_id: &str, role_id: &str, x_fusion_auth_tenant_id: Option<&str>, application_request: Option<models::ApplicationRequest>) -> Result<models::ApplicationResponse, Error<PatchApplicationRoleWithIdError>> {
7230    let local_var_configuration = configuration;
7231
7232    let local_var_client = &local_var_configuration.client;
7233
7234    let local_var_uri_str = format!("{}/api/application/{applicationId}/role/{roleId}", local_var_configuration.base_path, applicationId=crate::apis::urlencode(application_id), roleId=crate::apis::urlencode(role_id));
7235    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7236
7237    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7238        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7239    }
7240    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
7241        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
7242    }
7243    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7244        let local_var_key = local_var_apikey.key.clone();
7245        let local_var_value = match local_var_apikey.prefix {
7246            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7247            None => local_var_key,
7248        };
7249        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7250    };
7251    local_var_req_builder = local_var_req_builder.json(&application_request);
7252
7253    let local_var_req = local_var_req_builder.build()?;
7254    let local_var_resp = local_var_client.execute(local_var_req).await?;
7255
7256    let local_var_status = local_var_resp.status();
7257
7258    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7259        let local_var_content = local_var_resp.text().await?;
7260        serde_json::from_str(&local_var_content).map_err(Error::from)
7261    } else {
7262        let local_var_content = local_var_resp.text().await?;
7263        let local_var_entity: Option<PatchApplicationRoleWithIdError> = serde_json::from_str(&local_var_content).ok();
7264        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7265        Err(Error::ResponseError(local_var_error))
7266    }
7267}
7268
7269/// Updates, via PATCH, the application with the given Id.
7270pub async fn patch_application_with_id(configuration: &configuration::Configuration, application_id: &str, x_fusion_auth_tenant_id: Option<&str>, application_request: Option<models::ApplicationRequest>) -> Result<models::ApplicationResponse, Error<PatchApplicationWithIdError>> {
7271    let local_var_configuration = configuration;
7272
7273    let local_var_client = &local_var_configuration.client;
7274
7275    let local_var_uri_str = format!("{}/api/application/{applicationId}", local_var_configuration.base_path, applicationId=crate::apis::urlencode(application_id));
7276    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7277
7278    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7279        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7280    }
7281    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
7282        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
7283    }
7284    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7285        let local_var_key = local_var_apikey.key.clone();
7286        let local_var_value = match local_var_apikey.prefix {
7287            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7288            None => local_var_key,
7289        };
7290        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7291    };
7292    local_var_req_builder = local_var_req_builder.json(&application_request);
7293
7294    let local_var_req = local_var_req_builder.build()?;
7295    let local_var_resp = local_var_client.execute(local_var_req).await?;
7296
7297    let local_var_status = local_var_resp.status();
7298
7299    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7300        let local_var_content = local_var_resp.text().await?;
7301        serde_json::from_str(&local_var_content).map_err(Error::from)
7302    } else {
7303        let local_var_content = local_var_resp.text().await?;
7304        let local_var_entity: Option<PatchApplicationWithIdError> = serde_json::from_str(&local_var_content).ok();
7305        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7306        Err(Error::ResponseError(local_var_error))
7307    }
7308}
7309
7310/// Updates, via PATCH, the connector with the given Id.
7311pub async fn patch_connector_with_id(configuration: &configuration::Configuration, connector_id: &str, connector_request: Option<models::ConnectorRequest>) -> Result<models::ConnectorResponse, Error<PatchConnectorWithIdError>> {
7312    let local_var_configuration = configuration;
7313
7314    let local_var_client = &local_var_configuration.client;
7315
7316    let local_var_uri_str = format!("{}/api/connector/{connectorId}", local_var_configuration.base_path, connectorId=crate::apis::urlencode(connector_id));
7317    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7318
7319    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7320        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7321    }
7322    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7323        let local_var_key = local_var_apikey.key.clone();
7324        let local_var_value = match local_var_apikey.prefix {
7325            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7326            None => local_var_key,
7327        };
7328        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7329    };
7330    local_var_req_builder = local_var_req_builder.json(&connector_request);
7331
7332    let local_var_req = local_var_req_builder.build()?;
7333    let local_var_resp = local_var_client.execute(local_var_req).await?;
7334
7335    let local_var_status = local_var_resp.status();
7336
7337    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7338        let local_var_content = local_var_resp.text().await?;
7339        serde_json::from_str(&local_var_content).map_err(Error::from)
7340    } else {
7341        let local_var_content = local_var_resp.text().await?;
7342        let local_var_entity: Option<PatchConnectorWithIdError> = serde_json::from_str(&local_var_content).ok();
7343        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7344        Err(Error::ResponseError(local_var_error))
7345    }
7346}
7347
7348/// Updates, via PATCH, the consent with the given Id.
7349pub async fn patch_consent_with_id(configuration: &configuration::Configuration, consent_id: &str, x_fusion_auth_tenant_id: Option<&str>, consent_request: Option<models::ConsentRequest>) -> Result<models::ConsentResponse, Error<PatchConsentWithIdError>> {
7350    let local_var_configuration = configuration;
7351
7352    let local_var_client = &local_var_configuration.client;
7353
7354    let local_var_uri_str = format!("{}/api/consent/{consentId}", local_var_configuration.base_path, consentId=crate::apis::urlencode(consent_id));
7355    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7356
7357    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7358        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7359    }
7360    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
7361        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
7362    }
7363    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7364        let local_var_key = local_var_apikey.key.clone();
7365        let local_var_value = match local_var_apikey.prefix {
7366            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7367            None => local_var_key,
7368        };
7369        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7370    };
7371    local_var_req_builder = local_var_req_builder.json(&consent_request);
7372
7373    let local_var_req = local_var_req_builder.build()?;
7374    let local_var_resp = local_var_client.execute(local_var_req).await?;
7375
7376    let local_var_status = local_var_resp.status();
7377
7378    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7379        let local_var_content = local_var_resp.text().await?;
7380        serde_json::from_str(&local_var_content).map_err(Error::from)
7381    } else {
7382        let local_var_content = local_var_resp.text().await?;
7383        let local_var_entity: Option<PatchConsentWithIdError> = serde_json::from_str(&local_var_content).ok();
7384        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7385        Err(Error::ResponseError(local_var_error))
7386    }
7387}
7388
7389/// Updates, via PATCH, the email template with the given Id.
7390pub async fn patch_email_template_with_id(configuration: &configuration::Configuration, email_template_id: &str, x_fusion_auth_tenant_id: Option<&str>, email_template_request: Option<models::EmailTemplateRequest>) -> Result<models::EmailTemplateResponse, Error<PatchEmailTemplateWithIdError>> {
7391    let local_var_configuration = configuration;
7392
7393    let local_var_client = &local_var_configuration.client;
7394
7395    let local_var_uri_str = format!("{}/api/email/template/{emailTemplateId}", local_var_configuration.base_path, emailTemplateId=crate::apis::urlencode(email_template_id));
7396    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7397
7398    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7399        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7400    }
7401    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
7402        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
7403    }
7404    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7405        let local_var_key = local_var_apikey.key.clone();
7406        let local_var_value = match local_var_apikey.prefix {
7407            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7408            None => local_var_key,
7409        };
7410        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7411    };
7412    local_var_req_builder = local_var_req_builder.json(&email_template_request);
7413
7414    let local_var_req = local_var_req_builder.build()?;
7415    let local_var_resp = local_var_client.execute(local_var_req).await?;
7416
7417    let local_var_status = local_var_resp.status();
7418
7419    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7420        let local_var_content = local_var_resp.text().await?;
7421        serde_json::from_str(&local_var_content).map_err(Error::from)
7422    } else {
7423        let local_var_content = local_var_resp.text().await?;
7424        let local_var_entity: Option<PatchEmailTemplateWithIdError> = serde_json::from_str(&local_var_content).ok();
7425        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7426        Err(Error::ResponseError(local_var_error))
7427    }
7428}
7429
7430/// Updates, via PATCH, the Entity Type with the given Id.
7431pub async fn patch_entity_type_with_id(configuration: &configuration::Configuration, entity_type_id: &str, entity_type_request: Option<models::EntityTypeRequest>) -> Result<models::EntityTypeResponse, Error<PatchEntityTypeWithIdError>> {
7432    let local_var_configuration = configuration;
7433
7434    let local_var_client = &local_var_configuration.client;
7435
7436    let local_var_uri_str = format!("{}/api/entity/type/{entityTypeId}", local_var_configuration.base_path, entityTypeId=crate::apis::urlencode(entity_type_id));
7437    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7438
7439    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7440        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7441    }
7442    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7443        let local_var_key = local_var_apikey.key.clone();
7444        let local_var_value = match local_var_apikey.prefix {
7445            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7446            None => local_var_key,
7447        };
7448        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7449    };
7450    local_var_req_builder = local_var_req_builder.json(&entity_type_request);
7451
7452    let local_var_req = local_var_req_builder.build()?;
7453    let local_var_resp = local_var_client.execute(local_var_req).await?;
7454
7455    let local_var_status = local_var_resp.status();
7456
7457    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7458        let local_var_content = local_var_resp.text().await?;
7459        serde_json::from_str(&local_var_content).map_err(Error::from)
7460    } else {
7461        let local_var_content = local_var_resp.text().await?;
7462        let local_var_entity: Option<PatchEntityTypeWithIdError> = serde_json::from_str(&local_var_content).ok();
7463        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7464        Err(Error::ResponseError(local_var_error))
7465    }
7466}
7467
7468/// Updates, via PATCH, the group with the given Id.
7469pub async fn patch_group_with_id(configuration: &configuration::Configuration, group_id: &str, x_fusion_auth_tenant_id: Option<&str>, group_request: Option<models::GroupRequest>) -> Result<models::GroupResponse, Error<PatchGroupWithIdError>> {
7470    let local_var_configuration = configuration;
7471
7472    let local_var_client = &local_var_configuration.client;
7473
7474    let local_var_uri_str = format!("{}/api/group/{groupId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_id));
7475    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7476
7477    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7478        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7479    }
7480    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
7481        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
7482    }
7483    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7484        let local_var_key = local_var_apikey.key.clone();
7485        let local_var_value = match local_var_apikey.prefix {
7486            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7487            None => local_var_key,
7488        };
7489        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7490    };
7491    local_var_req_builder = local_var_req_builder.json(&group_request);
7492
7493    let local_var_req = local_var_req_builder.build()?;
7494    let local_var_resp = local_var_client.execute(local_var_req).await?;
7495
7496    let local_var_status = local_var_resp.status();
7497
7498    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7499        let local_var_content = local_var_resp.text().await?;
7500        serde_json::from_str(&local_var_content).map_err(Error::from)
7501    } else {
7502        let local_var_content = local_var_resp.text().await?;
7503        let local_var_entity: Option<PatchGroupWithIdError> = serde_json::from_str(&local_var_content).ok();
7504        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7505        Err(Error::ResponseError(local_var_error))
7506    }
7507}
7508
7509/// Updates, via PATCH, the identity provider with the given Id.
7510pub async fn patch_identity_provider_with_id(configuration: &configuration::Configuration, identity_provider_id: &str, identity_provider_request: Option<models::IdentityProviderRequest>) -> Result<models::IdentityProviderResponse, Error<PatchIdentityProviderWithIdError>> {
7511    let local_var_configuration = configuration;
7512
7513    let local_var_client = &local_var_configuration.client;
7514
7515    let local_var_uri_str = format!("{}/api/identity-provider/{identityProviderId}", local_var_configuration.base_path, identityProviderId=crate::apis::urlencode(identity_provider_id));
7516    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7517
7518    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7519        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7520    }
7521    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7522        let local_var_key = local_var_apikey.key.clone();
7523        let local_var_value = match local_var_apikey.prefix {
7524            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7525            None => local_var_key,
7526        };
7527        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7528    };
7529    local_var_req_builder = local_var_req_builder.json(&identity_provider_request);
7530
7531    let local_var_req = local_var_req_builder.build()?;
7532    let local_var_resp = local_var_client.execute(local_var_req).await?;
7533
7534    let local_var_status = local_var_resp.status();
7535
7536    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7537        let local_var_content = local_var_resp.text().await?;
7538        serde_json::from_str(&local_var_content).map_err(Error::from)
7539    } else {
7540        let local_var_content = local_var_resp.text().await?;
7541        let local_var_entity: Option<PatchIdentityProviderWithIdError> = serde_json::from_str(&local_var_content).ok();
7542        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7543        Err(Error::ResponseError(local_var_error))
7544    }
7545}
7546
7547/// Updates, via PATCH, the available integrations.
7548pub async fn patch_integrations_with_id(configuration: &configuration::Configuration, integration_request: Option<models::IntegrationRequest>) -> Result<models::IntegrationResponse, Error<PatchIntegrationsWithIdError>> {
7549    let local_var_configuration = configuration;
7550
7551    let local_var_client = &local_var_configuration.client;
7552
7553    let local_var_uri_str = format!("{}/api/integration", local_var_configuration.base_path);
7554    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7555
7556    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7557        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7558    }
7559    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7560        let local_var_key = local_var_apikey.key.clone();
7561        let local_var_value = match local_var_apikey.prefix {
7562            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7563            None => local_var_key,
7564        };
7565        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7566    };
7567    local_var_req_builder = local_var_req_builder.json(&integration_request);
7568
7569    let local_var_req = local_var_req_builder.build()?;
7570    let local_var_resp = local_var_client.execute(local_var_req).await?;
7571
7572    let local_var_status = local_var_resp.status();
7573
7574    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7575        let local_var_content = local_var_resp.text().await?;
7576        serde_json::from_str(&local_var_content).map_err(Error::from)
7577    } else {
7578        let local_var_content = local_var_resp.text().await?;
7579        let local_var_entity: Option<PatchIntegrationsWithIdError> = serde_json::from_str(&local_var_content).ok();
7580        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7581        Err(Error::ResponseError(local_var_error))
7582    }
7583}
7584
7585/// Updates, via PATCH, the lambda with the given Id.
7586pub async fn patch_lambda_with_id(configuration: &configuration::Configuration, lambda_id: &str, lambda_request: Option<models::LambdaRequest>) -> Result<models::LambdaResponse, Error<PatchLambdaWithIdError>> {
7587    let local_var_configuration = configuration;
7588
7589    let local_var_client = &local_var_configuration.client;
7590
7591    let local_var_uri_str = format!("{}/api/lambda/{lambdaId}", local_var_configuration.base_path, lambdaId=crate::apis::urlencode(lambda_id));
7592    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7593
7594    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7595        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7596    }
7597    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7598        let local_var_key = local_var_apikey.key.clone();
7599        let local_var_value = match local_var_apikey.prefix {
7600            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7601            None => local_var_key,
7602        };
7603        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7604    };
7605    local_var_req_builder = local_var_req_builder.json(&lambda_request);
7606
7607    let local_var_req = local_var_req_builder.build()?;
7608    let local_var_resp = local_var_client.execute(local_var_req).await?;
7609
7610    let local_var_status = local_var_resp.status();
7611
7612    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7613        let local_var_content = local_var_resp.text().await?;
7614        serde_json::from_str(&local_var_content).map_err(Error::from)
7615    } else {
7616        let local_var_content = local_var_resp.text().await?;
7617        let local_var_entity: Option<PatchLambdaWithIdError> = serde_json::from_str(&local_var_content).ok();
7618        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7619        Err(Error::ResponseError(local_var_error))
7620    }
7621}
7622
7623/// Updates, via PATCH, the message template with the given Id.
7624pub async fn patch_message_template_with_id(configuration: &configuration::Configuration, message_template_id: &str, message_template_request: Option<models::MessageTemplateRequest>) -> Result<models::MessageTemplateResponse, Error<PatchMessageTemplateWithIdError>> {
7625    let local_var_configuration = configuration;
7626
7627    let local_var_client = &local_var_configuration.client;
7628
7629    let local_var_uri_str = format!("{}/api/message/template/{messageTemplateId}", local_var_configuration.base_path, messageTemplateId=crate::apis::urlencode(message_template_id));
7630    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7631
7632    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7633        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7634    }
7635    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7636        let local_var_key = local_var_apikey.key.clone();
7637        let local_var_value = match local_var_apikey.prefix {
7638            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7639            None => local_var_key,
7640        };
7641        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7642    };
7643    local_var_req_builder = local_var_req_builder.json(&message_template_request);
7644
7645    let local_var_req = local_var_req_builder.build()?;
7646    let local_var_resp = local_var_client.execute(local_var_req).await?;
7647
7648    let local_var_status = local_var_resp.status();
7649
7650    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7651        let local_var_content = local_var_resp.text().await?;
7652        serde_json::from_str(&local_var_content).map_err(Error::from)
7653    } else {
7654        let local_var_content = local_var_resp.text().await?;
7655        let local_var_entity: Option<PatchMessageTemplateWithIdError> = serde_json::from_str(&local_var_content).ok();
7656        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7657        Err(Error::ResponseError(local_var_error))
7658    }
7659}
7660
7661/// Updates, via PATCH, the messenger with the given Id.
7662pub async fn patch_messenger_with_id(configuration: &configuration::Configuration, messenger_id: &str, messenger_request: Option<models::MessengerRequest>) -> Result<models::MessengerResponse, Error<PatchMessengerWithIdError>> {
7663    let local_var_configuration = configuration;
7664
7665    let local_var_client = &local_var_configuration.client;
7666
7667    let local_var_uri_str = format!("{}/api/messenger/{messengerId}", local_var_configuration.base_path, messengerId=crate::apis::urlencode(messenger_id));
7668    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7669
7670    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7671        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7672    }
7673    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7674        let local_var_key = local_var_apikey.key.clone();
7675        let local_var_value = match local_var_apikey.prefix {
7676            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7677            None => local_var_key,
7678        };
7679        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7680    };
7681    local_var_req_builder = local_var_req_builder.json(&messenger_request);
7682
7683    let local_var_req = local_var_req_builder.build()?;
7684    let local_var_resp = local_var_client.execute(local_var_req).await?;
7685
7686    let local_var_status = local_var_resp.status();
7687
7688    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7689        let local_var_content = local_var_resp.text().await?;
7690        serde_json::from_str(&local_var_content).map_err(Error::from)
7691    } else {
7692        let local_var_content = local_var_resp.text().await?;
7693        let local_var_entity: Option<PatchMessengerWithIdError> = serde_json::from_str(&local_var_content).ok();
7694        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7695        Err(Error::ResponseError(local_var_error))
7696    }
7697}
7698
7699/// Updates, via PATCH, the custom OAuth scope with the given Id for the application.
7700pub async fn patch_o_auth_scope_with_id(configuration: &configuration::Configuration, application_id: &str, scope_id: &str, x_fusion_auth_tenant_id: Option<&str>, application_o_auth_scope_request: Option<models::ApplicationOAuthScopeRequest>) -> Result<models::ApplicationOAuthScopeResponse, Error<PatchOAuthScopeWithIdError>> {
7701    let local_var_configuration = configuration;
7702
7703    let local_var_client = &local_var_configuration.client;
7704
7705    let local_var_uri_str = format!("{}/api/application/{applicationId}/scope/{scopeId}", local_var_configuration.base_path, applicationId=crate::apis::urlencode(application_id), scopeId=crate::apis::urlencode(scope_id));
7706    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7707
7708    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7709        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7710    }
7711    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
7712        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
7713    }
7714    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7715        let local_var_key = local_var_apikey.key.clone();
7716        let local_var_value = match local_var_apikey.prefix {
7717            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7718            None => local_var_key,
7719        };
7720        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7721    };
7722    local_var_req_builder = local_var_req_builder.json(&application_o_auth_scope_request);
7723
7724    let local_var_req = local_var_req_builder.build()?;
7725    let local_var_resp = local_var_client.execute(local_var_req).await?;
7726
7727    let local_var_status = local_var_resp.status();
7728
7729    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7730        let local_var_content = local_var_resp.text().await?;
7731        serde_json::from_str(&local_var_content).map_err(Error::from)
7732    } else {
7733        let local_var_content = local_var_resp.text().await?;
7734        let local_var_entity: Option<PatchOAuthScopeWithIdError> = serde_json::from_str(&local_var_content).ok();
7735        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7736        Err(Error::ResponseError(local_var_error))
7737    }
7738}
7739
7740/// Updates, via PATCH, the registration for the user with the given Id and the application defined in the request.
7741pub async fn patch_registration_with_id(configuration: &configuration::Configuration, user_id: &str, x_fusion_auth_tenant_id: Option<&str>, registration_request: Option<models::RegistrationRequest>) -> Result<models::RegistrationResponse, Error<PatchRegistrationWithIdError>> {
7742    let local_var_configuration = configuration;
7743
7744    let local_var_client = &local_var_configuration.client;
7745
7746    let local_var_uri_str = format!("{}/api/user/registration/{userId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id));
7747    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7748
7749    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7750        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7751    }
7752    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
7753        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
7754    }
7755    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7756        let local_var_key = local_var_apikey.key.clone();
7757        let local_var_value = match local_var_apikey.prefix {
7758            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7759            None => local_var_key,
7760        };
7761        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7762    };
7763    local_var_req_builder = local_var_req_builder.json(&registration_request);
7764
7765    let local_var_req = local_var_req_builder.build()?;
7766    let local_var_resp = local_var_client.execute(local_var_req).await?;
7767
7768    let local_var_status = local_var_resp.status();
7769
7770    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7771        let local_var_content = local_var_resp.text().await?;
7772        serde_json::from_str(&local_var_content).map_err(Error::from)
7773    } else {
7774        let local_var_content = local_var_resp.text().await?;
7775        let local_var_entity: Option<PatchRegistrationWithIdError> = serde_json::from_str(&local_var_content).ok();
7776        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7777        Err(Error::ResponseError(local_var_error))
7778    }
7779}
7780
7781/// Updates, via PATCH, the system configuration.
7782pub async fn patch_system_configuration_with_id(configuration: &configuration::Configuration, system_configuration_request: Option<models::SystemConfigurationRequest>) -> Result<models::SystemConfigurationResponse, Error<PatchSystemConfigurationWithIdError>> {
7783    let local_var_configuration = configuration;
7784
7785    let local_var_client = &local_var_configuration.client;
7786
7787    let local_var_uri_str = format!("{}/api/system-configuration", local_var_configuration.base_path);
7788    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7789
7790    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7791        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7792    }
7793    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7794        let local_var_key = local_var_apikey.key.clone();
7795        let local_var_value = match local_var_apikey.prefix {
7796            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7797            None => local_var_key,
7798        };
7799        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7800    };
7801    local_var_req_builder = local_var_req_builder.json(&system_configuration_request);
7802
7803    let local_var_req = local_var_req_builder.build()?;
7804    let local_var_resp = local_var_client.execute(local_var_req).await?;
7805
7806    let local_var_status = local_var_resp.status();
7807
7808    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7809        let local_var_content = local_var_resp.text().await?;
7810        serde_json::from_str(&local_var_content).map_err(Error::from)
7811    } else {
7812        let local_var_content = local_var_resp.text().await?;
7813        let local_var_entity: Option<PatchSystemConfigurationWithIdError> = serde_json::from_str(&local_var_content).ok();
7814        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7815        Err(Error::ResponseError(local_var_error))
7816    }
7817}
7818
7819/// Updates, via PATCH, the tenant with the given Id.
7820pub async fn patch_tenant_with_id(configuration: &configuration::Configuration, tenant_id: &str, x_fusion_auth_tenant_id: Option<&str>, tenant_request: Option<models::TenantRequest>) -> Result<models::TenantResponse, Error<PatchTenantWithIdError>> {
7821    let local_var_configuration = configuration;
7822
7823    let local_var_client = &local_var_configuration.client;
7824
7825    let local_var_uri_str = format!("{}/api/tenant/{tenantId}", local_var_configuration.base_path, tenantId=crate::apis::urlencode(tenant_id));
7826    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7827
7828    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7829        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7830    }
7831    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
7832        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
7833    }
7834    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7835        let local_var_key = local_var_apikey.key.clone();
7836        let local_var_value = match local_var_apikey.prefix {
7837            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7838            None => local_var_key,
7839        };
7840        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7841    };
7842    local_var_req_builder = local_var_req_builder.json(&tenant_request);
7843
7844    let local_var_req = local_var_req_builder.build()?;
7845    let local_var_resp = local_var_client.execute(local_var_req).await?;
7846
7847    let local_var_status = local_var_resp.status();
7848
7849    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7850        let local_var_content = local_var_resp.text().await?;
7851        serde_json::from_str(&local_var_content).map_err(Error::from)
7852    } else {
7853        let local_var_content = local_var_resp.text().await?;
7854        let local_var_entity: Option<PatchTenantWithIdError> = serde_json::from_str(&local_var_content).ok();
7855        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7856        Err(Error::ResponseError(local_var_error))
7857    }
7858}
7859
7860/// Updates, via PATCH, the theme with the given Id.
7861pub async fn patch_theme_with_id(configuration: &configuration::Configuration, theme_id: &str, theme_request: Option<models::ThemeRequest>) -> Result<models::ThemeResponse, Error<PatchThemeWithIdError>> {
7862    let local_var_configuration = configuration;
7863
7864    let local_var_client = &local_var_configuration.client;
7865
7866    let local_var_uri_str = format!("{}/api/theme/{themeId}", local_var_configuration.base_path, themeId=crate::apis::urlencode(theme_id));
7867    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7868
7869    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7870        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7871    }
7872    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7873        let local_var_key = local_var_apikey.key.clone();
7874        let local_var_value = match local_var_apikey.prefix {
7875            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7876            None => local_var_key,
7877        };
7878        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7879    };
7880    local_var_req_builder = local_var_req_builder.json(&theme_request);
7881
7882    let local_var_req = local_var_req_builder.build()?;
7883    let local_var_resp = local_var_client.execute(local_var_req).await?;
7884
7885    let local_var_status = local_var_resp.status();
7886
7887    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7888        let local_var_content = local_var_resp.text().await?;
7889        serde_json::from_str(&local_var_content).map_err(Error::from)
7890    } else {
7891        let local_var_content = local_var_resp.text().await?;
7892        let local_var_entity: Option<PatchThemeWithIdError> = serde_json::from_str(&local_var_content).ok();
7893        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7894        Err(Error::ResponseError(local_var_error))
7895    }
7896}
7897
7898/// Updates, via PATCH, the user action reason with the given Id.
7899pub async fn patch_user_action_reason_with_id(configuration: &configuration::Configuration, user_action_reason_id: &str, user_action_reason_request: Option<models::UserActionReasonRequest>) -> Result<models::UserActionReasonResponse, Error<PatchUserActionReasonWithIdError>> {
7900    let local_var_configuration = configuration;
7901
7902    let local_var_client = &local_var_configuration.client;
7903
7904    let local_var_uri_str = format!("{}/api/user-action-reason/{userActionReasonId}", local_var_configuration.base_path, userActionReasonId=crate::apis::urlencode(user_action_reason_id));
7905    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7906
7907    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7908        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7909    }
7910    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7911        let local_var_key = local_var_apikey.key.clone();
7912        let local_var_value = match local_var_apikey.prefix {
7913            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7914            None => local_var_key,
7915        };
7916        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7917    };
7918    local_var_req_builder = local_var_req_builder.json(&user_action_reason_request);
7919
7920    let local_var_req = local_var_req_builder.build()?;
7921    let local_var_resp = local_var_client.execute(local_var_req).await?;
7922
7923    let local_var_status = local_var_resp.status();
7924
7925    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7926        let local_var_content = local_var_resp.text().await?;
7927        serde_json::from_str(&local_var_content).map_err(Error::from)
7928    } else {
7929        let local_var_content = local_var_resp.text().await?;
7930        let local_var_entity: Option<PatchUserActionReasonWithIdError> = serde_json::from_str(&local_var_content).ok();
7931        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7932        Err(Error::ResponseError(local_var_error))
7933    }
7934}
7935
7936/// Updates, via PATCH, the user action with the given Id.
7937pub async fn patch_user_action_with_id(configuration: &configuration::Configuration, user_action_id: &str, x_fusion_auth_tenant_id: Option<&str>, user_action_request: Option<models::UserActionRequest>) -> Result<models::UserActionResponse, Error<PatchUserActionWithIdError>> {
7938    let local_var_configuration = configuration;
7939
7940    let local_var_client = &local_var_configuration.client;
7941
7942    let local_var_uri_str = format!("{}/api/user-action/{userActionId}", local_var_configuration.base_path, userActionId=crate::apis::urlencode(user_action_id));
7943    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7944
7945    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7946        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7947    }
7948    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
7949        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
7950    }
7951    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7952        let local_var_key = local_var_apikey.key.clone();
7953        let local_var_value = match local_var_apikey.prefix {
7954            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7955            None => local_var_key,
7956        };
7957        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7958    };
7959    local_var_req_builder = local_var_req_builder.json(&user_action_request);
7960
7961    let local_var_req = local_var_req_builder.build()?;
7962    let local_var_resp = local_var_client.execute(local_var_req).await?;
7963
7964    let local_var_status = local_var_resp.status();
7965
7966    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7967        let local_var_content = local_var_resp.text().await?;
7968        serde_json::from_str(&local_var_content).map_err(Error::from)
7969    } else {
7970        let local_var_content = local_var_resp.text().await?;
7971        let local_var_entity: Option<PatchUserActionWithIdError> = serde_json::from_str(&local_var_content).ok();
7972        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7973        Err(Error::ResponseError(local_var_error))
7974    }
7975}
7976
7977/// Updates, via PATCH, a single User consent by Id.
7978pub async fn patch_user_consent_with_id(configuration: &configuration::Configuration, user_consent_id: &str, user_consent_request: Option<models::UserConsentRequest>) -> Result<models::UserConsentResponse, Error<PatchUserConsentWithIdError>> {
7979    let local_var_configuration = configuration;
7980
7981    let local_var_client = &local_var_configuration.client;
7982
7983    let local_var_uri_str = format!("{}/api/user/consent/{userConsentId}", local_var_configuration.base_path, userConsentId=crate::apis::urlencode(user_consent_id));
7984    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7985
7986    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7987        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7988    }
7989    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7990        let local_var_key = local_var_apikey.key.clone();
7991        let local_var_value = match local_var_apikey.prefix {
7992            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7993            None => local_var_key,
7994        };
7995        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7996    };
7997    local_var_req_builder = local_var_req_builder.json(&user_consent_request);
7998
7999    let local_var_req = local_var_req_builder.build()?;
8000    let local_var_resp = local_var_client.execute(local_var_req).await?;
8001
8002    let local_var_status = local_var_resp.status();
8003
8004    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8005        let local_var_content = local_var_resp.text().await?;
8006        serde_json::from_str(&local_var_content).map_err(Error::from)
8007    } else {
8008        let local_var_content = local_var_resp.text().await?;
8009        let local_var_entity: Option<PatchUserConsentWithIdError> = serde_json::from_str(&local_var_content).ok();
8010        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8011        Err(Error::ResponseError(local_var_error))
8012    }
8013}
8014
8015/// Updates, via PATCH, the user with the given Id.
8016pub async fn patch_user_with_id(configuration: &configuration::Configuration, user_id: &str, x_fusion_auth_tenant_id: Option<&str>, user_request: Option<models::UserRequest>) -> Result<models::UserResponse, Error<PatchUserWithIdError>> {
8017    let local_var_configuration = configuration;
8018
8019    let local_var_client = &local_var_configuration.client;
8020
8021    let local_var_uri_str = format!("{}/api/user/{userId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id));
8022    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
8023
8024    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8025        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8026    }
8027    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
8028        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
8029    }
8030    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8031        let local_var_key = local_var_apikey.key.clone();
8032        let local_var_value = match local_var_apikey.prefix {
8033            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8034            None => local_var_key,
8035        };
8036        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8037    };
8038    local_var_req_builder = local_var_req_builder.json(&user_request);
8039
8040    let local_var_req = local_var_req_builder.build()?;
8041    let local_var_resp = local_var_client.execute(local_var_req).await?;
8042
8043    let local_var_status = local_var_resp.status();
8044
8045    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8046        let local_var_content = local_var_resp.text().await?;
8047        serde_json::from_str(&local_var_content).map_err(Error::from)
8048    } else {
8049        let local_var_content = local_var_resp.text().await?;
8050        let local_var_entity: Option<PatchUserWithIdError> = serde_json::from_str(&local_var_content).ok();
8051        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8052        Err(Error::ResponseError(local_var_error))
8053    }
8054}
8055
8056/// Reconcile a User to FusionAuth using JWT issued from another Identity Provider.
8057pub async fn reconcile_jwt_with_id(configuration: &configuration::Configuration, identity_provider_login_request: Option<models::IdentityProviderLoginRequest>) -> Result<models::LoginResponse, Error<ReconcileJwtWithIdError>> {
8058    let local_var_configuration = configuration;
8059
8060    let local_var_client = &local_var_configuration.client;
8061
8062    let local_var_uri_str = format!("{}/api/jwt/reconcile", local_var_configuration.base_path);
8063    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
8064
8065    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8066        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8067    }
8068    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8069        let local_var_key = local_var_apikey.key.clone();
8070        let local_var_value = match local_var_apikey.prefix {
8071            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8072            None => local_var_key,
8073        };
8074        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8075    };
8076    local_var_req_builder = local_var_req_builder.json(&identity_provider_login_request);
8077
8078    let local_var_req = local_var_req_builder.build()?;
8079    let local_var_resp = local_var_client.execute(local_var_req).await?;
8080
8081    let local_var_status = local_var_resp.status();
8082
8083    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8084        let local_var_content = local_var_resp.text().await?;
8085        serde_json::from_str(&local_var_content).map_err(Error::from)
8086    } else {
8087        let local_var_content = local_var_resp.text().await?;
8088        let local_var_entity: Option<ReconcileJwtWithIdError> = serde_json::from_str(&local_var_content).ok();
8089        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8090        Err(Error::ResponseError(local_var_error))
8091    }
8092}
8093
8094/// Registers a user for an application. If you provide the User and the UserRegistration object on this request, it will create the user as well as register them for the application. This is called a Full Registration. However, if you only provide the UserRegistration object, then the user must already exist and they will be registered for the application. The user Id can also be provided and it will either be used to look up an existing user or it will be used for the newly created User.
8095pub async fn register(configuration: &configuration::Configuration, x_fusion_auth_tenant_id: Option<&str>, registration_request: Option<models::RegistrationRequest>) -> Result<models::RegistrationResponse, Error<RegisterError>> {
8096    let local_var_configuration = configuration;
8097
8098    let local_var_client = &local_var_configuration.client;
8099
8100    let local_var_uri_str = format!("{}/api/user/registration", local_var_configuration.base_path);
8101    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
8102
8103    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8104        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8105    }
8106    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
8107        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
8108    }
8109    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8110        let local_var_key = local_var_apikey.key.clone();
8111        let local_var_value = match local_var_apikey.prefix {
8112            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8113            None => local_var_key,
8114        };
8115        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8116    };
8117    local_var_req_builder = local_var_req_builder.json(&registration_request);
8118
8119    let local_var_req = local_var_req_builder.build()?;
8120    let local_var_resp = local_var_client.execute(local_var_req).await?;
8121
8122    let local_var_status = local_var_resp.status();
8123
8124    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8125        let local_var_content = local_var_resp.text().await?;
8126        serde_json::from_str(&local_var_content).map_err(Error::from)
8127    } else {
8128        let local_var_content = local_var_resp.text().await?;
8129        let local_var_entity: Option<RegisterError> = serde_json::from_str(&local_var_content).ok();
8130        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8131        Err(Error::ResponseError(local_var_error))
8132    }
8133}
8134
8135/// Registers a user for an application. If you provide the User and the UserRegistration object on this request, it will create the user as well as register them for the application. This is called a Full Registration. However, if you only provide the UserRegistration object, then the user must already exist and they will be registered for the application. The user Id can also be provided and it will either be used to look up an existing user or it will be used for the newly created User.
8136pub async fn register_with_id(configuration: &configuration::Configuration, user_id: &str, x_fusion_auth_tenant_id: Option<&str>, registration_request: Option<models::RegistrationRequest>) -> Result<models::RegistrationResponse, Error<RegisterWithIdError>> {
8137    let local_var_configuration = configuration;
8138
8139    let local_var_client = &local_var_configuration.client;
8140
8141    let local_var_uri_str = format!("{}/api/user/registration/{userId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id));
8142    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
8143
8144    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8145        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8146    }
8147    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
8148        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
8149    }
8150    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8151        let local_var_key = local_var_apikey.key.clone();
8152        let local_var_value = match local_var_apikey.prefix {
8153            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8154            None => local_var_key,
8155        };
8156        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8157    };
8158    local_var_req_builder = local_var_req_builder.json(&registration_request);
8159
8160    let local_var_req = local_var_req_builder.build()?;
8161    let local_var_resp = local_var_client.execute(local_var_req).await?;
8162
8163    let local_var_status = local_var_resp.status();
8164
8165    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8166        let local_var_content = local_var_resp.text().await?;
8167        serde_json::from_str(&local_var_content).map_err(Error::from)
8168    } else {
8169        let local_var_content = local_var_resp.text().await?;
8170        let local_var_entity: Option<RegisterWithIdError> = serde_json::from_str(&local_var_content).ok();
8171        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8172        Err(Error::ResponseError(local_var_error))
8173    }
8174}
8175
8176/// Requests Elasticsearch to delete and rebuild the index for FusionAuth users or entities. Be very careful when running this request as it will  increase the CPU and I/O load on your database until the operation completes. Generally speaking you do not ever need to run this operation unless  instructed by FusionAuth support, or if you are migrating a database another system and you are not brining along the Elasticsearch index.   You have been warned.
8177pub async fn reindex_with_id(configuration: &configuration::Configuration, reindex_request: Option<models::ReindexRequest>) -> Result<(), Error<ReindexWithIdError>> {
8178    let local_var_configuration = configuration;
8179
8180    let local_var_client = &local_var_configuration.client;
8181
8182    let local_var_uri_str = format!("{}/api/system/reindex", local_var_configuration.base_path);
8183    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
8184
8185    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8186        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8187    }
8188    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8189        let local_var_key = local_var_apikey.key.clone();
8190        let local_var_value = match local_var_apikey.prefix {
8191            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8192            None => local_var_key,
8193        };
8194        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8195    };
8196    local_var_req_builder = local_var_req_builder.json(&reindex_request);
8197
8198    let local_var_req = local_var_req_builder.build()?;
8199    let local_var_resp = local_var_client.execute(local_var_req).await?;
8200
8201    let local_var_status = local_var_resp.status();
8202
8203    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8204        Ok(())
8205    } else {
8206        let local_var_content = local_var_resp.text().await?;
8207        let local_var_entity: Option<ReindexWithIdError> = serde_json::from_str(&local_var_content).ok();
8208        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8209        Err(Error::ResponseError(local_var_error))
8210    }
8211}
8212
8213/// Removes a user from the family with the given id.
8214pub async fn remove_user_from_family_with_id(configuration: &configuration::Configuration, family_id: &str, user_id: &str, x_fusion_auth_tenant_id: Option<&str>) -> Result<(), Error<RemoveUserFromFamilyWithIdError>> {
8215    let local_var_configuration = configuration;
8216
8217    let local_var_client = &local_var_configuration.client;
8218
8219    let local_var_uri_str = format!("{}/api/user/family/{familyId}/{userId}", local_var_configuration.base_path, familyId=crate::apis::urlencode(family_id), userId=crate::apis::urlencode(user_id));
8220    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
8221
8222    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8223        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8224    }
8225    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
8226        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
8227    }
8228    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8229        let local_var_key = local_var_apikey.key.clone();
8230        let local_var_value = match local_var_apikey.prefix {
8231            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8232            None => local_var_key,
8233        };
8234        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8235    };
8236
8237    let local_var_req = local_var_req_builder.build()?;
8238    let local_var_resp = local_var_client.execute(local_var_req).await?;
8239
8240    let local_var_status = local_var_resp.status();
8241
8242    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8243        Ok(())
8244    } else {
8245        let local_var_content = local_var_resp.text().await?;
8246        let local_var_entity: Option<RemoveUserFromFamilyWithIdError> = serde_json::from_str(&local_var_content).ok();
8247        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8248        Err(Error::ResponseError(local_var_error))
8249    }
8250}
8251
8252/// Retrieves a single action log (the log of a user action that was taken on a user previously) for the given Id.
8253pub async fn retrieve_action_with_id(configuration: &configuration::Configuration, action_id: &str) -> Result<models::ActionResponse, Error<RetrieveActionWithIdError>> {
8254    let local_var_configuration = configuration;
8255
8256    let local_var_client = &local_var_configuration.client;
8257
8258    let local_var_uri_str = format!("{}/api/user/action/{actionId}", local_var_configuration.base_path, actionId=crate::apis::urlencode(action_id));
8259    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
8260
8261    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8262        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8263    }
8264    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8265        let local_var_key = local_var_apikey.key.clone();
8266        let local_var_value = match local_var_apikey.prefix {
8267            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8268            None => local_var_key,
8269        };
8270        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8271    };
8272
8273    let local_var_req = local_var_req_builder.build()?;
8274    let local_var_resp = local_var_client.execute(local_var_req).await?;
8275
8276    let local_var_status = local_var_resp.status();
8277
8278    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8279        let local_var_content = local_var_resp.text().await?;
8280        serde_json::from_str(&local_var_content).map_err(Error::from)
8281    } else {
8282        let local_var_content = local_var_resp.text().await?;
8283        let local_var_entity: Option<RetrieveActionWithIdError> = serde_json::from_str(&local_var_content).ok();
8284        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8285        Err(Error::ResponseError(local_var_error))
8286    }
8287}
8288
8289/// Retrieves an authentication API key for the given id
8290pub async fn retrieve_api_key_with_id(configuration: &configuration::Configuration, key_id: &str) -> Result<models::ApiKeyResponse, Error<RetrieveApiKeyWithIdError>> {
8291    let local_var_configuration = configuration;
8292
8293    let local_var_client = &local_var_configuration.client;
8294
8295    let local_var_uri_str = format!("{}/api/api-key/{keyId}", local_var_configuration.base_path, keyId=crate::apis::urlencode(key_id));
8296    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
8297
8298    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8299        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8300    }
8301    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8302        let local_var_key = local_var_apikey.key.clone();
8303        let local_var_value = match local_var_apikey.prefix {
8304            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8305            None => local_var_key,
8306        };
8307        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8308    };
8309
8310    let local_var_req = local_var_req_builder.build()?;
8311    let local_var_resp = local_var_client.execute(local_var_req).await?;
8312
8313    let local_var_status = local_var_resp.status();
8314
8315    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8316        let local_var_content = local_var_resp.text().await?;
8317        serde_json::from_str(&local_var_content).map_err(Error::from)
8318    } else {
8319        let local_var_content = local_var_resp.text().await?;
8320        let local_var_entity: Option<RetrieveApiKeyWithIdError> = serde_json::from_str(&local_var_content).ok();
8321        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8322        Err(Error::ResponseError(local_var_error))
8323    }
8324}
8325
8326/// Retrieves all the applications that are currently inactive. OR Retrieves the application for the given Id or all the applications if the Id is null.
8327pub async fn retrieve_application(configuration: &configuration::Configuration, inactive: Option<&str>, x_fusion_auth_tenant_id: Option<&str>) -> Result<models::ApplicationResponse, Error<RetrieveApplicationError>> {
8328    let local_var_configuration = configuration;
8329
8330    let local_var_client = &local_var_configuration.client;
8331
8332    let local_var_uri_str = format!("{}/api/application", local_var_configuration.base_path);
8333    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
8334
8335    if let Some(ref local_var_str) = inactive {
8336        local_var_req_builder = local_var_req_builder.query(&[("inactive", &local_var_str.to_string())]);
8337    }
8338    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8339        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8340    }
8341    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
8342        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
8343    }
8344    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8345        let local_var_key = local_var_apikey.key.clone();
8346        let local_var_value = match local_var_apikey.prefix {
8347            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8348            None => local_var_key,
8349        };
8350        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8351    };
8352
8353    let local_var_req = local_var_req_builder.build()?;
8354    let local_var_resp = local_var_client.execute(local_var_req).await?;
8355
8356    let local_var_status = local_var_resp.status();
8357
8358    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8359        let local_var_content = local_var_resp.text().await?;
8360        serde_json::from_str(&local_var_content).map_err(Error::from)
8361    } else {
8362        let local_var_content = local_var_resp.text().await?;
8363        let local_var_entity: Option<RetrieveApplicationError> = serde_json::from_str(&local_var_content).ok();
8364        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8365        Err(Error::ResponseError(local_var_error))
8366    }
8367}
8368
8369/// Retrieves the application for the given Id or all the applications if the Id is null.
8370pub async fn retrieve_application_with_id(configuration: &configuration::Configuration, application_id: &str, x_fusion_auth_tenant_id: Option<&str>) -> Result<models::ApplicationResponse, Error<RetrieveApplicationWithIdError>> {
8371    let local_var_configuration = configuration;
8372
8373    let local_var_client = &local_var_configuration.client;
8374
8375    let local_var_uri_str = format!("{}/api/application/{applicationId}", local_var_configuration.base_path, applicationId=crate::apis::urlencode(application_id));
8376    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
8377
8378    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8379        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8380    }
8381    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
8382        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
8383    }
8384    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8385        let local_var_key = local_var_apikey.key.clone();
8386        let local_var_value = match local_var_apikey.prefix {
8387            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8388            None => local_var_key,
8389        };
8390        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8391    };
8392
8393    let local_var_req = local_var_req_builder.build()?;
8394    let local_var_resp = local_var_client.execute(local_var_req).await?;
8395
8396    let local_var_status = local_var_resp.status();
8397
8398    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8399        let local_var_content = local_var_resp.text().await?;
8400        serde_json::from_str(&local_var_content).map_err(Error::from)
8401    } else {
8402        let local_var_content = local_var_resp.text().await?;
8403        let local_var_entity: Option<RetrieveApplicationWithIdError> = serde_json::from_str(&local_var_content).ok();
8404        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8405        Err(Error::ResponseError(local_var_error))
8406    }
8407}
8408
8409/// Retrieves a single audit log for the given Id.
8410pub async fn retrieve_audit_log_with_id(configuration: &configuration::Configuration, audit_log_id: &str) -> Result<models::AuditLogResponse, Error<RetrieveAuditLogWithIdError>> {
8411    let local_var_configuration = configuration;
8412
8413    let local_var_client = &local_var_configuration.client;
8414
8415    let local_var_uri_str = format!("{}/api/system/audit-log/{auditLogId}", local_var_configuration.base_path, auditLogId=crate::apis::urlencode(audit_log_id));
8416    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
8417
8418    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8419        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8420    }
8421    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8422        let local_var_key = local_var_apikey.key.clone();
8423        let local_var_value = match local_var_apikey.prefix {
8424            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8425            None => local_var_key,
8426        };
8427        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8428    };
8429
8430    let local_var_req = local_var_req_builder.build()?;
8431    let local_var_resp = local_var_client.execute(local_var_req).await?;
8432
8433    let local_var_status = local_var_resp.status();
8434
8435    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8436        let local_var_content = local_var_resp.text().await?;
8437        serde_json::from_str(&local_var_content).map_err(Error::from)
8438    } else {
8439        let local_var_content = local_var_resp.text().await?;
8440        let local_var_entity: Option<RetrieveAuditLogWithIdError> = serde_json::from_str(&local_var_content).ok();
8441        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8442        Err(Error::ResponseError(local_var_error))
8443    }
8444}
8445
8446/// Retrieves the connector with the given Id.
8447pub async fn retrieve_connector_with_id(configuration: &configuration::Configuration, connector_id: &str) -> Result<models::ConnectorResponse, Error<RetrieveConnectorWithIdError>> {
8448    let local_var_configuration = configuration;
8449
8450    let local_var_client = &local_var_configuration.client;
8451
8452    let local_var_uri_str = format!("{}/api/connector/{connectorId}", local_var_configuration.base_path, connectorId=crate::apis::urlencode(connector_id));
8453    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
8454
8455    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8456        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8457    }
8458    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8459        let local_var_key = local_var_apikey.key.clone();
8460        let local_var_value = match local_var_apikey.prefix {
8461            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8462            None => local_var_key,
8463        };
8464        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8465    };
8466
8467    let local_var_req = local_var_req_builder.build()?;
8468    let local_var_resp = local_var_client.execute(local_var_req).await?;
8469
8470    let local_var_status = local_var_resp.status();
8471
8472    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8473        let local_var_content = local_var_resp.text().await?;
8474        serde_json::from_str(&local_var_content).map_err(Error::from)
8475    } else {
8476        let local_var_content = local_var_resp.text().await?;
8477        let local_var_entity: Option<RetrieveConnectorWithIdError> = serde_json::from_str(&local_var_content).ok();
8478        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8479        Err(Error::ResponseError(local_var_error))
8480    }
8481}
8482
8483/// Retrieves the Consent for the given Id.
8484pub async fn retrieve_consent_with_id(configuration: &configuration::Configuration, consent_id: &str, x_fusion_auth_tenant_id: Option<&str>) -> Result<models::ConsentResponse, Error<RetrieveConsentWithIdError>> {
8485    let local_var_configuration = configuration;
8486
8487    let local_var_client = &local_var_configuration.client;
8488
8489    let local_var_uri_str = format!("{}/api/consent/{consentId}", local_var_configuration.base_path, consentId=crate::apis::urlencode(consent_id));
8490    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
8491
8492    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8493        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8494    }
8495    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
8496        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
8497    }
8498    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8499        let local_var_key = local_var_apikey.key.clone();
8500        let local_var_value = match local_var_apikey.prefix {
8501            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8502            None => local_var_key,
8503        };
8504        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8505    };
8506
8507    let local_var_req = local_var_req_builder.build()?;
8508    let local_var_resp = local_var_client.execute(local_var_req).await?;
8509
8510    let local_var_status = local_var_resp.status();
8511
8512    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8513        let local_var_content = local_var_resp.text().await?;
8514        serde_json::from_str(&local_var_content).map_err(Error::from)
8515    } else {
8516        let local_var_content = local_var_resp.text().await?;
8517        let local_var_entity: Option<RetrieveConsentWithIdError> = serde_json::from_str(&local_var_content).ok();
8518        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8519        Err(Error::ResponseError(local_var_error))
8520    }
8521}
8522
8523/// Retrieves the daily active user report between the two instants. If you specify an application id, it will only return the daily active counts for that application.
8524pub async fn retrieve_daily_active_report_with_id(configuration: &configuration::Configuration, application_id: Option<&str>, start: Option<&str>, end: Option<&str>) -> Result<models::DailyActiveUserReportResponse, Error<RetrieveDailyActiveReportWithIdError>> {
8525    let local_var_configuration = configuration;
8526
8527    let local_var_client = &local_var_configuration.client;
8528
8529    let local_var_uri_str = format!("{}/api/report/daily-active-user", local_var_configuration.base_path);
8530    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
8531
8532    if let Some(ref local_var_str) = application_id {
8533        local_var_req_builder = local_var_req_builder.query(&[("applicationId", &local_var_str.to_string())]);
8534    }
8535    if let Some(ref local_var_str) = start {
8536        local_var_req_builder = local_var_req_builder.query(&[("start", &local_var_str.to_string())]);
8537    }
8538    if let Some(ref local_var_str) = end {
8539        local_var_req_builder = local_var_req_builder.query(&[("end", &local_var_str.to_string())]);
8540    }
8541    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8542        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8543    }
8544    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8545        let local_var_key = local_var_apikey.key.clone();
8546        let local_var_value = match local_var_apikey.prefix {
8547            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8548            None => local_var_key,
8549        };
8550        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8551    };
8552
8553    let local_var_req = local_var_req_builder.build()?;
8554    let local_var_resp = local_var_client.execute(local_var_req).await?;
8555
8556    let local_var_status = local_var_resp.status();
8557
8558    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8559        let local_var_content = local_var_resp.text().await?;
8560        serde_json::from_str(&local_var_content).map_err(Error::from)
8561    } else {
8562        let local_var_content = local_var_resp.text().await?;
8563        let local_var_entity: Option<RetrieveDailyActiveReportWithIdError> = serde_json::from_str(&local_var_content).ok();
8564        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8565        Err(Error::ResponseError(local_var_error))
8566    }
8567}
8568
8569/// Retrieve a user_code that is part of an in-progress Device Authorization Grant.  This API is useful if you want to build your own login workflow to complete a device grant.  This request will require an API key. OR Retrieve a user_code that is part of an in-progress Device Authorization Grant.  This API is useful if you want to build your own login workflow to complete a device grant.
8570pub async fn retrieve_device_user_code(configuration: &configuration::Configuration, ) -> Result<(), Error<RetrieveDeviceUserCodeError>> {
8571    let local_var_configuration = configuration;
8572
8573    let local_var_client = &local_var_configuration.client;
8574
8575    let local_var_uri_str = format!("{}/oauth2/device/user-code", local_var_configuration.base_path);
8576    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
8577
8578    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8579        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8580    }
8581    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8582        let local_var_key = local_var_apikey.key.clone();
8583        let local_var_value = match local_var_apikey.prefix {
8584            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8585            None => local_var_key,
8586        };
8587        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8588    };
8589
8590    let local_var_req = local_var_req_builder.build()?;
8591    let local_var_resp = local_var_client.execute(local_var_req).await?;
8592
8593    let local_var_status = local_var_resp.status();
8594
8595    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8596        Ok(())
8597    } else {
8598        let local_var_content = local_var_resp.text().await?;
8599        let local_var_entity: Option<RetrieveDeviceUserCodeError> = serde_json::from_str(&local_var_content).ok();
8600        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8601        Err(Error::ResponseError(local_var_error))
8602    }
8603}
8604
8605/// Retrieves the email template for the given Id. If you don't specify the id, this will return all the email templates.
8606pub async fn retrieve_email_template(configuration: &configuration::Configuration, x_fusion_auth_tenant_id: Option<&str>) -> Result<models::EmailTemplateResponse, Error<RetrieveEmailTemplateError>> {
8607    let local_var_configuration = configuration;
8608
8609    let local_var_client = &local_var_configuration.client;
8610
8611    let local_var_uri_str = format!("{}/api/email/template", local_var_configuration.base_path);
8612    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
8613
8614    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8615        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8616    }
8617    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
8618        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
8619    }
8620    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8621        let local_var_key = local_var_apikey.key.clone();
8622        let local_var_value = match local_var_apikey.prefix {
8623            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8624            None => local_var_key,
8625        };
8626        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8627    };
8628
8629    let local_var_req = local_var_req_builder.build()?;
8630    let local_var_resp = local_var_client.execute(local_var_req).await?;
8631
8632    let local_var_status = local_var_resp.status();
8633
8634    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8635        let local_var_content = local_var_resp.text().await?;
8636        serde_json::from_str(&local_var_content).map_err(Error::from)
8637    } else {
8638        let local_var_content = local_var_resp.text().await?;
8639        let local_var_entity: Option<RetrieveEmailTemplateError> = serde_json::from_str(&local_var_content).ok();
8640        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8641        Err(Error::ResponseError(local_var_error))
8642    }
8643}
8644
8645/// Creates a preview of the email template provided in the request. This allows you to preview an email template that hasn't been saved to the database yet. The entire email template does not need to be provided on the request. This will create the preview based on whatever is given.
8646pub async fn retrieve_email_template_preview_with_id(configuration: &configuration::Configuration, preview_request: Option<models::PreviewRequest>) -> Result<models::PreviewResponse, Error<RetrieveEmailTemplatePreviewWithIdError>> {
8647    let local_var_configuration = configuration;
8648
8649    let local_var_client = &local_var_configuration.client;
8650
8651    let local_var_uri_str = format!("{}/api/email/template/preview", local_var_configuration.base_path);
8652    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
8653
8654    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8655        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8656    }
8657    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8658        let local_var_key = local_var_apikey.key.clone();
8659        let local_var_value = match local_var_apikey.prefix {
8660            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8661            None => local_var_key,
8662        };
8663        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8664    };
8665    local_var_req_builder = local_var_req_builder.json(&preview_request);
8666
8667    let local_var_req = local_var_req_builder.build()?;
8668    let local_var_resp = local_var_client.execute(local_var_req).await?;
8669
8670    let local_var_status = local_var_resp.status();
8671
8672    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8673        let local_var_content = local_var_resp.text().await?;
8674        serde_json::from_str(&local_var_content).map_err(Error::from)
8675    } else {
8676        let local_var_content = local_var_resp.text().await?;
8677        let local_var_entity: Option<RetrieveEmailTemplatePreviewWithIdError> = serde_json::from_str(&local_var_content).ok();
8678        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8679        Err(Error::ResponseError(local_var_error))
8680    }
8681}
8682
8683/// Retrieves the email template for the given Id. If you don't specify the id, this will return all the email templates.
8684pub async fn retrieve_email_template_with_id(configuration: &configuration::Configuration, email_template_id: &str, x_fusion_auth_tenant_id: Option<&str>) -> Result<models::EmailTemplateResponse, Error<RetrieveEmailTemplateWithIdError>> {
8685    let local_var_configuration = configuration;
8686
8687    let local_var_client = &local_var_configuration.client;
8688
8689    let local_var_uri_str = format!("{}/api/email/template/{emailTemplateId}", local_var_configuration.base_path, emailTemplateId=crate::apis::urlencode(email_template_id));
8690    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
8691
8692    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8693        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8694    }
8695    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
8696        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
8697    }
8698    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8699        let local_var_key = local_var_apikey.key.clone();
8700        let local_var_value = match local_var_apikey.prefix {
8701            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8702            None => local_var_key,
8703        };
8704        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8705    };
8706
8707    let local_var_req = local_var_req_builder.build()?;
8708    let local_var_resp = local_var_client.execute(local_var_req).await?;
8709
8710    let local_var_status = local_var_resp.status();
8711
8712    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8713        let local_var_content = local_var_resp.text().await?;
8714        serde_json::from_str(&local_var_content).map_err(Error::from)
8715    } else {
8716        let local_var_content = local_var_resp.text().await?;
8717        let local_var_entity: Option<RetrieveEmailTemplateWithIdError> = serde_json::from_str(&local_var_content).ok();
8718        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8719        Err(Error::ResponseError(local_var_error))
8720    }
8721}
8722
8723/// Retrieves an Entity Grant for the given Entity and User/Entity.
8724pub async fn retrieve_entity_grant_with_id(configuration: &configuration::Configuration, entity_id: &str, recipient_entity_id: Option<&str>, user_id: Option<&str>, x_fusion_auth_tenant_id: Option<&str>) -> Result<models::EntityGrantResponse, Error<RetrieveEntityGrantWithIdError>> {
8725    let local_var_configuration = configuration;
8726
8727    let local_var_client = &local_var_configuration.client;
8728
8729    let local_var_uri_str = format!("{}/api/entity/{entityId}/grant", local_var_configuration.base_path, entityId=crate::apis::urlencode(entity_id));
8730    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
8731
8732    if let Some(ref local_var_str) = recipient_entity_id {
8733        local_var_req_builder = local_var_req_builder.query(&[("recipientEntityId", &local_var_str.to_string())]);
8734    }
8735    if let Some(ref local_var_str) = user_id {
8736        local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]);
8737    }
8738    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8739        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8740    }
8741    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
8742        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
8743    }
8744    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8745        let local_var_key = local_var_apikey.key.clone();
8746        let local_var_value = match local_var_apikey.prefix {
8747            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8748            None => local_var_key,
8749        };
8750        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8751    };
8752
8753    let local_var_req = local_var_req_builder.build()?;
8754    let local_var_resp = local_var_client.execute(local_var_req).await?;
8755
8756    let local_var_status = local_var_resp.status();
8757
8758    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8759        let local_var_content = local_var_resp.text().await?;
8760        serde_json::from_str(&local_var_content).map_err(Error::from)
8761    } else {
8762        let local_var_content = local_var_resp.text().await?;
8763        let local_var_entity: Option<RetrieveEntityGrantWithIdError> = serde_json::from_str(&local_var_content).ok();
8764        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8765        Err(Error::ResponseError(local_var_error))
8766    }
8767}
8768
8769/// Retrieves the Entity Type for the given Id.
8770pub async fn retrieve_entity_type_with_id(configuration: &configuration::Configuration, entity_type_id: &str) -> Result<models::EntityTypeResponse, Error<RetrieveEntityTypeWithIdError>> {
8771    let local_var_configuration = configuration;
8772
8773    let local_var_client = &local_var_configuration.client;
8774
8775    let local_var_uri_str = format!("{}/api/entity/type/{entityTypeId}", local_var_configuration.base_path, entityTypeId=crate::apis::urlencode(entity_type_id));
8776    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
8777
8778    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8779        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8780    }
8781    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8782        let local_var_key = local_var_apikey.key.clone();
8783        let local_var_value = match local_var_apikey.prefix {
8784            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8785            None => local_var_key,
8786        };
8787        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8788    };
8789
8790    let local_var_req = local_var_req_builder.build()?;
8791    let local_var_resp = local_var_client.execute(local_var_req).await?;
8792
8793    let local_var_status = local_var_resp.status();
8794
8795    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8796        let local_var_content = local_var_resp.text().await?;
8797        serde_json::from_str(&local_var_content).map_err(Error::from)
8798    } else {
8799        let local_var_content = local_var_resp.text().await?;
8800        let local_var_entity: Option<RetrieveEntityTypeWithIdError> = serde_json::from_str(&local_var_content).ok();
8801        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8802        Err(Error::ResponseError(local_var_error))
8803    }
8804}
8805
8806/// Retrieves the Entity for the given Id.
8807pub async fn retrieve_entity_with_id(configuration: &configuration::Configuration, entity_id: &str, x_fusion_auth_tenant_id: Option<&str>) -> Result<models::EntityResponse, Error<RetrieveEntityWithIdError>> {
8808    let local_var_configuration = configuration;
8809
8810    let local_var_client = &local_var_configuration.client;
8811
8812    let local_var_uri_str = format!("{}/api/entity/{entityId}", local_var_configuration.base_path, entityId=crate::apis::urlencode(entity_id));
8813    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
8814
8815    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8816        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8817    }
8818    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
8819        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
8820    }
8821    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8822        let local_var_key = local_var_apikey.key.clone();
8823        let local_var_value = match local_var_apikey.prefix {
8824            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8825            None => local_var_key,
8826        };
8827        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8828    };
8829
8830    let local_var_req = local_var_req_builder.build()?;
8831    let local_var_resp = local_var_client.execute(local_var_req).await?;
8832
8833    let local_var_status = local_var_resp.status();
8834
8835    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8836        let local_var_content = local_var_resp.text().await?;
8837        serde_json::from_str(&local_var_content).map_err(Error::from)
8838    } else {
8839        let local_var_content = local_var_resp.text().await?;
8840        let local_var_entity: Option<RetrieveEntityWithIdError> = serde_json::from_str(&local_var_content).ok();
8841        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8842        Err(Error::ResponseError(local_var_error))
8843    }
8844}
8845
8846/// Retrieves a single event log for the given Id.
8847pub async fn retrieve_event_log_with_id(configuration: &configuration::Configuration, event_log_id: &str) -> Result<models::EventLogResponse, Error<RetrieveEventLogWithIdError>> {
8848    let local_var_configuration = configuration;
8849
8850    let local_var_client = &local_var_configuration.client;
8851
8852    let local_var_uri_str = format!("{}/api/system/event-log/{eventLogId}", local_var_configuration.base_path, eventLogId=crate::apis::urlencode(event_log_id));
8853    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
8854
8855    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8856        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8857    }
8858    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8859        let local_var_key = local_var_apikey.key.clone();
8860        let local_var_value = match local_var_apikey.prefix {
8861            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8862            None => local_var_key,
8863        };
8864        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8865    };
8866
8867    let local_var_req = local_var_req_builder.build()?;
8868    let local_var_resp = local_var_client.execute(local_var_req).await?;
8869
8870    let local_var_status = local_var_resp.status();
8871
8872    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8873        let local_var_content = local_var_resp.text().await?;
8874        serde_json::from_str(&local_var_content).map_err(Error::from)
8875    } else {
8876        let local_var_content = local_var_resp.text().await?;
8877        let local_var_entity: Option<RetrieveEventLogWithIdError> = serde_json::from_str(&local_var_content).ok();
8878        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8879        Err(Error::ResponseError(local_var_error))
8880    }
8881}
8882
8883/// Retrieves all the families that a user belongs to.
8884pub async fn retrieve_families_with_id(configuration: &configuration::Configuration, user_id: Option<&str>, x_fusion_auth_tenant_id: Option<&str>) -> Result<models::FamilyResponse, Error<RetrieveFamiliesWithIdError>> {
8885    let local_var_configuration = configuration;
8886
8887    let local_var_client = &local_var_configuration.client;
8888
8889    let local_var_uri_str = format!("{}/api/user/family", local_var_configuration.base_path);
8890    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
8891
8892    if let Some(ref local_var_str) = user_id {
8893        local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]);
8894    }
8895    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8896        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8897    }
8898    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
8899        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
8900    }
8901    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8902        let local_var_key = local_var_apikey.key.clone();
8903        let local_var_value = match local_var_apikey.prefix {
8904            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8905            None => local_var_key,
8906        };
8907        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8908    };
8909
8910    let local_var_req = local_var_req_builder.build()?;
8911    let local_var_resp = local_var_client.execute(local_var_req).await?;
8912
8913    let local_var_status = local_var_resp.status();
8914
8915    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8916        let local_var_content = local_var_resp.text().await?;
8917        serde_json::from_str(&local_var_content).map_err(Error::from)
8918    } else {
8919        let local_var_content = local_var_resp.text().await?;
8920        let local_var_entity: Option<RetrieveFamiliesWithIdError> = serde_json::from_str(&local_var_content).ok();
8921        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8922        Err(Error::ResponseError(local_var_error))
8923    }
8924}
8925
8926/// Retrieves all the members of a family by the unique Family Id.
8927pub async fn retrieve_family_members_by_family_id_with_id(configuration: &configuration::Configuration, family_id: &str, x_fusion_auth_tenant_id: Option<&str>) -> Result<models::FamilyResponse, Error<RetrieveFamilyMembersByFamilyIdWithIdError>> {
8928    let local_var_configuration = configuration;
8929
8930    let local_var_client = &local_var_configuration.client;
8931
8932    let local_var_uri_str = format!("{}/api/user/family/{familyId}", local_var_configuration.base_path, familyId=crate::apis::urlencode(family_id));
8933    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
8934
8935    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8936        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8937    }
8938    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
8939        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
8940    }
8941    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8942        let local_var_key = local_var_apikey.key.clone();
8943        let local_var_value = match local_var_apikey.prefix {
8944            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8945            None => local_var_key,
8946        };
8947        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8948    };
8949
8950    let local_var_req = local_var_req_builder.build()?;
8951    let local_var_resp = local_var_client.execute(local_var_req).await?;
8952
8953    let local_var_status = local_var_resp.status();
8954
8955    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8956        let local_var_content = local_var_resp.text().await?;
8957        serde_json::from_str(&local_var_content).map_err(Error::from)
8958    } else {
8959        let local_var_content = local_var_resp.text().await?;
8960        let local_var_entity: Option<RetrieveFamilyMembersByFamilyIdWithIdError> = serde_json::from_str(&local_var_content).ok();
8961        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8962        Err(Error::ResponseError(local_var_error))
8963    }
8964}
8965
8966/// Retrieves the form field with the given Id.
8967pub async fn retrieve_form_field_with_id(configuration: &configuration::Configuration, field_id: &str) -> Result<models::FormFieldResponse, Error<RetrieveFormFieldWithIdError>> {
8968    let local_var_configuration = configuration;
8969
8970    let local_var_client = &local_var_configuration.client;
8971
8972    let local_var_uri_str = format!("{}/api/form/field/{fieldId}", local_var_configuration.base_path, fieldId=crate::apis::urlencode(field_id));
8973    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
8974
8975    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
8976        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
8977    }
8978    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
8979        let local_var_key = local_var_apikey.key.clone();
8980        let local_var_value = match local_var_apikey.prefix {
8981            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
8982            None => local_var_key,
8983        };
8984        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
8985    };
8986
8987    let local_var_req = local_var_req_builder.build()?;
8988    let local_var_resp = local_var_client.execute(local_var_req).await?;
8989
8990    let local_var_status = local_var_resp.status();
8991
8992    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
8993        let local_var_content = local_var_resp.text().await?;
8994        serde_json::from_str(&local_var_content).map_err(Error::from)
8995    } else {
8996        let local_var_content = local_var_resp.text().await?;
8997        let local_var_entity: Option<RetrieveFormFieldWithIdError> = serde_json::from_str(&local_var_content).ok();
8998        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
8999        Err(Error::ResponseError(local_var_error))
9000    }
9001}
9002
9003/// Retrieves the form with the given Id.
9004pub async fn retrieve_form_with_id(configuration: &configuration::Configuration, form_id: &str) -> Result<models::FormResponse, Error<RetrieveFormWithIdError>> {
9005    let local_var_configuration = configuration;
9006
9007    let local_var_client = &local_var_configuration.client;
9008
9009    let local_var_uri_str = format!("{}/api/form/{formId}", local_var_configuration.base_path, formId=crate::apis::urlencode(form_id));
9010    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9011
9012    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9013        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9014    }
9015    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9016        let local_var_key = local_var_apikey.key.clone();
9017        let local_var_value = match local_var_apikey.prefix {
9018            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9019            None => local_var_key,
9020        };
9021        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9022    };
9023
9024    let local_var_req = local_var_req_builder.build()?;
9025    let local_var_resp = local_var_client.execute(local_var_req).await?;
9026
9027    let local_var_status = local_var_resp.status();
9028
9029    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9030        let local_var_content = local_var_resp.text().await?;
9031        serde_json::from_str(&local_var_content).map_err(Error::from)
9032    } else {
9033        let local_var_content = local_var_resp.text().await?;
9034        let local_var_entity: Option<RetrieveFormWithIdError> = serde_json::from_str(&local_var_content).ok();
9035        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9036        Err(Error::ResponseError(local_var_error))
9037    }
9038}
9039
9040/// Retrieves the group for the given Id.
9041pub async fn retrieve_group_with_id(configuration: &configuration::Configuration, group_id: &str, x_fusion_auth_tenant_id: Option<&str>) -> Result<models::GroupResponse, Error<RetrieveGroupWithIdError>> {
9042    let local_var_configuration = configuration;
9043
9044    let local_var_client = &local_var_configuration.client;
9045
9046    let local_var_uri_str = format!("{}/api/group/{groupId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_id));
9047    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9048
9049    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9050        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9051    }
9052    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
9053        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
9054    }
9055    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9056        let local_var_key = local_var_apikey.key.clone();
9057        let local_var_value = match local_var_apikey.prefix {
9058            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9059            None => local_var_key,
9060        };
9061        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9062    };
9063
9064    let local_var_req = local_var_req_builder.build()?;
9065    let local_var_resp = local_var_client.execute(local_var_req).await?;
9066
9067    let local_var_status = local_var_resp.status();
9068
9069    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9070        let local_var_content = local_var_resp.text().await?;
9071        serde_json::from_str(&local_var_content).map_err(Error::from)
9072    } else {
9073        let local_var_content = local_var_resp.text().await?;
9074        let local_var_entity: Option<RetrieveGroupWithIdError> = serde_json::from_str(&local_var_content).ok();
9075        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9076        Err(Error::ResponseError(local_var_error))
9077    }
9078}
9079
9080/// Retrieves one or more identity provider for the given type. For types such as Google, Facebook, Twitter and LinkedIn, only a single  identity provider can exist. For types such as OpenID Connect and SAMLv2 more than one identity provider can be configured so this request  may return multiple identity providers.
9081pub async fn retrieve_identity_provider_by_type_with_id(configuration: &configuration::Configuration, r#type: Option<&str>) -> Result<models::IdentityProviderResponse, Error<RetrieveIdentityProviderByTypeWithIdError>> {
9082    let local_var_configuration = configuration;
9083
9084    let local_var_client = &local_var_configuration.client;
9085
9086    let local_var_uri_str = format!("{}/api/identity-provider", local_var_configuration.base_path);
9087    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9088
9089    if let Some(ref local_var_str) = r#type {
9090        local_var_req_builder = local_var_req_builder.query(&[("type", &local_var_str.to_string())]);
9091    }
9092    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9093        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9094    }
9095    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9096        let local_var_key = local_var_apikey.key.clone();
9097        let local_var_value = match local_var_apikey.prefix {
9098            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9099            None => local_var_key,
9100        };
9101        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9102    };
9103
9104    let local_var_req = local_var_req_builder.build()?;
9105    let local_var_resp = local_var_client.execute(local_var_req).await?;
9106
9107    let local_var_status = local_var_resp.status();
9108
9109    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9110        let local_var_content = local_var_resp.text().await?;
9111        serde_json::from_str(&local_var_content).map_err(Error::from)
9112    } else {
9113        let local_var_content = local_var_resp.text().await?;
9114        let local_var_entity: Option<RetrieveIdentityProviderByTypeWithIdError> = serde_json::from_str(&local_var_content).ok();
9115        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9116        Err(Error::ResponseError(local_var_error))
9117    }
9118}
9119
9120/// Retrieve all Identity Provider users (links) for the user. Specify the optional identityProviderId to retrieve links for a particular IdP. OR Retrieve a single Identity Provider user (link).
9121pub async fn retrieve_identity_provider_link(configuration: &configuration::Configuration, identity_provider_id: Option<&str>, user_id: Option<&str>, identity_provider_user_id: Option<&str>) -> Result<models::IdentityProviderLinkResponse, Error<RetrieveIdentityProviderLinkError>> {
9122    let local_var_configuration = configuration;
9123
9124    let local_var_client = &local_var_configuration.client;
9125
9126    let local_var_uri_str = format!("{}/api/identity-provider/link", local_var_configuration.base_path);
9127    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9128
9129    if let Some(ref local_var_str) = identity_provider_id {
9130        local_var_req_builder = local_var_req_builder.query(&[("identityProviderId", &local_var_str.to_string())]);
9131    }
9132    if let Some(ref local_var_str) = user_id {
9133        local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]);
9134    }
9135    if let Some(ref local_var_str) = identity_provider_user_id {
9136        local_var_req_builder = local_var_req_builder.query(&[("identityProviderUserId", &local_var_str.to_string())]);
9137    }
9138    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9139        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9140    }
9141    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9142        let local_var_key = local_var_apikey.key.clone();
9143        let local_var_value = match local_var_apikey.prefix {
9144            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9145            None => local_var_key,
9146        };
9147        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9148    };
9149
9150    let local_var_req = local_var_req_builder.build()?;
9151    let local_var_resp = local_var_client.execute(local_var_req).await?;
9152
9153    let local_var_status = local_var_resp.status();
9154
9155    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9156        let local_var_content = local_var_resp.text().await?;
9157        serde_json::from_str(&local_var_content).map_err(Error::from)
9158    } else {
9159        let local_var_content = local_var_resp.text().await?;
9160        let local_var_entity: Option<RetrieveIdentityProviderLinkError> = serde_json::from_str(&local_var_content).ok();
9161        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9162        Err(Error::ResponseError(local_var_error))
9163    }
9164}
9165
9166/// Retrieves the identity provider for the given Id or all the identity providers if the Id is null.
9167pub async fn retrieve_identity_provider_with_id(configuration: &configuration::Configuration, identity_provider_id: &str) -> Result<models::IdentityProviderResponse, Error<RetrieveIdentityProviderWithIdError>> {
9168    let local_var_configuration = configuration;
9169
9170    let local_var_client = &local_var_configuration.client;
9171
9172    let local_var_uri_str = format!("{}/api/identity-provider/{identityProviderId}", local_var_configuration.base_path, identityProviderId=crate::apis::urlencode(identity_provider_id));
9173    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9174
9175    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9176        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9177    }
9178    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9179        let local_var_key = local_var_apikey.key.clone();
9180        let local_var_value = match local_var_apikey.prefix {
9181            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9182            None => local_var_key,
9183        };
9184        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9185    };
9186
9187    let local_var_req = local_var_req_builder.build()?;
9188    let local_var_resp = local_var_client.execute(local_var_req).await?;
9189
9190    let local_var_status = local_var_resp.status();
9191
9192    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9193        let local_var_content = local_var_resp.text().await?;
9194        serde_json::from_str(&local_var_content).map_err(Error::from)
9195    } else {
9196        let local_var_content = local_var_resp.text().await?;
9197        let local_var_entity: Option<RetrieveIdentityProviderWithIdError> = serde_json::from_str(&local_var_content).ok();
9198        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9199        Err(Error::ResponseError(local_var_error))
9200    }
9201}
9202
9203/// Retrieves the IP Access Control List with the given Id.
9204pub async fn retrieve_ip_access_control_list_with_id(configuration: &configuration::Configuration, ip_access_control_list_id: &str) -> Result<models::IpAccessControlListResponse, Error<RetrieveIpAccessControlListWithIdError>> {
9205    let local_var_configuration = configuration;
9206
9207    let local_var_client = &local_var_configuration.client;
9208
9209    let local_var_uri_str = format!("{}/api/ip-acl/{ipAccessControlListId}", local_var_configuration.base_path, ipAccessControlListId=crate::apis::urlencode(ip_access_control_list_id));
9210    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9211
9212    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9213        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9214    }
9215    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9216        let local_var_key = local_var_apikey.key.clone();
9217        let local_var_value = match local_var_apikey.prefix {
9218            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9219            None => local_var_key,
9220        };
9221        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9222    };
9223
9224    let local_var_req = local_var_req_builder.build()?;
9225    let local_var_resp = local_var_client.execute(local_var_req).await?;
9226
9227    let local_var_status = local_var_resp.status();
9228
9229    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9230        let local_var_content = local_var_resp.text().await?;
9231        serde_json::from_str(&local_var_content).map_err(Error::from)
9232    } else {
9233        let local_var_content = local_var_resp.text().await?;
9234        let local_var_entity: Option<RetrieveIpAccessControlListWithIdError> = serde_json::from_str(&local_var_content).ok();
9235        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9236        Err(Error::ResponseError(local_var_error))
9237    }
9238}
9239
9240/// Returns public keys used by FusionAuth to cryptographically verify JWTs using the JSON Web Key format.
9241pub async fn retrieve_json_web_key_set_with_id(configuration: &configuration::Configuration, ) -> Result<models::JwksResponse, Error<RetrieveJsonWebKeySetWithIdError>> {
9242    let local_var_configuration = configuration;
9243
9244    let local_var_client = &local_var_configuration.client;
9245
9246    let local_var_uri_str = format!("{}/.well-known/jwks.json", local_var_configuration.base_path);
9247    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9248
9249    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9250        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9251    }
9252    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9253        let local_var_key = local_var_apikey.key.clone();
9254        let local_var_value = match local_var_apikey.prefix {
9255            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9256            None => local_var_key,
9257        };
9258        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9259    };
9260
9261    let local_var_req = local_var_req_builder.build()?;
9262    let local_var_resp = local_var_client.execute(local_var_req).await?;
9263
9264    let local_var_status = local_var_resp.status();
9265
9266    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9267        let local_var_content = local_var_resp.text().await?;
9268        serde_json::from_str(&local_var_content).map_err(Error::from)
9269    } else {
9270        let local_var_content = local_var_resp.text().await?;
9271        let local_var_entity: Option<RetrieveJsonWebKeySetWithIdError> = serde_json::from_str(&local_var_content).ok();
9272        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9273        Err(Error::ResponseError(local_var_error))
9274    }
9275}
9276
9277/// Retrieves the Public Key configured for verifying JSON Web Tokens (JWT) by the key Id (kid). OR Retrieves the Public Key configured for verifying the JSON Web Tokens (JWT) issued by the Login API by the Application Id.
9278pub async fn retrieve_jwt_public_key(configuration: &configuration::Configuration, key_id: Option<&str>, application_id: Option<&str>) -> Result<models::PublicKeyResponse, Error<RetrieveJwtPublicKeyError>> {
9279    let local_var_configuration = configuration;
9280
9281    let local_var_client = &local_var_configuration.client;
9282
9283    let local_var_uri_str = format!("{}/api/jwt/public-key", local_var_configuration.base_path);
9284    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9285
9286    if let Some(ref local_var_str) = key_id {
9287        local_var_req_builder = local_var_req_builder.query(&[("keyId", &local_var_str.to_string())]);
9288    }
9289    if let Some(ref local_var_str) = application_id {
9290        local_var_req_builder = local_var_req_builder.query(&[("applicationId", &local_var_str.to_string())]);
9291    }
9292    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9293        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9294    }
9295    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9296        let local_var_key = local_var_apikey.key.clone();
9297        let local_var_value = match local_var_apikey.prefix {
9298            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9299            None => local_var_key,
9300        };
9301        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9302    };
9303
9304    let local_var_req = local_var_req_builder.build()?;
9305    let local_var_resp = local_var_client.execute(local_var_req).await?;
9306
9307    let local_var_status = local_var_resp.status();
9308
9309    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9310        let local_var_content = local_var_resp.text().await?;
9311        serde_json::from_str(&local_var_content).map_err(Error::from)
9312    } else {
9313        let local_var_content = local_var_resp.text().await?;
9314        let local_var_entity: Option<RetrieveJwtPublicKeyError> = serde_json::from_str(&local_var_content).ok();
9315        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9316        Err(Error::ResponseError(local_var_error))
9317    }
9318}
9319
9320/// Retrieves the key for the given Id.
9321pub async fn retrieve_key_with_id(configuration: &configuration::Configuration, key_id: &str) -> Result<models::KeyResponse, Error<RetrieveKeyWithIdError>> {
9322    let local_var_configuration = configuration;
9323
9324    let local_var_client = &local_var_configuration.client;
9325
9326    let local_var_uri_str = format!("{}/api/key/{keyId}", local_var_configuration.base_path, keyId=crate::apis::urlencode(key_id));
9327    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9328
9329    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9330        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9331    }
9332    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9333        let local_var_key = local_var_apikey.key.clone();
9334        let local_var_value = match local_var_apikey.prefix {
9335            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9336            None => local_var_key,
9337        };
9338        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9339    };
9340
9341    let local_var_req = local_var_req_builder.build()?;
9342    let local_var_resp = local_var_client.execute(local_var_req).await?;
9343
9344    let local_var_status = local_var_resp.status();
9345
9346    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9347        let local_var_content = local_var_resp.text().await?;
9348        serde_json::from_str(&local_var_content).map_err(Error::from)
9349    } else {
9350        let local_var_content = local_var_resp.text().await?;
9351        let local_var_entity: Option<RetrieveKeyWithIdError> = serde_json::from_str(&local_var_content).ok();
9352        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9353        Err(Error::ResponseError(local_var_error))
9354    }
9355}
9356
9357/// Retrieves all the keys.
9358pub async fn retrieve_keys_with_id(configuration: &configuration::Configuration, ) -> Result<models::KeyResponse, Error<RetrieveKeysWithIdError>> {
9359    let local_var_configuration = configuration;
9360
9361    let local_var_client = &local_var_configuration.client;
9362
9363    let local_var_uri_str = format!("{}/api/key", local_var_configuration.base_path);
9364    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9365
9366    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9367        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9368    }
9369    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9370        let local_var_key = local_var_apikey.key.clone();
9371        let local_var_value = match local_var_apikey.prefix {
9372            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9373            None => local_var_key,
9374        };
9375        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9376    };
9377
9378    let local_var_req = local_var_req_builder.build()?;
9379    let local_var_resp = local_var_client.execute(local_var_req).await?;
9380
9381    let local_var_status = local_var_resp.status();
9382
9383    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9384        let local_var_content = local_var_resp.text().await?;
9385        serde_json::from_str(&local_var_content).map_err(Error::from)
9386    } else {
9387        let local_var_content = local_var_resp.text().await?;
9388        let local_var_entity: Option<RetrieveKeysWithIdError> = serde_json::from_str(&local_var_content).ok();
9389        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9390        Err(Error::ResponseError(local_var_error))
9391    }
9392}
9393
9394/// Retrieves the lambda for the given Id.
9395pub async fn retrieve_lambda_with_id(configuration: &configuration::Configuration, lambda_id: &str) -> Result<models::LambdaResponse, Error<RetrieveLambdaWithIdError>> {
9396    let local_var_configuration = configuration;
9397
9398    let local_var_client = &local_var_configuration.client;
9399
9400    let local_var_uri_str = format!("{}/api/lambda/{lambdaId}", local_var_configuration.base_path, lambdaId=crate::apis::urlencode(lambda_id));
9401    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9402
9403    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9404        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9405    }
9406    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9407        let local_var_key = local_var_apikey.key.clone();
9408        let local_var_value = match local_var_apikey.prefix {
9409            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9410            None => local_var_key,
9411        };
9412        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9413    };
9414
9415    let local_var_req = local_var_req_builder.build()?;
9416    let local_var_resp = local_var_client.execute(local_var_req).await?;
9417
9418    let local_var_status = local_var_resp.status();
9419
9420    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9421        let local_var_content = local_var_resp.text().await?;
9422        serde_json::from_str(&local_var_content).map_err(Error::from)
9423    } else {
9424        let local_var_content = local_var_resp.text().await?;
9425        let local_var_entity: Option<RetrieveLambdaWithIdError> = serde_json::from_str(&local_var_content).ok();
9426        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9427        Err(Error::ResponseError(local_var_error))
9428    }
9429}
9430
9431/// Retrieves all the lambdas for the provided type.
9432pub async fn retrieve_lambdas_by_type_with_id(configuration: &configuration::Configuration, r#type: Option<&str>) -> Result<models::LambdaResponse, Error<RetrieveLambdasByTypeWithIdError>> {
9433    let local_var_configuration = configuration;
9434
9435    let local_var_client = &local_var_configuration.client;
9436
9437    let local_var_uri_str = format!("{}/api/lambda", local_var_configuration.base_path);
9438    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9439
9440    if let Some(ref local_var_str) = r#type {
9441        local_var_req_builder = local_var_req_builder.query(&[("type", &local_var_str.to_string())]);
9442    }
9443    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9444        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9445    }
9446    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9447        let local_var_key = local_var_apikey.key.clone();
9448        let local_var_value = match local_var_apikey.prefix {
9449            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9450            None => local_var_key,
9451        };
9452        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9453    };
9454
9455    let local_var_req = local_var_req_builder.build()?;
9456    let local_var_resp = local_var_client.execute(local_var_req).await?;
9457
9458    let local_var_status = local_var_resp.status();
9459
9460    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9461        let local_var_content = local_var_resp.text().await?;
9462        serde_json::from_str(&local_var_content).map_err(Error::from)
9463    } else {
9464        let local_var_content = local_var_resp.text().await?;
9465        let local_var_entity: Option<RetrieveLambdasByTypeWithIdError> = serde_json::from_str(&local_var_content).ok();
9466        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9467        Err(Error::ResponseError(local_var_error))
9468    }
9469}
9470
9471/// Retrieves the message template for the given Id. If you don't specify the id, this will return all the message templates.
9472pub async fn retrieve_message_template(configuration: &configuration::Configuration, ) -> Result<models::MessageTemplateResponse, Error<RetrieveMessageTemplateError>> {
9473    let local_var_configuration = configuration;
9474
9475    let local_var_client = &local_var_configuration.client;
9476
9477    let local_var_uri_str = format!("{}/api/message/template", local_var_configuration.base_path);
9478    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9479
9480    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9481        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9482    }
9483    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9484        let local_var_key = local_var_apikey.key.clone();
9485        let local_var_value = match local_var_apikey.prefix {
9486            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9487            None => local_var_key,
9488        };
9489        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9490    };
9491
9492    let local_var_req = local_var_req_builder.build()?;
9493    let local_var_resp = local_var_client.execute(local_var_req).await?;
9494
9495    let local_var_status = local_var_resp.status();
9496
9497    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9498        let local_var_content = local_var_resp.text().await?;
9499        serde_json::from_str(&local_var_content).map_err(Error::from)
9500    } else {
9501        let local_var_content = local_var_resp.text().await?;
9502        let local_var_entity: Option<RetrieveMessageTemplateError> = serde_json::from_str(&local_var_content).ok();
9503        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9504        Err(Error::ResponseError(local_var_error))
9505    }
9506}
9507
9508/// Creates a preview of the message template provided in the request, normalized to a given locale.
9509pub async fn retrieve_message_template_preview_with_id(configuration: &configuration::Configuration, preview_message_template_request: Option<models::PreviewMessageTemplateRequest>) -> Result<models::PreviewMessageTemplateResponse, Error<RetrieveMessageTemplatePreviewWithIdError>> {
9510    let local_var_configuration = configuration;
9511
9512    let local_var_client = &local_var_configuration.client;
9513
9514    let local_var_uri_str = format!("{}/api/message/template/preview", local_var_configuration.base_path);
9515    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
9516
9517    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9518        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9519    }
9520    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9521        let local_var_key = local_var_apikey.key.clone();
9522        let local_var_value = match local_var_apikey.prefix {
9523            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9524            None => local_var_key,
9525        };
9526        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9527    };
9528    local_var_req_builder = local_var_req_builder.json(&preview_message_template_request);
9529
9530    let local_var_req = local_var_req_builder.build()?;
9531    let local_var_resp = local_var_client.execute(local_var_req).await?;
9532
9533    let local_var_status = local_var_resp.status();
9534
9535    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9536        let local_var_content = local_var_resp.text().await?;
9537        serde_json::from_str(&local_var_content).map_err(Error::from)
9538    } else {
9539        let local_var_content = local_var_resp.text().await?;
9540        let local_var_entity: Option<RetrieveMessageTemplatePreviewWithIdError> = serde_json::from_str(&local_var_content).ok();
9541        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9542        Err(Error::ResponseError(local_var_error))
9543    }
9544}
9545
9546/// Retrieves the message template for the given Id. If you don't specify the id, this will return all the message templates.
9547pub async fn retrieve_message_template_with_id(configuration: &configuration::Configuration, message_template_id: &str) -> Result<models::MessageTemplateResponse, Error<RetrieveMessageTemplateWithIdError>> {
9548    let local_var_configuration = configuration;
9549
9550    let local_var_client = &local_var_configuration.client;
9551
9552    let local_var_uri_str = format!("{}/api/message/template/{messageTemplateId}", local_var_configuration.base_path, messageTemplateId=crate::apis::urlencode(message_template_id));
9553    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9554
9555    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9556        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9557    }
9558    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9559        let local_var_key = local_var_apikey.key.clone();
9560        let local_var_value = match local_var_apikey.prefix {
9561            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9562            None => local_var_key,
9563        };
9564        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9565    };
9566
9567    let local_var_req = local_var_req_builder.build()?;
9568    let local_var_resp = local_var_client.execute(local_var_req).await?;
9569
9570    let local_var_status = local_var_resp.status();
9571
9572    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9573        let local_var_content = local_var_resp.text().await?;
9574        serde_json::from_str(&local_var_content).map_err(Error::from)
9575    } else {
9576        let local_var_content = local_var_resp.text().await?;
9577        let local_var_entity: Option<RetrieveMessageTemplateWithIdError> = serde_json::from_str(&local_var_content).ok();
9578        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9579        Err(Error::ResponseError(local_var_error))
9580    }
9581}
9582
9583/// Retrieves the messenger with the given Id.
9584pub async fn retrieve_messenger_with_id(configuration: &configuration::Configuration, messenger_id: &str) -> Result<models::MessengerResponse, Error<RetrieveMessengerWithIdError>> {
9585    let local_var_configuration = configuration;
9586
9587    let local_var_client = &local_var_configuration.client;
9588
9589    let local_var_uri_str = format!("{}/api/messenger/{messengerId}", local_var_configuration.base_path, messengerId=crate::apis::urlencode(messenger_id));
9590    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9591
9592    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9593        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9594    }
9595    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9596        let local_var_key = local_var_apikey.key.clone();
9597        let local_var_value = match local_var_apikey.prefix {
9598            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9599            None => local_var_key,
9600        };
9601        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9602    };
9603
9604    let local_var_req = local_var_req_builder.build()?;
9605    let local_var_resp = local_var_client.execute(local_var_req).await?;
9606
9607    let local_var_status = local_var_resp.status();
9608
9609    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9610        let local_var_content = local_var_resp.text().await?;
9611        serde_json::from_str(&local_var_content).map_err(Error::from)
9612    } else {
9613        let local_var_content = local_var_resp.text().await?;
9614        let local_var_entity: Option<RetrieveMessengerWithIdError> = serde_json::from_str(&local_var_content).ok();
9615        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9616        Err(Error::ResponseError(local_var_error))
9617    }
9618}
9619
9620/// Retrieves the monthly active user report between the two instants. If you specify an application id, it will only return the monthly active counts for that application.
9621pub async fn retrieve_monthly_active_report_with_id(configuration: &configuration::Configuration, application_id: Option<&str>, start: Option<&str>, end: Option<&str>) -> Result<models::MonthlyActiveUserReportResponse, Error<RetrieveMonthlyActiveReportWithIdError>> {
9622    let local_var_configuration = configuration;
9623
9624    let local_var_client = &local_var_configuration.client;
9625
9626    let local_var_uri_str = format!("{}/api/report/monthly-active-user", local_var_configuration.base_path);
9627    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9628
9629    if let Some(ref local_var_str) = application_id {
9630        local_var_req_builder = local_var_req_builder.query(&[("applicationId", &local_var_str.to_string())]);
9631    }
9632    if let Some(ref local_var_str) = start {
9633        local_var_req_builder = local_var_req_builder.query(&[("start", &local_var_str.to_string())]);
9634    }
9635    if let Some(ref local_var_str) = end {
9636        local_var_req_builder = local_var_req_builder.query(&[("end", &local_var_str.to_string())]);
9637    }
9638    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9639        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9640    }
9641    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9642        let local_var_key = local_var_apikey.key.clone();
9643        let local_var_value = match local_var_apikey.prefix {
9644            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9645            None => local_var_key,
9646        };
9647        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9648    };
9649
9650    let local_var_req = local_var_req_builder.build()?;
9651    let local_var_resp = local_var_client.execute(local_var_req).await?;
9652
9653    let local_var_status = local_var_resp.status();
9654
9655    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9656        let local_var_content = local_var_resp.text().await?;
9657        serde_json::from_str(&local_var_content).map_err(Error::from)
9658    } else {
9659        let local_var_content = local_var_resp.text().await?;
9660        let local_var_entity: Option<RetrieveMonthlyActiveReportWithIdError> = serde_json::from_str(&local_var_content).ok();
9661        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9662        Err(Error::ResponseError(local_var_error))
9663    }
9664}
9665
9666/// Retrieves a custom OAuth scope.
9667pub async fn retrieve_o_auth_scope_with_id(configuration: &configuration::Configuration, application_id: &str, scope_id: &str, x_fusion_auth_tenant_id: Option<&str>) -> Result<models::ApplicationOAuthScopeResponse, Error<RetrieveOAuthScopeWithIdError>> {
9668    let local_var_configuration = configuration;
9669
9670    let local_var_client = &local_var_configuration.client;
9671
9672    let local_var_uri_str = format!("{}/api/application/{applicationId}/scope/{scopeId}", local_var_configuration.base_path, applicationId=crate::apis::urlencode(application_id), scopeId=crate::apis::urlencode(scope_id));
9673    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9674
9675    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9676        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9677    }
9678    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
9679        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
9680    }
9681    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9682        let local_var_key = local_var_apikey.key.clone();
9683        let local_var_value = match local_var_apikey.prefix {
9684            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9685            None => local_var_key,
9686        };
9687        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9688    };
9689
9690    let local_var_req = local_var_req_builder.build()?;
9691    let local_var_resp = local_var_client.execute(local_var_req).await?;
9692
9693    let local_var_status = local_var_resp.status();
9694
9695    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9696        let local_var_content = local_var_resp.text().await?;
9697        serde_json::from_str(&local_var_content).map_err(Error::from)
9698    } else {
9699        let local_var_content = local_var_resp.text().await?;
9700        let local_var_entity: Option<RetrieveOAuthScopeWithIdError> = serde_json::from_str(&local_var_content).ok();
9701        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9702        Err(Error::ResponseError(local_var_error))
9703    }
9704}
9705
9706/// Retrieves the Oauth2 configuration for the application for the given Application Id.
9707pub async fn retrieve_oauth_configuration_with_id(configuration: &configuration::Configuration, application_id: &str, x_fusion_auth_tenant_id: Option<&str>) -> Result<models::OAuthConfigurationResponse, Error<RetrieveOauthConfigurationWithIdError>> {
9708    let local_var_configuration = configuration;
9709
9710    let local_var_client = &local_var_configuration.client;
9711
9712    let local_var_uri_str = format!("{}/api/application/{applicationId}/oauth-configuration", local_var_configuration.base_path, applicationId=crate::apis::urlencode(application_id));
9713    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9714
9715    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9716        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9717    }
9718    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
9719        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
9720    }
9721    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9722        let local_var_key = local_var_apikey.key.clone();
9723        let local_var_value = match local_var_apikey.prefix {
9724            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9725            None => local_var_key,
9726        };
9727        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9728    };
9729
9730    let local_var_req = local_var_req_builder.build()?;
9731    let local_var_resp = local_var_client.execute(local_var_req).await?;
9732
9733    let local_var_status = local_var_resp.status();
9734
9735    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9736        let local_var_content = local_var_resp.text().await?;
9737        serde_json::from_str(&local_var_content).map_err(Error::from)
9738    } else {
9739        let local_var_content = local_var_resp.text().await?;
9740        let local_var_entity: Option<RetrieveOauthConfigurationWithIdError> = serde_json::from_str(&local_var_content).ok();
9741        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9742        Err(Error::ResponseError(local_var_error))
9743    }
9744}
9745
9746/// Returns the well known OpenID Configuration JSON document
9747pub async fn retrieve_open_id_configuration_with_id(configuration: &configuration::Configuration, ) -> Result<models::OpenIdConfiguration, Error<RetrieveOpenIdConfigurationWithIdError>> {
9748    let local_var_configuration = configuration;
9749
9750    let local_var_client = &local_var_configuration.client;
9751
9752    let local_var_uri_str = format!("{}/.well-known/openid-configuration", local_var_configuration.base_path);
9753    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9754
9755    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9756        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9757    }
9758    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9759        let local_var_key = local_var_apikey.key.clone();
9760        let local_var_value = match local_var_apikey.prefix {
9761            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9762            None => local_var_key,
9763        };
9764        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9765    };
9766
9767    let local_var_req = local_var_req_builder.build()?;
9768    let local_var_resp = local_var_client.execute(local_var_req).await?;
9769
9770    let local_var_status = local_var_resp.status();
9771
9772    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9773        let local_var_content = local_var_resp.text().await?;
9774        serde_json::from_str(&local_var_content).map_err(Error::from)
9775    } else {
9776        let local_var_content = local_var_resp.text().await?;
9777        let local_var_entity: Option<RetrieveOpenIdConfigurationWithIdError> = serde_json::from_str(&local_var_content).ok();
9778        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9779        Err(Error::ResponseError(local_var_error))
9780    }
9781}
9782
9783/// Retrieves the password validation rules for a specific tenant. This method requires a tenantId to be provided  through the use of a Tenant scoped API key or an HTTP header X-FusionAuth-TenantId to specify the Tenant Id.  This API does not require an API key.
9784pub async fn retrieve_password_validation_rules_with_id(configuration: &configuration::Configuration, ) -> Result<models::PasswordValidationRulesResponse, Error<RetrievePasswordValidationRulesWithIdError>> {
9785    let local_var_configuration = configuration;
9786
9787    let local_var_client = &local_var_configuration.client;
9788
9789    let local_var_uri_str = format!("{}/api/tenant/password-validation-rules", local_var_configuration.base_path);
9790    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9791
9792    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9793        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9794    }
9795    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9796        let local_var_key = local_var_apikey.key.clone();
9797        let local_var_value = match local_var_apikey.prefix {
9798            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9799            None => local_var_key,
9800        };
9801        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9802    };
9803
9804    let local_var_req = local_var_req_builder.build()?;
9805    let local_var_resp = local_var_client.execute(local_var_req).await?;
9806
9807    let local_var_status = local_var_resp.status();
9808
9809    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9810        let local_var_content = local_var_resp.text().await?;
9811        serde_json::from_str(&local_var_content).map_err(Error::from)
9812    } else {
9813        let local_var_content = local_var_resp.text().await?;
9814        let local_var_entity: Option<RetrievePasswordValidationRulesWithIdError> = serde_json::from_str(&local_var_content).ok();
9815        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9816        Err(Error::ResponseError(local_var_error))
9817    }
9818}
9819
9820/// Retrieves the password validation rules for a specific tenant.  This API does not require an API key.
9821pub async fn retrieve_password_validation_rules_with_tenant_id_with_id(configuration: &configuration::Configuration, tenant_id: &str) -> Result<models::PasswordValidationRulesResponse, Error<RetrievePasswordValidationRulesWithTenantIdWithIdError>> {
9822    let local_var_configuration = configuration;
9823
9824    let local_var_client = &local_var_configuration.client;
9825
9826    let local_var_uri_str = format!("{}/api/tenant/password-validation-rules/{tenantId}", local_var_configuration.base_path, tenantId=crate::apis::urlencode(tenant_id));
9827    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9828
9829    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9830        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9831    }
9832    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9833        let local_var_key = local_var_apikey.key.clone();
9834        let local_var_value = match local_var_apikey.prefix {
9835            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9836            None => local_var_key,
9837        };
9838        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9839    };
9840
9841    let local_var_req = local_var_req_builder.build()?;
9842    let local_var_resp = local_var_client.execute(local_var_req).await?;
9843
9844    let local_var_status = local_var_resp.status();
9845
9846    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9847        let local_var_content = local_var_resp.text().await?;
9848        serde_json::from_str(&local_var_content).map_err(Error::from)
9849    } else {
9850        let local_var_content = local_var_resp.text().await?;
9851        let local_var_entity: Option<RetrievePasswordValidationRulesWithTenantIdWithIdError> = serde_json::from_str(&local_var_content).ok();
9852        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9853        Err(Error::ResponseError(local_var_error))
9854    }
9855}
9856
9857/// Retrieves all the children for the given parent email address.
9858pub async fn retrieve_pending_children_with_id(configuration: &configuration::Configuration, parent_email: Option<&str>) -> Result<models::PendingResponse, Error<RetrievePendingChildrenWithIdError>> {
9859    let local_var_configuration = configuration;
9860
9861    let local_var_client = &local_var_configuration.client;
9862
9863    let local_var_uri_str = format!("{}/api/user/family/pending", local_var_configuration.base_path);
9864    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9865
9866    if let Some(ref local_var_str) = parent_email {
9867        local_var_req_builder = local_var_req_builder.query(&[("parentEmail", &local_var_str.to_string())]);
9868    }
9869    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9870        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9871    }
9872    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9873        let local_var_key = local_var_apikey.key.clone();
9874        let local_var_value = match local_var_apikey.prefix {
9875            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9876            None => local_var_key,
9877        };
9878        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9879    };
9880
9881    let local_var_req = local_var_req_builder.build()?;
9882    let local_var_resp = local_var_client.execute(local_var_req).await?;
9883
9884    let local_var_status = local_var_resp.status();
9885
9886    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9887        let local_var_content = local_var_resp.text().await?;
9888        serde_json::from_str(&local_var_content).map_err(Error::from)
9889    } else {
9890        let local_var_content = local_var_resp.text().await?;
9891        let local_var_entity: Option<RetrievePendingChildrenWithIdError> = serde_json::from_str(&local_var_content).ok();
9892        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9893        Err(Error::ResponseError(local_var_error))
9894    }
9895}
9896
9897/// Retrieve a pending identity provider link. This is useful to validate a pending link and retrieve meta-data about the identity provider link.
9898pub async fn retrieve_pending_link_with_id(configuration: &configuration::Configuration, pending_link_id: &str, user_id: Option<&str>) -> Result<models::IdentityProviderPendingLinkResponse, Error<RetrievePendingLinkWithIdError>> {
9899    let local_var_configuration = configuration;
9900
9901    let local_var_client = &local_var_configuration.client;
9902
9903    let local_var_uri_str = format!("{}/api/identity-provider/link/pending/{pendingLinkId}", local_var_configuration.base_path, pendingLinkId=crate::apis::urlencode(pending_link_id));
9904    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9905
9906    if let Some(ref local_var_str) = user_id {
9907        local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]);
9908    }
9909    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9910        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9911    }
9912    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9913        let local_var_key = local_var_apikey.key.clone();
9914        let local_var_value = match local_var_apikey.prefix {
9915            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9916            None => local_var_key,
9917        };
9918        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9919    };
9920
9921    let local_var_req = local_var_req_builder.build()?;
9922    let local_var_resp = local_var_client.execute(local_var_req).await?;
9923
9924    let local_var_status = local_var_resp.status();
9925
9926    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9927        let local_var_content = local_var_resp.text().await?;
9928        serde_json::from_str(&local_var_content).map_err(Error::from)
9929    } else {
9930        let local_var_content = local_var_resp.text().await?;
9931        let local_var_entity: Option<RetrievePendingLinkWithIdError> = serde_json::from_str(&local_var_content).ok();
9932        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9933        Err(Error::ResponseError(local_var_error))
9934    }
9935}
9936
9937/// Retrieves the FusionAuth Reactor metrics.
9938pub async fn retrieve_reactor_metrics_with_id(configuration: &configuration::Configuration, ) -> Result<models::ReactorMetricsResponse, Error<RetrieveReactorMetricsWithIdError>> {
9939    let local_var_configuration = configuration;
9940
9941    let local_var_client = &local_var_configuration.client;
9942
9943    let local_var_uri_str = format!("{}/api/reactor/metrics", local_var_configuration.base_path);
9944    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9945
9946    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9947        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9948    }
9949    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9950        let local_var_key = local_var_apikey.key.clone();
9951        let local_var_value = match local_var_apikey.prefix {
9952            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9953            None => local_var_key,
9954        };
9955        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9956    };
9957
9958    let local_var_req = local_var_req_builder.build()?;
9959    let local_var_resp = local_var_client.execute(local_var_req).await?;
9960
9961    let local_var_status = local_var_resp.status();
9962
9963    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
9964        let local_var_content = local_var_resp.text().await?;
9965        serde_json::from_str(&local_var_content).map_err(Error::from)
9966    } else {
9967        let local_var_content = local_var_resp.text().await?;
9968        let local_var_entity: Option<RetrieveReactorMetricsWithIdError> = serde_json::from_str(&local_var_content).ok();
9969        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
9970        Err(Error::ResponseError(local_var_error))
9971    }
9972}
9973
9974/// Retrieves a single refresh token by unique Id. This is not the same thing as the string value of the refresh token. If you have that, you already have what you need.
9975pub async fn retrieve_refresh_token_by_id_with_id(configuration: &configuration::Configuration, token_id: &str) -> Result<models::RefreshTokenResponse, Error<RetrieveRefreshTokenByIdWithIdError>> {
9976    let local_var_configuration = configuration;
9977
9978    let local_var_client = &local_var_configuration.client;
9979
9980    let local_var_uri_str = format!("{}/api/jwt/refresh/{tokenId}", local_var_configuration.base_path, tokenId=crate::apis::urlencode(token_id));
9981    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
9982
9983    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
9984        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
9985    }
9986    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
9987        let local_var_key = local_var_apikey.key.clone();
9988        let local_var_value = match local_var_apikey.prefix {
9989            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
9990            None => local_var_key,
9991        };
9992        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
9993    };
9994
9995    let local_var_req = local_var_req_builder.build()?;
9996    let local_var_resp = local_var_client.execute(local_var_req).await?;
9997
9998    let local_var_status = local_var_resp.status();
9999
10000    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10001        let local_var_content = local_var_resp.text().await?;
10002        serde_json::from_str(&local_var_content).map_err(Error::from)
10003    } else {
10004        let local_var_content = local_var_resp.text().await?;
10005        let local_var_entity: Option<RetrieveRefreshTokenByIdWithIdError> = serde_json::from_str(&local_var_content).ok();
10006        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10007        Err(Error::ResponseError(local_var_error))
10008    }
10009}
10010
10011/// Retrieves the refresh tokens that belong to the user with the given Id.
10012pub async fn retrieve_refresh_tokens_with_id(configuration: &configuration::Configuration, user_id: Option<&str>) -> Result<models::RefreshTokenResponse, Error<RetrieveRefreshTokensWithIdError>> {
10013    let local_var_configuration = configuration;
10014
10015    let local_var_client = &local_var_configuration.client;
10016
10017    let local_var_uri_str = format!("{}/api/jwt/refresh", local_var_configuration.base_path);
10018    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10019
10020    if let Some(ref local_var_str) = user_id {
10021        local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]);
10022    }
10023    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10024        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10025    }
10026    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
10027        let local_var_key = local_var_apikey.key.clone();
10028        let local_var_value = match local_var_apikey.prefix {
10029            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
10030            None => local_var_key,
10031        };
10032        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
10033    };
10034
10035    let local_var_req = local_var_req_builder.build()?;
10036    let local_var_resp = local_var_client.execute(local_var_req).await?;
10037
10038    let local_var_status = local_var_resp.status();
10039
10040    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10041        let local_var_content = local_var_resp.text().await?;
10042        serde_json::from_str(&local_var_content).map_err(Error::from)
10043    } else {
10044        let local_var_content = local_var_resp.text().await?;
10045        let local_var_entity: Option<RetrieveRefreshTokensWithIdError> = serde_json::from_str(&local_var_content).ok();
10046        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10047        Err(Error::ResponseError(local_var_error))
10048    }
10049}
10050
10051/// Retrieves the registration report between the two instants. If you specify an application id, it will only return the registration counts for that application.
10052pub async fn retrieve_registration_report_with_id(configuration: &configuration::Configuration, application_id: Option<&str>, start: Option<&str>, end: Option<&str>) -> Result<models::RegistrationReportResponse, Error<RetrieveRegistrationReportWithIdError>> {
10053    let local_var_configuration = configuration;
10054
10055    let local_var_client = &local_var_configuration.client;
10056
10057    let local_var_uri_str = format!("{}/api/report/registration", local_var_configuration.base_path);
10058    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10059
10060    if let Some(ref local_var_str) = application_id {
10061        local_var_req_builder = local_var_req_builder.query(&[("applicationId", &local_var_str.to_string())]);
10062    }
10063    if let Some(ref local_var_str) = start {
10064        local_var_req_builder = local_var_req_builder.query(&[("start", &local_var_str.to_string())]);
10065    }
10066    if let Some(ref local_var_str) = end {
10067        local_var_req_builder = local_var_req_builder.query(&[("end", &local_var_str.to_string())]);
10068    }
10069    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10070        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10071    }
10072    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
10073        let local_var_key = local_var_apikey.key.clone();
10074        let local_var_value = match local_var_apikey.prefix {
10075            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
10076            None => local_var_key,
10077        };
10078        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
10079    };
10080
10081    let local_var_req = local_var_req_builder.build()?;
10082    let local_var_resp = local_var_client.execute(local_var_req).await?;
10083
10084    let local_var_status = local_var_resp.status();
10085
10086    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10087        let local_var_content = local_var_resp.text().await?;
10088        serde_json::from_str(&local_var_content).map_err(Error::from)
10089    } else {
10090        let local_var_content = local_var_resp.text().await?;
10091        let local_var_entity: Option<RetrieveRegistrationReportWithIdError> = serde_json::from_str(&local_var_content).ok();
10092        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10093        Err(Error::ResponseError(local_var_error))
10094    }
10095}
10096
10097/// Retrieves the user registration for the user with the given Id and the given application id.
10098pub async fn retrieve_registration_with_id(configuration: &configuration::Configuration, user_id: &str, application_id: &str, x_fusion_auth_tenant_id: Option<&str>) -> Result<models::RegistrationResponse, Error<RetrieveRegistrationWithIdError>> {
10099    let local_var_configuration = configuration;
10100
10101    let local_var_client = &local_var_configuration.client;
10102
10103    let local_var_uri_str = format!("{}/api/user/registration/{userId}/{applicationId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id), applicationId=crate::apis::urlencode(application_id));
10104    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10105
10106    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10107        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10108    }
10109    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
10110        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
10111    }
10112    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
10113        let local_var_key = local_var_apikey.key.clone();
10114        let local_var_value = match local_var_apikey.prefix {
10115            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
10116            None => local_var_key,
10117        };
10118        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
10119    };
10120
10121    let local_var_req = local_var_req_builder.build()?;
10122    let local_var_resp = local_var_client.execute(local_var_req).await?;
10123
10124    let local_var_status = local_var_resp.status();
10125
10126    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10127        let local_var_content = local_var_resp.text().await?;
10128        serde_json::from_str(&local_var_content).map_err(Error::from)
10129    } else {
10130        let local_var_content = local_var_resp.text().await?;
10131        let local_var_entity: Option<RetrieveRegistrationWithIdError> = serde_json::from_str(&local_var_content).ok();
10132        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10133        Err(Error::ResponseError(local_var_error))
10134    }
10135}
10136
10137/// Retrieves the login report between the two instants for a particular user by login Id. If you specify an application id, it will only return the login counts for that application. OR Retrieves the login report between the two instants for a particular user by Id. If you specify an application id, it will only return the login counts for that application. OR Retrieves the login report between the two instants. If you specify an application id, it will only return the login counts for that application.
10138pub async fn retrieve_report_login(configuration: &configuration::Configuration, application_id: Option<&str>, login_id: Option<&str>, start: Option<&str>, end: Option<&str>, user_id: Option<&str>) -> Result<models::LoginReportResponse, Error<RetrieveReportLoginError>> {
10139    let local_var_configuration = configuration;
10140
10141    let local_var_client = &local_var_configuration.client;
10142
10143    let local_var_uri_str = format!("{}/api/report/login", local_var_configuration.base_path);
10144    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10145
10146    if let Some(ref local_var_str) = application_id {
10147        local_var_req_builder = local_var_req_builder.query(&[("applicationId", &local_var_str.to_string())]);
10148    }
10149    if let Some(ref local_var_str) = login_id {
10150        local_var_req_builder = local_var_req_builder.query(&[("loginId", &local_var_str.to_string())]);
10151    }
10152    if let Some(ref local_var_str) = start {
10153        local_var_req_builder = local_var_req_builder.query(&[("start", &local_var_str.to_string())]);
10154    }
10155    if let Some(ref local_var_str) = end {
10156        local_var_req_builder = local_var_req_builder.query(&[("end", &local_var_str.to_string())]);
10157    }
10158    if let Some(ref local_var_str) = user_id {
10159        local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]);
10160    }
10161    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10162        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10163    }
10164    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
10165        let local_var_key = local_var_apikey.key.clone();
10166        let local_var_value = match local_var_apikey.prefix {
10167            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
10168            None => local_var_key,
10169        };
10170        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
10171    };
10172
10173    let local_var_req = local_var_req_builder.build()?;
10174    let local_var_resp = local_var_client.execute(local_var_req).await?;
10175
10176    let local_var_status = local_var_resp.status();
10177
10178    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10179        let local_var_content = local_var_resp.text().await?;
10180        serde_json::from_str(&local_var_content).map_err(Error::from)
10181    } else {
10182        let local_var_content = local_var_resp.text().await?;
10183        let local_var_entity: Option<RetrieveReportLoginError> = serde_json::from_str(&local_var_content).ok();
10184        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10185        Err(Error::ResponseError(local_var_error))
10186    }
10187}
10188
10189/// Retrieves the FusionAuth system status. This request is anonymous and does not require an API key. When an API key is not provided the response will contain a single value in the JSON response indicating the current health check. OR Retrieves the FusionAuth system status using an API key. Using an API key will cause the response to include the product version, health checks and various runtime metrics.
10190pub async fn retrieve_status(configuration: &configuration::Configuration, ) -> Result<serde_json::Value, Error<RetrieveStatusError>> {
10191    let local_var_configuration = configuration;
10192
10193    let local_var_client = &local_var_configuration.client;
10194
10195    let local_var_uri_str = format!("{}/api/status", local_var_configuration.base_path);
10196    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10197
10198    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10199        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10200    }
10201    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
10202        let local_var_key = local_var_apikey.key.clone();
10203        let local_var_value = match local_var_apikey.prefix {
10204            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
10205            None => local_var_key,
10206        };
10207        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
10208    };
10209
10210    let local_var_req = local_var_req_builder.build()?;
10211    let local_var_resp = local_var_client.execute(local_var_req).await?;
10212
10213    let local_var_status = local_var_resp.status();
10214
10215    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10216        let local_var_content = local_var_resp.text().await?;
10217        serde_json::from_str(&local_var_content).map_err(Error::from)
10218    } else {
10219        let local_var_content = local_var_resp.text().await?;
10220        let local_var_entity: Option<RetrieveStatusError> = serde_json::from_str(&local_var_content).ok();
10221        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10222        Err(Error::ResponseError(local_var_error))
10223    }
10224}
10225
10226/// Retrieves the FusionAuth system health. This API will return 200 if the system is healthy, and 500 if the system is un-healthy.
10227pub async fn retrieve_system_health_with_id(configuration: &configuration::Configuration, ) -> Result<(), Error<RetrieveSystemHealthWithIdError>> {
10228    let local_var_configuration = configuration;
10229
10230    let local_var_client = &local_var_configuration.client;
10231
10232    let local_var_uri_str = format!("{}/api/health", local_var_configuration.base_path);
10233    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10234
10235    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10236        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10237    }
10238    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
10239        let local_var_key = local_var_apikey.key.clone();
10240        let local_var_value = match local_var_apikey.prefix {
10241            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
10242            None => local_var_key,
10243        };
10244        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
10245    };
10246
10247    let local_var_req = local_var_req_builder.build()?;
10248    let local_var_resp = local_var_client.execute(local_var_req).await?;
10249
10250    let local_var_status = local_var_resp.status();
10251
10252    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10253        Ok(())
10254    } else {
10255        let local_var_content = local_var_resp.text().await?;
10256        let local_var_entity: Option<RetrieveSystemHealthWithIdError> = serde_json::from_str(&local_var_content).ok();
10257        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10258        Err(Error::ResponseError(local_var_error))
10259    }
10260}
10261
10262/// Retrieves the tenant for the given Id.
10263pub async fn retrieve_tenant_with_id(configuration: &configuration::Configuration, tenant_id: &str, x_fusion_auth_tenant_id: Option<&str>) -> Result<models::TenantResponse, Error<RetrieveTenantWithIdError>> {
10264    let local_var_configuration = configuration;
10265
10266    let local_var_client = &local_var_configuration.client;
10267
10268    let local_var_uri_str = format!("{}/api/tenant/{tenantId}", local_var_configuration.base_path, tenantId=crate::apis::urlencode(tenant_id));
10269    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10270
10271    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10272        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10273    }
10274    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
10275        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
10276    }
10277    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
10278        let local_var_key = local_var_apikey.key.clone();
10279        let local_var_value = match local_var_apikey.prefix {
10280            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
10281            None => local_var_key,
10282        };
10283        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
10284    };
10285
10286    let local_var_req = local_var_req_builder.build()?;
10287    let local_var_resp = local_var_client.execute(local_var_req).await?;
10288
10289    let local_var_status = local_var_resp.status();
10290
10291    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10292        let local_var_content = local_var_resp.text().await?;
10293        serde_json::from_str(&local_var_content).map_err(Error::from)
10294    } else {
10295        let local_var_content = local_var_resp.text().await?;
10296        let local_var_entity: Option<RetrieveTenantWithIdError> = serde_json::from_str(&local_var_content).ok();
10297        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10298        Err(Error::ResponseError(local_var_error))
10299    }
10300}
10301
10302/// Retrieves the theme for the given Id.
10303pub async fn retrieve_theme_with_id(configuration: &configuration::Configuration, theme_id: &str) -> Result<models::ThemeResponse, Error<RetrieveThemeWithIdError>> {
10304    let local_var_configuration = configuration;
10305
10306    let local_var_client = &local_var_configuration.client;
10307
10308    let local_var_uri_str = format!("{}/api/theme/{themeId}", local_var_configuration.base_path, themeId=crate::apis::urlencode(theme_id));
10309    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10310
10311    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10312        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10313    }
10314    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
10315        let local_var_key = local_var_apikey.key.clone();
10316        let local_var_value = match local_var_apikey.prefix {
10317            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
10318            None => local_var_key,
10319        };
10320        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
10321    };
10322
10323    let local_var_req = local_var_req_builder.build()?;
10324    let local_var_resp = local_var_client.execute(local_var_req).await?;
10325
10326    let local_var_status = local_var_resp.status();
10327
10328    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10329        let local_var_content = local_var_resp.text().await?;
10330        serde_json::from_str(&local_var_content).map_err(Error::from)
10331    } else {
10332        let local_var_content = local_var_resp.text().await?;
10333        let local_var_entity: Option<RetrieveThemeWithIdError> = serde_json::from_str(&local_var_content).ok();
10334        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10335        Err(Error::ResponseError(local_var_error))
10336    }
10337}
10338
10339/// Retrieves the totals report. This contains all the total counts for each application and the global registration count.
10340pub async fn retrieve_total_report_with_id(configuration: &configuration::Configuration, ) -> Result<models::TotalsReportResponse, Error<RetrieveTotalReportWithIdError>> {
10341    let local_var_configuration = configuration;
10342
10343    let local_var_client = &local_var_configuration.client;
10344
10345    let local_var_uri_str = format!("{}/api/report/totals", local_var_configuration.base_path);
10346    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10347
10348    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10349        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10350    }
10351    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
10352        let local_var_key = local_var_apikey.key.clone();
10353        let local_var_value = match local_var_apikey.prefix {
10354            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
10355            None => local_var_key,
10356        };
10357        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
10358    };
10359
10360    let local_var_req = local_var_req_builder.build()?;
10361    let local_var_resp = local_var_client.execute(local_var_req).await?;
10362
10363    let local_var_status = local_var_resp.status();
10364
10365    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10366        let local_var_content = local_var_resp.text().await?;
10367        serde_json::from_str(&local_var_content).map_err(Error::from)
10368    } else {
10369        let local_var_content = local_var_resp.text().await?;
10370        let local_var_entity: Option<RetrieveTotalReportWithIdError> = serde_json::from_str(&local_var_content).ok();
10371        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10372        Err(Error::ResponseError(local_var_error))
10373    }
10374}
10375
10376/// Retrieve two-factor recovery codes for a user.
10377pub async fn retrieve_two_factor_recovery_codes_with_id(configuration: &configuration::Configuration, user_id: &str) -> Result<models::TwoFactorRecoveryCodeResponse, Error<RetrieveTwoFactorRecoveryCodesWithIdError>> {
10378    let local_var_configuration = configuration;
10379
10380    let local_var_client = &local_var_configuration.client;
10381
10382    let local_var_uri_str = format!("{}/api/user/two-factor/recovery-code/{userId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id));
10383    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10384
10385    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10386        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10387    }
10388    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
10389        let local_var_key = local_var_apikey.key.clone();
10390        let local_var_value = match local_var_apikey.prefix {
10391            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
10392            None => local_var_key,
10393        };
10394        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
10395    };
10396
10397    let local_var_req = local_var_req_builder.build()?;
10398    let local_var_resp = local_var_client.execute(local_var_req).await?;
10399
10400    let local_var_status = local_var_resp.status();
10401
10402    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10403        let local_var_content = local_var_resp.text().await?;
10404        serde_json::from_str(&local_var_content).map_err(Error::from)
10405    } else {
10406        let local_var_content = local_var_resp.text().await?;
10407        let local_var_entity: Option<RetrieveTwoFactorRecoveryCodesWithIdError> = serde_json::from_str(&local_var_content).ok();
10408        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10409        Err(Error::ResponseError(local_var_error))
10410    }
10411}
10412
10413/// Retrieve a user's two-factor status.  This can be used to see if a user will need to complete a two-factor challenge to complete a login, and optionally identify the state of the two-factor trust across various applications.
10414pub async fn retrieve_two_factor_status_with_id(configuration: &configuration::Configuration, two_factor_trust_id: &str, user_id: Option<&str>, application_id: Option<&str>) -> Result<models::TwoFactorStatusResponse, Error<RetrieveTwoFactorStatusWithIdError>> {
10415    let local_var_configuration = configuration;
10416
10417    let local_var_client = &local_var_configuration.client;
10418
10419    let local_var_uri_str = format!("{}/api/two-factor/status/{twoFactorTrustId}", local_var_configuration.base_path, twoFactorTrustId=crate::apis::urlencode(two_factor_trust_id));
10420    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10421
10422    if let Some(ref local_var_str) = user_id {
10423        local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]);
10424    }
10425    if let Some(ref local_var_str) = application_id {
10426        local_var_req_builder = local_var_req_builder.query(&[("applicationId", &local_var_str.to_string())]);
10427    }
10428    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10429        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10430    }
10431    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
10432        let local_var_key = local_var_apikey.key.clone();
10433        let local_var_value = match local_var_apikey.prefix {
10434            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
10435            None => local_var_key,
10436        };
10437        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
10438    };
10439
10440    let local_var_req = local_var_req_builder.build()?;
10441    let local_var_resp = local_var_client.execute(local_var_req).await?;
10442
10443    let local_var_status = local_var_resp.status();
10444
10445    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10446        let local_var_content = local_var_resp.text().await?;
10447        serde_json::from_str(&local_var_content).map_err(Error::from)
10448    } else {
10449        let local_var_content = local_var_resp.text().await?;
10450        let local_var_entity: Option<RetrieveTwoFactorStatusWithIdError> = serde_json::from_str(&local_var_content).ok();
10451        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10452        Err(Error::ResponseError(local_var_error))
10453    }
10454}
10455
10456/// Retrieves the user for the given Id. This method does not use an API key, instead it uses a JSON Web Token (JWT) for authentication. OR Retrieves the user by a change password Id. The intended use of this API is to retrieve a user after the forgot password workflow has been initiated and you may not know the user's email or username. OR Retrieves the user by a verificationId. The intended use of this API is to retrieve a user after the forgot password workflow has been initiated and you may not know the user's email or username. OR Retrieves the user for the given username. OR Retrieves the user for the given email. OR Retrieves the user for the loginId. The loginId can be either the username or the email.
10457pub async fn retrieve_user(configuration: &configuration::Configuration, x_fusion_auth_tenant_id: Option<&str>, change_password_id: Option<&str>, verification_id: Option<&str>, username: Option<&str>, email: Option<&str>, login_id: Option<&str>) -> Result<models::UserResponse, Error<RetrieveUserError>> {
10458    let local_var_configuration = configuration;
10459
10460    let local_var_client = &local_var_configuration.client;
10461
10462    let local_var_uri_str = format!("{}/api/user", local_var_configuration.base_path);
10463    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10464
10465    if let Some(ref local_var_str) = change_password_id {
10466        local_var_req_builder = local_var_req_builder.query(&[("changePasswordId", &local_var_str.to_string())]);
10467    }
10468    if let Some(ref local_var_str) = verification_id {
10469        local_var_req_builder = local_var_req_builder.query(&[("verificationId", &local_var_str.to_string())]);
10470    }
10471    if let Some(ref local_var_str) = username {
10472        local_var_req_builder = local_var_req_builder.query(&[("username", &local_var_str.to_string())]);
10473    }
10474    if let Some(ref local_var_str) = email {
10475        local_var_req_builder = local_var_req_builder.query(&[("email", &local_var_str.to_string())]);
10476    }
10477    if let Some(ref local_var_str) = login_id {
10478        local_var_req_builder = local_var_req_builder.query(&[("loginId", &local_var_str.to_string())]);
10479    }
10480    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10481        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10482    }
10483    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
10484        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
10485    }
10486    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
10487        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
10488    };
10489
10490    let local_var_req = local_var_req_builder.build()?;
10491    let local_var_resp = local_var_client.execute(local_var_req).await?;
10492
10493    let local_var_status = local_var_resp.status();
10494
10495    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10496        let local_var_content = local_var_resp.text().await?;
10497        serde_json::from_str(&local_var_content).map_err(Error::from)
10498    } else {
10499        let local_var_content = local_var_resp.text().await?;
10500        let local_var_entity: Option<RetrieveUserError> = serde_json::from_str(&local_var_content).ok();
10501        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10502        Err(Error::ResponseError(local_var_error))
10503    }
10504}
10505
10506/// Retrieves all the user actions that are currently inactive. OR Retrieves the user action for the given Id. If you pass in null for the id, this will return all the user actions.
10507pub async fn retrieve_user_action(configuration: &configuration::Configuration, inactive: Option<&str>, x_fusion_auth_tenant_id: Option<&str>) -> Result<models::UserActionResponse, Error<RetrieveUserActionError>> {
10508    let local_var_configuration = configuration;
10509
10510    let local_var_client = &local_var_configuration.client;
10511
10512    let local_var_uri_str = format!("{}/api/user-action", local_var_configuration.base_path);
10513    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10514
10515    if let Some(ref local_var_str) = inactive {
10516        local_var_req_builder = local_var_req_builder.query(&[("inactive", &local_var_str.to_string())]);
10517    }
10518    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10519        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10520    }
10521    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
10522        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
10523    }
10524    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
10525        let local_var_key = local_var_apikey.key.clone();
10526        let local_var_value = match local_var_apikey.prefix {
10527            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
10528            None => local_var_key,
10529        };
10530        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
10531    };
10532
10533    let local_var_req = local_var_req_builder.build()?;
10534    let local_var_resp = local_var_client.execute(local_var_req).await?;
10535
10536    let local_var_status = local_var_resp.status();
10537
10538    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10539        let local_var_content = local_var_resp.text().await?;
10540        serde_json::from_str(&local_var_content).map_err(Error::from)
10541    } else {
10542        let local_var_content = local_var_resp.text().await?;
10543        let local_var_entity: Option<RetrieveUserActionError> = serde_json::from_str(&local_var_content).ok();
10544        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10545        Err(Error::ResponseError(local_var_error))
10546    }
10547}
10548
10549/// Retrieves the user action reason for the given Id. If you pass in null for the id, this will return all the user action reasons.
10550pub async fn retrieve_user_action_reason(configuration: &configuration::Configuration, ) -> Result<models::UserActionReasonResponse, Error<RetrieveUserActionReasonError>> {
10551    let local_var_configuration = configuration;
10552
10553    let local_var_client = &local_var_configuration.client;
10554
10555    let local_var_uri_str = format!("{}/api/user-action-reason", local_var_configuration.base_path);
10556    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10557
10558    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10559        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10560    }
10561    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
10562        let local_var_key = local_var_apikey.key.clone();
10563        let local_var_value = match local_var_apikey.prefix {
10564            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
10565            None => local_var_key,
10566        };
10567        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
10568    };
10569
10570    let local_var_req = local_var_req_builder.build()?;
10571    let local_var_resp = local_var_client.execute(local_var_req).await?;
10572
10573    let local_var_status = local_var_resp.status();
10574
10575    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10576        let local_var_content = local_var_resp.text().await?;
10577        serde_json::from_str(&local_var_content).map_err(Error::from)
10578    } else {
10579        let local_var_content = local_var_resp.text().await?;
10580        let local_var_entity: Option<RetrieveUserActionReasonError> = serde_json::from_str(&local_var_content).ok();
10581        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10582        Err(Error::ResponseError(local_var_error))
10583    }
10584}
10585
10586/// Retrieves the user action reason for the given Id. If you pass in null for the id, this will return all the user action reasons.
10587pub async fn retrieve_user_action_reason_with_id(configuration: &configuration::Configuration, user_action_reason_id: &str) -> Result<models::UserActionReasonResponse, Error<RetrieveUserActionReasonWithIdError>> {
10588    let local_var_configuration = configuration;
10589
10590    let local_var_client = &local_var_configuration.client;
10591
10592    let local_var_uri_str = format!("{}/api/user-action-reason/{userActionReasonId}", local_var_configuration.base_path, userActionReasonId=crate::apis::urlencode(user_action_reason_id));
10593    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10594
10595    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10596        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10597    }
10598    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
10599        let local_var_key = local_var_apikey.key.clone();
10600        let local_var_value = match local_var_apikey.prefix {
10601            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
10602            None => local_var_key,
10603        };
10604        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
10605    };
10606
10607    let local_var_req = local_var_req_builder.build()?;
10608    let local_var_resp = local_var_client.execute(local_var_req).await?;
10609
10610    let local_var_status = local_var_resp.status();
10611
10612    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10613        let local_var_content = local_var_resp.text().await?;
10614        serde_json::from_str(&local_var_content).map_err(Error::from)
10615    } else {
10616        let local_var_content = local_var_resp.text().await?;
10617        let local_var_entity: Option<RetrieveUserActionReasonWithIdError> = serde_json::from_str(&local_var_content).ok();
10618        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10619        Err(Error::ResponseError(local_var_error))
10620    }
10621}
10622
10623/// Retrieves the user action for the given Id. If you pass in null for the id, this will return all the user actions.
10624pub async fn retrieve_user_action_with_id(configuration: &configuration::Configuration, user_action_id: &str, x_fusion_auth_tenant_id: Option<&str>) -> Result<models::UserActionResponse, Error<RetrieveUserActionWithIdError>> {
10625    let local_var_configuration = configuration;
10626
10627    let local_var_client = &local_var_configuration.client;
10628
10629    let local_var_uri_str = format!("{}/api/user-action/{userActionId}", local_var_configuration.base_path, userActionId=crate::apis::urlencode(user_action_id));
10630    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10631
10632    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10633        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10634    }
10635    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
10636        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
10637    }
10638    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
10639        let local_var_key = local_var_apikey.key.clone();
10640        let local_var_value = match local_var_apikey.prefix {
10641            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
10642            None => local_var_key,
10643        };
10644        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
10645    };
10646
10647    let local_var_req = local_var_req_builder.build()?;
10648    let local_var_resp = local_var_client.execute(local_var_req).await?;
10649
10650    let local_var_status = local_var_resp.status();
10651
10652    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10653        let local_var_content = local_var_resp.text().await?;
10654        serde_json::from_str(&local_var_content).map_err(Error::from)
10655    } else {
10656        let local_var_content = local_var_resp.text().await?;
10657        let local_var_entity: Option<RetrieveUserActionWithIdError> = serde_json::from_str(&local_var_content).ok();
10658        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10659        Err(Error::ResponseError(local_var_error))
10660    }
10661}
10662
10663/// Retrieves all the actions for the user with the given Id. This will return all time based actions that are active, and inactive as well as non-time based actions. OR Retrieves all the actions for the user with the given Id that are currently inactive. An inactive action means one that is time based and has been canceled or has expired, or is not time based. OR Retrieves all the actions for the user with the given Id that are currently active. An active action means one that is time based and has not been canceled, and has not ended. OR Retrieves all the actions for the user with the given Id that are currently preventing the User from logging in.
10664pub async fn retrieve_user_actioning(configuration: &configuration::Configuration, user_id: Option<&str>, active: Option<&str>, preventing_login: Option<&str>) -> Result<models::ActionResponse, Error<RetrieveUserActioningError>> {
10665    let local_var_configuration = configuration;
10666
10667    let local_var_client = &local_var_configuration.client;
10668
10669    let local_var_uri_str = format!("{}/api/user/action", local_var_configuration.base_path);
10670    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10671
10672    if let Some(ref local_var_str) = user_id {
10673        local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]);
10674    }
10675    if let Some(ref local_var_str) = active {
10676        local_var_req_builder = local_var_req_builder.query(&[("active", &local_var_str.to_string())]);
10677    }
10678    if let Some(ref local_var_str) = preventing_login {
10679        local_var_req_builder = local_var_req_builder.query(&[("preventingLogin", &local_var_str.to_string())]);
10680    }
10681    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10682        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10683    }
10684    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
10685        let local_var_key = local_var_apikey.key.clone();
10686        let local_var_value = match local_var_apikey.prefix {
10687            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
10688            None => local_var_key,
10689        };
10690        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
10691    };
10692
10693    let local_var_req = local_var_req_builder.build()?;
10694    let local_var_resp = local_var_client.execute(local_var_req).await?;
10695
10696    let local_var_status = local_var_resp.status();
10697
10698    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10699        let local_var_content = local_var_resp.text().await?;
10700        serde_json::from_str(&local_var_content).map_err(Error::from)
10701    } else {
10702        let local_var_content = local_var_resp.text().await?;
10703        let local_var_entity: Option<RetrieveUserActioningError> = serde_json::from_str(&local_var_content).ok();
10704        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10705        Err(Error::ResponseError(local_var_error))
10706    }
10707}
10708
10709/// Check to see if the user must obtain a Trust Token Id in order to complete a change password request. When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change your password, you must obtain a Trust Token by completing a Two-Factor Step-Up authentication.  An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API. OR Check to see if the user must obtain a Trust Request Id in order to complete a change password request. When a user has enabled Two-Factor authentication, before you are allowed to use the Change Password API to change your password, you must obtain a Trust Request Id by completing a Two-Factor Step-Up authentication.  An HTTP status code of 400 with a general error code of [TrustTokenRequired] indicates that a Trust Token is required to make a POST request to this API.
10710pub async fn retrieve_user_change_password(configuration: &configuration::Configuration, login_id: Option<&str>) -> Result<(), Error<RetrieveUserChangePasswordError>> {
10711    let local_var_configuration = configuration;
10712
10713    let local_var_client = &local_var_configuration.client;
10714
10715    let local_var_uri_str = format!("{}/api/user/change-password", local_var_configuration.base_path);
10716    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10717
10718    if let Some(ref local_var_str) = login_id {
10719        local_var_req_builder = local_var_req_builder.query(&[("loginId", &local_var_str.to_string())]);
10720    }
10721    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10722        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10723    }
10724    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
10725        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
10726    };
10727
10728    let local_var_req = local_var_req_builder.build()?;
10729    let local_var_resp = local_var_client.execute(local_var_req).await?;
10730
10731    let local_var_status = local_var_resp.status();
10732
10733    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10734        Ok(())
10735    } else {
10736        let local_var_content = local_var_resp.text().await?;
10737        let local_var_entity: Option<RetrieveUserChangePasswordError> = serde_json::from_str(&local_var_content).ok();
10738        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10739        Err(Error::ResponseError(local_var_error))
10740    }
10741}
10742
10743/// Retrieves all the comments for the user with the given Id.
10744pub async fn retrieve_user_comments_with_id(configuration: &configuration::Configuration, user_id: &str, x_fusion_auth_tenant_id: Option<&str>) -> Result<models::UserCommentResponse, Error<RetrieveUserCommentsWithIdError>> {
10745    let local_var_configuration = configuration;
10746
10747    let local_var_client = &local_var_configuration.client;
10748
10749    let local_var_uri_str = format!("{}/api/user/comment/{userId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id));
10750    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10751
10752    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10753        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10754    }
10755    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
10756        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
10757    }
10758    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
10759        let local_var_key = local_var_apikey.key.clone();
10760        let local_var_value = match local_var_apikey.prefix {
10761            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
10762            None => local_var_key,
10763        };
10764        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
10765    };
10766
10767    let local_var_req = local_var_req_builder.build()?;
10768    let local_var_resp = local_var_client.execute(local_var_req).await?;
10769
10770    let local_var_status = local_var_resp.status();
10771
10772    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10773        let local_var_content = local_var_resp.text().await?;
10774        serde_json::from_str(&local_var_content).map_err(Error::from)
10775    } else {
10776        let local_var_content = local_var_resp.text().await?;
10777        let local_var_entity: Option<RetrieveUserCommentsWithIdError> = serde_json::from_str(&local_var_content).ok();
10778        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10779        Err(Error::ResponseError(local_var_error))
10780    }
10781}
10782
10783/// Retrieve a single User consent by Id.
10784pub async fn retrieve_user_consent_with_id(configuration: &configuration::Configuration, user_consent_id: &str) -> Result<models::UserConsentResponse, Error<RetrieveUserConsentWithIdError>> {
10785    let local_var_configuration = configuration;
10786
10787    let local_var_client = &local_var_configuration.client;
10788
10789    let local_var_uri_str = format!("{}/api/user/consent/{userConsentId}", local_var_configuration.base_path, userConsentId=crate::apis::urlencode(user_consent_id));
10790    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10791
10792    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10793        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10794    }
10795    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
10796        let local_var_key = local_var_apikey.key.clone();
10797        let local_var_value = match local_var_apikey.prefix {
10798            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
10799            None => local_var_key,
10800        };
10801        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
10802    };
10803
10804    let local_var_req = local_var_req_builder.build()?;
10805    let local_var_resp = local_var_client.execute(local_var_req).await?;
10806
10807    let local_var_status = local_var_resp.status();
10808
10809    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10810        let local_var_content = local_var_resp.text().await?;
10811        serde_json::from_str(&local_var_content).map_err(Error::from)
10812    } else {
10813        let local_var_content = local_var_resp.text().await?;
10814        let local_var_entity: Option<RetrieveUserConsentWithIdError> = serde_json::from_str(&local_var_content).ok();
10815        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10816        Err(Error::ResponseError(local_var_error))
10817    }
10818}
10819
10820/// Retrieves all the consents for a User.
10821pub async fn retrieve_user_consents_with_id(configuration: &configuration::Configuration, user_id: Option<&str>) -> Result<models::UserConsentResponse, Error<RetrieveUserConsentsWithIdError>> {
10822    let local_var_configuration = configuration;
10823
10824    let local_var_client = &local_var_configuration.client;
10825
10826    let local_var_uri_str = format!("{}/api/user/consent", local_var_configuration.base_path);
10827    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10828
10829    if let Some(ref local_var_str) = user_id {
10830        local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]);
10831    }
10832    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10833        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10834    }
10835    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
10836        let local_var_key = local_var_apikey.key.clone();
10837        let local_var_value = match local_var_apikey.prefix {
10838            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
10839            None => local_var_key,
10840        };
10841        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
10842    };
10843
10844    let local_var_req = local_var_req_builder.build()?;
10845    let local_var_resp = local_var_client.execute(local_var_req).await?;
10846
10847    let local_var_status = local_var_resp.status();
10848
10849    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10850        let local_var_content = local_var_resp.text().await?;
10851        serde_json::from_str(&local_var_content).map_err(Error::from)
10852    } else {
10853        let local_var_content = local_var_resp.text().await?;
10854        let local_var_entity: Option<RetrieveUserConsentsWithIdError> = serde_json::from_str(&local_var_content).ok();
10855        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10856        Err(Error::ResponseError(local_var_error))
10857    }
10858}
10859
10860/// Call the UserInfo endpoint to retrieve User Claims from the access token issued by FusionAuth.
10861pub async fn retrieve_user_info_from_access_token_with_id(configuration: &configuration::Configuration, ) -> Result<serde_json::Value, Error<RetrieveUserInfoFromAccessTokenWithIdError>> {
10862    let local_var_configuration = configuration;
10863
10864    let local_var_client = &local_var_configuration.client;
10865
10866    let local_var_uri_str = format!("{}/oauth2/userinfo", local_var_configuration.base_path);
10867    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10868
10869    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10870        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10871    }
10872    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
10873        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
10874    };
10875
10876    let local_var_req = local_var_req_builder.build()?;
10877    let local_var_resp = local_var_client.execute(local_var_req).await?;
10878
10879    let local_var_status = local_var_resp.status();
10880
10881    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10882        let local_var_content = local_var_resp.text().await?;
10883        serde_json::from_str(&local_var_content).map_err(Error::from)
10884    } else {
10885        let local_var_content = local_var_resp.text().await?;
10886        let local_var_entity: Option<RetrieveUserInfoFromAccessTokenWithIdError> = serde_json::from_str(&local_var_content).ok();
10887        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10888        Err(Error::ResponseError(local_var_error))
10889    }
10890}
10891
10892/// Retrieves the last number of login records. OR Retrieves the last number of login records for a user.
10893pub async fn retrieve_user_recent_login(configuration: &configuration::Configuration, offset: Option<&str>, limit: Option<&str>, user_id: Option<&str>) -> Result<models::RecentLoginResponse, Error<RetrieveUserRecentLoginError>> {
10894    let local_var_configuration = configuration;
10895
10896    let local_var_client = &local_var_configuration.client;
10897
10898    let local_var_uri_str = format!("{}/api/user/recent-login", local_var_configuration.base_path);
10899    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10900
10901    if let Some(ref local_var_str) = offset {
10902        local_var_req_builder = local_var_req_builder.query(&[("offset", &local_var_str.to_string())]);
10903    }
10904    if let Some(ref local_var_str) = limit {
10905        local_var_req_builder = local_var_req_builder.query(&[("limit", &local_var_str.to_string())]);
10906    }
10907    if let Some(ref local_var_str) = user_id {
10908        local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]);
10909    }
10910    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10911        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10912    }
10913    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
10914        let local_var_key = local_var_apikey.key.clone();
10915        let local_var_value = match local_var_apikey.prefix {
10916            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
10917            None => local_var_key,
10918        };
10919        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
10920    };
10921
10922    let local_var_req = local_var_req_builder.build()?;
10923    let local_var_resp = local_var_client.execute(local_var_req).await?;
10924
10925    let local_var_status = local_var_resp.status();
10926
10927    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10928        let local_var_content = local_var_resp.text().await?;
10929        serde_json::from_str(&local_var_content).map_err(Error::from)
10930    } else {
10931        let local_var_content = local_var_resp.text().await?;
10932        let local_var_entity: Option<RetrieveUserRecentLoginError> = serde_json::from_str(&local_var_content).ok();
10933        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10934        Err(Error::ResponseError(local_var_error))
10935    }
10936}
10937
10938/// Retrieves the user for the given Id.
10939pub async fn retrieve_user_with_id(configuration: &configuration::Configuration, user_id: &str, x_fusion_auth_tenant_id: Option<&str>) -> Result<models::UserResponse, Error<RetrieveUserWithIdError>> {
10940    let local_var_configuration = configuration;
10941
10942    let local_var_client = &local_var_configuration.client;
10943
10944    let local_var_uri_str = format!("{}/api/user/{userId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id));
10945    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10946
10947    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10948        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10949    }
10950    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
10951        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
10952    }
10953    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
10954        let local_var_key = local_var_apikey.key.clone();
10955        let local_var_value = match local_var_apikey.prefix {
10956            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
10957            None => local_var_key,
10958        };
10959        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
10960    };
10961
10962    let local_var_req = local_var_req_builder.build()?;
10963    let local_var_resp = local_var_client.execute(local_var_req).await?;
10964
10965    let local_var_status = local_var_resp.status();
10966
10967    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
10968        let local_var_content = local_var_resp.text().await?;
10969        serde_json::from_str(&local_var_content).map_err(Error::from)
10970    } else {
10971        let local_var_content = local_var_resp.text().await?;
10972        let local_var_entity: Option<RetrieveUserWithIdError> = serde_json::from_str(&local_var_content).ok();
10973        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
10974        Err(Error::ResponseError(local_var_error))
10975    }
10976}
10977
10978/// Retrieves the FusionAuth version string.
10979pub async fn retrieve_version_with_id(configuration: &configuration::Configuration, ) -> Result<models::VersionResponse, Error<RetrieveVersionWithIdError>> {
10980    let local_var_configuration = configuration;
10981
10982    let local_var_client = &local_var_configuration.client;
10983
10984    let local_var_uri_str = format!("{}/api/system/version", local_var_configuration.base_path);
10985    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
10986
10987    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
10988        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
10989    }
10990    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
10991        let local_var_key = local_var_apikey.key.clone();
10992        let local_var_value = match local_var_apikey.prefix {
10993            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
10994            None => local_var_key,
10995        };
10996        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
10997    };
10998
10999    let local_var_req = local_var_req_builder.build()?;
11000    let local_var_resp = local_var_client.execute(local_var_req).await?;
11001
11002    let local_var_status = local_var_resp.status();
11003
11004    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11005        let local_var_content = local_var_resp.text().await?;
11006        serde_json::from_str(&local_var_content).map_err(Error::from)
11007    } else {
11008        let local_var_content = local_var_resp.text().await?;
11009        let local_var_entity: Option<RetrieveVersionWithIdError> = serde_json::from_str(&local_var_content).ok();
11010        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11011        Err(Error::ResponseError(local_var_error))
11012    }
11013}
11014
11015/// Retrieves the WebAuthn credential for the given Id.
11016pub async fn retrieve_web_authn_credential_with_id(configuration: &configuration::Configuration, id: &str) -> Result<models::WebAuthnCredentialResponse, Error<RetrieveWebAuthnCredentialWithIdError>> {
11017    let local_var_configuration = configuration;
11018
11019    let local_var_client = &local_var_configuration.client;
11020
11021    let local_var_uri_str = format!("{}/api/webauthn/{id}", local_var_configuration.base_path, id=crate::apis::urlencode(id));
11022    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
11023
11024    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11025        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11026    }
11027    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11028        let local_var_key = local_var_apikey.key.clone();
11029        let local_var_value = match local_var_apikey.prefix {
11030            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11031            None => local_var_key,
11032        };
11033        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11034    };
11035
11036    let local_var_req = local_var_req_builder.build()?;
11037    let local_var_resp = local_var_client.execute(local_var_req).await?;
11038
11039    let local_var_status = local_var_resp.status();
11040
11041    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11042        let local_var_content = local_var_resp.text().await?;
11043        serde_json::from_str(&local_var_content).map_err(Error::from)
11044    } else {
11045        let local_var_content = local_var_resp.text().await?;
11046        let local_var_entity: Option<RetrieveWebAuthnCredentialWithIdError> = serde_json::from_str(&local_var_content).ok();
11047        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11048        Err(Error::ResponseError(local_var_error))
11049    }
11050}
11051
11052/// Retrieves all WebAuthn credentials for the given user.
11053pub async fn retrieve_web_authn_credentials_for_user_with_id(configuration: &configuration::Configuration, user_id: Option<&str>) -> Result<models::WebAuthnCredentialResponse, Error<RetrieveWebAuthnCredentialsForUserWithIdError>> {
11054    let local_var_configuration = configuration;
11055
11056    let local_var_client = &local_var_configuration.client;
11057
11058    let local_var_uri_str = format!("{}/api/webauthn", local_var_configuration.base_path);
11059    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
11060
11061    if let Some(ref local_var_str) = user_id {
11062        local_var_req_builder = local_var_req_builder.query(&[("userId", &local_var_str.to_string())]);
11063    }
11064    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11065        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11066    }
11067    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11068        let local_var_key = local_var_apikey.key.clone();
11069        let local_var_value = match local_var_apikey.prefix {
11070            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11071            None => local_var_key,
11072        };
11073        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11074    };
11075
11076    let local_var_req = local_var_req_builder.build()?;
11077    let local_var_resp = local_var_client.execute(local_var_req).await?;
11078
11079    let local_var_status = local_var_resp.status();
11080
11081    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11082        let local_var_content = local_var_resp.text().await?;
11083        serde_json::from_str(&local_var_content).map_err(Error::from)
11084    } else {
11085        let local_var_content = local_var_resp.text().await?;
11086        let local_var_entity: Option<RetrieveWebAuthnCredentialsForUserWithIdError> = serde_json::from_str(&local_var_content).ok();
11087        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11088        Err(Error::ResponseError(local_var_error))
11089    }
11090}
11091
11092/// Retrieves the webhook for the given Id. If you pass in null for the id, this will return all the webhooks.
11093pub async fn retrieve_webhook(configuration: &configuration::Configuration, ) -> Result<models::WebhookResponse, Error<RetrieveWebhookError>> {
11094    let local_var_configuration = configuration;
11095
11096    let local_var_client = &local_var_configuration.client;
11097
11098    let local_var_uri_str = format!("{}/api/webhook", local_var_configuration.base_path);
11099    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
11100
11101    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11102        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11103    }
11104    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11105        let local_var_key = local_var_apikey.key.clone();
11106        let local_var_value = match local_var_apikey.prefix {
11107            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11108            None => local_var_key,
11109        };
11110        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11111    };
11112
11113    let local_var_req = local_var_req_builder.build()?;
11114    let local_var_resp = local_var_client.execute(local_var_req).await?;
11115
11116    let local_var_status = local_var_resp.status();
11117
11118    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11119        let local_var_content = local_var_resp.text().await?;
11120        serde_json::from_str(&local_var_content).map_err(Error::from)
11121    } else {
11122        let local_var_content = local_var_resp.text().await?;
11123        let local_var_entity: Option<RetrieveWebhookError> = serde_json::from_str(&local_var_content).ok();
11124        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11125        Err(Error::ResponseError(local_var_error))
11126    }
11127}
11128
11129/// Retrieves a single webhook attempt log for the given Id.
11130pub async fn retrieve_webhook_attempt_log_with_id(configuration: &configuration::Configuration, webhook_attempt_log_id: &str) -> Result<models::WebhookAttemptLogResponse, Error<RetrieveWebhookAttemptLogWithIdError>> {
11131    let local_var_configuration = configuration;
11132
11133    let local_var_client = &local_var_configuration.client;
11134
11135    let local_var_uri_str = format!("{}/api/system/webhook-attempt-log/{webhookAttemptLogId}", local_var_configuration.base_path, webhookAttemptLogId=crate::apis::urlencode(webhook_attempt_log_id));
11136    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
11137
11138    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11139        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11140    }
11141    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11142        let local_var_key = local_var_apikey.key.clone();
11143        let local_var_value = match local_var_apikey.prefix {
11144            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11145            None => local_var_key,
11146        };
11147        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11148    };
11149
11150    let local_var_req = local_var_req_builder.build()?;
11151    let local_var_resp = local_var_client.execute(local_var_req).await?;
11152
11153    let local_var_status = local_var_resp.status();
11154
11155    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11156        let local_var_content = local_var_resp.text().await?;
11157        serde_json::from_str(&local_var_content).map_err(Error::from)
11158    } else {
11159        let local_var_content = local_var_resp.text().await?;
11160        let local_var_entity: Option<RetrieveWebhookAttemptLogWithIdError> = serde_json::from_str(&local_var_content).ok();
11161        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11162        Err(Error::ResponseError(local_var_error))
11163    }
11164}
11165
11166/// Retrieves a single webhook event log for the given Id.
11167pub async fn retrieve_webhook_event_log_with_id(configuration: &configuration::Configuration, webhook_event_log_id: &str) -> Result<models::WebhookEventLogResponse, Error<RetrieveWebhookEventLogWithIdError>> {
11168    let local_var_configuration = configuration;
11169
11170    let local_var_client = &local_var_configuration.client;
11171
11172    let local_var_uri_str = format!("{}/api/system/webhook-event-log/{webhookEventLogId}", local_var_configuration.base_path, webhookEventLogId=crate::apis::urlencode(webhook_event_log_id));
11173    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
11174
11175    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11176        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11177    }
11178    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11179        let local_var_key = local_var_apikey.key.clone();
11180        let local_var_value = match local_var_apikey.prefix {
11181            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11182            None => local_var_key,
11183        };
11184        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11185    };
11186
11187    let local_var_req = local_var_req_builder.build()?;
11188    let local_var_resp = local_var_client.execute(local_var_req).await?;
11189
11190    let local_var_status = local_var_resp.status();
11191
11192    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11193        let local_var_content = local_var_resp.text().await?;
11194        serde_json::from_str(&local_var_content).map_err(Error::from)
11195    } else {
11196        let local_var_content = local_var_resp.text().await?;
11197        let local_var_entity: Option<RetrieveWebhookEventLogWithIdError> = serde_json::from_str(&local_var_content).ok();
11198        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11199        Err(Error::ResponseError(local_var_error))
11200    }
11201}
11202
11203/// Retrieves the webhook for the given Id. If you pass in null for the id, this will return all the webhooks.
11204pub async fn retrieve_webhook_with_id(configuration: &configuration::Configuration, webhook_id: &str) -> Result<models::WebhookResponse, Error<RetrieveWebhookWithIdError>> {
11205    let local_var_configuration = configuration;
11206
11207    let local_var_client = &local_var_configuration.client;
11208
11209    let local_var_uri_str = format!("{}/api/webhook/{webhookId}", local_var_configuration.base_path, webhookId=crate::apis::urlencode(webhook_id));
11210    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
11211
11212    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11213        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11214    }
11215    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11216        let local_var_key = local_var_apikey.key.clone();
11217        let local_var_value = match local_var_apikey.prefix {
11218            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11219            None => local_var_key,
11220        };
11221        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11222    };
11223
11224    let local_var_req = local_var_req_builder.build()?;
11225    let local_var_resp = local_var_client.execute(local_var_req).await?;
11226
11227    let local_var_status = local_var_resp.status();
11228
11229    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11230        let local_var_content = local_var_resp.text().await?;
11231        serde_json::from_str(&local_var_content).map_err(Error::from)
11232    } else {
11233        let local_var_content = local_var_resp.text().await?;
11234        let local_var_entity: Option<RetrieveWebhookWithIdError> = serde_json::from_str(&local_var_content).ok();
11235        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11236        Err(Error::ResponseError(local_var_error))
11237    }
11238}
11239
11240/// Revokes a single refresh token by the unique Id. The unique Id is not sensitive as it cannot be used to obtain another JWT.
11241pub async fn revoke_refresh_token_by_id_with_id(configuration: &configuration::Configuration, token_id: &str) -> Result<(), Error<RevokeRefreshTokenByIdWithIdError>> {
11242    let local_var_configuration = configuration;
11243
11244    let local_var_client = &local_var_configuration.client;
11245
11246    let local_var_uri_str = format!("{}/api/jwt/refresh/{tokenId}", local_var_configuration.base_path, tokenId=crate::apis::urlencode(token_id));
11247    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
11248
11249    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11250        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11251    }
11252    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11253        let local_var_key = local_var_apikey.key.clone();
11254        let local_var_value = match local_var_apikey.prefix {
11255            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11256            None => local_var_key,
11257        };
11258        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11259    };
11260
11261    let local_var_req = local_var_req_builder.build()?;
11262    let local_var_resp = local_var_client.execute(local_var_req).await?;
11263
11264    let local_var_status = local_var_resp.status();
11265
11266    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11267        Ok(())
11268    } else {
11269        let local_var_content = local_var_resp.text().await?;
11270        let local_var_entity: Option<RevokeRefreshTokenByIdWithIdError> = serde_json::from_str(&local_var_content).ok();
11271        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11272        Err(Error::ResponseError(local_var_error))
11273    }
11274}
11275
11276/// Revokes a single User consent by Id.
11277pub async fn revoke_user_consent_with_id(configuration: &configuration::Configuration, user_consent_id: &str) -> Result<(), Error<RevokeUserConsentWithIdError>> {
11278    let local_var_configuration = configuration;
11279
11280    let local_var_client = &local_var_configuration.client;
11281
11282    let local_var_uri_str = format!("{}/api/user/consent/{userConsentId}", local_var_configuration.base_path, userConsentId=crate::apis::urlencode(user_consent_id));
11283    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
11284
11285    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11286        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11287    }
11288    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11289        let local_var_key = local_var_apikey.key.clone();
11290        let local_var_value = match local_var_apikey.prefix {
11291            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11292            None => local_var_key,
11293        };
11294        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11295    };
11296
11297    let local_var_req = local_var_req_builder.build()?;
11298    let local_var_resp = local_var_client.execute(local_var_req).await?;
11299
11300    let local_var_status = local_var_resp.status();
11301
11302    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11303        Ok(())
11304    } else {
11305        let local_var_content = local_var_resp.text().await?;
11306        let local_var_entity: Option<RevokeUserConsentWithIdError> = serde_json::from_str(&local_var_content).ok();
11307        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11308        Err(Error::ResponseError(local_var_error))
11309    }
11310}
11311
11312/// Searches applications with the specified criteria and pagination.
11313pub async fn search_applications_with_id(configuration: &configuration::Configuration, application_search_request: Option<models::ApplicationSearchRequest>) -> Result<models::ApplicationSearchResponse, Error<SearchApplicationsWithIdError>> {
11314    let local_var_configuration = configuration;
11315
11316    let local_var_client = &local_var_configuration.client;
11317
11318    let local_var_uri_str = format!("{}/api/application/search", local_var_configuration.base_path);
11319    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
11320
11321    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11322        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11323    }
11324    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11325        let local_var_key = local_var_apikey.key.clone();
11326        let local_var_value = match local_var_apikey.prefix {
11327            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11328            None => local_var_key,
11329        };
11330        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11331    };
11332    local_var_req_builder = local_var_req_builder.json(&application_search_request);
11333
11334    let local_var_req = local_var_req_builder.build()?;
11335    let local_var_resp = local_var_client.execute(local_var_req).await?;
11336
11337    let local_var_status = local_var_resp.status();
11338
11339    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11340        let local_var_content = local_var_resp.text().await?;
11341        serde_json::from_str(&local_var_content).map_err(Error::from)
11342    } else {
11343        let local_var_content = local_var_resp.text().await?;
11344        let local_var_entity: Option<SearchApplicationsWithIdError> = serde_json::from_str(&local_var_content).ok();
11345        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11346        Err(Error::ResponseError(local_var_error))
11347    }
11348}
11349
11350/// Searches the audit logs with the specified criteria and pagination.
11351pub async fn search_audit_logs_with_id(configuration: &configuration::Configuration, audit_log_search_request: Option<models::AuditLogSearchRequest>) -> Result<models::AuditLogSearchResponse, Error<SearchAuditLogsWithIdError>> {
11352    let local_var_configuration = configuration;
11353
11354    let local_var_client = &local_var_configuration.client;
11355
11356    let local_var_uri_str = format!("{}/api/system/audit-log/search", local_var_configuration.base_path);
11357    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
11358
11359    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11360        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11361    }
11362    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11363        let local_var_key = local_var_apikey.key.clone();
11364        let local_var_value = match local_var_apikey.prefix {
11365            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11366            None => local_var_key,
11367        };
11368        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11369    };
11370    local_var_req_builder = local_var_req_builder.json(&audit_log_search_request);
11371
11372    let local_var_req = local_var_req_builder.build()?;
11373    let local_var_resp = local_var_client.execute(local_var_req).await?;
11374
11375    let local_var_status = local_var_resp.status();
11376
11377    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11378        let local_var_content = local_var_resp.text().await?;
11379        serde_json::from_str(&local_var_content).map_err(Error::from)
11380    } else {
11381        let local_var_content = local_var_resp.text().await?;
11382        let local_var_entity: Option<SearchAuditLogsWithIdError> = serde_json::from_str(&local_var_content).ok();
11383        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11384        Err(Error::ResponseError(local_var_error))
11385    }
11386}
11387
11388/// Searches consents with the specified criteria and pagination.
11389pub async fn search_consents_with_id(configuration: &configuration::Configuration, consent_search_request: Option<models::ConsentSearchRequest>) -> Result<models::ConsentSearchResponse, Error<SearchConsentsWithIdError>> {
11390    let local_var_configuration = configuration;
11391
11392    let local_var_client = &local_var_configuration.client;
11393
11394    let local_var_uri_str = format!("{}/api/consent/search", local_var_configuration.base_path);
11395    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
11396
11397    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11398        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11399    }
11400    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11401        let local_var_key = local_var_apikey.key.clone();
11402        let local_var_value = match local_var_apikey.prefix {
11403            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11404            None => local_var_key,
11405        };
11406        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11407    };
11408    local_var_req_builder = local_var_req_builder.json(&consent_search_request);
11409
11410    let local_var_req = local_var_req_builder.build()?;
11411    let local_var_resp = local_var_client.execute(local_var_req).await?;
11412
11413    let local_var_status = local_var_resp.status();
11414
11415    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11416        let local_var_content = local_var_resp.text().await?;
11417        serde_json::from_str(&local_var_content).map_err(Error::from)
11418    } else {
11419        let local_var_content = local_var_resp.text().await?;
11420        let local_var_entity: Option<SearchConsentsWithIdError> = serde_json::from_str(&local_var_content).ok();
11421        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11422        Err(Error::ResponseError(local_var_error))
11423    }
11424}
11425
11426/// Searches email templates with the specified criteria and pagination.
11427pub async fn search_email_templates_with_id(configuration: &configuration::Configuration, email_template_search_request: Option<models::EmailTemplateSearchRequest>) -> Result<models::EmailTemplateSearchResponse, Error<SearchEmailTemplatesWithIdError>> {
11428    let local_var_configuration = configuration;
11429
11430    let local_var_client = &local_var_configuration.client;
11431
11432    let local_var_uri_str = format!("{}/api/email/template/search", local_var_configuration.base_path);
11433    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
11434
11435    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11436        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11437    }
11438    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11439        let local_var_key = local_var_apikey.key.clone();
11440        let local_var_value = match local_var_apikey.prefix {
11441            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11442            None => local_var_key,
11443        };
11444        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11445    };
11446    local_var_req_builder = local_var_req_builder.json(&email_template_search_request);
11447
11448    let local_var_req = local_var_req_builder.build()?;
11449    let local_var_resp = local_var_client.execute(local_var_req).await?;
11450
11451    let local_var_status = local_var_resp.status();
11452
11453    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11454        let local_var_content = local_var_resp.text().await?;
11455        serde_json::from_str(&local_var_content).map_err(Error::from)
11456    } else {
11457        let local_var_content = local_var_resp.text().await?;
11458        let local_var_entity: Option<SearchEmailTemplatesWithIdError> = serde_json::from_str(&local_var_content).ok();
11459        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11460        Err(Error::ResponseError(local_var_error))
11461    }
11462}
11463
11464/// Retrieves the entities for the given ids. If any Id is invalid, it is ignored.
11465pub async fn search_entities_by_ids_with_id(configuration: &configuration::Configuration, ids: Option<&str>) -> Result<models::EntitySearchResponse, Error<SearchEntitiesByIdsWithIdError>> {
11466    let local_var_configuration = configuration;
11467
11468    let local_var_client = &local_var_configuration.client;
11469
11470    let local_var_uri_str = format!("{}/api/entity/search", local_var_configuration.base_path);
11471    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
11472
11473    if let Some(ref local_var_str) = ids {
11474        local_var_req_builder = local_var_req_builder.query(&[("ids", &local_var_str.to_string())]);
11475    }
11476    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11477        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11478    }
11479    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11480        let local_var_key = local_var_apikey.key.clone();
11481        let local_var_value = match local_var_apikey.prefix {
11482            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11483            None => local_var_key,
11484        };
11485        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11486    };
11487
11488    let local_var_req = local_var_req_builder.build()?;
11489    let local_var_resp = local_var_client.execute(local_var_req).await?;
11490
11491    let local_var_status = local_var_resp.status();
11492
11493    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11494        let local_var_content = local_var_resp.text().await?;
11495        serde_json::from_str(&local_var_content).map_err(Error::from)
11496    } else {
11497        let local_var_content = local_var_resp.text().await?;
11498        let local_var_entity: Option<SearchEntitiesByIdsWithIdError> = serde_json::from_str(&local_var_content).ok();
11499        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11500        Err(Error::ResponseError(local_var_error))
11501    }
11502}
11503
11504/// Searches entities with the specified criteria and pagination.
11505pub async fn search_entities_with_id(configuration: &configuration::Configuration, entity_search_request: Option<models::EntitySearchRequest>) -> Result<models::EntitySearchResponse, Error<SearchEntitiesWithIdError>> {
11506    let local_var_configuration = configuration;
11507
11508    let local_var_client = &local_var_configuration.client;
11509
11510    let local_var_uri_str = format!("{}/api/entity/search", local_var_configuration.base_path);
11511    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
11512
11513    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11514        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11515    }
11516    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11517        let local_var_key = local_var_apikey.key.clone();
11518        let local_var_value = match local_var_apikey.prefix {
11519            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11520            None => local_var_key,
11521        };
11522        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11523    };
11524    local_var_req_builder = local_var_req_builder.json(&entity_search_request);
11525
11526    let local_var_req = local_var_req_builder.build()?;
11527    let local_var_resp = local_var_client.execute(local_var_req).await?;
11528
11529    let local_var_status = local_var_resp.status();
11530
11531    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11532        let local_var_content = local_var_resp.text().await?;
11533        serde_json::from_str(&local_var_content).map_err(Error::from)
11534    } else {
11535        let local_var_content = local_var_resp.text().await?;
11536        let local_var_entity: Option<SearchEntitiesWithIdError> = serde_json::from_str(&local_var_content).ok();
11537        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11538        Err(Error::ResponseError(local_var_error))
11539    }
11540}
11541
11542/// Searches Entity Grants with the specified criteria and pagination.
11543pub async fn search_entity_grants_with_id(configuration: &configuration::Configuration, entity_grant_search_request: Option<models::EntityGrantSearchRequest>) -> Result<models::EntityGrantSearchResponse, Error<SearchEntityGrantsWithIdError>> {
11544    let local_var_configuration = configuration;
11545
11546    let local_var_client = &local_var_configuration.client;
11547
11548    let local_var_uri_str = format!("{}/api/entity/grant/search", local_var_configuration.base_path);
11549    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
11550
11551    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11552        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11553    }
11554    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11555        let local_var_key = local_var_apikey.key.clone();
11556        let local_var_value = match local_var_apikey.prefix {
11557            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11558            None => local_var_key,
11559        };
11560        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11561    };
11562    local_var_req_builder = local_var_req_builder.json(&entity_grant_search_request);
11563
11564    let local_var_req = local_var_req_builder.build()?;
11565    let local_var_resp = local_var_client.execute(local_var_req).await?;
11566
11567    let local_var_status = local_var_resp.status();
11568
11569    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11570        let local_var_content = local_var_resp.text().await?;
11571        serde_json::from_str(&local_var_content).map_err(Error::from)
11572    } else {
11573        let local_var_content = local_var_resp.text().await?;
11574        let local_var_entity: Option<SearchEntityGrantsWithIdError> = serde_json::from_str(&local_var_content).ok();
11575        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11576        Err(Error::ResponseError(local_var_error))
11577    }
11578}
11579
11580/// Searches the entity types with the specified criteria and pagination.
11581pub async fn search_entity_types_with_id(configuration: &configuration::Configuration, entity_type_search_request: Option<models::EntityTypeSearchRequest>) -> Result<models::EntityTypeSearchResponse, Error<SearchEntityTypesWithIdError>> {
11582    let local_var_configuration = configuration;
11583
11584    let local_var_client = &local_var_configuration.client;
11585
11586    let local_var_uri_str = format!("{}/api/entity/type/search", local_var_configuration.base_path);
11587    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
11588
11589    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11590        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11591    }
11592    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11593        let local_var_key = local_var_apikey.key.clone();
11594        let local_var_value = match local_var_apikey.prefix {
11595            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11596            None => local_var_key,
11597        };
11598        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11599    };
11600    local_var_req_builder = local_var_req_builder.json(&entity_type_search_request);
11601
11602    let local_var_req = local_var_req_builder.build()?;
11603    let local_var_resp = local_var_client.execute(local_var_req).await?;
11604
11605    let local_var_status = local_var_resp.status();
11606
11607    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11608        let local_var_content = local_var_resp.text().await?;
11609        serde_json::from_str(&local_var_content).map_err(Error::from)
11610    } else {
11611        let local_var_content = local_var_resp.text().await?;
11612        let local_var_entity: Option<SearchEntityTypesWithIdError> = serde_json::from_str(&local_var_content).ok();
11613        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11614        Err(Error::ResponseError(local_var_error))
11615    }
11616}
11617
11618/// Searches the event logs with the specified criteria and pagination.
11619pub async fn search_event_logs_with_id(configuration: &configuration::Configuration, event_log_search_request: Option<models::EventLogSearchRequest>) -> Result<models::EventLogSearchResponse, Error<SearchEventLogsWithIdError>> {
11620    let local_var_configuration = configuration;
11621
11622    let local_var_client = &local_var_configuration.client;
11623
11624    let local_var_uri_str = format!("{}/api/system/event-log/search", local_var_configuration.base_path);
11625    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
11626
11627    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11628        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11629    }
11630    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11631        let local_var_key = local_var_apikey.key.clone();
11632        let local_var_value = match local_var_apikey.prefix {
11633            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11634            None => local_var_key,
11635        };
11636        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11637    };
11638    local_var_req_builder = local_var_req_builder.json(&event_log_search_request);
11639
11640    let local_var_req = local_var_req_builder.build()?;
11641    let local_var_resp = local_var_client.execute(local_var_req).await?;
11642
11643    let local_var_status = local_var_resp.status();
11644
11645    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11646        let local_var_content = local_var_resp.text().await?;
11647        serde_json::from_str(&local_var_content).map_err(Error::from)
11648    } else {
11649        let local_var_content = local_var_resp.text().await?;
11650        let local_var_entity: Option<SearchEventLogsWithIdError> = serde_json::from_str(&local_var_content).ok();
11651        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11652        Err(Error::ResponseError(local_var_error))
11653    }
11654}
11655
11656/// Searches group members with the specified criteria and pagination.
11657pub async fn search_group_members_with_id(configuration: &configuration::Configuration, group_member_search_request: Option<models::GroupMemberSearchRequest>) -> Result<models::GroupMemberSearchResponse, Error<SearchGroupMembersWithIdError>> {
11658    let local_var_configuration = configuration;
11659
11660    let local_var_client = &local_var_configuration.client;
11661
11662    let local_var_uri_str = format!("{}/api/group/member/search", local_var_configuration.base_path);
11663    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
11664
11665    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11666        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11667    }
11668    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11669        let local_var_key = local_var_apikey.key.clone();
11670        let local_var_value = match local_var_apikey.prefix {
11671            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11672            None => local_var_key,
11673        };
11674        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11675    };
11676    local_var_req_builder = local_var_req_builder.json(&group_member_search_request);
11677
11678    let local_var_req = local_var_req_builder.build()?;
11679    let local_var_resp = local_var_client.execute(local_var_req).await?;
11680
11681    let local_var_status = local_var_resp.status();
11682
11683    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11684        let local_var_content = local_var_resp.text().await?;
11685        serde_json::from_str(&local_var_content).map_err(Error::from)
11686    } else {
11687        let local_var_content = local_var_resp.text().await?;
11688        let local_var_entity: Option<SearchGroupMembersWithIdError> = serde_json::from_str(&local_var_content).ok();
11689        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11690        Err(Error::ResponseError(local_var_error))
11691    }
11692}
11693
11694/// Searches groups with the specified criteria and pagination.
11695pub async fn search_groups_with_id(configuration: &configuration::Configuration, group_search_request: Option<models::GroupSearchRequest>) -> Result<models::GroupSearchResponse, Error<SearchGroupsWithIdError>> {
11696    let local_var_configuration = configuration;
11697
11698    let local_var_client = &local_var_configuration.client;
11699
11700    let local_var_uri_str = format!("{}/api/group/search", local_var_configuration.base_path);
11701    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
11702
11703    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11704        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11705    }
11706    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11707        let local_var_key = local_var_apikey.key.clone();
11708        let local_var_value = match local_var_apikey.prefix {
11709            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11710            None => local_var_key,
11711        };
11712        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11713    };
11714    local_var_req_builder = local_var_req_builder.json(&group_search_request);
11715
11716    let local_var_req = local_var_req_builder.build()?;
11717    let local_var_resp = local_var_client.execute(local_var_req).await?;
11718
11719    let local_var_status = local_var_resp.status();
11720
11721    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11722        let local_var_content = local_var_resp.text().await?;
11723        serde_json::from_str(&local_var_content).map_err(Error::from)
11724    } else {
11725        let local_var_content = local_var_resp.text().await?;
11726        let local_var_entity: Option<SearchGroupsWithIdError> = serde_json::from_str(&local_var_content).ok();
11727        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11728        Err(Error::ResponseError(local_var_error))
11729    }
11730}
11731
11732/// Searches identity providers with the specified criteria and pagination.
11733pub async fn search_identity_providers_with_id(configuration: &configuration::Configuration, identity_provider_search_request: Option<models::IdentityProviderSearchRequest>) -> Result<models::IdentityProviderSearchResponse, Error<SearchIdentityProvidersWithIdError>> {
11734    let local_var_configuration = configuration;
11735
11736    let local_var_client = &local_var_configuration.client;
11737
11738    let local_var_uri_str = format!("{}/api/identity-provider/search", local_var_configuration.base_path);
11739    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
11740
11741    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11742        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11743    }
11744    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11745        let local_var_key = local_var_apikey.key.clone();
11746        let local_var_value = match local_var_apikey.prefix {
11747            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11748            None => local_var_key,
11749        };
11750        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11751    };
11752    local_var_req_builder = local_var_req_builder.json(&identity_provider_search_request);
11753
11754    let local_var_req = local_var_req_builder.build()?;
11755    let local_var_resp = local_var_client.execute(local_var_req).await?;
11756
11757    let local_var_status = local_var_resp.status();
11758
11759    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11760        let local_var_content = local_var_resp.text().await?;
11761        serde_json::from_str(&local_var_content).map_err(Error::from)
11762    } else {
11763        let local_var_content = local_var_resp.text().await?;
11764        let local_var_entity: Option<SearchIdentityProvidersWithIdError> = serde_json::from_str(&local_var_content).ok();
11765        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11766        Err(Error::ResponseError(local_var_error))
11767    }
11768}
11769
11770/// Searches the IP Access Control Lists with the specified criteria and pagination.
11771pub async fn search_ip_access_control_lists_with_id(configuration: &configuration::Configuration, ip_access_control_list_search_request: Option<models::IpAccessControlListSearchRequest>) -> Result<models::IpAccessControlListSearchResponse, Error<SearchIpAccessControlListsWithIdError>> {
11772    let local_var_configuration = configuration;
11773
11774    let local_var_client = &local_var_configuration.client;
11775
11776    let local_var_uri_str = format!("{}/api/ip-acl/search", local_var_configuration.base_path);
11777    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
11778
11779    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11780        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11781    }
11782    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11783        let local_var_key = local_var_apikey.key.clone();
11784        let local_var_value = match local_var_apikey.prefix {
11785            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11786            None => local_var_key,
11787        };
11788        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11789    };
11790    local_var_req_builder = local_var_req_builder.json(&ip_access_control_list_search_request);
11791
11792    let local_var_req = local_var_req_builder.build()?;
11793    let local_var_resp = local_var_client.execute(local_var_req).await?;
11794
11795    let local_var_status = local_var_resp.status();
11796
11797    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11798        let local_var_content = local_var_resp.text().await?;
11799        serde_json::from_str(&local_var_content).map_err(Error::from)
11800    } else {
11801        let local_var_content = local_var_resp.text().await?;
11802        let local_var_entity: Option<SearchIpAccessControlListsWithIdError> = serde_json::from_str(&local_var_content).ok();
11803        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11804        Err(Error::ResponseError(local_var_error))
11805    }
11806}
11807
11808/// Searches keys with the specified criteria and pagination.
11809pub async fn search_keys_with_id(configuration: &configuration::Configuration, key_search_request: Option<models::KeySearchRequest>) -> Result<models::KeySearchResponse, Error<SearchKeysWithIdError>> {
11810    let local_var_configuration = configuration;
11811
11812    let local_var_client = &local_var_configuration.client;
11813
11814    let local_var_uri_str = format!("{}/api/key/search", local_var_configuration.base_path);
11815    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
11816
11817    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11818        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11819    }
11820    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11821        let local_var_key = local_var_apikey.key.clone();
11822        let local_var_value = match local_var_apikey.prefix {
11823            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11824            None => local_var_key,
11825        };
11826        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11827    };
11828    local_var_req_builder = local_var_req_builder.json(&key_search_request);
11829
11830    let local_var_req = local_var_req_builder.build()?;
11831    let local_var_resp = local_var_client.execute(local_var_req).await?;
11832
11833    let local_var_status = local_var_resp.status();
11834
11835    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11836        let local_var_content = local_var_resp.text().await?;
11837        serde_json::from_str(&local_var_content).map_err(Error::from)
11838    } else {
11839        let local_var_content = local_var_resp.text().await?;
11840        let local_var_entity: Option<SearchKeysWithIdError> = serde_json::from_str(&local_var_content).ok();
11841        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11842        Err(Error::ResponseError(local_var_error))
11843    }
11844}
11845
11846/// Searches lambdas with the specified criteria and pagination.
11847pub async fn search_lambdas_with_id(configuration: &configuration::Configuration, lambda_search_request: Option<models::LambdaSearchRequest>) -> Result<models::LambdaSearchResponse, Error<SearchLambdasWithIdError>> {
11848    let local_var_configuration = configuration;
11849
11850    let local_var_client = &local_var_configuration.client;
11851
11852    let local_var_uri_str = format!("{}/api/lambda/search", local_var_configuration.base_path);
11853    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
11854
11855    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11856        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11857    }
11858    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11859        let local_var_key = local_var_apikey.key.clone();
11860        let local_var_value = match local_var_apikey.prefix {
11861            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11862            None => local_var_key,
11863        };
11864        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11865    };
11866    local_var_req_builder = local_var_req_builder.json(&lambda_search_request);
11867
11868    let local_var_req = local_var_req_builder.build()?;
11869    let local_var_resp = local_var_client.execute(local_var_req).await?;
11870
11871    let local_var_status = local_var_resp.status();
11872
11873    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11874        let local_var_content = local_var_resp.text().await?;
11875        serde_json::from_str(&local_var_content).map_err(Error::from)
11876    } else {
11877        let local_var_content = local_var_resp.text().await?;
11878        let local_var_entity: Option<SearchLambdasWithIdError> = serde_json::from_str(&local_var_content).ok();
11879        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11880        Err(Error::ResponseError(local_var_error))
11881    }
11882}
11883
11884/// Searches the login records with the specified criteria and pagination.
11885pub async fn search_login_records_with_id(configuration: &configuration::Configuration, login_record_search_request: Option<models::LoginRecordSearchRequest>) -> Result<models::LoginRecordSearchResponse, Error<SearchLoginRecordsWithIdError>> {
11886    let local_var_configuration = configuration;
11887
11888    let local_var_client = &local_var_configuration.client;
11889
11890    let local_var_uri_str = format!("{}/api/system/login-record/search", local_var_configuration.base_path);
11891    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
11892
11893    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11894        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11895    }
11896    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11897        let local_var_key = local_var_apikey.key.clone();
11898        let local_var_value = match local_var_apikey.prefix {
11899            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11900            None => local_var_key,
11901        };
11902        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11903    };
11904    local_var_req_builder = local_var_req_builder.json(&login_record_search_request);
11905
11906    let local_var_req = local_var_req_builder.build()?;
11907    let local_var_resp = local_var_client.execute(local_var_req).await?;
11908
11909    let local_var_status = local_var_resp.status();
11910
11911    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11912        let local_var_content = local_var_resp.text().await?;
11913        serde_json::from_str(&local_var_content).map_err(Error::from)
11914    } else {
11915        let local_var_content = local_var_resp.text().await?;
11916        let local_var_entity: Option<SearchLoginRecordsWithIdError> = serde_json::from_str(&local_var_content).ok();
11917        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11918        Err(Error::ResponseError(local_var_error))
11919    }
11920}
11921
11922/// Searches tenants with the specified criteria and pagination.
11923pub async fn search_tenants_with_id(configuration: &configuration::Configuration, tenant_search_request: Option<models::TenantSearchRequest>) -> Result<models::TenantSearchResponse, Error<SearchTenantsWithIdError>> {
11924    let local_var_configuration = configuration;
11925
11926    let local_var_client = &local_var_configuration.client;
11927
11928    let local_var_uri_str = format!("{}/api/tenant/search", local_var_configuration.base_path);
11929    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
11930
11931    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11932        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11933    }
11934    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11935        let local_var_key = local_var_apikey.key.clone();
11936        let local_var_value = match local_var_apikey.prefix {
11937            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11938            None => local_var_key,
11939        };
11940        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11941    };
11942    local_var_req_builder = local_var_req_builder.json(&tenant_search_request);
11943
11944    let local_var_req = local_var_req_builder.build()?;
11945    let local_var_resp = local_var_client.execute(local_var_req).await?;
11946
11947    let local_var_status = local_var_resp.status();
11948
11949    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11950        let local_var_content = local_var_resp.text().await?;
11951        serde_json::from_str(&local_var_content).map_err(Error::from)
11952    } else {
11953        let local_var_content = local_var_resp.text().await?;
11954        let local_var_entity: Option<SearchTenantsWithIdError> = serde_json::from_str(&local_var_content).ok();
11955        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11956        Err(Error::ResponseError(local_var_error))
11957    }
11958}
11959
11960/// Searches themes with the specified criteria and pagination.
11961pub async fn search_themes_with_id(configuration: &configuration::Configuration, theme_search_request: Option<models::ThemeSearchRequest>) -> Result<models::ThemeSearchResponse, Error<SearchThemesWithIdError>> {
11962    let local_var_configuration = configuration;
11963
11964    let local_var_client = &local_var_configuration.client;
11965
11966    let local_var_uri_str = format!("{}/api/theme/search", local_var_configuration.base_path);
11967    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
11968
11969    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
11970        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
11971    }
11972    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
11973        let local_var_key = local_var_apikey.key.clone();
11974        let local_var_value = match local_var_apikey.prefix {
11975            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
11976            None => local_var_key,
11977        };
11978        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
11979    };
11980    local_var_req_builder = local_var_req_builder.json(&theme_search_request);
11981
11982    let local_var_req = local_var_req_builder.build()?;
11983    let local_var_resp = local_var_client.execute(local_var_req).await?;
11984
11985    let local_var_status = local_var_resp.status();
11986
11987    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
11988        let local_var_content = local_var_resp.text().await?;
11989        serde_json::from_str(&local_var_content).map_err(Error::from)
11990    } else {
11991        let local_var_content = local_var_resp.text().await?;
11992        let local_var_entity: Option<SearchThemesWithIdError> = serde_json::from_str(&local_var_content).ok();
11993        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
11994        Err(Error::ResponseError(local_var_error))
11995    }
11996}
11997
11998/// Searches user comments with the specified criteria and pagination.
11999pub async fn search_user_comments_with_id(configuration: &configuration::Configuration, user_comment_search_request: Option<models::UserCommentSearchRequest>) -> Result<models::UserCommentSearchResponse, Error<SearchUserCommentsWithIdError>> {
12000    let local_var_configuration = configuration;
12001
12002    let local_var_client = &local_var_configuration.client;
12003
12004    let local_var_uri_str = format!("{}/api/user/comment/search", local_var_configuration.base_path);
12005    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
12006
12007    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12008        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12009    }
12010    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12011        let local_var_key = local_var_apikey.key.clone();
12012        let local_var_value = match local_var_apikey.prefix {
12013            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12014            None => local_var_key,
12015        };
12016        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12017    };
12018    local_var_req_builder = local_var_req_builder.json(&user_comment_search_request);
12019
12020    let local_var_req = local_var_req_builder.build()?;
12021    let local_var_resp = local_var_client.execute(local_var_req).await?;
12022
12023    let local_var_status = local_var_resp.status();
12024
12025    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12026        let local_var_content = local_var_resp.text().await?;
12027        serde_json::from_str(&local_var_content).map_err(Error::from)
12028    } else {
12029        let local_var_content = local_var_resp.text().await?;
12030        let local_var_entity: Option<SearchUserCommentsWithIdError> = serde_json::from_str(&local_var_content).ok();
12031        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12032        Err(Error::ResponseError(local_var_error))
12033    }
12034}
12035
12036/// Retrieves the users for the given ids. If any Id is invalid, it is ignored.
12037pub async fn search_users_by_ids_with_id(configuration: &configuration::Configuration, ids: Option<&str>) -> Result<models::SearchResponse, Error<SearchUsersByIdsWithIdError>> {
12038    let local_var_configuration = configuration;
12039
12040    let local_var_client = &local_var_configuration.client;
12041
12042    let local_var_uri_str = format!("{}/api/user/search", local_var_configuration.base_path);
12043    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
12044
12045    if let Some(ref local_var_str) = ids {
12046        local_var_req_builder = local_var_req_builder.query(&[("ids", &local_var_str.to_string())]);
12047    }
12048    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12049        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12050    }
12051    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12052        let local_var_key = local_var_apikey.key.clone();
12053        let local_var_value = match local_var_apikey.prefix {
12054            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12055            None => local_var_key,
12056        };
12057        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12058    };
12059
12060    let local_var_req = local_var_req_builder.build()?;
12061    let local_var_resp = local_var_client.execute(local_var_req).await?;
12062
12063    let local_var_status = local_var_resp.status();
12064
12065    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12066        let local_var_content = local_var_resp.text().await?;
12067        serde_json::from_str(&local_var_content).map_err(Error::from)
12068    } else {
12069        let local_var_content = local_var_resp.text().await?;
12070        let local_var_entity: Option<SearchUsersByIdsWithIdError> = serde_json::from_str(&local_var_content).ok();
12071        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12072        Err(Error::ResponseError(local_var_error))
12073    }
12074}
12075
12076/// Retrieves the users for the given search criteria and pagination.
12077pub async fn search_users_by_query_with_id(configuration: &configuration::Configuration, search_request: Option<models::SearchRequest>) -> Result<models::SearchResponse, Error<SearchUsersByQueryWithIdError>> {
12078    let local_var_configuration = configuration;
12079
12080    let local_var_client = &local_var_configuration.client;
12081
12082    let local_var_uri_str = format!("{}/api/user/search", local_var_configuration.base_path);
12083    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
12084
12085    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12086        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12087    }
12088    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12089        let local_var_key = local_var_apikey.key.clone();
12090        let local_var_value = match local_var_apikey.prefix {
12091            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12092            None => local_var_key,
12093        };
12094        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12095    };
12096    local_var_req_builder = local_var_req_builder.json(&search_request);
12097
12098    let local_var_req = local_var_req_builder.build()?;
12099    let local_var_resp = local_var_client.execute(local_var_req).await?;
12100
12101    let local_var_status = local_var_resp.status();
12102
12103    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12104        let local_var_content = local_var_resp.text().await?;
12105        serde_json::from_str(&local_var_content).map_err(Error::from)
12106    } else {
12107        let local_var_content = local_var_resp.text().await?;
12108        let local_var_entity: Option<SearchUsersByQueryWithIdError> = serde_json::from_str(&local_var_content).ok();
12109        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12110        Err(Error::ResponseError(local_var_error))
12111    }
12112}
12113
12114/// Searches the webhook event logs with the specified criteria and pagination.
12115pub async fn search_webhook_event_logs_with_id(configuration: &configuration::Configuration, webhook_event_log_search_request: Option<models::WebhookEventLogSearchRequest>) -> Result<models::WebhookEventLogSearchResponse, Error<SearchWebhookEventLogsWithIdError>> {
12116    let local_var_configuration = configuration;
12117
12118    let local_var_client = &local_var_configuration.client;
12119
12120    let local_var_uri_str = format!("{}/api/system/webhook-event-log/search", local_var_configuration.base_path);
12121    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
12122
12123    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12124        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12125    }
12126    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12127        let local_var_key = local_var_apikey.key.clone();
12128        let local_var_value = match local_var_apikey.prefix {
12129            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12130            None => local_var_key,
12131        };
12132        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12133    };
12134    local_var_req_builder = local_var_req_builder.json(&webhook_event_log_search_request);
12135
12136    let local_var_req = local_var_req_builder.build()?;
12137    let local_var_resp = local_var_client.execute(local_var_req).await?;
12138
12139    let local_var_status = local_var_resp.status();
12140
12141    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12142        let local_var_content = local_var_resp.text().await?;
12143        serde_json::from_str(&local_var_content).map_err(Error::from)
12144    } else {
12145        let local_var_content = local_var_resp.text().await?;
12146        let local_var_entity: Option<SearchWebhookEventLogsWithIdError> = serde_json::from_str(&local_var_content).ok();
12147        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12148        Err(Error::ResponseError(local_var_error))
12149    }
12150}
12151
12152/// Searches webhooks with the specified criteria and pagination.
12153pub async fn search_webhooks_with_id(configuration: &configuration::Configuration, webhook_search_request: Option<models::WebhookSearchRequest>) -> Result<models::WebhookSearchResponse, Error<SearchWebhooksWithIdError>> {
12154    let local_var_configuration = configuration;
12155
12156    let local_var_client = &local_var_configuration.client;
12157
12158    let local_var_uri_str = format!("{}/api/webhook/search", local_var_configuration.base_path);
12159    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
12160
12161    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12162        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12163    }
12164    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12165        let local_var_key = local_var_apikey.key.clone();
12166        let local_var_value = match local_var_apikey.prefix {
12167            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12168            None => local_var_key,
12169        };
12170        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12171    };
12172    local_var_req_builder = local_var_req_builder.json(&webhook_search_request);
12173
12174    let local_var_req = local_var_req_builder.build()?;
12175    let local_var_resp = local_var_client.execute(local_var_req).await?;
12176
12177    let local_var_status = local_var_resp.status();
12178
12179    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12180        let local_var_content = local_var_resp.text().await?;
12181        serde_json::from_str(&local_var_content).map_err(Error::from)
12182    } else {
12183        let local_var_content = local_var_resp.text().await?;
12184        let local_var_entity: Option<SearchWebhooksWithIdError> = serde_json::from_str(&local_var_content).ok();
12185        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12186        Err(Error::ResponseError(local_var_error))
12187    }
12188}
12189
12190/// Send an email using an email template id. You can optionally provide <code>requestData</code> to access key value pairs in the email template.
12191pub async fn send_email_with_id(configuration: &configuration::Configuration, email_template_id: &str, send_request: Option<models::SendRequest>) -> Result<models::SendResponse, Error<SendEmailWithIdError>> {
12192    let local_var_configuration = configuration;
12193
12194    let local_var_client = &local_var_configuration.client;
12195
12196    let local_var_uri_str = format!("{}/api/email/send/{emailTemplateId}", local_var_configuration.base_path, emailTemplateId=crate::apis::urlencode(email_template_id));
12197    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
12198
12199    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12200        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12201    }
12202    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12203        let local_var_key = local_var_apikey.key.clone();
12204        let local_var_value = match local_var_apikey.prefix {
12205            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12206            None => local_var_key,
12207        };
12208        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12209    };
12210    local_var_req_builder = local_var_req_builder.json(&send_request);
12211
12212    let local_var_req = local_var_req_builder.build()?;
12213    let local_var_resp = local_var_client.execute(local_var_req).await?;
12214
12215    let local_var_status = local_var_resp.status();
12216
12217    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12218        let local_var_content = local_var_resp.text().await?;
12219        serde_json::from_str(&local_var_content).map_err(Error::from)
12220    } else {
12221        let local_var_content = local_var_resp.text().await?;
12222        let local_var_entity: Option<SendEmailWithIdError> = serde_json::from_str(&local_var_content).ok();
12223        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12224        Err(Error::ResponseError(local_var_error))
12225    }
12226}
12227
12228/// Sends out an email to a parent that they need to register and create a family or need to log in and add a child to their existing family.
12229pub async fn send_family_request_email_with_id(configuration: &configuration::Configuration, family_email_request: Option<models::FamilyEmailRequest>) -> Result<(), Error<SendFamilyRequestEmailWithIdError>> {
12230    let local_var_configuration = configuration;
12231
12232    let local_var_client = &local_var_configuration.client;
12233
12234    let local_var_uri_str = format!("{}/api/user/family/request", local_var_configuration.base_path);
12235    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
12236
12237    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12238        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12239    }
12240    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12241        let local_var_key = local_var_apikey.key.clone();
12242        let local_var_value = match local_var_apikey.prefix {
12243            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12244            None => local_var_key,
12245        };
12246        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12247    };
12248    local_var_req_builder = local_var_req_builder.json(&family_email_request);
12249
12250    let local_var_req = local_var_req_builder.build()?;
12251    let local_var_resp = local_var_client.execute(local_var_req).await?;
12252
12253    let local_var_status = local_var_resp.status();
12254
12255    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12256        Ok(())
12257    } else {
12258        let local_var_content = local_var_resp.text().await?;
12259        let local_var_entity: Option<SendFamilyRequestEmailWithIdError> = serde_json::from_str(&local_var_content).ok();
12260        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12261        Err(Error::ResponseError(local_var_error))
12262    }
12263}
12264
12265/// Send a passwordless authentication code in an email to complete login.
12266pub async fn send_passwordless_code_with_id(configuration: &configuration::Configuration, passwordless_send_request: Option<models::PasswordlessSendRequest>) -> Result<(), Error<SendPasswordlessCodeWithIdError>> {
12267    let local_var_configuration = configuration;
12268
12269    let local_var_client = &local_var_configuration.client;
12270
12271    let local_var_uri_str = format!("{}/api/passwordless/send", local_var_configuration.base_path);
12272    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
12273
12274    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12275        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12276    }
12277    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12278        let local_var_key = local_var_apikey.key.clone();
12279        let local_var_value = match local_var_apikey.prefix {
12280            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12281            None => local_var_key,
12282        };
12283        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12284    };
12285    local_var_req_builder = local_var_req_builder.json(&passwordless_send_request);
12286
12287    let local_var_req = local_var_req_builder.build()?;
12288    let local_var_resp = local_var_client.execute(local_var_req).await?;
12289
12290    let local_var_status = local_var_resp.status();
12291
12292    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12293        Ok(())
12294    } else {
12295        let local_var_content = local_var_resp.text().await?;
12296        let local_var_entity: Option<SendPasswordlessCodeWithIdError> = serde_json::from_str(&local_var_content).ok();
12297        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12298        Err(Error::ResponseError(local_var_error))
12299    }
12300}
12301
12302/// Send a Two Factor authentication code to assist in setting up Two Factor authentication or disabling.
12303pub async fn send_two_factor_code_for_enable_disable_with_id(configuration: &configuration::Configuration, two_factor_send_request: Option<models::TwoFactorSendRequest>) -> Result<(), Error<SendTwoFactorCodeForEnableDisableWithIdError>> {
12304    let local_var_configuration = configuration;
12305
12306    let local_var_client = &local_var_configuration.client;
12307
12308    let local_var_uri_str = format!("{}/api/two-factor/send", local_var_configuration.base_path);
12309    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
12310
12311    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12312        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12313    }
12314    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12315        let local_var_key = local_var_apikey.key.clone();
12316        let local_var_value = match local_var_apikey.prefix {
12317            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12318            None => local_var_key,
12319        };
12320        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12321    };
12322    local_var_req_builder = local_var_req_builder.json(&two_factor_send_request);
12323
12324    let local_var_req = local_var_req_builder.build()?;
12325    let local_var_resp = local_var_client.execute(local_var_req).await?;
12326
12327    let local_var_status = local_var_resp.status();
12328
12329    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12330        Ok(())
12331    } else {
12332        let local_var_content = local_var_resp.text().await?;
12333        let local_var_entity: Option<SendTwoFactorCodeForEnableDisableWithIdError> = serde_json::from_str(&local_var_content).ok();
12334        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12335        Err(Error::ResponseError(local_var_error))
12336    }
12337}
12338
12339/// Send a Two Factor authentication code to allow the completion of Two Factor authentication.
12340pub async fn send_two_factor_code_for_login_using_method_with_id(configuration: &configuration::Configuration, two_factor_id: &str, two_factor_send_request: Option<models::TwoFactorSendRequest>) -> Result<(), Error<SendTwoFactorCodeForLoginUsingMethodWithIdError>> {
12341    let local_var_configuration = configuration;
12342
12343    let local_var_client = &local_var_configuration.client;
12344
12345    let local_var_uri_str = format!("{}/api/two-factor/send/{twoFactorId}", local_var_configuration.base_path, twoFactorId=crate::apis::urlencode(two_factor_id));
12346    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
12347
12348    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12349        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12350    }
12351    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12352        let local_var_key = local_var_apikey.key.clone();
12353        let local_var_value = match local_var_apikey.prefix {
12354            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12355            None => local_var_key,
12356        };
12357        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12358    };
12359    local_var_req_builder = local_var_req_builder.json(&two_factor_send_request);
12360
12361    let local_var_req = local_var_req_builder.build()?;
12362    let local_var_resp = local_var_client.execute(local_var_req).await?;
12363
12364    let local_var_status = local_var_resp.status();
12365
12366    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12367        Ok(())
12368    } else {
12369        let local_var_content = local_var_resp.text().await?;
12370        let local_var_entity: Option<SendTwoFactorCodeForLoginUsingMethodWithIdError> = serde_json::from_str(&local_var_content).ok();
12371        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12372        Err(Error::ResponseError(local_var_error))
12373    }
12374}
12375
12376/// Begins a login request for a 3rd party login that requires user interaction such as HYPR.
12377pub async fn start_identity_provider_login_with_id(configuration: &configuration::Configuration, identity_provider_start_login_request: Option<models::IdentityProviderStartLoginRequest>) -> Result<models::IdentityProviderStartLoginResponse, Error<StartIdentityProviderLoginWithIdError>> {
12378    let local_var_configuration = configuration;
12379
12380    let local_var_client = &local_var_configuration.client;
12381
12382    let local_var_uri_str = format!("{}/api/identity-provider/start", local_var_configuration.base_path);
12383    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
12384
12385    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12386        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12387    }
12388    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12389        let local_var_key = local_var_apikey.key.clone();
12390        let local_var_value = match local_var_apikey.prefix {
12391            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12392            None => local_var_key,
12393        };
12394        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12395    };
12396    local_var_req_builder = local_var_req_builder.json(&identity_provider_start_login_request);
12397
12398    let local_var_req = local_var_req_builder.build()?;
12399    let local_var_resp = local_var_client.execute(local_var_req).await?;
12400
12401    let local_var_status = local_var_resp.status();
12402
12403    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12404        let local_var_content = local_var_resp.text().await?;
12405        serde_json::from_str(&local_var_content).map_err(Error::from)
12406    } else {
12407        let local_var_content = local_var_resp.text().await?;
12408        let local_var_entity: Option<StartIdentityProviderLoginWithIdError> = serde_json::from_str(&local_var_content).ok();
12409        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12410        Err(Error::ResponseError(local_var_error))
12411    }
12412}
12413
12414/// Start a passwordless login request by generating a passwordless code. This code can be sent to the User using the Send Passwordless Code API or using a mechanism outside of FusionAuth. The passwordless login is completed by using the Passwordless Login API with this code.
12415pub async fn start_passwordless_login_with_id(configuration: &configuration::Configuration, passwordless_start_request: Option<models::PasswordlessStartRequest>) -> Result<models::PasswordlessStartResponse, Error<StartPasswordlessLoginWithIdError>> {
12416    let local_var_configuration = configuration;
12417
12418    let local_var_client = &local_var_configuration.client;
12419
12420    let local_var_uri_str = format!("{}/api/passwordless/start", local_var_configuration.base_path);
12421    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
12422
12423    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12424        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12425    }
12426    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12427        let local_var_key = local_var_apikey.key.clone();
12428        let local_var_value = match local_var_apikey.prefix {
12429            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12430            None => local_var_key,
12431        };
12432        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12433    };
12434    local_var_req_builder = local_var_req_builder.json(&passwordless_start_request);
12435
12436    let local_var_req = local_var_req_builder.build()?;
12437    let local_var_resp = local_var_client.execute(local_var_req).await?;
12438
12439    let local_var_status = local_var_resp.status();
12440
12441    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12442        let local_var_content = local_var_resp.text().await?;
12443        serde_json::from_str(&local_var_content).map_err(Error::from)
12444    } else {
12445        let local_var_content = local_var_resp.text().await?;
12446        let local_var_entity: Option<StartPasswordlessLoginWithIdError> = serde_json::from_str(&local_var_content).ok();
12447        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12448        Err(Error::ResponseError(local_var_error))
12449    }
12450}
12451
12452/// Start a Two-Factor login request by generating a two-factor identifier. This code can then be sent to the Two Factor Send  API (/api/two-factor/send)in order to send a one-time use code to a user. You can also use one-time use code returned  to send the code out-of-band. The Two-Factor login is completed by making a request to the Two-Factor Login  API (/api/two-factor/login). with the two-factor identifier and the one-time use code.  This API is intended to allow you to begin a Two-Factor login outside a normal login that originated from the Login API (/api/login).
12453pub async fn start_two_factor_login_with_id(configuration: &configuration::Configuration, two_factor_start_request: Option<models::TwoFactorStartRequest>) -> Result<models::TwoFactorStartResponse, Error<StartTwoFactorLoginWithIdError>> {
12454    let local_var_configuration = configuration;
12455
12456    let local_var_client = &local_var_configuration.client;
12457
12458    let local_var_uri_str = format!("{}/api/two-factor/start", local_var_configuration.base_path);
12459    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
12460
12461    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12462        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12463    }
12464    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12465        let local_var_key = local_var_apikey.key.clone();
12466        let local_var_value = match local_var_apikey.prefix {
12467            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12468            None => local_var_key,
12469        };
12470        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12471    };
12472    local_var_req_builder = local_var_req_builder.json(&two_factor_start_request);
12473
12474    let local_var_req = local_var_req_builder.build()?;
12475    let local_var_resp = local_var_client.execute(local_var_req).await?;
12476
12477    let local_var_status = local_var_resp.status();
12478
12479    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12480        let local_var_content = local_var_resp.text().await?;
12481        serde_json::from_str(&local_var_content).map_err(Error::from)
12482    } else {
12483        let local_var_content = local_var_resp.text().await?;
12484        let local_var_entity: Option<StartTwoFactorLoginWithIdError> = serde_json::from_str(&local_var_content).ok();
12485        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12486        Err(Error::ResponseError(local_var_error))
12487    }
12488}
12489
12490/// Start a WebAuthn authentication ceremony by generating a new challenge for the user
12491pub async fn start_web_authn_login_with_id(configuration: &configuration::Configuration, web_authn_start_request: Option<models::WebAuthnStartRequest>) -> Result<models::WebAuthnStartResponse, Error<StartWebAuthnLoginWithIdError>> {
12492    let local_var_configuration = configuration;
12493
12494    let local_var_client = &local_var_configuration.client;
12495
12496    let local_var_uri_str = format!("{}/api/webauthn/start", local_var_configuration.base_path);
12497    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
12498
12499    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12500        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12501    }
12502    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12503        let local_var_key = local_var_apikey.key.clone();
12504        let local_var_value = match local_var_apikey.prefix {
12505            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12506            None => local_var_key,
12507        };
12508        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12509    };
12510    local_var_req_builder = local_var_req_builder.json(&web_authn_start_request);
12511
12512    let local_var_req = local_var_req_builder.build()?;
12513    let local_var_resp = local_var_client.execute(local_var_req).await?;
12514
12515    let local_var_status = local_var_resp.status();
12516
12517    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12518        let local_var_content = local_var_resp.text().await?;
12519        serde_json::from_str(&local_var_content).map_err(Error::from)
12520    } else {
12521        let local_var_content = local_var_resp.text().await?;
12522        let local_var_entity: Option<StartWebAuthnLoginWithIdError> = serde_json::from_str(&local_var_content).ok();
12523        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12524        Err(Error::ResponseError(local_var_error))
12525    }
12526}
12527
12528/// Start a WebAuthn registration ceremony by generating a new challenge for the user
12529pub async fn start_web_authn_registration_with_id(configuration: &configuration::Configuration, web_authn_register_start_request: Option<models::WebAuthnRegisterStartRequest>) -> Result<models::WebAuthnRegisterStartResponse, Error<StartWebAuthnRegistrationWithIdError>> {
12530    let local_var_configuration = configuration;
12531
12532    let local_var_client = &local_var_configuration.client;
12533
12534    let local_var_uri_str = format!("{}/api/webauthn/register/start", local_var_configuration.base_path);
12535    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
12536
12537    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12538        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12539    }
12540    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12541        let local_var_key = local_var_apikey.key.clone();
12542        let local_var_value = match local_var_apikey.prefix {
12543            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12544            None => local_var_key,
12545        };
12546        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12547    };
12548    local_var_req_builder = local_var_req_builder.json(&web_authn_register_start_request);
12549
12550    let local_var_req = local_var_req_builder.build()?;
12551    let local_var_resp = local_var_client.execute(local_var_req).await?;
12552
12553    let local_var_status = local_var_resp.status();
12554
12555    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12556        let local_var_content = local_var_resp.text().await?;
12557        serde_json::from_str(&local_var_content).map_err(Error::from)
12558    } else {
12559        let local_var_content = local_var_resp.text().await?;
12560        let local_var_entity: Option<StartWebAuthnRegistrationWithIdError> = serde_json::from_str(&local_var_content).ok();
12561        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12562        Err(Error::ResponseError(local_var_error))
12563    }
12564}
12565
12566/// Complete login using a 2FA challenge
12567pub async fn two_factor_login_with_id(configuration: &configuration::Configuration, two_factor_login_request: Option<models::TwoFactorLoginRequest>) -> Result<models::LoginResponse, Error<TwoFactorLoginWithIdError>> {
12568    let local_var_configuration = configuration;
12569
12570    let local_var_client = &local_var_configuration.client;
12571
12572    let local_var_uri_str = format!("{}/api/two-factor/login", local_var_configuration.base_path);
12573    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
12574
12575    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12576        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12577    }
12578    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12579        let local_var_key = local_var_apikey.key.clone();
12580        let local_var_value = match local_var_apikey.prefix {
12581            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12582            None => local_var_key,
12583        };
12584        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12585    };
12586    local_var_req_builder = local_var_req_builder.json(&two_factor_login_request);
12587
12588    let local_var_req = local_var_req_builder.build()?;
12589    let local_var_resp = local_var_client.execute(local_var_req).await?;
12590
12591    let local_var_status = local_var_resp.status();
12592
12593    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12594        let local_var_content = local_var_resp.text().await?;
12595        serde_json::from_str(&local_var_content).map_err(Error::from)
12596    } else {
12597        let local_var_content = local_var_resp.text().await?;
12598        let local_var_entity: Option<TwoFactorLoginWithIdError> = serde_json::from_str(&local_var_content).ok();
12599        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12600        Err(Error::ResponseError(local_var_error))
12601    }
12602}
12603
12604/// Updates an API key by given id
12605pub async fn update_api_key_with_id(configuration: &configuration::Configuration, api_key_id: &str, api_key_request: Option<models::ApiKeyRequest>) -> Result<models::ApiKeyResponse, Error<UpdateApiKeyWithIdError>> {
12606    let local_var_configuration = configuration;
12607
12608    let local_var_client = &local_var_configuration.client;
12609
12610    let local_var_uri_str = format!("{}/api/api-key/{apiKeyId}", local_var_configuration.base_path, apiKeyId=crate::apis::urlencode(api_key_id));
12611    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
12612
12613    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12614        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12615    }
12616    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12617        let local_var_key = local_var_apikey.key.clone();
12618        let local_var_value = match local_var_apikey.prefix {
12619            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12620            None => local_var_key,
12621        };
12622        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12623    };
12624    local_var_req_builder = local_var_req_builder.json(&api_key_request);
12625
12626    let local_var_req = local_var_req_builder.build()?;
12627    let local_var_resp = local_var_client.execute(local_var_req).await?;
12628
12629    let local_var_status = local_var_resp.status();
12630
12631    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12632        let local_var_content = local_var_resp.text().await?;
12633        serde_json::from_str(&local_var_content).map_err(Error::from)
12634    } else {
12635        let local_var_content = local_var_resp.text().await?;
12636        let local_var_entity: Option<UpdateApiKeyWithIdError> = serde_json::from_str(&local_var_content).ok();
12637        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12638        Err(Error::ResponseError(local_var_error))
12639    }
12640}
12641
12642/// Updates the application role with the given Id for the application.
12643pub async fn update_application_role_with_id(configuration: &configuration::Configuration, application_id: &str, role_id: &str, x_fusion_auth_tenant_id: Option<&str>, application_request: Option<models::ApplicationRequest>) -> Result<models::ApplicationResponse, Error<UpdateApplicationRoleWithIdError>> {
12644    let local_var_configuration = configuration;
12645
12646    let local_var_client = &local_var_configuration.client;
12647
12648    let local_var_uri_str = format!("{}/api/application/{applicationId}/role/{roleId}", local_var_configuration.base_path, applicationId=crate::apis::urlencode(application_id), roleId=crate::apis::urlencode(role_id));
12649    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
12650
12651    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12652        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12653    }
12654    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
12655        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
12656    }
12657    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12658        let local_var_key = local_var_apikey.key.clone();
12659        let local_var_value = match local_var_apikey.prefix {
12660            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12661            None => local_var_key,
12662        };
12663        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12664    };
12665    local_var_req_builder = local_var_req_builder.json(&application_request);
12666
12667    let local_var_req = local_var_req_builder.build()?;
12668    let local_var_resp = local_var_client.execute(local_var_req).await?;
12669
12670    let local_var_status = local_var_resp.status();
12671
12672    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12673        let local_var_content = local_var_resp.text().await?;
12674        serde_json::from_str(&local_var_content).map_err(Error::from)
12675    } else {
12676        let local_var_content = local_var_resp.text().await?;
12677        let local_var_entity: Option<UpdateApplicationRoleWithIdError> = serde_json::from_str(&local_var_content).ok();
12678        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12679        Err(Error::ResponseError(local_var_error))
12680    }
12681}
12682
12683/// Reactivates the application with the given Id. OR Updates the application with the given Id.
12684pub async fn update_application_with_id(configuration: &configuration::Configuration, application_id: &str, reactivate: Option<&str>, x_fusion_auth_tenant_id: Option<&str>, application_request: Option<models::ApplicationRequest>) -> Result<models::ApplicationResponse, Error<UpdateApplicationWithIdError>> {
12685    let local_var_configuration = configuration;
12686
12687    let local_var_client = &local_var_configuration.client;
12688
12689    let local_var_uri_str = format!("{}/api/application/{applicationId}", local_var_configuration.base_path, applicationId=crate::apis::urlencode(application_id));
12690    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
12691
12692    if let Some(ref local_var_str) = reactivate {
12693        local_var_req_builder = local_var_req_builder.query(&[("reactivate", &local_var_str.to_string())]);
12694    }
12695    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12696        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12697    }
12698    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
12699        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
12700    }
12701    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12702        let local_var_key = local_var_apikey.key.clone();
12703        let local_var_value = match local_var_apikey.prefix {
12704            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12705            None => local_var_key,
12706        };
12707        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12708    };
12709    local_var_req_builder = local_var_req_builder.json(&application_request);
12710
12711    let local_var_req = local_var_req_builder.build()?;
12712    let local_var_resp = local_var_client.execute(local_var_req).await?;
12713
12714    let local_var_status = local_var_resp.status();
12715
12716    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12717        let local_var_content = local_var_resp.text().await?;
12718        serde_json::from_str(&local_var_content).map_err(Error::from)
12719    } else {
12720        let local_var_content = local_var_resp.text().await?;
12721        let local_var_entity: Option<UpdateApplicationWithIdError> = serde_json::from_str(&local_var_content).ok();
12722        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12723        Err(Error::ResponseError(local_var_error))
12724    }
12725}
12726
12727/// Updates the connector with the given Id.
12728pub async fn update_connector_with_id(configuration: &configuration::Configuration, connector_id: &str, connector_request: Option<models::ConnectorRequest>) -> Result<models::ConnectorResponse, Error<UpdateConnectorWithIdError>> {
12729    let local_var_configuration = configuration;
12730
12731    let local_var_client = &local_var_configuration.client;
12732
12733    let local_var_uri_str = format!("{}/api/connector/{connectorId}", local_var_configuration.base_path, connectorId=crate::apis::urlencode(connector_id));
12734    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
12735
12736    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12737        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12738    }
12739    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12740        let local_var_key = local_var_apikey.key.clone();
12741        let local_var_value = match local_var_apikey.prefix {
12742            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12743            None => local_var_key,
12744        };
12745        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12746    };
12747    local_var_req_builder = local_var_req_builder.json(&connector_request);
12748
12749    let local_var_req = local_var_req_builder.build()?;
12750    let local_var_resp = local_var_client.execute(local_var_req).await?;
12751
12752    let local_var_status = local_var_resp.status();
12753
12754    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12755        let local_var_content = local_var_resp.text().await?;
12756        serde_json::from_str(&local_var_content).map_err(Error::from)
12757    } else {
12758        let local_var_content = local_var_resp.text().await?;
12759        let local_var_entity: Option<UpdateConnectorWithIdError> = serde_json::from_str(&local_var_content).ok();
12760        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12761        Err(Error::ResponseError(local_var_error))
12762    }
12763}
12764
12765/// Updates the consent with the given Id.
12766pub async fn update_consent_with_id(configuration: &configuration::Configuration, consent_id: &str, x_fusion_auth_tenant_id: Option<&str>, consent_request: Option<models::ConsentRequest>) -> Result<models::ConsentResponse, Error<UpdateConsentWithIdError>> {
12767    let local_var_configuration = configuration;
12768
12769    let local_var_client = &local_var_configuration.client;
12770
12771    let local_var_uri_str = format!("{}/api/consent/{consentId}", local_var_configuration.base_path, consentId=crate::apis::urlencode(consent_id));
12772    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
12773
12774    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12775        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12776    }
12777    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
12778        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
12779    }
12780    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12781        let local_var_key = local_var_apikey.key.clone();
12782        let local_var_value = match local_var_apikey.prefix {
12783            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12784            None => local_var_key,
12785        };
12786        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12787    };
12788    local_var_req_builder = local_var_req_builder.json(&consent_request);
12789
12790    let local_var_req = local_var_req_builder.build()?;
12791    let local_var_resp = local_var_client.execute(local_var_req).await?;
12792
12793    let local_var_status = local_var_resp.status();
12794
12795    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12796        let local_var_content = local_var_resp.text().await?;
12797        serde_json::from_str(&local_var_content).map_err(Error::from)
12798    } else {
12799        let local_var_content = local_var_resp.text().await?;
12800        let local_var_entity: Option<UpdateConsentWithIdError> = serde_json::from_str(&local_var_content).ok();
12801        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12802        Err(Error::ResponseError(local_var_error))
12803    }
12804}
12805
12806/// Updates the email template with the given Id.
12807pub async fn update_email_template_with_id(configuration: &configuration::Configuration, email_template_id: &str, x_fusion_auth_tenant_id: Option<&str>, email_template_request: Option<models::EmailTemplateRequest>) -> Result<models::EmailTemplateResponse, Error<UpdateEmailTemplateWithIdError>> {
12808    let local_var_configuration = configuration;
12809
12810    let local_var_client = &local_var_configuration.client;
12811
12812    let local_var_uri_str = format!("{}/api/email/template/{emailTemplateId}", local_var_configuration.base_path, emailTemplateId=crate::apis::urlencode(email_template_id));
12813    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
12814
12815    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12816        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12817    }
12818    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
12819        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
12820    }
12821    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12822        let local_var_key = local_var_apikey.key.clone();
12823        let local_var_value = match local_var_apikey.prefix {
12824            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12825            None => local_var_key,
12826        };
12827        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12828    };
12829    local_var_req_builder = local_var_req_builder.json(&email_template_request);
12830
12831    let local_var_req = local_var_req_builder.build()?;
12832    let local_var_resp = local_var_client.execute(local_var_req).await?;
12833
12834    let local_var_status = local_var_resp.status();
12835
12836    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12837        let local_var_content = local_var_resp.text().await?;
12838        serde_json::from_str(&local_var_content).map_err(Error::from)
12839    } else {
12840        let local_var_content = local_var_resp.text().await?;
12841        let local_var_entity: Option<UpdateEmailTemplateWithIdError> = serde_json::from_str(&local_var_content).ok();
12842        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12843        Err(Error::ResponseError(local_var_error))
12844    }
12845}
12846
12847/// Updates the permission with the given Id for the entity type.
12848pub async fn update_entity_type_permission_with_id(configuration: &configuration::Configuration, entity_type_id: &str, permission_id: &str, entity_type_request: Option<models::EntityTypeRequest>) -> Result<models::EntityTypeResponse, Error<UpdateEntityTypePermissionWithIdError>> {
12849    let local_var_configuration = configuration;
12850
12851    let local_var_client = &local_var_configuration.client;
12852
12853    let local_var_uri_str = format!("{}/api/entity/type/{entityTypeId}/permission/{permissionId}", local_var_configuration.base_path, entityTypeId=crate::apis::urlencode(entity_type_id), permissionId=crate::apis::urlencode(permission_id));
12854    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
12855
12856    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12857        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12858    }
12859    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12860        let local_var_key = local_var_apikey.key.clone();
12861        let local_var_value = match local_var_apikey.prefix {
12862            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12863            None => local_var_key,
12864        };
12865        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12866    };
12867    local_var_req_builder = local_var_req_builder.json(&entity_type_request);
12868
12869    let local_var_req = local_var_req_builder.build()?;
12870    let local_var_resp = local_var_client.execute(local_var_req).await?;
12871
12872    let local_var_status = local_var_resp.status();
12873
12874    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12875        let local_var_content = local_var_resp.text().await?;
12876        serde_json::from_str(&local_var_content).map_err(Error::from)
12877    } else {
12878        let local_var_content = local_var_resp.text().await?;
12879        let local_var_entity: Option<UpdateEntityTypePermissionWithIdError> = serde_json::from_str(&local_var_content).ok();
12880        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12881        Err(Error::ResponseError(local_var_error))
12882    }
12883}
12884
12885/// Updates the Entity Type with the given Id.
12886pub async fn update_entity_type_with_id(configuration: &configuration::Configuration, entity_type_id: &str, entity_type_request: Option<models::EntityTypeRequest>) -> Result<models::EntityTypeResponse, Error<UpdateEntityTypeWithIdError>> {
12887    let local_var_configuration = configuration;
12888
12889    let local_var_client = &local_var_configuration.client;
12890
12891    let local_var_uri_str = format!("{}/api/entity/type/{entityTypeId}", local_var_configuration.base_path, entityTypeId=crate::apis::urlencode(entity_type_id));
12892    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
12893
12894    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12895        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12896    }
12897    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12898        let local_var_key = local_var_apikey.key.clone();
12899        let local_var_value = match local_var_apikey.prefix {
12900            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12901            None => local_var_key,
12902        };
12903        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12904    };
12905    local_var_req_builder = local_var_req_builder.json(&entity_type_request);
12906
12907    let local_var_req = local_var_req_builder.build()?;
12908    let local_var_resp = local_var_client.execute(local_var_req).await?;
12909
12910    let local_var_status = local_var_resp.status();
12911
12912    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12913        let local_var_content = local_var_resp.text().await?;
12914        serde_json::from_str(&local_var_content).map_err(Error::from)
12915    } else {
12916        let local_var_content = local_var_resp.text().await?;
12917        let local_var_entity: Option<UpdateEntityTypeWithIdError> = serde_json::from_str(&local_var_content).ok();
12918        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12919        Err(Error::ResponseError(local_var_error))
12920    }
12921}
12922
12923/// Updates the Entity with the given Id.
12924pub async fn update_entity_with_id(configuration: &configuration::Configuration, entity_id: &str, x_fusion_auth_tenant_id: Option<&str>, entity_request: Option<models::EntityRequest>) -> Result<models::EntityResponse, Error<UpdateEntityWithIdError>> {
12925    let local_var_configuration = configuration;
12926
12927    let local_var_client = &local_var_configuration.client;
12928
12929    let local_var_uri_str = format!("{}/api/entity/{entityId}", local_var_configuration.base_path, entityId=crate::apis::urlencode(entity_id));
12930    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
12931
12932    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12933        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12934    }
12935    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
12936        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
12937    }
12938    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12939        let local_var_key = local_var_apikey.key.clone();
12940        let local_var_value = match local_var_apikey.prefix {
12941            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12942            None => local_var_key,
12943        };
12944        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12945    };
12946    local_var_req_builder = local_var_req_builder.json(&entity_request);
12947
12948    let local_var_req = local_var_req_builder.build()?;
12949    let local_var_resp = local_var_client.execute(local_var_req).await?;
12950
12951    let local_var_status = local_var_resp.status();
12952
12953    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12954        let local_var_content = local_var_resp.text().await?;
12955        serde_json::from_str(&local_var_content).map_err(Error::from)
12956    } else {
12957        let local_var_content = local_var_resp.text().await?;
12958        let local_var_entity: Option<UpdateEntityWithIdError> = serde_json::from_str(&local_var_content).ok();
12959        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12960        Err(Error::ResponseError(local_var_error))
12961    }
12962}
12963
12964/// Updates the form field with the given Id.
12965pub async fn update_form_field_with_id(configuration: &configuration::Configuration, field_id: &str, form_field_request: Option<models::FormFieldRequest>) -> Result<models::FormFieldResponse, Error<UpdateFormFieldWithIdError>> {
12966    let local_var_configuration = configuration;
12967
12968    let local_var_client = &local_var_configuration.client;
12969
12970    let local_var_uri_str = format!("{}/api/form/field/{fieldId}", local_var_configuration.base_path, fieldId=crate::apis::urlencode(field_id));
12971    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
12972
12973    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
12974        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
12975    }
12976    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
12977        let local_var_key = local_var_apikey.key.clone();
12978        let local_var_value = match local_var_apikey.prefix {
12979            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
12980            None => local_var_key,
12981        };
12982        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
12983    };
12984    local_var_req_builder = local_var_req_builder.json(&form_field_request);
12985
12986    let local_var_req = local_var_req_builder.build()?;
12987    let local_var_resp = local_var_client.execute(local_var_req).await?;
12988
12989    let local_var_status = local_var_resp.status();
12990
12991    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
12992        let local_var_content = local_var_resp.text().await?;
12993        serde_json::from_str(&local_var_content).map_err(Error::from)
12994    } else {
12995        let local_var_content = local_var_resp.text().await?;
12996        let local_var_entity: Option<UpdateFormFieldWithIdError> = serde_json::from_str(&local_var_content).ok();
12997        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
12998        Err(Error::ResponseError(local_var_error))
12999    }
13000}
13001
13002/// Updates the form with the given Id.
13003pub async fn update_form_with_id(configuration: &configuration::Configuration, form_id: &str, form_request: Option<models::FormRequest>) -> Result<models::FormResponse, Error<UpdateFormWithIdError>> {
13004    let local_var_configuration = configuration;
13005
13006    let local_var_client = &local_var_configuration.client;
13007
13008    let local_var_uri_str = format!("{}/api/form/{formId}", local_var_configuration.base_path, formId=crate::apis::urlencode(form_id));
13009    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
13010
13011    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13012        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13013    }
13014    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13015        let local_var_key = local_var_apikey.key.clone();
13016        let local_var_value = match local_var_apikey.prefix {
13017            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13018            None => local_var_key,
13019        };
13020        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13021    };
13022    local_var_req_builder = local_var_req_builder.json(&form_request);
13023
13024    let local_var_req = local_var_req_builder.build()?;
13025    let local_var_resp = local_var_client.execute(local_var_req).await?;
13026
13027    let local_var_status = local_var_resp.status();
13028
13029    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13030        let local_var_content = local_var_resp.text().await?;
13031        serde_json::from_str(&local_var_content).map_err(Error::from)
13032    } else {
13033        let local_var_content = local_var_resp.text().await?;
13034        let local_var_entity: Option<UpdateFormWithIdError> = serde_json::from_str(&local_var_content).ok();
13035        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13036        Err(Error::ResponseError(local_var_error))
13037    }
13038}
13039
13040/// Creates a member in a group.
13041pub async fn update_group_members_with_id(configuration: &configuration::Configuration, member_request: Option<models::MemberRequest>) -> Result<models::MemberResponse, Error<UpdateGroupMembersWithIdError>> {
13042    let local_var_configuration = configuration;
13043
13044    let local_var_client = &local_var_configuration.client;
13045
13046    let local_var_uri_str = format!("{}/api/group/member", local_var_configuration.base_path);
13047    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
13048
13049    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13050        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13051    }
13052    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13053        let local_var_key = local_var_apikey.key.clone();
13054        let local_var_value = match local_var_apikey.prefix {
13055            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13056            None => local_var_key,
13057        };
13058        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13059    };
13060    local_var_req_builder = local_var_req_builder.json(&member_request);
13061
13062    let local_var_req = local_var_req_builder.build()?;
13063    let local_var_resp = local_var_client.execute(local_var_req).await?;
13064
13065    let local_var_status = local_var_resp.status();
13066
13067    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13068        let local_var_content = local_var_resp.text().await?;
13069        serde_json::from_str(&local_var_content).map_err(Error::from)
13070    } else {
13071        let local_var_content = local_var_resp.text().await?;
13072        let local_var_entity: Option<UpdateGroupMembersWithIdError> = serde_json::from_str(&local_var_content).ok();
13073        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13074        Err(Error::ResponseError(local_var_error))
13075    }
13076}
13077
13078/// Updates the group with the given Id.
13079pub async fn update_group_with_id(configuration: &configuration::Configuration, group_id: &str, x_fusion_auth_tenant_id: Option<&str>, group_request: Option<models::GroupRequest>) -> Result<models::GroupResponse, Error<UpdateGroupWithIdError>> {
13080    let local_var_configuration = configuration;
13081
13082    let local_var_client = &local_var_configuration.client;
13083
13084    let local_var_uri_str = format!("{}/api/group/{groupId}", local_var_configuration.base_path, groupId=crate::apis::urlencode(group_id));
13085    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
13086
13087    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13088        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13089    }
13090    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
13091        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
13092    }
13093    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13094        let local_var_key = local_var_apikey.key.clone();
13095        let local_var_value = match local_var_apikey.prefix {
13096            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13097            None => local_var_key,
13098        };
13099        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13100    };
13101    local_var_req_builder = local_var_req_builder.json(&group_request);
13102
13103    let local_var_req = local_var_req_builder.build()?;
13104    let local_var_resp = local_var_client.execute(local_var_req).await?;
13105
13106    let local_var_status = local_var_resp.status();
13107
13108    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13109        let local_var_content = local_var_resp.text().await?;
13110        serde_json::from_str(&local_var_content).map_err(Error::from)
13111    } else {
13112        let local_var_content = local_var_resp.text().await?;
13113        let local_var_entity: Option<UpdateGroupWithIdError> = serde_json::from_str(&local_var_content).ok();
13114        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13115        Err(Error::ResponseError(local_var_error))
13116    }
13117}
13118
13119/// Updates the identity provider with the given Id.
13120pub async fn update_identity_provider_with_id(configuration: &configuration::Configuration, identity_provider_id: &str, identity_provider_request: Option<models::IdentityProviderRequest>) -> Result<models::IdentityProviderResponse, Error<UpdateIdentityProviderWithIdError>> {
13121    let local_var_configuration = configuration;
13122
13123    let local_var_client = &local_var_configuration.client;
13124
13125    let local_var_uri_str = format!("{}/api/identity-provider/{identityProviderId}", local_var_configuration.base_path, identityProviderId=crate::apis::urlencode(identity_provider_id));
13126    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
13127
13128    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13129        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13130    }
13131    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13132        let local_var_key = local_var_apikey.key.clone();
13133        let local_var_value = match local_var_apikey.prefix {
13134            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13135            None => local_var_key,
13136        };
13137        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13138    };
13139    local_var_req_builder = local_var_req_builder.json(&identity_provider_request);
13140
13141    let local_var_req = local_var_req_builder.build()?;
13142    let local_var_resp = local_var_client.execute(local_var_req).await?;
13143
13144    let local_var_status = local_var_resp.status();
13145
13146    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13147        let local_var_content = local_var_resp.text().await?;
13148        serde_json::from_str(&local_var_content).map_err(Error::from)
13149    } else {
13150        let local_var_content = local_var_resp.text().await?;
13151        let local_var_entity: Option<UpdateIdentityProviderWithIdError> = serde_json::from_str(&local_var_content).ok();
13152        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13153        Err(Error::ResponseError(local_var_error))
13154    }
13155}
13156
13157/// Updates the available integrations.
13158pub async fn update_integrations_with_id(configuration: &configuration::Configuration, integration_request: Option<models::IntegrationRequest>) -> Result<models::IntegrationResponse, Error<UpdateIntegrationsWithIdError>> {
13159    let local_var_configuration = configuration;
13160
13161    let local_var_client = &local_var_configuration.client;
13162
13163    let local_var_uri_str = format!("{}/api/integration", local_var_configuration.base_path);
13164    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
13165
13166    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13167        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13168    }
13169    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13170        let local_var_key = local_var_apikey.key.clone();
13171        let local_var_value = match local_var_apikey.prefix {
13172            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13173            None => local_var_key,
13174        };
13175        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13176    };
13177    local_var_req_builder = local_var_req_builder.json(&integration_request);
13178
13179    let local_var_req = local_var_req_builder.build()?;
13180    let local_var_resp = local_var_client.execute(local_var_req).await?;
13181
13182    let local_var_status = local_var_resp.status();
13183
13184    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13185        let local_var_content = local_var_resp.text().await?;
13186        serde_json::from_str(&local_var_content).map_err(Error::from)
13187    } else {
13188        let local_var_content = local_var_resp.text().await?;
13189        let local_var_entity: Option<UpdateIntegrationsWithIdError> = serde_json::from_str(&local_var_content).ok();
13190        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13191        Err(Error::ResponseError(local_var_error))
13192    }
13193}
13194
13195/// Updates the IP Access Control List with the given Id.
13196pub async fn update_ip_access_control_list_with_id(configuration: &configuration::Configuration, access_control_list_id: &str, ip_access_control_list_request: Option<models::IpAccessControlListRequest>) -> Result<models::IpAccessControlListResponse, Error<UpdateIpAccessControlListWithIdError>> {
13197    let local_var_configuration = configuration;
13198
13199    let local_var_client = &local_var_configuration.client;
13200
13201    let local_var_uri_str = format!("{}/api/ip-acl/{accessControlListId}", local_var_configuration.base_path, accessControlListId=crate::apis::urlencode(access_control_list_id));
13202    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
13203
13204    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13205        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13206    }
13207    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13208        let local_var_key = local_var_apikey.key.clone();
13209        let local_var_value = match local_var_apikey.prefix {
13210            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13211            None => local_var_key,
13212        };
13213        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13214    };
13215    local_var_req_builder = local_var_req_builder.json(&ip_access_control_list_request);
13216
13217    let local_var_req = local_var_req_builder.build()?;
13218    let local_var_resp = local_var_client.execute(local_var_req).await?;
13219
13220    let local_var_status = local_var_resp.status();
13221
13222    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13223        let local_var_content = local_var_resp.text().await?;
13224        serde_json::from_str(&local_var_content).map_err(Error::from)
13225    } else {
13226        let local_var_content = local_var_resp.text().await?;
13227        let local_var_entity: Option<UpdateIpAccessControlListWithIdError> = serde_json::from_str(&local_var_content).ok();
13228        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13229        Err(Error::ResponseError(local_var_error))
13230    }
13231}
13232
13233/// Updates the key with the given Id.
13234pub async fn update_key_with_id(configuration: &configuration::Configuration, key_id: &str, key_request: Option<models::KeyRequest>) -> Result<models::KeyResponse, Error<UpdateKeyWithIdError>> {
13235    let local_var_configuration = configuration;
13236
13237    let local_var_client = &local_var_configuration.client;
13238
13239    let local_var_uri_str = format!("{}/api/key/{keyId}", local_var_configuration.base_path, keyId=crate::apis::urlencode(key_id));
13240    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
13241
13242    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13243        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13244    }
13245    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13246        let local_var_key = local_var_apikey.key.clone();
13247        let local_var_value = match local_var_apikey.prefix {
13248            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13249            None => local_var_key,
13250        };
13251        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13252    };
13253    local_var_req_builder = local_var_req_builder.json(&key_request);
13254
13255    let local_var_req = local_var_req_builder.build()?;
13256    let local_var_resp = local_var_client.execute(local_var_req).await?;
13257
13258    let local_var_status = local_var_resp.status();
13259
13260    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13261        let local_var_content = local_var_resp.text().await?;
13262        serde_json::from_str(&local_var_content).map_err(Error::from)
13263    } else {
13264        let local_var_content = local_var_resp.text().await?;
13265        let local_var_entity: Option<UpdateKeyWithIdError> = serde_json::from_str(&local_var_content).ok();
13266        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13267        Err(Error::ResponseError(local_var_error))
13268    }
13269}
13270
13271/// Updates the lambda with the given Id.
13272pub async fn update_lambda_with_id(configuration: &configuration::Configuration, lambda_id: &str, lambda_request: Option<models::LambdaRequest>) -> Result<models::LambdaResponse, Error<UpdateLambdaWithIdError>> {
13273    let local_var_configuration = configuration;
13274
13275    let local_var_client = &local_var_configuration.client;
13276
13277    let local_var_uri_str = format!("{}/api/lambda/{lambdaId}", local_var_configuration.base_path, lambdaId=crate::apis::urlencode(lambda_id));
13278    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
13279
13280    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13281        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13282    }
13283    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13284        let local_var_key = local_var_apikey.key.clone();
13285        let local_var_value = match local_var_apikey.prefix {
13286            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13287            None => local_var_key,
13288        };
13289        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13290    };
13291    local_var_req_builder = local_var_req_builder.json(&lambda_request);
13292
13293    let local_var_req = local_var_req_builder.build()?;
13294    let local_var_resp = local_var_client.execute(local_var_req).await?;
13295
13296    let local_var_status = local_var_resp.status();
13297
13298    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13299        let local_var_content = local_var_resp.text().await?;
13300        serde_json::from_str(&local_var_content).map_err(Error::from)
13301    } else {
13302        let local_var_content = local_var_resp.text().await?;
13303        let local_var_entity: Option<UpdateLambdaWithIdError> = serde_json::from_str(&local_var_content).ok();
13304        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13305        Err(Error::ResponseError(local_var_error))
13306    }
13307}
13308
13309/// Updates the message template with the given Id.
13310pub async fn update_message_template_with_id(configuration: &configuration::Configuration, message_template_id: &str, message_template_request: Option<models::MessageTemplateRequest>) -> Result<models::MessageTemplateResponse, Error<UpdateMessageTemplateWithIdError>> {
13311    let local_var_configuration = configuration;
13312
13313    let local_var_client = &local_var_configuration.client;
13314
13315    let local_var_uri_str = format!("{}/api/message/template/{messageTemplateId}", local_var_configuration.base_path, messageTemplateId=crate::apis::urlencode(message_template_id));
13316    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
13317
13318    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13319        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13320    }
13321    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13322        let local_var_key = local_var_apikey.key.clone();
13323        let local_var_value = match local_var_apikey.prefix {
13324            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13325            None => local_var_key,
13326        };
13327        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13328    };
13329    local_var_req_builder = local_var_req_builder.json(&message_template_request);
13330
13331    let local_var_req = local_var_req_builder.build()?;
13332    let local_var_resp = local_var_client.execute(local_var_req).await?;
13333
13334    let local_var_status = local_var_resp.status();
13335
13336    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13337        let local_var_content = local_var_resp.text().await?;
13338        serde_json::from_str(&local_var_content).map_err(Error::from)
13339    } else {
13340        let local_var_content = local_var_resp.text().await?;
13341        let local_var_entity: Option<UpdateMessageTemplateWithIdError> = serde_json::from_str(&local_var_content).ok();
13342        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13343        Err(Error::ResponseError(local_var_error))
13344    }
13345}
13346
13347/// Updates the messenger with the given Id.
13348pub async fn update_messenger_with_id(configuration: &configuration::Configuration, messenger_id: &str, messenger_request: Option<models::MessengerRequest>) -> Result<models::MessengerResponse, Error<UpdateMessengerWithIdError>> {
13349    let local_var_configuration = configuration;
13350
13351    let local_var_client = &local_var_configuration.client;
13352
13353    let local_var_uri_str = format!("{}/api/messenger/{messengerId}", local_var_configuration.base_path, messengerId=crate::apis::urlencode(messenger_id));
13354    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
13355
13356    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13357        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13358    }
13359    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13360        let local_var_key = local_var_apikey.key.clone();
13361        let local_var_value = match local_var_apikey.prefix {
13362            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13363            None => local_var_key,
13364        };
13365        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13366    };
13367    local_var_req_builder = local_var_req_builder.json(&messenger_request);
13368
13369    let local_var_req = local_var_req_builder.build()?;
13370    let local_var_resp = local_var_client.execute(local_var_req).await?;
13371
13372    let local_var_status = local_var_resp.status();
13373
13374    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13375        let local_var_content = local_var_resp.text().await?;
13376        serde_json::from_str(&local_var_content).map_err(Error::from)
13377    } else {
13378        let local_var_content = local_var_resp.text().await?;
13379        let local_var_entity: Option<UpdateMessengerWithIdError> = serde_json::from_str(&local_var_content).ok();
13380        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13381        Err(Error::ResponseError(local_var_error))
13382    }
13383}
13384
13385/// Updates the OAuth scope with the given Id for the application.
13386pub async fn update_o_auth_scope_with_id(configuration: &configuration::Configuration, application_id: &str, scope_id: &str, x_fusion_auth_tenant_id: Option<&str>, application_o_auth_scope_request: Option<models::ApplicationOAuthScopeRequest>) -> Result<models::ApplicationOAuthScopeResponse, Error<UpdateOAuthScopeWithIdError>> {
13387    let local_var_configuration = configuration;
13388
13389    let local_var_client = &local_var_configuration.client;
13390
13391    let local_var_uri_str = format!("{}/api/application/{applicationId}/scope/{scopeId}", local_var_configuration.base_path, applicationId=crate::apis::urlencode(application_id), scopeId=crate::apis::urlencode(scope_id));
13392    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
13393
13394    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13395        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13396    }
13397    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
13398        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
13399    }
13400    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13401        let local_var_key = local_var_apikey.key.clone();
13402        let local_var_value = match local_var_apikey.prefix {
13403            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13404            None => local_var_key,
13405        };
13406        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13407    };
13408    local_var_req_builder = local_var_req_builder.json(&application_o_auth_scope_request);
13409
13410    let local_var_req = local_var_req_builder.build()?;
13411    let local_var_resp = local_var_client.execute(local_var_req).await?;
13412
13413    let local_var_status = local_var_resp.status();
13414
13415    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13416        let local_var_content = local_var_resp.text().await?;
13417        serde_json::from_str(&local_var_content).map_err(Error::from)
13418    } else {
13419        let local_var_content = local_var_resp.text().await?;
13420        let local_var_entity: Option<UpdateOAuthScopeWithIdError> = serde_json::from_str(&local_var_content).ok();
13421        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13422        Err(Error::ResponseError(local_var_error))
13423    }
13424}
13425
13426/// Updates the registration for the user with the given Id and the application defined in the request.
13427pub async fn update_registration_with_id(configuration: &configuration::Configuration, user_id: &str, x_fusion_auth_tenant_id: Option<&str>, registration_request: Option<models::RegistrationRequest>) -> Result<models::RegistrationResponse, Error<UpdateRegistrationWithIdError>> {
13428    let local_var_configuration = configuration;
13429
13430    let local_var_client = &local_var_configuration.client;
13431
13432    let local_var_uri_str = format!("{}/api/user/registration/{userId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id));
13433    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
13434
13435    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13436        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13437    }
13438    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
13439        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
13440    }
13441    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13442        let local_var_key = local_var_apikey.key.clone();
13443        let local_var_value = match local_var_apikey.prefix {
13444            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13445            None => local_var_key,
13446        };
13447        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13448    };
13449    local_var_req_builder = local_var_req_builder.json(&registration_request);
13450
13451    let local_var_req = local_var_req_builder.build()?;
13452    let local_var_resp = local_var_client.execute(local_var_req).await?;
13453
13454    let local_var_status = local_var_resp.status();
13455
13456    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13457        let local_var_content = local_var_resp.text().await?;
13458        serde_json::from_str(&local_var_content).map_err(Error::from)
13459    } else {
13460        let local_var_content = local_var_resp.text().await?;
13461        let local_var_entity: Option<UpdateRegistrationWithIdError> = serde_json::from_str(&local_var_content).ok();
13462        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13463        Err(Error::ResponseError(local_var_error))
13464    }
13465}
13466
13467/// Updates the system configuration.
13468pub async fn update_system_configuration_with_id(configuration: &configuration::Configuration, system_configuration_request: Option<models::SystemConfigurationRequest>) -> Result<models::SystemConfigurationResponse, Error<UpdateSystemConfigurationWithIdError>> {
13469    let local_var_configuration = configuration;
13470
13471    let local_var_client = &local_var_configuration.client;
13472
13473    let local_var_uri_str = format!("{}/api/system-configuration", local_var_configuration.base_path);
13474    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
13475
13476    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13477        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13478    }
13479    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13480        let local_var_key = local_var_apikey.key.clone();
13481        let local_var_value = match local_var_apikey.prefix {
13482            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13483            None => local_var_key,
13484        };
13485        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13486    };
13487    local_var_req_builder = local_var_req_builder.json(&system_configuration_request);
13488
13489    let local_var_req = local_var_req_builder.build()?;
13490    let local_var_resp = local_var_client.execute(local_var_req).await?;
13491
13492    let local_var_status = local_var_resp.status();
13493
13494    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13495        let local_var_content = local_var_resp.text().await?;
13496        serde_json::from_str(&local_var_content).map_err(Error::from)
13497    } else {
13498        let local_var_content = local_var_resp.text().await?;
13499        let local_var_entity: Option<UpdateSystemConfigurationWithIdError> = serde_json::from_str(&local_var_content).ok();
13500        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13501        Err(Error::ResponseError(local_var_error))
13502    }
13503}
13504
13505/// Updates the tenant with the given Id.
13506pub async fn update_tenant_with_id(configuration: &configuration::Configuration, tenant_id: &str, x_fusion_auth_tenant_id: Option<&str>, tenant_request: Option<models::TenantRequest>) -> Result<models::TenantResponse, Error<UpdateTenantWithIdError>> {
13507    let local_var_configuration = configuration;
13508
13509    let local_var_client = &local_var_configuration.client;
13510
13511    let local_var_uri_str = format!("{}/api/tenant/{tenantId}", local_var_configuration.base_path, tenantId=crate::apis::urlencode(tenant_id));
13512    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
13513
13514    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13515        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13516    }
13517    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
13518        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
13519    }
13520    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13521        let local_var_key = local_var_apikey.key.clone();
13522        let local_var_value = match local_var_apikey.prefix {
13523            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13524            None => local_var_key,
13525        };
13526        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13527    };
13528    local_var_req_builder = local_var_req_builder.json(&tenant_request);
13529
13530    let local_var_req = local_var_req_builder.build()?;
13531    let local_var_resp = local_var_client.execute(local_var_req).await?;
13532
13533    let local_var_status = local_var_resp.status();
13534
13535    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13536        let local_var_content = local_var_resp.text().await?;
13537        serde_json::from_str(&local_var_content).map_err(Error::from)
13538    } else {
13539        let local_var_content = local_var_resp.text().await?;
13540        let local_var_entity: Option<UpdateTenantWithIdError> = serde_json::from_str(&local_var_content).ok();
13541        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13542        Err(Error::ResponseError(local_var_error))
13543    }
13544}
13545
13546/// Updates the theme with the given Id.
13547pub async fn update_theme_with_id(configuration: &configuration::Configuration, theme_id: &str, theme_request: Option<models::ThemeRequest>) -> Result<models::ThemeResponse, Error<UpdateThemeWithIdError>> {
13548    let local_var_configuration = configuration;
13549
13550    let local_var_client = &local_var_configuration.client;
13551
13552    let local_var_uri_str = format!("{}/api/theme/{themeId}", local_var_configuration.base_path, themeId=crate::apis::urlencode(theme_id));
13553    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
13554
13555    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13556        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13557    }
13558    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13559        let local_var_key = local_var_apikey.key.clone();
13560        let local_var_value = match local_var_apikey.prefix {
13561            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13562            None => local_var_key,
13563        };
13564        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13565    };
13566    local_var_req_builder = local_var_req_builder.json(&theme_request);
13567
13568    let local_var_req = local_var_req_builder.build()?;
13569    let local_var_resp = local_var_client.execute(local_var_req).await?;
13570
13571    let local_var_status = local_var_resp.status();
13572
13573    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13574        let local_var_content = local_var_resp.text().await?;
13575        serde_json::from_str(&local_var_content).map_err(Error::from)
13576    } else {
13577        let local_var_content = local_var_resp.text().await?;
13578        let local_var_entity: Option<UpdateThemeWithIdError> = serde_json::from_str(&local_var_content).ok();
13579        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13580        Err(Error::ResponseError(local_var_error))
13581    }
13582}
13583
13584/// Updates the user action reason with the given Id.
13585pub async fn update_user_action_reason_with_id(configuration: &configuration::Configuration, user_action_reason_id: &str, user_action_reason_request: Option<models::UserActionReasonRequest>) -> Result<models::UserActionReasonResponse, Error<UpdateUserActionReasonWithIdError>> {
13586    let local_var_configuration = configuration;
13587
13588    let local_var_client = &local_var_configuration.client;
13589
13590    let local_var_uri_str = format!("{}/api/user-action-reason/{userActionReasonId}", local_var_configuration.base_path, userActionReasonId=crate::apis::urlencode(user_action_reason_id));
13591    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
13592
13593    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13594        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13595    }
13596    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13597        let local_var_key = local_var_apikey.key.clone();
13598        let local_var_value = match local_var_apikey.prefix {
13599            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13600            None => local_var_key,
13601        };
13602        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13603    };
13604    local_var_req_builder = local_var_req_builder.json(&user_action_reason_request);
13605
13606    let local_var_req = local_var_req_builder.build()?;
13607    let local_var_resp = local_var_client.execute(local_var_req).await?;
13608
13609    let local_var_status = local_var_resp.status();
13610
13611    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13612        let local_var_content = local_var_resp.text().await?;
13613        serde_json::from_str(&local_var_content).map_err(Error::from)
13614    } else {
13615        let local_var_content = local_var_resp.text().await?;
13616        let local_var_entity: Option<UpdateUserActionReasonWithIdError> = serde_json::from_str(&local_var_content).ok();
13617        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13618        Err(Error::ResponseError(local_var_error))
13619    }
13620}
13621
13622/// Reactivates the user action with the given Id. OR Updates the user action with the given Id.
13623pub async fn update_user_action_with_id(configuration: &configuration::Configuration, user_action_id: &str, reactivate: Option<&str>, x_fusion_auth_tenant_id: Option<&str>, user_action_request: Option<models::UserActionRequest>) -> Result<models::UserActionResponse, Error<UpdateUserActionWithIdError>> {
13624    let local_var_configuration = configuration;
13625
13626    let local_var_client = &local_var_configuration.client;
13627
13628    let local_var_uri_str = format!("{}/api/user-action/{userActionId}", local_var_configuration.base_path, userActionId=crate::apis::urlencode(user_action_id));
13629    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
13630
13631    if let Some(ref local_var_str) = reactivate {
13632        local_var_req_builder = local_var_req_builder.query(&[("reactivate", &local_var_str.to_string())]);
13633    }
13634    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13635        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13636    }
13637    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
13638        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
13639    }
13640    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13641        let local_var_key = local_var_apikey.key.clone();
13642        let local_var_value = match local_var_apikey.prefix {
13643            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13644            None => local_var_key,
13645        };
13646        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13647    };
13648    local_var_req_builder = local_var_req_builder.json(&user_action_request);
13649
13650    let local_var_req = local_var_req_builder.build()?;
13651    let local_var_resp = local_var_client.execute(local_var_req).await?;
13652
13653    let local_var_status = local_var_resp.status();
13654
13655    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13656        let local_var_content = local_var_resp.text().await?;
13657        serde_json::from_str(&local_var_content).map_err(Error::from)
13658    } else {
13659        let local_var_content = local_var_resp.text().await?;
13660        let local_var_entity: Option<UpdateUserActionWithIdError> = serde_json::from_str(&local_var_content).ok();
13661        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13662        Err(Error::ResponseError(local_var_error))
13663    }
13664}
13665
13666/// Updates a single User consent by Id.
13667pub async fn update_user_consent_with_id(configuration: &configuration::Configuration, user_consent_id: &str, user_consent_request: Option<models::UserConsentRequest>) -> Result<models::UserConsentResponse, Error<UpdateUserConsentWithIdError>> {
13668    let local_var_configuration = configuration;
13669
13670    let local_var_client = &local_var_configuration.client;
13671
13672    let local_var_uri_str = format!("{}/api/user/consent/{userConsentId}", local_var_configuration.base_path, userConsentId=crate::apis::urlencode(user_consent_id));
13673    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
13674
13675    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13676        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13677    }
13678    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13679        let local_var_key = local_var_apikey.key.clone();
13680        let local_var_value = match local_var_apikey.prefix {
13681            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13682            None => local_var_key,
13683        };
13684        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13685    };
13686    local_var_req_builder = local_var_req_builder.json(&user_consent_request);
13687
13688    let local_var_req = local_var_req_builder.build()?;
13689    let local_var_resp = local_var_client.execute(local_var_req).await?;
13690
13691    let local_var_status = local_var_resp.status();
13692
13693    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13694        let local_var_content = local_var_resp.text().await?;
13695        serde_json::from_str(&local_var_content).map_err(Error::from)
13696    } else {
13697        let local_var_content = local_var_resp.text().await?;
13698        let local_var_entity: Option<UpdateUserConsentWithIdError> = serde_json::from_str(&local_var_content).ok();
13699        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13700        Err(Error::ResponseError(local_var_error))
13701    }
13702}
13703
13704/// Generate a new Email Verification Id to be used with the Verify Email API. This API will not attempt to send an email to the User. This API may be used to collect the verificationId for use with a third party system. OR Re-sends the verification email to the user. If the Application has configured a specific email template this will be used instead of the tenant configuration. OR Re-sends the verification email to the user.
13705pub async fn update_user_verify_email(configuration: &configuration::Configuration, email: Option<&str>, send_verify_email: Option<&str>, application_id: Option<&str>) -> Result<models::VerifyEmailResponse, Error<UpdateUserVerifyEmailError>> {
13706    let local_var_configuration = configuration;
13707
13708    let local_var_client = &local_var_configuration.client;
13709
13710    let local_var_uri_str = format!("{}/api/user/verify-email", local_var_configuration.base_path);
13711    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
13712
13713    if let Some(ref local_var_str) = email {
13714        local_var_req_builder = local_var_req_builder.query(&[("email", &local_var_str.to_string())]);
13715    }
13716    if let Some(ref local_var_str) = send_verify_email {
13717        local_var_req_builder = local_var_req_builder.query(&[("sendVerifyEmail", &local_var_str.to_string())]);
13718    }
13719    if let Some(ref local_var_str) = application_id {
13720        local_var_req_builder = local_var_req_builder.query(&[("applicationId", &local_var_str.to_string())]);
13721    }
13722    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13723        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13724    }
13725    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13726        let local_var_key = local_var_apikey.key.clone();
13727        let local_var_value = match local_var_apikey.prefix {
13728            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13729            None => local_var_key,
13730        };
13731        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13732    };
13733
13734    let local_var_req = local_var_req_builder.build()?;
13735    let local_var_resp = local_var_client.execute(local_var_req).await?;
13736
13737    let local_var_status = local_var_resp.status();
13738
13739    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13740        let local_var_content = local_var_resp.text().await?;
13741        serde_json::from_str(&local_var_content).map_err(Error::from)
13742    } else {
13743        let local_var_content = local_var_resp.text().await?;
13744        let local_var_entity: Option<UpdateUserVerifyEmailError> = serde_json::from_str(&local_var_content).ok();
13745        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13746        Err(Error::ResponseError(local_var_error))
13747    }
13748}
13749
13750/// Generate a new Application Registration Verification Id to be used with the Verify Registration API. This API will not attempt to send an email to the User. This API may be used to collect the verificationId for use with a third party system. OR Re-sends the application registration verification email to the user.
13751pub async fn update_user_verify_registration(configuration: &configuration::Configuration, email: Option<&str>, send_verify_password_email: Option<&str>, application_id: Option<&str>) -> Result<models::VerifyRegistrationResponse, Error<UpdateUserVerifyRegistrationError>> {
13752    let local_var_configuration = configuration;
13753
13754    let local_var_client = &local_var_configuration.client;
13755
13756    let local_var_uri_str = format!("{}/api/user/verify-registration", local_var_configuration.base_path);
13757    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
13758
13759    if let Some(ref local_var_str) = email {
13760        local_var_req_builder = local_var_req_builder.query(&[("email", &local_var_str.to_string())]);
13761    }
13762    if let Some(ref local_var_str) = send_verify_password_email {
13763        local_var_req_builder = local_var_req_builder.query(&[("sendVerifyPasswordEmail", &local_var_str.to_string())]);
13764    }
13765    if let Some(ref local_var_str) = application_id {
13766        local_var_req_builder = local_var_req_builder.query(&[("applicationId", &local_var_str.to_string())]);
13767    }
13768    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13769        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13770    }
13771    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13772        let local_var_key = local_var_apikey.key.clone();
13773        let local_var_value = match local_var_apikey.prefix {
13774            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13775            None => local_var_key,
13776        };
13777        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13778    };
13779
13780    let local_var_req = local_var_req_builder.build()?;
13781    let local_var_resp = local_var_client.execute(local_var_req).await?;
13782
13783    let local_var_status = local_var_resp.status();
13784
13785    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13786        let local_var_content = local_var_resp.text().await?;
13787        serde_json::from_str(&local_var_content).map_err(Error::from)
13788    } else {
13789        let local_var_content = local_var_resp.text().await?;
13790        let local_var_entity: Option<UpdateUserVerifyRegistrationError> = serde_json::from_str(&local_var_content).ok();
13791        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13792        Err(Error::ResponseError(local_var_error))
13793    }
13794}
13795
13796/// Updates the user with the given Id. OR Reactivates the user with the given Id.
13797pub async fn update_user_with_id(configuration: &configuration::Configuration, user_id: &str, x_fusion_auth_tenant_id: Option<&str>, reactivate: Option<&str>, user_request: Option<models::UserRequest>) -> Result<models::UserResponse, Error<UpdateUserWithIdError>> {
13798    let local_var_configuration = configuration;
13799
13800    let local_var_client = &local_var_configuration.client;
13801
13802    let local_var_uri_str = format!("{}/api/user/{userId}", local_var_configuration.base_path, userId=crate::apis::urlencode(user_id));
13803    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
13804
13805    if let Some(ref local_var_str) = reactivate {
13806        local_var_req_builder = local_var_req_builder.query(&[("reactivate", &local_var_str.to_string())]);
13807    }
13808    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13809        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13810    }
13811    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
13812        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
13813    }
13814    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13815        let local_var_key = local_var_apikey.key.clone();
13816        let local_var_value = match local_var_apikey.prefix {
13817            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13818            None => local_var_key,
13819        };
13820        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13821    };
13822    local_var_req_builder = local_var_req_builder.json(&user_request);
13823
13824    let local_var_req = local_var_req_builder.build()?;
13825    let local_var_resp = local_var_client.execute(local_var_req).await?;
13826
13827    let local_var_status = local_var_resp.status();
13828
13829    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13830        let local_var_content = local_var_resp.text().await?;
13831        serde_json::from_str(&local_var_content).map_err(Error::from)
13832    } else {
13833        let local_var_content = local_var_resp.text().await?;
13834        let local_var_entity: Option<UpdateUserWithIdError> = serde_json::from_str(&local_var_content).ok();
13835        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13836        Err(Error::ResponseError(local_var_error))
13837    }
13838}
13839
13840/// Updates the webhook with the given Id.
13841pub async fn update_webhook_with_id(configuration: &configuration::Configuration, webhook_id: &str, webhook_request: Option<models::WebhookRequest>) -> Result<models::WebhookResponse, Error<UpdateWebhookWithIdError>> {
13842    let local_var_configuration = configuration;
13843
13844    let local_var_client = &local_var_configuration.client;
13845
13846    let local_var_uri_str = format!("{}/api/webhook/{webhookId}", local_var_configuration.base_path, webhookId=crate::apis::urlencode(webhook_id));
13847    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
13848
13849    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13850        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13851    }
13852    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13853        let local_var_key = local_var_apikey.key.clone();
13854        let local_var_value = match local_var_apikey.prefix {
13855            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13856            None => local_var_key,
13857        };
13858        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13859    };
13860    local_var_req_builder = local_var_req_builder.json(&webhook_request);
13861
13862    let local_var_req = local_var_req_builder.build()?;
13863    let local_var_resp = local_var_client.execute(local_var_req).await?;
13864
13865    let local_var_status = local_var_resp.status();
13866
13867    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13868        let local_var_content = local_var_resp.text().await?;
13869        serde_json::from_str(&local_var_content).map_err(Error::from)
13870    } else {
13871        let local_var_content = local_var_resp.text().await?;
13872        let local_var_entity: Option<UpdateWebhookWithIdError> = serde_json::from_str(&local_var_content).ok();
13873        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13874        Err(Error::ResponseError(local_var_error))
13875    }
13876}
13877
13878/// Creates or updates an Entity Grant. This is when a User/Entity is granted permissions to an Entity.
13879pub async fn upsert_entity_grant_with_id(configuration: &configuration::Configuration, entity_id: &str, x_fusion_auth_tenant_id: Option<&str>, entity_grant_request: Option<models::EntityGrantRequest>) -> Result<(), Error<UpsertEntityGrantWithIdError>> {
13880    let local_var_configuration = configuration;
13881
13882    let local_var_client = &local_var_configuration.client;
13883
13884    let local_var_uri_str = format!("{}/api/entity/{entityId}/grant", local_var_configuration.base_path, entityId=crate::apis::urlencode(entity_id));
13885    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
13886
13887    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13888        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13889    }
13890    if let Some(local_var_param_value) = x_fusion_auth_tenant_id {
13891        local_var_req_builder = local_var_req_builder.header("X-FusionAuth-TenantId", local_var_param_value.to_string());
13892    }
13893    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13894        let local_var_key = local_var_apikey.key.clone();
13895        let local_var_value = match local_var_apikey.prefix {
13896            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13897            None => local_var_key,
13898        };
13899        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13900    };
13901    local_var_req_builder = local_var_req_builder.json(&entity_grant_request);
13902
13903    let local_var_req = local_var_req_builder.build()?;
13904    let local_var_resp = local_var_client.execute(local_var_req).await?;
13905
13906    let local_var_status = local_var_resp.status();
13907
13908    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13909        Ok(())
13910    } else {
13911        let local_var_content = local_var_resp.text().await?;
13912        let local_var_entity: Option<UpsertEntityGrantWithIdError> = serde_json::from_str(&local_var_content).ok();
13913        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13914        Err(Error::ResponseError(local_var_error))
13915    }
13916}
13917
13918/// Validates the end-user provided user_code from the user-interaction of the Device Authorization Grant. If you build your own activation form you should validate the user provided code prior to beginning the Authorization grant.
13919pub async fn validate_device_with_id(configuration: &configuration::Configuration, user_code: Option<&str>, client_id: Option<&str>) -> Result<(), Error<ValidateDeviceWithIdError>> {
13920    let local_var_configuration = configuration;
13921
13922    let local_var_client = &local_var_configuration.client;
13923
13924    let local_var_uri_str = format!("{}/oauth2/device/validate", local_var_configuration.base_path);
13925    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
13926
13927    if let Some(ref local_var_str) = user_code {
13928        local_var_req_builder = local_var_req_builder.query(&[("user_code", &local_var_str.to_string())]);
13929    }
13930    if let Some(ref local_var_str) = client_id {
13931        local_var_req_builder = local_var_req_builder.query(&[("client_id", &local_var_str.to_string())]);
13932    }
13933    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13934        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13935    }
13936    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
13937        let local_var_key = local_var_apikey.key.clone();
13938        let local_var_value = match local_var_apikey.prefix {
13939            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
13940            None => local_var_key,
13941        };
13942        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
13943    };
13944
13945    let local_var_req = local_var_req_builder.build()?;
13946    let local_var_resp = local_var_client.execute(local_var_req).await?;
13947
13948    let local_var_status = local_var_resp.status();
13949
13950    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13951        Ok(())
13952    } else {
13953        let local_var_content = local_var_resp.text().await?;
13954        let local_var_entity: Option<ValidateDeviceWithIdError> = serde_json::from_str(&local_var_content).ok();
13955        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13956        Err(Error::ResponseError(local_var_error))
13957    }
13958}
13959
13960/// Validates the provided JWT (encoded JWT string) to ensure the token is valid. A valid access token is properly signed and not expired. <p> This API may be used to verify the JWT as well as decode the encoded JWT into human readable identity claims.
13961pub async fn validate_jwt_with_id(configuration: &configuration::Configuration, ) -> Result<models::ValidateResponse, Error<ValidateJwtWithIdError>> {
13962    let local_var_configuration = configuration;
13963
13964    let local_var_client = &local_var_configuration.client;
13965
13966    let local_var_uri_str = format!("{}/api/jwt/validate", local_var_configuration.base_path);
13967    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
13968
13969    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
13970        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
13971    }
13972    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
13973        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
13974    };
13975
13976    let local_var_req = local_var_req_builder.build()?;
13977    let local_var_resp = local_var_client.execute(local_var_req).await?;
13978
13979    let local_var_status = local_var_resp.status();
13980
13981    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
13982        let local_var_content = local_var_resp.text().await?;
13983        serde_json::from_str(&local_var_content).map_err(Error::from)
13984    } else {
13985        let local_var_content = local_var_resp.text().await?;
13986        let local_var_entity: Option<ValidateJwtWithIdError> = serde_json::from_str(&local_var_content).ok();
13987        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
13988        Err(Error::ResponseError(local_var_error))
13989    }
13990}
13991
13992/// It's a JWT vending machine!  Issue a new access token (JWT) with the provided claims in the request. This JWT is not scoped to a tenant or user, it is a free form  token that will contain what claims you provide. <p> The iat, exp and jti claims will be added by FusionAuth, all other claims must be provided by the caller.  If a TTL is not provided in the request, the TTL will be retrieved from the default Tenant or the Tenant specified on the request either  by way of the X-FusionAuth-TenantId request header, or a tenant scoped API key.
13993pub async fn vend_jwt_with_id(configuration: &configuration::Configuration, jwt_vend_request: Option<models::JwtVendRequest>) -> Result<models::JwtVendResponse, Error<VendJwtWithIdError>> {
13994    let local_var_configuration = configuration;
13995
13996    let local_var_client = &local_var_configuration.client;
13997
13998    let local_var_uri_str = format!("{}/api/jwt/vend", local_var_configuration.base_path);
13999    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
14000
14001    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
14002        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
14003    }
14004    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
14005        let local_var_key = local_var_apikey.key.clone();
14006        let local_var_value = match local_var_apikey.prefix {
14007            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
14008            None => local_var_key,
14009        };
14010        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
14011    };
14012    local_var_req_builder = local_var_req_builder.json(&jwt_vend_request);
14013
14014    let local_var_req = local_var_req_builder.build()?;
14015    let local_var_resp = local_var_client.execute(local_var_req).await?;
14016
14017    let local_var_status = local_var_resp.status();
14018
14019    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
14020        let local_var_content = local_var_resp.text().await?;
14021        serde_json::from_str(&local_var_content).map_err(Error::from)
14022    } else {
14023        let local_var_content = local_var_resp.text().await?;
14024        let local_var_entity: Option<VendJwtWithIdError> = serde_json::from_str(&local_var_content).ok();
14025        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
14026        Err(Error::ResponseError(local_var_error))
14027    }
14028}
14029
14030/// Confirms a user's registration.   The request body will contain the verificationId. You may also be required to send a one-time use code based upon your configuration. When  the application is configured to gate a user until their registration is verified, this procedures requires two values instead of one.  The verificationId is a high entropy value and the one-time use code is a low entropy value that is easily entered in a user interactive form. The  two values together are able to confirm a user's registration and mark the user's registration as verified.
14031pub async fn verify_user_registration_with_id(configuration: &configuration::Configuration, verify_registration_request: Option<models::VerifyRegistrationRequest>) -> Result<(), Error<VerifyUserRegistrationWithIdError>> {
14032    let local_var_configuration = configuration;
14033
14034    let local_var_client = &local_var_configuration.client;
14035
14036    let local_var_uri_str = format!("{}/api/user/verify-registration", local_var_configuration.base_path);
14037    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
14038
14039    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
14040        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
14041    }
14042    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
14043        let local_var_key = local_var_apikey.key.clone();
14044        let local_var_value = match local_var_apikey.prefix {
14045            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
14046            None => local_var_key,
14047        };
14048        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
14049    };
14050    local_var_req_builder = local_var_req_builder.json(&verify_registration_request);
14051
14052    let local_var_req = local_var_req_builder.build()?;
14053    let local_var_resp = local_var_client.execute(local_var_req).await?;
14054
14055    let local_var_status = local_var_resp.status();
14056
14057    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
14058        Ok(())
14059    } else {
14060        let local_var_content = local_var_resp.text().await?;
14061        let local_var_entity: Option<VerifyUserRegistrationWithIdError> = serde_json::from_str(&local_var_content).ok();
14062        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
14063        Err(Error::ResponseError(local_var_error))
14064    }
14065}
14066