authentik_rust/apis/
stages_api.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2024.2.1
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12use reqwest;
13
14use crate::{apis::ResponseContent, models};
15use super::{Error, configuration};
16
17
18/// struct for typed errors of method [`stages_all_destroy`]
19#[derive(Debug, Clone, Serialize, Deserialize)]
20#[serde(untagged)]
21pub enum StagesAllDestroyError {
22    Status400(models::ValidationError),
23    Status403(models::GenericError),
24    UnknownValue(serde_json::Value),
25}
26
27/// struct for typed errors of method [`stages_all_list`]
28#[derive(Debug, Clone, Serialize, Deserialize)]
29#[serde(untagged)]
30pub enum StagesAllListError {
31    Status400(models::ValidationError),
32    Status403(models::GenericError),
33    UnknownValue(serde_json::Value),
34}
35
36/// struct for typed errors of method [`stages_all_retrieve`]
37#[derive(Debug, Clone, Serialize, Deserialize)]
38#[serde(untagged)]
39pub enum StagesAllRetrieveError {
40    Status400(models::ValidationError),
41    Status403(models::GenericError),
42    UnknownValue(serde_json::Value),
43}
44
45/// struct for typed errors of method [`stages_all_types_list`]
46#[derive(Debug, Clone, Serialize, Deserialize)]
47#[serde(untagged)]
48pub enum StagesAllTypesListError {
49    Status400(models::ValidationError),
50    Status403(models::GenericError),
51    UnknownValue(serde_json::Value),
52}
53
54/// struct for typed errors of method [`stages_all_used_by_list`]
55#[derive(Debug, Clone, Serialize, Deserialize)]
56#[serde(untagged)]
57pub enum StagesAllUsedByListError {
58    Status400(models::ValidationError),
59    Status403(models::GenericError),
60    UnknownValue(serde_json::Value),
61}
62
63/// struct for typed errors of method [`stages_all_user_settings_list`]
64#[derive(Debug, Clone, Serialize, Deserialize)]
65#[serde(untagged)]
66pub enum StagesAllUserSettingsListError {
67    Status400(models::ValidationError),
68    Status403(models::GenericError),
69    UnknownValue(serde_json::Value),
70}
71
72/// struct for typed errors of method [`stages_authenticator_duo_create`]
73#[derive(Debug, Clone, Serialize, Deserialize)]
74#[serde(untagged)]
75pub enum StagesAuthenticatorDuoCreateError {
76    Status400(models::ValidationError),
77    Status403(models::GenericError),
78    UnknownValue(serde_json::Value),
79}
80
81/// struct for typed errors of method [`stages_authenticator_duo_destroy`]
82#[derive(Debug, Clone, Serialize, Deserialize)]
83#[serde(untagged)]
84pub enum StagesAuthenticatorDuoDestroyError {
85    Status400(models::ValidationError),
86    Status403(models::GenericError),
87    UnknownValue(serde_json::Value),
88}
89
90/// struct for typed errors of method [`stages_authenticator_duo_enrollment_status_create`]
91#[derive(Debug, Clone, Serialize, Deserialize)]
92#[serde(untagged)]
93pub enum StagesAuthenticatorDuoEnrollmentStatusCreateError {
94    Status400(models::ValidationError),
95    Status403(models::GenericError),
96    UnknownValue(serde_json::Value),
97}
98
99/// struct for typed errors of method [`stages_authenticator_duo_import_device_manual_create`]
100#[derive(Debug, Clone, Serialize, Deserialize)]
101#[serde(untagged)]
102pub enum StagesAuthenticatorDuoImportDeviceManualCreateError {
103    Status400(),
104    Status403(models::GenericError),
105    UnknownValue(serde_json::Value),
106}
107
108/// struct for typed errors of method [`stages_authenticator_duo_import_devices_automatic_create`]
109#[derive(Debug, Clone, Serialize, Deserialize)]
110#[serde(untagged)]
111pub enum StagesAuthenticatorDuoImportDevicesAutomaticCreateError {
112    Status400(),
113    Status403(models::GenericError),
114    UnknownValue(serde_json::Value),
115}
116
117/// struct for typed errors of method [`stages_authenticator_duo_list`]
118#[derive(Debug, Clone, Serialize, Deserialize)]
119#[serde(untagged)]
120pub enum StagesAuthenticatorDuoListError {
121    Status400(models::ValidationError),
122    Status403(models::GenericError),
123    UnknownValue(serde_json::Value),
124}
125
126/// struct for typed errors of method [`stages_authenticator_duo_partial_update`]
127#[derive(Debug, Clone, Serialize, Deserialize)]
128#[serde(untagged)]
129pub enum StagesAuthenticatorDuoPartialUpdateError {
130    Status400(models::ValidationError),
131    Status403(models::GenericError),
132    UnknownValue(serde_json::Value),
133}
134
135/// struct for typed errors of method [`stages_authenticator_duo_retrieve`]
136#[derive(Debug, Clone, Serialize, Deserialize)]
137#[serde(untagged)]
138pub enum StagesAuthenticatorDuoRetrieveError {
139    Status400(models::ValidationError),
140    Status403(models::GenericError),
141    UnknownValue(serde_json::Value),
142}
143
144/// struct for typed errors of method [`stages_authenticator_duo_update`]
145#[derive(Debug, Clone, Serialize, Deserialize)]
146#[serde(untagged)]
147pub enum StagesAuthenticatorDuoUpdateError {
148    Status400(models::ValidationError),
149    Status403(models::GenericError),
150    UnknownValue(serde_json::Value),
151}
152
153/// struct for typed errors of method [`stages_authenticator_duo_used_by_list`]
154#[derive(Debug, Clone, Serialize, Deserialize)]
155#[serde(untagged)]
156pub enum StagesAuthenticatorDuoUsedByListError {
157    Status400(models::ValidationError),
158    Status403(models::GenericError),
159    UnknownValue(serde_json::Value),
160}
161
162/// struct for typed errors of method [`stages_authenticator_sms_create`]
163#[derive(Debug, Clone, Serialize, Deserialize)]
164#[serde(untagged)]
165pub enum StagesAuthenticatorSmsCreateError {
166    Status400(models::ValidationError),
167    Status403(models::GenericError),
168    UnknownValue(serde_json::Value),
169}
170
171/// struct for typed errors of method [`stages_authenticator_sms_destroy`]
172#[derive(Debug, Clone, Serialize, Deserialize)]
173#[serde(untagged)]
174pub enum StagesAuthenticatorSmsDestroyError {
175    Status400(models::ValidationError),
176    Status403(models::GenericError),
177    UnknownValue(serde_json::Value),
178}
179
180/// struct for typed errors of method [`stages_authenticator_sms_list`]
181#[derive(Debug, Clone, Serialize, Deserialize)]
182#[serde(untagged)]
183pub enum StagesAuthenticatorSmsListError {
184    Status400(models::ValidationError),
185    Status403(models::GenericError),
186    UnknownValue(serde_json::Value),
187}
188
189/// struct for typed errors of method [`stages_authenticator_sms_partial_update`]
190#[derive(Debug, Clone, Serialize, Deserialize)]
191#[serde(untagged)]
192pub enum StagesAuthenticatorSmsPartialUpdateError {
193    Status400(models::ValidationError),
194    Status403(models::GenericError),
195    UnknownValue(serde_json::Value),
196}
197
198/// struct for typed errors of method [`stages_authenticator_sms_retrieve`]
199#[derive(Debug, Clone, Serialize, Deserialize)]
200#[serde(untagged)]
201pub enum StagesAuthenticatorSmsRetrieveError {
202    Status400(models::ValidationError),
203    Status403(models::GenericError),
204    UnknownValue(serde_json::Value),
205}
206
207/// struct for typed errors of method [`stages_authenticator_sms_update`]
208#[derive(Debug, Clone, Serialize, Deserialize)]
209#[serde(untagged)]
210pub enum StagesAuthenticatorSmsUpdateError {
211    Status400(models::ValidationError),
212    Status403(models::GenericError),
213    UnknownValue(serde_json::Value),
214}
215
216/// struct for typed errors of method [`stages_authenticator_sms_used_by_list`]
217#[derive(Debug, Clone, Serialize, Deserialize)]
218#[serde(untagged)]
219pub enum StagesAuthenticatorSmsUsedByListError {
220    Status400(models::ValidationError),
221    Status403(models::GenericError),
222    UnknownValue(serde_json::Value),
223}
224
225/// struct for typed errors of method [`stages_authenticator_static_create`]
226#[derive(Debug, Clone, Serialize, Deserialize)]
227#[serde(untagged)]
228pub enum StagesAuthenticatorStaticCreateError {
229    Status400(models::ValidationError),
230    Status403(models::GenericError),
231    UnknownValue(serde_json::Value),
232}
233
234/// struct for typed errors of method [`stages_authenticator_static_destroy`]
235#[derive(Debug, Clone, Serialize, Deserialize)]
236#[serde(untagged)]
237pub enum StagesAuthenticatorStaticDestroyError {
238    Status400(models::ValidationError),
239    Status403(models::GenericError),
240    UnknownValue(serde_json::Value),
241}
242
243/// struct for typed errors of method [`stages_authenticator_static_list`]
244#[derive(Debug, Clone, Serialize, Deserialize)]
245#[serde(untagged)]
246pub enum StagesAuthenticatorStaticListError {
247    Status400(models::ValidationError),
248    Status403(models::GenericError),
249    UnknownValue(serde_json::Value),
250}
251
252/// struct for typed errors of method [`stages_authenticator_static_partial_update`]
253#[derive(Debug, Clone, Serialize, Deserialize)]
254#[serde(untagged)]
255pub enum StagesAuthenticatorStaticPartialUpdateError {
256    Status400(models::ValidationError),
257    Status403(models::GenericError),
258    UnknownValue(serde_json::Value),
259}
260
261/// struct for typed errors of method [`stages_authenticator_static_retrieve`]
262#[derive(Debug, Clone, Serialize, Deserialize)]
263#[serde(untagged)]
264pub enum StagesAuthenticatorStaticRetrieveError {
265    Status400(models::ValidationError),
266    Status403(models::GenericError),
267    UnknownValue(serde_json::Value),
268}
269
270/// struct for typed errors of method [`stages_authenticator_static_update`]
271#[derive(Debug, Clone, Serialize, Deserialize)]
272#[serde(untagged)]
273pub enum StagesAuthenticatorStaticUpdateError {
274    Status400(models::ValidationError),
275    Status403(models::GenericError),
276    UnknownValue(serde_json::Value),
277}
278
279/// struct for typed errors of method [`stages_authenticator_static_used_by_list`]
280#[derive(Debug, Clone, Serialize, Deserialize)]
281#[serde(untagged)]
282pub enum StagesAuthenticatorStaticUsedByListError {
283    Status400(models::ValidationError),
284    Status403(models::GenericError),
285    UnknownValue(serde_json::Value),
286}
287
288/// struct for typed errors of method [`stages_authenticator_totp_create`]
289#[derive(Debug, Clone, Serialize, Deserialize)]
290#[serde(untagged)]
291pub enum StagesAuthenticatorTotpCreateError {
292    Status400(models::ValidationError),
293    Status403(models::GenericError),
294    UnknownValue(serde_json::Value),
295}
296
297/// struct for typed errors of method [`stages_authenticator_totp_destroy`]
298#[derive(Debug, Clone, Serialize, Deserialize)]
299#[serde(untagged)]
300pub enum StagesAuthenticatorTotpDestroyError {
301    Status400(models::ValidationError),
302    Status403(models::GenericError),
303    UnknownValue(serde_json::Value),
304}
305
306/// struct for typed errors of method [`stages_authenticator_totp_list`]
307#[derive(Debug, Clone, Serialize, Deserialize)]
308#[serde(untagged)]
309pub enum StagesAuthenticatorTotpListError {
310    Status400(models::ValidationError),
311    Status403(models::GenericError),
312    UnknownValue(serde_json::Value),
313}
314
315/// struct for typed errors of method [`stages_authenticator_totp_partial_update`]
316#[derive(Debug, Clone, Serialize, Deserialize)]
317#[serde(untagged)]
318pub enum StagesAuthenticatorTotpPartialUpdateError {
319    Status400(models::ValidationError),
320    Status403(models::GenericError),
321    UnknownValue(serde_json::Value),
322}
323
324/// struct for typed errors of method [`stages_authenticator_totp_retrieve`]
325#[derive(Debug, Clone, Serialize, Deserialize)]
326#[serde(untagged)]
327pub enum StagesAuthenticatorTotpRetrieveError {
328    Status400(models::ValidationError),
329    Status403(models::GenericError),
330    UnknownValue(serde_json::Value),
331}
332
333/// struct for typed errors of method [`stages_authenticator_totp_update`]
334#[derive(Debug, Clone, Serialize, Deserialize)]
335#[serde(untagged)]
336pub enum StagesAuthenticatorTotpUpdateError {
337    Status400(models::ValidationError),
338    Status403(models::GenericError),
339    UnknownValue(serde_json::Value),
340}
341
342/// struct for typed errors of method [`stages_authenticator_totp_used_by_list`]
343#[derive(Debug, Clone, Serialize, Deserialize)]
344#[serde(untagged)]
345pub enum StagesAuthenticatorTotpUsedByListError {
346    Status400(models::ValidationError),
347    Status403(models::GenericError),
348    UnknownValue(serde_json::Value),
349}
350
351/// struct for typed errors of method [`stages_authenticator_validate_create`]
352#[derive(Debug, Clone, Serialize, Deserialize)]
353#[serde(untagged)]
354pub enum StagesAuthenticatorValidateCreateError {
355    Status400(models::ValidationError),
356    Status403(models::GenericError),
357    UnknownValue(serde_json::Value),
358}
359
360/// struct for typed errors of method [`stages_authenticator_validate_destroy`]
361#[derive(Debug, Clone, Serialize, Deserialize)]
362#[serde(untagged)]
363pub enum StagesAuthenticatorValidateDestroyError {
364    Status400(models::ValidationError),
365    Status403(models::GenericError),
366    UnknownValue(serde_json::Value),
367}
368
369/// struct for typed errors of method [`stages_authenticator_validate_list`]
370#[derive(Debug, Clone, Serialize, Deserialize)]
371#[serde(untagged)]
372pub enum StagesAuthenticatorValidateListError {
373    Status400(models::ValidationError),
374    Status403(models::GenericError),
375    UnknownValue(serde_json::Value),
376}
377
378/// struct for typed errors of method [`stages_authenticator_validate_partial_update`]
379#[derive(Debug, Clone, Serialize, Deserialize)]
380#[serde(untagged)]
381pub enum StagesAuthenticatorValidatePartialUpdateError {
382    Status400(models::ValidationError),
383    Status403(models::GenericError),
384    UnknownValue(serde_json::Value),
385}
386
387/// struct for typed errors of method [`stages_authenticator_validate_retrieve`]
388#[derive(Debug, Clone, Serialize, Deserialize)]
389#[serde(untagged)]
390pub enum StagesAuthenticatorValidateRetrieveError {
391    Status400(models::ValidationError),
392    Status403(models::GenericError),
393    UnknownValue(serde_json::Value),
394}
395
396/// struct for typed errors of method [`stages_authenticator_validate_update`]
397#[derive(Debug, Clone, Serialize, Deserialize)]
398#[serde(untagged)]
399pub enum StagesAuthenticatorValidateUpdateError {
400    Status400(models::ValidationError),
401    Status403(models::GenericError),
402    UnknownValue(serde_json::Value),
403}
404
405/// struct for typed errors of method [`stages_authenticator_validate_used_by_list`]
406#[derive(Debug, Clone, Serialize, Deserialize)]
407#[serde(untagged)]
408pub enum StagesAuthenticatorValidateUsedByListError {
409    Status400(models::ValidationError),
410    Status403(models::GenericError),
411    UnknownValue(serde_json::Value),
412}
413
414/// struct for typed errors of method [`stages_authenticator_webauthn_create`]
415#[derive(Debug, Clone, Serialize, Deserialize)]
416#[serde(untagged)]
417pub enum StagesAuthenticatorWebauthnCreateError {
418    Status400(models::ValidationError),
419    Status403(models::GenericError),
420    UnknownValue(serde_json::Value),
421}
422
423/// struct for typed errors of method [`stages_authenticator_webauthn_destroy`]
424#[derive(Debug, Clone, Serialize, Deserialize)]
425#[serde(untagged)]
426pub enum StagesAuthenticatorWebauthnDestroyError {
427    Status400(models::ValidationError),
428    Status403(models::GenericError),
429    UnknownValue(serde_json::Value),
430}
431
432/// struct for typed errors of method [`stages_authenticator_webauthn_list`]
433#[derive(Debug, Clone, Serialize, Deserialize)]
434#[serde(untagged)]
435pub enum StagesAuthenticatorWebauthnListError {
436    Status400(models::ValidationError),
437    Status403(models::GenericError),
438    UnknownValue(serde_json::Value),
439}
440
441/// struct for typed errors of method [`stages_authenticator_webauthn_partial_update`]
442#[derive(Debug, Clone, Serialize, Deserialize)]
443#[serde(untagged)]
444pub enum StagesAuthenticatorWebauthnPartialUpdateError {
445    Status400(models::ValidationError),
446    Status403(models::GenericError),
447    UnknownValue(serde_json::Value),
448}
449
450/// struct for typed errors of method [`stages_authenticator_webauthn_retrieve`]
451#[derive(Debug, Clone, Serialize, Deserialize)]
452#[serde(untagged)]
453pub enum StagesAuthenticatorWebauthnRetrieveError {
454    Status400(models::ValidationError),
455    Status403(models::GenericError),
456    UnknownValue(serde_json::Value),
457}
458
459/// struct for typed errors of method [`stages_authenticator_webauthn_update`]
460#[derive(Debug, Clone, Serialize, Deserialize)]
461#[serde(untagged)]
462pub enum StagesAuthenticatorWebauthnUpdateError {
463    Status400(models::ValidationError),
464    Status403(models::GenericError),
465    UnknownValue(serde_json::Value),
466}
467
468/// struct for typed errors of method [`stages_authenticator_webauthn_used_by_list`]
469#[derive(Debug, Clone, Serialize, Deserialize)]
470#[serde(untagged)]
471pub enum StagesAuthenticatorWebauthnUsedByListError {
472    Status400(models::ValidationError),
473    Status403(models::GenericError),
474    UnknownValue(serde_json::Value),
475}
476
477/// struct for typed errors of method [`stages_captcha_create`]
478#[derive(Debug, Clone, Serialize, Deserialize)]
479#[serde(untagged)]
480pub enum StagesCaptchaCreateError {
481    Status400(models::ValidationError),
482    Status403(models::GenericError),
483    UnknownValue(serde_json::Value),
484}
485
486/// struct for typed errors of method [`stages_captcha_destroy`]
487#[derive(Debug, Clone, Serialize, Deserialize)]
488#[serde(untagged)]
489pub enum StagesCaptchaDestroyError {
490    Status400(models::ValidationError),
491    Status403(models::GenericError),
492    UnknownValue(serde_json::Value),
493}
494
495/// struct for typed errors of method [`stages_captcha_list`]
496#[derive(Debug, Clone, Serialize, Deserialize)]
497#[serde(untagged)]
498pub enum StagesCaptchaListError {
499    Status400(models::ValidationError),
500    Status403(models::GenericError),
501    UnknownValue(serde_json::Value),
502}
503
504/// struct for typed errors of method [`stages_captcha_partial_update`]
505#[derive(Debug, Clone, Serialize, Deserialize)]
506#[serde(untagged)]
507pub enum StagesCaptchaPartialUpdateError {
508    Status400(models::ValidationError),
509    Status403(models::GenericError),
510    UnknownValue(serde_json::Value),
511}
512
513/// struct for typed errors of method [`stages_captcha_retrieve`]
514#[derive(Debug, Clone, Serialize, Deserialize)]
515#[serde(untagged)]
516pub enum StagesCaptchaRetrieveError {
517    Status400(models::ValidationError),
518    Status403(models::GenericError),
519    UnknownValue(serde_json::Value),
520}
521
522/// struct for typed errors of method [`stages_captcha_update`]
523#[derive(Debug, Clone, Serialize, Deserialize)]
524#[serde(untagged)]
525pub enum StagesCaptchaUpdateError {
526    Status400(models::ValidationError),
527    Status403(models::GenericError),
528    UnknownValue(serde_json::Value),
529}
530
531/// struct for typed errors of method [`stages_captcha_used_by_list`]
532#[derive(Debug, Clone, Serialize, Deserialize)]
533#[serde(untagged)]
534pub enum StagesCaptchaUsedByListError {
535    Status400(models::ValidationError),
536    Status403(models::GenericError),
537    UnknownValue(serde_json::Value),
538}
539
540/// struct for typed errors of method [`stages_consent_create`]
541#[derive(Debug, Clone, Serialize, Deserialize)]
542#[serde(untagged)]
543pub enum StagesConsentCreateError {
544    Status400(models::ValidationError),
545    Status403(models::GenericError),
546    UnknownValue(serde_json::Value),
547}
548
549/// struct for typed errors of method [`stages_consent_destroy`]
550#[derive(Debug, Clone, Serialize, Deserialize)]
551#[serde(untagged)]
552pub enum StagesConsentDestroyError {
553    Status400(models::ValidationError),
554    Status403(models::GenericError),
555    UnknownValue(serde_json::Value),
556}
557
558/// struct for typed errors of method [`stages_consent_list`]
559#[derive(Debug, Clone, Serialize, Deserialize)]
560#[serde(untagged)]
561pub enum StagesConsentListError {
562    Status400(models::ValidationError),
563    Status403(models::GenericError),
564    UnknownValue(serde_json::Value),
565}
566
567/// struct for typed errors of method [`stages_consent_partial_update`]
568#[derive(Debug, Clone, Serialize, Deserialize)]
569#[serde(untagged)]
570pub enum StagesConsentPartialUpdateError {
571    Status400(models::ValidationError),
572    Status403(models::GenericError),
573    UnknownValue(serde_json::Value),
574}
575
576/// struct for typed errors of method [`stages_consent_retrieve`]
577#[derive(Debug, Clone, Serialize, Deserialize)]
578#[serde(untagged)]
579pub enum StagesConsentRetrieveError {
580    Status400(models::ValidationError),
581    Status403(models::GenericError),
582    UnknownValue(serde_json::Value),
583}
584
585/// struct for typed errors of method [`stages_consent_update`]
586#[derive(Debug, Clone, Serialize, Deserialize)]
587#[serde(untagged)]
588pub enum StagesConsentUpdateError {
589    Status400(models::ValidationError),
590    Status403(models::GenericError),
591    UnknownValue(serde_json::Value),
592}
593
594/// struct for typed errors of method [`stages_consent_used_by_list`]
595#[derive(Debug, Clone, Serialize, Deserialize)]
596#[serde(untagged)]
597pub enum StagesConsentUsedByListError {
598    Status400(models::ValidationError),
599    Status403(models::GenericError),
600    UnknownValue(serde_json::Value),
601}
602
603/// struct for typed errors of method [`stages_deny_create`]
604#[derive(Debug, Clone, Serialize, Deserialize)]
605#[serde(untagged)]
606pub enum StagesDenyCreateError {
607    Status400(models::ValidationError),
608    Status403(models::GenericError),
609    UnknownValue(serde_json::Value),
610}
611
612/// struct for typed errors of method [`stages_deny_destroy`]
613#[derive(Debug, Clone, Serialize, Deserialize)]
614#[serde(untagged)]
615pub enum StagesDenyDestroyError {
616    Status400(models::ValidationError),
617    Status403(models::GenericError),
618    UnknownValue(serde_json::Value),
619}
620
621/// struct for typed errors of method [`stages_deny_list`]
622#[derive(Debug, Clone, Serialize, Deserialize)]
623#[serde(untagged)]
624pub enum StagesDenyListError {
625    Status400(models::ValidationError),
626    Status403(models::GenericError),
627    UnknownValue(serde_json::Value),
628}
629
630/// struct for typed errors of method [`stages_deny_partial_update`]
631#[derive(Debug, Clone, Serialize, Deserialize)]
632#[serde(untagged)]
633pub enum StagesDenyPartialUpdateError {
634    Status400(models::ValidationError),
635    Status403(models::GenericError),
636    UnknownValue(serde_json::Value),
637}
638
639/// struct for typed errors of method [`stages_deny_retrieve`]
640#[derive(Debug, Clone, Serialize, Deserialize)]
641#[serde(untagged)]
642pub enum StagesDenyRetrieveError {
643    Status400(models::ValidationError),
644    Status403(models::GenericError),
645    UnknownValue(serde_json::Value),
646}
647
648/// struct for typed errors of method [`stages_deny_update`]
649#[derive(Debug, Clone, Serialize, Deserialize)]
650#[serde(untagged)]
651pub enum StagesDenyUpdateError {
652    Status400(models::ValidationError),
653    Status403(models::GenericError),
654    UnknownValue(serde_json::Value),
655}
656
657/// struct for typed errors of method [`stages_deny_used_by_list`]
658#[derive(Debug, Clone, Serialize, Deserialize)]
659#[serde(untagged)]
660pub enum StagesDenyUsedByListError {
661    Status400(models::ValidationError),
662    Status403(models::GenericError),
663    UnknownValue(serde_json::Value),
664}
665
666/// struct for typed errors of method [`stages_dummy_create`]
667#[derive(Debug, Clone, Serialize, Deserialize)]
668#[serde(untagged)]
669pub enum StagesDummyCreateError {
670    Status400(models::ValidationError),
671    Status403(models::GenericError),
672    UnknownValue(serde_json::Value),
673}
674
675/// struct for typed errors of method [`stages_dummy_destroy`]
676#[derive(Debug, Clone, Serialize, Deserialize)]
677#[serde(untagged)]
678pub enum StagesDummyDestroyError {
679    Status400(models::ValidationError),
680    Status403(models::GenericError),
681    UnknownValue(serde_json::Value),
682}
683
684/// struct for typed errors of method [`stages_dummy_list`]
685#[derive(Debug, Clone, Serialize, Deserialize)]
686#[serde(untagged)]
687pub enum StagesDummyListError {
688    Status400(models::ValidationError),
689    Status403(models::GenericError),
690    UnknownValue(serde_json::Value),
691}
692
693/// struct for typed errors of method [`stages_dummy_partial_update`]
694#[derive(Debug, Clone, Serialize, Deserialize)]
695#[serde(untagged)]
696pub enum StagesDummyPartialUpdateError {
697    Status400(models::ValidationError),
698    Status403(models::GenericError),
699    UnknownValue(serde_json::Value),
700}
701
702/// struct for typed errors of method [`stages_dummy_retrieve`]
703#[derive(Debug, Clone, Serialize, Deserialize)]
704#[serde(untagged)]
705pub enum StagesDummyRetrieveError {
706    Status400(models::ValidationError),
707    Status403(models::GenericError),
708    UnknownValue(serde_json::Value),
709}
710
711/// struct for typed errors of method [`stages_dummy_update`]
712#[derive(Debug, Clone, Serialize, Deserialize)]
713#[serde(untagged)]
714pub enum StagesDummyUpdateError {
715    Status400(models::ValidationError),
716    Status403(models::GenericError),
717    UnknownValue(serde_json::Value),
718}
719
720/// struct for typed errors of method [`stages_dummy_used_by_list`]
721#[derive(Debug, Clone, Serialize, Deserialize)]
722#[serde(untagged)]
723pub enum StagesDummyUsedByListError {
724    Status400(models::ValidationError),
725    Status403(models::GenericError),
726    UnknownValue(serde_json::Value),
727}
728
729/// struct for typed errors of method [`stages_email_create`]
730#[derive(Debug, Clone, Serialize, Deserialize)]
731#[serde(untagged)]
732pub enum StagesEmailCreateError {
733    Status400(models::ValidationError),
734    Status403(models::GenericError),
735    UnknownValue(serde_json::Value),
736}
737
738/// struct for typed errors of method [`stages_email_destroy`]
739#[derive(Debug, Clone, Serialize, Deserialize)]
740#[serde(untagged)]
741pub enum StagesEmailDestroyError {
742    Status400(models::ValidationError),
743    Status403(models::GenericError),
744    UnknownValue(serde_json::Value),
745}
746
747/// struct for typed errors of method [`stages_email_list`]
748#[derive(Debug, Clone, Serialize, Deserialize)]
749#[serde(untagged)]
750pub enum StagesEmailListError {
751    Status400(models::ValidationError),
752    Status403(models::GenericError),
753    UnknownValue(serde_json::Value),
754}
755
756/// struct for typed errors of method [`stages_email_partial_update`]
757#[derive(Debug, Clone, Serialize, Deserialize)]
758#[serde(untagged)]
759pub enum StagesEmailPartialUpdateError {
760    Status400(models::ValidationError),
761    Status403(models::GenericError),
762    UnknownValue(serde_json::Value),
763}
764
765/// struct for typed errors of method [`stages_email_retrieve`]
766#[derive(Debug, Clone, Serialize, Deserialize)]
767#[serde(untagged)]
768pub enum StagesEmailRetrieveError {
769    Status400(models::ValidationError),
770    Status403(models::GenericError),
771    UnknownValue(serde_json::Value),
772}
773
774/// struct for typed errors of method [`stages_email_templates_list`]
775#[derive(Debug, Clone, Serialize, Deserialize)]
776#[serde(untagged)]
777pub enum StagesEmailTemplatesListError {
778    Status400(models::ValidationError),
779    Status403(models::GenericError),
780    UnknownValue(serde_json::Value),
781}
782
783/// struct for typed errors of method [`stages_email_update`]
784#[derive(Debug, Clone, Serialize, Deserialize)]
785#[serde(untagged)]
786pub enum StagesEmailUpdateError {
787    Status400(models::ValidationError),
788    Status403(models::GenericError),
789    UnknownValue(serde_json::Value),
790}
791
792/// struct for typed errors of method [`stages_email_used_by_list`]
793#[derive(Debug, Clone, Serialize, Deserialize)]
794#[serde(untagged)]
795pub enum StagesEmailUsedByListError {
796    Status400(models::ValidationError),
797    Status403(models::GenericError),
798    UnknownValue(serde_json::Value),
799}
800
801/// struct for typed errors of method [`stages_identification_create`]
802#[derive(Debug, Clone, Serialize, Deserialize)]
803#[serde(untagged)]
804pub enum StagesIdentificationCreateError {
805    Status400(models::ValidationError),
806    Status403(models::GenericError),
807    UnknownValue(serde_json::Value),
808}
809
810/// struct for typed errors of method [`stages_identification_destroy`]
811#[derive(Debug, Clone, Serialize, Deserialize)]
812#[serde(untagged)]
813pub enum StagesIdentificationDestroyError {
814    Status400(models::ValidationError),
815    Status403(models::GenericError),
816    UnknownValue(serde_json::Value),
817}
818
819/// struct for typed errors of method [`stages_identification_list`]
820#[derive(Debug, Clone, Serialize, Deserialize)]
821#[serde(untagged)]
822pub enum StagesIdentificationListError {
823    Status400(models::ValidationError),
824    Status403(models::GenericError),
825    UnknownValue(serde_json::Value),
826}
827
828/// struct for typed errors of method [`stages_identification_partial_update`]
829#[derive(Debug, Clone, Serialize, Deserialize)]
830#[serde(untagged)]
831pub enum StagesIdentificationPartialUpdateError {
832    Status400(models::ValidationError),
833    Status403(models::GenericError),
834    UnknownValue(serde_json::Value),
835}
836
837/// struct for typed errors of method [`stages_identification_retrieve`]
838#[derive(Debug, Clone, Serialize, Deserialize)]
839#[serde(untagged)]
840pub enum StagesIdentificationRetrieveError {
841    Status400(models::ValidationError),
842    Status403(models::GenericError),
843    UnknownValue(serde_json::Value),
844}
845
846/// struct for typed errors of method [`stages_identification_update`]
847#[derive(Debug, Clone, Serialize, Deserialize)]
848#[serde(untagged)]
849pub enum StagesIdentificationUpdateError {
850    Status400(models::ValidationError),
851    Status403(models::GenericError),
852    UnknownValue(serde_json::Value),
853}
854
855/// struct for typed errors of method [`stages_identification_used_by_list`]
856#[derive(Debug, Clone, Serialize, Deserialize)]
857#[serde(untagged)]
858pub enum StagesIdentificationUsedByListError {
859    Status400(models::ValidationError),
860    Status403(models::GenericError),
861    UnknownValue(serde_json::Value),
862}
863
864/// struct for typed errors of method [`stages_invitation_invitations_create`]
865#[derive(Debug, Clone, Serialize, Deserialize)]
866#[serde(untagged)]
867pub enum StagesInvitationInvitationsCreateError {
868    Status400(models::ValidationError),
869    Status403(models::GenericError),
870    UnknownValue(serde_json::Value),
871}
872
873/// struct for typed errors of method [`stages_invitation_invitations_destroy`]
874#[derive(Debug, Clone, Serialize, Deserialize)]
875#[serde(untagged)]
876pub enum StagesInvitationInvitationsDestroyError {
877    Status400(models::ValidationError),
878    Status403(models::GenericError),
879    UnknownValue(serde_json::Value),
880}
881
882/// struct for typed errors of method [`stages_invitation_invitations_list`]
883#[derive(Debug, Clone, Serialize, Deserialize)]
884#[serde(untagged)]
885pub enum StagesInvitationInvitationsListError {
886    Status400(models::ValidationError),
887    Status403(models::GenericError),
888    UnknownValue(serde_json::Value),
889}
890
891/// struct for typed errors of method [`stages_invitation_invitations_partial_update`]
892#[derive(Debug, Clone, Serialize, Deserialize)]
893#[serde(untagged)]
894pub enum StagesInvitationInvitationsPartialUpdateError {
895    Status400(models::ValidationError),
896    Status403(models::GenericError),
897    UnknownValue(serde_json::Value),
898}
899
900/// struct for typed errors of method [`stages_invitation_invitations_retrieve`]
901#[derive(Debug, Clone, Serialize, Deserialize)]
902#[serde(untagged)]
903pub enum StagesInvitationInvitationsRetrieveError {
904    Status400(models::ValidationError),
905    Status403(models::GenericError),
906    UnknownValue(serde_json::Value),
907}
908
909/// struct for typed errors of method [`stages_invitation_invitations_update`]
910#[derive(Debug, Clone, Serialize, Deserialize)]
911#[serde(untagged)]
912pub enum StagesInvitationInvitationsUpdateError {
913    Status400(models::ValidationError),
914    Status403(models::GenericError),
915    UnknownValue(serde_json::Value),
916}
917
918/// struct for typed errors of method [`stages_invitation_invitations_used_by_list`]
919#[derive(Debug, Clone, Serialize, Deserialize)]
920#[serde(untagged)]
921pub enum StagesInvitationInvitationsUsedByListError {
922    Status400(models::ValidationError),
923    Status403(models::GenericError),
924    UnknownValue(serde_json::Value),
925}
926
927/// struct for typed errors of method [`stages_invitation_stages_create`]
928#[derive(Debug, Clone, Serialize, Deserialize)]
929#[serde(untagged)]
930pub enum StagesInvitationStagesCreateError {
931    Status400(models::ValidationError),
932    Status403(models::GenericError),
933    UnknownValue(serde_json::Value),
934}
935
936/// struct for typed errors of method [`stages_invitation_stages_destroy`]
937#[derive(Debug, Clone, Serialize, Deserialize)]
938#[serde(untagged)]
939pub enum StagesInvitationStagesDestroyError {
940    Status400(models::ValidationError),
941    Status403(models::GenericError),
942    UnknownValue(serde_json::Value),
943}
944
945/// struct for typed errors of method [`stages_invitation_stages_list`]
946#[derive(Debug, Clone, Serialize, Deserialize)]
947#[serde(untagged)]
948pub enum StagesInvitationStagesListError {
949    Status400(models::ValidationError),
950    Status403(models::GenericError),
951    UnknownValue(serde_json::Value),
952}
953
954/// struct for typed errors of method [`stages_invitation_stages_partial_update`]
955#[derive(Debug, Clone, Serialize, Deserialize)]
956#[serde(untagged)]
957pub enum StagesInvitationStagesPartialUpdateError {
958    Status400(models::ValidationError),
959    Status403(models::GenericError),
960    UnknownValue(serde_json::Value),
961}
962
963/// struct for typed errors of method [`stages_invitation_stages_retrieve`]
964#[derive(Debug, Clone, Serialize, Deserialize)]
965#[serde(untagged)]
966pub enum StagesInvitationStagesRetrieveError {
967    Status400(models::ValidationError),
968    Status403(models::GenericError),
969    UnknownValue(serde_json::Value),
970}
971
972/// struct for typed errors of method [`stages_invitation_stages_update`]
973#[derive(Debug, Clone, Serialize, Deserialize)]
974#[serde(untagged)]
975pub enum StagesInvitationStagesUpdateError {
976    Status400(models::ValidationError),
977    Status403(models::GenericError),
978    UnknownValue(serde_json::Value),
979}
980
981/// struct for typed errors of method [`stages_invitation_stages_used_by_list`]
982#[derive(Debug, Clone, Serialize, Deserialize)]
983#[serde(untagged)]
984pub enum StagesInvitationStagesUsedByListError {
985    Status400(models::ValidationError),
986    Status403(models::GenericError),
987    UnknownValue(serde_json::Value),
988}
989
990/// struct for typed errors of method [`stages_password_create`]
991#[derive(Debug, Clone, Serialize, Deserialize)]
992#[serde(untagged)]
993pub enum StagesPasswordCreateError {
994    Status400(models::ValidationError),
995    Status403(models::GenericError),
996    UnknownValue(serde_json::Value),
997}
998
999/// struct for typed errors of method [`stages_password_destroy`]
1000#[derive(Debug, Clone, Serialize, Deserialize)]
1001#[serde(untagged)]
1002pub enum StagesPasswordDestroyError {
1003    Status400(models::ValidationError),
1004    Status403(models::GenericError),
1005    UnknownValue(serde_json::Value),
1006}
1007
1008/// struct for typed errors of method [`stages_password_list`]
1009#[derive(Debug, Clone, Serialize, Deserialize)]
1010#[serde(untagged)]
1011pub enum StagesPasswordListError {
1012    Status400(models::ValidationError),
1013    Status403(models::GenericError),
1014    UnknownValue(serde_json::Value),
1015}
1016
1017/// struct for typed errors of method [`stages_password_partial_update`]
1018#[derive(Debug, Clone, Serialize, Deserialize)]
1019#[serde(untagged)]
1020pub enum StagesPasswordPartialUpdateError {
1021    Status400(models::ValidationError),
1022    Status403(models::GenericError),
1023    UnknownValue(serde_json::Value),
1024}
1025
1026/// struct for typed errors of method [`stages_password_retrieve`]
1027#[derive(Debug, Clone, Serialize, Deserialize)]
1028#[serde(untagged)]
1029pub enum StagesPasswordRetrieveError {
1030    Status400(models::ValidationError),
1031    Status403(models::GenericError),
1032    UnknownValue(serde_json::Value),
1033}
1034
1035/// struct for typed errors of method [`stages_password_update`]
1036#[derive(Debug, Clone, Serialize, Deserialize)]
1037#[serde(untagged)]
1038pub enum StagesPasswordUpdateError {
1039    Status400(models::ValidationError),
1040    Status403(models::GenericError),
1041    UnknownValue(serde_json::Value),
1042}
1043
1044/// struct for typed errors of method [`stages_password_used_by_list`]
1045#[derive(Debug, Clone, Serialize, Deserialize)]
1046#[serde(untagged)]
1047pub enum StagesPasswordUsedByListError {
1048    Status400(models::ValidationError),
1049    Status403(models::GenericError),
1050    UnknownValue(serde_json::Value),
1051}
1052
1053/// struct for typed errors of method [`stages_prompt_prompts_create`]
1054#[derive(Debug, Clone, Serialize, Deserialize)]
1055#[serde(untagged)]
1056pub enum StagesPromptPromptsCreateError {
1057    Status400(models::ValidationError),
1058    Status403(models::GenericError),
1059    UnknownValue(serde_json::Value),
1060}
1061
1062/// struct for typed errors of method [`stages_prompt_prompts_destroy`]
1063#[derive(Debug, Clone, Serialize, Deserialize)]
1064#[serde(untagged)]
1065pub enum StagesPromptPromptsDestroyError {
1066    Status400(models::ValidationError),
1067    Status403(models::GenericError),
1068    UnknownValue(serde_json::Value),
1069}
1070
1071/// struct for typed errors of method [`stages_prompt_prompts_list`]
1072#[derive(Debug, Clone, Serialize, Deserialize)]
1073#[serde(untagged)]
1074pub enum StagesPromptPromptsListError {
1075    Status400(models::ValidationError),
1076    Status403(models::GenericError),
1077    UnknownValue(serde_json::Value),
1078}
1079
1080/// struct for typed errors of method [`stages_prompt_prompts_partial_update`]
1081#[derive(Debug, Clone, Serialize, Deserialize)]
1082#[serde(untagged)]
1083pub enum StagesPromptPromptsPartialUpdateError {
1084    Status400(models::ValidationError),
1085    Status403(models::GenericError),
1086    UnknownValue(serde_json::Value),
1087}
1088
1089/// struct for typed errors of method [`stages_prompt_prompts_preview_create`]
1090#[derive(Debug, Clone, Serialize, Deserialize)]
1091#[serde(untagged)]
1092pub enum StagesPromptPromptsPreviewCreateError {
1093    Status400(models::ValidationError),
1094    Status403(models::GenericError),
1095    UnknownValue(serde_json::Value),
1096}
1097
1098/// struct for typed errors of method [`stages_prompt_prompts_retrieve`]
1099#[derive(Debug, Clone, Serialize, Deserialize)]
1100#[serde(untagged)]
1101pub enum StagesPromptPromptsRetrieveError {
1102    Status400(models::ValidationError),
1103    Status403(models::GenericError),
1104    UnknownValue(serde_json::Value),
1105}
1106
1107/// struct for typed errors of method [`stages_prompt_prompts_update`]
1108#[derive(Debug, Clone, Serialize, Deserialize)]
1109#[serde(untagged)]
1110pub enum StagesPromptPromptsUpdateError {
1111    Status400(models::ValidationError),
1112    Status403(models::GenericError),
1113    UnknownValue(serde_json::Value),
1114}
1115
1116/// struct for typed errors of method [`stages_prompt_prompts_used_by_list`]
1117#[derive(Debug, Clone, Serialize, Deserialize)]
1118#[serde(untagged)]
1119pub enum StagesPromptPromptsUsedByListError {
1120    Status400(models::ValidationError),
1121    Status403(models::GenericError),
1122    UnknownValue(serde_json::Value),
1123}
1124
1125/// struct for typed errors of method [`stages_prompt_stages_create`]
1126#[derive(Debug, Clone, Serialize, Deserialize)]
1127#[serde(untagged)]
1128pub enum StagesPromptStagesCreateError {
1129    Status400(models::ValidationError),
1130    Status403(models::GenericError),
1131    UnknownValue(serde_json::Value),
1132}
1133
1134/// struct for typed errors of method [`stages_prompt_stages_destroy`]
1135#[derive(Debug, Clone, Serialize, Deserialize)]
1136#[serde(untagged)]
1137pub enum StagesPromptStagesDestroyError {
1138    Status400(models::ValidationError),
1139    Status403(models::GenericError),
1140    UnknownValue(serde_json::Value),
1141}
1142
1143/// struct for typed errors of method [`stages_prompt_stages_list`]
1144#[derive(Debug, Clone, Serialize, Deserialize)]
1145#[serde(untagged)]
1146pub enum StagesPromptStagesListError {
1147    Status400(models::ValidationError),
1148    Status403(models::GenericError),
1149    UnknownValue(serde_json::Value),
1150}
1151
1152/// struct for typed errors of method [`stages_prompt_stages_partial_update`]
1153#[derive(Debug, Clone, Serialize, Deserialize)]
1154#[serde(untagged)]
1155pub enum StagesPromptStagesPartialUpdateError {
1156    Status400(models::ValidationError),
1157    Status403(models::GenericError),
1158    UnknownValue(serde_json::Value),
1159}
1160
1161/// struct for typed errors of method [`stages_prompt_stages_retrieve`]
1162#[derive(Debug, Clone, Serialize, Deserialize)]
1163#[serde(untagged)]
1164pub enum StagesPromptStagesRetrieveError {
1165    Status400(models::ValidationError),
1166    Status403(models::GenericError),
1167    UnknownValue(serde_json::Value),
1168}
1169
1170/// struct for typed errors of method [`stages_prompt_stages_update`]
1171#[derive(Debug, Clone, Serialize, Deserialize)]
1172#[serde(untagged)]
1173pub enum StagesPromptStagesUpdateError {
1174    Status400(models::ValidationError),
1175    Status403(models::GenericError),
1176    UnknownValue(serde_json::Value),
1177}
1178
1179/// struct for typed errors of method [`stages_prompt_stages_used_by_list`]
1180#[derive(Debug, Clone, Serialize, Deserialize)]
1181#[serde(untagged)]
1182pub enum StagesPromptStagesUsedByListError {
1183    Status400(models::ValidationError),
1184    Status403(models::GenericError),
1185    UnknownValue(serde_json::Value),
1186}
1187
1188/// struct for typed errors of method [`stages_user_delete_create`]
1189#[derive(Debug, Clone, Serialize, Deserialize)]
1190#[serde(untagged)]
1191pub enum StagesUserDeleteCreateError {
1192    Status400(models::ValidationError),
1193    Status403(models::GenericError),
1194    UnknownValue(serde_json::Value),
1195}
1196
1197/// struct for typed errors of method [`stages_user_delete_destroy`]
1198#[derive(Debug, Clone, Serialize, Deserialize)]
1199#[serde(untagged)]
1200pub enum StagesUserDeleteDestroyError {
1201    Status400(models::ValidationError),
1202    Status403(models::GenericError),
1203    UnknownValue(serde_json::Value),
1204}
1205
1206/// struct for typed errors of method [`stages_user_delete_list`]
1207#[derive(Debug, Clone, Serialize, Deserialize)]
1208#[serde(untagged)]
1209pub enum StagesUserDeleteListError {
1210    Status400(models::ValidationError),
1211    Status403(models::GenericError),
1212    UnknownValue(serde_json::Value),
1213}
1214
1215/// struct for typed errors of method [`stages_user_delete_partial_update`]
1216#[derive(Debug, Clone, Serialize, Deserialize)]
1217#[serde(untagged)]
1218pub enum StagesUserDeletePartialUpdateError {
1219    Status400(models::ValidationError),
1220    Status403(models::GenericError),
1221    UnknownValue(serde_json::Value),
1222}
1223
1224/// struct for typed errors of method [`stages_user_delete_retrieve`]
1225#[derive(Debug, Clone, Serialize, Deserialize)]
1226#[serde(untagged)]
1227pub enum StagesUserDeleteRetrieveError {
1228    Status400(models::ValidationError),
1229    Status403(models::GenericError),
1230    UnknownValue(serde_json::Value),
1231}
1232
1233/// struct for typed errors of method [`stages_user_delete_update`]
1234#[derive(Debug, Clone, Serialize, Deserialize)]
1235#[serde(untagged)]
1236pub enum StagesUserDeleteUpdateError {
1237    Status400(models::ValidationError),
1238    Status403(models::GenericError),
1239    UnknownValue(serde_json::Value),
1240}
1241
1242/// struct for typed errors of method [`stages_user_delete_used_by_list`]
1243#[derive(Debug, Clone, Serialize, Deserialize)]
1244#[serde(untagged)]
1245pub enum StagesUserDeleteUsedByListError {
1246    Status400(models::ValidationError),
1247    Status403(models::GenericError),
1248    UnknownValue(serde_json::Value),
1249}
1250
1251/// struct for typed errors of method [`stages_user_login_create`]
1252#[derive(Debug, Clone, Serialize, Deserialize)]
1253#[serde(untagged)]
1254pub enum StagesUserLoginCreateError {
1255    Status400(models::ValidationError),
1256    Status403(models::GenericError),
1257    UnknownValue(serde_json::Value),
1258}
1259
1260/// struct for typed errors of method [`stages_user_login_destroy`]
1261#[derive(Debug, Clone, Serialize, Deserialize)]
1262#[serde(untagged)]
1263pub enum StagesUserLoginDestroyError {
1264    Status400(models::ValidationError),
1265    Status403(models::GenericError),
1266    UnknownValue(serde_json::Value),
1267}
1268
1269/// struct for typed errors of method [`stages_user_login_list`]
1270#[derive(Debug, Clone, Serialize, Deserialize)]
1271#[serde(untagged)]
1272pub enum StagesUserLoginListError {
1273    Status400(models::ValidationError),
1274    Status403(models::GenericError),
1275    UnknownValue(serde_json::Value),
1276}
1277
1278/// struct for typed errors of method [`stages_user_login_partial_update`]
1279#[derive(Debug, Clone, Serialize, Deserialize)]
1280#[serde(untagged)]
1281pub enum StagesUserLoginPartialUpdateError {
1282    Status400(models::ValidationError),
1283    Status403(models::GenericError),
1284    UnknownValue(serde_json::Value),
1285}
1286
1287/// struct for typed errors of method [`stages_user_login_retrieve`]
1288#[derive(Debug, Clone, Serialize, Deserialize)]
1289#[serde(untagged)]
1290pub enum StagesUserLoginRetrieveError {
1291    Status400(models::ValidationError),
1292    Status403(models::GenericError),
1293    UnknownValue(serde_json::Value),
1294}
1295
1296/// struct for typed errors of method [`stages_user_login_update`]
1297#[derive(Debug, Clone, Serialize, Deserialize)]
1298#[serde(untagged)]
1299pub enum StagesUserLoginUpdateError {
1300    Status400(models::ValidationError),
1301    Status403(models::GenericError),
1302    UnknownValue(serde_json::Value),
1303}
1304
1305/// struct for typed errors of method [`stages_user_login_used_by_list`]
1306#[derive(Debug, Clone, Serialize, Deserialize)]
1307#[serde(untagged)]
1308pub enum StagesUserLoginUsedByListError {
1309    Status400(models::ValidationError),
1310    Status403(models::GenericError),
1311    UnknownValue(serde_json::Value),
1312}
1313
1314/// struct for typed errors of method [`stages_user_logout_create`]
1315#[derive(Debug, Clone, Serialize, Deserialize)]
1316#[serde(untagged)]
1317pub enum StagesUserLogoutCreateError {
1318    Status400(models::ValidationError),
1319    Status403(models::GenericError),
1320    UnknownValue(serde_json::Value),
1321}
1322
1323/// struct for typed errors of method [`stages_user_logout_destroy`]
1324#[derive(Debug, Clone, Serialize, Deserialize)]
1325#[serde(untagged)]
1326pub enum StagesUserLogoutDestroyError {
1327    Status400(models::ValidationError),
1328    Status403(models::GenericError),
1329    UnknownValue(serde_json::Value),
1330}
1331
1332/// struct for typed errors of method [`stages_user_logout_list`]
1333#[derive(Debug, Clone, Serialize, Deserialize)]
1334#[serde(untagged)]
1335pub enum StagesUserLogoutListError {
1336    Status400(models::ValidationError),
1337    Status403(models::GenericError),
1338    UnknownValue(serde_json::Value),
1339}
1340
1341/// struct for typed errors of method [`stages_user_logout_partial_update`]
1342#[derive(Debug, Clone, Serialize, Deserialize)]
1343#[serde(untagged)]
1344pub enum StagesUserLogoutPartialUpdateError {
1345    Status400(models::ValidationError),
1346    Status403(models::GenericError),
1347    UnknownValue(serde_json::Value),
1348}
1349
1350/// struct for typed errors of method [`stages_user_logout_retrieve`]
1351#[derive(Debug, Clone, Serialize, Deserialize)]
1352#[serde(untagged)]
1353pub enum StagesUserLogoutRetrieveError {
1354    Status400(models::ValidationError),
1355    Status403(models::GenericError),
1356    UnknownValue(serde_json::Value),
1357}
1358
1359/// struct for typed errors of method [`stages_user_logout_update`]
1360#[derive(Debug, Clone, Serialize, Deserialize)]
1361#[serde(untagged)]
1362pub enum StagesUserLogoutUpdateError {
1363    Status400(models::ValidationError),
1364    Status403(models::GenericError),
1365    UnknownValue(serde_json::Value),
1366}
1367
1368/// struct for typed errors of method [`stages_user_logout_used_by_list`]
1369#[derive(Debug, Clone, Serialize, Deserialize)]
1370#[serde(untagged)]
1371pub enum StagesUserLogoutUsedByListError {
1372    Status400(models::ValidationError),
1373    Status403(models::GenericError),
1374    UnknownValue(serde_json::Value),
1375}
1376
1377/// struct for typed errors of method [`stages_user_write_create`]
1378#[derive(Debug, Clone, Serialize, Deserialize)]
1379#[serde(untagged)]
1380pub enum StagesUserWriteCreateError {
1381    Status400(models::ValidationError),
1382    Status403(models::GenericError),
1383    UnknownValue(serde_json::Value),
1384}
1385
1386/// struct for typed errors of method [`stages_user_write_destroy`]
1387#[derive(Debug, Clone, Serialize, Deserialize)]
1388#[serde(untagged)]
1389pub enum StagesUserWriteDestroyError {
1390    Status400(models::ValidationError),
1391    Status403(models::GenericError),
1392    UnknownValue(serde_json::Value),
1393}
1394
1395/// struct for typed errors of method [`stages_user_write_list`]
1396#[derive(Debug, Clone, Serialize, Deserialize)]
1397#[serde(untagged)]
1398pub enum StagesUserWriteListError {
1399    Status400(models::ValidationError),
1400    Status403(models::GenericError),
1401    UnknownValue(serde_json::Value),
1402}
1403
1404/// struct for typed errors of method [`stages_user_write_partial_update`]
1405#[derive(Debug, Clone, Serialize, Deserialize)]
1406#[serde(untagged)]
1407pub enum StagesUserWritePartialUpdateError {
1408    Status400(models::ValidationError),
1409    Status403(models::GenericError),
1410    UnknownValue(serde_json::Value),
1411}
1412
1413/// struct for typed errors of method [`stages_user_write_retrieve`]
1414#[derive(Debug, Clone, Serialize, Deserialize)]
1415#[serde(untagged)]
1416pub enum StagesUserWriteRetrieveError {
1417    Status400(models::ValidationError),
1418    Status403(models::GenericError),
1419    UnknownValue(serde_json::Value),
1420}
1421
1422/// struct for typed errors of method [`stages_user_write_update`]
1423#[derive(Debug, Clone, Serialize, Deserialize)]
1424#[serde(untagged)]
1425pub enum StagesUserWriteUpdateError {
1426    Status400(models::ValidationError),
1427    Status403(models::GenericError),
1428    UnknownValue(serde_json::Value),
1429}
1430
1431/// struct for typed errors of method [`stages_user_write_used_by_list`]
1432#[derive(Debug, Clone, Serialize, Deserialize)]
1433#[serde(untagged)]
1434pub enum StagesUserWriteUsedByListError {
1435    Status400(models::ValidationError),
1436    Status403(models::GenericError),
1437    UnknownValue(serde_json::Value),
1438}
1439
1440
1441/// Stage Viewset
1442pub async fn stages_all_destroy(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<(), Error<StagesAllDestroyError>> {
1443    let local_var_configuration = configuration;
1444
1445    let local_var_client = &local_var_configuration.client;
1446
1447    let local_var_uri_str = format!("{}/stages/all/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
1448    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1449
1450    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1451        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1452    }
1453    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
1454        let local_var_key = local_var_apikey.key.clone();
1455        let local_var_value = match local_var_apikey.prefix {
1456            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
1457            None => local_var_key,
1458        };
1459        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
1460    };
1461
1462    let local_var_req = local_var_req_builder.build()?;
1463    let local_var_resp = local_var_client.execute(local_var_req).await?;
1464
1465    let local_var_status = local_var_resp.status();
1466    let local_var_content = local_var_resp.text().await?;
1467
1468    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1469        Ok(())
1470    } else {
1471        let local_var_entity: Option<StagesAllDestroyError> = serde_json::from_str(&local_var_content).ok();
1472        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1473        Err(Error::ResponseError(local_var_error))
1474    }
1475}
1476
1477/// Stage Viewset
1478pub async fn stages_all_list(configuration: &configuration::Configuration, name: Option<&str>, ordering: Option<&str>, page: Option<i32>, page_size: Option<i32>, search: Option<&str>) -> Result<models::PaginatedStageList, Error<StagesAllListError>> {
1479    let local_var_configuration = configuration;
1480
1481    let local_var_client = &local_var_configuration.client;
1482
1483    let local_var_uri_str = format!("{}/stages/all/", local_var_configuration.base_path);
1484    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1485
1486    if let Some(ref local_var_str) = name {
1487        local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
1488    }
1489    if let Some(ref local_var_str) = ordering {
1490        local_var_req_builder = local_var_req_builder.query(&[("ordering", &local_var_str.to_string())]);
1491    }
1492    if let Some(ref local_var_str) = page {
1493        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
1494    }
1495    if let Some(ref local_var_str) = page_size {
1496        local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]);
1497    }
1498    if let Some(ref local_var_str) = search {
1499        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
1500    }
1501    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1502        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1503    }
1504    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
1505        let local_var_key = local_var_apikey.key.clone();
1506        let local_var_value = match local_var_apikey.prefix {
1507            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
1508            None => local_var_key,
1509        };
1510        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
1511    };
1512
1513    let local_var_req = local_var_req_builder.build()?;
1514    let local_var_resp = local_var_client.execute(local_var_req).await?;
1515
1516    let local_var_status = local_var_resp.status();
1517    let local_var_content = local_var_resp.text().await?;
1518
1519    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1520        serde_json::from_str(&local_var_content).map_err(Error::from)
1521    } else {
1522        let local_var_entity: Option<StagesAllListError> = serde_json::from_str(&local_var_content).ok();
1523        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1524        Err(Error::ResponseError(local_var_error))
1525    }
1526}
1527
1528/// Stage Viewset
1529pub async fn stages_all_retrieve(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<models::Stage, Error<StagesAllRetrieveError>> {
1530    let local_var_configuration = configuration;
1531
1532    let local_var_client = &local_var_configuration.client;
1533
1534    let local_var_uri_str = format!("{}/stages/all/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
1535    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1536
1537    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1538        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1539    }
1540    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
1541        let local_var_key = local_var_apikey.key.clone();
1542        let local_var_value = match local_var_apikey.prefix {
1543            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
1544            None => local_var_key,
1545        };
1546        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
1547    };
1548
1549    let local_var_req = local_var_req_builder.build()?;
1550    let local_var_resp = local_var_client.execute(local_var_req).await?;
1551
1552    let local_var_status = local_var_resp.status();
1553    let local_var_content = local_var_resp.text().await?;
1554
1555    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1556        serde_json::from_str(&local_var_content).map_err(Error::from)
1557    } else {
1558        let local_var_entity: Option<StagesAllRetrieveError> = serde_json::from_str(&local_var_content).ok();
1559        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1560        Err(Error::ResponseError(local_var_error))
1561    }
1562}
1563
1564/// Get all creatable stage types
1565pub async fn stages_all_types_list(configuration: &configuration::Configuration, ) -> Result<Vec<models::TypeCreate>, Error<StagesAllTypesListError>> {
1566    let local_var_configuration = configuration;
1567
1568    let local_var_client = &local_var_configuration.client;
1569
1570    let local_var_uri_str = format!("{}/stages/all/types/", local_var_configuration.base_path);
1571    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1572
1573    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1574        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1575    }
1576    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
1577        let local_var_key = local_var_apikey.key.clone();
1578        let local_var_value = match local_var_apikey.prefix {
1579            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
1580            None => local_var_key,
1581        };
1582        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
1583    };
1584
1585    let local_var_req = local_var_req_builder.build()?;
1586    let local_var_resp = local_var_client.execute(local_var_req).await?;
1587
1588    let local_var_status = local_var_resp.status();
1589    let local_var_content = local_var_resp.text().await?;
1590
1591    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1592        serde_json::from_str(&local_var_content).map_err(Error::from)
1593    } else {
1594        let local_var_entity: Option<StagesAllTypesListError> = serde_json::from_str(&local_var_content).ok();
1595        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1596        Err(Error::ResponseError(local_var_error))
1597    }
1598}
1599
1600/// Get a list of all objects that use this object
1601pub async fn stages_all_used_by_list(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<Vec<models::UsedBy>, Error<StagesAllUsedByListError>> {
1602    let local_var_configuration = configuration;
1603
1604    let local_var_client = &local_var_configuration.client;
1605
1606    let local_var_uri_str = format!("{}/stages/all/{stage_uuid}/used_by/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
1607    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1608
1609    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1610        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1611    }
1612    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
1613        let local_var_key = local_var_apikey.key.clone();
1614        let local_var_value = match local_var_apikey.prefix {
1615            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
1616            None => local_var_key,
1617        };
1618        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
1619    };
1620
1621    let local_var_req = local_var_req_builder.build()?;
1622    let local_var_resp = local_var_client.execute(local_var_req).await?;
1623
1624    let local_var_status = local_var_resp.status();
1625    let local_var_content = local_var_resp.text().await?;
1626
1627    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1628        serde_json::from_str(&local_var_content).map_err(Error::from)
1629    } else {
1630        let local_var_entity: Option<StagesAllUsedByListError> = serde_json::from_str(&local_var_content).ok();
1631        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1632        Err(Error::ResponseError(local_var_error))
1633    }
1634}
1635
1636/// Get all stages the user can configure
1637pub async fn stages_all_user_settings_list(configuration: &configuration::Configuration, ) -> Result<Vec<models::UserSetting>, Error<StagesAllUserSettingsListError>> {
1638    let local_var_configuration = configuration;
1639
1640    let local_var_client = &local_var_configuration.client;
1641
1642    let local_var_uri_str = format!("{}/stages/all/user_settings/", local_var_configuration.base_path);
1643    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1644
1645    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1646        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1647    }
1648    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
1649        let local_var_key = local_var_apikey.key.clone();
1650        let local_var_value = match local_var_apikey.prefix {
1651            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
1652            None => local_var_key,
1653        };
1654        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
1655    };
1656
1657    let local_var_req = local_var_req_builder.build()?;
1658    let local_var_resp = local_var_client.execute(local_var_req).await?;
1659
1660    let local_var_status = local_var_resp.status();
1661    let local_var_content = local_var_resp.text().await?;
1662
1663    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1664        serde_json::from_str(&local_var_content).map_err(Error::from)
1665    } else {
1666        let local_var_entity: Option<StagesAllUserSettingsListError> = serde_json::from_str(&local_var_content).ok();
1667        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1668        Err(Error::ResponseError(local_var_error))
1669    }
1670}
1671
1672/// AuthenticatorDuoStage Viewset
1673pub async fn stages_authenticator_duo_create(configuration: &configuration::Configuration, authenticator_duo_stage_request: models::AuthenticatorDuoStageRequest) -> Result<models::AuthenticatorDuoStage, Error<StagesAuthenticatorDuoCreateError>> {
1674    let local_var_configuration = configuration;
1675
1676    let local_var_client = &local_var_configuration.client;
1677
1678    let local_var_uri_str = format!("{}/stages/authenticator/duo/", local_var_configuration.base_path);
1679    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1680
1681    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1682        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1683    }
1684    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
1685        let local_var_key = local_var_apikey.key.clone();
1686        let local_var_value = match local_var_apikey.prefix {
1687            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
1688            None => local_var_key,
1689        };
1690        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
1691    };
1692    local_var_req_builder = local_var_req_builder.json(&authenticator_duo_stage_request);
1693
1694    let local_var_req = local_var_req_builder.build()?;
1695    let local_var_resp = local_var_client.execute(local_var_req).await?;
1696
1697    let local_var_status = local_var_resp.status();
1698    let local_var_content = local_var_resp.text().await?;
1699
1700    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1701        serde_json::from_str(&local_var_content).map_err(Error::from)
1702    } else {
1703        let local_var_entity: Option<StagesAuthenticatorDuoCreateError> = serde_json::from_str(&local_var_content).ok();
1704        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1705        Err(Error::ResponseError(local_var_error))
1706    }
1707}
1708
1709/// AuthenticatorDuoStage Viewset
1710pub async fn stages_authenticator_duo_destroy(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<(), Error<StagesAuthenticatorDuoDestroyError>> {
1711    let local_var_configuration = configuration;
1712
1713    let local_var_client = &local_var_configuration.client;
1714
1715    let local_var_uri_str = format!("{}/stages/authenticator/duo/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
1716    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1717
1718    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1719        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1720    }
1721    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
1722        let local_var_key = local_var_apikey.key.clone();
1723        let local_var_value = match local_var_apikey.prefix {
1724            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
1725            None => local_var_key,
1726        };
1727        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
1728    };
1729
1730    let local_var_req = local_var_req_builder.build()?;
1731    let local_var_resp = local_var_client.execute(local_var_req).await?;
1732
1733    let local_var_status = local_var_resp.status();
1734    let local_var_content = local_var_resp.text().await?;
1735
1736    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1737        Ok(())
1738    } else {
1739        let local_var_entity: Option<StagesAuthenticatorDuoDestroyError> = serde_json::from_str(&local_var_content).ok();
1740        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1741        Err(Error::ResponseError(local_var_error))
1742    }
1743}
1744
1745/// Check enrollment status of user details in current session
1746pub async fn stages_authenticator_duo_enrollment_status_create(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<models::DuoDeviceEnrollmentStatus, Error<StagesAuthenticatorDuoEnrollmentStatusCreateError>> {
1747    let local_var_configuration = configuration;
1748
1749    let local_var_client = &local_var_configuration.client;
1750
1751    let local_var_uri_str = format!("{}/stages/authenticator/duo/{stage_uuid}/enrollment_status/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
1752    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1753
1754    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1755        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1756    }
1757    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
1758        let local_var_key = local_var_apikey.key.clone();
1759        let local_var_value = match local_var_apikey.prefix {
1760            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
1761            None => local_var_key,
1762        };
1763        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
1764    };
1765
1766    let local_var_req = local_var_req_builder.build()?;
1767    let local_var_resp = local_var_client.execute(local_var_req).await?;
1768
1769    let local_var_status = local_var_resp.status();
1770    let local_var_content = local_var_resp.text().await?;
1771
1772    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1773        serde_json::from_str(&local_var_content).map_err(Error::from)
1774    } else {
1775        let local_var_entity: Option<StagesAuthenticatorDuoEnrollmentStatusCreateError> = serde_json::from_str(&local_var_content).ok();
1776        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1777        Err(Error::ResponseError(local_var_error))
1778    }
1779}
1780
1781/// Import duo devices into authentik
1782pub async fn stages_authenticator_duo_import_device_manual_create(configuration: &configuration::Configuration, stage_uuid: &str, authenticator_duo_stage_manual_device_import_request: models::AuthenticatorDuoStageManualDeviceImportRequest) -> Result<(), Error<StagesAuthenticatorDuoImportDeviceManualCreateError>> {
1783    let local_var_configuration = configuration;
1784
1785    let local_var_client = &local_var_configuration.client;
1786
1787    let local_var_uri_str = format!("{}/stages/authenticator/duo/{stage_uuid}/import_device_manual/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
1788    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1789
1790    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1791        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1792    }
1793    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
1794        let local_var_key = local_var_apikey.key.clone();
1795        let local_var_value = match local_var_apikey.prefix {
1796            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
1797            None => local_var_key,
1798        };
1799        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
1800    };
1801    local_var_req_builder = local_var_req_builder.json(&authenticator_duo_stage_manual_device_import_request);
1802
1803    let local_var_req = local_var_req_builder.build()?;
1804    let local_var_resp = local_var_client.execute(local_var_req).await?;
1805
1806    let local_var_status = local_var_resp.status();
1807    let local_var_content = local_var_resp.text().await?;
1808
1809    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1810        Ok(())
1811    } else {
1812        let local_var_entity: Option<StagesAuthenticatorDuoImportDeviceManualCreateError> = serde_json::from_str(&local_var_content).ok();
1813        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1814        Err(Error::ResponseError(local_var_error))
1815    }
1816}
1817
1818/// Import duo devices into authentik
1819pub async fn stages_authenticator_duo_import_devices_automatic_create(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<models::AuthenticatorDuoStageDeviceImportResponse, Error<StagesAuthenticatorDuoImportDevicesAutomaticCreateError>> {
1820    let local_var_configuration = configuration;
1821
1822    let local_var_client = &local_var_configuration.client;
1823
1824    let local_var_uri_str = format!("{}/stages/authenticator/duo/{stage_uuid}/import_devices_automatic/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
1825    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1826
1827    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1828        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1829    }
1830    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
1831        let local_var_key = local_var_apikey.key.clone();
1832        let local_var_value = match local_var_apikey.prefix {
1833            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
1834            None => local_var_key,
1835        };
1836        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
1837    };
1838
1839    let local_var_req = local_var_req_builder.build()?;
1840    let local_var_resp = local_var_client.execute(local_var_req).await?;
1841
1842    let local_var_status = local_var_resp.status();
1843    let local_var_content = local_var_resp.text().await?;
1844
1845    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1846        serde_json::from_str(&local_var_content).map_err(Error::from)
1847    } else {
1848        let local_var_entity: Option<StagesAuthenticatorDuoImportDevicesAutomaticCreateError> = serde_json::from_str(&local_var_content).ok();
1849        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1850        Err(Error::ResponseError(local_var_error))
1851    }
1852}
1853
1854/// AuthenticatorDuoStage Viewset
1855pub async fn stages_authenticator_duo_list(configuration: &configuration::Configuration, api_hostname: Option<&str>, client_id: Option<&str>, configure_flow: Option<&str>, name: Option<&str>, ordering: Option<&str>, page: Option<i32>, page_size: Option<i32>, search: Option<&str>) -> Result<models::PaginatedAuthenticatorDuoStageList, Error<StagesAuthenticatorDuoListError>> {
1856    let local_var_configuration = configuration;
1857
1858    let local_var_client = &local_var_configuration.client;
1859
1860    let local_var_uri_str = format!("{}/stages/authenticator/duo/", local_var_configuration.base_path);
1861    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1862
1863    if let Some(ref local_var_str) = api_hostname {
1864        local_var_req_builder = local_var_req_builder.query(&[("api_hostname", &local_var_str.to_string())]);
1865    }
1866    if let Some(ref local_var_str) = client_id {
1867        local_var_req_builder = local_var_req_builder.query(&[("client_id", &local_var_str.to_string())]);
1868    }
1869    if let Some(ref local_var_str) = configure_flow {
1870        local_var_req_builder = local_var_req_builder.query(&[("configure_flow", &local_var_str.to_string())]);
1871    }
1872    if let Some(ref local_var_str) = name {
1873        local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
1874    }
1875    if let Some(ref local_var_str) = ordering {
1876        local_var_req_builder = local_var_req_builder.query(&[("ordering", &local_var_str.to_string())]);
1877    }
1878    if let Some(ref local_var_str) = page {
1879        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
1880    }
1881    if let Some(ref local_var_str) = page_size {
1882        local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]);
1883    }
1884    if let Some(ref local_var_str) = search {
1885        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
1886    }
1887    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1888        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1889    }
1890    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
1891        let local_var_key = local_var_apikey.key.clone();
1892        let local_var_value = match local_var_apikey.prefix {
1893            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
1894            None => local_var_key,
1895        };
1896        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
1897    };
1898
1899    let local_var_req = local_var_req_builder.build()?;
1900    let local_var_resp = local_var_client.execute(local_var_req).await?;
1901
1902    let local_var_status = local_var_resp.status();
1903    let local_var_content = local_var_resp.text().await?;
1904
1905    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1906        serde_json::from_str(&local_var_content).map_err(Error::from)
1907    } else {
1908        let local_var_entity: Option<StagesAuthenticatorDuoListError> = serde_json::from_str(&local_var_content).ok();
1909        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1910        Err(Error::ResponseError(local_var_error))
1911    }
1912}
1913
1914/// AuthenticatorDuoStage Viewset
1915pub async fn stages_authenticator_duo_partial_update(configuration: &configuration::Configuration, stage_uuid: &str, patched_authenticator_duo_stage_request: Option<models::PatchedAuthenticatorDuoStageRequest>) -> Result<models::AuthenticatorDuoStage, Error<StagesAuthenticatorDuoPartialUpdateError>> {
1916    let local_var_configuration = configuration;
1917
1918    let local_var_client = &local_var_configuration.client;
1919
1920    let local_var_uri_str = format!("{}/stages/authenticator/duo/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
1921    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
1922
1923    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1924        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1925    }
1926    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
1927        let local_var_key = local_var_apikey.key.clone();
1928        let local_var_value = match local_var_apikey.prefix {
1929            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
1930            None => local_var_key,
1931        };
1932        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
1933    };
1934    local_var_req_builder = local_var_req_builder.json(&patched_authenticator_duo_stage_request);
1935
1936    let local_var_req = local_var_req_builder.build()?;
1937    let local_var_resp = local_var_client.execute(local_var_req).await?;
1938
1939    let local_var_status = local_var_resp.status();
1940    let local_var_content = local_var_resp.text().await?;
1941
1942    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1943        serde_json::from_str(&local_var_content).map_err(Error::from)
1944    } else {
1945        let local_var_entity: Option<StagesAuthenticatorDuoPartialUpdateError> = serde_json::from_str(&local_var_content).ok();
1946        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1947        Err(Error::ResponseError(local_var_error))
1948    }
1949}
1950
1951/// AuthenticatorDuoStage Viewset
1952pub async fn stages_authenticator_duo_retrieve(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<models::AuthenticatorDuoStage, Error<StagesAuthenticatorDuoRetrieveError>> {
1953    let local_var_configuration = configuration;
1954
1955    let local_var_client = &local_var_configuration.client;
1956
1957    let local_var_uri_str = format!("{}/stages/authenticator/duo/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
1958    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1959
1960    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1961        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1962    }
1963    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
1964        let local_var_key = local_var_apikey.key.clone();
1965        let local_var_value = match local_var_apikey.prefix {
1966            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
1967            None => local_var_key,
1968        };
1969        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
1970    };
1971
1972    let local_var_req = local_var_req_builder.build()?;
1973    let local_var_resp = local_var_client.execute(local_var_req).await?;
1974
1975    let local_var_status = local_var_resp.status();
1976    let local_var_content = local_var_resp.text().await?;
1977
1978    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1979        serde_json::from_str(&local_var_content).map_err(Error::from)
1980    } else {
1981        let local_var_entity: Option<StagesAuthenticatorDuoRetrieveError> = serde_json::from_str(&local_var_content).ok();
1982        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1983        Err(Error::ResponseError(local_var_error))
1984    }
1985}
1986
1987/// AuthenticatorDuoStage Viewset
1988pub async fn stages_authenticator_duo_update(configuration: &configuration::Configuration, stage_uuid: &str, authenticator_duo_stage_request: models::AuthenticatorDuoStageRequest) -> Result<models::AuthenticatorDuoStage, Error<StagesAuthenticatorDuoUpdateError>> {
1989    let local_var_configuration = configuration;
1990
1991    let local_var_client = &local_var_configuration.client;
1992
1993    let local_var_uri_str = format!("{}/stages/authenticator/duo/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
1994    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
1995
1996    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1997        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1998    }
1999    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2000        let local_var_key = local_var_apikey.key.clone();
2001        let local_var_value = match local_var_apikey.prefix {
2002            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2003            None => local_var_key,
2004        };
2005        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2006    };
2007    local_var_req_builder = local_var_req_builder.json(&authenticator_duo_stage_request);
2008
2009    let local_var_req = local_var_req_builder.build()?;
2010    let local_var_resp = local_var_client.execute(local_var_req).await?;
2011
2012    let local_var_status = local_var_resp.status();
2013    let local_var_content = local_var_resp.text().await?;
2014
2015    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2016        serde_json::from_str(&local_var_content).map_err(Error::from)
2017    } else {
2018        let local_var_entity: Option<StagesAuthenticatorDuoUpdateError> = serde_json::from_str(&local_var_content).ok();
2019        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2020        Err(Error::ResponseError(local_var_error))
2021    }
2022}
2023
2024/// Get a list of all objects that use this object
2025pub async fn stages_authenticator_duo_used_by_list(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<Vec<models::UsedBy>, Error<StagesAuthenticatorDuoUsedByListError>> {
2026    let local_var_configuration = configuration;
2027
2028    let local_var_client = &local_var_configuration.client;
2029
2030    let local_var_uri_str = format!("{}/stages/authenticator/duo/{stage_uuid}/used_by/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
2031    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2032
2033    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2034        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2035    }
2036    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2037        let local_var_key = local_var_apikey.key.clone();
2038        let local_var_value = match local_var_apikey.prefix {
2039            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2040            None => local_var_key,
2041        };
2042        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2043    };
2044
2045    let local_var_req = local_var_req_builder.build()?;
2046    let local_var_resp = local_var_client.execute(local_var_req).await?;
2047
2048    let local_var_status = local_var_resp.status();
2049    let local_var_content = local_var_resp.text().await?;
2050
2051    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2052        serde_json::from_str(&local_var_content).map_err(Error::from)
2053    } else {
2054        let local_var_entity: Option<StagesAuthenticatorDuoUsedByListError> = serde_json::from_str(&local_var_content).ok();
2055        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2056        Err(Error::ResponseError(local_var_error))
2057    }
2058}
2059
2060/// AuthenticatorSMSStage Viewset
2061pub async fn stages_authenticator_sms_create(configuration: &configuration::Configuration, authenticator_sms_stage_request: models::AuthenticatorSmsStageRequest) -> Result<models::AuthenticatorSmsStage, Error<StagesAuthenticatorSmsCreateError>> {
2062    let local_var_configuration = configuration;
2063
2064    let local_var_client = &local_var_configuration.client;
2065
2066    let local_var_uri_str = format!("{}/stages/authenticator/sms/", local_var_configuration.base_path);
2067    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2068
2069    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2070        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2071    }
2072    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2073        let local_var_key = local_var_apikey.key.clone();
2074        let local_var_value = match local_var_apikey.prefix {
2075            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2076            None => local_var_key,
2077        };
2078        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2079    };
2080    local_var_req_builder = local_var_req_builder.json(&authenticator_sms_stage_request);
2081
2082    let local_var_req = local_var_req_builder.build()?;
2083    let local_var_resp = local_var_client.execute(local_var_req).await?;
2084
2085    let local_var_status = local_var_resp.status();
2086    let local_var_content = local_var_resp.text().await?;
2087
2088    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2089        serde_json::from_str(&local_var_content).map_err(Error::from)
2090    } else {
2091        let local_var_entity: Option<StagesAuthenticatorSmsCreateError> = serde_json::from_str(&local_var_content).ok();
2092        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2093        Err(Error::ResponseError(local_var_error))
2094    }
2095}
2096
2097/// AuthenticatorSMSStage Viewset
2098pub async fn stages_authenticator_sms_destroy(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<(), Error<StagesAuthenticatorSmsDestroyError>> {
2099    let local_var_configuration = configuration;
2100
2101    let local_var_client = &local_var_configuration.client;
2102
2103    let local_var_uri_str = format!("{}/stages/authenticator/sms/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
2104    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
2105
2106    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2107        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2108    }
2109    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2110        let local_var_key = local_var_apikey.key.clone();
2111        let local_var_value = match local_var_apikey.prefix {
2112            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2113            None => local_var_key,
2114        };
2115        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2116    };
2117
2118    let local_var_req = local_var_req_builder.build()?;
2119    let local_var_resp = local_var_client.execute(local_var_req).await?;
2120
2121    let local_var_status = local_var_resp.status();
2122    let local_var_content = local_var_resp.text().await?;
2123
2124    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2125        Ok(())
2126    } else {
2127        let local_var_entity: Option<StagesAuthenticatorSmsDestroyError> = serde_json::from_str(&local_var_content).ok();
2128        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2129        Err(Error::ResponseError(local_var_error))
2130    }
2131}
2132
2133/// AuthenticatorSMSStage Viewset
2134pub async fn stages_authenticator_sms_list(configuration: &configuration::Configuration, account_sid: Option<&str>, auth: Option<&str>, auth_password: Option<&str>, auth_type: Option<&str>, configure_flow: Option<&str>, friendly_name: Option<&str>, from_number: Option<&str>, mapping: Option<&str>, name: Option<&str>, ordering: Option<&str>, page: Option<i32>, page_size: Option<i32>, provider: Option<&str>, search: Option<&str>, stage_uuid: Option<&str>, verify_only: Option<bool>) -> Result<models::PaginatedAuthenticatorSmsStageList, Error<StagesAuthenticatorSmsListError>> {
2135    let local_var_configuration = configuration;
2136
2137    let local_var_client = &local_var_configuration.client;
2138
2139    let local_var_uri_str = format!("{}/stages/authenticator/sms/", local_var_configuration.base_path);
2140    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2141
2142    if let Some(ref local_var_str) = account_sid {
2143        local_var_req_builder = local_var_req_builder.query(&[("account_sid", &local_var_str.to_string())]);
2144    }
2145    if let Some(ref local_var_str) = auth {
2146        local_var_req_builder = local_var_req_builder.query(&[("auth", &local_var_str.to_string())]);
2147    }
2148    if let Some(ref local_var_str) = auth_password {
2149        local_var_req_builder = local_var_req_builder.query(&[("auth_password", &local_var_str.to_string())]);
2150    }
2151    if let Some(ref local_var_str) = auth_type {
2152        local_var_req_builder = local_var_req_builder.query(&[("auth_type", &local_var_str.to_string())]);
2153    }
2154    if let Some(ref local_var_str) = configure_flow {
2155        local_var_req_builder = local_var_req_builder.query(&[("configure_flow", &local_var_str.to_string())]);
2156    }
2157    if let Some(ref local_var_str) = friendly_name {
2158        local_var_req_builder = local_var_req_builder.query(&[("friendly_name", &local_var_str.to_string())]);
2159    }
2160    if let Some(ref local_var_str) = from_number {
2161        local_var_req_builder = local_var_req_builder.query(&[("from_number", &local_var_str.to_string())]);
2162    }
2163    if let Some(ref local_var_str) = mapping {
2164        local_var_req_builder = local_var_req_builder.query(&[("mapping", &local_var_str.to_string())]);
2165    }
2166    if let Some(ref local_var_str) = name {
2167        local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
2168    }
2169    if let Some(ref local_var_str) = ordering {
2170        local_var_req_builder = local_var_req_builder.query(&[("ordering", &local_var_str.to_string())]);
2171    }
2172    if let Some(ref local_var_str) = page {
2173        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
2174    }
2175    if let Some(ref local_var_str) = page_size {
2176        local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]);
2177    }
2178    if let Some(ref local_var_str) = provider {
2179        local_var_req_builder = local_var_req_builder.query(&[("provider", &local_var_str.to_string())]);
2180    }
2181    if let Some(ref local_var_str) = search {
2182        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
2183    }
2184    if let Some(ref local_var_str) = stage_uuid {
2185        local_var_req_builder = local_var_req_builder.query(&[("stage_uuid", &local_var_str.to_string())]);
2186    }
2187    if let Some(ref local_var_str) = verify_only {
2188        local_var_req_builder = local_var_req_builder.query(&[("verify_only", &local_var_str.to_string())]);
2189    }
2190    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2191        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2192    }
2193    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2194        let local_var_key = local_var_apikey.key.clone();
2195        let local_var_value = match local_var_apikey.prefix {
2196            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2197            None => local_var_key,
2198        };
2199        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2200    };
2201
2202    let local_var_req = local_var_req_builder.build()?;
2203    let local_var_resp = local_var_client.execute(local_var_req).await?;
2204
2205    let local_var_status = local_var_resp.status();
2206    let local_var_content = local_var_resp.text().await?;
2207
2208    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2209        serde_json::from_str(&local_var_content).map_err(Error::from)
2210    } else {
2211        let local_var_entity: Option<StagesAuthenticatorSmsListError> = serde_json::from_str(&local_var_content).ok();
2212        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2213        Err(Error::ResponseError(local_var_error))
2214    }
2215}
2216
2217/// AuthenticatorSMSStage Viewset
2218pub async fn stages_authenticator_sms_partial_update(configuration: &configuration::Configuration, stage_uuid: &str, patched_authenticator_sms_stage_request: Option<models::PatchedAuthenticatorSmsStageRequest>) -> Result<models::AuthenticatorSmsStage, Error<StagesAuthenticatorSmsPartialUpdateError>> {
2219    let local_var_configuration = configuration;
2220
2221    let local_var_client = &local_var_configuration.client;
2222
2223    let local_var_uri_str = format!("{}/stages/authenticator/sms/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
2224    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
2225
2226    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2227        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2228    }
2229    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2230        let local_var_key = local_var_apikey.key.clone();
2231        let local_var_value = match local_var_apikey.prefix {
2232            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2233            None => local_var_key,
2234        };
2235        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2236    };
2237    local_var_req_builder = local_var_req_builder.json(&patched_authenticator_sms_stage_request);
2238
2239    let local_var_req = local_var_req_builder.build()?;
2240    let local_var_resp = local_var_client.execute(local_var_req).await?;
2241
2242    let local_var_status = local_var_resp.status();
2243    let local_var_content = local_var_resp.text().await?;
2244
2245    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2246        serde_json::from_str(&local_var_content).map_err(Error::from)
2247    } else {
2248        let local_var_entity: Option<StagesAuthenticatorSmsPartialUpdateError> = serde_json::from_str(&local_var_content).ok();
2249        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2250        Err(Error::ResponseError(local_var_error))
2251    }
2252}
2253
2254/// AuthenticatorSMSStage Viewset
2255pub async fn stages_authenticator_sms_retrieve(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<models::AuthenticatorSmsStage, Error<StagesAuthenticatorSmsRetrieveError>> {
2256    let local_var_configuration = configuration;
2257
2258    let local_var_client = &local_var_configuration.client;
2259
2260    let local_var_uri_str = format!("{}/stages/authenticator/sms/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
2261    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2262
2263    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2264        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2265    }
2266    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2267        let local_var_key = local_var_apikey.key.clone();
2268        let local_var_value = match local_var_apikey.prefix {
2269            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2270            None => local_var_key,
2271        };
2272        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2273    };
2274
2275    let local_var_req = local_var_req_builder.build()?;
2276    let local_var_resp = local_var_client.execute(local_var_req).await?;
2277
2278    let local_var_status = local_var_resp.status();
2279    let local_var_content = local_var_resp.text().await?;
2280
2281    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2282        serde_json::from_str(&local_var_content).map_err(Error::from)
2283    } else {
2284        let local_var_entity: Option<StagesAuthenticatorSmsRetrieveError> = serde_json::from_str(&local_var_content).ok();
2285        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2286        Err(Error::ResponseError(local_var_error))
2287    }
2288}
2289
2290/// AuthenticatorSMSStage Viewset
2291pub async fn stages_authenticator_sms_update(configuration: &configuration::Configuration, stage_uuid: &str, authenticator_sms_stage_request: models::AuthenticatorSmsStageRequest) -> Result<models::AuthenticatorSmsStage, Error<StagesAuthenticatorSmsUpdateError>> {
2292    let local_var_configuration = configuration;
2293
2294    let local_var_client = &local_var_configuration.client;
2295
2296    let local_var_uri_str = format!("{}/stages/authenticator/sms/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
2297    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
2298
2299    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2300        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2301    }
2302    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2303        let local_var_key = local_var_apikey.key.clone();
2304        let local_var_value = match local_var_apikey.prefix {
2305            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2306            None => local_var_key,
2307        };
2308        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2309    };
2310    local_var_req_builder = local_var_req_builder.json(&authenticator_sms_stage_request);
2311
2312    let local_var_req = local_var_req_builder.build()?;
2313    let local_var_resp = local_var_client.execute(local_var_req).await?;
2314
2315    let local_var_status = local_var_resp.status();
2316    let local_var_content = local_var_resp.text().await?;
2317
2318    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2319        serde_json::from_str(&local_var_content).map_err(Error::from)
2320    } else {
2321        let local_var_entity: Option<StagesAuthenticatorSmsUpdateError> = serde_json::from_str(&local_var_content).ok();
2322        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2323        Err(Error::ResponseError(local_var_error))
2324    }
2325}
2326
2327/// Get a list of all objects that use this object
2328pub async fn stages_authenticator_sms_used_by_list(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<Vec<models::UsedBy>, Error<StagesAuthenticatorSmsUsedByListError>> {
2329    let local_var_configuration = configuration;
2330
2331    let local_var_client = &local_var_configuration.client;
2332
2333    let local_var_uri_str = format!("{}/stages/authenticator/sms/{stage_uuid}/used_by/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
2334    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2335
2336    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2337        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2338    }
2339    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2340        let local_var_key = local_var_apikey.key.clone();
2341        let local_var_value = match local_var_apikey.prefix {
2342            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2343            None => local_var_key,
2344        };
2345        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2346    };
2347
2348    let local_var_req = local_var_req_builder.build()?;
2349    let local_var_resp = local_var_client.execute(local_var_req).await?;
2350
2351    let local_var_status = local_var_resp.status();
2352    let local_var_content = local_var_resp.text().await?;
2353
2354    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2355        serde_json::from_str(&local_var_content).map_err(Error::from)
2356    } else {
2357        let local_var_entity: Option<StagesAuthenticatorSmsUsedByListError> = serde_json::from_str(&local_var_content).ok();
2358        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2359        Err(Error::ResponseError(local_var_error))
2360    }
2361}
2362
2363/// AuthenticatorStaticStage Viewset
2364pub async fn stages_authenticator_static_create(configuration: &configuration::Configuration, authenticator_static_stage_request: models::AuthenticatorStaticStageRequest) -> Result<models::AuthenticatorStaticStage, Error<StagesAuthenticatorStaticCreateError>> {
2365    let local_var_configuration = configuration;
2366
2367    let local_var_client = &local_var_configuration.client;
2368
2369    let local_var_uri_str = format!("{}/stages/authenticator/static/", local_var_configuration.base_path);
2370    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2371
2372    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2373        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2374    }
2375    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2376        let local_var_key = local_var_apikey.key.clone();
2377        let local_var_value = match local_var_apikey.prefix {
2378            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2379            None => local_var_key,
2380        };
2381        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2382    };
2383    local_var_req_builder = local_var_req_builder.json(&authenticator_static_stage_request);
2384
2385    let local_var_req = local_var_req_builder.build()?;
2386    let local_var_resp = local_var_client.execute(local_var_req).await?;
2387
2388    let local_var_status = local_var_resp.status();
2389    let local_var_content = local_var_resp.text().await?;
2390
2391    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2392        serde_json::from_str(&local_var_content).map_err(Error::from)
2393    } else {
2394        let local_var_entity: Option<StagesAuthenticatorStaticCreateError> = serde_json::from_str(&local_var_content).ok();
2395        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2396        Err(Error::ResponseError(local_var_error))
2397    }
2398}
2399
2400/// AuthenticatorStaticStage Viewset
2401pub async fn stages_authenticator_static_destroy(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<(), Error<StagesAuthenticatorStaticDestroyError>> {
2402    let local_var_configuration = configuration;
2403
2404    let local_var_client = &local_var_configuration.client;
2405
2406    let local_var_uri_str = format!("{}/stages/authenticator/static/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
2407    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
2408
2409    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2410        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2411    }
2412    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2413        let local_var_key = local_var_apikey.key.clone();
2414        let local_var_value = match local_var_apikey.prefix {
2415            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2416            None => local_var_key,
2417        };
2418        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2419    };
2420
2421    let local_var_req = local_var_req_builder.build()?;
2422    let local_var_resp = local_var_client.execute(local_var_req).await?;
2423
2424    let local_var_status = local_var_resp.status();
2425    let local_var_content = local_var_resp.text().await?;
2426
2427    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2428        Ok(())
2429    } else {
2430        let local_var_entity: Option<StagesAuthenticatorStaticDestroyError> = serde_json::from_str(&local_var_content).ok();
2431        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2432        Err(Error::ResponseError(local_var_error))
2433    }
2434}
2435
2436/// AuthenticatorStaticStage Viewset
2437pub async fn stages_authenticator_static_list(configuration: &configuration::Configuration, configure_flow: Option<&str>, friendly_name: Option<&str>, name: Option<&str>, ordering: Option<&str>, page: Option<i32>, page_size: Option<i32>, search: Option<&str>, stage_uuid: Option<&str>, token_count: Option<i32>, token_length: Option<i32>) -> Result<models::PaginatedAuthenticatorStaticStageList, Error<StagesAuthenticatorStaticListError>> {
2438    let local_var_configuration = configuration;
2439
2440    let local_var_client = &local_var_configuration.client;
2441
2442    let local_var_uri_str = format!("{}/stages/authenticator/static/", local_var_configuration.base_path);
2443    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2444
2445    if let Some(ref local_var_str) = configure_flow {
2446        local_var_req_builder = local_var_req_builder.query(&[("configure_flow", &local_var_str.to_string())]);
2447    }
2448    if let Some(ref local_var_str) = friendly_name {
2449        local_var_req_builder = local_var_req_builder.query(&[("friendly_name", &local_var_str.to_string())]);
2450    }
2451    if let Some(ref local_var_str) = name {
2452        local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
2453    }
2454    if let Some(ref local_var_str) = ordering {
2455        local_var_req_builder = local_var_req_builder.query(&[("ordering", &local_var_str.to_string())]);
2456    }
2457    if let Some(ref local_var_str) = page {
2458        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
2459    }
2460    if let Some(ref local_var_str) = page_size {
2461        local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]);
2462    }
2463    if let Some(ref local_var_str) = search {
2464        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
2465    }
2466    if let Some(ref local_var_str) = stage_uuid {
2467        local_var_req_builder = local_var_req_builder.query(&[("stage_uuid", &local_var_str.to_string())]);
2468    }
2469    if let Some(ref local_var_str) = token_count {
2470        local_var_req_builder = local_var_req_builder.query(&[("token_count", &local_var_str.to_string())]);
2471    }
2472    if let Some(ref local_var_str) = token_length {
2473        local_var_req_builder = local_var_req_builder.query(&[("token_length", &local_var_str.to_string())]);
2474    }
2475    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2476        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2477    }
2478    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2479        let local_var_key = local_var_apikey.key.clone();
2480        let local_var_value = match local_var_apikey.prefix {
2481            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2482            None => local_var_key,
2483        };
2484        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2485    };
2486
2487    let local_var_req = local_var_req_builder.build()?;
2488    let local_var_resp = local_var_client.execute(local_var_req).await?;
2489
2490    let local_var_status = local_var_resp.status();
2491    let local_var_content = local_var_resp.text().await?;
2492
2493    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2494        serde_json::from_str(&local_var_content).map_err(Error::from)
2495    } else {
2496        let local_var_entity: Option<StagesAuthenticatorStaticListError> = serde_json::from_str(&local_var_content).ok();
2497        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2498        Err(Error::ResponseError(local_var_error))
2499    }
2500}
2501
2502/// AuthenticatorStaticStage Viewset
2503pub async fn stages_authenticator_static_partial_update(configuration: &configuration::Configuration, stage_uuid: &str, patched_authenticator_static_stage_request: Option<models::PatchedAuthenticatorStaticStageRequest>) -> Result<models::AuthenticatorStaticStage, Error<StagesAuthenticatorStaticPartialUpdateError>> {
2504    let local_var_configuration = configuration;
2505
2506    let local_var_client = &local_var_configuration.client;
2507
2508    let local_var_uri_str = format!("{}/stages/authenticator/static/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
2509    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
2510
2511    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2512        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2513    }
2514    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2515        let local_var_key = local_var_apikey.key.clone();
2516        let local_var_value = match local_var_apikey.prefix {
2517            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2518            None => local_var_key,
2519        };
2520        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2521    };
2522    local_var_req_builder = local_var_req_builder.json(&patched_authenticator_static_stage_request);
2523
2524    let local_var_req = local_var_req_builder.build()?;
2525    let local_var_resp = local_var_client.execute(local_var_req).await?;
2526
2527    let local_var_status = local_var_resp.status();
2528    let local_var_content = local_var_resp.text().await?;
2529
2530    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2531        serde_json::from_str(&local_var_content).map_err(Error::from)
2532    } else {
2533        let local_var_entity: Option<StagesAuthenticatorStaticPartialUpdateError> = serde_json::from_str(&local_var_content).ok();
2534        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2535        Err(Error::ResponseError(local_var_error))
2536    }
2537}
2538
2539/// AuthenticatorStaticStage Viewset
2540pub async fn stages_authenticator_static_retrieve(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<models::AuthenticatorStaticStage, Error<StagesAuthenticatorStaticRetrieveError>> {
2541    let local_var_configuration = configuration;
2542
2543    let local_var_client = &local_var_configuration.client;
2544
2545    let local_var_uri_str = format!("{}/stages/authenticator/static/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
2546    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2547
2548    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2549        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2550    }
2551    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2552        let local_var_key = local_var_apikey.key.clone();
2553        let local_var_value = match local_var_apikey.prefix {
2554            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2555            None => local_var_key,
2556        };
2557        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2558    };
2559
2560    let local_var_req = local_var_req_builder.build()?;
2561    let local_var_resp = local_var_client.execute(local_var_req).await?;
2562
2563    let local_var_status = local_var_resp.status();
2564    let local_var_content = local_var_resp.text().await?;
2565
2566    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2567        serde_json::from_str(&local_var_content).map_err(Error::from)
2568    } else {
2569        let local_var_entity: Option<StagesAuthenticatorStaticRetrieveError> = serde_json::from_str(&local_var_content).ok();
2570        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2571        Err(Error::ResponseError(local_var_error))
2572    }
2573}
2574
2575/// AuthenticatorStaticStage Viewset
2576pub async fn stages_authenticator_static_update(configuration: &configuration::Configuration, stage_uuid: &str, authenticator_static_stage_request: models::AuthenticatorStaticStageRequest) -> Result<models::AuthenticatorStaticStage, Error<StagesAuthenticatorStaticUpdateError>> {
2577    let local_var_configuration = configuration;
2578
2579    let local_var_client = &local_var_configuration.client;
2580
2581    let local_var_uri_str = format!("{}/stages/authenticator/static/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
2582    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
2583
2584    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2585        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2586    }
2587    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2588        let local_var_key = local_var_apikey.key.clone();
2589        let local_var_value = match local_var_apikey.prefix {
2590            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2591            None => local_var_key,
2592        };
2593        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2594    };
2595    local_var_req_builder = local_var_req_builder.json(&authenticator_static_stage_request);
2596
2597    let local_var_req = local_var_req_builder.build()?;
2598    let local_var_resp = local_var_client.execute(local_var_req).await?;
2599
2600    let local_var_status = local_var_resp.status();
2601    let local_var_content = local_var_resp.text().await?;
2602
2603    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2604        serde_json::from_str(&local_var_content).map_err(Error::from)
2605    } else {
2606        let local_var_entity: Option<StagesAuthenticatorStaticUpdateError> = serde_json::from_str(&local_var_content).ok();
2607        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2608        Err(Error::ResponseError(local_var_error))
2609    }
2610}
2611
2612/// Get a list of all objects that use this object
2613pub async fn stages_authenticator_static_used_by_list(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<Vec<models::UsedBy>, Error<StagesAuthenticatorStaticUsedByListError>> {
2614    let local_var_configuration = configuration;
2615
2616    let local_var_client = &local_var_configuration.client;
2617
2618    let local_var_uri_str = format!("{}/stages/authenticator/static/{stage_uuid}/used_by/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
2619    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2620
2621    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2622        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2623    }
2624    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2625        let local_var_key = local_var_apikey.key.clone();
2626        let local_var_value = match local_var_apikey.prefix {
2627            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2628            None => local_var_key,
2629        };
2630        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2631    };
2632
2633    let local_var_req = local_var_req_builder.build()?;
2634    let local_var_resp = local_var_client.execute(local_var_req).await?;
2635
2636    let local_var_status = local_var_resp.status();
2637    let local_var_content = local_var_resp.text().await?;
2638
2639    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2640        serde_json::from_str(&local_var_content).map_err(Error::from)
2641    } else {
2642        let local_var_entity: Option<StagesAuthenticatorStaticUsedByListError> = serde_json::from_str(&local_var_content).ok();
2643        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2644        Err(Error::ResponseError(local_var_error))
2645    }
2646}
2647
2648/// AuthenticatorTOTPStage Viewset
2649pub async fn stages_authenticator_totp_create(configuration: &configuration::Configuration, authenticator_totp_stage_request: models::AuthenticatorTotpStageRequest) -> Result<models::AuthenticatorTotpStage, Error<StagesAuthenticatorTotpCreateError>> {
2650    let local_var_configuration = configuration;
2651
2652    let local_var_client = &local_var_configuration.client;
2653
2654    let local_var_uri_str = format!("{}/stages/authenticator/totp/", local_var_configuration.base_path);
2655    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2656
2657    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2658        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2659    }
2660    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2661        let local_var_key = local_var_apikey.key.clone();
2662        let local_var_value = match local_var_apikey.prefix {
2663            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2664            None => local_var_key,
2665        };
2666        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2667    };
2668    local_var_req_builder = local_var_req_builder.json(&authenticator_totp_stage_request);
2669
2670    let local_var_req = local_var_req_builder.build()?;
2671    let local_var_resp = local_var_client.execute(local_var_req).await?;
2672
2673    let local_var_status = local_var_resp.status();
2674    let local_var_content = local_var_resp.text().await?;
2675
2676    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2677        serde_json::from_str(&local_var_content).map_err(Error::from)
2678    } else {
2679        let local_var_entity: Option<StagesAuthenticatorTotpCreateError> = serde_json::from_str(&local_var_content).ok();
2680        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2681        Err(Error::ResponseError(local_var_error))
2682    }
2683}
2684
2685/// AuthenticatorTOTPStage Viewset
2686pub async fn stages_authenticator_totp_destroy(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<(), Error<StagesAuthenticatorTotpDestroyError>> {
2687    let local_var_configuration = configuration;
2688
2689    let local_var_client = &local_var_configuration.client;
2690
2691    let local_var_uri_str = format!("{}/stages/authenticator/totp/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
2692    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
2693
2694    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2695        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2696    }
2697    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2698        let local_var_key = local_var_apikey.key.clone();
2699        let local_var_value = match local_var_apikey.prefix {
2700            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2701            None => local_var_key,
2702        };
2703        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2704    };
2705
2706    let local_var_req = local_var_req_builder.build()?;
2707    let local_var_resp = local_var_client.execute(local_var_req).await?;
2708
2709    let local_var_status = local_var_resp.status();
2710    let local_var_content = local_var_resp.text().await?;
2711
2712    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2713        Ok(())
2714    } else {
2715        let local_var_entity: Option<StagesAuthenticatorTotpDestroyError> = serde_json::from_str(&local_var_content).ok();
2716        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2717        Err(Error::ResponseError(local_var_error))
2718    }
2719}
2720
2721/// AuthenticatorTOTPStage Viewset
2722pub async fn stages_authenticator_totp_list(configuration: &configuration::Configuration, configure_flow: Option<&str>, digits: Option<&str>, friendly_name: Option<&str>, name: Option<&str>, ordering: Option<&str>, page: Option<i32>, page_size: Option<i32>, search: Option<&str>, stage_uuid: Option<&str>) -> Result<models::PaginatedAuthenticatorTotpStageList, Error<StagesAuthenticatorTotpListError>> {
2723    let local_var_configuration = configuration;
2724
2725    let local_var_client = &local_var_configuration.client;
2726
2727    let local_var_uri_str = format!("{}/stages/authenticator/totp/", local_var_configuration.base_path);
2728    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2729
2730    if let Some(ref local_var_str) = configure_flow {
2731        local_var_req_builder = local_var_req_builder.query(&[("configure_flow", &local_var_str.to_string())]);
2732    }
2733    if let Some(ref local_var_str) = digits {
2734        local_var_req_builder = local_var_req_builder.query(&[("digits", &local_var_str.to_string())]);
2735    }
2736    if let Some(ref local_var_str) = friendly_name {
2737        local_var_req_builder = local_var_req_builder.query(&[("friendly_name", &local_var_str.to_string())]);
2738    }
2739    if let Some(ref local_var_str) = name {
2740        local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
2741    }
2742    if let Some(ref local_var_str) = ordering {
2743        local_var_req_builder = local_var_req_builder.query(&[("ordering", &local_var_str.to_string())]);
2744    }
2745    if let Some(ref local_var_str) = page {
2746        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
2747    }
2748    if let Some(ref local_var_str) = page_size {
2749        local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]);
2750    }
2751    if let Some(ref local_var_str) = search {
2752        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
2753    }
2754    if let Some(ref local_var_str) = stage_uuid {
2755        local_var_req_builder = local_var_req_builder.query(&[("stage_uuid", &local_var_str.to_string())]);
2756    }
2757    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2758        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2759    }
2760    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2761        let local_var_key = local_var_apikey.key.clone();
2762        let local_var_value = match local_var_apikey.prefix {
2763            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2764            None => local_var_key,
2765        };
2766        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2767    };
2768
2769    let local_var_req = local_var_req_builder.build()?;
2770    let local_var_resp = local_var_client.execute(local_var_req).await?;
2771
2772    let local_var_status = local_var_resp.status();
2773    let local_var_content = local_var_resp.text().await?;
2774
2775    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2776        serde_json::from_str(&local_var_content).map_err(Error::from)
2777    } else {
2778        let local_var_entity: Option<StagesAuthenticatorTotpListError> = serde_json::from_str(&local_var_content).ok();
2779        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2780        Err(Error::ResponseError(local_var_error))
2781    }
2782}
2783
2784/// AuthenticatorTOTPStage Viewset
2785pub async fn stages_authenticator_totp_partial_update(configuration: &configuration::Configuration, stage_uuid: &str, patched_authenticator_totp_stage_request: Option<models::PatchedAuthenticatorTotpStageRequest>) -> Result<models::AuthenticatorTotpStage, Error<StagesAuthenticatorTotpPartialUpdateError>> {
2786    let local_var_configuration = configuration;
2787
2788    let local_var_client = &local_var_configuration.client;
2789
2790    let local_var_uri_str = format!("{}/stages/authenticator/totp/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
2791    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
2792
2793    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2794        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2795    }
2796    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2797        let local_var_key = local_var_apikey.key.clone();
2798        let local_var_value = match local_var_apikey.prefix {
2799            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2800            None => local_var_key,
2801        };
2802        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2803    };
2804    local_var_req_builder = local_var_req_builder.json(&patched_authenticator_totp_stage_request);
2805
2806    let local_var_req = local_var_req_builder.build()?;
2807    let local_var_resp = local_var_client.execute(local_var_req).await?;
2808
2809    let local_var_status = local_var_resp.status();
2810    let local_var_content = local_var_resp.text().await?;
2811
2812    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2813        serde_json::from_str(&local_var_content).map_err(Error::from)
2814    } else {
2815        let local_var_entity: Option<StagesAuthenticatorTotpPartialUpdateError> = serde_json::from_str(&local_var_content).ok();
2816        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2817        Err(Error::ResponseError(local_var_error))
2818    }
2819}
2820
2821/// AuthenticatorTOTPStage Viewset
2822pub async fn stages_authenticator_totp_retrieve(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<models::AuthenticatorTotpStage, Error<StagesAuthenticatorTotpRetrieveError>> {
2823    let local_var_configuration = configuration;
2824
2825    let local_var_client = &local_var_configuration.client;
2826
2827    let local_var_uri_str = format!("{}/stages/authenticator/totp/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
2828    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2829
2830    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2831        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2832    }
2833    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2834        let local_var_key = local_var_apikey.key.clone();
2835        let local_var_value = match local_var_apikey.prefix {
2836            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2837            None => local_var_key,
2838        };
2839        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2840    };
2841
2842    let local_var_req = local_var_req_builder.build()?;
2843    let local_var_resp = local_var_client.execute(local_var_req).await?;
2844
2845    let local_var_status = local_var_resp.status();
2846    let local_var_content = local_var_resp.text().await?;
2847
2848    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2849        serde_json::from_str(&local_var_content).map_err(Error::from)
2850    } else {
2851        let local_var_entity: Option<StagesAuthenticatorTotpRetrieveError> = serde_json::from_str(&local_var_content).ok();
2852        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2853        Err(Error::ResponseError(local_var_error))
2854    }
2855}
2856
2857/// AuthenticatorTOTPStage Viewset
2858pub async fn stages_authenticator_totp_update(configuration: &configuration::Configuration, stage_uuid: &str, authenticator_totp_stage_request: models::AuthenticatorTotpStageRequest) -> Result<models::AuthenticatorTotpStage, Error<StagesAuthenticatorTotpUpdateError>> {
2859    let local_var_configuration = configuration;
2860
2861    let local_var_client = &local_var_configuration.client;
2862
2863    let local_var_uri_str = format!("{}/stages/authenticator/totp/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
2864    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
2865
2866    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2867        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2868    }
2869    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2870        let local_var_key = local_var_apikey.key.clone();
2871        let local_var_value = match local_var_apikey.prefix {
2872            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2873            None => local_var_key,
2874        };
2875        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2876    };
2877    local_var_req_builder = local_var_req_builder.json(&authenticator_totp_stage_request);
2878
2879    let local_var_req = local_var_req_builder.build()?;
2880    let local_var_resp = local_var_client.execute(local_var_req).await?;
2881
2882    let local_var_status = local_var_resp.status();
2883    let local_var_content = local_var_resp.text().await?;
2884
2885    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2886        serde_json::from_str(&local_var_content).map_err(Error::from)
2887    } else {
2888        let local_var_entity: Option<StagesAuthenticatorTotpUpdateError> = serde_json::from_str(&local_var_content).ok();
2889        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2890        Err(Error::ResponseError(local_var_error))
2891    }
2892}
2893
2894/// Get a list of all objects that use this object
2895pub async fn stages_authenticator_totp_used_by_list(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<Vec<models::UsedBy>, Error<StagesAuthenticatorTotpUsedByListError>> {
2896    let local_var_configuration = configuration;
2897
2898    let local_var_client = &local_var_configuration.client;
2899
2900    let local_var_uri_str = format!("{}/stages/authenticator/totp/{stage_uuid}/used_by/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
2901    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2902
2903    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2904        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2905    }
2906    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2907        let local_var_key = local_var_apikey.key.clone();
2908        let local_var_value = match local_var_apikey.prefix {
2909            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2910            None => local_var_key,
2911        };
2912        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2913    };
2914
2915    let local_var_req = local_var_req_builder.build()?;
2916    let local_var_resp = local_var_client.execute(local_var_req).await?;
2917
2918    let local_var_status = local_var_resp.status();
2919    let local_var_content = local_var_resp.text().await?;
2920
2921    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2922        serde_json::from_str(&local_var_content).map_err(Error::from)
2923    } else {
2924        let local_var_entity: Option<StagesAuthenticatorTotpUsedByListError> = serde_json::from_str(&local_var_content).ok();
2925        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2926        Err(Error::ResponseError(local_var_error))
2927    }
2928}
2929
2930/// AuthenticatorValidateStage Viewset
2931pub async fn stages_authenticator_validate_create(configuration: &configuration::Configuration, authenticator_validate_stage_request: models::AuthenticatorValidateStageRequest) -> Result<models::AuthenticatorValidateStage, Error<StagesAuthenticatorValidateCreateError>> {
2932    let local_var_configuration = configuration;
2933
2934    let local_var_client = &local_var_configuration.client;
2935
2936    let local_var_uri_str = format!("{}/stages/authenticator/validate/", local_var_configuration.base_path);
2937    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2938
2939    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2940        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2941    }
2942    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2943        let local_var_key = local_var_apikey.key.clone();
2944        let local_var_value = match local_var_apikey.prefix {
2945            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2946            None => local_var_key,
2947        };
2948        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2949    };
2950    local_var_req_builder = local_var_req_builder.json(&authenticator_validate_stage_request);
2951
2952    let local_var_req = local_var_req_builder.build()?;
2953    let local_var_resp = local_var_client.execute(local_var_req).await?;
2954
2955    let local_var_status = local_var_resp.status();
2956    let local_var_content = local_var_resp.text().await?;
2957
2958    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2959        serde_json::from_str(&local_var_content).map_err(Error::from)
2960    } else {
2961        let local_var_entity: Option<StagesAuthenticatorValidateCreateError> = serde_json::from_str(&local_var_content).ok();
2962        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2963        Err(Error::ResponseError(local_var_error))
2964    }
2965}
2966
2967/// AuthenticatorValidateStage Viewset
2968pub async fn stages_authenticator_validate_destroy(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<(), Error<StagesAuthenticatorValidateDestroyError>> {
2969    let local_var_configuration = configuration;
2970
2971    let local_var_client = &local_var_configuration.client;
2972
2973    let local_var_uri_str = format!("{}/stages/authenticator/validate/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
2974    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
2975
2976    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2977        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2978    }
2979    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
2980        let local_var_key = local_var_apikey.key.clone();
2981        let local_var_value = match local_var_apikey.prefix {
2982            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
2983            None => local_var_key,
2984        };
2985        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
2986    };
2987
2988    let local_var_req = local_var_req_builder.build()?;
2989    let local_var_resp = local_var_client.execute(local_var_req).await?;
2990
2991    let local_var_status = local_var_resp.status();
2992    let local_var_content = local_var_resp.text().await?;
2993
2994    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2995        Ok(())
2996    } else {
2997        let local_var_entity: Option<StagesAuthenticatorValidateDestroyError> = serde_json::from_str(&local_var_content).ok();
2998        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2999        Err(Error::ResponseError(local_var_error))
3000    }
3001}
3002
3003/// AuthenticatorValidateStage Viewset
3004pub async fn stages_authenticator_validate_list(configuration: &configuration::Configuration, configuration_stages: Option<Vec<uuid::Uuid>>, name: Option<&str>, not_configured_action: Option<&str>, ordering: Option<&str>, page: Option<i32>, page_size: Option<i32>, search: Option<&str>) -> Result<models::PaginatedAuthenticatorValidateStageList, Error<StagesAuthenticatorValidateListError>> {
3005    let local_var_configuration = configuration;
3006
3007    let local_var_client = &local_var_configuration.client;
3008
3009    let local_var_uri_str = format!("{}/stages/authenticator/validate/", local_var_configuration.base_path);
3010    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3011
3012    if let Some(ref local_var_str) = configuration_stages {
3013        local_var_req_builder = match "multi" {
3014            "multi" => local_var_req_builder.query(&local_var_str.into_iter().map(|p| ("configuration_stages".to_owned(), p.to_string())).collect::<Vec<(std::string::String, std::string::String)>>()),
3015            _ => local_var_req_builder.query(&[("configuration_stages", &local_var_str.into_iter().map(|p| p.to_string()).collect::<Vec<String>>().join(",").to_string())]),
3016        };
3017    }
3018    if let Some(ref local_var_str) = name {
3019        local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
3020    }
3021    if let Some(ref local_var_str) = not_configured_action {
3022        local_var_req_builder = local_var_req_builder.query(&[("not_configured_action", &local_var_str.to_string())]);
3023    }
3024    if let Some(ref local_var_str) = ordering {
3025        local_var_req_builder = local_var_req_builder.query(&[("ordering", &local_var_str.to_string())]);
3026    }
3027    if let Some(ref local_var_str) = page {
3028        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3029    }
3030    if let Some(ref local_var_str) = page_size {
3031        local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]);
3032    }
3033    if let Some(ref local_var_str) = search {
3034        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
3035    }
3036    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3037        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3038    }
3039    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3040        let local_var_key = local_var_apikey.key.clone();
3041        let local_var_value = match local_var_apikey.prefix {
3042            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3043            None => local_var_key,
3044        };
3045        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3046    };
3047
3048    let local_var_req = local_var_req_builder.build()?;
3049    let local_var_resp = local_var_client.execute(local_var_req).await?;
3050
3051    let local_var_status = local_var_resp.status();
3052    let local_var_content = local_var_resp.text().await?;
3053
3054    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3055        serde_json::from_str(&local_var_content).map_err(Error::from)
3056    } else {
3057        let local_var_entity: Option<StagesAuthenticatorValidateListError> = serde_json::from_str(&local_var_content).ok();
3058        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3059        Err(Error::ResponseError(local_var_error))
3060    }
3061}
3062
3063/// AuthenticatorValidateStage Viewset
3064pub async fn stages_authenticator_validate_partial_update(configuration: &configuration::Configuration, stage_uuid: &str, patched_authenticator_validate_stage_request: Option<models::PatchedAuthenticatorValidateStageRequest>) -> Result<models::AuthenticatorValidateStage, Error<StagesAuthenticatorValidatePartialUpdateError>> {
3065    let local_var_configuration = configuration;
3066
3067    let local_var_client = &local_var_configuration.client;
3068
3069    let local_var_uri_str = format!("{}/stages/authenticator/validate/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
3070    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
3071
3072    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3073        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3074    }
3075    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3076        let local_var_key = local_var_apikey.key.clone();
3077        let local_var_value = match local_var_apikey.prefix {
3078            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3079            None => local_var_key,
3080        };
3081        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3082    };
3083    local_var_req_builder = local_var_req_builder.json(&patched_authenticator_validate_stage_request);
3084
3085    let local_var_req = local_var_req_builder.build()?;
3086    let local_var_resp = local_var_client.execute(local_var_req).await?;
3087
3088    let local_var_status = local_var_resp.status();
3089    let local_var_content = local_var_resp.text().await?;
3090
3091    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3092        serde_json::from_str(&local_var_content).map_err(Error::from)
3093    } else {
3094        let local_var_entity: Option<StagesAuthenticatorValidatePartialUpdateError> = serde_json::from_str(&local_var_content).ok();
3095        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3096        Err(Error::ResponseError(local_var_error))
3097    }
3098}
3099
3100/// AuthenticatorValidateStage Viewset
3101pub async fn stages_authenticator_validate_retrieve(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<models::AuthenticatorValidateStage, Error<StagesAuthenticatorValidateRetrieveError>> {
3102    let local_var_configuration = configuration;
3103
3104    let local_var_client = &local_var_configuration.client;
3105
3106    let local_var_uri_str = format!("{}/stages/authenticator/validate/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
3107    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3108
3109    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3110        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3111    }
3112    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3113        let local_var_key = local_var_apikey.key.clone();
3114        let local_var_value = match local_var_apikey.prefix {
3115            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3116            None => local_var_key,
3117        };
3118        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3119    };
3120
3121    let local_var_req = local_var_req_builder.build()?;
3122    let local_var_resp = local_var_client.execute(local_var_req).await?;
3123
3124    let local_var_status = local_var_resp.status();
3125    let local_var_content = local_var_resp.text().await?;
3126
3127    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3128        serde_json::from_str(&local_var_content).map_err(Error::from)
3129    } else {
3130        let local_var_entity: Option<StagesAuthenticatorValidateRetrieveError> = serde_json::from_str(&local_var_content).ok();
3131        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3132        Err(Error::ResponseError(local_var_error))
3133    }
3134}
3135
3136/// AuthenticatorValidateStage Viewset
3137pub async fn stages_authenticator_validate_update(configuration: &configuration::Configuration, stage_uuid: &str, authenticator_validate_stage_request: models::AuthenticatorValidateStageRequest) -> Result<models::AuthenticatorValidateStage, Error<StagesAuthenticatorValidateUpdateError>> {
3138    let local_var_configuration = configuration;
3139
3140    let local_var_client = &local_var_configuration.client;
3141
3142    let local_var_uri_str = format!("{}/stages/authenticator/validate/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
3143    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
3144
3145    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3146        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3147    }
3148    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3149        let local_var_key = local_var_apikey.key.clone();
3150        let local_var_value = match local_var_apikey.prefix {
3151            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3152            None => local_var_key,
3153        };
3154        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3155    };
3156    local_var_req_builder = local_var_req_builder.json(&authenticator_validate_stage_request);
3157
3158    let local_var_req = local_var_req_builder.build()?;
3159    let local_var_resp = local_var_client.execute(local_var_req).await?;
3160
3161    let local_var_status = local_var_resp.status();
3162    let local_var_content = local_var_resp.text().await?;
3163
3164    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3165        serde_json::from_str(&local_var_content).map_err(Error::from)
3166    } else {
3167        let local_var_entity: Option<StagesAuthenticatorValidateUpdateError> = serde_json::from_str(&local_var_content).ok();
3168        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3169        Err(Error::ResponseError(local_var_error))
3170    }
3171}
3172
3173/// Get a list of all objects that use this object
3174pub async fn stages_authenticator_validate_used_by_list(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<Vec<models::UsedBy>, Error<StagesAuthenticatorValidateUsedByListError>> {
3175    let local_var_configuration = configuration;
3176
3177    let local_var_client = &local_var_configuration.client;
3178
3179    let local_var_uri_str = format!("{}/stages/authenticator/validate/{stage_uuid}/used_by/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
3180    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3181
3182    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3183        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3184    }
3185    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3186        let local_var_key = local_var_apikey.key.clone();
3187        let local_var_value = match local_var_apikey.prefix {
3188            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3189            None => local_var_key,
3190        };
3191        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3192    };
3193
3194    let local_var_req = local_var_req_builder.build()?;
3195    let local_var_resp = local_var_client.execute(local_var_req).await?;
3196
3197    let local_var_status = local_var_resp.status();
3198    let local_var_content = local_var_resp.text().await?;
3199
3200    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3201        serde_json::from_str(&local_var_content).map_err(Error::from)
3202    } else {
3203        let local_var_entity: Option<StagesAuthenticatorValidateUsedByListError> = serde_json::from_str(&local_var_content).ok();
3204        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3205        Err(Error::ResponseError(local_var_error))
3206    }
3207}
3208
3209/// AuthenticateWebAuthnStage Viewset
3210pub async fn stages_authenticator_webauthn_create(configuration: &configuration::Configuration, authenticate_web_authn_stage_request: models::AuthenticateWebAuthnStageRequest) -> Result<models::AuthenticateWebAuthnStage, Error<StagesAuthenticatorWebauthnCreateError>> {
3211    let local_var_configuration = configuration;
3212
3213    let local_var_client = &local_var_configuration.client;
3214
3215    let local_var_uri_str = format!("{}/stages/authenticator/webauthn/", local_var_configuration.base_path);
3216    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3217
3218    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3219        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3220    }
3221    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3222        let local_var_key = local_var_apikey.key.clone();
3223        let local_var_value = match local_var_apikey.prefix {
3224            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3225            None => local_var_key,
3226        };
3227        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3228    };
3229    local_var_req_builder = local_var_req_builder.json(&authenticate_web_authn_stage_request);
3230
3231    let local_var_req = local_var_req_builder.build()?;
3232    let local_var_resp = local_var_client.execute(local_var_req).await?;
3233
3234    let local_var_status = local_var_resp.status();
3235    let local_var_content = local_var_resp.text().await?;
3236
3237    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3238        serde_json::from_str(&local_var_content).map_err(Error::from)
3239    } else {
3240        let local_var_entity: Option<StagesAuthenticatorWebauthnCreateError> = serde_json::from_str(&local_var_content).ok();
3241        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3242        Err(Error::ResponseError(local_var_error))
3243    }
3244}
3245
3246/// AuthenticateWebAuthnStage Viewset
3247pub async fn stages_authenticator_webauthn_destroy(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<(), Error<StagesAuthenticatorWebauthnDestroyError>> {
3248    let local_var_configuration = configuration;
3249
3250    let local_var_client = &local_var_configuration.client;
3251
3252    let local_var_uri_str = format!("{}/stages/authenticator/webauthn/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
3253    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
3254
3255    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3256        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3257    }
3258    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3259        let local_var_key = local_var_apikey.key.clone();
3260        let local_var_value = match local_var_apikey.prefix {
3261            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3262            None => local_var_key,
3263        };
3264        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3265    };
3266
3267    let local_var_req = local_var_req_builder.build()?;
3268    let local_var_resp = local_var_client.execute(local_var_req).await?;
3269
3270    let local_var_status = local_var_resp.status();
3271    let local_var_content = local_var_resp.text().await?;
3272
3273    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3274        Ok(())
3275    } else {
3276        let local_var_entity: Option<StagesAuthenticatorWebauthnDestroyError> = serde_json::from_str(&local_var_content).ok();
3277        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3278        Err(Error::ResponseError(local_var_error))
3279    }
3280}
3281
3282/// AuthenticateWebAuthnStage Viewset
3283pub async fn stages_authenticator_webauthn_list(configuration: &configuration::Configuration, authenticator_attachment: Option<&str>, configure_flow: Option<&str>, friendly_name: Option<&str>, name: Option<&str>, ordering: Option<&str>, page: Option<i32>, page_size: Option<i32>, resident_key_requirement: Option<&str>, search: Option<&str>, stage_uuid: Option<&str>, user_verification: Option<&str>) -> Result<models::PaginatedAuthenticateWebAuthnStageList, Error<StagesAuthenticatorWebauthnListError>> {
3284    let local_var_configuration = configuration;
3285
3286    let local_var_client = &local_var_configuration.client;
3287
3288    let local_var_uri_str = format!("{}/stages/authenticator/webauthn/", local_var_configuration.base_path);
3289    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3290
3291    if let Some(ref local_var_str) = authenticator_attachment {
3292        local_var_req_builder = local_var_req_builder.query(&[("authenticator_attachment", &local_var_str.to_string())]);
3293    }
3294    if let Some(ref local_var_str) = configure_flow {
3295        local_var_req_builder = local_var_req_builder.query(&[("configure_flow", &local_var_str.to_string())]);
3296    }
3297    if let Some(ref local_var_str) = friendly_name {
3298        local_var_req_builder = local_var_req_builder.query(&[("friendly_name", &local_var_str.to_string())]);
3299    }
3300    if let Some(ref local_var_str) = name {
3301        local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
3302    }
3303    if let Some(ref local_var_str) = ordering {
3304        local_var_req_builder = local_var_req_builder.query(&[("ordering", &local_var_str.to_string())]);
3305    }
3306    if let Some(ref local_var_str) = page {
3307        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3308    }
3309    if let Some(ref local_var_str) = page_size {
3310        local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]);
3311    }
3312    if let Some(ref local_var_str) = resident_key_requirement {
3313        local_var_req_builder = local_var_req_builder.query(&[("resident_key_requirement", &local_var_str.to_string())]);
3314    }
3315    if let Some(ref local_var_str) = search {
3316        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
3317    }
3318    if let Some(ref local_var_str) = stage_uuid {
3319        local_var_req_builder = local_var_req_builder.query(&[("stage_uuid", &local_var_str.to_string())]);
3320    }
3321    if let Some(ref local_var_str) = user_verification {
3322        local_var_req_builder = local_var_req_builder.query(&[("user_verification", &local_var_str.to_string())]);
3323    }
3324    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3325        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3326    }
3327    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3328        let local_var_key = local_var_apikey.key.clone();
3329        let local_var_value = match local_var_apikey.prefix {
3330            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3331            None => local_var_key,
3332        };
3333        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3334    };
3335
3336    let local_var_req = local_var_req_builder.build()?;
3337    let local_var_resp = local_var_client.execute(local_var_req).await?;
3338
3339    let local_var_status = local_var_resp.status();
3340    let local_var_content = local_var_resp.text().await?;
3341
3342    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3343        serde_json::from_str(&local_var_content).map_err(Error::from)
3344    } else {
3345        let local_var_entity: Option<StagesAuthenticatorWebauthnListError> = serde_json::from_str(&local_var_content).ok();
3346        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3347        Err(Error::ResponseError(local_var_error))
3348    }
3349}
3350
3351/// AuthenticateWebAuthnStage Viewset
3352pub async fn stages_authenticator_webauthn_partial_update(configuration: &configuration::Configuration, stage_uuid: &str, patched_authenticate_web_authn_stage_request: Option<models::PatchedAuthenticateWebAuthnStageRequest>) -> Result<models::AuthenticateWebAuthnStage, Error<StagesAuthenticatorWebauthnPartialUpdateError>> {
3353    let local_var_configuration = configuration;
3354
3355    let local_var_client = &local_var_configuration.client;
3356
3357    let local_var_uri_str = format!("{}/stages/authenticator/webauthn/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
3358    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
3359
3360    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3361        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3362    }
3363    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3364        let local_var_key = local_var_apikey.key.clone();
3365        let local_var_value = match local_var_apikey.prefix {
3366            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3367            None => local_var_key,
3368        };
3369        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3370    };
3371    local_var_req_builder = local_var_req_builder.json(&patched_authenticate_web_authn_stage_request);
3372
3373    let local_var_req = local_var_req_builder.build()?;
3374    let local_var_resp = local_var_client.execute(local_var_req).await?;
3375
3376    let local_var_status = local_var_resp.status();
3377    let local_var_content = local_var_resp.text().await?;
3378
3379    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3380        serde_json::from_str(&local_var_content).map_err(Error::from)
3381    } else {
3382        let local_var_entity: Option<StagesAuthenticatorWebauthnPartialUpdateError> = serde_json::from_str(&local_var_content).ok();
3383        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3384        Err(Error::ResponseError(local_var_error))
3385    }
3386}
3387
3388/// AuthenticateWebAuthnStage Viewset
3389pub async fn stages_authenticator_webauthn_retrieve(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<models::AuthenticateWebAuthnStage, Error<StagesAuthenticatorWebauthnRetrieveError>> {
3390    let local_var_configuration = configuration;
3391
3392    let local_var_client = &local_var_configuration.client;
3393
3394    let local_var_uri_str = format!("{}/stages/authenticator/webauthn/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
3395    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3396
3397    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3398        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3399    }
3400    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3401        let local_var_key = local_var_apikey.key.clone();
3402        let local_var_value = match local_var_apikey.prefix {
3403            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3404            None => local_var_key,
3405        };
3406        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3407    };
3408
3409    let local_var_req = local_var_req_builder.build()?;
3410    let local_var_resp = local_var_client.execute(local_var_req).await?;
3411
3412    let local_var_status = local_var_resp.status();
3413    let local_var_content = local_var_resp.text().await?;
3414
3415    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3416        serde_json::from_str(&local_var_content).map_err(Error::from)
3417    } else {
3418        let local_var_entity: Option<StagesAuthenticatorWebauthnRetrieveError> = serde_json::from_str(&local_var_content).ok();
3419        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3420        Err(Error::ResponseError(local_var_error))
3421    }
3422}
3423
3424/// AuthenticateWebAuthnStage Viewset
3425pub async fn stages_authenticator_webauthn_update(configuration: &configuration::Configuration, stage_uuid: &str, authenticate_web_authn_stage_request: models::AuthenticateWebAuthnStageRequest) -> Result<models::AuthenticateWebAuthnStage, Error<StagesAuthenticatorWebauthnUpdateError>> {
3426    let local_var_configuration = configuration;
3427
3428    let local_var_client = &local_var_configuration.client;
3429
3430    let local_var_uri_str = format!("{}/stages/authenticator/webauthn/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
3431    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
3432
3433    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3434        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3435    }
3436    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3437        let local_var_key = local_var_apikey.key.clone();
3438        let local_var_value = match local_var_apikey.prefix {
3439            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3440            None => local_var_key,
3441        };
3442        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3443    };
3444    local_var_req_builder = local_var_req_builder.json(&authenticate_web_authn_stage_request);
3445
3446    let local_var_req = local_var_req_builder.build()?;
3447    let local_var_resp = local_var_client.execute(local_var_req).await?;
3448
3449    let local_var_status = local_var_resp.status();
3450    let local_var_content = local_var_resp.text().await?;
3451
3452    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3453        serde_json::from_str(&local_var_content).map_err(Error::from)
3454    } else {
3455        let local_var_entity: Option<StagesAuthenticatorWebauthnUpdateError> = serde_json::from_str(&local_var_content).ok();
3456        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3457        Err(Error::ResponseError(local_var_error))
3458    }
3459}
3460
3461/// Get a list of all objects that use this object
3462pub async fn stages_authenticator_webauthn_used_by_list(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<Vec<models::UsedBy>, Error<StagesAuthenticatorWebauthnUsedByListError>> {
3463    let local_var_configuration = configuration;
3464
3465    let local_var_client = &local_var_configuration.client;
3466
3467    let local_var_uri_str = format!("{}/stages/authenticator/webauthn/{stage_uuid}/used_by/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
3468    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3469
3470    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3471        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3472    }
3473    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3474        let local_var_key = local_var_apikey.key.clone();
3475        let local_var_value = match local_var_apikey.prefix {
3476            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3477            None => local_var_key,
3478        };
3479        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3480    };
3481
3482    let local_var_req = local_var_req_builder.build()?;
3483    let local_var_resp = local_var_client.execute(local_var_req).await?;
3484
3485    let local_var_status = local_var_resp.status();
3486    let local_var_content = local_var_resp.text().await?;
3487
3488    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3489        serde_json::from_str(&local_var_content).map_err(Error::from)
3490    } else {
3491        let local_var_entity: Option<StagesAuthenticatorWebauthnUsedByListError> = serde_json::from_str(&local_var_content).ok();
3492        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3493        Err(Error::ResponseError(local_var_error))
3494    }
3495}
3496
3497/// CaptchaStage Viewset
3498pub async fn stages_captcha_create(configuration: &configuration::Configuration, captcha_stage_request: models::CaptchaStageRequest) -> Result<models::CaptchaStage, Error<StagesCaptchaCreateError>> {
3499    let local_var_configuration = configuration;
3500
3501    let local_var_client = &local_var_configuration.client;
3502
3503    let local_var_uri_str = format!("{}/stages/captcha/", local_var_configuration.base_path);
3504    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3505
3506    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3507        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3508    }
3509    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3510        let local_var_key = local_var_apikey.key.clone();
3511        let local_var_value = match local_var_apikey.prefix {
3512            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3513            None => local_var_key,
3514        };
3515        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3516    };
3517    local_var_req_builder = local_var_req_builder.json(&captcha_stage_request);
3518
3519    let local_var_req = local_var_req_builder.build()?;
3520    let local_var_resp = local_var_client.execute(local_var_req).await?;
3521
3522    let local_var_status = local_var_resp.status();
3523    let local_var_content = local_var_resp.text().await?;
3524
3525    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3526        serde_json::from_str(&local_var_content).map_err(Error::from)
3527    } else {
3528        let local_var_entity: Option<StagesCaptchaCreateError> = serde_json::from_str(&local_var_content).ok();
3529        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3530        Err(Error::ResponseError(local_var_error))
3531    }
3532}
3533
3534/// CaptchaStage Viewset
3535pub async fn stages_captcha_destroy(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<(), Error<StagesCaptchaDestroyError>> {
3536    let local_var_configuration = configuration;
3537
3538    let local_var_client = &local_var_configuration.client;
3539
3540    let local_var_uri_str = format!("{}/stages/captcha/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
3541    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
3542
3543    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3544        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3545    }
3546    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3547        let local_var_key = local_var_apikey.key.clone();
3548        let local_var_value = match local_var_apikey.prefix {
3549            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3550            None => local_var_key,
3551        };
3552        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3553    };
3554
3555    let local_var_req = local_var_req_builder.build()?;
3556    let local_var_resp = local_var_client.execute(local_var_req).await?;
3557
3558    let local_var_status = local_var_resp.status();
3559    let local_var_content = local_var_resp.text().await?;
3560
3561    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3562        Ok(())
3563    } else {
3564        let local_var_entity: Option<StagesCaptchaDestroyError> = serde_json::from_str(&local_var_content).ok();
3565        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3566        Err(Error::ResponseError(local_var_error))
3567    }
3568}
3569
3570/// CaptchaStage Viewset
3571pub async fn stages_captcha_list(configuration: &configuration::Configuration, name: Option<&str>, ordering: Option<&str>, page: Option<i32>, page_size: Option<i32>, public_key: Option<&str>, search: Option<&str>) -> Result<models::PaginatedCaptchaStageList, Error<StagesCaptchaListError>> {
3572    let local_var_configuration = configuration;
3573
3574    let local_var_client = &local_var_configuration.client;
3575
3576    let local_var_uri_str = format!("{}/stages/captcha/", local_var_configuration.base_path);
3577    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3578
3579    if let Some(ref local_var_str) = name {
3580        local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
3581    }
3582    if let Some(ref local_var_str) = ordering {
3583        local_var_req_builder = local_var_req_builder.query(&[("ordering", &local_var_str.to_string())]);
3584    }
3585    if let Some(ref local_var_str) = page {
3586        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3587    }
3588    if let Some(ref local_var_str) = page_size {
3589        local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]);
3590    }
3591    if let Some(ref local_var_str) = public_key {
3592        local_var_req_builder = local_var_req_builder.query(&[("public_key", &local_var_str.to_string())]);
3593    }
3594    if let Some(ref local_var_str) = search {
3595        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
3596    }
3597    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3598        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3599    }
3600    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3601        let local_var_key = local_var_apikey.key.clone();
3602        let local_var_value = match local_var_apikey.prefix {
3603            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3604            None => local_var_key,
3605        };
3606        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3607    };
3608
3609    let local_var_req = local_var_req_builder.build()?;
3610    let local_var_resp = local_var_client.execute(local_var_req).await?;
3611
3612    let local_var_status = local_var_resp.status();
3613    let local_var_content = local_var_resp.text().await?;
3614
3615    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3616        serde_json::from_str(&local_var_content).map_err(Error::from)
3617    } else {
3618        let local_var_entity: Option<StagesCaptchaListError> = serde_json::from_str(&local_var_content).ok();
3619        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3620        Err(Error::ResponseError(local_var_error))
3621    }
3622}
3623
3624/// CaptchaStage Viewset
3625pub async fn stages_captcha_partial_update(configuration: &configuration::Configuration, stage_uuid: &str, patched_captcha_stage_request: Option<models::PatchedCaptchaStageRequest>) -> Result<models::CaptchaStage, Error<StagesCaptchaPartialUpdateError>> {
3626    let local_var_configuration = configuration;
3627
3628    let local_var_client = &local_var_configuration.client;
3629
3630    let local_var_uri_str = format!("{}/stages/captcha/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
3631    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
3632
3633    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3634        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3635    }
3636    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3637        let local_var_key = local_var_apikey.key.clone();
3638        let local_var_value = match local_var_apikey.prefix {
3639            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3640            None => local_var_key,
3641        };
3642        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3643    };
3644    local_var_req_builder = local_var_req_builder.json(&patched_captcha_stage_request);
3645
3646    let local_var_req = local_var_req_builder.build()?;
3647    let local_var_resp = local_var_client.execute(local_var_req).await?;
3648
3649    let local_var_status = local_var_resp.status();
3650    let local_var_content = local_var_resp.text().await?;
3651
3652    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3653        serde_json::from_str(&local_var_content).map_err(Error::from)
3654    } else {
3655        let local_var_entity: Option<StagesCaptchaPartialUpdateError> = 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/// CaptchaStage Viewset
3662pub async fn stages_captcha_retrieve(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<models::CaptchaStage, Error<StagesCaptchaRetrieveError>> {
3663    let local_var_configuration = configuration;
3664
3665    let local_var_client = &local_var_configuration.client;
3666
3667    let local_var_uri_str = format!("{}/stages/captcha/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
3668    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, 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(ref local_var_apikey) = local_var_configuration.api_key {
3674        let local_var_key = local_var_apikey.key.clone();
3675        let local_var_value = match local_var_apikey.prefix {
3676            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3677            None => local_var_key,
3678        };
3679        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3680    };
3681
3682    let local_var_req = local_var_req_builder.build()?;
3683    let local_var_resp = local_var_client.execute(local_var_req).await?;
3684
3685    let local_var_status = local_var_resp.status();
3686    let local_var_content = local_var_resp.text().await?;
3687
3688    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3689        serde_json::from_str(&local_var_content).map_err(Error::from)
3690    } else {
3691        let local_var_entity: Option<StagesCaptchaRetrieveError> = serde_json::from_str(&local_var_content).ok();
3692        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3693        Err(Error::ResponseError(local_var_error))
3694    }
3695}
3696
3697/// CaptchaStage Viewset
3698pub async fn stages_captcha_update(configuration: &configuration::Configuration, stage_uuid: &str, captcha_stage_request: models::CaptchaStageRequest) -> Result<models::CaptchaStage, Error<StagesCaptchaUpdateError>> {
3699    let local_var_configuration = configuration;
3700
3701    let local_var_client = &local_var_configuration.client;
3702
3703    let local_var_uri_str = format!("{}/stages/captcha/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
3704    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
3705
3706    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3707        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3708    }
3709    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3710        let local_var_key = local_var_apikey.key.clone();
3711        let local_var_value = match local_var_apikey.prefix {
3712            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3713            None => local_var_key,
3714        };
3715        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3716    };
3717    local_var_req_builder = local_var_req_builder.json(&captcha_stage_request);
3718
3719    let local_var_req = local_var_req_builder.build()?;
3720    let local_var_resp = local_var_client.execute(local_var_req).await?;
3721
3722    let local_var_status = local_var_resp.status();
3723    let local_var_content = local_var_resp.text().await?;
3724
3725    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3726        serde_json::from_str(&local_var_content).map_err(Error::from)
3727    } else {
3728        let local_var_entity: Option<StagesCaptchaUpdateError> = serde_json::from_str(&local_var_content).ok();
3729        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3730        Err(Error::ResponseError(local_var_error))
3731    }
3732}
3733
3734/// Get a list of all objects that use this object
3735pub async fn stages_captcha_used_by_list(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<Vec<models::UsedBy>, Error<StagesCaptchaUsedByListError>> {
3736    let local_var_configuration = configuration;
3737
3738    let local_var_client = &local_var_configuration.client;
3739
3740    let local_var_uri_str = format!("{}/stages/captcha/{stage_uuid}/used_by/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
3741    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3742
3743    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3744        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3745    }
3746    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3747        let local_var_key = local_var_apikey.key.clone();
3748        let local_var_value = match local_var_apikey.prefix {
3749            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3750            None => local_var_key,
3751        };
3752        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3753    };
3754
3755    let local_var_req = local_var_req_builder.build()?;
3756    let local_var_resp = local_var_client.execute(local_var_req).await?;
3757
3758    let local_var_status = local_var_resp.status();
3759    let local_var_content = local_var_resp.text().await?;
3760
3761    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3762        serde_json::from_str(&local_var_content).map_err(Error::from)
3763    } else {
3764        let local_var_entity: Option<StagesCaptchaUsedByListError> = serde_json::from_str(&local_var_content).ok();
3765        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3766        Err(Error::ResponseError(local_var_error))
3767    }
3768}
3769
3770/// ConsentStage Viewset
3771pub async fn stages_consent_create(configuration: &configuration::Configuration, consent_stage_request: models::ConsentStageRequest) -> Result<models::ConsentStage, Error<StagesConsentCreateError>> {
3772    let local_var_configuration = configuration;
3773
3774    let local_var_client = &local_var_configuration.client;
3775
3776    let local_var_uri_str = format!("{}/stages/consent/", local_var_configuration.base_path);
3777    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3778
3779    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3780        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3781    }
3782    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3783        let local_var_key = local_var_apikey.key.clone();
3784        let local_var_value = match local_var_apikey.prefix {
3785            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3786            None => local_var_key,
3787        };
3788        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3789    };
3790    local_var_req_builder = local_var_req_builder.json(&consent_stage_request);
3791
3792    let local_var_req = local_var_req_builder.build()?;
3793    let local_var_resp = local_var_client.execute(local_var_req).await?;
3794
3795    let local_var_status = local_var_resp.status();
3796    let local_var_content = local_var_resp.text().await?;
3797
3798    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3799        serde_json::from_str(&local_var_content).map_err(Error::from)
3800    } else {
3801        let local_var_entity: Option<StagesConsentCreateError> = serde_json::from_str(&local_var_content).ok();
3802        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3803        Err(Error::ResponseError(local_var_error))
3804    }
3805}
3806
3807/// ConsentStage Viewset
3808pub async fn stages_consent_destroy(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<(), Error<StagesConsentDestroyError>> {
3809    let local_var_configuration = configuration;
3810
3811    let local_var_client = &local_var_configuration.client;
3812
3813    let local_var_uri_str = format!("{}/stages/consent/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
3814    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
3815
3816    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3817        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3818    }
3819    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3820        let local_var_key = local_var_apikey.key.clone();
3821        let local_var_value = match local_var_apikey.prefix {
3822            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3823            None => local_var_key,
3824        };
3825        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3826    };
3827
3828    let local_var_req = local_var_req_builder.build()?;
3829    let local_var_resp = local_var_client.execute(local_var_req).await?;
3830
3831    let local_var_status = local_var_resp.status();
3832    let local_var_content = local_var_resp.text().await?;
3833
3834    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3835        Ok(())
3836    } else {
3837        let local_var_entity: Option<StagesConsentDestroyError> = serde_json::from_str(&local_var_content).ok();
3838        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3839        Err(Error::ResponseError(local_var_error))
3840    }
3841}
3842
3843/// ConsentStage Viewset
3844pub async fn stages_consent_list(configuration: &configuration::Configuration, consent_expire_in: Option<&str>, mode: Option<&str>, name: Option<&str>, ordering: Option<&str>, page: Option<i32>, page_size: Option<i32>, search: Option<&str>, stage_uuid: Option<&str>) -> Result<models::PaginatedConsentStageList, Error<StagesConsentListError>> {
3845    let local_var_configuration = configuration;
3846
3847    let local_var_client = &local_var_configuration.client;
3848
3849    let local_var_uri_str = format!("{}/stages/consent/", local_var_configuration.base_path);
3850    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3851
3852    if let Some(ref local_var_str) = consent_expire_in {
3853        local_var_req_builder = local_var_req_builder.query(&[("consent_expire_in", &local_var_str.to_string())]);
3854    }
3855    if let Some(ref local_var_str) = mode {
3856        local_var_req_builder = local_var_req_builder.query(&[("mode", &local_var_str.to_string())]);
3857    }
3858    if let Some(ref local_var_str) = name {
3859        local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
3860    }
3861    if let Some(ref local_var_str) = ordering {
3862        local_var_req_builder = local_var_req_builder.query(&[("ordering", &local_var_str.to_string())]);
3863    }
3864    if let Some(ref local_var_str) = page {
3865        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3866    }
3867    if let Some(ref local_var_str) = page_size {
3868        local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]);
3869    }
3870    if let Some(ref local_var_str) = search {
3871        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
3872    }
3873    if let Some(ref local_var_str) = stage_uuid {
3874        local_var_req_builder = local_var_req_builder.query(&[("stage_uuid", &local_var_str.to_string())]);
3875    }
3876    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3877        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3878    }
3879    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3880        let local_var_key = local_var_apikey.key.clone();
3881        let local_var_value = match local_var_apikey.prefix {
3882            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3883            None => local_var_key,
3884        };
3885        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3886    };
3887
3888    let local_var_req = local_var_req_builder.build()?;
3889    let local_var_resp = local_var_client.execute(local_var_req).await?;
3890
3891    let local_var_status = local_var_resp.status();
3892    let local_var_content = local_var_resp.text().await?;
3893
3894    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3895        serde_json::from_str(&local_var_content).map_err(Error::from)
3896    } else {
3897        let local_var_entity: Option<StagesConsentListError> = serde_json::from_str(&local_var_content).ok();
3898        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3899        Err(Error::ResponseError(local_var_error))
3900    }
3901}
3902
3903/// ConsentStage Viewset
3904pub async fn stages_consent_partial_update(configuration: &configuration::Configuration, stage_uuid: &str, patched_consent_stage_request: Option<models::PatchedConsentStageRequest>) -> Result<models::ConsentStage, Error<StagesConsentPartialUpdateError>> {
3905    let local_var_configuration = configuration;
3906
3907    let local_var_client = &local_var_configuration.client;
3908
3909    let local_var_uri_str = format!("{}/stages/consent/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
3910    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
3911
3912    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3913        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3914    }
3915    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3916        let local_var_key = local_var_apikey.key.clone();
3917        let local_var_value = match local_var_apikey.prefix {
3918            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3919            None => local_var_key,
3920        };
3921        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3922    };
3923    local_var_req_builder = local_var_req_builder.json(&patched_consent_stage_request);
3924
3925    let local_var_req = local_var_req_builder.build()?;
3926    let local_var_resp = local_var_client.execute(local_var_req).await?;
3927
3928    let local_var_status = local_var_resp.status();
3929    let local_var_content = local_var_resp.text().await?;
3930
3931    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3932        serde_json::from_str(&local_var_content).map_err(Error::from)
3933    } else {
3934        let local_var_entity: Option<StagesConsentPartialUpdateError> = serde_json::from_str(&local_var_content).ok();
3935        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3936        Err(Error::ResponseError(local_var_error))
3937    }
3938}
3939
3940/// ConsentStage Viewset
3941pub async fn stages_consent_retrieve(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<models::ConsentStage, Error<StagesConsentRetrieveError>> {
3942    let local_var_configuration = configuration;
3943
3944    let local_var_client = &local_var_configuration.client;
3945
3946    let local_var_uri_str = format!("{}/stages/consent/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
3947    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3948
3949    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3950        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3951    }
3952    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3953        let local_var_key = local_var_apikey.key.clone();
3954        let local_var_value = match local_var_apikey.prefix {
3955            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3956            None => local_var_key,
3957        };
3958        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3959    };
3960
3961    let local_var_req = local_var_req_builder.build()?;
3962    let local_var_resp = local_var_client.execute(local_var_req).await?;
3963
3964    let local_var_status = local_var_resp.status();
3965    let local_var_content = local_var_resp.text().await?;
3966
3967    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3968        serde_json::from_str(&local_var_content).map_err(Error::from)
3969    } else {
3970        let local_var_entity: Option<StagesConsentRetrieveError> = serde_json::from_str(&local_var_content).ok();
3971        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3972        Err(Error::ResponseError(local_var_error))
3973    }
3974}
3975
3976/// ConsentStage Viewset
3977pub async fn stages_consent_update(configuration: &configuration::Configuration, stage_uuid: &str, consent_stage_request: models::ConsentStageRequest) -> Result<models::ConsentStage, Error<StagesConsentUpdateError>> {
3978    let local_var_configuration = configuration;
3979
3980    let local_var_client = &local_var_configuration.client;
3981
3982    let local_var_uri_str = format!("{}/stages/consent/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
3983    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
3984
3985    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3986        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3987    }
3988    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
3989        let local_var_key = local_var_apikey.key.clone();
3990        let local_var_value = match local_var_apikey.prefix {
3991            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
3992            None => local_var_key,
3993        };
3994        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
3995    };
3996    local_var_req_builder = local_var_req_builder.json(&consent_stage_request);
3997
3998    let local_var_req = local_var_req_builder.build()?;
3999    let local_var_resp = local_var_client.execute(local_var_req).await?;
4000
4001    let local_var_status = local_var_resp.status();
4002    let local_var_content = local_var_resp.text().await?;
4003
4004    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4005        serde_json::from_str(&local_var_content).map_err(Error::from)
4006    } else {
4007        let local_var_entity: Option<StagesConsentUpdateError> = serde_json::from_str(&local_var_content).ok();
4008        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4009        Err(Error::ResponseError(local_var_error))
4010    }
4011}
4012
4013/// Get a list of all objects that use this object
4014pub async fn stages_consent_used_by_list(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<Vec<models::UsedBy>, Error<StagesConsentUsedByListError>> {
4015    let local_var_configuration = configuration;
4016
4017    let local_var_client = &local_var_configuration.client;
4018
4019    let local_var_uri_str = format!("{}/stages/consent/{stage_uuid}/used_by/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
4020    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4021
4022    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4023        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4024    }
4025    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4026        let local_var_key = local_var_apikey.key.clone();
4027        let local_var_value = match local_var_apikey.prefix {
4028            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4029            None => local_var_key,
4030        };
4031        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4032    };
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    let local_var_content = local_var_resp.text().await?;
4039
4040    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4041        serde_json::from_str(&local_var_content).map_err(Error::from)
4042    } else {
4043        let local_var_entity: Option<StagesConsentUsedByListError> = serde_json::from_str(&local_var_content).ok();
4044        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4045        Err(Error::ResponseError(local_var_error))
4046    }
4047}
4048
4049/// DenyStage Viewset
4050pub async fn stages_deny_create(configuration: &configuration::Configuration, deny_stage_request: models::DenyStageRequest) -> Result<models::DenyStage, Error<StagesDenyCreateError>> {
4051    let local_var_configuration = configuration;
4052
4053    let local_var_client = &local_var_configuration.client;
4054
4055    let local_var_uri_str = format!("{}/stages/deny/", local_var_configuration.base_path);
4056    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4057
4058    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4059        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4060    }
4061    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4062        let local_var_key = local_var_apikey.key.clone();
4063        let local_var_value = match local_var_apikey.prefix {
4064            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4065            None => local_var_key,
4066        };
4067        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4068    };
4069    local_var_req_builder = local_var_req_builder.json(&deny_stage_request);
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    let local_var_content = local_var_resp.text().await?;
4076
4077    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4078        serde_json::from_str(&local_var_content).map_err(Error::from)
4079    } else {
4080        let local_var_entity: Option<StagesDenyCreateError> = serde_json::from_str(&local_var_content).ok();
4081        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4082        Err(Error::ResponseError(local_var_error))
4083    }
4084}
4085
4086/// DenyStage Viewset
4087pub async fn stages_deny_destroy(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<(), Error<StagesDenyDestroyError>> {
4088    let local_var_configuration = configuration;
4089
4090    let local_var_client = &local_var_configuration.client;
4091
4092    let local_var_uri_str = format!("{}/stages/deny/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
4093    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
4094
4095    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4096        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4097    }
4098    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4099        let local_var_key = local_var_apikey.key.clone();
4100        let local_var_value = match local_var_apikey.prefix {
4101            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4102            None => local_var_key,
4103        };
4104        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4105    };
4106
4107    let local_var_req = local_var_req_builder.build()?;
4108    let local_var_resp = local_var_client.execute(local_var_req).await?;
4109
4110    let local_var_status = local_var_resp.status();
4111    let local_var_content = local_var_resp.text().await?;
4112
4113    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4114        Ok(())
4115    } else {
4116        let local_var_entity: Option<StagesDenyDestroyError> = serde_json::from_str(&local_var_content).ok();
4117        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4118        Err(Error::ResponseError(local_var_error))
4119    }
4120}
4121
4122/// DenyStage Viewset
4123pub async fn stages_deny_list(configuration: &configuration::Configuration, deny_message: Option<&str>, name: Option<&str>, ordering: Option<&str>, page: Option<i32>, page_size: Option<i32>, search: Option<&str>, stage_uuid: Option<&str>) -> Result<models::PaginatedDenyStageList, Error<StagesDenyListError>> {
4124    let local_var_configuration = configuration;
4125
4126    let local_var_client = &local_var_configuration.client;
4127
4128    let local_var_uri_str = format!("{}/stages/deny/", local_var_configuration.base_path);
4129    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4130
4131    if let Some(ref local_var_str) = deny_message {
4132        local_var_req_builder = local_var_req_builder.query(&[("deny_message", &local_var_str.to_string())]);
4133    }
4134    if let Some(ref local_var_str) = name {
4135        local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
4136    }
4137    if let Some(ref local_var_str) = ordering {
4138        local_var_req_builder = local_var_req_builder.query(&[("ordering", &local_var_str.to_string())]);
4139    }
4140    if let Some(ref local_var_str) = page {
4141        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
4142    }
4143    if let Some(ref local_var_str) = page_size {
4144        local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]);
4145    }
4146    if let Some(ref local_var_str) = search {
4147        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
4148    }
4149    if let Some(ref local_var_str) = stage_uuid {
4150        local_var_req_builder = local_var_req_builder.query(&[("stage_uuid", &local_var_str.to_string())]);
4151    }
4152    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4153        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4154    }
4155    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4156        let local_var_key = local_var_apikey.key.clone();
4157        let local_var_value = match local_var_apikey.prefix {
4158            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4159            None => local_var_key,
4160        };
4161        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4162    };
4163
4164    let local_var_req = local_var_req_builder.build()?;
4165    let local_var_resp = local_var_client.execute(local_var_req).await?;
4166
4167    let local_var_status = local_var_resp.status();
4168    let local_var_content = local_var_resp.text().await?;
4169
4170    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4171        serde_json::from_str(&local_var_content).map_err(Error::from)
4172    } else {
4173        let local_var_entity: Option<StagesDenyListError> = serde_json::from_str(&local_var_content).ok();
4174        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4175        Err(Error::ResponseError(local_var_error))
4176    }
4177}
4178
4179/// DenyStage Viewset
4180pub async fn stages_deny_partial_update(configuration: &configuration::Configuration, stage_uuid: &str, patched_deny_stage_request: Option<models::PatchedDenyStageRequest>) -> Result<models::DenyStage, Error<StagesDenyPartialUpdateError>> {
4181    let local_var_configuration = configuration;
4182
4183    let local_var_client = &local_var_configuration.client;
4184
4185    let local_var_uri_str = format!("{}/stages/deny/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
4186    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
4187
4188    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4189        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4190    }
4191    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4192        let local_var_key = local_var_apikey.key.clone();
4193        let local_var_value = match local_var_apikey.prefix {
4194            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4195            None => local_var_key,
4196        };
4197        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4198    };
4199    local_var_req_builder = local_var_req_builder.json(&patched_deny_stage_request);
4200
4201    let local_var_req = local_var_req_builder.build()?;
4202    let local_var_resp = local_var_client.execute(local_var_req).await?;
4203
4204    let local_var_status = local_var_resp.status();
4205    let local_var_content = local_var_resp.text().await?;
4206
4207    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4208        serde_json::from_str(&local_var_content).map_err(Error::from)
4209    } else {
4210        let local_var_entity: Option<StagesDenyPartialUpdateError> = serde_json::from_str(&local_var_content).ok();
4211        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4212        Err(Error::ResponseError(local_var_error))
4213    }
4214}
4215
4216/// DenyStage Viewset
4217pub async fn stages_deny_retrieve(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<models::DenyStage, Error<StagesDenyRetrieveError>> {
4218    let local_var_configuration = configuration;
4219
4220    let local_var_client = &local_var_configuration.client;
4221
4222    let local_var_uri_str = format!("{}/stages/deny/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
4223    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4224
4225    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4226        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4227    }
4228    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4229        let local_var_key = local_var_apikey.key.clone();
4230        let local_var_value = match local_var_apikey.prefix {
4231            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4232            None => local_var_key,
4233        };
4234        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4235    };
4236
4237    let local_var_req = local_var_req_builder.build()?;
4238    let local_var_resp = local_var_client.execute(local_var_req).await?;
4239
4240    let local_var_status = local_var_resp.status();
4241    let local_var_content = local_var_resp.text().await?;
4242
4243    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4244        serde_json::from_str(&local_var_content).map_err(Error::from)
4245    } else {
4246        let local_var_entity: Option<StagesDenyRetrieveError> = serde_json::from_str(&local_var_content).ok();
4247        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4248        Err(Error::ResponseError(local_var_error))
4249    }
4250}
4251
4252/// DenyStage Viewset
4253pub async fn stages_deny_update(configuration: &configuration::Configuration, stage_uuid: &str, deny_stage_request: models::DenyStageRequest) -> Result<models::DenyStage, Error<StagesDenyUpdateError>> {
4254    let local_var_configuration = configuration;
4255
4256    let local_var_client = &local_var_configuration.client;
4257
4258    let local_var_uri_str = format!("{}/stages/deny/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
4259    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
4260
4261    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4262        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4263    }
4264    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4265        let local_var_key = local_var_apikey.key.clone();
4266        let local_var_value = match local_var_apikey.prefix {
4267            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4268            None => local_var_key,
4269        };
4270        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4271    };
4272    local_var_req_builder = local_var_req_builder.json(&deny_stage_request);
4273
4274    let local_var_req = local_var_req_builder.build()?;
4275    let local_var_resp = local_var_client.execute(local_var_req).await?;
4276
4277    let local_var_status = local_var_resp.status();
4278    let local_var_content = local_var_resp.text().await?;
4279
4280    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4281        serde_json::from_str(&local_var_content).map_err(Error::from)
4282    } else {
4283        let local_var_entity: Option<StagesDenyUpdateError> = serde_json::from_str(&local_var_content).ok();
4284        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4285        Err(Error::ResponseError(local_var_error))
4286    }
4287}
4288
4289/// Get a list of all objects that use this object
4290pub async fn stages_deny_used_by_list(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<Vec<models::UsedBy>, Error<StagesDenyUsedByListError>> {
4291    let local_var_configuration = configuration;
4292
4293    let local_var_client = &local_var_configuration.client;
4294
4295    let local_var_uri_str = format!("{}/stages/deny/{stage_uuid}/used_by/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
4296    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4297
4298    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4299        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4300    }
4301    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4302        let local_var_key = local_var_apikey.key.clone();
4303        let local_var_value = match local_var_apikey.prefix {
4304            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4305            None => local_var_key,
4306        };
4307        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4308    };
4309
4310    let local_var_req = local_var_req_builder.build()?;
4311    let local_var_resp = local_var_client.execute(local_var_req).await?;
4312
4313    let local_var_status = local_var_resp.status();
4314    let local_var_content = local_var_resp.text().await?;
4315
4316    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4317        serde_json::from_str(&local_var_content).map_err(Error::from)
4318    } else {
4319        let local_var_entity: Option<StagesDenyUsedByListError> = serde_json::from_str(&local_var_content).ok();
4320        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4321        Err(Error::ResponseError(local_var_error))
4322    }
4323}
4324
4325/// DummyStage Viewset
4326pub async fn stages_dummy_create(configuration: &configuration::Configuration, dummy_stage_request: models::DummyStageRequest) -> Result<models::DummyStage, Error<StagesDummyCreateError>> {
4327    let local_var_configuration = configuration;
4328
4329    let local_var_client = &local_var_configuration.client;
4330
4331    let local_var_uri_str = format!("{}/stages/dummy/", local_var_configuration.base_path);
4332    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4333
4334    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4335        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4336    }
4337    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4338        let local_var_key = local_var_apikey.key.clone();
4339        let local_var_value = match local_var_apikey.prefix {
4340            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4341            None => local_var_key,
4342        };
4343        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4344    };
4345    local_var_req_builder = local_var_req_builder.json(&dummy_stage_request);
4346
4347    let local_var_req = local_var_req_builder.build()?;
4348    let local_var_resp = local_var_client.execute(local_var_req).await?;
4349
4350    let local_var_status = local_var_resp.status();
4351    let local_var_content = local_var_resp.text().await?;
4352
4353    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4354        serde_json::from_str(&local_var_content).map_err(Error::from)
4355    } else {
4356        let local_var_entity: Option<StagesDummyCreateError> = serde_json::from_str(&local_var_content).ok();
4357        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4358        Err(Error::ResponseError(local_var_error))
4359    }
4360}
4361
4362/// DummyStage Viewset
4363pub async fn stages_dummy_destroy(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<(), Error<StagesDummyDestroyError>> {
4364    let local_var_configuration = configuration;
4365
4366    let local_var_client = &local_var_configuration.client;
4367
4368    let local_var_uri_str = format!("{}/stages/dummy/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
4369    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
4370
4371    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4372        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4373    }
4374    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4375        let local_var_key = local_var_apikey.key.clone();
4376        let local_var_value = match local_var_apikey.prefix {
4377            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4378            None => local_var_key,
4379        };
4380        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4381    };
4382
4383    let local_var_req = local_var_req_builder.build()?;
4384    let local_var_resp = local_var_client.execute(local_var_req).await?;
4385
4386    let local_var_status = local_var_resp.status();
4387    let local_var_content = local_var_resp.text().await?;
4388
4389    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4390        Ok(())
4391    } else {
4392        let local_var_entity: Option<StagesDummyDestroyError> = serde_json::from_str(&local_var_content).ok();
4393        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4394        Err(Error::ResponseError(local_var_error))
4395    }
4396}
4397
4398/// DummyStage Viewset
4399pub async fn stages_dummy_list(configuration: &configuration::Configuration, name: Option<&str>, ordering: Option<&str>, page: Option<i32>, page_size: Option<i32>, search: Option<&str>, stage_uuid: Option<&str>, throw_error: Option<bool>) -> Result<models::PaginatedDummyStageList, Error<StagesDummyListError>> {
4400    let local_var_configuration = configuration;
4401
4402    let local_var_client = &local_var_configuration.client;
4403
4404    let local_var_uri_str = format!("{}/stages/dummy/", local_var_configuration.base_path);
4405    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4406
4407    if let Some(ref local_var_str) = name {
4408        local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
4409    }
4410    if let Some(ref local_var_str) = ordering {
4411        local_var_req_builder = local_var_req_builder.query(&[("ordering", &local_var_str.to_string())]);
4412    }
4413    if let Some(ref local_var_str) = page {
4414        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
4415    }
4416    if let Some(ref local_var_str) = page_size {
4417        local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]);
4418    }
4419    if let Some(ref local_var_str) = search {
4420        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
4421    }
4422    if let Some(ref local_var_str) = stage_uuid {
4423        local_var_req_builder = local_var_req_builder.query(&[("stage_uuid", &local_var_str.to_string())]);
4424    }
4425    if let Some(ref local_var_str) = throw_error {
4426        local_var_req_builder = local_var_req_builder.query(&[("throw_error", &local_var_str.to_string())]);
4427    }
4428    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4429        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4430    }
4431    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4432        let local_var_key = local_var_apikey.key.clone();
4433        let local_var_value = match local_var_apikey.prefix {
4434            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4435            None => local_var_key,
4436        };
4437        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4438    };
4439
4440    let local_var_req = local_var_req_builder.build()?;
4441    let local_var_resp = local_var_client.execute(local_var_req).await?;
4442
4443    let local_var_status = local_var_resp.status();
4444    let local_var_content = local_var_resp.text().await?;
4445
4446    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4447        serde_json::from_str(&local_var_content).map_err(Error::from)
4448    } else {
4449        let local_var_entity: Option<StagesDummyListError> = serde_json::from_str(&local_var_content).ok();
4450        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4451        Err(Error::ResponseError(local_var_error))
4452    }
4453}
4454
4455/// DummyStage Viewset
4456pub async fn stages_dummy_partial_update(configuration: &configuration::Configuration, stage_uuid: &str, patched_dummy_stage_request: Option<models::PatchedDummyStageRequest>) -> Result<models::DummyStage, Error<StagesDummyPartialUpdateError>> {
4457    let local_var_configuration = configuration;
4458
4459    let local_var_client = &local_var_configuration.client;
4460
4461    let local_var_uri_str = format!("{}/stages/dummy/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
4462    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
4463
4464    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4465        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4466    }
4467    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4468        let local_var_key = local_var_apikey.key.clone();
4469        let local_var_value = match local_var_apikey.prefix {
4470            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4471            None => local_var_key,
4472        };
4473        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4474    };
4475    local_var_req_builder = local_var_req_builder.json(&patched_dummy_stage_request);
4476
4477    let local_var_req = local_var_req_builder.build()?;
4478    let local_var_resp = local_var_client.execute(local_var_req).await?;
4479
4480    let local_var_status = local_var_resp.status();
4481    let local_var_content = local_var_resp.text().await?;
4482
4483    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4484        serde_json::from_str(&local_var_content).map_err(Error::from)
4485    } else {
4486        let local_var_entity: Option<StagesDummyPartialUpdateError> = serde_json::from_str(&local_var_content).ok();
4487        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4488        Err(Error::ResponseError(local_var_error))
4489    }
4490}
4491
4492/// DummyStage Viewset
4493pub async fn stages_dummy_retrieve(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<models::DummyStage, Error<StagesDummyRetrieveError>> {
4494    let local_var_configuration = configuration;
4495
4496    let local_var_client = &local_var_configuration.client;
4497
4498    let local_var_uri_str = format!("{}/stages/dummy/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
4499    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4500
4501    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4502        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4503    }
4504    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4505        let local_var_key = local_var_apikey.key.clone();
4506        let local_var_value = match local_var_apikey.prefix {
4507            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4508            None => local_var_key,
4509        };
4510        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4511    };
4512
4513    let local_var_req = local_var_req_builder.build()?;
4514    let local_var_resp = local_var_client.execute(local_var_req).await?;
4515
4516    let local_var_status = local_var_resp.status();
4517    let local_var_content = local_var_resp.text().await?;
4518
4519    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4520        serde_json::from_str(&local_var_content).map_err(Error::from)
4521    } else {
4522        let local_var_entity: Option<StagesDummyRetrieveError> = serde_json::from_str(&local_var_content).ok();
4523        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4524        Err(Error::ResponseError(local_var_error))
4525    }
4526}
4527
4528/// DummyStage Viewset
4529pub async fn stages_dummy_update(configuration: &configuration::Configuration, stage_uuid: &str, dummy_stage_request: models::DummyStageRequest) -> Result<models::DummyStage, Error<StagesDummyUpdateError>> {
4530    let local_var_configuration = configuration;
4531
4532    let local_var_client = &local_var_configuration.client;
4533
4534    let local_var_uri_str = format!("{}/stages/dummy/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
4535    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
4536
4537    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4538        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4539    }
4540    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4541        let local_var_key = local_var_apikey.key.clone();
4542        let local_var_value = match local_var_apikey.prefix {
4543            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4544            None => local_var_key,
4545        };
4546        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4547    };
4548    local_var_req_builder = local_var_req_builder.json(&dummy_stage_request);
4549
4550    let local_var_req = local_var_req_builder.build()?;
4551    let local_var_resp = local_var_client.execute(local_var_req).await?;
4552
4553    let local_var_status = local_var_resp.status();
4554    let local_var_content = local_var_resp.text().await?;
4555
4556    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4557        serde_json::from_str(&local_var_content).map_err(Error::from)
4558    } else {
4559        let local_var_entity: Option<StagesDummyUpdateError> = serde_json::from_str(&local_var_content).ok();
4560        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4561        Err(Error::ResponseError(local_var_error))
4562    }
4563}
4564
4565/// Get a list of all objects that use this object
4566pub async fn stages_dummy_used_by_list(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<Vec<models::UsedBy>, Error<StagesDummyUsedByListError>> {
4567    let local_var_configuration = configuration;
4568
4569    let local_var_client = &local_var_configuration.client;
4570
4571    let local_var_uri_str = format!("{}/stages/dummy/{stage_uuid}/used_by/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
4572    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4573
4574    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4575        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4576    }
4577    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4578        let local_var_key = local_var_apikey.key.clone();
4579        let local_var_value = match local_var_apikey.prefix {
4580            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4581            None => local_var_key,
4582        };
4583        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4584    };
4585
4586    let local_var_req = local_var_req_builder.build()?;
4587    let local_var_resp = local_var_client.execute(local_var_req).await?;
4588
4589    let local_var_status = local_var_resp.status();
4590    let local_var_content = local_var_resp.text().await?;
4591
4592    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4593        serde_json::from_str(&local_var_content).map_err(Error::from)
4594    } else {
4595        let local_var_entity: Option<StagesDummyUsedByListError> = serde_json::from_str(&local_var_content).ok();
4596        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4597        Err(Error::ResponseError(local_var_error))
4598    }
4599}
4600
4601/// EmailStage Viewset
4602pub async fn stages_email_create(configuration: &configuration::Configuration, email_stage_request: models::EmailStageRequest) -> Result<models::EmailStage, Error<StagesEmailCreateError>> {
4603    let local_var_configuration = configuration;
4604
4605    let local_var_client = &local_var_configuration.client;
4606
4607    let local_var_uri_str = format!("{}/stages/email/", local_var_configuration.base_path);
4608    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4609
4610    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4611        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4612    }
4613    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4614        let local_var_key = local_var_apikey.key.clone();
4615        let local_var_value = match local_var_apikey.prefix {
4616            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4617            None => local_var_key,
4618        };
4619        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4620    };
4621    local_var_req_builder = local_var_req_builder.json(&email_stage_request);
4622
4623    let local_var_req = local_var_req_builder.build()?;
4624    let local_var_resp = local_var_client.execute(local_var_req).await?;
4625
4626    let local_var_status = local_var_resp.status();
4627    let local_var_content = local_var_resp.text().await?;
4628
4629    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4630        serde_json::from_str(&local_var_content).map_err(Error::from)
4631    } else {
4632        let local_var_entity: Option<StagesEmailCreateError> = serde_json::from_str(&local_var_content).ok();
4633        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4634        Err(Error::ResponseError(local_var_error))
4635    }
4636}
4637
4638/// EmailStage Viewset
4639pub async fn stages_email_destroy(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<(), Error<StagesEmailDestroyError>> {
4640    let local_var_configuration = configuration;
4641
4642    let local_var_client = &local_var_configuration.client;
4643
4644    let local_var_uri_str = format!("{}/stages/email/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
4645    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
4646
4647    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4648        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4649    }
4650    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4651        let local_var_key = local_var_apikey.key.clone();
4652        let local_var_value = match local_var_apikey.prefix {
4653            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4654            None => local_var_key,
4655        };
4656        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4657    };
4658
4659    let local_var_req = local_var_req_builder.build()?;
4660    let local_var_resp = local_var_client.execute(local_var_req).await?;
4661
4662    let local_var_status = local_var_resp.status();
4663    let local_var_content = local_var_resp.text().await?;
4664
4665    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4666        Ok(())
4667    } else {
4668        let local_var_entity: Option<StagesEmailDestroyError> = 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/// EmailStage Viewset
4675pub async fn stages_email_list(configuration: &configuration::Configuration, activate_user_on_success: Option<bool>, from_address: Option<&str>, host: Option<&str>, name: Option<&str>, ordering: Option<&str>, page: Option<i32>, page_size: Option<i32>, port: Option<i32>, search: Option<&str>, subject: Option<&str>, template: Option<&str>, timeout: Option<i32>, token_expiry: Option<i32>, use_global_settings: Option<bool>, use_ssl: Option<bool>, use_tls: Option<bool>, username: Option<&str>) -> Result<models::PaginatedEmailStageList, Error<StagesEmailListError>> {
4676    let local_var_configuration = configuration;
4677
4678    let local_var_client = &local_var_configuration.client;
4679
4680    let local_var_uri_str = format!("{}/stages/email/", local_var_configuration.base_path);
4681    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4682
4683    if let Some(ref local_var_str) = activate_user_on_success {
4684        local_var_req_builder = local_var_req_builder.query(&[("activate_user_on_success", &local_var_str.to_string())]);
4685    }
4686    if let Some(ref local_var_str) = from_address {
4687        local_var_req_builder = local_var_req_builder.query(&[("from_address", &local_var_str.to_string())]);
4688    }
4689    if let Some(ref local_var_str) = host {
4690        local_var_req_builder = local_var_req_builder.query(&[("host", &local_var_str.to_string())]);
4691    }
4692    if let Some(ref local_var_str) = name {
4693        local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
4694    }
4695    if let Some(ref local_var_str) = ordering {
4696        local_var_req_builder = local_var_req_builder.query(&[("ordering", &local_var_str.to_string())]);
4697    }
4698    if let Some(ref local_var_str) = page {
4699        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
4700    }
4701    if let Some(ref local_var_str) = page_size {
4702        local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]);
4703    }
4704    if let Some(ref local_var_str) = port {
4705        local_var_req_builder = local_var_req_builder.query(&[("port", &local_var_str.to_string())]);
4706    }
4707    if let Some(ref local_var_str) = search {
4708        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
4709    }
4710    if let Some(ref local_var_str) = subject {
4711        local_var_req_builder = local_var_req_builder.query(&[("subject", &local_var_str.to_string())]);
4712    }
4713    if let Some(ref local_var_str) = template {
4714        local_var_req_builder = local_var_req_builder.query(&[("template", &local_var_str.to_string())]);
4715    }
4716    if let Some(ref local_var_str) = timeout {
4717        local_var_req_builder = local_var_req_builder.query(&[("timeout", &local_var_str.to_string())]);
4718    }
4719    if let Some(ref local_var_str) = token_expiry {
4720        local_var_req_builder = local_var_req_builder.query(&[("token_expiry", &local_var_str.to_string())]);
4721    }
4722    if let Some(ref local_var_str) = use_global_settings {
4723        local_var_req_builder = local_var_req_builder.query(&[("use_global_settings", &local_var_str.to_string())]);
4724    }
4725    if let Some(ref local_var_str) = use_ssl {
4726        local_var_req_builder = local_var_req_builder.query(&[("use_ssl", &local_var_str.to_string())]);
4727    }
4728    if let Some(ref local_var_str) = use_tls {
4729        local_var_req_builder = local_var_req_builder.query(&[("use_tls", &local_var_str.to_string())]);
4730    }
4731    if let Some(ref local_var_str) = username {
4732        local_var_req_builder = local_var_req_builder.query(&[("username", &local_var_str.to_string())]);
4733    }
4734    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4735        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4736    }
4737    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4738        let local_var_key = local_var_apikey.key.clone();
4739        let local_var_value = match local_var_apikey.prefix {
4740            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4741            None => local_var_key,
4742        };
4743        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4744    };
4745
4746    let local_var_req = local_var_req_builder.build()?;
4747    let local_var_resp = local_var_client.execute(local_var_req).await?;
4748
4749    let local_var_status = local_var_resp.status();
4750    let local_var_content = local_var_resp.text().await?;
4751
4752    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4753        serde_json::from_str(&local_var_content).map_err(Error::from)
4754    } else {
4755        let local_var_entity: Option<StagesEmailListError> = serde_json::from_str(&local_var_content).ok();
4756        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4757        Err(Error::ResponseError(local_var_error))
4758    }
4759}
4760
4761/// EmailStage Viewset
4762pub async fn stages_email_partial_update(configuration: &configuration::Configuration, stage_uuid: &str, patched_email_stage_request: Option<models::PatchedEmailStageRequest>) -> Result<models::EmailStage, Error<StagesEmailPartialUpdateError>> {
4763    let local_var_configuration = configuration;
4764
4765    let local_var_client = &local_var_configuration.client;
4766
4767    let local_var_uri_str = format!("{}/stages/email/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
4768    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
4769
4770    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4771        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4772    }
4773    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4774        let local_var_key = local_var_apikey.key.clone();
4775        let local_var_value = match local_var_apikey.prefix {
4776            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4777            None => local_var_key,
4778        };
4779        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4780    };
4781    local_var_req_builder = local_var_req_builder.json(&patched_email_stage_request);
4782
4783    let local_var_req = local_var_req_builder.build()?;
4784    let local_var_resp = local_var_client.execute(local_var_req).await?;
4785
4786    let local_var_status = local_var_resp.status();
4787    let local_var_content = local_var_resp.text().await?;
4788
4789    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4790        serde_json::from_str(&local_var_content).map_err(Error::from)
4791    } else {
4792        let local_var_entity: Option<StagesEmailPartialUpdateError> = serde_json::from_str(&local_var_content).ok();
4793        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4794        Err(Error::ResponseError(local_var_error))
4795    }
4796}
4797
4798/// EmailStage Viewset
4799pub async fn stages_email_retrieve(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<models::EmailStage, Error<StagesEmailRetrieveError>> {
4800    let local_var_configuration = configuration;
4801
4802    let local_var_client = &local_var_configuration.client;
4803
4804    let local_var_uri_str = format!("{}/stages/email/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
4805    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4806
4807    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4808        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4809    }
4810    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4811        let local_var_key = local_var_apikey.key.clone();
4812        let local_var_value = match local_var_apikey.prefix {
4813            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4814            None => local_var_key,
4815        };
4816        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4817    };
4818
4819    let local_var_req = local_var_req_builder.build()?;
4820    let local_var_resp = local_var_client.execute(local_var_req).await?;
4821
4822    let local_var_status = local_var_resp.status();
4823    let local_var_content = local_var_resp.text().await?;
4824
4825    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4826        serde_json::from_str(&local_var_content).map_err(Error::from)
4827    } else {
4828        let local_var_entity: Option<StagesEmailRetrieveError> = serde_json::from_str(&local_var_content).ok();
4829        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4830        Err(Error::ResponseError(local_var_error))
4831    }
4832}
4833
4834/// Get all available templates, including custom templates
4835pub async fn stages_email_templates_list(configuration: &configuration::Configuration, ) -> Result<Vec<models::TypeCreate>, Error<StagesEmailTemplatesListError>> {
4836    let local_var_configuration = configuration;
4837
4838    let local_var_client = &local_var_configuration.client;
4839
4840    let local_var_uri_str = format!("{}/stages/email/templates/", local_var_configuration.base_path);
4841    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4842
4843    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4844        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4845    }
4846    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4847        let local_var_key = local_var_apikey.key.clone();
4848        let local_var_value = match local_var_apikey.prefix {
4849            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4850            None => local_var_key,
4851        };
4852        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4853    };
4854
4855    let local_var_req = local_var_req_builder.build()?;
4856    let local_var_resp = local_var_client.execute(local_var_req).await?;
4857
4858    let local_var_status = local_var_resp.status();
4859    let local_var_content = local_var_resp.text().await?;
4860
4861    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4862        serde_json::from_str(&local_var_content).map_err(Error::from)
4863    } else {
4864        let local_var_entity: Option<StagesEmailTemplatesListError> = serde_json::from_str(&local_var_content).ok();
4865        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4866        Err(Error::ResponseError(local_var_error))
4867    }
4868}
4869
4870/// EmailStage Viewset
4871pub async fn stages_email_update(configuration: &configuration::Configuration, stage_uuid: &str, email_stage_request: models::EmailStageRequest) -> Result<models::EmailStage, Error<StagesEmailUpdateError>> {
4872    let local_var_configuration = configuration;
4873
4874    let local_var_client = &local_var_configuration.client;
4875
4876    let local_var_uri_str = format!("{}/stages/email/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
4877    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
4878
4879    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4880        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4881    }
4882    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4883        let local_var_key = local_var_apikey.key.clone();
4884        let local_var_value = match local_var_apikey.prefix {
4885            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4886            None => local_var_key,
4887        };
4888        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4889    };
4890    local_var_req_builder = local_var_req_builder.json(&email_stage_request);
4891
4892    let local_var_req = local_var_req_builder.build()?;
4893    let local_var_resp = local_var_client.execute(local_var_req).await?;
4894
4895    let local_var_status = local_var_resp.status();
4896    let local_var_content = local_var_resp.text().await?;
4897
4898    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4899        serde_json::from_str(&local_var_content).map_err(Error::from)
4900    } else {
4901        let local_var_entity: Option<StagesEmailUpdateError> = serde_json::from_str(&local_var_content).ok();
4902        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4903        Err(Error::ResponseError(local_var_error))
4904    }
4905}
4906
4907/// Get a list of all objects that use this object
4908pub async fn stages_email_used_by_list(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<Vec<models::UsedBy>, Error<StagesEmailUsedByListError>> {
4909    let local_var_configuration = configuration;
4910
4911    let local_var_client = &local_var_configuration.client;
4912
4913    let local_var_uri_str = format!("{}/stages/email/{stage_uuid}/used_by/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
4914    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4915
4916    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4917        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4918    }
4919    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4920        let local_var_key = local_var_apikey.key.clone();
4921        let local_var_value = match local_var_apikey.prefix {
4922            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4923            None => local_var_key,
4924        };
4925        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4926    };
4927
4928    let local_var_req = local_var_req_builder.build()?;
4929    let local_var_resp = local_var_client.execute(local_var_req).await?;
4930
4931    let local_var_status = local_var_resp.status();
4932    let local_var_content = local_var_resp.text().await?;
4933
4934    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4935        serde_json::from_str(&local_var_content).map_err(Error::from)
4936    } else {
4937        let local_var_entity: Option<StagesEmailUsedByListError> = serde_json::from_str(&local_var_content).ok();
4938        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4939        Err(Error::ResponseError(local_var_error))
4940    }
4941}
4942
4943/// IdentificationStage Viewset
4944pub async fn stages_identification_create(configuration: &configuration::Configuration, identification_stage_request: models::IdentificationStageRequest) -> Result<models::IdentificationStage, Error<StagesIdentificationCreateError>> {
4945    let local_var_configuration = configuration;
4946
4947    let local_var_client = &local_var_configuration.client;
4948
4949    let local_var_uri_str = format!("{}/stages/identification/", local_var_configuration.base_path);
4950    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4951
4952    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4953        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4954    }
4955    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4956        let local_var_key = local_var_apikey.key.clone();
4957        let local_var_value = match local_var_apikey.prefix {
4958            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4959            None => local_var_key,
4960        };
4961        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4962    };
4963    local_var_req_builder = local_var_req_builder.json(&identification_stage_request);
4964
4965    let local_var_req = local_var_req_builder.build()?;
4966    let local_var_resp = local_var_client.execute(local_var_req).await?;
4967
4968    let local_var_status = local_var_resp.status();
4969    let local_var_content = local_var_resp.text().await?;
4970
4971    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4972        serde_json::from_str(&local_var_content).map_err(Error::from)
4973    } else {
4974        let local_var_entity: Option<StagesIdentificationCreateError> = serde_json::from_str(&local_var_content).ok();
4975        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4976        Err(Error::ResponseError(local_var_error))
4977    }
4978}
4979
4980/// IdentificationStage Viewset
4981pub async fn stages_identification_destroy(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<(), Error<StagesIdentificationDestroyError>> {
4982    let local_var_configuration = configuration;
4983
4984    let local_var_client = &local_var_configuration.client;
4985
4986    let local_var_uri_str = format!("{}/stages/identification/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
4987    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
4988
4989    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4990        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4991    }
4992    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
4993        let local_var_key = local_var_apikey.key.clone();
4994        let local_var_value = match local_var_apikey.prefix {
4995            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
4996            None => local_var_key,
4997        };
4998        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
4999    };
5000
5001    let local_var_req = local_var_req_builder.build()?;
5002    let local_var_resp = local_var_client.execute(local_var_req).await?;
5003
5004    let local_var_status = local_var_resp.status();
5005    let local_var_content = local_var_resp.text().await?;
5006
5007    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5008        Ok(())
5009    } else {
5010        let local_var_entity: Option<StagesIdentificationDestroyError> = serde_json::from_str(&local_var_content).ok();
5011        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5012        Err(Error::ResponseError(local_var_error))
5013    }
5014}
5015
5016/// IdentificationStage Viewset
5017pub async fn stages_identification_list(configuration: &configuration::Configuration, case_insensitive_matching: Option<bool>, enrollment_flow: Option<&str>, name: Option<&str>, ordering: Option<&str>, page: Option<i32>, page_size: Option<i32>, password_stage: Option<&str>, passwordless_flow: Option<&str>, recovery_flow: Option<&str>, search: Option<&str>, show_matched_user: Option<bool>, show_source_labels: Option<bool>) -> Result<models::PaginatedIdentificationStageList, Error<StagesIdentificationListError>> {
5018    let local_var_configuration = configuration;
5019
5020    let local_var_client = &local_var_configuration.client;
5021
5022    let local_var_uri_str = format!("{}/stages/identification/", local_var_configuration.base_path);
5023    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
5024
5025    if let Some(ref local_var_str) = case_insensitive_matching {
5026        local_var_req_builder = local_var_req_builder.query(&[("case_insensitive_matching", &local_var_str.to_string())]);
5027    }
5028    if let Some(ref local_var_str) = enrollment_flow {
5029        local_var_req_builder = local_var_req_builder.query(&[("enrollment_flow", &local_var_str.to_string())]);
5030    }
5031    if let Some(ref local_var_str) = name {
5032        local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
5033    }
5034    if let Some(ref local_var_str) = ordering {
5035        local_var_req_builder = local_var_req_builder.query(&[("ordering", &local_var_str.to_string())]);
5036    }
5037    if let Some(ref local_var_str) = page {
5038        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
5039    }
5040    if let Some(ref local_var_str) = page_size {
5041        local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]);
5042    }
5043    if let Some(ref local_var_str) = password_stage {
5044        local_var_req_builder = local_var_req_builder.query(&[("password_stage", &local_var_str.to_string())]);
5045    }
5046    if let Some(ref local_var_str) = passwordless_flow {
5047        local_var_req_builder = local_var_req_builder.query(&[("passwordless_flow", &local_var_str.to_string())]);
5048    }
5049    if let Some(ref local_var_str) = recovery_flow {
5050        local_var_req_builder = local_var_req_builder.query(&[("recovery_flow", &local_var_str.to_string())]);
5051    }
5052    if let Some(ref local_var_str) = search {
5053        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
5054    }
5055    if let Some(ref local_var_str) = show_matched_user {
5056        local_var_req_builder = local_var_req_builder.query(&[("show_matched_user", &local_var_str.to_string())]);
5057    }
5058    if let Some(ref local_var_str) = show_source_labels {
5059        local_var_req_builder = local_var_req_builder.query(&[("show_source_labels", &local_var_str.to_string())]);
5060    }
5061    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5062        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5063    }
5064    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5065        let local_var_key = local_var_apikey.key.clone();
5066        let local_var_value = match local_var_apikey.prefix {
5067            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5068            None => local_var_key,
5069        };
5070        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5071    };
5072
5073    let local_var_req = local_var_req_builder.build()?;
5074    let local_var_resp = local_var_client.execute(local_var_req).await?;
5075
5076    let local_var_status = local_var_resp.status();
5077    let local_var_content = local_var_resp.text().await?;
5078
5079    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5080        serde_json::from_str(&local_var_content).map_err(Error::from)
5081    } else {
5082        let local_var_entity: Option<StagesIdentificationListError> = serde_json::from_str(&local_var_content).ok();
5083        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5084        Err(Error::ResponseError(local_var_error))
5085    }
5086}
5087
5088/// IdentificationStage Viewset
5089pub async fn stages_identification_partial_update(configuration: &configuration::Configuration, stage_uuid: &str, patched_identification_stage_request: Option<models::PatchedIdentificationStageRequest>) -> Result<models::IdentificationStage, Error<StagesIdentificationPartialUpdateError>> {
5090    let local_var_configuration = configuration;
5091
5092    let local_var_client = &local_var_configuration.client;
5093
5094    let local_var_uri_str = format!("{}/stages/identification/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
5095    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
5096
5097    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5098        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5099    }
5100    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5101        let local_var_key = local_var_apikey.key.clone();
5102        let local_var_value = match local_var_apikey.prefix {
5103            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5104            None => local_var_key,
5105        };
5106        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5107    };
5108    local_var_req_builder = local_var_req_builder.json(&patched_identification_stage_request);
5109
5110    let local_var_req = local_var_req_builder.build()?;
5111    let local_var_resp = local_var_client.execute(local_var_req).await?;
5112
5113    let local_var_status = local_var_resp.status();
5114    let local_var_content = local_var_resp.text().await?;
5115
5116    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5117        serde_json::from_str(&local_var_content).map_err(Error::from)
5118    } else {
5119        let local_var_entity: Option<StagesIdentificationPartialUpdateError> = serde_json::from_str(&local_var_content).ok();
5120        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5121        Err(Error::ResponseError(local_var_error))
5122    }
5123}
5124
5125/// IdentificationStage Viewset
5126pub async fn stages_identification_retrieve(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<models::IdentificationStage, Error<StagesIdentificationRetrieveError>> {
5127    let local_var_configuration = configuration;
5128
5129    let local_var_client = &local_var_configuration.client;
5130
5131    let local_var_uri_str = format!("{}/stages/identification/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
5132    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
5133
5134    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5135        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5136    }
5137    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5138        let local_var_key = local_var_apikey.key.clone();
5139        let local_var_value = match local_var_apikey.prefix {
5140            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5141            None => local_var_key,
5142        };
5143        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5144    };
5145
5146    let local_var_req = local_var_req_builder.build()?;
5147    let local_var_resp = local_var_client.execute(local_var_req).await?;
5148
5149    let local_var_status = local_var_resp.status();
5150    let local_var_content = local_var_resp.text().await?;
5151
5152    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5153        serde_json::from_str(&local_var_content).map_err(Error::from)
5154    } else {
5155        let local_var_entity: Option<StagesIdentificationRetrieveError> = serde_json::from_str(&local_var_content).ok();
5156        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5157        Err(Error::ResponseError(local_var_error))
5158    }
5159}
5160
5161/// IdentificationStage Viewset
5162pub async fn stages_identification_update(configuration: &configuration::Configuration, stage_uuid: &str, identification_stage_request: models::IdentificationStageRequest) -> Result<models::IdentificationStage, Error<StagesIdentificationUpdateError>> {
5163    let local_var_configuration = configuration;
5164
5165    let local_var_client = &local_var_configuration.client;
5166
5167    let local_var_uri_str = format!("{}/stages/identification/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
5168    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
5169
5170    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5171        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5172    }
5173    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5174        let local_var_key = local_var_apikey.key.clone();
5175        let local_var_value = match local_var_apikey.prefix {
5176            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5177            None => local_var_key,
5178        };
5179        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5180    };
5181    local_var_req_builder = local_var_req_builder.json(&identification_stage_request);
5182
5183    let local_var_req = local_var_req_builder.build()?;
5184    let local_var_resp = local_var_client.execute(local_var_req).await?;
5185
5186    let local_var_status = local_var_resp.status();
5187    let local_var_content = local_var_resp.text().await?;
5188
5189    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5190        serde_json::from_str(&local_var_content).map_err(Error::from)
5191    } else {
5192        let local_var_entity: Option<StagesIdentificationUpdateError> = serde_json::from_str(&local_var_content).ok();
5193        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5194        Err(Error::ResponseError(local_var_error))
5195    }
5196}
5197
5198/// Get a list of all objects that use this object
5199pub async fn stages_identification_used_by_list(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<Vec<models::UsedBy>, Error<StagesIdentificationUsedByListError>> {
5200    let local_var_configuration = configuration;
5201
5202    let local_var_client = &local_var_configuration.client;
5203
5204    let local_var_uri_str = format!("{}/stages/identification/{stage_uuid}/used_by/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
5205    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
5206
5207    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5208        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5209    }
5210    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5211        let local_var_key = local_var_apikey.key.clone();
5212        let local_var_value = match local_var_apikey.prefix {
5213            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5214            None => local_var_key,
5215        };
5216        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5217    };
5218
5219    let local_var_req = local_var_req_builder.build()?;
5220    let local_var_resp = local_var_client.execute(local_var_req).await?;
5221
5222    let local_var_status = local_var_resp.status();
5223    let local_var_content = local_var_resp.text().await?;
5224
5225    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5226        serde_json::from_str(&local_var_content).map_err(Error::from)
5227    } else {
5228        let local_var_entity: Option<StagesIdentificationUsedByListError> = serde_json::from_str(&local_var_content).ok();
5229        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5230        Err(Error::ResponseError(local_var_error))
5231    }
5232}
5233
5234/// Invitation Viewset
5235pub async fn stages_invitation_invitations_create(configuration: &configuration::Configuration, invitation_request: models::InvitationRequest) -> Result<models::Invitation, Error<StagesInvitationInvitationsCreateError>> {
5236    let local_var_configuration = configuration;
5237
5238    let local_var_client = &local_var_configuration.client;
5239
5240    let local_var_uri_str = format!("{}/stages/invitation/invitations/", local_var_configuration.base_path);
5241    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
5242
5243    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5244        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5245    }
5246    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5247        let local_var_key = local_var_apikey.key.clone();
5248        let local_var_value = match local_var_apikey.prefix {
5249            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5250            None => local_var_key,
5251        };
5252        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5253    };
5254    local_var_req_builder = local_var_req_builder.json(&invitation_request);
5255
5256    let local_var_req = local_var_req_builder.build()?;
5257    let local_var_resp = local_var_client.execute(local_var_req).await?;
5258
5259    let local_var_status = local_var_resp.status();
5260    let local_var_content = local_var_resp.text().await?;
5261
5262    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5263        serde_json::from_str(&local_var_content).map_err(Error::from)
5264    } else {
5265        let local_var_entity: Option<StagesInvitationInvitationsCreateError> = serde_json::from_str(&local_var_content).ok();
5266        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5267        Err(Error::ResponseError(local_var_error))
5268    }
5269}
5270
5271/// Invitation Viewset
5272pub async fn stages_invitation_invitations_destroy(configuration: &configuration::Configuration, invite_uuid: &str) -> Result<(), Error<StagesInvitationInvitationsDestroyError>> {
5273    let local_var_configuration = configuration;
5274
5275    let local_var_client = &local_var_configuration.client;
5276
5277    let local_var_uri_str = format!("{}/stages/invitation/invitations/{invite_uuid}/", local_var_configuration.base_path, invite_uuid=crate::apis::urlencode(invite_uuid));
5278    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5279
5280    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5281        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5282    }
5283    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5284        let local_var_key = local_var_apikey.key.clone();
5285        let local_var_value = match local_var_apikey.prefix {
5286            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5287            None => local_var_key,
5288        };
5289        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5290    };
5291
5292    let local_var_req = local_var_req_builder.build()?;
5293    let local_var_resp = local_var_client.execute(local_var_req).await?;
5294
5295    let local_var_status = local_var_resp.status();
5296    let local_var_content = local_var_resp.text().await?;
5297
5298    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5299        Ok(())
5300    } else {
5301        let local_var_entity: Option<StagesInvitationInvitationsDestroyError> = serde_json::from_str(&local_var_content).ok();
5302        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5303        Err(Error::ResponseError(local_var_error))
5304    }
5305}
5306
5307/// Invitation Viewset
5308pub async fn stages_invitation_invitations_list(configuration: &configuration::Configuration, created_by__username: Option<&str>, expires: Option<String>, flow__slug: Option<&str>, name: Option<&str>, ordering: Option<&str>, page: Option<i32>, page_size: Option<i32>, search: Option<&str>) -> Result<models::PaginatedInvitationList, Error<StagesInvitationInvitationsListError>> {
5309    let local_var_configuration = configuration;
5310
5311    let local_var_client = &local_var_configuration.client;
5312
5313    let local_var_uri_str = format!("{}/stages/invitation/invitations/", local_var_configuration.base_path);
5314    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
5315
5316    if let Some(ref local_var_str) = created_by__username {
5317        local_var_req_builder = local_var_req_builder.query(&[("created_by__username", &local_var_str.to_string())]);
5318    }
5319    if let Some(ref local_var_str) = expires {
5320        local_var_req_builder = local_var_req_builder.query(&[("expires", &local_var_str.to_string())]);
5321    }
5322    if let Some(ref local_var_str) = flow__slug {
5323        local_var_req_builder = local_var_req_builder.query(&[("flow__slug", &local_var_str.to_string())]);
5324    }
5325    if let Some(ref local_var_str) = name {
5326        local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
5327    }
5328    if let Some(ref local_var_str) = ordering {
5329        local_var_req_builder = local_var_req_builder.query(&[("ordering", &local_var_str.to_string())]);
5330    }
5331    if let Some(ref local_var_str) = page {
5332        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
5333    }
5334    if let Some(ref local_var_str) = page_size {
5335        local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]);
5336    }
5337    if let Some(ref local_var_str) = search {
5338        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
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(ref local_var_apikey) = local_var_configuration.api_key {
5344        let local_var_key = local_var_apikey.key.clone();
5345        let local_var_value = match local_var_apikey.prefix {
5346            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5347            None => local_var_key,
5348        };
5349        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5350    };
5351
5352    let local_var_req = local_var_req_builder.build()?;
5353    let local_var_resp = local_var_client.execute(local_var_req).await?;
5354
5355    let local_var_status = local_var_resp.status();
5356    let local_var_content = local_var_resp.text().await?;
5357
5358    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5359        serde_json::from_str(&local_var_content).map_err(Error::from)
5360    } else {
5361        let local_var_entity: Option<StagesInvitationInvitationsListError> = serde_json::from_str(&local_var_content).ok();
5362        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5363        Err(Error::ResponseError(local_var_error))
5364    }
5365}
5366
5367/// Invitation Viewset
5368pub async fn stages_invitation_invitations_partial_update(configuration: &configuration::Configuration, invite_uuid: &str, patched_invitation_request: Option<models::PatchedInvitationRequest>) -> Result<models::Invitation, Error<StagesInvitationInvitationsPartialUpdateError>> {
5369    let local_var_configuration = configuration;
5370
5371    let local_var_client = &local_var_configuration.client;
5372
5373    let local_var_uri_str = format!("{}/stages/invitation/invitations/{invite_uuid}/", local_var_configuration.base_path, invite_uuid=crate::apis::urlencode(invite_uuid));
5374    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
5375
5376    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5377        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5378    }
5379    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5380        let local_var_key = local_var_apikey.key.clone();
5381        let local_var_value = match local_var_apikey.prefix {
5382            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5383            None => local_var_key,
5384        };
5385        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5386    };
5387    local_var_req_builder = local_var_req_builder.json(&patched_invitation_request);
5388
5389    let local_var_req = local_var_req_builder.build()?;
5390    let local_var_resp = local_var_client.execute(local_var_req).await?;
5391
5392    let local_var_status = local_var_resp.status();
5393    let local_var_content = local_var_resp.text().await?;
5394
5395    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5396        serde_json::from_str(&local_var_content).map_err(Error::from)
5397    } else {
5398        let local_var_entity: Option<StagesInvitationInvitationsPartialUpdateError> = serde_json::from_str(&local_var_content).ok();
5399        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5400        Err(Error::ResponseError(local_var_error))
5401    }
5402}
5403
5404/// Invitation Viewset
5405pub async fn stages_invitation_invitations_retrieve(configuration: &configuration::Configuration, invite_uuid: &str) -> Result<models::Invitation, Error<StagesInvitationInvitationsRetrieveError>> {
5406    let local_var_configuration = configuration;
5407
5408    let local_var_client = &local_var_configuration.client;
5409
5410    let local_var_uri_str = format!("{}/stages/invitation/invitations/{invite_uuid}/", local_var_configuration.base_path, invite_uuid=crate::apis::urlencode(invite_uuid));
5411    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
5412
5413    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5414        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5415    }
5416    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5417        let local_var_key = local_var_apikey.key.clone();
5418        let local_var_value = match local_var_apikey.prefix {
5419            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5420            None => local_var_key,
5421        };
5422        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5423    };
5424
5425    let local_var_req = local_var_req_builder.build()?;
5426    let local_var_resp = local_var_client.execute(local_var_req).await?;
5427
5428    let local_var_status = local_var_resp.status();
5429    let local_var_content = local_var_resp.text().await?;
5430
5431    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5432        serde_json::from_str(&local_var_content).map_err(Error::from)
5433    } else {
5434        let local_var_entity: Option<StagesInvitationInvitationsRetrieveError> = serde_json::from_str(&local_var_content).ok();
5435        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5436        Err(Error::ResponseError(local_var_error))
5437    }
5438}
5439
5440/// Invitation Viewset
5441pub async fn stages_invitation_invitations_update(configuration: &configuration::Configuration, invite_uuid: &str, invitation_request: models::InvitationRequest) -> Result<models::Invitation, Error<StagesInvitationInvitationsUpdateError>> {
5442    let local_var_configuration = configuration;
5443
5444    let local_var_client = &local_var_configuration.client;
5445
5446    let local_var_uri_str = format!("{}/stages/invitation/invitations/{invite_uuid}/", local_var_configuration.base_path, invite_uuid=crate::apis::urlencode(invite_uuid));
5447    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
5448
5449    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5450        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5451    }
5452    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5453        let local_var_key = local_var_apikey.key.clone();
5454        let local_var_value = match local_var_apikey.prefix {
5455            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5456            None => local_var_key,
5457        };
5458        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5459    };
5460    local_var_req_builder = local_var_req_builder.json(&invitation_request);
5461
5462    let local_var_req = local_var_req_builder.build()?;
5463    let local_var_resp = local_var_client.execute(local_var_req).await?;
5464
5465    let local_var_status = local_var_resp.status();
5466    let local_var_content = local_var_resp.text().await?;
5467
5468    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5469        serde_json::from_str(&local_var_content).map_err(Error::from)
5470    } else {
5471        let local_var_entity: Option<StagesInvitationInvitationsUpdateError> = serde_json::from_str(&local_var_content).ok();
5472        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5473        Err(Error::ResponseError(local_var_error))
5474    }
5475}
5476
5477/// Get a list of all objects that use this object
5478pub async fn stages_invitation_invitations_used_by_list(configuration: &configuration::Configuration, invite_uuid: &str) -> Result<Vec<models::UsedBy>, Error<StagesInvitationInvitationsUsedByListError>> {
5479    let local_var_configuration = configuration;
5480
5481    let local_var_client = &local_var_configuration.client;
5482
5483    let local_var_uri_str = format!("{}/stages/invitation/invitations/{invite_uuid}/used_by/", local_var_configuration.base_path, invite_uuid=crate::apis::urlencode(invite_uuid));
5484    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
5485
5486    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5487        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5488    }
5489    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5490        let local_var_key = local_var_apikey.key.clone();
5491        let local_var_value = match local_var_apikey.prefix {
5492            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5493            None => local_var_key,
5494        };
5495        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5496    };
5497
5498    let local_var_req = local_var_req_builder.build()?;
5499    let local_var_resp = local_var_client.execute(local_var_req).await?;
5500
5501    let local_var_status = local_var_resp.status();
5502    let local_var_content = local_var_resp.text().await?;
5503
5504    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5505        serde_json::from_str(&local_var_content).map_err(Error::from)
5506    } else {
5507        let local_var_entity: Option<StagesInvitationInvitationsUsedByListError> = serde_json::from_str(&local_var_content).ok();
5508        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5509        Err(Error::ResponseError(local_var_error))
5510    }
5511}
5512
5513/// InvitationStage Viewset
5514pub async fn stages_invitation_stages_create(configuration: &configuration::Configuration, invitation_stage_request: models::InvitationStageRequest) -> Result<models::InvitationStage, Error<StagesInvitationStagesCreateError>> {
5515    let local_var_configuration = configuration;
5516
5517    let local_var_client = &local_var_configuration.client;
5518
5519    let local_var_uri_str = format!("{}/stages/invitation/stages/", local_var_configuration.base_path);
5520    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
5521
5522    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5523        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5524    }
5525    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5526        let local_var_key = local_var_apikey.key.clone();
5527        let local_var_value = match local_var_apikey.prefix {
5528            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5529            None => local_var_key,
5530        };
5531        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5532    };
5533    local_var_req_builder = local_var_req_builder.json(&invitation_stage_request);
5534
5535    let local_var_req = local_var_req_builder.build()?;
5536    let local_var_resp = local_var_client.execute(local_var_req).await?;
5537
5538    let local_var_status = local_var_resp.status();
5539    let local_var_content = local_var_resp.text().await?;
5540
5541    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5542        serde_json::from_str(&local_var_content).map_err(Error::from)
5543    } else {
5544        let local_var_entity: Option<StagesInvitationStagesCreateError> = serde_json::from_str(&local_var_content).ok();
5545        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5546        Err(Error::ResponseError(local_var_error))
5547    }
5548}
5549
5550/// InvitationStage Viewset
5551pub async fn stages_invitation_stages_destroy(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<(), Error<StagesInvitationStagesDestroyError>> {
5552    let local_var_configuration = configuration;
5553
5554    let local_var_client = &local_var_configuration.client;
5555
5556    let local_var_uri_str = format!("{}/stages/invitation/stages/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
5557    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5558
5559    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5560        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5561    }
5562    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5563        let local_var_key = local_var_apikey.key.clone();
5564        let local_var_value = match local_var_apikey.prefix {
5565            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5566            None => local_var_key,
5567        };
5568        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5569    };
5570
5571    let local_var_req = local_var_req_builder.build()?;
5572    let local_var_resp = local_var_client.execute(local_var_req).await?;
5573
5574    let local_var_status = local_var_resp.status();
5575    let local_var_content = local_var_resp.text().await?;
5576
5577    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5578        Ok(())
5579    } else {
5580        let local_var_entity: Option<StagesInvitationStagesDestroyError> = serde_json::from_str(&local_var_content).ok();
5581        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5582        Err(Error::ResponseError(local_var_error))
5583    }
5584}
5585
5586/// InvitationStage Viewset
5587pub async fn stages_invitation_stages_list(configuration: &configuration::Configuration, continue_flow_without_invitation: Option<bool>, name: Option<&str>, no_flows: Option<bool>, ordering: Option<&str>, page: Option<i32>, page_size: Option<i32>, search: Option<&str>, stage_uuid: Option<&str>) -> Result<models::PaginatedInvitationStageList, Error<StagesInvitationStagesListError>> {
5588    let local_var_configuration = configuration;
5589
5590    let local_var_client = &local_var_configuration.client;
5591
5592    let local_var_uri_str = format!("{}/stages/invitation/stages/", local_var_configuration.base_path);
5593    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
5594
5595    if let Some(ref local_var_str) = continue_flow_without_invitation {
5596        local_var_req_builder = local_var_req_builder.query(&[("continue_flow_without_invitation", &local_var_str.to_string())]);
5597    }
5598    if let Some(ref local_var_str) = name {
5599        local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
5600    }
5601    if let Some(ref local_var_str) = no_flows {
5602        local_var_req_builder = local_var_req_builder.query(&[("no_flows", &local_var_str.to_string())]);
5603    }
5604    if let Some(ref local_var_str) = ordering {
5605        local_var_req_builder = local_var_req_builder.query(&[("ordering", &local_var_str.to_string())]);
5606    }
5607    if let Some(ref local_var_str) = page {
5608        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
5609    }
5610    if let Some(ref local_var_str) = page_size {
5611        local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]);
5612    }
5613    if let Some(ref local_var_str) = search {
5614        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
5615    }
5616    if let Some(ref local_var_str) = stage_uuid {
5617        local_var_req_builder = local_var_req_builder.query(&[("stage_uuid", &local_var_str.to_string())]);
5618    }
5619    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5620        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5621    }
5622    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5623        let local_var_key = local_var_apikey.key.clone();
5624        let local_var_value = match local_var_apikey.prefix {
5625            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5626            None => local_var_key,
5627        };
5628        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5629    };
5630
5631    let local_var_req = local_var_req_builder.build()?;
5632    let local_var_resp = local_var_client.execute(local_var_req).await?;
5633
5634    let local_var_status = local_var_resp.status();
5635    let local_var_content = local_var_resp.text().await?;
5636
5637    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5638        serde_json::from_str(&local_var_content).map_err(Error::from)
5639    } else {
5640        let local_var_entity: Option<StagesInvitationStagesListError> = serde_json::from_str(&local_var_content).ok();
5641        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5642        Err(Error::ResponseError(local_var_error))
5643    }
5644}
5645
5646/// InvitationStage Viewset
5647pub async fn stages_invitation_stages_partial_update(configuration: &configuration::Configuration, stage_uuid: &str, patched_invitation_stage_request: Option<models::PatchedInvitationStageRequest>) -> Result<models::InvitationStage, Error<StagesInvitationStagesPartialUpdateError>> {
5648    let local_var_configuration = configuration;
5649
5650    let local_var_client = &local_var_configuration.client;
5651
5652    let local_var_uri_str = format!("{}/stages/invitation/stages/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
5653    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
5654
5655    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5656        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5657    }
5658    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5659        let local_var_key = local_var_apikey.key.clone();
5660        let local_var_value = match local_var_apikey.prefix {
5661            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5662            None => local_var_key,
5663        };
5664        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5665    };
5666    local_var_req_builder = local_var_req_builder.json(&patched_invitation_stage_request);
5667
5668    let local_var_req = local_var_req_builder.build()?;
5669    let local_var_resp = local_var_client.execute(local_var_req).await?;
5670
5671    let local_var_status = local_var_resp.status();
5672    let local_var_content = local_var_resp.text().await?;
5673
5674    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5675        serde_json::from_str(&local_var_content).map_err(Error::from)
5676    } else {
5677        let local_var_entity: Option<StagesInvitationStagesPartialUpdateError> = serde_json::from_str(&local_var_content).ok();
5678        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5679        Err(Error::ResponseError(local_var_error))
5680    }
5681}
5682
5683/// InvitationStage Viewset
5684pub async fn stages_invitation_stages_retrieve(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<models::InvitationStage, Error<StagesInvitationStagesRetrieveError>> {
5685    let local_var_configuration = configuration;
5686
5687    let local_var_client = &local_var_configuration.client;
5688
5689    let local_var_uri_str = format!("{}/stages/invitation/stages/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
5690    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
5691
5692    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5693        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5694    }
5695    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5696        let local_var_key = local_var_apikey.key.clone();
5697        let local_var_value = match local_var_apikey.prefix {
5698            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5699            None => local_var_key,
5700        };
5701        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5702    };
5703
5704    let local_var_req = local_var_req_builder.build()?;
5705    let local_var_resp = local_var_client.execute(local_var_req).await?;
5706
5707    let local_var_status = local_var_resp.status();
5708    let local_var_content = local_var_resp.text().await?;
5709
5710    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5711        serde_json::from_str(&local_var_content).map_err(Error::from)
5712    } else {
5713        let local_var_entity: Option<StagesInvitationStagesRetrieveError> = serde_json::from_str(&local_var_content).ok();
5714        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5715        Err(Error::ResponseError(local_var_error))
5716    }
5717}
5718
5719/// InvitationStage Viewset
5720pub async fn stages_invitation_stages_update(configuration: &configuration::Configuration, stage_uuid: &str, invitation_stage_request: models::InvitationStageRequest) -> Result<models::InvitationStage, Error<StagesInvitationStagesUpdateError>> {
5721    let local_var_configuration = configuration;
5722
5723    let local_var_client = &local_var_configuration.client;
5724
5725    let local_var_uri_str = format!("{}/stages/invitation/stages/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
5726    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
5727
5728    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5729        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5730    }
5731    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5732        let local_var_key = local_var_apikey.key.clone();
5733        let local_var_value = match local_var_apikey.prefix {
5734            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5735            None => local_var_key,
5736        };
5737        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5738    };
5739    local_var_req_builder = local_var_req_builder.json(&invitation_stage_request);
5740
5741    let local_var_req = local_var_req_builder.build()?;
5742    let local_var_resp = local_var_client.execute(local_var_req).await?;
5743
5744    let local_var_status = local_var_resp.status();
5745    let local_var_content = local_var_resp.text().await?;
5746
5747    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5748        serde_json::from_str(&local_var_content).map_err(Error::from)
5749    } else {
5750        let local_var_entity: Option<StagesInvitationStagesUpdateError> = serde_json::from_str(&local_var_content).ok();
5751        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5752        Err(Error::ResponseError(local_var_error))
5753    }
5754}
5755
5756/// Get a list of all objects that use this object
5757pub async fn stages_invitation_stages_used_by_list(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<Vec<models::UsedBy>, Error<StagesInvitationStagesUsedByListError>> {
5758    let local_var_configuration = configuration;
5759
5760    let local_var_client = &local_var_configuration.client;
5761
5762    let local_var_uri_str = format!("{}/stages/invitation/stages/{stage_uuid}/used_by/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
5763    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
5764
5765    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5766        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5767    }
5768    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5769        let local_var_key = local_var_apikey.key.clone();
5770        let local_var_value = match local_var_apikey.prefix {
5771            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5772            None => local_var_key,
5773        };
5774        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5775    };
5776
5777    let local_var_req = local_var_req_builder.build()?;
5778    let local_var_resp = local_var_client.execute(local_var_req).await?;
5779
5780    let local_var_status = local_var_resp.status();
5781    let local_var_content = local_var_resp.text().await?;
5782
5783    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5784        serde_json::from_str(&local_var_content).map_err(Error::from)
5785    } else {
5786        let local_var_entity: Option<StagesInvitationStagesUsedByListError> = serde_json::from_str(&local_var_content).ok();
5787        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5788        Err(Error::ResponseError(local_var_error))
5789    }
5790}
5791
5792/// PasswordStage Viewset
5793pub async fn stages_password_create(configuration: &configuration::Configuration, password_stage_request: models::PasswordStageRequest) -> Result<models::PasswordStage, Error<StagesPasswordCreateError>> {
5794    let local_var_configuration = configuration;
5795
5796    let local_var_client = &local_var_configuration.client;
5797
5798    let local_var_uri_str = format!("{}/stages/password/", local_var_configuration.base_path);
5799    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
5800
5801    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5802        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5803    }
5804    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5805        let local_var_key = local_var_apikey.key.clone();
5806        let local_var_value = match local_var_apikey.prefix {
5807            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5808            None => local_var_key,
5809        };
5810        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5811    };
5812    local_var_req_builder = local_var_req_builder.json(&password_stage_request);
5813
5814    let local_var_req = local_var_req_builder.build()?;
5815    let local_var_resp = local_var_client.execute(local_var_req).await?;
5816
5817    let local_var_status = local_var_resp.status();
5818    let local_var_content = local_var_resp.text().await?;
5819
5820    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5821        serde_json::from_str(&local_var_content).map_err(Error::from)
5822    } else {
5823        let local_var_entity: Option<StagesPasswordCreateError> = serde_json::from_str(&local_var_content).ok();
5824        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5825        Err(Error::ResponseError(local_var_error))
5826    }
5827}
5828
5829/// PasswordStage Viewset
5830pub async fn stages_password_destroy(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<(), Error<StagesPasswordDestroyError>> {
5831    let local_var_configuration = configuration;
5832
5833    let local_var_client = &local_var_configuration.client;
5834
5835    let local_var_uri_str = format!("{}/stages/password/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
5836    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
5837
5838    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5839        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5840    }
5841    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5842        let local_var_key = local_var_apikey.key.clone();
5843        let local_var_value = match local_var_apikey.prefix {
5844            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5845            None => local_var_key,
5846        };
5847        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5848    };
5849
5850    let local_var_req = local_var_req_builder.build()?;
5851    let local_var_resp = local_var_client.execute(local_var_req).await?;
5852
5853    let local_var_status = local_var_resp.status();
5854    let local_var_content = local_var_resp.text().await?;
5855
5856    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5857        Ok(())
5858    } else {
5859        let local_var_entity: Option<StagesPasswordDestroyError> = serde_json::from_str(&local_var_content).ok();
5860        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5861        Err(Error::ResponseError(local_var_error))
5862    }
5863}
5864
5865/// PasswordStage Viewset
5866pub async fn stages_password_list(configuration: &configuration::Configuration, configure_flow: Option<&str>, failed_attempts_before_cancel: Option<i32>, name: Option<&str>, ordering: Option<&str>, page: Option<i32>, page_size: Option<i32>, search: Option<&str>) -> Result<models::PaginatedPasswordStageList, Error<StagesPasswordListError>> {
5867    let local_var_configuration = configuration;
5868
5869    let local_var_client = &local_var_configuration.client;
5870
5871    let local_var_uri_str = format!("{}/stages/password/", local_var_configuration.base_path);
5872    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
5873
5874    if let Some(ref local_var_str) = configure_flow {
5875        local_var_req_builder = local_var_req_builder.query(&[("configure_flow", &local_var_str.to_string())]);
5876    }
5877    if let Some(ref local_var_str) = failed_attempts_before_cancel {
5878        local_var_req_builder = local_var_req_builder.query(&[("failed_attempts_before_cancel", &local_var_str.to_string())]);
5879    }
5880    if let Some(ref local_var_str) = name {
5881        local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
5882    }
5883    if let Some(ref local_var_str) = ordering {
5884        local_var_req_builder = local_var_req_builder.query(&[("ordering", &local_var_str.to_string())]);
5885    }
5886    if let Some(ref local_var_str) = page {
5887        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
5888    }
5889    if let Some(ref local_var_str) = page_size {
5890        local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]);
5891    }
5892    if let Some(ref local_var_str) = search {
5893        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
5894    }
5895    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5896        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5897    }
5898    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5899        let local_var_key = local_var_apikey.key.clone();
5900        let local_var_value = match local_var_apikey.prefix {
5901            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5902            None => local_var_key,
5903        };
5904        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5905    };
5906
5907    let local_var_req = local_var_req_builder.build()?;
5908    let local_var_resp = local_var_client.execute(local_var_req).await?;
5909
5910    let local_var_status = local_var_resp.status();
5911    let local_var_content = local_var_resp.text().await?;
5912
5913    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5914        serde_json::from_str(&local_var_content).map_err(Error::from)
5915    } else {
5916        let local_var_entity: Option<StagesPasswordListError> = serde_json::from_str(&local_var_content).ok();
5917        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5918        Err(Error::ResponseError(local_var_error))
5919    }
5920}
5921
5922/// PasswordStage Viewset
5923pub async fn stages_password_partial_update(configuration: &configuration::Configuration, stage_uuid: &str, patched_password_stage_request: Option<models::PatchedPasswordStageRequest>) -> Result<models::PasswordStage, Error<StagesPasswordPartialUpdateError>> {
5924    let local_var_configuration = configuration;
5925
5926    let local_var_client = &local_var_configuration.client;
5927
5928    let local_var_uri_str = format!("{}/stages/password/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
5929    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
5930
5931    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5932        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5933    }
5934    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5935        let local_var_key = local_var_apikey.key.clone();
5936        let local_var_value = match local_var_apikey.prefix {
5937            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5938            None => local_var_key,
5939        };
5940        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5941    };
5942    local_var_req_builder = local_var_req_builder.json(&patched_password_stage_request);
5943
5944    let local_var_req = local_var_req_builder.build()?;
5945    let local_var_resp = local_var_client.execute(local_var_req).await?;
5946
5947    let local_var_status = local_var_resp.status();
5948    let local_var_content = local_var_resp.text().await?;
5949
5950    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5951        serde_json::from_str(&local_var_content).map_err(Error::from)
5952    } else {
5953        let local_var_entity: Option<StagesPasswordPartialUpdateError> = serde_json::from_str(&local_var_content).ok();
5954        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5955        Err(Error::ResponseError(local_var_error))
5956    }
5957}
5958
5959/// PasswordStage Viewset
5960pub async fn stages_password_retrieve(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<models::PasswordStage, Error<StagesPasswordRetrieveError>> {
5961    let local_var_configuration = configuration;
5962
5963    let local_var_client = &local_var_configuration.client;
5964
5965    let local_var_uri_str = format!("{}/stages/password/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
5966    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
5967
5968    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5969        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5970    }
5971    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
5972        let local_var_key = local_var_apikey.key.clone();
5973        let local_var_value = match local_var_apikey.prefix {
5974            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
5975            None => local_var_key,
5976        };
5977        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
5978    };
5979
5980    let local_var_req = local_var_req_builder.build()?;
5981    let local_var_resp = local_var_client.execute(local_var_req).await?;
5982
5983    let local_var_status = local_var_resp.status();
5984    let local_var_content = local_var_resp.text().await?;
5985
5986    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5987        serde_json::from_str(&local_var_content).map_err(Error::from)
5988    } else {
5989        let local_var_entity: Option<StagesPasswordRetrieveError> = serde_json::from_str(&local_var_content).ok();
5990        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5991        Err(Error::ResponseError(local_var_error))
5992    }
5993}
5994
5995/// PasswordStage Viewset
5996pub async fn stages_password_update(configuration: &configuration::Configuration, stage_uuid: &str, password_stage_request: models::PasswordStageRequest) -> Result<models::PasswordStage, Error<StagesPasswordUpdateError>> {
5997    let local_var_configuration = configuration;
5998
5999    let local_var_client = &local_var_configuration.client;
6000
6001    let local_var_uri_str = format!("{}/stages/password/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
6002    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
6003
6004    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6005        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6006    }
6007    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6008        let local_var_key = local_var_apikey.key.clone();
6009        let local_var_value = match local_var_apikey.prefix {
6010            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6011            None => local_var_key,
6012        };
6013        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6014    };
6015    local_var_req_builder = local_var_req_builder.json(&password_stage_request);
6016
6017    let local_var_req = local_var_req_builder.build()?;
6018    let local_var_resp = local_var_client.execute(local_var_req).await?;
6019
6020    let local_var_status = local_var_resp.status();
6021    let local_var_content = local_var_resp.text().await?;
6022
6023    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6024        serde_json::from_str(&local_var_content).map_err(Error::from)
6025    } else {
6026        let local_var_entity: Option<StagesPasswordUpdateError> = serde_json::from_str(&local_var_content).ok();
6027        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6028        Err(Error::ResponseError(local_var_error))
6029    }
6030}
6031
6032/// Get a list of all objects that use this object
6033pub async fn stages_password_used_by_list(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<Vec<models::UsedBy>, Error<StagesPasswordUsedByListError>> {
6034    let local_var_configuration = configuration;
6035
6036    let local_var_client = &local_var_configuration.client;
6037
6038    let local_var_uri_str = format!("{}/stages/password/{stage_uuid}/used_by/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
6039    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
6040
6041    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6042        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6043    }
6044    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6045        let local_var_key = local_var_apikey.key.clone();
6046        let local_var_value = match local_var_apikey.prefix {
6047            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6048            None => local_var_key,
6049        };
6050        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6051    };
6052
6053    let local_var_req = local_var_req_builder.build()?;
6054    let local_var_resp = local_var_client.execute(local_var_req).await?;
6055
6056    let local_var_status = local_var_resp.status();
6057    let local_var_content = local_var_resp.text().await?;
6058
6059    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6060        serde_json::from_str(&local_var_content).map_err(Error::from)
6061    } else {
6062        let local_var_entity: Option<StagesPasswordUsedByListError> = serde_json::from_str(&local_var_content).ok();
6063        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6064        Err(Error::ResponseError(local_var_error))
6065    }
6066}
6067
6068/// Prompt Viewset
6069pub async fn stages_prompt_prompts_create(configuration: &configuration::Configuration, prompt_request: models::PromptRequest) -> Result<models::Prompt, Error<StagesPromptPromptsCreateError>> {
6070    let local_var_configuration = configuration;
6071
6072    let local_var_client = &local_var_configuration.client;
6073
6074    let local_var_uri_str = format!("{}/stages/prompt/prompts/", local_var_configuration.base_path);
6075    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
6076
6077    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6078        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6079    }
6080    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6081        let local_var_key = local_var_apikey.key.clone();
6082        let local_var_value = match local_var_apikey.prefix {
6083            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6084            None => local_var_key,
6085        };
6086        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6087    };
6088    local_var_req_builder = local_var_req_builder.json(&prompt_request);
6089
6090    let local_var_req = local_var_req_builder.build()?;
6091    let local_var_resp = local_var_client.execute(local_var_req).await?;
6092
6093    let local_var_status = local_var_resp.status();
6094    let local_var_content = local_var_resp.text().await?;
6095
6096    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6097        serde_json::from_str(&local_var_content).map_err(Error::from)
6098    } else {
6099        let local_var_entity: Option<StagesPromptPromptsCreateError> = serde_json::from_str(&local_var_content).ok();
6100        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6101        Err(Error::ResponseError(local_var_error))
6102    }
6103}
6104
6105/// Prompt Viewset
6106pub async fn stages_prompt_prompts_destroy(configuration: &configuration::Configuration, prompt_uuid: &str) -> Result<(), Error<StagesPromptPromptsDestroyError>> {
6107    let local_var_configuration = configuration;
6108
6109    let local_var_client = &local_var_configuration.client;
6110
6111    let local_var_uri_str = format!("{}/stages/prompt/prompts/{prompt_uuid}/", local_var_configuration.base_path, prompt_uuid=crate::apis::urlencode(prompt_uuid));
6112    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
6113
6114    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6115        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6116    }
6117    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6118        let local_var_key = local_var_apikey.key.clone();
6119        let local_var_value = match local_var_apikey.prefix {
6120            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6121            None => local_var_key,
6122        };
6123        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6124    };
6125
6126    let local_var_req = local_var_req_builder.build()?;
6127    let local_var_resp = local_var_client.execute(local_var_req).await?;
6128
6129    let local_var_status = local_var_resp.status();
6130    let local_var_content = local_var_resp.text().await?;
6131
6132    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6133        Ok(())
6134    } else {
6135        let local_var_entity: Option<StagesPromptPromptsDestroyError> = serde_json::from_str(&local_var_content).ok();
6136        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6137        Err(Error::ResponseError(local_var_error))
6138    }
6139}
6140
6141/// Prompt Viewset
6142pub async fn stages_prompt_prompts_list(configuration: &configuration::Configuration, field_key: Option<&str>, label: Option<&str>, name: Option<&str>, ordering: Option<&str>, page: Option<i32>, page_size: Option<i32>, placeholder: Option<&str>, search: Option<&str>, r#type: Option<&str>) -> Result<models::PaginatedPromptList, Error<StagesPromptPromptsListError>> {
6143    let local_var_configuration = configuration;
6144
6145    let local_var_client = &local_var_configuration.client;
6146
6147    let local_var_uri_str = format!("{}/stages/prompt/prompts/", local_var_configuration.base_path);
6148    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
6149
6150    if let Some(ref local_var_str) = field_key {
6151        local_var_req_builder = local_var_req_builder.query(&[("field_key", &local_var_str.to_string())]);
6152    }
6153    if let Some(ref local_var_str) = label {
6154        local_var_req_builder = local_var_req_builder.query(&[("label", &local_var_str.to_string())]);
6155    }
6156    if let Some(ref local_var_str) = name {
6157        local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
6158    }
6159    if let Some(ref local_var_str) = ordering {
6160        local_var_req_builder = local_var_req_builder.query(&[("ordering", &local_var_str.to_string())]);
6161    }
6162    if let Some(ref local_var_str) = page {
6163        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
6164    }
6165    if let Some(ref local_var_str) = page_size {
6166        local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]);
6167    }
6168    if let Some(ref local_var_str) = placeholder {
6169        local_var_req_builder = local_var_req_builder.query(&[("placeholder", &local_var_str.to_string())]);
6170    }
6171    if let Some(ref local_var_str) = search {
6172        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
6173    }
6174    if let Some(ref local_var_str) = r#type {
6175        local_var_req_builder = local_var_req_builder.query(&[("type", &local_var_str.to_string())]);
6176    }
6177    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6178        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6179    }
6180    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6181        let local_var_key = local_var_apikey.key.clone();
6182        let local_var_value = match local_var_apikey.prefix {
6183            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6184            None => local_var_key,
6185        };
6186        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6187    };
6188
6189    let local_var_req = local_var_req_builder.build()?;
6190    let local_var_resp = local_var_client.execute(local_var_req).await?;
6191
6192    let local_var_status = local_var_resp.status();
6193    let local_var_content = local_var_resp.text().await?;
6194
6195    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6196        serde_json::from_str(&local_var_content).map_err(Error::from)
6197    } else {
6198        let local_var_entity: Option<StagesPromptPromptsListError> = serde_json::from_str(&local_var_content).ok();
6199        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6200        Err(Error::ResponseError(local_var_error))
6201    }
6202}
6203
6204/// Prompt Viewset
6205pub async fn stages_prompt_prompts_partial_update(configuration: &configuration::Configuration, prompt_uuid: &str, patched_prompt_request: Option<models::PatchedPromptRequest>) -> Result<models::Prompt, Error<StagesPromptPromptsPartialUpdateError>> {
6206    let local_var_configuration = configuration;
6207
6208    let local_var_client = &local_var_configuration.client;
6209
6210    let local_var_uri_str = format!("{}/stages/prompt/prompts/{prompt_uuid}/", local_var_configuration.base_path, prompt_uuid=crate::apis::urlencode(prompt_uuid));
6211    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
6212
6213    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6214        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6215    }
6216    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6217        let local_var_key = local_var_apikey.key.clone();
6218        let local_var_value = match local_var_apikey.prefix {
6219            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6220            None => local_var_key,
6221        };
6222        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6223    };
6224    local_var_req_builder = local_var_req_builder.json(&patched_prompt_request);
6225
6226    let local_var_req = local_var_req_builder.build()?;
6227    let local_var_resp = local_var_client.execute(local_var_req).await?;
6228
6229    let local_var_status = local_var_resp.status();
6230    let local_var_content = local_var_resp.text().await?;
6231
6232    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6233        serde_json::from_str(&local_var_content).map_err(Error::from)
6234    } else {
6235        let local_var_entity: Option<StagesPromptPromptsPartialUpdateError> = serde_json::from_str(&local_var_content).ok();
6236        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6237        Err(Error::ResponseError(local_var_error))
6238    }
6239}
6240
6241/// Preview a prompt as a challenge, just like a flow would receive
6242pub async fn stages_prompt_prompts_preview_create(configuration: &configuration::Configuration, prompt_request: models::PromptRequest) -> Result<models::PromptChallenge, Error<StagesPromptPromptsPreviewCreateError>> {
6243    let local_var_configuration = configuration;
6244
6245    let local_var_client = &local_var_configuration.client;
6246
6247    let local_var_uri_str = format!("{}/stages/prompt/prompts/preview/", local_var_configuration.base_path);
6248    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
6249
6250    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6251        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6252    }
6253    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6254        let local_var_key = local_var_apikey.key.clone();
6255        let local_var_value = match local_var_apikey.prefix {
6256            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6257            None => local_var_key,
6258        };
6259        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6260    };
6261    local_var_req_builder = local_var_req_builder.json(&prompt_request);
6262
6263    let local_var_req = local_var_req_builder.build()?;
6264    let local_var_resp = local_var_client.execute(local_var_req).await?;
6265
6266    let local_var_status = local_var_resp.status();
6267    let local_var_content = local_var_resp.text().await?;
6268
6269    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6270        serde_json::from_str(&local_var_content).map_err(Error::from)
6271    } else {
6272        let local_var_entity: Option<StagesPromptPromptsPreviewCreateError> = serde_json::from_str(&local_var_content).ok();
6273        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6274        Err(Error::ResponseError(local_var_error))
6275    }
6276}
6277
6278/// Prompt Viewset
6279pub async fn stages_prompt_prompts_retrieve(configuration: &configuration::Configuration, prompt_uuid: &str) -> Result<models::Prompt, Error<StagesPromptPromptsRetrieveError>> {
6280    let local_var_configuration = configuration;
6281
6282    let local_var_client = &local_var_configuration.client;
6283
6284    let local_var_uri_str = format!("{}/stages/prompt/prompts/{prompt_uuid}/", local_var_configuration.base_path, prompt_uuid=crate::apis::urlencode(prompt_uuid));
6285    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
6286
6287    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6288        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6289    }
6290    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6291        let local_var_key = local_var_apikey.key.clone();
6292        let local_var_value = match local_var_apikey.prefix {
6293            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6294            None => local_var_key,
6295        };
6296        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6297    };
6298
6299    let local_var_req = local_var_req_builder.build()?;
6300    let local_var_resp = local_var_client.execute(local_var_req).await?;
6301
6302    let local_var_status = local_var_resp.status();
6303    let local_var_content = local_var_resp.text().await?;
6304
6305    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6306        serde_json::from_str(&local_var_content).map_err(Error::from)
6307    } else {
6308        let local_var_entity: Option<StagesPromptPromptsRetrieveError> = serde_json::from_str(&local_var_content).ok();
6309        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6310        Err(Error::ResponseError(local_var_error))
6311    }
6312}
6313
6314/// Prompt Viewset
6315pub async fn stages_prompt_prompts_update(configuration: &configuration::Configuration, prompt_uuid: &str, prompt_request: models::PromptRequest) -> Result<models::Prompt, Error<StagesPromptPromptsUpdateError>> {
6316    let local_var_configuration = configuration;
6317
6318    let local_var_client = &local_var_configuration.client;
6319
6320    let local_var_uri_str = format!("{}/stages/prompt/prompts/{prompt_uuid}/", local_var_configuration.base_path, prompt_uuid=crate::apis::urlencode(prompt_uuid));
6321    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
6322
6323    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6324        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6325    }
6326    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6327        let local_var_key = local_var_apikey.key.clone();
6328        let local_var_value = match local_var_apikey.prefix {
6329            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6330            None => local_var_key,
6331        };
6332        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6333    };
6334    local_var_req_builder = local_var_req_builder.json(&prompt_request);
6335
6336    let local_var_req = local_var_req_builder.build()?;
6337    let local_var_resp = local_var_client.execute(local_var_req).await?;
6338
6339    let local_var_status = local_var_resp.status();
6340    let local_var_content = local_var_resp.text().await?;
6341
6342    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6343        serde_json::from_str(&local_var_content).map_err(Error::from)
6344    } else {
6345        let local_var_entity: Option<StagesPromptPromptsUpdateError> = serde_json::from_str(&local_var_content).ok();
6346        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6347        Err(Error::ResponseError(local_var_error))
6348    }
6349}
6350
6351/// Get a list of all objects that use this object
6352pub async fn stages_prompt_prompts_used_by_list(configuration: &configuration::Configuration, prompt_uuid: &str) -> Result<Vec<models::UsedBy>, Error<StagesPromptPromptsUsedByListError>> {
6353    let local_var_configuration = configuration;
6354
6355    let local_var_client = &local_var_configuration.client;
6356
6357    let local_var_uri_str = format!("{}/stages/prompt/prompts/{prompt_uuid}/used_by/", local_var_configuration.base_path, prompt_uuid=crate::apis::urlencode(prompt_uuid));
6358    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
6359
6360    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6361        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6362    }
6363    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6364        let local_var_key = local_var_apikey.key.clone();
6365        let local_var_value = match local_var_apikey.prefix {
6366            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6367            None => local_var_key,
6368        };
6369        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6370    };
6371
6372    let local_var_req = local_var_req_builder.build()?;
6373    let local_var_resp = local_var_client.execute(local_var_req).await?;
6374
6375    let local_var_status = local_var_resp.status();
6376    let local_var_content = local_var_resp.text().await?;
6377
6378    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6379        serde_json::from_str(&local_var_content).map_err(Error::from)
6380    } else {
6381        let local_var_entity: Option<StagesPromptPromptsUsedByListError> = serde_json::from_str(&local_var_content).ok();
6382        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6383        Err(Error::ResponseError(local_var_error))
6384    }
6385}
6386
6387/// PromptStage Viewset
6388pub async fn stages_prompt_stages_create(configuration: &configuration::Configuration, prompt_stage_request: models::PromptStageRequest) -> Result<models::PromptStage, Error<StagesPromptStagesCreateError>> {
6389    let local_var_configuration = configuration;
6390
6391    let local_var_client = &local_var_configuration.client;
6392
6393    let local_var_uri_str = format!("{}/stages/prompt/stages/", local_var_configuration.base_path);
6394    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
6395
6396    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6397        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6398    }
6399    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6400        let local_var_key = local_var_apikey.key.clone();
6401        let local_var_value = match local_var_apikey.prefix {
6402            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6403            None => local_var_key,
6404        };
6405        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6406    };
6407    local_var_req_builder = local_var_req_builder.json(&prompt_stage_request);
6408
6409    let local_var_req = local_var_req_builder.build()?;
6410    let local_var_resp = local_var_client.execute(local_var_req).await?;
6411
6412    let local_var_status = local_var_resp.status();
6413    let local_var_content = local_var_resp.text().await?;
6414
6415    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6416        serde_json::from_str(&local_var_content).map_err(Error::from)
6417    } else {
6418        let local_var_entity: Option<StagesPromptStagesCreateError> = serde_json::from_str(&local_var_content).ok();
6419        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6420        Err(Error::ResponseError(local_var_error))
6421    }
6422}
6423
6424/// PromptStage Viewset
6425pub async fn stages_prompt_stages_destroy(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<(), Error<StagesPromptStagesDestroyError>> {
6426    let local_var_configuration = configuration;
6427
6428    let local_var_client = &local_var_configuration.client;
6429
6430    let local_var_uri_str = format!("{}/stages/prompt/stages/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
6431    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
6432
6433    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6434        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6435    }
6436    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6437        let local_var_key = local_var_apikey.key.clone();
6438        let local_var_value = match local_var_apikey.prefix {
6439            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6440            None => local_var_key,
6441        };
6442        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6443    };
6444
6445    let local_var_req = local_var_req_builder.build()?;
6446    let local_var_resp = local_var_client.execute(local_var_req).await?;
6447
6448    let local_var_status = local_var_resp.status();
6449    let local_var_content = local_var_resp.text().await?;
6450
6451    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6452        Ok(())
6453    } else {
6454        let local_var_entity: Option<StagesPromptStagesDestroyError> = serde_json::from_str(&local_var_content).ok();
6455        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6456        Err(Error::ResponseError(local_var_error))
6457    }
6458}
6459
6460/// PromptStage Viewset
6461pub async fn stages_prompt_stages_list(configuration: &configuration::Configuration, fields: Option<Vec<uuid::Uuid>>, name: Option<&str>, ordering: Option<&str>, page: Option<i32>, page_size: Option<i32>, search: Option<&str>, stage_uuid: Option<&str>, validation_policies: Option<Vec<uuid::Uuid>>) -> Result<models::PaginatedPromptStageList, Error<StagesPromptStagesListError>> {
6462    let local_var_configuration = configuration;
6463
6464    let local_var_client = &local_var_configuration.client;
6465
6466    let local_var_uri_str = format!("{}/stages/prompt/stages/", local_var_configuration.base_path);
6467    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
6468
6469    if let Some(ref local_var_str) = fields {
6470        local_var_req_builder = match "multi" {
6471            "multi" => local_var_req_builder.query(&local_var_str.into_iter().map(|p| ("fields".to_owned(), p.to_string())).collect::<Vec<(std::string::String, std::string::String)>>()),
6472            _ => local_var_req_builder.query(&[("fields", &local_var_str.into_iter().map(|p| p.to_string()).collect::<Vec<String>>().join(",").to_string())]),
6473        };
6474    }
6475    if let Some(ref local_var_str) = name {
6476        local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
6477    }
6478    if let Some(ref local_var_str) = ordering {
6479        local_var_req_builder = local_var_req_builder.query(&[("ordering", &local_var_str.to_string())]);
6480    }
6481    if let Some(ref local_var_str) = page {
6482        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
6483    }
6484    if let Some(ref local_var_str) = page_size {
6485        local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]);
6486    }
6487    if let Some(ref local_var_str) = search {
6488        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
6489    }
6490    if let Some(ref local_var_str) = stage_uuid {
6491        local_var_req_builder = local_var_req_builder.query(&[("stage_uuid", &local_var_str.to_string())]);
6492    }
6493    if let Some(ref local_var_str) = validation_policies {
6494        local_var_req_builder = match "multi" {
6495            "multi" => local_var_req_builder.query(&local_var_str.into_iter().map(|p| ("validation_policies".to_owned(), p.to_string())).collect::<Vec<(std::string::String, std::string::String)>>()),
6496            _ => local_var_req_builder.query(&[("validation_policies", &local_var_str.into_iter().map(|p| p.to_string()).collect::<Vec<String>>().join(",").to_string())]),
6497        };
6498    }
6499    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6500        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6501    }
6502    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6503        let local_var_key = local_var_apikey.key.clone();
6504        let local_var_value = match local_var_apikey.prefix {
6505            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6506            None => local_var_key,
6507        };
6508        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6509    };
6510
6511    let local_var_req = local_var_req_builder.build()?;
6512    let local_var_resp = local_var_client.execute(local_var_req).await?;
6513
6514    let local_var_status = local_var_resp.status();
6515    let local_var_content = local_var_resp.text().await?;
6516
6517    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6518        serde_json::from_str(&local_var_content).map_err(Error::from)
6519    } else {
6520        let local_var_entity: Option<StagesPromptStagesListError> = serde_json::from_str(&local_var_content).ok();
6521        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6522        Err(Error::ResponseError(local_var_error))
6523    }
6524}
6525
6526/// PromptStage Viewset
6527pub async fn stages_prompt_stages_partial_update(configuration: &configuration::Configuration, stage_uuid: &str, patched_prompt_stage_request: Option<models::PatchedPromptStageRequest>) -> Result<models::PromptStage, Error<StagesPromptStagesPartialUpdateError>> {
6528    let local_var_configuration = configuration;
6529
6530    let local_var_client = &local_var_configuration.client;
6531
6532    let local_var_uri_str = format!("{}/stages/prompt/stages/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
6533    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
6534
6535    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6536        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6537    }
6538    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6539        let local_var_key = local_var_apikey.key.clone();
6540        let local_var_value = match local_var_apikey.prefix {
6541            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6542            None => local_var_key,
6543        };
6544        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6545    };
6546    local_var_req_builder = local_var_req_builder.json(&patched_prompt_stage_request);
6547
6548    let local_var_req = local_var_req_builder.build()?;
6549    let local_var_resp = local_var_client.execute(local_var_req).await?;
6550
6551    let local_var_status = local_var_resp.status();
6552    let local_var_content = local_var_resp.text().await?;
6553
6554    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6555        serde_json::from_str(&local_var_content).map_err(Error::from)
6556    } else {
6557        let local_var_entity: Option<StagesPromptStagesPartialUpdateError> = serde_json::from_str(&local_var_content).ok();
6558        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6559        Err(Error::ResponseError(local_var_error))
6560    }
6561}
6562
6563/// PromptStage Viewset
6564pub async fn stages_prompt_stages_retrieve(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<models::PromptStage, Error<StagesPromptStagesRetrieveError>> {
6565    let local_var_configuration = configuration;
6566
6567    let local_var_client = &local_var_configuration.client;
6568
6569    let local_var_uri_str = format!("{}/stages/prompt/stages/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
6570    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
6571
6572    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6573        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6574    }
6575    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6576        let local_var_key = local_var_apikey.key.clone();
6577        let local_var_value = match local_var_apikey.prefix {
6578            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6579            None => local_var_key,
6580        };
6581        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6582    };
6583
6584    let local_var_req = local_var_req_builder.build()?;
6585    let local_var_resp = local_var_client.execute(local_var_req).await?;
6586
6587    let local_var_status = local_var_resp.status();
6588    let local_var_content = local_var_resp.text().await?;
6589
6590    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6591        serde_json::from_str(&local_var_content).map_err(Error::from)
6592    } else {
6593        let local_var_entity: Option<StagesPromptStagesRetrieveError> = serde_json::from_str(&local_var_content).ok();
6594        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6595        Err(Error::ResponseError(local_var_error))
6596    }
6597}
6598
6599/// PromptStage Viewset
6600pub async fn stages_prompt_stages_update(configuration: &configuration::Configuration, stage_uuid: &str, prompt_stage_request: models::PromptStageRequest) -> Result<models::PromptStage, Error<StagesPromptStagesUpdateError>> {
6601    let local_var_configuration = configuration;
6602
6603    let local_var_client = &local_var_configuration.client;
6604
6605    let local_var_uri_str = format!("{}/stages/prompt/stages/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
6606    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
6607
6608    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6609        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6610    }
6611    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6612        let local_var_key = local_var_apikey.key.clone();
6613        let local_var_value = match local_var_apikey.prefix {
6614            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6615            None => local_var_key,
6616        };
6617        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6618    };
6619    local_var_req_builder = local_var_req_builder.json(&prompt_stage_request);
6620
6621    let local_var_req = local_var_req_builder.build()?;
6622    let local_var_resp = local_var_client.execute(local_var_req).await?;
6623
6624    let local_var_status = local_var_resp.status();
6625    let local_var_content = local_var_resp.text().await?;
6626
6627    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6628        serde_json::from_str(&local_var_content).map_err(Error::from)
6629    } else {
6630        let local_var_entity: Option<StagesPromptStagesUpdateError> = serde_json::from_str(&local_var_content).ok();
6631        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6632        Err(Error::ResponseError(local_var_error))
6633    }
6634}
6635
6636/// Get a list of all objects that use this object
6637pub async fn stages_prompt_stages_used_by_list(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<Vec<models::UsedBy>, Error<StagesPromptStagesUsedByListError>> {
6638    let local_var_configuration = configuration;
6639
6640    let local_var_client = &local_var_configuration.client;
6641
6642    let local_var_uri_str = format!("{}/stages/prompt/stages/{stage_uuid}/used_by/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
6643    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
6644
6645    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6646        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6647    }
6648    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6649        let local_var_key = local_var_apikey.key.clone();
6650        let local_var_value = match local_var_apikey.prefix {
6651            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6652            None => local_var_key,
6653        };
6654        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6655    };
6656
6657    let local_var_req = local_var_req_builder.build()?;
6658    let local_var_resp = local_var_client.execute(local_var_req).await?;
6659
6660    let local_var_status = local_var_resp.status();
6661    let local_var_content = local_var_resp.text().await?;
6662
6663    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6664        serde_json::from_str(&local_var_content).map_err(Error::from)
6665    } else {
6666        let local_var_entity: Option<StagesPromptStagesUsedByListError> = serde_json::from_str(&local_var_content).ok();
6667        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6668        Err(Error::ResponseError(local_var_error))
6669    }
6670}
6671
6672/// UserDeleteStage Viewset
6673pub async fn stages_user_delete_create(configuration: &configuration::Configuration, user_delete_stage_request: models::UserDeleteStageRequest) -> Result<models::UserDeleteStage, Error<StagesUserDeleteCreateError>> {
6674    let local_var_configuration = configuration;
6675
6676    let local_var_client = &local_var_configuration.client;
6677
6678    let local_var_uri_str = format!("{}/stages/user_delete/", local_var_configuration.base_path);
6679    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
6680
6681    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6682        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6683    }
6684    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6685        let local_var_key = local_var_apikey.key.clone();
6686        let local_var_value = match local_var_apikey.prefix {
6687            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6688            None => local_var_key,
6689        };
6690        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6691    };
6692    local_var_req_builder = local_var_req_builder.json(&user_delete_stage_request);
6693
6694    let local_var_req = local_var_req_builder.build()?;
6695    let local_var_resp = local_var_client.execute(local_var_req).await?;
6696
6697    let local_var_status = local_var_resp.status();
6698    let local_var_content = local_var_resp.text().await?;
6699
6700    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6701        serde_json::from_str(&local_var_content).map_err(Error::from)
6702    } else {
6703        let local_var_entity: Option<StagesUserDeleteCreateError> = serde_json::from_str(&local_var_content).ok();
6704        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6705        Err(Error::ResponseError(local_var_error))
6706    }
6707}
6708
6709/// UserDeleteStage Viewset
6710pub async fn stages_user_delete_destroy(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<(), Error<StagesUserDeleteDestroyError>> {
6711    let local_var_configuration = configuration;
6712
6713    let local_var_client = &local_var_configuration.client;
6714
6715    let local_var_uri_str = format!("{}/stages/user_delete/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
6716    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
6717
6718    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6719        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6720    }
6721    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6722        let local_var_key = local_var_apikey.key.clone();
6723        let local_var_value = match local_var_apikey.prefix {
6724            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6725            None => local_var_key,
6726        };
6727        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6728    };
6729
6730    let local_var_req = local_var_req_builder.build()?;
6731    let local_var_resp = local_var_client.execute(local_var_req).await?;
6732
6733    let local_var_status = local_var_resp.status();
6734    let local_var_content = local_var_resp.text().await?;
6735
6736    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6737        Ok(())
6738    } else {
6739        let local_var_entity: Option<StagesUserDeleteDestroyError> = serde_json::from_str(&local_var_content).ok();
6740        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6741        Err(Error::ResponseError(local_var_error))
6742    }
6743}
6744
6745/// UserDeleteStage Viewset
6746pub async fn stages_user_delete_list(configuration: &configuration::Configuration, name: Option<&str>, ordering: Option<&str>, page: Option<i32>, page_size: Option<i32>, search: Option<&str>, stage_uuid: Option<&str>) -> Result<models::PaginatedUserDeleteStageList, Error<StagesUserDeleteListError>> {
6747    let local_var_configuration = configuration;
6748
6749    let local_var_client = &local_var_configuration.client;
6750
6751    let local_var_uri_str = format!("{}/stages/user_delete/", local_var_configuration.base_path);
6752    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
6753
6754    if let Some(ref local_var_str) = name {
6755        local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
6756    }
6757    if let Some(ref local_var_str) = ordering {
6758        local_var_req_builder = local_var_req_builder.query(&[("ordering", &local_var_str.to_string())]);
6759    }
6760    if let Some(ref local_var_str) = page {
6761        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
6762    }
6763    if let Some(ref local_var_str) = page_size {
6764        local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]);
6765    }
6766    if let Some(ref local_var_str) = search {
6767        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
6768    }
6769    if let Some(ref local_var_str) = stage_uuid {
6770        local_var_req_builder = local_var_req_builder.query(&[("stage_uuid", &local_var_str.to_string())]);
6771    }
6772    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6773        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6774    }
6775    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6776        let local_var_key = local_var_apikey.key.clone();
6777        let local_var_value = match local_var_apikey.prefix {
6778            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6779            None => local_var_key,
6780        };
6781        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6782    };
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    let local_var_content = local_var_resp.text().await?;
6789
6790    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6791        serde_json::from_str(&local_var_content).map_err(Error::from)
6792    } else {
6793        let local_var_entity: Option<StagesUserDeleteListError> = serde_json::from_str(&local_var_content).ok();
6794        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6795        Err(Error::ResponseError(local_var_error))
6796    }
6797}
6798
6799/// UserDeleteStage Viewset
6800pub async fn stages_user_delete_partial_update(configuration: &configuration::Configuration, stage_uuid: &str, patched_user_delete_stage_request: Option<models::PatchedUserDeleteStageRequest>) -> Result<models::UserDeleteStage, Error<StagesUserDeletePartialUpdateError>> {
6801    let local_var_configuration = configuration;
6802
6803    let local_var_client = &local_var_configuration.client;
6804
6805    let local_var_uri_str = format!("{}/stages/user_delete/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
6806    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
6807
6808    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6809        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6810    }
6811    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6812        let local_var_key = local_var_apikey.key.clone();
6813        let local_var_value = match local_var_apikey.prefix {
6814            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6815            None => local_var_key,
6816        };
6817        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6818    };
6819    local_var_req_builder = local_var_req_builder.json(&patched_user_delete_stage_request);
6820
6821    let local_var_req = local_var_req_builder.build()?;
6822    let local_var_resp = local_var_client.execute(local_var_req).await?;
6823
6824    let local_var_status = local_var_resp.status();
6825    let local_var_content = local_var_resp.text().await?;
6826
6827    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6828        serde_json::from_str(&local_var_content).map_err(Error::from)
6829    } else {
6830        let local_var_entity: Option<StagesUserDeletePartialUpdateError> = serde_json::from_str(&local_var_content).ok();
6831        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6832        Err(Error::ResponseError(local_var_error))
6833    }
6834}
6835
6836/// UserDeleteStage Viewset
6837pub async fn stages_user_delete_retrieve(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<models::UserDeleteStage, Error<StagesUserDeleteRetrieveError>> {
6838    let local_var_configuration = configuration;
6839
6840    let local_var_client = &local_var_configuration.client;
6841
6842    let local_var_uri_str = format!("{}/stages/user_delete/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
6843    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
6844
6845    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6846        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6847    }
6848    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6849        let local_var_key = local_var_apikey.key.clone();
6850        let local_var_value = match local_var_apikey.prefix {
6851            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6852            None => local_var_key,
6853        };
6854        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6855    };
6856
6857    let local_var_req = local_var_req_builder.build()?;
6858    let local_var_resp = local_var_client.execute(local_var_req).await?;
6859
6860    let local_var_status = local_var_resp.status();
6861    let local_var_content = local_var_resp.text().await?;
6862
6863    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6864        serde_json::from_str(&local_var_content).map_err(Error::from)
6865    } else {
6866        let local_var_entity: Option<StagesUserDeleteRetrieveError> = serde_json::from_str(&local_var_content).ok();
6867        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6868        Err(Error::ResponseError(local_var_error))
6869    }
6870}
6871
6872/// UserDeleteStage Viewset
6873pub async fn stages_user_delete_update(configuration: &configuration::Configuration, stage_uuid: &str, user_delete_stage_request: models::UserDeleteStageRequest) -> Result<models::UserDeleteStage, Error<StagesUserDeleteUpdateError>> {
6874    let local_var_configuration = configuration;
6875
6876    let local_var_client = &local_var_configuration.client;
6877
6878    let local_var_uri_str = format!("{}/stages/user_delete/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
6879    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
6880
6881    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6882        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6883    }
6884    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6885        let local_var_key = local_var_apikey.key.clone();
6886        let local_var_value = match local_var_apikey.prefix {
6887            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6888            None => local_var_key,
6889        };
6890        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6891    };
6892    local_var_req_builder = local_var_req_builder.json(&user_delete_stage_request);
6893
6894    let local_var_req = local_var_req_builder.build()?;
6895    let local_var_resp = local_var_client.execute(local_var_req).await?;
6896
6897    let local_var_status = local_var_resp.status();
6898    let local_var_content = local_var_resp.text().await?;
6899
6900    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6901        serde_json::from_str(&local_var_content).map_err(Error::from)
6902    } else {
6903        let local_var_entity: Option<StagesUserDeleteUpdateError> = serde_json::from_str(&local_var_content).ok();
6904        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6905        Err(Error::ResponseError(local_var_error))
6906    }
6907}
6908
6909/// Get a list of all objects that use this object
6910pub async fn stages_user_delete_used_by_list(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<Vec<models::UsedBy>, Error<StagesUserDeleteUsedByListError>> {
6911    let local_var_configuration = configuration;
6912
6913    let local_var_client = &local_var_configuration.client;
6914
6915    let local_var_uri_str = format!("{}/stages/user_delete/{stage_uuid}/used_by/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
6916    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
6917
6918    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6919        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6920    }
6921    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6922        let local_var_key = local_var_apikey.key.clone();
6923        let local_var_value = match local_var_apikey.prefix {
6924            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6925            None => local_var_key,
6926        };
6927        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6928    };
6929
6930    let local_var_req = local_var_req_builder.build()?;
6931    let local_var_resp = local_var_client.execute(local_var_req).await?;
6932
6933    let local_var_status = local_var_resp.status();
6934    let local_var_content = local_var_resp.text().await?;
6935
6936    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6937        serde_json::from_str(&local_var_content).map_err(Error::from)
6938    } else {
6939        let local_var_entity: Option<StagesUserDeleteUsedByListError> = serde_json::from_str(&local_var_content).ok();
6940        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6941        Err(Error::ResponseError(local_var_error))
6942    }
6943}
6944
6945/// UserLoginStage Viewset
6946pub async fn stages_user_login_create(configuration: &configuration::Configuration, user_login_stage_request: models::UserLoginStageRequest) -> Result<models::UserLoginStage, Error<StagesUserLoginCreateError>> {
6947    let local_var_configuration = configuration;
6948
6949    let local_var_client = &local_var_configuration.client;
6950
6951    let local_var_uri_str = format!("{}/stages/user_login/", local_var_configuration.base_path);
6952    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
6953
6954    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6955        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6956    }
6957    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6958        let local_var_key = local_var_apikey.key.clone();
6959        let local_var_value = match local_var_apikey.prefix {
6960            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6961            None => local_var_key,
6962        };
6963        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
6964    };
6965    local_var_req_builder = local_var_req_builder.json(&user_login_stage_request);
6966
6967    let local_var_req = local_var_req_builder.build()?;
6968    let local_var_resp = local_var_client.execute(local_var_req).await?;
6969
6970    let local_var_status = local_var_resp.status();
6971    let local_var_content = local_var_resp.text().await?;
6972
6973    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
6974        serde_json::from_str(&local_var_content).map_err(Error::from)
6975    } else {
6976        let local_var_entity: Option<StagesUserLoginCreateError> = serde_json::from_str(&local_var_content).ok();
6977        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
6978        Err(Error::ResponseError(local_var_error))
6979    }
6980}
6981
6982/// UserLoginStage Viewset
6983pub async fn stages_user_login_destroy(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<(), Error<StagesUserLoginDestroyError>> {
6984    let local_var_configuration = configuration;
6985
6986    let local_var_client = &local_var_configuration.client;
6987
6988    let local_var_uri_str = format!("{}/stages/user_login/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
6989    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
6990
6991    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
6992        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
6993    }
6994    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
6995        let local_var_key = local_var_apikey.key.clone();
6996        let local_var_value = match local_var_apikey.prefix {
6997            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
6998            None => local_var_key,
6999        };
7000        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7001    };
7002
7003    let local_var_req = local_var_req_builder.build()?;
7004    let local_var_resp = local_var_client.execute(local_var_req).await?;
7005
7006    let local_var_status = local_var_resp.status();
7007    let local_var_content = local_var_resp.text().await?;
7008
7009    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7010        Ok(())
7011    } else {
7012        let local_var_entity: Option<StagesUserLoginDestroyError> = serde_json::from_str(&local_var_content).ok();
7013        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7014        Err(Error::ResponseError(local_var_error))
7015    }
7016}
7017
7018/// UserLoginStage Viewset
7019pub async fn stages_user_login_list(configuration: &configuration::Configuration, geoip_binding: Option<&str>, name: Option<&str>, network_binding: Option<&str>, ordering: Option<&str>, page: Option<i32>, page_size: Option<i32>, remember_me_offset: Option<&str>, search: Option<&str>, session_duration: Option<&str>, stage_uuid: Option<&str>, terminate_other_sessions: Option<bool>) -> Result<models::PaginatedUserLoginStageList, Error<StagesUserLoginListError>> {
7020    let local_var_configuration = configuration;
7021
7022    let local_var_client = &local_var_configuration.client;
7023
7024    let local_var_uri_str = format!("{}/stages/user_login/", local_var_configuration.base_path);
7025    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
7026
7027    if let Some(ref local_var_str) = geoip_binding {
7028        local_var_req_builder = local_var_req_builder.query(&[("geoip_binding", &local_var_str.to_string())]);
7029    }
7030    if let Some(ref local_var_str) = name {
7031        local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
7032    }
7033    if let Some(ref local_var_str) = network_binding {
7034        local_var_req_builder = local_var_req_builder.query(&[("network_binding", &local_var_str.to_string())]);
7035    }
7036    if let Some(ref local_var_str) = ordering {
7037        local_var_req_builder = local_var_req_builder.query(&[("ordering", &local_var_str.to_string())]);
7038    }
7039    if let Some(ref local_var_str) = page {
7040        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
7041    }
7042    if let Some(ref local_var_str) = page_size {
7043        local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]);
7044    }
7045    if let Some(ref local_var_str) = remember_me_offset {
7046        local_var_req_builder = local_var_req_builder.query(&[("remember_me_offset", &local_var_str.to_string())]);
7047    }
7048    if let Some(ref local_var_str) = search {
7049        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
7050    }
7051    if let Some(ref local_var_str) = session_duration {
7052        local_var_req_builder = local_var_req_builder.query(&[("session_duration", &local_var_str.to_string())]);
7053    }
7054    if let Some(ref local_var_str) = stage_uuid {
7055        local_var_req_builder = local_var_req_builder.query(&[("stage_uuid", &local_var_str.to_string())]);
7056    }
7057    if let Some(ref local_var_str) = terminate_other_sessions {
7058        local_var_req_builder = local_var_req_builder.query(&[("terminate_other_sessions", &local_var_str.to_string())]);
7059    }
7060    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7061        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7062    }
7063    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7064        let local_var_key = local_var_apikey.key.clone();
7065        let local_var_value = match local_var_apikey.prefix {
7066            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7067            None => local_var_key,
7068        };
7069        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7070    };
7071
7072    let local_var_req = local_var_req_builder.build()?;
7073    let local_var_resp = local_var_client.execute(local_var_req).await?;
7074
7075    let local_var_status = local_var_resp.status();
7076    let local_var_content = local_var_resp.text().await?;
7077
7078    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7079        serde_json::from_str(&local_var_content).map_err(Error::from)
7080    } else {
7081        let local_var_entity: Option<StagesUserLoginListError> = serde_json::from_str(&local_var_content).ok();
7082        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7083        Err(Error::ResponseError(local_var_error))
7084    }
7085}
7086
7087/// UserLoginStage Viewset
7088pub async fn stages_user_login_partial_update(configuration: &configuration::Configuration, stage_uuid: &str, patched_user_login_stage_request: Option<models::PatchedUserLoginStageRequest>) -> Result<models::UserLoginStage, Error<StagesUserLoginPartialUpdateError>> {
7089    let local_var_configuration = configuration;
7090
7091    let local_var_client = &local_var_configuration.client;
7092
7093    let local_var_uri_str = format!("{}/stages/user_login/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
7094    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7095
7096    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7097        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7098    }
7099    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7100        let local_var_key = local_var_apikey.key.clone();
7101        let local_var_value = match local_var_apikey.prefix {
7102            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7103            None => local_var_key,
7104        };
7105        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7106    };
7107    local_var_req_builder = local_var_req_builder.json(&patched_user_login_stage_request);
7108
7109    let local_var_req = local_var_req_builder.build()?;
7110    let local_var_resp = local_var_client.execute(local_var_req).await?;
7111
7112    let local_var_status = local_var_resp.status();
7113    let local_var_content = local_var_resp.text().await?;
7114
7115    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7116        serde_json::from_str(&local_var_content).map_err(Error::from)
7117    } else {
7118        let local_var_entity: Option<StagesUserLoginPartialUpdateError> = serde_json::from_str(&local_var_content).ok();
7119        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7120        Err(Error::ResponseError(local_var_error))
7121    }
7122}
7123
7124/// UserLoginStage Viewset
7125pub async fn stages_user_login_retrieve(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<models::UserLoginStage, Error<StagesUserLoginRetrieveError>> {
7126    let local_var_configuration = configuration;
7127
7128    let local_var_client = &local_var_configuration.client;
7129
7130    let local_var_uri_str = format!("{}/stages/user_login/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
7131    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
7132
7133    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7134        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7135    }
7136    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7137        let local_var_key = local_var_apikey.key.clone();
7138        let local_var_value = match local_var_apikey.prefix {
7139            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7140            None => local_var_key,
7141        };
7142        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7143    };
7144
7145    let local_var_req = local_var_req_builder.build()?;
7146    let local_var_resp = local_var_client.execute(local_var_req).await?;
7147
7148    let local_var_status = local_var_resp.status();
7149    let local_var_content = local_var_resp.text().await?;
7150
7151    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7152        serde_json::from_str(&local_var_content).map_err(Error::from)
7153    } else {
7154        let local_var_entity: Option<StagesUserLoginRetrieveError> = serde_json::from_str(&local_var_content).ok();
7155        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7156        Err(Error::ResponseError(local_var_error))
7157    }
7158}
7159
7160/// UserLoginStage Viewset
7161pub async fn stages_user_login_update(configuration: &configuration::Configuration, stage_uuid: &str, user_login_stage_request: models::UserLoginStageRequest) -> Result<models::UserLoginStage, Error<StagesUserLoginUpdateError>> {
7162    let local_var_configuration = configuration;
7163
7164    let local_var_client = &local_var_configuration.client;
7165
7166    let local_var_uri_str = format!("{}/stages/user_login/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
7167    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
7168
7169    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7170        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7171    }
7172    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7173        let local_var_key = local_var_apikey.key.clone();
7174        let local_var_value = match local_var_apikey.prefix {
7175            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7176            None => local_var_key,
7177        };
7178        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7179    };
7180    local_var_req_builder = local_var_req_builder.json(&user_login_stage_request);
7181
7182    let local_var_req = local_var_req_builder.build()?;
7183    let local_var_resp = local_var_client.execute(local_var_req).await?;
7184
7185    let local_var_status = local_var_resp.status();
7186    let local_var_content = local_var_resp.text().await?;
7187
7188    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7189        serde_json::from_str(&local_var_content).map_err(Error::from)
7190    } else {
7191        let local_var_entity: Option<StagesUserLoginUpdateError> = serde_json::from_str(&local_var_content).ok();
7192        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7193        Err(Error::ResponseError(local_var_error))
7194    }
7195}
7196
7197/// Get a list of all objects that use this object
7198pub async fn stages_user_login_used_by_list(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<Vec<models::UsedBy>, Error<StagesUserLoginUsedByListError>> {
7199    let local_var_configuration = configuration;
7200
7201    let local_var_client = &local_var_configuration.client;
7202
7203    let local_var_uri_str = format!("{}/stages/user_login/{stage_uuid}/used_by/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
7204    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
7205
7206    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7207        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7208    }
7209    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7210        let local_var_key = local_var_apikey.key.clone();
7211        let local_var_value = match local_var_apikey.prefix {
7212            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7213            None => local_var_key,
7214        };
7215        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7216    };
7217
7218    let local_var_req = local_var_req_builder.build()?;
7219    let local_var_resp = local_var_client.execute(local_var_req).await?;
7220
7221    let local_var_status = local_var_resp.status();
7222    let local_var_content = local_var_resp.text().await?;
7223
7224    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7225        serde_json::from_str(&local_var_content).map_err(Error::from)
7226    } else {
7227        let local_var_entity: Option<StagesUserLoginUsedByListError> = serde_json::from_str(&local_var_content).ok();
7228        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7229        Err(Error::ResponseError(local_var_error))
7230    }
7231}
7232
7233/// UserLogoutStage Viewset
7234pub async fn stages_user_logout_create(configuration: &configuration::Configuration, user_logout_stage_request: models::UserLogoutStageRequest) -> Result<models::UserLogoutStage, Error<StagesUserLogoutCreateError>> {
7235    let local_var_configuration = configuration;
7236
7237    let local_var_client = &local_var_configuration.client;
7238
7239    let local_var_uri_str = format!("{}/stages/user_logout/", local_var_configuration.base_path);
7240    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
7241
7242    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7243        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7244    }
7245    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7246        let local_var_key = local_var_apikey.key.clone();
7247        let local_var_value = match local_var_apikey.prefix {
7248            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7249            None => local_var_key,
7250        };
7251        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7252    };
7253    local_var_req_builder = local_var_req_builder.json(&user_logout_stage_request);
7254
7255    let local_var_req = local_var_req_builder.build()?;
7256    let local_var_resp = local_var_client.execute(local_var_req).await?;
7257
7258    let local_var_status = local_var_resp.status();
7259    let local_var_content = local_var_resp.text().await?;
7260
7261    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7262        serde_json::from_str(&local_var_content).map_err(Error::from)
7263    } else {
7264        let local_var_entity: Option<StagesUserLogoutCreateError> = serde_json::from_str(&local_var_content).ok();
7265        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7266        Err(Error::ResponseError(local_var_error))
7267    }
7268}
7269
7270/// UserLogoutStage Viewset
7271pub async fn stages_user_logout_destroy(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<(), Error<StagesUserLogoutDestroyError>> {
7272    let local_var_configuration = configuration;
7273
7274    let local_var_client = &local_var_configuration.client;
7275
7276    let local_var_uri_str = format!("{}/stages/user_logout/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
7277    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
7278
7279    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7280        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7281    }
7282    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7283        let local_var_key = local_var_apikey.key.clone();
7284        let local_var_value = match local_var_apikey.prefix {
7285            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7286            None => local_var_key,
7287        };
7288        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7289    };
7290
7291    let local_var_req = local_var_req_builder.build()?;
7292    let local_var_resp = local_var_client.execute(local_var_req).await?;
7293
7294    let local_var_status = local_var_resp.status();
7295    let local_var_content = local_var_resp.text().await?;
7296
7297    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7298        Ok(())
7299    } else {
7300        let local_var_entity: Option<StagesUserLogoutDestroyError> = serde_json::from_str(&local_var_content).ok();
7301        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7302        Err(Error::ResponseError(local_var_error))
7303    }
7304}
7305
7306/// UserLogoutStage Viewset
7307pub async fn stages_user_logout_list(configuration: &configuration::Configuration, name: Option<&str>, ordering: Option<&str>, page: Option<i32>, page_size: Option<i32>, search: Option<&str>, stage_uuid: Option<&str>) -> Result<models::PaginatedUserLogoutStageList, Error<StagesUserLogoutListError>> {
7308    let local_var_configuration = configuration;
7309
7310    let local_var_client = &local_var_configuration.client;
7311
7312    let local_var_uri_str = format!("{}/stages/user_logout/", local_var_configuration.base_path);
7313    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
7314
7315    if let Some(ref local_var_str) = name {
7316        local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
7317    }
7318    if let Some(ref local_var_str) = ordering {
7319        local_var_req_builder = local_var_req_builder.query(&[("ordering", &local_var_str.to_string())]);
7320    }
7321    if let Some(ref local_var_str) = page {
7322        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
7323    }
7324    if let Some(ref local_var_str) = page_size {
7325        local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]);
7326    }
7327    if let Some(ref local_var_str) = search {
7328        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
7329    }
7330    if let Some(ref local_var_str) = stage_uuid {
7331        local_var_req_builder = local_var_req_builder.query(&[("stage_uuid", &local_var_str.to_string())]);
7332    }
7333    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7334        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7335    }
7336    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7337        let local_var_key = local_var_apikey.key.clone();
7338        let local_var_value = match local_var_apikey.prefix {
7339            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7340            None => local_var_key,
7341        };
7342        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7343    };
7344
7345    let local_var_req = local_var_req_builder.build()?;
7346    let local_var_resp = local_var_client.execute(local_var_req).await?;
7347
7348    let local_var_status = local_var_resp.status();
7349    let local_var_content = local_var_resp.text().await?;
7350
7351    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7352        serde_json::from_str(&local_var_content).map_err(Error::from)
7353    } else {
7354        let local_var_entity: Option<StagesUserLogoutListError> = serde_json::from_str(&local_var_content).ok();
7355        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7356        Err(Error::ResponseError(local_var_error))
7357    }
7358}
7359
7360/// UserLogoutStage Viewset
7361pub async fn stages_user_logout_partial_update(configuration: &configuration::Configuration, stage_uuid: &str, patched_user_logout_stage_request: Option<models::PatchedUserLogoutStageRequest>) -> Result<models::UserLogoutStage, Error<StagesUserLogoutPartialUpdateError>> {
7362    let local_var_configuration = configuration;
7363
7364    let local_var_client = &local_var_configuration.client;
7365
7366    let local_var_uri_str = format!("{}/stages/user_logout/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
7367    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7368
7369    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7370        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7371    }
7372    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7373        let local_var_key = local_var_apikey.key.clone();
7374        let local_var_value = match local_var_apikey.prefix {
7375            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7376            None => local_var_key,
7377        };
7378        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7379    };
7380    local_var_req_builder = local_var_req_builder.json(&patched_user_logout_stage_request);
7381
7382    let local_var_req = local_var_req_builder.build()?;
7383    let local_var_resp = local_var_client.execute(local_var_req).await?;
7384
7385    let local_var_status = local_var_resp.status();
7386    let local_var_content = local_var_resp.text().await?;
7387
7388    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7389        serde_json::from_str(&local_var_content).map_err(Error::from)
7390    } else {
7391        let local_var_entity: Option<StagesUserLogoutPartialUpdateError> = serde_json::from_str(&local_var_content).ok();
7392        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7393        Err(Error::ResponseError(local_var_error))
7394    }
7395}
7396
7397/// UserLogoutStage Viewset
7398pub async fn stages_user_logout_retrieve(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<models::UserLogoutStage, Error<StagesUserLogoutRetrieveError>> {
7399    let local_var_configuration = configuration;
7400
7401    let local_var_client = &local_var_configuration.client;
7402
7403    let local_var_uri_str = format!("{}/stages/user_logout/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
7404    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
7405
7406    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7407        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7408    }
7409    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7410        let local_var_key = local_var_apikey.key.clone();
7411        let local_var_value = match local_var_apikey.prefix {
7412            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7413            None => local_var_key,
7414        };
7415        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7416    };
7417
7418    let local_var_req = local_var_req_builder.build()?;
7419    let local_var_resp = local_var_client.execute(local_var_req).await?;
7420
7421    let local_var_status = local_var_resp.status();
7422    let local_var_content = local_var_resp.text().await?;
7423
7424    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7425        serde_json::from_str(&local_var_content).map_err(Error::from)
7426    } else {
7427        let local_var_entity: Option<StagesUserLogoutRetrieveError> = serde_json::from_str(&local_var_content).ok();
7428        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7429        Err(Error::ResponseError(local_var_error))
7430    }
7431}
7432
7433/// UserLogoutStage Viewset
7434pub async fn stages_user_logout_update(configuration: &configuration::Configuration, stage_uuid: &str, user_logout_stage_request: models::UserLogoutStageRequest) -> Result<models::UserLogoutStage, Error<StagesUserLogoutUpdateError>> {
7435    let local_var_configuration = configuration;
7436
7437    let local_var_client = &local_var_configuration.client;
7438
7439    let local_var_uri_str = format!("{}/stages/user_logout/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
7440    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
7441
7442    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7443        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7444    }
7445    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7446        let local_var_key = local_var_apikey.key.clone();
7447        let local_var_value = match local_var_apikey.prefix {
7448            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7449            None => local_var_key,
7450        };
7451        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7452    };
7453    local_var_req_builder = local_var_req_builder.json(&user_logout_stage_request);
7454
7455    let local_var_req = local_var_req_builder.build()?;
7456    let local_var_resp = local_var_client.execute(local_var_req).await?;
7457
7458    let local_var_status = local_var_resp.status();
7459    let local_var_content = local_var_resp.text().await?;
7460
7461    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7462        serde_json::from_str(&local_var_content).map_err(Error::from)
7463    } else {
7464        let local_var_entity: Option<StagesUserLogoutUpdateError> = serde_json::from_str(&local_var_content).ok();
7465        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7466        Err(Error::ResponseError(local_var_error))
7467    }
7468}
7469
7470/// Get a list of all objects that use this object
7471pub async fn stages_user_logout_used_by_list(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<Vec<models::UsedBy>, Error<StagesUserLogoutUsedByListError>> {
7472    let local_var_configuration = configuration;
7473
7474    let local_var_client = &local_var_configuration.client;
7475
7476    let local_var_uri_str = format!("{}/stages/user_logout/{stage_uuid}/used_by/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
7477    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
7478
7479    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7480        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7481    }
7482    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7483        let local_var_key = local_var_apikey.key.clone();
7484        let local_var_value = match local_var_apikey.prefix {
7485            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7486            None => local_var_key,
7487        };
7488        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7489    };
7490
7491    let local_var_req = local_var_req_builder.build()?;
7492    let local_var_resp = local_var_client.execute(local_var_req).await?;
7493
7494    let local_var_status = local_var_resp.status();
7495    let local_var_content = local_var_resp.text().await?;
7496
7497    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7498        serde_json::from_str(&local_var_content).map_err(Error::from)
7499    } else {
7500        let local_var_entity: Option<StagesUserLogoutUsedByListError> = serde_json::from_str(&local_var_content).ok();
7501        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7502        Err(Error::ResponseError(local_var_error))
7503    }
7504}
7505
7506/// UserWriteStage Viewset
7507pub async fn stages_user_write_create(configuration: &configuration::Configuration, user_write_stage_request: models::UserWriteStageRequest) -> Result<models::UserWriteStage, Error<StagesUserWriteCreateError>> {
7508    let local_var_configuration = configuration;
7509
7510    let local_var_client = &local_var_configuration.client;
7511
7512    let local_var_uri_str = format!("{}/stages/user_write/", local_var_configuration.base_path);
7513    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
7514
7515    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7516        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7517    }
7518    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7519        let local_var_key = local_var_apikey.key.clone();
7520        let local_var_value = match local_var_apikey.prefix {
7521            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7522            None => local_var_key,
7523        };
7524        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7525    };
7526    local_var_req_builder = local_var_req_builder.json(&user_write_stage_request);
7527
7528    let local_var_req = local_var_req_builder.build()?;
7529    let local_var_resp = local_var_client.execute(local_var_req).await?;
7530
7531    let local_var_status = local_var_resp.status();
7532    let local_var_content = local_var_resp.text().await?;
7533
7534    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7535        serde_json::from_str(&local_var_content).map_err(Error::from)
7536    } else {
7537        let local_var_entity: Option<StagesUserWriteCreateError> = serde_json::from_str(&local_var_content).ok();
7538        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7539        Err(Error::ResponseError(local_var_error))
7540    }
7541}
7542
7543/// UserWriteStage Viewset
7544pub async fn stages_user_write_destroy(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<(), Error<StagesUserWriteDestroyError>> {
7545    let local_var_configuration = configuration;
7546
7547    let local_var_client = &local_var_configuration.client;
7548
7549    let local_var_uri_str = format!("{}/stages/user_write/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
7550    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
7551
7552    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7553        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7554    }
7555    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7556        let local_var_key = local_var_apikey.key.clone();
7557        let local_var_value = match local_var_apikey.prefix {
7558            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7559            None => local_var_key,
7560        };
7561        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7562    };
7563
7564    let local_var_req = local_var_req_builder.build()?;
7565    let local_var_resp = local_var_client.execute(local_var_req).await?;
7566
7567    let local_var_status = local_var_resp.status();
7568    let local_var_content = local_var_resp.text().await?;
7569
7570    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7571        Ok(())
7572    } else {
7573        let local_var_entity: Option<StagesUserWriteDestroyError> = serde_json::from_str(&local_var_content).ok();
7574        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7575        Err(Error::ResponseError(local_var_error))
7576    }
7577}
7578
7579/// UserWriteStage Viewset
7580pub async fn stages_user_write_list(configuration: &configuration::Configuration, create_users_as_inactive: Option<bool>, create_users_group: Option<&str>, name: Option<&str>, ordering: Option<&str>, page: Option<i32>, page_size: Option<i32>, search: Option<&str>, stage_uuid: Option<&str>, user_creation_mode: Option<&str>, user_path_template: Option<&str>, user_type: Option<&str>) -> Result<models::PaginatedUserWriteStageList, Error<StagesUserWriteListError>> {
7581    let local_var_configuration = configuration;
7582
7583    let local_var_client = &local_var_configuration.client;
7584
7585    let local_var_uri_str = format!("{}/stages/user_write/", local_var_configuration.base_path);
7586    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
7587
7588    if let Some(ref local_var_str) = create_users_as_inactive {
7589        local_var_req_builder = local_var_req_builder.query(&[("create_users_as_inactive", &local_var_str.to_string())]);
7590    }
7591    if let Some(ref local_var_str) = create_users_group {
7592        local_var_req_builder = local_var_req_builder.query(&[("create_users_group", &local_var_str.to_string())]);
7593    }
7594    if let Some(ref local_var_str) = name {
7595        local_var_req_builder = local_var_req_builder.query(&[("name", &local_var_str.to_string())]);
7596    }
7597    if let Some(ref local_var_str) = ordering {
7598        local_var_req_builder = local_var_req_builder.query(&[("ordering", &local_var_str.to_string())]);
7599    }
7600    if let Some(ref local_var_str) = page {
7601        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
7602    }
7603    if let Some(ref local_var_str) = page_size {
7604        local_var_req_builder = local_var_req_builder.query(&[("page_size", &local_var_str.to_string())]);
7605    }
7606    if let Some(ref local_var_str) = search {
7607        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
7608    }
7609    if let Some(ref local_var_str) = stage_uuid {
7610        local_var_req_builder = local_var_req_builder.query(&[("stage_uuid", &local_var_str.to_string())]);
7611    }
7612    if let Some(ref local_var_str) = user_creation_mode {
7613        local_var_req_builder = local_var_req_builder.query(&[("user_creation_mode", &local_var_str.to_string())]);
7614    }
7615    if let Some(ref local_var_str) = user_path_template {
7616        local_var_req_builder = local_var_req_builder.query(&[("user_path_template", &local_var_str.to_string())]);
7617    }
7618    if let Some(ref local_var_str) = user_type {
7619        local_var_req_builder = local_var_req_builder.query(&[("user_type", &local_var_str.to_string())]);
7620    }
7621    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7622        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7623    }
7624    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7625        let local_var_key = local_var_apikey.key.clone();
7626        let local_var_value = match local_var_apikey.prefix {
7627            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7628            None => local_var_key,
7629        };
7630        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7631    };
7632
7633    let local_var_req = local_var_req_builder.build()?;
7634    let local_var_resp = local_var_client.execute(local_var_req).await?;
7635
7636    let local_var_status = local_var_resp.status();
7637    let local_var_content = local_var_resp.text().await?;
7638
7639    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7640        serde_json::from_str(&local_var_content).map_err(Error::from)
7641    } else {
7642        let local_var_entity: Option<StagesUserWriteListError> = serde_json::from_str(&local_var_content).ok();
7643        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7644        Err(Error::ResponseError(local_var_error))
7645    }
7646}
7647
7648/// UserWriteStage Viewset
7649pub async fn stages_user_write_partial_update(configuration: &configuration::Configuration, stage_uuid: &str, patched_user_write_stage_request: Option<models::PatchedUserWriteStageRequest>) -> Result<models::UserWriteStage, Error<StagesUserWritePartialUpdateError>> {
7650    let local_var_configuration = configuration;
7651
7652    let local_var_client = &local_var_configuration.client;
7653
7654    let local_var_uri_str = format!("{}/stages/user_write/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
7655    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str());
7656
7657    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7658        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7659    }
7660    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7661        let local_var_key = local_var_apikey.key.clone();
7662        let local_var_value = match local_var_apikey.prefix {
7663            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7664            None => local_var_key,
7665        };
7666        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7667    };
7668    local_var_req_builder = local_var_req_builder.json(&patched_user_write_stage_request);
7669
7670    let local_var_req = local_var_req_builder.build()?;
7671    let local_var_resp = local_var_client.execute(local_var_req).await?;
7672
7673    let local_var_status = local_var_resp.status();
7674    let local_var_content = local_var_resp.text().await?;
7675
7676    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7677        serde_json::from_str(&local_var_content).map_err(Error::from)
7678    } else {
7679        let local_var_entity: Option<StagesUserWritePartialUpdateError> = serde_json::from_str(&local_var_content).ok();
7680        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7681        Err(Error::ResponseError(local_var_error))
7682    }
7683}
7684
7685/// UserWriteStage Viewset
7686pub async fn stages_user_write_retrieve(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<models::UserWriteStage, Error<StagesUserWriteRetrieveError>> {
7687    let local_var_configuration = configuration;
7688
7689    let local_var_client = &local_var_configuration.client;
7690
7691    let local_var_uri_str = format!("{}/stages/user_write/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
7692    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
7693
7694    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7695        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7696    }
7697    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7698        let local_var_key = local_var_apikey.key.clone();
7699        let local_var_value = match local_var_apikey.prefix {
7700            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7701            None => local_var_key,
7702        };
7703        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7704    };
7705
7706    let local_var_req = local_var_req_builder.build()?;
7707    let local_var_resp = local_var_client.execute(local_var_req).await?;
7708
7709    let local_var_status = local_var_resp.status();
7710    let local_var_content = local_var_resp.text().await?;
7711
7712    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7713        serde_json::from_str(&local_var_content).map_err(Error::from)
7714    } else {
7715        let local_var_entity: Option<StagesUserWriteRetrieveError> = serde_json::from_str(&local_var_content).ok();
7716        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7717        Err(Error::ResponseError(local_var_error))
7718    }
7719}
7720
7721/// UserWriteStage Viewset
7722pub async fn stages_user_write_update(configuration: &configuration::Configuration, stage_uuid: &str, user_write_stage_request: models::UserWriteStageRequest) -> Result<models::UserWriteStage, Error<StagesUserWriteUpdateError>> {
7723    let local_var_configuration = configuration;
7724
7725    let local_var_client = &local_var_configuration.client;
7726
7727    let local_var_uri_str = format!("{}/stages/user_write/{stage_uuid}/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
7728    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
7729
7730    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7731        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7732    }
7733    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7734        let local_var_key = local_var_apikey.key.clone();
7735        let local_var_value = match local_var_apikey.prefix {
7736            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7737            None => local_var_key,
7738        };
7739        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7740    };
7741    local_var_req_builder = local_var_req_builder.json(&user_write_stage_request);
7742
7743    let local_var_req = local_var_req_builder.build()?;
7744    let local_var_resp = local_var_client.execute(local_var_req).await?;
7745
7746    let local_var_status = local_var_resp.status();
7747    let local_var_content = local_var_resp.text().await?;
7748
7749    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7750        serde_json::from_str(&local_var_content).map_err(Error::from)
7751    } else {
7752        let local_var_entity: Option<StagesUserWriteUpdateError> = serde_json::from_str(&local_var_content).ok();
7753        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7754        Err(Error::ResponseError(local_var_error))
7755    }
7756}
7757
7758/// Get a list of all objects that use this object
7759pub async fn stages_user_write_used_by_list(configuration: &configuration::Configuration, stage_uuid: &str) -> Result<Vec<models::UsedBy>, Error<StagesUserWriteUsedByListError>> {
7760    let local_var_configuration = configuration;
7761
7762    let local_var_client = &local_var_configuration.client;
7763
7764    let local_var_uri_str = format!("{}/stages/user_write/{stage_uuid}/used_by/", local_var_configuration.base_path, stage_uuid=crate::apis::urlencode(stage_uuid));
7765    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
7766
7767    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
7768        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
7769    }
7770    if let Some(ref local_var_apikey) = local_var_configuration.api_key {
7771        let local_var_key = local_var_apikey.key.clone();
7772        let local_var_value = match local_var_apikey.prefix {
7773            Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key),
7774            None => local_var_key,
7775        };
7776        local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value);
7777    };
7778
7779    let local_var_req = local_var_req_builder.build()?;
7780    let local_var_resp = local_var_client.execute(local_var_req).await?;
7781
7782    let local_var_status = local_var_resp.status();
7783    let local_var_content = local_var_resp.text().await?;
7784
7785    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
7786        serde_json::from_str(&local_var_content).map_err(Error::from)
7787    } else {
7788        let local_var_entity: Option<StagesUserWriteUsedByListError> = serde_json::from_str(&local_var_content).ok();
7789        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
7790        Err(Error::ResponseError(local_var_error))
7791    }
7792}
7793