Skip to main content

authentik_client/apis/
propertymappings_api.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2025.8.6
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use super::{configuration, ContentType, Error};
12use crate::{apis::ResponseContent, models};
13use reqwest;
14use serde::{de::Error as _, Deserialize, Serialize};
15
16/// struct for typed errors of method [`propertymappings_all_destroy`]
17#[derive(Debug, Clone, Serialize, Deserialize)]
18#[serde(untagged)]
19pub enum PropertymappingsAllDestroyError {
20    Status400(models::ValidationError),
21    Status403(models::GenericError),
22    UnknownValue(serde_json::Value),
23}
24
25/// struct for typed errors of method [`propertymappings_all_list`]
26#[derive(Debug, Clone, Serialize, Deserialize)]
27#[serde(untagged)]
28pub enum PropertymappingsAllListError {
29    Status400(models::ValidationError),
30    Status403(models::GenericError),
31    UnknownValue(serde_json::Value),
32}
33
34/// struct for typed errors of method [`propertymappings_all_retrieve`]
35#[derive(Debug, Clone, Serialize, Deserialize)]
36#[serde(untagged)]
37pub enum PropertymappingsAllRetrieveError {
38    Status400(models::ValidationError),
39    Status403(models::GenericError),
40    UnknownValue(serde_json::Value),
41}
42
43/// struct for typed errors of method [`propertymappings_all_test_create`]
44#[derive(Debug, Clone, Serialize, Deserialize)]
45#[serde(untagged)]
46pub enum PropertymappingsAllTestCreateError {
47    Status400(),
48    Status403(models::GenericError),
49    UnknownValue(serde_json::Value),
50}
51
52/// struct for typed errors of method [`propertymappings_all_types_list`]
53#[derive(Debug, Clone, Serialize, Deserialize)]
54#[serde(untagged)]
55pub enum PropertymappingsAllTypesListError {
56    Status400(models::ValidationError),
57    Status403(models::GenericError),
58    UnknownValue(serde_json::Value),
59}
60
61/// struct for typed errors of method [`propertymappings_all_used_by_list`]
62#[derive(Debug, Clone, Serialize, Deserialize)]
63#[serde(untagged)]
64pub enum PropertymappingsAllUsedByListError {
65    Status400(models::ValidationError),
66    Status403(models::GenericError),
67    UnknownValue(serde_json::Value),
68}
69
70/// struct for typed errors of method [`propertymappings_notification_create`]
71#[derive(Debug, Clone, Serialize, Deserialize)]
72#[serde(untagged)]
73pub enum PropertymappingsNotificationCreateError {
74    Status400(models::ValidationError),
75    Status403(models::GenericError),
76    UnknownValue(serde_json::Value),
77}
78
79/// struct for typed errors of method [`propertymappings_notification_destroy`]
80#[derive(Debug, Clone, Serialize, Deserialize)]
81#[serde(untagged)]
82pub enum PropertymappingsNotificationDestroyError {
83    Status400(models::ValidationError),
84    Status403(models::GenericError),
85    UnknownValue(serde_json::Value),
86}
87
88/// struct for typed errors of method [`propertymappings_notification_list`]
89#[derive(Debug, Clone, Serialize, Deserialize)]
90#[serde(untagged)]
91pub enum PropertymappingsNotificationListError {
92    Status400(models::ValidationError),
93    Status403(models::GenericError),
94    UnknownValue(serde_json::Value),
95}
96
97/// struct for typed errors of method [`propertymappings_notification_partial_update`]
98#[derive(Debug, Clone, Serialize, Deserialize)]
99#[serde(untagged)]
100pub enum PropertymappingsNotificationPartialUpdateError {
101    Status400(models::ValidationError),
102    Status403(models::GenericError),
103    UnknownValue(serde_json::Value),
104}
105
106/// struct for typed errors of method [`propertymappings_notification_retrieve`]
107#[derive(Debug, Clone, Serialize, Deserialize)]
108#[serde(untagged)]
109pub enum PropertymappingsNotificationRetrieveError {
110    Status400(models::ValidationError),
111    Status403(models::GenericError),
112    UnknownValue(serde_json::Value),
113}
114
115/// struct for typed errors of method [`propertymappings_notification_update`]
116#[derive(Debug, Clone, Serialize, Deserialize)]
117#[serde(untagged)]
118pub enum PropertymappingsNotificationUpdateError {
119    Status400(models::ValidationError),
120    Status403(models::GenericError),
121    UnknownValue(serde_json::Value),
122}
123
124/// struct for typed errors of method [`propertymappings_notification_used_by_list`]
125#[derive(Debug, Clone, Serialize, Deserialize)]
126#[serde(untagged)]
127pub enum PropertymappingsNotificationUsedByListError {
128    Status400(models::ValidationError),
129    Status403(models::GenericError),
130    UnknownValue(serde_json::Value),
131}
132
133/// struct for typed errors of method [`propertymappings_provider_google_workspace_create`]
134#[derive(Debug, Clone, Serialize, Deserialize)]
135#[serde(untagged)]
136pub enum PropertymappingsProviderGoogleWorkspaceCreateError {
137    Status400(models::ValidationError),
138    Status403(models::GenericError),
139    UnknownValue(serde_json::Value),
140}
141
142/// struct for typed errors of method [`propertymappings_provider_google_workspace_destroy`]
143#[derive(Debug, Clone, Serialize, Deserialize)]
144#[serde(untagged)]
145pub enum PropertymappingsProviderGoogleWorkspaceDestroyError {
146    Status400(models::ValidationError),
147    Status403(models::GenericError),
148    UnknownValue(serde_json::Value),
149}
150
151/// struct for typed errors of method [`propertymappings_provider_google_workspace_list`]
152#[derive(Debug, Clone, Serialize, Deserialize)]
153#[serde(untagged)]
154pub enum PropertymappingsProviderGoogleWorkspaceListError {
155    Status400(models::ValidationError),
156    Status403(models::GenericError),
157    UnknownValue(serde_json::Value),
158}
159
160/// struct for typed errors of method [`propertymappings_provider_google_workspace_partial_update`]
161#[derive(Debug, Clone, Serialize, Deserialize)]
162#[serde(untagged)]
163pub enum PropertymappingsProviderGoogleWorkspacePartialUpdateError {
164    Status400(models::ValidationError),
165    Status403(models::GenericError),
166    UnknownValue(serde_json::Value),
167}
168
169/// struct for typed errors of method [`propertymappings_provider_google_workspace_retrieve`]
170#[derive(Debug, Clone, Serialize, Deserialize)]
171#[serde(untagged)]
172pub enum PropertymappingsProviderGoogleWorkspaceRetrieveError {
173    Status400(models::ValidationError),
174    Status403(models::GenericError),
175    UnknownValue(serde_json::Value),
176}
177
178/// struct for typed errors of method [`propertymappings_provider_google_workspace_update`]
179#[derive(Debug, Clone, Serialize, Deserialize)]
180#[serde(untagged)]
181pub enum PropertymappingsProviderGoogleWorkspaceUpdateError {
182    Status400(models::ValidationError),
183    Status403(models::GenericError),
184    UnknownValue(serde_json::Value),
185}
186
187/// struct for typed errors of method [`propertymappings_provider_google_workspace_used_by_list`]
188#[derive(Debug, Clone, Serialize, Deserialize)]
189#[serde(untagged)]
190pub enum PropertymappingsProviderGoogleWorkspaceUsedByListError {
191    Status400(models::ValidationError),
192    Status403(models::GenericError),
193    UnknownValue(serde_json::Value),
194}
195
196/// struct for typed errors of method [`propertymappings_provider_microsoft_entra_create`]
197#[derive(Debug, Clone, Serialize, Deserialize)]
198#[serde(untagged)]
199pub enum PropertymappingsProviderMicrosoftEntraCreateError {
200    Status400(models::ValidationError),
201    Status403(models::GenericError),
202    UnknownValue(serde_json::Value),
203}
204
205/// struct for typed errors of method [`propertymappings_provider_microsoft_entra_destroy`]
206#[derive(Debug, Clone, Serialize, Deserialize)]
207#[serde(untagged)]
208pub enum PropertymappingsProviderMicrosoftEntraDestroyError {
209    Status400(models::ValidationError),
210    Status403(models::GenericError),
211    UnknownValue(serde_json::Value),
212}
213
214/// struct for typed errors of method [`propertymappings_provider_microsoft_entra_list`]
215#[derive(Debug, Clone, Serialize, Deserialize)]
216#[serde(untagged)]
217pub enum PropertymappingsProviderMicrosoftEntraListError {
218    Status400(models::ValidationError),
219    Status403(models::GenericError),
220    UnknownValue(serde_json::Value),
221}
222
223/// struct for typed errors of method [`propertymappings_provider_microsoft_entra_partial_update`]
224#[derive(Debug, Clone, Serialize, Deserialize)]
225#[serde(untagged)]
226pub enum PropertymappingsProviderMicrosoftEntraPartialUpdateError {
227    Status400(models::ValidationError),
228    Status403(models::GenericError),
229    UnknownValue(serde_json::Value),
230}
231
232/// struct for typed errors of method [`propertymappings_provider_microsoft_entra_retrieve`]
233#[derive(Debug, Clone, Serialize, Deserialize)]
234#[serde(untagged)]
235pub enum PropertymappingsProviderMicrosoftEntraRetrieveError {
236    Status400(models::ValidationError),
237    Status403(models::GenericError),
238    UnknownValue(serde_json::Value),
239}
240
241/// struct for typed errors of method [`propertymappings_provider_microsoft_entra_update`]
242#[derive(Debug, Clone, Serialize, Deserialize)]
243#[serde(untagged)]
244pub enum PropertymappingsProviderMicrosoftEntraUpdateError {
245    Status400(models::ValidationError),
246    Status403(models::GenericError),
247    UnknownValue(serde_json::Value),
248}
249
250/// struct for typed errors of method [`propertymappings_provider_microsoft_entra_used_by_list`]
251#[derive(Debug, Clone, Serialize, Deserialize)]
252#[serde(untagged)]
253pub enum PropertymappingsProviderMicrosoftEntraUsedByListError {
254    Status400(models::ValidationError),
255    Status403(models::GenericError),
256    UnknownValue(serde_json::Value),
257}
258
259/// struct for typed errors of method [`propertymappings_provider_rac_create`]
260#[derive(Debug, Clone, Serialize, Deserialize)]
261#[serde(untagged)]
262pub enum PropertymappingsProviderRacCreateError {
263    Status400(models::ValidationError),
264    Status403(models::GenericError),
265    UnknownValue(serde_json::Value),
266}
267
268/// struct for typed errors of method [`propertymappings_provider_rac_destroy`]
269#[derive(Debug, Clone, Serialize, Deserialize)]
270#[serde(untagged)]
271pub enum PropertymappingsProviderRacDestroyError {
272    Status400(models::ValidationError),
273    Status403(models::GenericError),
274    UnknownValue(serde_json::Value),
275}
276
277/// struct for typed errors of method [`propertymappings_provider_rac_list`]
278#[derive(Debug, Clone, Serialize, Deserialize)]
279#[serde(untagged)]
280pub enum PropertymappingsProviderRacListError {
281    Status400(models::ValidationError),
282    Status403(models::GenericError),
283    UnknownValue(serde_json::Value),
284}
285
286/// struct for typed errors of method [`propertymappings_provider_rac_partial_update`]
287#[derive(Debug, Clone, Serialize, Deserialize)]
288#[serde(untagged)]
289pub enum PropertymappingsProviderRacPartialUpdateError {
290    Status400(models::ValidationError),
291    Status403(models::GenericError),
292    UnknownValue(serde_json::Value),
293}
294
295/// struct for typed errors of method [`propertymappings_provider_rac_retrieve`]
296#[derive(Debug, Clone, Serialize, Deserialize)]
297#[serde(untagged)]
298pub enum PropertymappingsProviderRacRetrieveError {
299    Status400(models::ValidationError),
300    Status403(models::GenericError),
301    UnknownValue(serde_json::Value),
302}
303
304/// struct for typed errors of method [`propertymappings_provider_rac_update`]
305#[derive(Debug, Clone, Serialize, Deserialize)]
306#[serde(untagged)]
307pub enum PropertymappingsProviderRacUpdateError {
308    Status400(models::ValidationError),
309    Status403(models::GenericError),
310    UnknownValue(serde_json::Value),
311}
312
313/// struct for typed errors of method [`propertymappings_provider_rac_used_by_list`]
314#[derive(Debug, Clone, Serialize, Deserialize)]
315#[serde(untagged)]
316pub enum PropertymappingsProviderRacUsedByListError {
317    Status400(models::ValidationError),
318    Status403(models::GenericError),
319    UnknownValue(serde_json::Value),
320}
321
322/// struct for typed errors of method [`propertymappings_provider_radius_create`]
323#[derive(Debug, Clone, Serialize, Deserialize)]
324#[serde(untagged)]
325pub enum PropertymappingsProviderRadiusCreateError {
326    Status400(models::ValidationError),
327    Status403(models::GenericError),
328    UnknownValue(serde_json::Value),
329}
330
331/// struct for typed errors of method [`propertymappings_provider_radius_destroy`]
332#[derive(Debug, Clone, Serialize, Deserialize)]
333#[serde(untagged)]
334pub enum PropertymappingsProviderRadiusDestroyError {
335    Status400(models::ValidationError),
336    Status403(models::GenericError),
337    UnknownValue(serde_json::Value),
338}
339
340/// struct for typed errors of method [`propertymappings_provider_radius_list`]
341#[derive(Debug, Clone, Serialize, Deserialize)]
342#[serde(untagged)]
343pub enum PropertymappingsProviderRadiusListError {
344    Status400(models::ValidationError),
345    Status403(models::GenericError),
346    UnknownValue(serde_json::Value),
347}
348
349/// struct for typed errors of method [`propertymappings_provider_radius_partial_update`]
350#[derive(Debug, Clone, Serialize, Deserialize)]
351#[serde(untagged)]
352pub enum PropertymappingsProviderRadiusPartialUpdateError {
353    Status400(models::ValidationError),
354    Status403(models::GenericError),
355    UnknownValue(serde_json::Value),
356}
357
358/// struct for typed errors of method [`propertymappings_provider_radius_retrieve`]
359#[derive(Debug, Clone, Serialize, Deserialize)]
360#[serde(untagged)]
361pub enum PropertymappingsProviderRadiusRetrieveError {
362    Status400(models::ValidationError),
363    Status403(models::GenericError),
364    UnknownValue(serde_json::Value),
365}
366
367/// struct for typed errors of method [`propertymappings_provider_radius_update`]
368#[derive(Debug, Clone, Serialize, Deserialize)]
369#[serde(untagged)]
370pub enum PropertymappingsProviderRadiusUpdateError {
371    Status400(models::ValidationError),
372    Status403(models::GenericError),
373    UnknownValue(serde_json::Value),
374}
375
376/// struct for typed errors of method [`propertymappings_provider_radius_used_by_list`]
377#[derive(Debug, Clone, Serialize, Deserialize)]
378#[serde(untagged)]
379pub enum PropertymappingsProviderRadiusUsedByListError {
380    Status400(models::ValidationError),
381    Status403(models::GenericError),
382    UnknownValue(serde_json::Value),
383}
384
385/// struct for typed errors of method [`propertymappings_provider_saml_create`]
386#[derive(Debug, Clone, Serialize, Deserialize)]
387#[serde(untagged)]
388pub enum PropertymappingsProviderSamlCreateError {
389    Status400(models::ValidationError),
390    Status403(models::GenericError),
391    UnknownValue(serde_json::Value),
392}
393
394/// struct for typed errors of method [`propertymappings_provider_saml_destroy`]
395#[derive(Debug, Clone, Serialize, Deserialize)]
396#[serde(untagged)]
397pub enum PropertymappingsProviderSamlDestroyError {
398    Status400(models::ValidationError),
399    Status403(models::GenericError),
400    UnknownValue(serde_json::Value),
401}
402
403/// struct for typed errors of method [`propertymappings_provider_saml_list`]
404#[derive(Debug, Clone, Serialize, Deserialize)]
405#[serde(untagged)]
406pub enum PropertymappingsProviderSamlListError {
407    Status400(models::ValidationError),
408    Status403(models::GenericError),
409    UnknownValue(serde_json::Value),
410}
411
412/// struct for typed errors of method [`propertymappings_provider_saml_partial_update`]
413#[derive(Debug, Clone, Serialize, Deserialize)]
414#[serde(untagged)]
415pub enum PropertymappingsProviderSamlPartialUpdateError {
416    Status400(models::ValidationError),
417    Status403(models::GenericError),
418    UnknownValue(serde_json::Value),
419}
420
421/// struct for typed errors of method [`propertymappings_provider_saml_retrieve`]
422#[derive(Debug, Clone, Serialize, Deserialize)]
423#[serde(untagged)]
424pub enum PropertymappingsProviderSamlRetrieveError {
425    Status400(models::ValidationError),
426    Status403(models::GenericError),
427    UnknownValue(serde_json::Value),
428}
429
430/// struct for typed errors of method [`propertymappings_provider_saml_update`]
431#[derive(Debug, Clone, Serialize, Deserialize)]
432#[serde(untagged)]
433pub enum PropertymappingsProviderSamlUpdateError {
434    Status400(models::ValidationError),
435    Status403(models::GenericError),
436    UnknownValue(serde_json::Value),
437}
438
439/// struct for typed errors of method [`propertymappings_provider_saml_used_by_list`]
440#[derive(Debug, Clone, Serialize, Deserialize)]
441#[serde(untagged)]
442pub enum PropertymappingsProviderSamlUsedByListError {
443    Status400(models::ValidationError),
444    Status403(models::GenericError),
445    UnknownValue(serde_json::Value),
446}
447
448/// struct for typed errors of method [`propertymappings_provider_scim_create`]
449#[derive(Debug, Clone, Serialize, Deserialize)]
450#[serde(untagged)]
451pub enum PropertymappingsProviderScimCreateError {
452    Status400(models::ValidationError),
453    Status403(models::GenericError),
454    UnknownValue(serde_json::Value),
455}
456
457/// struct for typed errors of method [`propertymappings_provider_scim_destroy`]
458#[derive(Debug, Clone, Serialize, Deserialize)]
459#[serde(untagged)]
460pub enum PropertymappingsProviderScimDestroyError {
461    Status400(models::ValidationError),
462    Status403(models::GenericError),
463    UnknownValue(serde_json::Value),
464}
465
466/// struct for typed errors of method [`propertymappings_provider_scim_list`]
467#[derive(Debug, Clone, Serialize, Deserialize)]
468#[serde(untagged)]
469pub enum PropertymappingsProviderScimListError {
470    Status400(models::ValidationError),
471    Status403(models::GenericError),
472    UnknownValue(serde_json::Value),
473}
474
475/// struct for typed errors of method [`propertymappings_provider_scim_partial_update`]
476#[derive(Debug, Clone, Serialize, Deserialize)]
477#[serde(untagged)]
478pub enum PropertymappingsProviderScimPartialUpdateError {
479    Status400(models::ValidationError),
480    Status403(models::GenericError),
481    UnknownValue(serde_json::Value),
482}
483
484/// struct for typed errors of method [`propertymappings_provider_scim_retrieve`]
485#[derive(Debug, Clone, Serialize, Deserialize)]
486#[serde(untagged)]
487pub enum PropertymappingsProviderScimRetrieveError {
488    Status400(models::ValidationError),
489    Status403(models::GenericError),
490    UnknownValue(serde_json::Value),
491}
492
493/// struct for typed errors of method [`propertymappings_provider_scim_update`]
494#[derive(Debug, Clone, Serialize, Deserialize)]
495#[serde(untagged)]
496pub enum PropertymappingsProviderScimUpdateError {
497    Status400(models::ValidationError),
498    Status403(models::GenericError),
499    UnknownValue(serde_json::Value),
500}
501
502/// struct for typed errors of method [`propertymappings_provider_scim_used_by_list`]
503#[derive(Debug, Clone, Serialize, Deserialize)]
504#[serde(untagged)]
505pub enum PropertymappingsProviderScimUsedByListError {
506    Status400(models::ValidationError),
507    Status403(models::GenericError),
508    UnknownValue(serde_json::Value),
509}
510
511/// struct for typed errors of method [`propertymappings_provider_scope_create`]
512#[derive(Debug, Clone, Serialize, Deserialize)]
513#[serde(untagged)]
514pub enum PropertymappingsProviderScopeCreateError {
515    Status400(models::ValidationError),
516    Status403(models::GenericError),
517    UnknownValue(serde_json::Value),
518}
519
520/// struct for typed errors of method [`propertymappings_provider_scope_destroy`]
521#[derive(Debug, Clone, Serialize, Deserialize)]
522#[serde(untagged)]
523pub enum PropertymappingsProviderScopeDestroyError {
524    Status400(models::ValidationError),
525    Status403(models::GenericError),
526    UnknownValue(serde_json::Value),
527}
528
529/// struct for typed errors of method [`propertymappings_provider_scope_list`]
530#[derive(Debug, Clone, Serialize, Deserialize)]
531#[serde(untagged)]
532pub enum PropertymappingsProviderScopeListError {
533    Status400(models::ValidationError),
534    Status403(models::GenericError),
535    UnknownValue(serde_json::Value),
536}
537
538/// struct for typed errors of method [`propertymappings_provider_scope_partial_update`]
539#[derive(Debug, Clone, Serialize, Deserialize)]
540#[serde(untagged)]
541pub enum PropertymappingsProviderScopePartialUpdateError {
542    Status400(models::ValidationError),
543    Status403(models::GenericError),
544    UnknownValue(serde_json::Value),
545}
546
547/// struct for typed errors of method [`propertymappings_provider_scope_retrieve`]
548#[derive(Debug, Clone, Serialize, Deserialize)]
549#[serde(untagged)]
550pub enum PropertymappingsProviderScopeRetrieveError {
551    Status400(models::ValidationError),
552    Status403(models::GenericError),
553    UnknownValue(serde_json::Value),
554}
555
556/// struct for typed errors of method [`propertymappings_provider_scope_update`]
557#[derive(Debug, Clone, Serialize, Deserialize)]
558#[serde(untagged)]
559pub enum PropertymappingsProviderScopeUpdateError {
560    Status400(models::ValidationError),
561    Status403(models::GenericError),
562    UnknownValue(serde_json::Value),
563}
564
565/// struct for typed errors of method [`propertymappings_provider_scope_used_by_list`]
566#[derive(Debug, Clone, Serialize, Deserialize)]
567#[serde(untagged)]
568pub enum PropertymappingsProviderScopeUsedByListError {
569    Status400(models::ValidationError),
570    Status403(models::GenericError),
571    UnknownValue(serde_json::Value),
572}
573
574/// struct for typed errors of method [`propertymappings_source_kerberos_create`]
575#[derive(Debug, Clone, Serialize, Deserialize)]
576#[serde(untagged)]
577pub enum PropertymappingsSourceKerberosCreateError {
578    Status400(models::ValidationError),
579    Status403(models::GenericError),
580    UnknownValue(serde_json::Value),
581}
582
583/// struct for typed errors of method [`propertymappings_source_kerberos_destroy`]
584#[derive(Debug, Clone, Serialize, Deserialize)]
585#[serde(untagged)]
586pub enum PropertymappingsSourceKerberosDestroyError {
587    Status400(models::ValidationError),
588    Status403(models::GenericError),
589    UnknownValue(serde_json::Value),
590}
591
592/// struct for typed errors of method [`propertymappings_source_kerberos_list`]
593#[derive(Debug, Clone, Serialize, Deserialize)]
594#[serde(untagged)]
595pub enum PropertymappingsSourceKerberosListError {
596    Status400(models::ValidationError),
597    Status403(models::GenericError),
598    UnknownValue(serde_json::Value),
599}
600
601/// struct for typed errors of method [`propertymappings_source_kerberos_partial_update`]
602#[derive(Debug, Clone, Serialize, Deserialize)]
603#[serde(untagged)]
604pub enum PropertymappingsSourceKerberosPartialUpdateError {
605    Status400(models::ValidationError),
606    Status403(models::GenericError),
607    UnknownValue(serde_json::Value),
608}
609
610/// struct for typed errors of method [`propertymappings_source_kerberos_retrieve`]
611#[derive(Debug, Clone, Serialize, Deserialize)]
612#[serde(untagged)]
613pub enum PropertymappingsSourceKerberosRetrieveError {
614    Status400(models::ValidationError),
615    Status403(models::GenericError),
616    UnknownValue(serde_json::Value),
617}
618
619/// struct for typed errors of method [`propertymappings_source_kerberos_update`]
620#[derive(Debug, Clone, Serialize, Deserialize)]
621#[serde(untagged)]
622pub enum PropertymappingsSourceKerberosUpdateError {
623    Status400(models::ValidationError),
624    Status403(models::GenericError),
625    UnknownValue(serde_json::Value),
626}
627
628/// struct for typed errors of method [`propertymappings_source_kerberos_used_by_list`]
629#[derive(Debug, Clone, Serialize, Deserialize)]
630#[serde(untagged)]
631pub enum PropertymappingsSourceKerberosUsedByListError {
632    Status400(models::ValidationError),
633    Status403(models::GenericError),
634    UnknownValue(serde_json::Value),
635}
636
637/// struct for typed errors of method [`propertymappings_source_ldap_create`]
638#[derive(Debug, Clone, Serialize, Deserialize)]
639#[serde(untagged)]
640pub enum PropertymappingsSourceLdapCreateError {
641    Status400(models::ValidationError),
642    Status403(models::GenericError),
643    UnknownValue(serde_json::Value),
644}
645
646/// struct for typed errors of method [`propertymappings_source_ldap_destroy`]
647#[derive(Debug, Clone, Serialize, Deserialize)]
648#[serde(untagged)]
649pub enum PropertymappingsSourceLdapDestroyError {
650    Status400(models::ValidationError),
651    Status403(models::GenericError),
652    UnknownValue(serde_json::Value),
653}
654
655/// struct for typed errors of method [`propertymappings_source_ldap_list`]
656#[derive(Debug, Clone, Serialize, Deserialize)]
657#[serde(untagged)]
658pub enum PropertymappingsSourceLdapListError {
659    Status400(models::ValidationError),
660    Status403(models::GenericError),
661    UnknownValue(serde_json::Value),
662}
663
664/// struct for typed errors of method [`propertymappings_source_ldap_partial_update`]
665#[derive(Debug, Clone, Serialize, Deserialize)]
666#[serde(untagged)]
667pub enum PropertymappingsSourceLdapPartialUpdateError {
668    Status400(models::ValidationError),
669    Status403(models::GenericError),
670    UnknownValue(serde_json::Value),
671}
672
673/// struct for typed errors of method [`propertymappings_source_ldap_retrieve`]
674#[derive(Debug, Clone, Serialize, Deserialize)]
675#[serde(untagged)]
676pub enum PropertymappingsSourceLdapRetrieveError {
677    Status400(models::ValidationError),
678    Status403(models::GenericError),
679    UnknownValue(serde_json::Value),
680}
681
682/// struct for typed errors of method [`propertymappings_source_ldap_update`]
683#[derive(Debug, Clone, Serialize, Deserialize)]
684#[serde(untagged)]
685pub enum PropertymappingsSourceLdapUpdateError {
686    Status400(models::ValidationError),
687    Status403(models::GenericError),
688    UnknownValue(serde_json::Value),
689}
690
691/// struct for typed errors of method [`propertymappings_source_ldap_used_by_list`]
692#[derive(Debug, Clone, Serialize, Deserialize)]
693#[serde(untagged)]
694pub enum PropertymappingsSourceLdapUsedByListError {
695    Status400(models::ValidationError),
696    Status403(models::GenericError),
697    UnknownValue(serde_json::Value),
698}
699
700/// struct for typed errors of method [`propertymappings_source_oauth_create`]
701#[derive(Debug, Clone, Serialize, Deserialize)]
702#[serde(untagged)]
703pub enum PropertymappingsSourceOauthCreateError {
704    Status400(models::ValidationError),
705    Status403(models::GenericError),
706    UnknownValue(serde_json::Value),
707}
708
709/// struct for typed errors of method [`propertymappings_source_oauth_destroy`]
710#[derive(Debug, Clone, Serialize, Deserialize)]
711#[serde(untagged)]
712pub enum PropertymappingsSourceOauthDestroyError {
713    Status400(models::ValidationError),
714    Status403(models::GenericError),
715    UnknownValue(serde_json::Value),
716}
717
718/// struct for typed errors of method [`propertymappings_source_oauth_list`]
719#[derive(Debug, Clone, Serialize, Deserialize)]
720#[serde(untagged)]
721pub enum PropertymappingsSourceOauthListError {
722    Status400(models::ValidationError),
723    Status403(models::GenericError),
724    UnknownValue(serde_json::Value),
725}
726
727/// struct for typed errors of method [`propertymappings_source_oauth_partial_update`]
728#[derive(Debug, Clone, Serialize, Deserialize)]
729#[serde(untagged)]
730pub enum PropertymappingsSourceOauthPartialUpdateError {
731    Status400(models::ValidationError),
732    Status403(models::GenericError),
733    UnknownValue(serde_json::Value),
734}
735
736/// struct for typed errors of method [`propertymappings_source_oauth_retrieve`]
737#[derive(Debug, Clone, Serialize, Deserialize)]
738#[serde(untagged)]
739pub enum PropertymappingsSourceOauthRetrieveError {
740    Status400(models::ValidationError),
741    Status403(models::GenericError),
742    UnknownValue(serde_json::Value),
743}
744
745/// struct for typed errors of method [`propertymappings_source_oauth_update`]
746#[derive(Debug, Clone, Serialize, Deserialize)]
747#[serde(untagged)]
748pub enum PropertymappingsSourceOauthUpdateError {
749    Status400(models::ValidationError),
750    Status403(models::GenericError),
751    UnknownValue(serde_json::Value),
752}
753
754/// struct for typed errors of method [`propertymappings_source_oauth_used_by_list`]
755#[derive(Debug, Clone, Serialize, Deserialize)]
756#[serde(untagged)]
757pub enum PropertymappingsSourceOauthUsedByListError {
758    Status400(models::ValidationError),
759    Status403(models::GenericError),
760    UnknownValue(serde_json::Value),
761}
762
763/// struct for typed errors of method [`propertymappings_source_plex_create`]
764#[derive(Debug, Clone, Serialize, Deserialize)]
765#[serde(untagged)]
766pub enum PropertymappingsSourcePlexCreateError {
767    Status400(models::ValidationError),
768    Status403(models::GenericError),
769    UnknownValue(serde_json::Value),
770}
771
772/// struct for typed errors of method [`propertymappings_source_plex_destroy`]
773#[derive(Debug, Clone, Serialize, Deserialize)]
774#[serde(untagged)]
775pub enum PropertymappingsSourcePlexDestroyError {
776    Status400(models::ValidationError),
777    Status403(models::GenericError),
778    UnknownValue(serde_json::Value),
779}
780
781/// struct for typed errors of method [`propertymappings_source_plex_list`]
782#[derive(Debug, Clone, Serialize, Deserialize)]
783#[serde(untagged)]
784pub enum PropertymappingsSourcePlexListError {
785    Status400(models::ValidationError),
786    Status403(models::GenericError),
787    UnknownValue(serde_json::Value),
788}
789
790/// struct for typed errors of method [`propertymappings_source_plex_partial_update`]
791#[derive(Debug, Clone, Serialize, Deserialize)]
792#[serde(untagged)]
793pub enum PropertymappingsSourcePlexPartialUpdateError {
794    Status400(models::ValidationError),
795    Status403(models::GenericError),
796    UnknownValue(serde_json::Value),
797}
798
799/// struct for typed errors of method [`propertymappings_source_plex_retrieve`]
800#[derive(Debug, Clone, Serialize, Deserialize)]
801#[serde(untagged)]
802pub enum PropertymappingsSourcePlexRetrieveError {
803    Status400(models::ValidationError),
804    Status403(models::GenericError),
805    UnknownValue(serde_json::Value),
806}
807
808/// struct for typed errors of method [`propertymappings_source_plex_update`]
809#[derive(Debug, Clone, Serialize, Deserialize)]
810#[serde(untagged)]
811pub enum PropertymappingsSourcePlexUpdateError {
812    Status400(models::ValidationError),
813    Status403(models::GenericError),
814    UnknownValue(serde_json::Value),
815}
816
817/// struct for typed errors of method [`propertymappings_source_plex_used_by_list`]
818#[derive(Debug, Clone, Serialize, Deserialize)]
819#[serde(untagged)]
820pub enum PropertymappingsSourcePlexUsedByListError {
821    Status400(models::ValidationError),
822    Status403(models::GenericError),
823    UnknownValue(serde_json::Value),
824}
825
826/// struct for typed errors of method [`propertymappings_source_saml_create`]
827#[derive(Debug, Clone, Serialize, Deserialize)]
828#[serde(untagged)]
829pub enum PropertymappingsSourceSamlCreateError {
830    Status400(models::ValidationError),
831    Status403(models::GenericError),
832    UnknownValue(serde_json::Value),
833}
834
835/// struct for typed errors of method [`propertymappings_source_saml_destroy`]
836#[derive(Debug, Clone, Serialize, Deserialize)]
837#[serde(untagged)]
838pub enum PropertymappingsSourceSamlDestroyError {
839    Status400(models::ValidationError),
840    Status403(models::GenericError),
841    UnknownValue(serde_json::Value),
842}
843
844/// struct for typed errors of method [`propertymappings_source_saml_list`]
845#[derive(Debug, Clone, Serialize, Deserialize)]
846#[serde(untagged)]
847pub enum PropertymappingsSourceSamlListError {
848    Status400(models::ValidationError),
849    Status403(models::GenericError),
850    UnknownValue(serde_json::Value),
851}
852
853/// struct for typed errors of method [`propertymappings_source_saml_partial_update`]
854#[derive(Debug, Clone, Serialize, Deserialize)]
855#[serde(untagged)]
856pub enum PropertymappingsSourceSamlPartialUpdateError {
857    Status400(models::ValidationError),
858    Status403(models::GenericError),
859    UnknownValue(serde_json::Value),
860}
861
862/// struct for typed errors of method [`propertymappings_source_saml_retrieve`]
863#[derive(Debug, Clone, Serialize, Deserialize)]
864#[serde(untagged)]
865pub enum PropertymappingsSourceSamlRetrieveError {
866    Status400(models::ValidationError),
867    Status403(models::GenericError),
868    UnknownValue(serde_json::Value),
869}
870
871/// struct for typed errors of method [`propertymappings_source_saml_update`]
872#[derive(Debug, Clone, Serialize, Deserialize)]
873#[serde(untagged)]
874pub enum PropertymappingsSourceSamlUpdateError {
875    Status400(models::ValidationError),
876    Status403(models::GenericError),
877    UnknownValue(serde_json::Value),
878}
879
880/// struct for typed errors of method [`propertymappings_source_saml_used_by_list`]
881#[derive(Debug, Clone, Serialize, Deserialize)]
882#[serde(untagged)]
883pub enum PropertymappingsSourceSamlUsedByListError {
884    Status400(models::ValidationError),
885    Status403(models::GenericError),
886    UnknownValue(serde_json::Value),
887}
888
889/// struct for typed errors of method [`propertymappings_source_scim_create`]
890#[derive(Debug, Clone, Serialize, Deserialize)]
891#[serde(untagged)]
892pub enum PropertymappingsSourceScimCreateError {
893    Status400(models::ValidationError),
894    Status403(models::GenericError),
895    UnknownValue(serde_json::Value),
896}
897
898/// struct for typed errors of method [`propertymappings_source_scim_destroy`]
899#[derive(Debug, Clone, Serialize, Deserialize)]
900#[serde(untagged)]
901pub enum PropertymappingsSourceScimDestroyError {
902    Status400(models::ValidationError),
903    Status403(models::GenericError),
904    UnknownValue(serde_json::Value),
905}
906
907/// struct for typed errors of method [`propertymappings_source_scim_list`]
908#[derive(Debug, Clone, Serialize, Deserialize)]
909#[serde(untagged)]
910pub enum PropertymappingsSourceScimListError {
911    Status400(models::ValidationError),
912    Status403(models::GenericError),
913    UnknownValue(serde_json::Value),
914}
915
916/// struct for typed errors of method [`propertymappings_source_scim_partial_update`]
917#[derive(Debug, Clone, Serialize, Deserialize)]
918#[serde(untagged)]
919pub enum PropertymappingsSourceScimPartialUpdateError {
920    Status400(models::ValidationError),
921    Status403(models::GenericError),
922    UnknownValue(serde_json::Value),
923}
924
925/// struct for typed errors of method [`propertymappings_source_scim_retrieve`]
926#[derive(Debug, Clone, Serialize, Deserialize)]
927#[serde(untagged)]
928pub enum PropertymappingsSourceScimRetrieveError {
929    Status400(models::ValidationError),
930    Status403(models::GenericError),
931    UnknownValue(serde_json::Value),
932}
933
934/// struct for typed errors of method [`propertymappings_source_scim_update`]
935#[derive(Debug, Clone, Serialize, Deserialize)]
936#[serde(untagged)]
937pub enum PropertymappingsSourceScimUpdateError {
938    Status400(models::ValidationError),
939    Status403(models::GenericError),
940    UnknownValue(serde_json::Value),
941}
942
943/// struct for typed errors of method [`propertymappings_source_scim_used_by_list`]
944#[derive(Debug, Clone, Serialize, Deserialize)]
945#[serde(untagged)]
946pub enum PropertymappingsSourceScimUsedByListError {
947    Status400(models::ValidationError),
948    Status403(models::GenericError),
949    UnknownValue(serde_json::Value),
950}
951
952/// PropertyMapping Viewset
953pub async fn propertymappings_all_destroy(
954    configuration: &configuration::Configuration,
955    pm_uuid: &str,
956) -> Result<(), Error<PropertymappingsAllDestroyError>> {
957    // add a prefix to parameters to efficiently prevent name collisions
958    let p_path_pm_uuid = pm_uuid;
959
960    let uri_str = format!(
961        "{}/propertymappings/all/{pm_uuid}/",
962        configuration.base_path,
963        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
964    );
965    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
966
967    if let Some(ref user_agent) = configuration.user_agent {
968        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
969    }
970    if let Some(ref token) = configuration.bearer_access_token {
971        req_builder = req_builder.bearer_auth(token.to_owned());
972    };
973
974    let req = req_builder.build()?;
975    let resp = configuration.client.execute(req).await?;
976
977    let status = resp.status();
978
979    if !status.is_client_error() && !status.is_server_error() {
980        Ok(())
981    } else {
982        let content = resp.text().await?;
983        let entity: Option<PropertymappingsAllDestroyError> = serde_json::from_str(&content).ok();
984        Err(Error::ResponseError(ResponseContent {
985            status,
986            content,
987            entity,
988        }))
989    }
990}
991
992/// PropertyMapping Viewset
993pub async fn propertymappings_all_list(
994    configuration: &configuration::Configuration,
995    managed: Option<Vec<String>>,
996    managed__isnull: Option<bool>,
997    name: Option<&str>,
998    ordering: Option<&str>,
999    page: Option<i32>,
1000    page_size: Option<i32>,
1001    search: Option<&str>,
1002) -> Result<models::PaginatedPropertyMappingList, Error<PropertymappingsAllListError>> {
1003    // add a prefix to parameters to efficiently prevent name collisions
1004    let p_query_managed = managed;
1005    let p_query_managed__isnull = managed__isnull;
1006    let p_query_name = name;
1007    let p_query_ordering = ordering;
1008    let p_query_page = page;
1009    let p_query_page_size = page_size;
1010    let p_query_search = search;
1011
1012    let uri_str = format!("{}/propertymappings/all/", configuration.base_path);
1013    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1014
1015    if let Some(ref param_value) = p_query_managed {
1016        req_builder = match "multi" {
1017            "multi" => req_builder.query(
1018                &param_value
1019                    .into_iter()
1020                    .map(|p| ("managed".to_owned(), p.to_string()))
1021                    .collect::<Vec<(std::string::String, std::string::String)>>(),
1022            ),
1023            _ => req_builder.query(&[(
1024                "managed",
1025                &param_value
1026                    .into_iter()
1027                    .map(|p| p.to_string())
1028                    .collect::<Vec<String>>()
1029                    .join(",")
1030                    .to_string(),
1031            )]),
1032        };
1033    }
1034    if let Some(ref param_value) = p_query_managed__isnull {
1035        req_builder = req_builder.query(&[("managed__isnull", &param_value.to_string())]);
1036    }
1037    if let Some(ref param_value) = p_query_name {
1038        req_builder = req_builder.query(&[("name", &param_value.to_string())]);
1039    }
1040    if let Some(ref param_value) = p_query_ordering {
1041        req_builder = req_builder.query(&[("ordering", &param_value.to_string())]);
1042    }
1043    if let Some(ref param_value) = p_query_page {
1044        req_builder = req_builder.query(&[("page", &param_value.to_string())]);
1045    }
1046    if let Some(ref param_value) = p_query_page_size {
1047        req_builder = req_builder.query(&[("page_size", &param_value.to_string())]);
1048    }
1049    if let Some(ref param_value) = p_query_search {
1050        req_builder = req_builder.query(&[("search", &param_value.to_string())]);
1051    }
1052    if let Some(ref user_agent) = configuration.user_agent {
1053        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1054    }
1055    if let Some(ref token) = configuration.bearer_access_token {
1056        req_builder = req_builder.bearer_auth(token.to_owned());
1057    };
1058
1059    let req = req_builder.build()?;
1060    let resp = configuration.client.execute(req).await?;
1061
1062    let status = resp.status();
1063    let content_type = resp
1064        .headers()
1065        .get("content-type")
1066        .and_then(|v| v.to_str().ok())
1067        .unwrap_or("application/octet-stream");
1068    let content_type = super::ContentType::from(content_type);
1069
1070    if !status.is_client_error() && !status.is_server_error() {
1071        let content = resp.text().await?;
1072        match content_type {
1073            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1074            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaginatedPropertyMappingList`"))),
1075            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaginatedPropertyMappingList`")))),
1076        }
1077    } else {
1078        let content = resp.text().await?;
1079        let entity: Option<PropertymappingsAllListError> = serde_json::from_str(&content).ok();
1080        Err(Error::ResponseError(ResponseContent {
1081            status,
1082            content,
1083            entity,
1084        }))
1085    }
1086}
1087
1088/// PropertyMapping Viewset
1089pub async fn propertymappings_all_retrieve(
1090    configuration: &configuration::Configuration,
1091    pm_uuid: &str,
1092) -> Result<models::PropertyMapping, Error<PropertymappingsAllRetrieveError>> {
1093    // add a prefix to parameters to efficiently prevent name collisions
1094    let p_path_pm_uuid = pm_uuid;
1095
1096    let uri_str = format!(
1097        "{}/propertymappings/all/{pm_uuid}/",
1098        configuration.base_path,
1099        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
1100    );
1101    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1102
1103    if let Some(ref user_agent) = configuration.user_agent {
1104        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1105    }
1106    if let Some(ref token) = configuration.bearer_access_token {
1107        req_builder = req_builder.bearer_auth(token.to_owned());
1108    };
1109
1110    let req = req_builder.build()?;
1111    let resp = configuration.client.execute(req).await?;
1112
1113    let status = resp.status();
1114    let content_type = resp
1115        .headers()
1116        .get("content-type")
1117        .and_then(|v| v.to_str().ok())
1118        .unwrap_or("application/octet-stream");
1119    let content_type = super::ContentType::from(content_type);
1120
1121    if !status.is_client_error() && !status.is_server_error() {
1122        let content = resp.text().await?;
1123        match content_type {
1124            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1125            ContentType::Text => {
1126                return Err(Error::from(serde_json::Error::custom(
1127                    "Received `text/plain` content type response that cannot be converted to `models::PropertyMapping`",
1128                )))
1129            }
1130            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!(
1131                "Received `{unknown_type}` content type response that cannot be converted to `models::PropertyMapping`"
1132            )))),
1133        }
1134    } else {
1135        let content = resp.text().await?;
1136        let entity: Option<PropertymappingsAllRetrieveError> = serde_json::from_str(&content).ok();
1137        Err(Error::ResponseError(ResponseContent {
1138            status,
1139            content,
1140            entity,
1141        }))
1142    }
1143}
1144
1145/// Test Property Mapping
1146pub async fn propertymappings_all_test_create(
1147    configuration: &configuration::Configuration,
1148    pm_uuid: &str,
1149    format_result: Option<bool>,
1150    property_mapping_test_request: Option<models::PropertyMappingTestRequest>,
1151) -> Result<models::PropertyMappingTestResult, Error<PropertymappingsAllTestCreateError>> {
1152    // add a prefix to parameters to efficiently prevent name collisions
1153    let p_path_pm_uuid = pm_uuid;
1154    let p_query_format_result = format_result;
1155    let p_body_property_mapping_test_request = property_mapping_test_request;
1156
1157    let uri_str = format!(
1158        "{}/propertymappings/all/{pm_uuid}/test/",
1159        configuration.base_path,
1160        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
1161    );
1162    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
1163
1164    if let Some(ref param_value) = p_query_format_result {
1165        req_builder = req_builder.query(&[("format_result", &param_value.to_string())]);
1166    }
1167    if let Some(ref user_agent) = configuration.user_agent {
1168        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1169    }
1170    if let Some(ref token) = configuration.bearer_access_token {
1171        req_builder = req_builder.bearer_auth(token.to_owned());
1172    };
1173    req_builder = req_builder.json(&p_body_property_mapping_test_request);
1174
1175    let req = req_builder.build()?;
1176    let resp = configuration.client.execute(req).await?;
1177
1178    let status = resp.status();
1179    let content_type = resp
1180        .headers()
1181        .get("content-type")
1182        .and_then(|v| v.to_str().ok())
1183        .unwrap_or("application/octet-stream");
1184    let content_type = super::ContentType::from(content_type);
1185
1186    if !status.is_client_error() && !status.is_server_error() {
1187        let content = resp.text().await?;
1188        match content_type {
1189            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1190            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PropertyMappingTestResult`"))),
1191            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PropertyMappingTestResult`")))),
1192        }
1193    } else {
1194        let content = resp.text().await?;
1195        let entity: Option<PropertymappingsAllTestCreateError> = serde_json::from_str(&content).ok();
1196        Err(Error::ResponseError(ResponseContent {
1197            status,
1198            content,
1199            entity,
1200        }))
1201    }
1202}
1203
1204/// Get all creatable types
1205pub async fn propertymappings_all_types_list(
1206    configuration: &configuration::Configuration,
1207) -> Result<Vec<models::TypeCreate>, Error<PropertymappingsAllTypesListError>> {
1208    let uri_str = format!("{}/propertymappings/all/types/", configuration.base_path);
1209    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1210
1211    if let Some(ref user_agent) = configuration.user_agent {
1212        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1213    }
1214    if let Some(ref token) = configuration.bearer_access_token {
1215        req_builder = req_builder.bearer_auth(token.to_owned());
1216    };
1217
1218    let req = req_builder.build()?;
1219    let resp = configuration.client.execute(req).await?;
1220
1221    let status = resp.status();
1222    let content_type = resp
1223        .headers()
1224        .get("content-type")
1225        .and_then(|v| v.to_str().ok())
1226        .unwrap_or("application/octet-stream");
1227    let content_type = super::ContentType::from(content_type);
1228
1229    if !status.is_client_error() && !status.is_server_error() {
1230        let content = resp.text().await?;
1231        match content_type {
1232            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1233            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::TypeCreate&gt;`"))),
1234            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::TypeCreate&gt;`")))),
1235        }
1236    } else {
1237        let content = resp.text().await?;
1238        let entity: Option<PropertymappingsAllTypesListError> = serde_json::from_str(&content).ok();
1239        Err(Error::ResponseError(ResponseContent {
1240            status,
1241            content,
1242            entity,
1243        }))
1244    }
1245}
1246
1247/// Get a list of all objects that use this object
1248pub async fn propertymappings_all_used_by_list(
1249    configuration: &configuration::Configuration,
1250    pm_uuid: &str,
1251) -> Result<Vec<models::UsedBy>, Error<PropertymappingsAllUsedByListError>> {
1252    // add a prefix to parameters to efficiently prevent name collisions
1253    let p_path_pm_uuid = pm_uuid;
1254
1255    let uri_str = format!(
1256        "{}/propertymappings/all/{pm_uuid}/used_by/",
1257        configuration.base_path,
1258        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
1259    );
1260    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1261
1262    if let Some(ref user_agent) = configuration.user_agent {
1263        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1264    }
1265    if let Some(ref token) = configuration.bearer_access_token {
1266        req_builder = req_builder.bearer_auth(token.to_owned());
1267    };
1268
1269    let req = req_builder.build()?;
1270    let resp = configuration.client.execute(req).await?;
1271
1272    let status = resp.status();
1273    let content_type = resp
1274        .headers()
1275        .get("content-type")
1276        .and_then(|v| v.to_str().ok())
1277        .unwrap_or("application/octet-stream");
1278    let content_type = super::ContentType::from(content_type);
1279
1280    if !status.is_client_error() && !status.is_server_error() {
1281        let content = resp.text().await?;
1282        match content_type {
1283            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1284            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`"))),
1285            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`")))),
1286        }
1287    } else {
1288        let content = resp.text().await?;
1289        let entity: Option<PropertymappingsAllUsedByListError> = serde_json::from_str(&content).ok();
1290        Err(Error::ResponseError(ResponseContent {
1291            status,
1292            content,
1293            entity,
1294        }))
1295    }
1296}
1297
1298/// NotificationWebhookMapping Viewset
1299pub async fn propertymappings_notification_create(
1300    configuration: &configuration::Configuration,
1301    notification_webhook_mapping_request: models::NotificationWebhookMappingRequest,
1302) -> Result<models::NotificationWebhookMapping, Error<PropertymappingsNotificationCreateError>> {
1303    // add a prefix to parameters to efficiently prevent name collisions
1304    let p_body_notification_webhook_mapping_request = notification_webhook_mapping_request;
1305
1306    let uri_str = format!("{}/propertymappings/notification/", configuration.base_path);
1307    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
1308
1309    if let Some(ref user_agent) = configuration.user_agent {
1310        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1311    }
1312    if let Some(ref token) = configuration.bearer_access_token {
1313        req_builder = req_builder.bearer_auth(token.to_owned());
1314    };
1315    req_builder = req_builder.json(&p_body_notification_webhook_mapping_request);
1316
1317    let req = req_builder.build()?;
1318    let resp = configuration.client.execute(req).await?;
1319
1320    let status = resp.status();
1321    let content_type = resp
1322        .headers()
1323        .get("content-type")
1324        .and_then(|v| v.to_str().ok())
1325        .unwrap_or("application/octet-stream");
1326    let content_type = super::ContentType::from(content_type);
1327
1328    if !status.is_client_error() && !status.is_server_error() {
1329        let content = resp.text().await?;
1330        match content_type {
1331            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1332            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NotificationWebhookMapping`"))),
1333            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NotificationWebhookMapping`")))),
1334        }
1335    } else {
1336        let content = resp.text().await?;
1337        let entity: Option<PropertymappingsNotificationCreateError> = serde_json::from_str(&content).ok();
1338        Err(Error::ResponseError(ResponseContent {
1339            status,
1340            content,
1341            entity,
1342        }))
1343    }
1344}
1345
1346/// NotificationWebhookMapping Viewset
1347pub async fn propertymappings_notification_destroy(
1348    configuration: &configuration::Configuration,
1349    pm_uuid: &str,
1350) -> Result<(), Error<PropertymappingsNotificationDestroyError>> {
1351    // add a prefix to parameters to efficiently prevent name collisions
1352    let p_path_pm_uuid = pm_uuid;
1353
1354    let uri_str = format!(
1355        "{}/propertymappings/notification/{pm_uuid}/",
1356        configuration.base_path,
1357        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
1358    );
1359    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1360
1361    if let Some(ref user_agent) = configuration.user_agent {
1362        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1363    }
1364    if let Some(ref token) = configuration.bearer_access_token {
1365        req_builder = req_builder.bearer_auth(token.to_owned());
1366    };
1367
1368    let req = req_builder.build()?;
1369    let resp = configuration.client.execute(req).await?;
1370
1371    let status = resp.status();
1372
1373    if !status.is_client_error() && !status.is_server_error() {
1374        Ok(())
1375    } else {
1376        let content = resp.text().await?;
1377        let entity: Option<PropertymappingsNotificationDestroyError> = serde_json::from_str(&content).ok();
1378        Err(Error::ResponseError(ResponseContent {
1379            status,
1380            content,
1381            entity,
1382        }))
1383    }
1384}
1385
1386/// NotificationWebhookMapping Viewset
1387pub async fn propertymappings_notification_list(
1388    configuration: &configuration::Configuration,
1389    name: Option<&str>,
1390    ordering: Option<&str>,
1391    page: Option<i32>,
1392    page_size: Option<i32>,
1393    search: Option<&str>,
1394) -> Result<models::PaginatedNotificationWebhookMappingList, Error<PropertymappingsNotificationListError>> {
1395    // add a prefix to parameters to efficiently prevent name collisions
1396    let p_query_name = name;
1397    let p_query_ordering = ordering;
1398    let p_query_page = page;
1399    let p_query_page_size = page_size;
1400    let p_query_search = search;
1401
1402    let uri_str = format!("{}/propertymappings/notification/", configuration.base_path);
1403    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1404
1405    if let Some(ref param_value) = p_query_name {
1406        req_builder = req_builder.query(&[("name", &param_value.to_string())]);
1407    }
1408    if let Some(ref param_value) = p_query_ordering {
1409        req_builder = req_builder.query(&[("ordering", &param_value.to_string())]);
1410    }
1411    if let Some(ref param_value) = p_query_page {
1412        req_builder = req_builder.query(&[("page", &param_value.to_string())]);
1413    }
1414    if let Some(ref param_value) = p_query_page_size {
1415        req_builder = req_builder.query(&[("page_size", &param_value.to_string())]);
1416    }
1417    if let Some(ref param_value) = p_query_search {
1418        req_builder = req_builder.query(&[("search", &param_value.to_string())]);
1419    }
1420    if let Some(ref user_agent) = configuration.user_agent {
1421        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1422    }
1423    if let Some(ref token) = configuration.bearer_access_token {
1424        req_builder = req_builder.bearer_auth(token.to_owned());
1425    };
1426
1427    let req = req_builder.build()?;
1428    let resp = configuration.client.execute(req).await?;
1429
1430    let status = resp.status();
1431    let content_type = resp
1432        .headers()
1433        .get("content-type")
1434        .and_then(|v| v.to_str().ok())
1435        .unwrap_or("application/octet-stream");
1436    let content_type = super::ContentType::from(content_type);
1437
1438    if !status.is_client_error() && !status.is_server_error() {
1439        let content = resp.text().await?;
1440        match content_type {
1441            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1442            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaginatedNotificationWebhookMappingList`"))),
1443            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaginatedNotificationWebhookMappingList`")))),
1444        }
1445    } else {
1446        let content = resp.text().await?;
1447        let entity: Option<PropertymappingsNotificationListError> = serde_json::from_str(&content).ok();
1448        Err(Error::ResponseError(ResponseContent {
1449            status,
1450            content,
1451            entity,
1452        }))
1453    }
1454}
1455
1456/// NotificationWebhookMapping Viewset
1457pub async fn propertymappings_notification_partial_update(
1458    configuration: &configuration::Configuration,
1459    pm_uuid: &str,
1460    patched_notification_webhook_mapping_request: Option<models::PatchedNotificationWebhookMappingRequest>,
1461) -> Result<models::NotificationWebhookMapping, Error<PropertymappingsNotificationPartialUpdateError>> {
1462    // add a prefix to parameters to efficiently prevent name collisions
1463    let p_path_pm_uuid = pm_uuid;
1464    let p_body_patched_notification_webhook_mapping_request = patched_notification_webhook_mapping_request;
1465
1466    let uri_str = format!(
1467        "{}/propertymappings/notification/{pm_uuid}/",
1468        configuration.base_path,
1469        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
1470    );
1471    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
1472
1473    if let Some(ref user_agent) = configuration.user_agent {
1474        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1475    }
1476    if let Some(ref token) = configuration.bearer_access_token {
1477        req_builder = req_builder.bearer_auth(token.to_owned());
1478    };
1479    req_builder = req_builder.json(&p_body_patched_notification_webhook_mapping_request);
1480
1481    let req = req_builder.build()?;
1482    let resp = configuration.client.execute(req).await?;
1483
1484    let status = resp.status();
1485    let content_type = resp
1486        .headers()
1487        .get("content-type")
1488        .and_then(|v| v.to_str().ok())
1489        .unwrap_or("application/octet-stream");
1490    let content_type = super::ContentType::from(content_type);
1491
1492    if !status.is_client_error() && !status.is_server_error() {
1493        let content = resp.text().await?;
1494        match content_type {
1495            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1496            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NotificationWebhookMapping`"))),
1497            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NotificationWebhookMapping`")))),
1498        }
1499    } else {
1500        let content = resp.text().await?;
1501        let entity: Option<PropertymappingsNotificationPartialUpdateError> = serde_json::from_str(&content).ok();
1502        Err(Error::ResponseError(ResponseContent {
1503            status,
1504            content,
1505            entity,
1506        }))
1507    }
1508}
1509
1510/// NotificationWebhookMapping Viewset
1511pub async fn propertymappings_notification_retrieve(
1512    configuration: &configuration::Configuration,
1513    pm_uuid: &str,
1514) -> Result<models::NotificationWebhookMapping, Error<PropertymappingsNotificationRetrieveError>> {
1515    // add a prefix to parameters to efficiently prevent name collisions
1516    let p_path_pm_uuid = pm_uuid;
1517
1518    let uri_str = format!(
1519        "{}/propertymappings/notification/{pm_uuid}/",
1520        configuration.base_path,
1521        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
1522    );
1523    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1524
1525    if let Some(ref user_agent) = configuration.user_agent {
1526        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1527    }
1528    if let Some(ref token) = configuration.bearer_access_token {
1529        req_builder = req_builder.bearer_auth(token.to_owned());
1530    };
1531
1532    let req = req_builder.build()?;
1533    let resp = configuration.client.execute(req).await?;
1534
1535    let status = resp.status();
1536    let content_type = resp
1537        .headers()
1538        .get("content-type")
1539        .and_then(|v| v.to_str().ok())
1540        .unwrap_or("application/octet-stream");
1541    let content_type = super::ContentType::from(content_type);
1542
1543    if !status.is_client_error() && !status.is_server_error() {
1544        let content = resp.text().await?;
1545        match content_type {
1546            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1547            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NotificationWebhookMapping`"))),
1548            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NotificationWebhookMapping`")))),
1549        }
1550    } else {
1551        let content = resp.text().await?;
1552        let entity: Option<PropertymappingsNotificationRetrieveError> = serde_json::from_str(&content).ok();
1553        Err(Error::ResponseError(ResponseContent {
1554            status,
1555            content,
1556            entity,
1557        }))
1558    }
1559}
1560
1561/// NotificationWebhookMapping Viewset
1562pub async fn propertymappings_notification_update(
1563    configuration: &configuration::Configuration,
1564    pm_uuid: &str,
1565    notification_webhook_mapping_request: models::NotificationWebhookMappingRequest,
1566) -> Result<models::NotificationWebhookMapping, Error<PropertymappingsNotificationUpdateError>> {
1567    // add a prefix to parameters to efficiently prevent name collisions
1568    let p_path_pm_uuid = pm_uuid;
1569    let p_body_notification_webhook_mapping_request = notification_webhook_mapping_request;
1570
1571    let uri_str = format!(
1572        "{}/propertymappings/notification/{pm_uuid}/",
1573        configuration.base_path,
1574        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
1575    );
1576    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
1577
1578    if let Some(ref user_agent) = configuration.user_agent {
1579        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1580    }
1581    if let Some(ref token) = configuration.bearer_access_token {
1582        req_builder = req_builder.bearer_auth(token.to_owned());
1583    };
1584    req_builder = req_builder.json(&p_body_notification_webhook_mapping_request);
1585
1586    let req = req_builder.build()?;
1587    let resp = configuration.client.execute(req).await?;
1588
1589    let status = resp.status();
1590    let content_type = resp
1591        .headers()
1592        .get("content-type")
1593        .and_then(|v| v.to_str().ok())
1594        .unwrap_or("application/octet-stream");
1595    let content_type = super::ContentType::from(content_type);
1596
1597    if !status.is_client_error() && !status.is_server_error() {
1598        let content = resp.text().await?;
1599        match content_type {
1600            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1601            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::NotificationWebhookMapping`"))),
1602            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::NotificationWebhookMapping`")))),
1603        }
1604    } else {
1605        let content = resp.text().await?;
1606        let entity: Option<PropertymappingsNotificationUpdateError> = serde_json::from_str(&content).ok();
1607        Err(Error::ResponseError(ResponseContent {
1608            status,
1609            content,
1610            entity,
1611        }))
1612    }
1613}
1614
1615/// Get a list of all objects that use this object
1616pub async fn propertymappings_notification_used_by_list(
1617    configuration: &configuration::Configuration,
1618    pm_uuid: &str,
1619) -> Result<Vec<models::UsedBy>, Error<PropertymappingsNotificationUsedByListError>> {
1620    // add a prefix to parameters to efficiently prevent name collisions
1621    let p_path_pm_uuid = pm_uuid;
1622
1623    let uri_str = format!(
1624        "{}/propertymappings/notification/{pm_uuid}/used_by/",
1625        configuration.base_path,
1626        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
1627    );
1628    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1629
1630    if let Some(ref user_agent) = configuration.user_agent {
1631        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1632    }
1633    if let Some(ref token) = configuration.bearer_access_token {
1634        req_builder = req_builder.bearer_auth(token.to_owned());
1635    };
1636
1637    let req = req_builder.build()?;
1638    let resp = configuration.client.execute(req).await?;
1639
1640    let status = resp.status();
1641    let content_type = resp
1642        .headers()
1643        .get("content-type")
1644        .and_then(|v| v.to_str().ok())
1645        .unwrap_or("application/octet-stream");
1646    let content_type = super::ContentType::from(content_type);
1647
1648    if !status.is_client_error() && !status.is_server_error() {
1649        let content = resp.text().await?;
1650        match content_type {
1651            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1652            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`"))),
1653            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`")))),
1654        }
1655    } else {
1656        let content = resp.text().await?;
1657        let entity: Option<PropertymappingsNotificationUsedByListError> = serde_json::from_str(&content).ok();
1658        Err(Error::ResponseError(ResponseContent {
1659            status,
1660            content,
1661            entity,
1662        }))
1663    }
1664}
1665
1666/// GoogleWorkspaceProviderMapping Viewset
1667pub async fn propertymappings_provider_google_workspace_create(
1668    configuration: &configuration::Configuration,
1669    google_workspace_provider_mapping_request: models::GoogleWorkspaceProviderMappingRequest,
1670) -> Result<models::GoogleWorkspaceProviderMapping, Error<PropertymappingsProviderGoogleWorkspaceCreateError>> {
1671    // add a prefix to parameters to efficiently prevent name collisions
1672    let p_body_google_workspace_provider_mapping_request = google_workspace_provider_mapping_request;
1673
1674    let uri_str = format!(
1675        "{}/propertymappings/provider/google_workspace/",
1676        configuration.base_path
1677    );
1678    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
1679
1680    if let Some(ref user_agent) = configuration.user_agent {
1681        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1682    }
1683    if let Some(ref token) = configuration.bearer_access_token {
1684        req_builder = req_builder.bearer_auth(token.to_owned());
1685    };
1686    req_builder = req_builder.json(&p_body_google_workspace_provider_mapping_request);
1687
1688    let req = req_builder.build()?;
1689    let resp = configuration.client.execute(req).await?;
1690
1691    let status = resp.status();
1692    let content_type = resp
1693        .headers()
1694        .get("content-type")
1695        .and_then(|v| v.to_str().ok())
1696        .unwrap_or("application/octet-stream");
1697    let content_type = super::ContentType::from(content_type);
1698
1699    if !status.is_client_error() && !status.is_server_error() {
1700        let content = resp.text().await?;
1701        match content_type {
1702            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1703            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GoogleWorkspaceProviderMapping`"))),
1704            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GoogleWorkspaceProviderMapping`")))),
1705        }
1706    } else {
1707        let content = resp.text().await?;
1708        let entity: Option<PropertymappingsProviderGoogleWorkspaceCreateError> = serde_json::from_str(&content).ok();
1709        Err(Error::ResponseError(ResponseContent {
1710            status,
1711            content,
1712            entity,
1713        }))
1714    }
1715}
1716
1717/// GoogleWorkspaceProviderMapping Viewset
1718pub async fn propertymappings_provider_google_workspace_destroy(
1719    configuration: &configuration::Configuration,
1720    pm_uuid: &str,
1721) -> Result<(), Error<PropertymappingsProviderGoogleWorkspaceDestroyError>> {
1722    // add a prefix to parameters to efficiently prevent name collisions
1723    let p_path_pm_uuid = pm_uuid;
1724
1725    let uri_str = format!(
1726        "{}/propertymappings/provider/google_workspace/{pm_uuid}/",
1727        configuration.base_path,
1728        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
1729    );
1730    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1731
1732    if let Some(ref user_agent) = configuration.user_agent {
1733        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1734    }
1735    if let Some(ref token) = configuration.bearer_access_token {
1736        req_builder = req_builder.bearer_auth(token.to_owned());
1737    };
1738
1739    let req = req_builder.build()?;
1740    let resp = configuration.client.execute(req).await?;
1741
1742    let status = resp.status();
1743
1744    if !status.is_client_error() && !status.is_server_error() {
1745        Ok(())
1746    } else {
1747        let content = resp.text().await?;
1748        let entity: Option<PropertymappingsProviderGoogleWorkspaceDestroyError> = serde_json::from_str(&content).ok();
1749        Err(Error::ResponseError(ResponseContent {
1750            status,
1751            content,
1752            entity,
1753        }))
1754    }
1755}
1756
1757/// GoogleWorkspaceProviderMapping Viewset
1758pub async fn propertymappings_provider_google_workspace_list(
1759    configuration: &configuration::Configuration,
1760    expression: Option<&str>,
1761    managed: Option<Vec<String>>,
1762    name: Option<&str>,
1763    ordering: Option<&str>,
1764    page: Option<i32>,
1765    page_size: Option<i32>,
1766    pm_uuid: Option<&str>,
1767    search: Option<&str>,
1768) -> Result<models::PaginatedGoogleWorkspaceProviderMappingList, Error<PropertymappingsProviderGoogleWorkspaceListError>>
1769{
1770    // add a prefix to parameters to efficiently prevent name collisions
1771    let p_query_expression = expression;
1772    let p_query_managed = managed;
1773    let p_query_name = name;
1774    let p_query_ordering = ordering;
1775    let p_query_page = page;
1776    let p_query_page_size = page_size;
1777    let p_query_pm_uuid = pm_uuid;
1778    let p_query_search = search;
1779
1780    let uri_str = format!(
1781        "{}/propertymappings/provider/google_workspace/",
1782        configuration.base_path
1783    );
1784    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1785
1786    if let Some(ref param_value) = p_query_expression {
1787        req_builder = req_builder.query(&[("expression", &param_value.to_string())]);
1788    }
1789    if let Some(ref param_value) = p_query_managed {
1790        req_builder = match "multi" {
1791            "multi" => req_builder.query(
1792                &param_value
1793                    .into_iter()
1794                    .map(|p| ("managed".to_owned(), p.to_string()))
1795                    .collect::<Vec<(std::string::String, std::string::String)>>(),
1796            ),
1797            _ => req_builder.query(&[(
1798                "managed",
1799                &param_value
1800                    .into_iter()
1801                    .map(|p| p.to_string())
1802                    .collect::<Vec<String>>()
1803                    .join(",")
1804                    .to_string(),
1805            )]),
1806        };
1807    }
1808    if let Some(ref param_value) = p_query_name {
1809        req_builder = req_builder.query(&[("name", &param_value.to_string())]);
1810    }
1811    if let Some(ref param_value) = p_query_ordering {
1812        req_builder = req_builder.query(&[("ordering", &param_value.to_string())]);
1813    }
1814    if let Some(ref param_value) = p_query_page {
1815        req_builder = req_builder.query(&[("page", &param_value.to_string())]);
1816    }
1817    if let Some(ref param_value) = p_query_page_size {
1818        req_builder = req_builder.query(&[("page_size", &param_value.to_string())]);
1819    }
1820    if let Some(ref param_value) = p_query_pm_uuid {
1821        req_builder = req_builder.query(&[("pm_uuid", &param_value.to_string())]);
1822    }
1823    if let Some(ref param_value) = p_query_search {
1824        req_builder = req_builder.query(&[("search", &param_value.to_string())]);
1825    }
1826    if let Some(ref user_agent) = configuration.user_agent {
1827        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1828    }
1829    if let Some(ref token) = configuration.bearer_access_token {
1830        req_builder = req_builder.bearer_auth(token.to_owned());
1831    };
1832
1833    let req = req_builder.build()?;
1834    let resp = configuration.client.execute(req).await?;
1835
1836    let status = resp.status();
1837    let content_type = resp
1838        .headers()
1839        .get("content-type")
1840        .and_then(|v| v.to_str().ok())
1841        .unwrap_or("application/octet-stream");
1842    let content_type = super::ContentType::from(content_type);
1843
1844    if !status.is_client_error() && !status.is_server_error() {
1845        let content = resp.text().await?;
1846        match content_type {
1847            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1848            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaginatedGoogleWorkspaceProviderMappingList`"))),
1849            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaginatedGoogleWorkspaceProviderMappingList`")))),
1850        }
1851    } else {
1852        let content = resp.text().await?;
1853        let entity: Option<PropertymappingsProviderGoogleWorkspaceListError> = serde_json::from_str(&content).ok();
1854        Err(Error::ResponseError(ResponseContent {
1855            status,
1856            content,
1857            entity,
1858        }))
1859    }
1860}
1861
1862/// GoogleWorkspaceProviderMapping Viewset
1863pub async fn propertymappings_provider_google_workspace_partial_update(
1864    configuration: &configuration::Configuration,
1865    pm_uuid: &str,
1866    patched_google_workspace_provider_mapping_request: Option<models::PatchedGoogleWorkspaceProviderMappingRequest>,
1867) -> Result<models::GoogleWorkspaceProviderMapping, Error<PropertymappingsProviderGoogleWorkspacePartialUpdateError>> {
1868    // add a prefix to parameters to efficiently prevent name collisions
1869    let p_path_pm_uuid = pm_uuid;
1870    let p_body_patched_google_workspace_provider_mapping_request = patched_google_workspace_provider_mapping_request;
1871
1872    let uri_str = format!(
1873        "{}/propertymappings/provider/google_workspace/{pm_uuid}/",
1874        configuration.base_path,
1875        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
1876    );
1877    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
1878
1879    if let Some(ref user_agent) = configuration.user_agent {
1880        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1881    }
1882    if let Some(ref token) = configuration.bearer_access_token {
1883        req_builder = req_builder.bearer_auth(token.to_owned());
1884    };
1885    req_builder = req_builder.json(&p_body_patched_google_workspace_provider_mapping_request);
1886
1887    let req = req_builder.build()?;
1888    let resp = configuration.client.execute(req).await?;
1889
1890    let status = resp.status();
1891    let content_type = resp
1892        .headers()
1893        .get("content-type")
1894        .and_then(|v| v.to_str().ok())
1895        .unwrap_or("application/octet-stream");
1896    let content_type = super::ContentType::from(content_type);
1897
1898    if !status.is_client_error() && !status.is_server_error() {
1899        let content = resp.text().await?;
1900        match content_type {
1901            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1902            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GoogleWorkspaceProviderMapping`"))),
1903            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GoogleWorkspaceProviderMapping`")))),
1904        }
1905    } else {
1906        let content = resp.text().await?;
1907        let entity: Option<PropertymappingsProviderGoogleWorkspacePartialUpdateError> =
1908            serde_json::from_str(&content).ok();
1909        Err(Error::ResponseError(ResponseContent {
1910            status,
1911            content,
1912            entity,
1913        }))
1914    }
1915}
1916
1917/// GoogleWorkspaceProviderMapping Viewset
1918pub async fn propertymappings_provider_google_workspace_retrieve(
1919    configuration: &configuration::Configuration,
1920    pm_uuid: &str,
1921) -> Result<models::GoogleWorkspaceProviderMapping, Error<PropertymappingsProviderGoogleWorkspaceRetrieveError>> {
1922    // add a prefix to parameters to efficiently prevent name collisions
1923    let p_path_pm_uuid = pm_uuid;
1924
1925    let uri_str = format!(
1926        "{}/propertymappings/provider/google_workspace/{pm_uuid}/",
1927        configuration.base_path,
1928        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
1929    );
1930    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1931
1932    if let Some(ref user_agent) = configuration.user_agent {
1933        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1934    }
1935    if let Some(ref token) = configuration.bearer_access_token {
1936        req_builder = req_builder.bearer_auth(token.to_owned());
1937    };
1938
1939    let req = req_builder.build()?;
1940    let resp = configuration.client.execute(req).await?;
1941
1942    let status = resp.status();
1943    let content_type = resp
1944        .headers()
1945        .get("content-type")
1946        .and_then(|v| v.to_str().ok())
1947        .unwrap_or("application/octet-stream");
1948    let content_type = super::ContentType::from(content_type);
1949
1950    if !status.is_client_error() && !status.is_server_error() {
1951        let content = resp.text().await?;
1952        match content_type {
1953            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1954            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GoogleWorkspaceProviderMapping`"))),
1955            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GoogleWorkspaceProviderMapping`")))),
1956        }
1957    } else {
1958        let content = resp.text().await?;
1959        let entity: Option<PropertymappingsProviderGoogleWorkspaceRetrieveError> = serde_json::from_str(&content).ok();
1960        Err(Error::ResponseError(ResponseContent {
1961            status,
1962            content,
1963            entity,
1964        }))
1965    }
1966}
1967
1968/// GoogleWorkspaceProviderMapping Viewset
1969pub async fn propertymappings_provider_google_workspace_update(
1970    configuration: &configuration::Configuration,
1971    pm_uuid: &str,
1972    google_workspace_provider_mapping_request: models::GoogleWorkspaceProviderMappingRequest,
1973) -> Result<models::GoogleWorkspaceProviderMapping, Error<PropertymappingsProviderGoogleWorkspaceUpdateError>> {
1974    // add a prefix to parameters to efficiently prevent name collisions
1975    let p_path_pm_uuid = pm_uuid;
1976    let p_body_google_workspace_provider_mapping_request = google_workspace_provider_mapping_request;
1977
1978    let uri_str = format!(
1979        "{}/propertymappings/provider/google_workspace/{pm_uuid}/",
1980        configuration.base_path,
1981        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
1982    );
1983    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
1984
1985    if let Some(ref user_agent) = configuration.user_agent {
1986        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1987    }
1988    if let Some(ref token) = configuration.bearer_access_token {
1989        req_builder = req_builder.bearer_auth(token.to_owned());
1990    };
1991    req_builder = req_builder.json(&p_body_google_workspace_provider_mapping_request);
1992
1993    let req = req_builder.build()?;
1994    let resp = configuration.client.execute(req).await?;
1995
1996    let status = resp.status();
1997    let content_type = resp
1998        .headers()
1999        .get("content-type")
2000        .and_then(|v| v.to_str().ok())
2001        .unwrap_or("application/octet-stream");
2002    let content_type = super::ContentType::from(content_type);
2003
2004    if !status.is_client_error() && !status.is_server_error() {
2005        let content = resp.text().await?;
2006        match content_type {
2007            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2008            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GoogleWorkspaceProviderMapping`"))),
2009            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::GoogleWorkspaceProviderMapping`")))),
2010        }
2011    } else {
2012        let content = resp.text().await?;
2013        let entity: Option<PropertymappingsProviderGoogleWorkspaceUpdateError> = serde_json::from_str(&content).ok();
2014        Err(Error::ResponseError(ResponseContent {
2015            status,
2016            content,
2017            entity,
2018        }))
2019    }
2020}
2021
2022/// Get a list of all objects that use this object
2023pub async fn propertymappings_provider_google_workspace_used_by_list(
2024    configuration: &configuration::Configuration,
2025    pm_uuid: &str,
2026) -> Result<Vec<models::UsedBy>, Error<PropertymappingsProviderGoogleWorkspaceUsedByListError>> {
2027    // add a prefix to parameters to efficiently prevent name collisions
2028    let p_path_pm_uuid = pm_uuid;
2029
2030    let uri_str = format!(
2031        "{}/propertymappings/provider/google_workspace/{pm_uuid}/used_by/",
2032        configuration.base_path,
2033        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
2034    );
2035    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2036
2037    if let Some(ref user_agent) = configuration.user_agent {
2038        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2039    }
2040    if let Some(ref token) = configuration.bearer_access_token {
2041        req_builder = req_builder.bearer_auth(token.to_owned());
2042    };
2043
2044    let req = req_builder.build()?;
2045    let resp = configuration.client.execute(req).await?;
2046
2047    let status = resp.status();
2048    let content_type = resp
2049        .headers()
2050        .get("content-type")
2051        .and_then(|v| v.to_str().ok())
2052        .unwrap_or("application/octet-stream");
2053    let content_type = super::ContentType::from(content_type);
2054
2055    if !status.is_client_error() && !status.is_server_error() {
2056        let content = resp.text().await?;
2057        match content_type {
2058            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2059            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`"))),
2060            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`")))),
2061        }
2062    } else {
2063        let content = resp.text().await?;
2064        let entity: Option<PropertymappingsProviderGoogleWorkspaceUsedByListError> =
2065            serde_json::from_str(&content).ok();
2066        Err(Error::ResponseError(ResponseContent {
2067            status,
2068            content,
2069            entity,
2070        }))
2071    }
2072}
2073
2074/// MicrosoftEntraProviderMapping Viewset
2075pub async fn propertymappings_provider_microsoft_entra_create(
2076    configuration: &configuration::Configuration,
2077    microsoft_entra_provider_mapping_request: models::MicrosoftEntraProviderMappingRequest,
2078) -> Result<models::MicrosoftEntraProviderMapping, Error<PropertymappingsProviderMicrosoftEntraCreateError>> {
2079    // add a prefix to parameters to efficiently prevent name collisions
2080    let p_body_microsoft_entra_provider_mapping_request = microsoft_entra_provider_mapping_request;
2081
2082    let uri_str = format!("{}/propertymappings/provider/microsoft_entra/", configuration.base_path);
2083    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
2084
2085    if let Some(ref user_agent) = configuration.user_agent {
2086        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2087    }
2088    if let Some(ref token) = configuration.bearer_access_token {
2089        req_builder = req_builder.bearer_auth(token.to_owned());
2090    };
2091    req_builder = req_builder.json(&p_body_microsoft_entra_provider_mapping_request);
2092
2093    let req = req_builder.build()?;
2094    let resp = configuration.client.execute(req).await?;
2095
2096    let status = resp.status();
2097    let content_type = resp
2098        .headers()
2099        .get("content-type")
2100        .and_then(|v| v.to_str().ok())
2101        .unwrap_or("application/octet-stream");
2102    let content_type = super::ContentType::from(content_type);
2103
2104    if !status.is_client_error() && !status.is_server_error() {
2105        let content = resp.text().await?;
2106        match content_type {
2107            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2108            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::MicrosoftEntraProviderMapping`"))),
2109            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::MicrosoftEntraProviderMapping`")))),
2110        }
2111    } else {
2112        let content = resp.text().await?;
2113        let entity: Option<PropertymappingsProviderMicrosoftEntraCreateError> = serde_json::from_str(&content).ok();
2114        Err(Error::ResponseError(ResponseContent {
2115            status,
2116            content,
2117            entity,
2118        }))
2119    }
2120}
2121
2122/// MicrosoftEntraProviderMapping Viewset
2123pub async fn propertymappings_provider_microsoft_entra_destroy(
2124    configuration: &configuration::Configuration,
2125    pm_uuid: &str,
2126) -> Result<(), Error<PropertymappingsProviderMicrosoftEntraDestroyError>> {
2127    // add a prefix to parameters to efficiently prevent name collisions
2128    let p_path_pm_uuid = pm_uuid;
2129
2130    let uri_str = format!(
2131        "{}/propertymappings/provider/microsoft_entra/{pm_uuid}/",
2132        configuration.base_path,
2133        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
2134    );
2135    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2136
2137    if let Some(ref user_agent) = configuration.user_agent {
2138        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2139    }
2140    if let Some(ref token) = configuration.bearer_access_token {
2141        req_builder = req_builder.bearer_auth(token.to_owned());
2142    };
2143
2144    let req = req_builder.build()?;
2145    let resp = configuration.client.execute(req).await?;
2146
2147    let status = resp.status();
2148
2149    if !status.is_client_error() && !status.is_server_error() {
2150        Ok(())
2151    } else {
2152        let content = resp.text().await?;
2153        let entity: Option<PropertymappingsProviderMicrosoftEntraDestroyError> = serde_json::from_str(&content).ok();
2154        Err(Error::ResponseError(ResponseContent {
2155            status,
2156            content,
2157            entity,
2158        }))
2159    }
2160}
2161
2162/// MicrosoftEntraProviderMapping Viewset
2163pub async fn propertymappings_provider_microsoft_entra_list(
2164    configuration: &configuration::Configuration,
2165    expression: Option<&str>,
2166    managed: Option<Vec<String>>,
2167    name: Option<&str>,
2168    ordering: Option<&str>,
2169    page: Option<i32>,
2170    page_size: Option<i32>,
2171    pm_uuid: Option<&str>,
2172    search: Option<&str>,
2173) -> Result<models::PaginatedMicrosoftEntraProviderMappingList, Error<PropertymappingsProviderMicrosoftEntraListError>>
2174{
2175    // add a prefix to parameters to efficiently prevent name collisions
2176    let p_query_expression = expression;
2177    let p_query_managed = managed;
2178    let p_query_name = name;
2179    let p_query_ordering = ordering;
2180    let p_query_page = page;
2181    let p_query_page_size = page_size;
2182    let p_query_pm_uuid = pm_uuid;
2183    let p_query_search = search;
2184
2185    let uri_str = format!("{}/propertymappings/provider/microsoft_entra/", configuration.base_path);
2186    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2187
2188    if let Some(ref param_value) = p_query_expression {
2189        req_builder = req_builder.query(&[("expression", &param_value.to_string())]);
2190    }
2191    if let Some(ref param_value) = p_query_managed {
2192        req_builder = match "multi" {
2193            "multi" => req_builder.query(
2194                &param_value
2195                    .into_iter()
2196                    .map(|p| ("managed".to_owned(), p.to_string()))
2197                    .collect::<Vec<(std::string::String, std::string::String)>>(),
2198            ),
2199            _ => req_builder.query(&[(
2200                "managed",
2201                &param_value
2202                    .into_iter()
2203                    .map(|p| p.to_string())
2204                    .collect::<Vec<String>>()
2205                    .join(",")
2206                    .to_string(),
2207            )]),
2208        };
2209    }
2210    if let Some(ref param_value) = p_query_name {
2211        req_builder = req_builder.query(&[("name", &param_value.to_string())]);
2212    }
2213    if let Some(ref param_value) = p_query_ordering {
2214        req_builder = req_builder.query(&[("ordering", &param_value.to_string())]);
2215    }
2216    if let Some(ref param_value) = p_query_page {
2217        req_builder = req_builder.query(&[("page", &param_value.to_string())]);
2218    }
2219    if let Some(ref param_value) = p_query_page_size {
2220        req_builder = req_builder.query(&[("page_size", &param_value.to_string())]);
2221    }
2222    if let Some(ref param_value) = p_query_pm_uuid {
2223        req_builder = req_builder.query(&[("pm_uuid", &param_value.to_string())]);
2224    }
2225    if let Some(ref param_value) = p_query_search {
2226        req_builder = req_builder.query(&[("search", &param_value.to_string())]);
2227    }
2228    if let Some(ref user_agent) = configuration.user_agent {
2229        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2230    }
2231    if let Some(ref token) = configuration.bearer_access_token {
2232        req_builder = req_builder.bearer_auth(token.to_owned());
2233    };
2234
2235    let req = req_builder.build()?;
2236    let resp = configuration.client.execute(req).await?;
2237
2238    let status = resp.status();
2239    let content_type = resp
2240        .headers()
2241        .get("content-type")
2242        .and_then(|v| v.to_str().ok())
2243        .unwrap_or("application/octet-stream");
2244    let content_type = super::ContentType::from(content_type);
2245
2246    if !status.is_client_error() && !status.is_server_error() {
2247        let content = resp.text().await?;
2248        match content_type {
2249            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2250            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaginatedMicrosoftEntraProviderMappingList`"))),
2251            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaginatedMicrosoftEntraProviderMappingList`")))),
2252        }
2253    } else {
2254        let content = resp.text().await?;
2255        let entity: Option<PropertymappingsProviderMicrosoftEntraListError> = serde_json::from_str(&content).ok();
2256        Err(Error::ResponseError(ResponseContent {
2257            status,
2258            content,
2259            entity,
2260        }))
2261    }
2262}
2263
2264/// MicrosoftEntraProviderMapping Viewset
2265pub async fn propertymappings_provider_microsoft_entra_partial_update(
2266    configuration: &configuration::Configuration,
2267    pm_uuid: &str,
2268    patched_microsoft_entra_provider_mapping_request: Option<models::PatchedMicrosoftEntraProviderMappingRequest>,
2269) -> Result<models::MicrosoftEntraProviderMapping, Error<PropertymappingsProviderMicrosoftEntraPartialUpdateError>> {
2270    // add a prefix to parameters to efficiently prevent name collisions
2271    let p_path_pm_uuid = pm_uuid;
2272    let p_body_patched_microsoft_entra_provider_mapping_request = patched_microsoft_entra_provider_mapping_request;
2273
2274    let uri_str = format!(
2275        "{}/propertymappings/provider/microsoft_entra/{pm_uuid}/",
2276        configuration.base_path,
2277        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
2278    );
2279    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
2280
2281    if let Some(ref user_agent) = configuration.user_agent {
2282        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2283    }
2284    if let Some(ref token) = configuration.bearer_access_token {
2285        req_builder = req_builder.bearer_auth(token.to_owned());
2286    };
2287    req_builder = req_builder.json(&p_body_patched_microsoft_entra_provider_mapping_request);
2288
2289    let req = req_builder.build()?;
2290    let resp = configuration.client.execute(req).await?;
2291
2292    let status = resp.status();
2293    let content_type = resp
2294        .headers()
2295        .get("content-type")
2296        .and_then(|v| v.to_str().ok())
2297        .unwrap_or("application/octet-stream");
2298    let content_type = super::ContentType::from(content_type);
2299
2300    if !status.is_client_error() && !status.is_server_error() {
2301        let content = resp.text().await?;
2302        match content_type {
2303            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2304            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::MicrosoftEntraProviderMapping`"))),
2305            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::MicrosoftEntraProviderMapping`")))),
2306        }
2307    } else {
2308        let content = resp.text().await?;
2309        let entity: Option<PropertymappingsProviderMicrosoftEntraPartialUpdateError> =
2310            serde_json::from_str(&content).ok();
2311        Err(Error::ResponseError(ResponseContent {
2312            status,
2313            content,
2314            entity,
2315        }))
2316    }
2317}
2318
2319/// MicrosoftEntraProviderMapping Viewset
2320pub async fn propertymappings_provider_microsoft_entra_retrieve(
2321    configuration: &configuration::Configuration,
2322    pm_uuid: &str,
2323) -> Result<models::MicrosoftEntraProviderMapping, Error<PropertymappingsProviderMicrosoftEntraRetrieveError>> {
2324    // add a prefix to parameters to efficiently prevent name collisions
2325    let p_path_pm_uuid = pm_uuid;
2326
2327    let uri_str = format!(
2328        "{}/propertymappings/provider/microsoft_entra/{pm_uuid}/",
2329        configuration.base_path,
2330        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
2331    );
2332    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2333
2334    if let Some(ref user_agent) = configuration.user_agent {
2335        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2336    }
2337    if let Some(ref token) = configuration.bearer_access_token {
2338        req_builder = req_builder.bearer_auth(token.to_owned());
2339    };
2340
2341    let req = req_builder.build()?;
2342    let resp = configuration.client.execute(req).await?;
2343
2344    let status = resp.status();
2345    let content_type = resp
2346        .headers()
2347        .get("content-type")
2348        .and_then(|v| v.to_str().ok())
2349        .unwrap_or("application/octet-stream");
2350    let content_type = super::ContentType::from(content_type);
2351
2352    if !status.is_client_error() && !status.is_server_error() {
2353        let content = resp.text().await?;
2354        match content_type {
2355            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2356            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::MicrosoftEntraProviderMapping`"))),
2357            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::MicrosoftEntraProviderMapping`")))),
2358        }
2359    } else {
2360        let content = resp.text().await?;
2361        let entity: Option<PropertymappingsProviderMicrosoftEntraRetrieveError> = serde_json::from_str(&content).ok();
2362        Err(Error::ResponseError(ResponseContent {
2363            status,
2364            content,
2365            entity,
2366        }))
2367    }
2368}
2369
2370/// MicrosoftEntraProviderMapping Viewset
2371pub async fn propertymappings_provider_microsoft_entra_update(
2372    configuration: &configuration::Configuration,
2373    pm_uuid: &str,
2374    microsoft_entra_provider_mapping_request: models::MicrosoftEntraProviderMappingRequest,
2375) -> Result<models::MicrosoftEntraProviderMapping, Error<PropertymappingsProviderMicrosoftEntraUpdateError>> {
2376    // add a prefix to parameters to efficiently prevent name collisions
2377    let p_path_pm_uuid = pm_uuid;
2378    let p_body_microsoft_entra_provider_mapping_request = microsoft_entra_provider_mapping_request;
2379
2380    let uri_str = format!(
2381        "{}/propertymappings/provider/microsoft_entra/{pm_uuid}/",
2382        configuration.base_path,
2383        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
2384    );
2385    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
2386
2387    if let Some(ref user_agent) = configuration.user_agent {
2388        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2389    }
2390    if let Some(ref token) = configuration.bearer_access_token {
2391        req_builder = req_builder.bearer_auth(token.to_owned());
2392    };
2393    req_builder = req_builder.json(&p_body_microsoft_entra_provider_mapping_request);
2394
2395    let req = req_builder.build()?;
2396    let resp = configuration.client.execute(req).await?;
2397
2398    let status = resp.status();
2399    let content_type = resp
2400        .headers()
2401        .get("content-type")
2402        .and_then(|v| v.to_str().ok())
2403        .unwrap_or("application/octet-stream");
2404    let content_type = super::ContentType::from(content_type);
2405
2406    if !status.is_client_error() && !status.is_server_error() {
2407        let content = resp.text().await?;
2408        match content_type {
2409            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2410            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::MicrosoftEntraProviderMapping`"))),
2411            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::MicrosoftEntraProviderMapping`")))),
2412        }
2413    } else {
2414        let content = resp.text().await?;
2415        let entity: Option<PropertymappingsProviderMicrosoftEntraUpdateError> = serde_json::from_str(&content).ok();
2416        Err(Error::ResponseError(ResponseContent {
2417            status,
2418            content,
2419            entity,
2420        }))
2421    }
2422}
2423
2424/// Get a list of all objects that use this object
2425pub async fn propertymappings_provider_microsoft_entra_used_by_list(
2426    configuration: &configuration::Configuration,
2427    pm_uuid: &str,
2428) -> Result<Vec<models::UsedBy>, Error<PropertymappingsProviderMicrosoftEntraUsedByListError>> {
2429    // add a prefix to parameters to efficiently prevent name collisions
2430    let p_path_pm_uuid = pm_uuid;
2431
2432    let uri_str = format!(
2433        "{}/propertymappings/provider/microsoft_entra/{pm_uuid}/used_by/",
2434        configuration.base_path,
2435        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
2436    );
2437    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2438
2439    if let Some(ref user_agent) = configuration.user_agent {
2440        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2441    }
2442    if let Some(ref token) = configuration.bearer_access_token {
2443        req_builder = req_builder.bearer_auth(token.to_owned());
2444    };
2445
2446    let req = req_builder.build()?;
2447    let resp = configuration.client.execute(req).await?;
2448
2449    let status = resp.status();
2450    let content_type = resp
2451        .headers()
2452        .get("content-type")
2453        .and_then(|v| v.to_str().ok())
2454        .unwrap_or("application/octet-stream");
2455    let content_type = super::ContentType::from(content_type);
2456
2457    if !status.is_client_error() && !status.is_server_error() {
2458        let content = resp.text().await?;
2459        match content_type {
2460            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2461            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`"))),
2462            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`")))),
2463        }
2464    } else {
2465        let content = resp.text().await?;
2466        let entity: Option<PropertymappingsProviderMicrosoftEntraUsedByListError> = serde_json::from_str(&content).ok();
2467        Err(Error::ResponseError(ResponseContent {
2468            status,
2469            content,
2470            entity,
2471        }))
2472    }
2473}
2474
2475/// RACPropertyMapping Viewset
2476pub async fn propertymappings_provider_rac_create(
2477    configuration: &configuration::Configuration,
2478    rac_property_mapping_request: models::RacPropertyMappingRequest,
2479) -> Result<models::RacPropertyMapping, Error<PropertymappingsProviderRacCreateError>> {
2480    // add a prefix to parameters to efficiently prevent name collisions
2481    let p_body_rac_property_mapping_request = rac_property_mapping_request;
2482
2483    let uri_str = format!("{}/propertymappings/provider/rac/", configuration.base_path);
2484    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
2485
2486    if let Some(ref user_agent) = configuration.user_agent {
2487        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2488    }
2489    if let Some(ref token) = configuration.bearer_access_token {
2490        req_builder = req_builder.bearer_auth(token.to_owned());
2491    };
2492    req_builder = req_builder.json(&p_body_rac_property_mapping_request);
2493
2494    let req = req_builder.build()?;
2495    let resp = configuration.client.execute(req).await?;
2496
2497    let status = resp.status();
2498    let content_type = resp
2499        .headers()
2500        .get("content-type")
2501        .and_then(|v| v.to_str().ok())
2502        .unwrap_or("application/octet-stream");
2503    let content_type = super::ContentType::from(content_type);
2504
2505    if !status.is_client_error() && !status.is_server_error() {
2506        let content = resp.text().await?;
2507        match content_type {
2508            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2509            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RacPropertyMapping`"))),
2510            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RacPropertyMapping`")))),
2511        }
2512    } else {
2513        let content = resp.text().await?;
2514        let entity: Option<PropertymappingsProviderRacCreateError> = serde_json::from_str(&content).ok();
2515        Err(Error::ResponseError(ResponseContent {
2516            status,
2517            content,
2518            entity,
2519        }))
2520    }
2521}
2522
2523/// RACPropertyMapping Viewset
2524pub async fn propertymappings_provider_rac_destroy(
2525    configuration: &configuration::Configuration,
2526    pm_uuid: &str,
2527) -> Result<(), Error<PropertymappingsProviderRacDestroyError>> {
2528    // add a prefix to parameters to efficiently prevent name collisions
2529    let p_path_pm_uuid = pm_uuid;
2530
2531    let uri_str = format!(
2532        "{}/propertymappings/provider/rac/{pm_uuid}/",
2533        configuration.base_path,
2534        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
2535    );
2536    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2537
2538    if let Some(ref user_agent) = configuration.user_agent {
2539        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2540    }
2541    if let Some(ref token) = configuration.bearer_access_token {
2542        req_builder = req_builder.bearer_auth(token.to_owned());
2543    };
2544
2545    let req = req_builder.build()?;
2546    let resp = configuration.client.execute(req).await?;
2547
2548    let status = resp.status();
2549
2550    if !status.is_client_error() && !status.is_server_error() {
2551        Ok(())
2552    } else {
2553        let content = resp.text().await?;
2554        let entity: Option<PropertymappingsProviderRacDestroyError> = serde_json::from_str(&content).ok();
2555        Err(Error::ResponseError(ResponseContent {
2556            status,
2557            content,
2558            entity,
2559        }))
2560    }
2561}
2562
2563/// RACPropertyMapping Viewset
2564pub async fn propertymappings_provider_rac_list(
2565    configuration: &configuration::Configuration,
2566    managed: Option<Vec<String>>,
2567    name: Option<&str>,
2568    ordering: Option<&str>,
2569    page: Option<i32>,
2570    page_size: Option<i32>,
2571    search: Option<&str>,
2572) -> Result<models::PaginatedRacPropertyMappingList, Error<PropertymappingsProviderRacListError>> {
2573    // add a prefix to parameters to efficiently prevent name collisions
2574    let p_query_managed = managed;
2575    let p_query_name = name;
2576    let p_query_ordering = ordering;
2577    let p_query_page = page;
2578    let p_query_page_size = page_size;
2579    let p_query_search = search;
2580
2581    let uri_str = format!("{}/propertymappings/provider/rac/", configuration.base_path);
2582    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2583
2584    if let Some(ref param_value) = p_query_managed {
2585        req_builder = match "multi" {
2586            "multi" => req_builder.query(
2587                &param_value
2588                    .into_iter()
2589                    .map(|p| ("managed".to_owned(), p.to_string()))
2590                    .collect::<Vec<(std::string::String, std::string::String)>>(),
2591            ),
2592            _ => req_builder.query(&[(
2593                "managed",
2594                &param_value
2595                    .into_iter()
2596                    .map(|p| p.to_string())
2597                    .collect::<Vec<String>>()
2598                    .join(",")
2599                    .to_string(),
2600            )]),
2601        };
2602    }
2603    if let Some(ref param_value) = p_query_name {
2604        req_builder = req_builder.query(&[("name", &param_value.to_string())]);
2605    }
2606    if let Some(ref param_value) = p_query_ordering {
2607        req_builder = req_builder.query(&[("ordering", &param_value.to_string())]);
2608    }
2609    if let Some(ref param_value) = p_query_page {
2610        req_builder = req_builder.query(&[("page", &param_value.to_string())]);
2611    }
2612    if let Some(ref param_value) = p_query_page_size {
2613        req_builder = req_builder.query(&[("page_size", &param_value.to_string())]);
2614    }
2615    if let Some(ref param_value) = p_query_search {
2616        req_builder = req_builder.query(&[("search", &param_value.to_string())]);
2617    }
2618    if let Some(ref user_agent) = configuration.user_agent {
2619        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2620    }
2621    if let Some(ref token) = configuration.bearer_access_token {
2622        req_builder = req_builder.bearer_auth(token.to_owned());
2623    };
2624
2625    let req = req_builder.build()?;
2626    let resp = configuration.client.execute(req).await?;
2627
2628    let status = resp.status();
2629    let content_type = resp
2630        .headers()
2631        .get("content-type")
2632        .and_then(|v| v.to_str().ok())
2633        .unwrap_or("application/octet-stream");
2634    let content_type = super::ContentType::from(content_type);
2635
2636    if !status.is_client_error() && !status.is_server_error() {
2637        let content = resp.text().await?;
2638        match content_type {
2639            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2640            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaginatedRacPropertyMappingList`"))),
2641            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaginatedRacPropertyMappingList`")))),
2642        }
2643    } else {
2644        let content = resp.text().await?;
2645        let entity: Option<PropertymappingsProviderRacListError> = serde_json::from_str(&content).ok();
2646        Err(Error::ResponseError(ResponseContent {
2647            status,
2648            content,
2649            entity,
2650        }))
2651    }
2652}
2653
2654/// RACPropertyMapping Viewset
2655pub async fn propertymappings_provider_rac_partial_update(
2656    configuration: &configuration::Configuration,
2657    pm_uuid: &str,
2658    patched_rac_property_mapping_request: Option<models::PatchedRacPropertyMappingRequest>,
2659) -> Result<models::RacPropertyMapping, Error<PropertymappingsProviderRacPartialUpdateError>> {
2660    // add a prefix to parameters to efficiently prevent name collisions
2661    let p_path_pm_uuid = pm_uuid;
2662    let p_body_patched_rac_property_mapping_request = patched_rac_property_mapping_request;
2663
2664    let uri_str = format!(
2665        "{}/propertymappings/provider/rac/{pm_uuid}/",
2666        configuration.base_path,
2667        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
2668    );
2669    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
2670
2671    if let Some(ref user_agent) = configuration.user_agent {
2672        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2673    }
2674    if let Some(ref token) = configuration.bearer_access_token {
2675        req_builder = req_builder.bearer_auth(token.to_owned());
2676    };
2677    req_builder = req_builder.json(&p_body_patched_rac_property_mapping_request);
2678
2679    let req = req_builder.build()?;
2680    let resp = configuration.client.execute(req).await?;
2681
2682    let status = resp.status();
2683    let content_type = resp
2684        .headers()
2685        .get("content-type")
2686        .and_then(|v| v.to_str().ok())
2687        .unwrap_or("application/octet-stream");
2688    let content_type = super::ContentType::from(content_type);
2689
2690    if !status.is_client_error() && !status.is_server_error() {
2691        let content = resp.text().await?;
2692        match content_type {
2693            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2694            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RacPropertyMapping`"))),
2695            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RacPropertyMapping`")))),
2696        }
2697    } else {
2698        let content = resp.text().await?;
2699        let entity: Option<PropertymappingsProviderRacPartialUpdateError> = serde_json::from_str(&content).ok();
2700        Err(Error::ResponseError(ResponseContent {
2701            status,
2702            content,
2703            entity,
2704        }))
2705    }
2706}
2707
2708/// RACPropertyMapping Viewset
2709pub async fn propertymappings_provider_rac_retrieve(
2710    configuration: &configuration::Configuration,
2711    pm_uuid: &str,
2712) -> Result<models::RacPropertyMapping, Error<PropertymappingsProviderRacRetrieveError>> {
2713    // add a prefix to parameters to efficiently prevent name collisions
2714    let p_path_pm_uuid = pm_uuid;
2715
2716    let uri_str = format!(
2717        "{}/propertymappings/provider/rac/{pm_uuid}/",
2718        configuration.base_path,
2719        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
2720    );
2721    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2722
2723    if let Some(ref user_agent) = configuration.user_agent {
2724        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2725    }
2726    if let Some(ref token) = configuration.bearer_access_token {
2727        req_builder = req_builder.bearer_auth(token.to_owned());
2728    };
2729
2730    let req = req_builder.build()?;
2731    let resp = configuration.client.execute(req).await?;
2732
2733    let status = resp.status();
2734    let content_type = resp
2735        .headers()
2736        .get("content-type")
2737        .and_then(|v| v.to_str().ok())
2738        .unwrap_or("application/octet-stream");
2739    let content_type = super::ContentType::from(content_type);
2740
2741    if !status.is_client_error() && !status.is_server_error() {
2742        let content = resp.text().await?;
2743        match content_type {
2744            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2745            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RacPropertyMapping`"))),
2746            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RacPropertyMapping`")))),
2747        }
2748    } else {
2749        let content = resp.text().await?;
2750        let entity: Option<PropertymappingsProviderRacRetrieveError> = serde_json::from_str(&content).ok();
2751        Err(Error::ResponseError(ResponseContent {
2752            status,
2753            content,
2754            entity,
2755        }))
2756    }
2757}
2758
2759/// RACPropertyMapping Viewset
2760pub async fn propertymappings_provider_rac_update(
2761    configuration: &configuration::Configuration,
2762    pm_uuid: &str,
2763    rac_property_mapping_request: models::RacPropertyMappingRequest,
2764) -> Result<models::RacPropertyMapping, Error<PropertymappingsProviderRacUpdateError>> {
2765    // add a prefix to parameters to efficiently prevent name collisions
2766    let p_path_pm_uuid = pm_uuid;
2767    let p_body_rac_property_mapping_request = rac_property_mapping_request;
2768
2769    let uri_str = format!(
2770        "{}/propertymappings/provider/rac/{pm_uuid}/",
2771        configuration.base_path,
2772        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
2773    );
2774    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
2775
2776    if let Some(ref user_agent) = configuration.user_agent {
2777        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2778    }
2779    if let Some(ref token) = configuration.bearer_access_token {
2780        req_builder = req_builder.bearer_auth(token.to_owned());
2781    };
2782    req_builder = req_builder.json(&p_body_rac_property_mapping_request);
2783
2784    let req = req_builder.build()?;
2785    let resp = configuration.client.execute(req).await?;
2786
2787    let status = resp.status();
2788    let content_type = resp
2789        .headers()
2790        .get("content-type")
2791        .and_then(|v| v.to_str().ok())
2792        .unwrap_or("application/octet-stream");
2793    let content_type = super::ContentType::from(content_type);
2794
2795    if !status.is_client_error() && !status.is_server_error() {
2796        let content = resp.text().await?;
2797        match content_type {
2798            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2799            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RacPropertyMapping`"))),
2800            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RacPropertyMapping`")))),
2801        }
2802    } else {
2803        let content = resp.text().await?;
2804        let entity: Option<PropertymappingsProviderRacUpdateError> = serde_json::from_str(&content).ok();
2805        Err(Error::ResponseError(ResponseContent {
2806            status,
2807            content,
2808            entity,
2809        }))
2810    }
2811}
2812
2813/// Get a list of all objects that use this object
2814pub async fn propertymappings_provider_rac_used_by_list(
2815    configuration: &configuration::Configuration,
2816    pm_uuid: &str,
2817) -> Result<Vec<models::UsedBy>, Error<PropertymappingsProviderRacUsedByListError>> {
2818    // add a prefix to parameters to efficiently prevent name collisions
2819    let p_path_pm_uuid = pm_uuid;
2820
2821    let uri_str = format!(
2822        "{}/propertymappings/provider/rac/{pm_uuid}/used_by/",
2823        configuration.base_path,
2824        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
2825    );
2826    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2827
2828    if let Some(ref user_agent) = configuration.user_agent {
2829        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2830    }
2831    if let Some(ref token) = configuration.bearer_access_token {
2832        req_builder = req_builder.bearer_auth(token.to_owned());
2833    };
2834
2835    let req = req_builder.build()?;
2836    let resp = configuration.client.execute(req).await?;
2837
2838    let status = resp.status();
2839    let content_type = resp
2840        .headers()
2841        .get("content-type")
2842        .and_then(|v| v.to_str().ok())
2843        .unwrap_or("application/octet-stream");
2844    let content_type = super::ContentType::from(content_type);
2845
2846    if !status.is_client_error() && !status.is_server_error() {
2847        let content = resp.text().await?;
2848        match content_type {
2849            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2850            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`"))),
2851            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`")))),
2852        }
2853    } else {
2854        let content = resp.text().await?;
2855        let entity: Option<PropertymappingsProviderRacUsedByListError> = serde_json::from_str(&content).ok();
2856        Err(Error::ResponseError(ResponseContent {
2857            status,
2858            content,
2859            entity,
2860        }))
2861    }
2862}
2863
2864/// RadiusProviderPropertyMapping Viewset
2865pub async fn propertymappings_provider_radius_create(
2866    configuration: &configuration::Configuration,
2867    radius_provider_property_mapping_request: models::RadiusProviderPropertyMappingRequest,
2868) -> Result<models::RadiusProviderPropertyMapping, Error<PropertymappingsProviderRadiusCreateError>> {
2869    // add a prefix to parameters to efficiently prevent name collisions
2870    let p_body_radius_provider_property_mapping_request = radius_provider_property_mapping_request;
2871
2872    let uri_str = format!("{}/propertymappings/provider/radius/", configuration.base_path);
2873    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
2874
2875    if let Some(ref user_agent) = configuration.user_agent {
2876        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2877    }
2878    if let Some(ref token) = configuration.bearer_access_token {
2879        req_builder = req_builder.bearer_auth(token.to_owned());
2880    };
2881    req_builder = req_builder.json(&p_body_radius_provider_property_mapping_request);
2882
2883    let req = req_builder.build()?;
2884    let resp = configuration.client.execute(req).await?;
2885
2886    let status = resp.status();
2887    let content_type = resp
2888        .headers()
2889        .get("content-type")
2890        .and_then(|v| v.to_str().ok())
2891        .unwrap_or("application/octet-stream");
2892    let content_type = super::ContentType::from(content_type);
2893
2894    if !status.is_client_error() && !status.is_server_error() {
2895        let content = resp.text().await?;
2896        match content_type {
2897            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2898            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RadiusProviderPropertyMapping`"))),
2899            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RadiusProviderPropertyMapping`")))),
2900        }
2901    } else {
2902        let content = resp.text().await?;
2903        let entity: Option<PropertymappingsProviderRadiusCreateError> = serde_json::from_str(&content).ok();
2904        Err(Error::ResponseError(ResponseContent {
2905            status,
2906            content,
2907            entity,
2908        }))
2909    }
2910}
2911
2912/// RadiusProviderPropertyMapping Viewset
2913pub async fn propertymappings_provider_radius_destroy(
2914    configuration: &configuration::Configuration,
2915    pm_uuid: &str,
2916) -> Result<(), Error<PropertymappingsProviderRadiusDestroyError>> {
2917    // add a prefix to parameters to efficiently prevent name collisions
2918    let p_path_pm_uuid = pm_uuid;
2919
2920    let uri_str = format!(
2921        "{}/propertymappings/provider/radius/{pm_uuid}/",
2922        configuration.base_path,
2923        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
2924    );
2925    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
2926
2927    if let Some(ref user_agent) = configuration.user_agent {
2928        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2929    }
2930    if let Some(ref token) = configuration.bearer_access_token {
2931        req_builder = req_builder.bearer_auth(token.to_owned());
2932    };
2933
2934    let req = req_builder.build()?;
2935    let resp = configuration.client.execute(req).await?;
2936
2937    let status = resp.status();
2938
2939    if !status.is_client_error() && !status.is_server_error() {
2940        Ok(())
2941    } else {
2942        let content = resp.text().await?;
2943        let entity: Option<PropertymappingsProviderRadiusDestroyError> = serde_json::from_str(&content).ok();
2944        Err(Error::ResponseError(ResponseContent {
2945            status,
2946            content,
2947            entity,
2948        }))
2949    }
2950}
2951
2952/// RadiusProviderPropertyMapping Viewset
2953pub async fn propertymappings_provider_radius_list(
2954    configuration: &configuration::Configuration,
2955    managed: Option<Vec<String>>,
2956    managed__isnull: Option<bool>,
2957    name: Option<&str>,
2958    ordering: Option<&str>,
2959    page: Option<i32>,
2960    page_size: Option<i32>,
2961    search: Option<&str>,
2962) -> Result<models::PaginatedRadiusProviderPropertyMappingList, Error<PropertymappingsProviderRadiusListError>> {
2963    // add a prefix to parameters to efficiently prevent name collisions
2964    let p_query_managed = managed;
2965    let p_query_managed__isnull = managed__isnull;
2966    let p_query_name = name;
2967    let p_query_ordering = ordering;
2968    let p_query_page = page;
2969    let p_query_page_size = page_size;
2970    let p_query_search = search;
2971
2972    let uri_str = format!("{}/propertymappings/provider/radius/", configuration.base_path);
2973    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2974
2975    if let Some(ref param_value) = p_query_managed {
2976        req_builder = match "multi" {
2977            "multi" => req_builder.query(
2978                &param_value
2979                    .into_iter()
2980                    .map(|p| ("managed".to_owned(), p.to_string()))
2981                    .collect::<Vec<(std::string::String, std::string::String)>>(),
2982            ),
2983            _ => req_builder.query(&[(
2984                "managed",
2985                &param_value
2986                    .into_iter()
2987                    .map(|p| p.to_string())
2988                    .collect::<Vec<String>>()
2989                    .join(",")
2990                    .to_string(),
2991            )]),
2992        };
2993    }
2994    if let Some(ref param_value) = p_query_managed__isnull {
2995        req_builder = req_builder.query(&[("managed__isnull", &param_value.to_string())]);
2996    }
2997    if let Some(ref param_value) = p_query_name {
2998        req_builder = req_builder.query(&[("name", &param_value.to_string())]);
2999    }
3000    if let Some(ref param_value) = p_query_ordering {
3001        req_builder = req_builder.query(&[("ordering", &param_value.to_string())]);
3002    }
3003    if let Some(ref param_value) = p_query_page {
3004        req_builder = req_builder.query(&[("page", &param_value.to_string())]);
3005    }
3006    if let Some(ref param_value) = p_query_page_size {
3007        req_builder = req_builder.query(&[("page_size", &param_value.to_string())]);
3008    }
3009    if let Some(ref param_value) = p_query_search {
3010        req_builder = req_builder.query(&[("search", &param_value.to_string())]);
3011    }
3012    if let Some(ref user_agent) = configuration.user_agent {
3013        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3014    }
3015    if let Some(ref token) = configuration.bearer_access_token {
3016        req_builder = req_builder.bearer_auth(token.to_owned());
3017    };
3018
3019    let req = req_builder.build()?;
3020    let resp = configuration.client.execute(req).await?;
3021
3022    let status = resp.status();
3023    let content_type = resp
3024        .headers()
3025        .get("content-type")
3026        .and_then(|v| v.to_str().ok())
3027        .unwrap_or("application/octet-stream");
3028    let content_type = super::ContentType::from(content_type);
3029
3030    if !status.is_client_error() && !status.is_server_error() {
3031        let content = resp.text().await?;
3032        match content_type {
3033            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3034            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaginatedRadiusProviderPropertyMappingList`"))),
3035            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaginatedRadiusProviderPropertyMappingList`")))),
3036        }
3037    } else {
3038        let content = resp.text().await?;
3039        let entity: Option<PropertymappingsProviderRadiusListError> = serde_json::from_str(&content).ok();
3040        Err(Error::ResponseError(ResponseContent {
3041            status,
3042            content,
3043            entity,
3044        }))
3045    }
3046}
3047
3048/// RadiusProviderPropertyMapping Viewset
3049pub async fn propertymappings_provider_radius_partial_update(
3050    configuration: &configuration::Configuration,
3051    pm_uuid: &str,
3052    patched_radius_provider_property_mapping_request: Option<models::PatchedRadiusProviderPropertyMappingRequest>,
3053) -> Result<models::RadiusProviderPropertyMapping, Error<PropertymappingsProviderRadiusPartialUpdateError>> {
3054    // add a prefix to parameters to efficiently prevent name collisions
3055    let p_path_pm_uuid = pm_uuid;
3056    let p_body_patched_radius_provider_property_mapping_request = patched_radius_provider_property_mapping_request;
3057
3058    let uri_str = format!(
3059        "{}/propertymappings/provider/radius/{pm_uuid}/",
3060        configuration.base_path,
3061        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
3062    );
3063    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
3064
3065    if let Some(ref user_agent) = configuration.user_agent {
3066        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3067    }
3068    if let Some(ref token) = configuration.bearer_access_token {
3069        req_builder = req_builder.bearer_auth(token.to_owned());
3070    };
3071    req_builder = req_builder.json(&p_body_patched_radius_provider_property_mapping_request);
3072
3073    let req = req_builder.build()?;
3074    let resp = configuration.client.execute(req).await?;
3075
3076    let status = resp.status();
3077    let content_type = resp
3078        .headers()
3079        .get("content-type")
3080        .and_then(|v| v.to_str().ok())
3081        .unwrap_or("application/octet-stream");
3082    let content_type = super::ContentType::from(content_type);
3083
3084    if !status.is_client_error() && !status.is_server_error() {
3085        let content = resp.text().await?;
3086        match content_type {
3087            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3088            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RadiusProviderPropertyMapping`"))),
3089            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RadiusProviderPropertyMapping`")))),
3090        }
3091    } else {
3092        let content = resp.text().await?;
3093        let entity: Option<PropertymappingsProviderRadiusPartialUpdateError> = serde_json::from_str(&content).ok();
3094        Err(Error::ResponseError(ResponseContent {
3095            status,
3096            content,
3097            entity,
3098        }))
3099    }
3100}
3101
3102/// RadiusProviderPropertyMapping Viewset
3103pub async fn propertymappings_provider_radius_retrieve(
3104    configuration: &configuration::Configuration,
3105    pm_uuid: &str,
3106) -> Result<models::RadiusProviderPropertyMapping, Error<PropertymappingsProviderRadiusRetrieveError>> {
3107    // add a prefix to parameters to efficiently prevent name collisions
3108    let p_path_pm_uuid = pm_uuid;
3109
3110    let uri_str = format!(
3111        "{}/propertymappings/provider/radius/{pm_uuid}/",
3112        configuration.base_path,
3113        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
3114    );
3115    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3116
3117    if let Some(ref user_agent) = configuration.user_agent {
3118        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3119    }
3120    if let Some(ref token) = configuration.bearer_access_token {
3121        req_builder = req_builder.bearer_auth(token.to_owned());
3122    };
3123
3124    let req = req_builder.build()?;
3125    let resp = configuration.client.execute(req).await?;
3126
3127    let status = resp.status();
3128    let content_type = resp
3129        .headers()
3130        .get("content-type")
3131        .and_then(|v| v.to_str().ok())
3132        .unwrap_or("application/octet-stream");
3133    let content_type = super::ContentType::from(content_type);
3134
3135    if !status.is_client_error() && !status.is_server_error() {
3136        let content = resp.text().await?;
3137        match content_type {
3138            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3139            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RadiusProviderPropertyMapping`"))),
3140            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RadiusProviderPropertyMapping`")))),
3141        }
3142    } else {
3143        let content = resp.text().await?;
3144        let entity: Option<PropertymappingsProviderRadiusRetrieveError> = serde_json::from_str(&content).ok();
3145        Err(Error::ResponseError(ResponseContent {
3146            status,
3147            content,
3148            entity,
3149        }))
3150    }
3151}
3152
3153/// RadiusProviderPropertyMapping Viewset
3154pub async fn propertymappings_provider_radius_update(
3155    configuration: &configuration::Configuration,
3156    pm_uuid: &str,
3157    radius_provider_property_mapping_request: models::RadiusProviderPropertyMappingRequest,
3158) -> Result<models::RadiusProviderPropertyMapping, Error<PropertymappingsProviderRadiusUpdateError>> {
3159    // add a prefix to parameters to efficiently prevent name collisions
3160    let p_path_pm_uuid = pm_uuid;
3161    let p_body_radius_provider_property_mapping_request = radius_provider_property_mapping_request;
3162
3163    let uri_str = format!(
3164        "{}/propertymappings/provider/radius/{pm_uuid}/",
3165        configuration.base_path,
3166        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
3167    );
3168    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
3169
3170    if let Some(ref user_agent) = configuration.user_agent {
3171        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3172    }
3173    if let Some(ref token) = configuration.bearer_access_token {
3174        req_builder = req_builder.bearer_auth(token.to_owned());
3175    };
3176    req_builder = req_builder.json(&p_body_radius_provider_property_mapping_request);
3177
3178    let req = req_builder.build()?;
3179    let resp = configuration.client.execute(req).await?;
3180
3181    let status = resp.status();
3182    let content_type = resp
3183        .headers()
3184        .get("content-type")
3185        .and_then(|v| v.to_str().ok())
3186        .unwrap_or("application/octet-stream");
3187    let content_type = super::ContentType::from(content_type);
3188
3189    if !status.is_client_error() && !status.is_server_error() {
3190        let content = resp.text().await?;
3191        match content_type {
3192            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3193            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::RadiusProviderPropertyMapping`"))),
3194            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::RadiusProviderPropertyMapping`")))),
3195        }
3196    } else {
3197        let content = resp.text().await?;
3198        let entity: Option<PropertymappingsProviderRadiusUpdateError> = serde_json::from_str(&content).ok();
3199        Err(Error::ResponseError(ResponseContent {
3200            status,
3201            content,
3202            entity,
3203        }))
3204    }
3205}
3206
3207/// Get a list of all objects that use this object
3208pub async fn propertymappings_provider_radius_used_by_list(
3209    configuration: &configuration::Configuration,
3210    pm_uuid: &str,
3211) -> Result<Vec<models::UsedBy>, Error<PropertymappingsProviderRadiusUsedByListError>> {
3212    // add a prefix to parameters to efficiently prevent name collisions
3213    let p_path_pm_uuid = pm_uuid;
3214
3215    let uri_str = format!(
3216        "{}/propertymappings/provider/radius/{pm_uuid}/used_by/",
3217        configuration.base_path,
3218        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
3219    );
3220    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3221
3222    if let Some(ref user_agent) = configuration.user_agent {
3223        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3224    }
3225    if let Some(ref token) = configuration.bearer_access_token {
3226        req_builder = req_builder.bearer_auth(token.to_owned());
3227    };
3228
3229    let req = req_builder.build()?;
3230    let resp = configuration.client.execute(req).await?;
3231
3232    let status = resp.status();
3233    let content_type = resp
3234        .headers()
3235        .get("content-type")
3236        .and_then(|v| v.to_str().ok())
3237        .unwrap_or("application/octet-stream");
3238    let content_type = super::ContentType::from(content_type);
3239
3240    if !status.is_client_error() && !status.is_server_error() {
3241        let content = resp.text().await?;
3242        match content_type {
3243            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3244            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`"))),
3245            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`")))),
3246        }
3247    } else {
3248        let content = resp.text().await?;
3249        let entity: Option<PropertymappingsProviderRadiusUsedByListError> = serde_json::from_str(&content).ok();
3250        Err(Error::ResponseError(ResponseContent {
3251            status,
3252            content,
3253            entity,
3254        }))
3255    }
3256}
3257
3258/// SAMLPropertyMapping Viewset
3259pub async fn propertymappings_provider_saml_create(
3260    configuration: &configuration::Configuration,
3261    saml_property_mapping_request: models::SamlPropertyMappingRequest,
3262) -> Result<models::SamlPropertyMapping, Error<PropertymappingsProviderSamlCreateError>> {
3263    // add a prefix to parameters to efficiently prevent name collisions
3264    let p_body_saml_property_mapping_request = saml_property_mapping_request;
3265
3266    let uri_str = format!("{}/propertymappings/provider/saml/", configuration.base_path);
3267    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3268
3269    if let Some(ref user_agent) = configuration.user_agent {
3270        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3271    }
3272    if let Some(ref token) = configuration.bearer_access_token {
3273        req_builder = req_builder.bearer_auth(token.to_owned());
3274    };
3275    req_builder = req_builder.json(&p_body_saml_property_mapping_request);
3276
3277    let req = req_builder.build()?;
3278    let resp = configuration.client.execute(req).await?;
3279
3280    let status = resp.status();
3281    let content_type = resp
3282        .headers()
3283        .get("content-type")
3284        .and_then(|v| v.to_str().ok())
3285        .unwrap_or("application/octet-stream");
3286    let content_type = super::ContentType::from(content_type);
3287
3288    if !status.is_client_error() && !status.is_server_error() {
3289        let content = resp.text().await?;
3290        match content_type {
3291            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3292            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SamlPropertyMapping`"))),
3293            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SamlPropertyMapping`")))),
3294        }
3295    } else {
3296        let content = resp.text().await?;
3297        let entity: Option<PropertymappingsProviderSamlCreateError> = serde_json::from_str(&content).ok();
3298        Err(Error::ResponseError(ResponseContent {
3299            status,
3300            content,
3301            entity,
3302        }))
3303    }
3304}
3305
3306/// SAMLPropertyMapping Viewset
3307pub async fn propertymappings_provider_saml_destroy(
3308    configuration: &configuration::Configuration,
3309    pm_uuid: &str,
3310) -> Result<(), Error<PropertymappingsProviderSamlDestroyError>> {
3311    // add a prefix to parameters to efficiently prevent name collisions
3312    let p_path_pm_uuid = pm_uuid;
3313
3314    let uri_str = format!(
3315        "{}/propertymappings/provider/saml/{pm_uuid}/",
3316        configuration.base_path,
3317        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
3318    );
3319    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
3320
3321    if let Some(ref user_agent) = configuration.user_agent {
3322        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3323    }
3324    if let Some(ref token) = configuration.bearer_access_token {
3325        req_builder = req_builder.bearer_auth(token.to_owned());
3326    };
3327
3328    let req = req_builder.build()?;
3329    let resp = configuration.client.execute(req).await?;
3330
3331    let status = resp.status();
3332
3333    if !status.is_client_error() && !status.is_server_error() {
3334        Ok(())
3335    } else {
3336        let content = resp.text().await?;
3337        let entity: Option<PropertymappingsProviderSamlDestroyError> = serde_json::from_str(&content).ok();
3338        Err(Error::ResponseError(ResponseContent {
3339            status,
3340            content,
3341            entity,
3342        }))
3343    }
3344}
3345
3346/// SAMLPropertyMapping Viewset
3347pub async fn propertymappings_provider_saml_list(
3348    configuration: &configuration::Configuration,
3349    friendly_name: Option<&str>,
3350    managed: Option<Vec<String>>,
3351    managed__isnull: Option<bool>,
3352    name: Option<&str>,
3353    ordering: Option<&str>,
3354    page: Option<i32>,
3355    page_size: Option<i32>,
3356    saml_name: Option<&str>,
3357    search: Option<&str>,
3358) -> Result<models::PaginatedSamlPropertyMappingList, Error<PropertymappingsProviderSamlListError>> {
3359    // add a prefix to parameters to efficiently prevent name collisions
3360    let p_query_friendly_name = friendly_name;
3361    let p_query_managed = managed;
3362    let p_query_managed__isnull = managed__isnull;
3363    let p_query_name = name;
3364    let p_query_ordering = ordering;
3365    let p_query_page = page;
3366    let p_query_page_size = page_size;
3367    let p_query_saml_name = saml_name;
3368    let p_query_search = search;
3369
3370    let uri_str = format!("{}/propertymappings/provider/saml/", configuration.base_path);
3371    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3372
3373    if let Some(ref param_value) = p_query_friendly_name {
3374        req_builder = req_builder.query(&[("friendly_name", &param_value.to_string())]);
3375    }
3376    if let Some(ref param_value) = p_query_managed {
3377        req_builder = match "multi" {
3378            "multi" => req_builder.query(
3379                &param_value
3380                    .into_iter()
3381                    .map(|p| ("managed".to_owned(), p.to_string()))
3382                    .collect::<Vec<(std::string::String, std::string::String)>>(),
3383            ),
3384            _ => req_builder.query(&[(
3385                "managed",
3386                &param_value
3387                    .into_iter()
3388                    .map(|p| p.to_string())
3389                    .collect::<Vec<String>>()
3390                    .join(",")
3391                    .to_string(),
3392            )]),
3393        };
3394    }
3395    if let Some(ref param_value) = p_query_managed__isnull {
3396        req_builder = req_builder.query(&[("managed__isnull", &param_value.to_string())]);
3397    }
3398    if let Some(ref param_value) = p_query_name {
3399        req_builder = req_builder.query(&[("name", &param_value.to_string())]);
3400    }
3401    if let Some(ref param_value) = p_query_ordering {
3402        req_builder = req_builder.query(&[("ordering", &param_value.to_string())]);
3403    }
3404    if let Some(ref param_value) = p_query_page {
3405        req_builder = req_builder.query(&[("page", &param_value.to_string())]);
3406    }
3407    if let Some(ref param_value) = p_query_page_size {
3408        req_builder = req_builder.query(&[("page_size", &param_value.to_string())]);
3409    }
3410    if let Some(ref param_value) = p_query_saml_name {
3411        req_builder = req_builder.query(&[("saml_name", &param_value.to_string())]);
3412    }
3413    if let Some(ref param_value) = p_query_search {
3414        req_builder = req_builder.query(&[("search", &param_value.to_string())]);
3415    }
3416    if let Some(ref user_agent) = configuration.user_agent {
3417        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3418    }
3419    if let Some(ref token) = configuration.bearer_access_token {
3420        req_builder = req_builder.bearer_auth(token.to_owned());
3421    };
3422
3423    let req = req_builder.build()?;
3424    let resp = configuration.client.execute(req).await?;
3425
3426    let status = resp.status();
3427    let content_type = resp
3428        .headers()
3429        .get("content-type")
3430        .and_then(|v| v.to_str().ok())
3431        .unwrap_or("application/octet-stream");
3432    let content_type = super::ContentType::from(content_type);
3433
3434    if !status.is_client_error() && !status.is_server_error() {
3435        let content = resp.text().await?;
3436        match content_type {
3437            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3438            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaginatedSamlPropertyMappingList`"))),
3439            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaginatedSamlPropertyMappingList`")))),
3440        }
3441    } else {
3442        let content = resp.text().await?;
3443        let entity: Option<PropertymappingsProviderSamlListError> = serde_json::from_str(&content).ok();
3444        Err(Error::ResponseError(ResponseContent {
3445            status,
3446            content,
3447            entity,
3448        }))
3449    }
3450}
3451
3452/// SAMLPropertyMapping Viewset
3453pub async fn propertymappings_provider_saml_partial_update(
3454    configuration: &configuration::Configuration,
3455    pm_uuid: &str,
3456    patched_saml_property_mapping_request: Option<models::PatchedSamlPropertyMappingRequest>,
3457) -> Result<models::SamlPropertyMapping, Error<PropertymappingsProviderSamlPartialUpdateError>> {
3458    // add a prefix to parameters to efficiently prevent name collisions
3459    let p_path_pm_uuid = pm_uuid;
3460    let p_body_patched_saml_property_mapping_request = patched_saml_property_mapping_request;
3461
3462    let uri_str = format!(
3463        "{}/propertymappings/provider/saml/{pm_uuid}/",
3464        configuration.base_path,
3465        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
3466    );
3467    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
3468
3469    if let Some(ref user_agent) = configuration.user_agent {
3470        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3471    }
3472    if let Some(ref token) = configuration.bearer_access_token {
3473        req_builder = req_builder.bearer_auth(token.to_owned());
3474    };
3475    req_builder = req_builder.json(&p_body_patched_saml_property_mapping_request);
3476
3477    let req = req_builder.build()?;
3478    let resp = configuration.client.execute(req).await?;
3479
3480    let status = resp.status();
3481    let content_type = resp
3482        .headers()
3483        .get("content-type")
3484        .and_then(|v| v.to_str().ok())
3485        .unwrap_or("application/octet-stream");
3486    let content_type = super::ContentType::from(content_type);
3487
3488    if !status.is_client_error() && !status.is_server_error() {
3489        let content = resp.text().await?;
3490        match content_type {
3491            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3492            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SamlPropertyMapping`"))),
3493            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SamlPropertyMapping`")))),
3494        }
3495    } else {
3496        let content = resp.text().await?;
3497        let entity: Option<PropertymappingsProviderSamlPartialUpdateError> = serde_json::from_str(&content).ok();
3498        Err(Error::ResponseError(ResponseContent {
3499            status,
3500            content,
3501            entity,
3502        }))
3503    }
3504}
3505
3506/// SAMLPropertyMapping Viewset
3507pub async fn propertymappings_provider_saml_retrieve(
3508    configuration: &configuration::Configuration,
3509    pm_uuid: &str,
3510) -> Result<models::SamlPropertyMapping, Error<PropertymappingsProviderSamlRetrieveError>> {
3511    // add a prefix to parameters to efficiently prevent name collisions
3512    let p_path_pm_uuid = pm_uuid;
3513
3514    let uri_str = format!(
3515        "{}/propertymappings/provider/saml/{pm_uuid}/",
3516        configuration.base_path,
3517        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
3518    );
3519    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3520
3521    if let Some(ref user_agent) = configuration.user_agent {
3522        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3523    }
3524    if let Some(ref token) = configuration.bearer_access_token {
3525        req_builder = req_builder.bearer_auth(token.to_owned());
3526    };
3527
3528    let req = req_builder.build()?;
3529    let resp = configuration.client.execute(req).await?;
3530
3531    let status = resp.status();
3532    let content_type = resp
3533        .headers()
3534        .get("content-type")
3535        .and_then(|v| v.to_str().ok())
3536        .unwrap_or("application/octet-stream");
3537    let content_type = super::ContentType::from(content_type);
3538
3539    if !status.is_client_error() && !status.is_server_error() {
3540        let content = resp.text().await?;
3541        match content_type {
3542            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3543            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SamlPropertyMapping`"))),
3544            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SamlPropertyMapping`")))),
3545        }
3546    } else {
3547        let content = resp.text().await?;
3548        let entity: Option<PropertymappingsProviderSamlRetrieveError> = serde_json::from_str(&content).ok();
3549        Err(Error::ResponseError(ResponseContent {
3550            status,
3551            content,
3552            entity,
3553        }))
3554    }
3555}
3556
3557/// SAMLPropertyMapping Viewset
3558pub async fn propertymappings_provider_saml_update(
3559    configuration: &configuration::Configuration,
3560    pm_uuid: &str,
3561    saml_property_mapping_request: models::SamlPropertyMappingRequest,
3562) -> Result<models::SamlPropertyMapping, Error<PropertymappingsProviderSamlUpdateError>> {
3563    // add a prefix to parameters to efficiently prevent name collisions
3564    let p_path_pm_uuid = pm_uuid;
3565    let p_body_saml_property_mapping_request = saml_property_mapping_request;
3566
3567    let uri_str = format!(
3568        "{}/propertymappings/provider/saml/{pm_uuid}/",
3569        configuration.base_path,
3570        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
3571    );
3572    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
3573
3574    if let Some(ref user_agent) = configuration.user_agent {
3575        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3576    }
3577    if let Some(ref token) = configuration.bearer_access_token {
3578        req_builder = req_builder.bearer_auth(token.to_owned());
3579    };
3580    req_builder = req_builder.json(&p_body_saml_property_mapping_request);
3581
3582    let req = req_builder.build()?;
3583    let resp = configuration.client.execute(req).await?;
3584
3585    let status = resp.status();
3586    let content_type = resp
3587        .headers()
3588        .get("content-type")
3589        .and_then(|v| v.to_str().ok())
3590        .unwrap_or("application/octet-stream");
3591    let content_type = super::ContentType::from(content_type);
3592
3593    if !status.is_client_error() && !status.is_server_error() {
3594        let content = resp.text().await?;
3595        match content_type {
3596            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3597            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SamlPropertyMapping`"))),
3598            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SamlPropertyMapping`")))),
3599        }
3600    } else {
3601        let content = resp.text().await?;
3602        let entity: Option<PropertymappingsProviderSamlUpdateError> = serde_json::from_str(&content).ok();
3603        Err(Error::ResponseError(ResponseContent {
3604            status,
3605            content,
3606            entity,
3607        }))
3608    }
3609}
3610
3611/// Get a list of all objects that use this object
3612pub async fn propertymappings_provider_saml_used_by_list(
3613    configuration: &configuration::Configuration,
3614    pm_uuid: &str,
3615) -> Result<Vec<models::UsedBy>, Error<PropertymappingsProviderSamlUsedByListError>> {
3616    // add a prefix to parameters to efficiently prevent name collisions
3617    let p_path_pm_uuid = pm_uuid;
3618
3619    let uri_str = format!(
3620        "{}/propertymappings/provider/saml/{pm_uuid}/used_by/",
3621        configuration.base_path,
3622        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
3623    );
3624    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3625
3626    if let Some(ref user_agent) = configuration.user_agent {
3627        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3628    }
3629    if let Some(ref token) = configuration.bearer_access_token {
3630        req_builder = req_builder.bearer_auth(token.to_owned());
3631    };
3632
3633    let req = req_builder.build()?;
3634    let resp = configuration.client.execute(req).await?;
3635
3636    let status = resp.status();
3637    let content_type = resp
3638        .headers()
3639        .get("content-type")
3640        .and_then(|v| v.to_str().ok())
3641        .unwrap_or("application/octet-stream");
3642    let content_type = super::ContentType::from(content_type);
3643
3644    if !status.is_client_error() && !status.is_server_error() {
3645        let content = resp.text().await?;
3646        match content_type {
3647            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3648            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`"))),
3649            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`")))),
3650        }
3651    } else {
3652        let content = resp.text().await?;
3653        let entity: Option<PropertymappingsProviderSamlUsedByListError> = serde_json::from_str(&content).ok();
3654        Err(Error::ResponseError(ResponseContent {
3655            status,
3656            content,
3657            entity,
3658        }))
3659    }
3660}
3661
3662/// SCIMMapping Viewset
3663pub async fn propertymappings_provider_scim_create(
3664    configuration: &configuration::Configuration,
3665    scim_mapping_request: models::ScimMappingRequest,
3666) -> Result<models::ScimMapping, Error<PropertymappingsProviderScimCreateError>> {
3667    // add a prefix to parameters to efficiently prevent name collisions
3668    let p_body_scim_mapping_request = scim_mapping_request;
3669
3670    let uri_str = format!("{}/propertymappings/provider/scim/", configuration.base_path);
3671    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
3672
3673    if let Some(ref user_agent) = configuration.user_agent {
3674        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3675    }
3676    if let Some(ref token) = configuration.bearer_access_token {
3677        req_builder = req_builder.bearer_auth(token.to_owned());
3678    };
3679    req_builder = req_builder.json(&p_body_scim_mapping_request);
3680
3681    let req = req_builder.build()?;
3682    let resp = configuration.client.execute(req).await?;
3683
3684    let status = resp.status();
3685    let content_type = resp
3686        .headers()
3687        .get("content-type")
3688        .and_then(|v| v.to_str().ok())
3689        .unwrap_or("application/octet-stream");
3690    let content_type = super::ContentType::from(content_type);
3691
3692    if !status.is_client_error() && !status.is_server_error() {
3693        let content = resp.text().await?;
3694        match content_type {
3695            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3696            ContentType::Text => {
3697                return Err(Error::from(serde_json::Error::custom(
3698                    "Received `text/plain` content type response that cannot be converted to `models::ScimMapping`",
3699                )))
3700            }
3701            ContentType::Unsupported(unknown_type) => {
3702                return Err(Error::from(serde_json::Error::custom(format!(
3703                    "Received `{unknown_type}` content type response that cannot be converted to `models::ScimMapping`"
3704                ))))
3705            }
3706        }
3707    } else {
3708        let content = resp.text().await?;
3709        let entity: Option<PropertymappingsProviderScimCreateError> = serde_json::from_str(&content).ok();
3710        Err(Error::ResponseError(ResponseContent {
3711            status,
3712            content,
3713            entity,
3714        }))
3715    }
3716}
3717
3718/// SCIMMapping Viewset
3719pub async fn propertymappings_provider_scim_destroy(
3720    configuration: &configuration::Configuration,
3721    pm_uuid: &str,
3722) -> Result<(), Error<PropertymappingsProviderScimDestroyError>> {
3723    // add a prefix to parameters to efficiently prevent name collisions
3724    let p_path_pm_uuid = pm_uuid;
3725
3726    let uri_str = format!(
3727        "{}/propertymappings/provider/scim/{pm_uuid}/",
3728        configuration.base_path,
3729        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
3730    );
3731    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
3732
3733    if let Some(ref user_agent) = configuration.user_agent {
3734        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3735    }
3736    if let Some(ref token) = configuration.bearer_access_token {
3737        req_builder = req_builder.bearer_auth(token.to_owned());
3738    };
3739
3740    let req = req_builder.build()?;
3741    let resp = configuration.client.execute(req).await?;
3742
3743    let status = resp.status();
3744
3745    if !status.is_client_error() && !status.is_server_error() {
3746        Ok(())
3747    } else {
3748        let content = resp.text().await?;
3749        let entity: Option<PropertymappingsProviderScimDestroyError> = serde_json::from_str(&content).ok();
3750        Err(Error::ResponseError(ResponseContent {
3751            status,
3752            content,
3753            entity,
3754        }))
3755    }
3756}
3757
3758/// SCIMMapping Viewset
3759pub async fn propertymappings_provider_scim_list(
3760    configuration: &configuration::Configuration,
3761    managed: Option<Vec<String>>,
3762    managed__isnull: Option<bool>,
3763    name: Option<&str>,
3764    ordering: Option<&str>,
3765    page: Option<i32>,
3766    page_size: Option<i32>,
3767    search: Option<&str>,
3768) -> Result<models::PaginatedScimMappingList, Error<PropertymappingsProviderScimListError>> {
3769    // add a prefix to parameters to efficiently prevent name collisions
3770    let p_query_managed = managed;
3771    let p_query_managed__isnull = managed__isnull;
3772    let p_query_name = name;
3773    let p_query_ordering = ordering;
3774    let p_query_page = page;
3775    let p_query_page_size = page_size;
3776    let p_query_search = search;
3777
3778    let uri_str = format!("{}/propertymappings/provider/scim/", configuration.base_path);
3779    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3780
3781    if let Some(ref param_value) = p_query_managed {
3782        req_builder = match "multi" {
3783            "multi" => req_builder.query(
3784                &param_value
3785                    .into_iter()
3786                    .map(|p| ("managed".to_owned(), p.to_string()))
3787                    .collect::<Vec<(std::string::String, std::string::String)>>(),
3788            ),
3789            _ => req_builder.query(&[(
3790                "managed",
3791                &param_value
3792                    .into_iter()
3793                    .map(|p| p.to_string())
3794                    .collect::<Vec<String>>()
3795                    .join(",")
3796                    .to_string(),
3797            )]),
3798        };
3799    }
3800    if let Some(ref param_value) = p_query_managed__isnull {
3801        req_builder = req_builder.query(&[("managed__isnull", &param_value.to_string())]);
3802    }
3803    if let Some(ref param_value) = p_query_name {
3804        req_builder = req_builder.query(&[("name", &param_value.to_string())]);
3805    }
3806    if let Some(ref param_value) = p_query_ordering {
3807        req_builder = req_builder.query(&[("ordering", &param_value.to_string())]);
3808    }
3809    if let Some(ref param_value) = p_query_page {
3810        req_builder = req_builder.query(&[("page", &param_value.to_string())]);
3811    }
3812    if let Some(ref param_value) = p_query_page_size {
3813        req_builder = req_builder.query(&[("page_size", &param_value.to_string())]);
3814    }
3815    if let Some(ref param_value) = p_query_search {
3816        req_builder = req_builder.query(&[("search", &param_value.to_string())]);
3817    }
3818    if let Some(ref user_agent) = configuration.user_agent {
3819        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3820    }
3821    if let Some(ref token) = configuration.bearer_access_token {
3822        req_builder = req_builder.bearer_auth(token.to_owned());
3823    };
3824
3825    let req = req_builder.build()?;
3826    let resp = configuration.client.execute(req).await?;
3827
3828    let status = resp.status();
3829    let content_type = resp
3830        .headers()
3831        .get("content-type")
3832        .and_then(|v| v.to_str().ok())
3833        .unwrap_or("application/octet-stream");
3834    let content_type = super::ContentType::from(content_type);
3835
3836    if !status.is_client_error() && !status.is_server_error() {
3837        let content = resp.text().await?;
3838        match content_type {
3839            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3840            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaginatedScimMappingList`"))),
3841            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaginatedScimMappingList`")))),
3842        }
3843    } else {
3844        let content = resp.text().await?;
3845        let entity: Option<PropertymappingsProviderScimListError> = serde_json::from_str(&content).ok();
3846        Err(Error::ResponseError(ResponseContent {
3847            status,
3848            content,
3849            entity,
3850        }))
3851    }
3852}
3853
3854/// SCIMMapping Viewset
3855pub async fn propertymappings_provider_scim_partial_update(
3856    configuration: &configuration::Configuration,
3857    pm_uuid: &str,
3858    patched_scim_mapping_request: Option<models::PatchedScimMappingRequest>,
3859) -> Result<models::ScimMapping, Error<PropertymappingsProviderScimPartialUpdateError>> {
3860    // add a prefix to parameters to efficiently prevent name collisions
3861    let p_path_pm_uuid = pm_uuid;
3862    let p_body_patched_scim_mapping_request = patched_scim_mapping_request;
3863
3864    let uri_str = format!(
3865        "{}/propertymappings/provider/scim/{pm_uuid}/",
3866        configuration.base_path,
3867        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
3868    );
3869    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
3870
3871    if let Some(ref user_agent) = configuration.user_agent {
3872        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3873    }
3874    if let Some(ref token) = configuration.bearer_access_token {
3875        req_builder = req_builder.bearer_auth(token.to_owned());
3876    };
3877    req_builder = req_builder.json(&p_body_patched_scim_mapping_request);
3878
3879    let req = req_builder.build()?;
3880    let resp = configuration.client.execute(req).await?;
3881
3882    let status = resp.status();
3883    let content_type = resp
3884        .headers()
3885        .get("content-type")
3886        .and_then(|v| v.to_str().ok())
3887        .unwrap_or("application/octet-stream");
3888    let content_type = super::ContentType::from(content_type);
3889
3890    if !status.is_client_error() && !status.is_server_error() {
3891        let content = resp.text().await?;
3892        match content_type {
3893            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3894            ContentType::Text => {
3895                return Err(Error::from(serde_json::Error::custom(
3896                    "Received `text/plain` content type response that cannot be converted to `models::ScimMapping`",
3897                )))
3898            }
3899            ContentType::Unsupported(unknown_type) => {
3900                return Err(Error::from(serde_json::Error::custom(format!(
3901                    "Received `{unknown_type}` content type response that cannot be converted to `models::ScimMapping`"
3902                ))))
3903            }
3904        }
3905    } else {
3906        let content = resp.text().await?;
3907        let entity: Option<PropertymappingsProviderScimPartialUpdateError> = serde_json::from_str(&content).ok();
3908        Err(Error::ResponseError(ResponseContent {
3909            status,
3910            content,
3911            entity,
3912        }))
3913    }
3914}
3915
3916/// SCIMMapping Viewset
3917pub async fn propertymappings_provider_scim_retrieve(
3918    configuration: &configuration::Configuration,
3919    pm_uuid: &str,
3920) -> Result<models::ScimMapping, Error<PropertymappingsProviderScimRetrieveError>> {
3921    // add a prefix to parameters to efficiently prevent name collisions
3922    let p_path_pm_uuid = pm_uuid;
3923
3924    let uri_str = format!(
3925        "{}/propertymappings/provider/scim/{pm_uuid}/",
3926        configuration.base_path,
3927        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
3928    );
3929    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3930
3931    if let Some(ref user_agent) = configuration.user_agent {
3932        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3933    }
3934    if let Some(ref token) = configuration.bearer_access_token {
3935        req_builder = req_builder.bearer_auth(token.to_owned());
3936    };
3937
3938    let req = req_builder.build()?;
3939    let resp = configuration.client.execute(req).await?;
3940
3941    let status = resp.status();
3942    let content_type = resp
3943        .headers()
3944        .get("content-type")
3945        .and_then(|v| v.to_str().ok())
3946        .unwrap_or("application/octet-stream");
3947    let content_type = super::ContentType::from(content_type);
3948
3949    if !status.is_client_error() && !status.is_server_error() {
3950        let content = resp.text().await?;
3951        match content_type {
3952            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3953            ContentType::Text => {
3954                return Err(Error::from(serde_json::Error::custom(
3955                    "Received `text/plain` content type response that cannot be converted to `models::ScimMapping`",
3956                )))
3957            }
3958            ContentType::Unsupported(unknown_type) => {
3959                return Err(Error::from(serde_json::Error::custom(format!(
3960                    "Received `{unknown_type}` content type response that cannot be converted to `models::ScimMapping`"
3961                ))))
3962            }
3963        }
3964    } else {
3965        let content = resp.text().await?;
3966        let entity: Option<PropertymappingsProviderScimRetrieveError> = serde_json::from_str(&content).ok();
3967        Err(Error::ResponseError(ResponseContent {
3968            status,
3969            content,
3970            entity,
3971        }))
3972    }
3973}
3974
3975/// SCIMMapping Viewset
3976pub async fn propertymappings_provider_scim_update(
3977    configuration: &configuration::Configuration,
3978    pm_uuid: &str,
3979    scim_mapping_request: models::ScimMappingRequest,
3980) -> Result<models::ScimMapping, Error<PropertymappingsProviderScimUpdateError>> {
3981    // add a prefix to parameters to efficiently prevent name collisions
3982    let p_path_pm_uuid = pm_uuid;
3983    let p_body_scim_mapping_request = scim_mapping_request;
3984
3985    let uri_str = format!(
3986        "{}/propertymappings/provider/scim/{pm_uuid}/",
3987        configuration.base_path,
3988        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
3989    );
3990    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
3991
3992    if let Some(ref user_agent) = configuration.user_agent {
3993        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3994    }
3995    if let Some(ref token) = configuration.bearer_access_token {
3996        req_builder = req_builder.bearer_auth(token.to_owned());
3997    };
3998    req_builder = req_builder.json(&p_body_scim_mapping_request);
3999
4000    let req = req_builder.build()?;
4001    let resp = configuration.client.execute(req).await?;
4002
4003    let status = resp.status();
4004    let content_type = resp
4005        .headers()
4006        .get("content-type")
4007        .and_then(|v| v.to_str().ok())
4008        .unwrap_or("application/octet-stream");
4009    let content_type = super::ContentType::from(content_type);
4010
4011    if !status.is_client_error() && !status.is_server_error() {
4012        let content = resp.text().await?;
4013        match content_type {
4014            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4015            ContentType::Text => {
4016                return Err(Error::from(serde_json::Error::custom(
4017                    "Received `text/plain` content type response that cannot be converted to `models::ScimMapping`",
4018                )))
4019            }
4020            ContentType::Unsupported(unknown_type) => {
4021                return Err(Error::from(serde_json::Error::custom(format!(
4022                    "Received `{unknown_type}` content type response that cannot be converted to `models::ScimMapping`"
4023                ))))
4024            }
4025        }
4026    } else {
4027        let content = resp.text().await?;
4028        let entity: Option<PropertymappingsProviderScimUpdateError> = serde_json::from_str(&content).ok();
4029        Err(Error::ResponseError(ResponseContent {
4030            status,
4031            content,
4032            entity,
4033        }))
4034    }
4035}
4036
4037/// Get a list of all objects that use this object
4038pub async fn propertymappings_provider_scim_used_by_list(
4039    configuration: &configuration::Configuration,
4040    pm_uuid: &str,
4041) -> Result<Vec<models::UsedBy>, Error<PropertymappingsProviderScimUsedByListError>> {
4042    // add a prefix to parameters to efficiently prevent name collisions
4043    let p_path_pm_uuid = pm_uuid;
4044
4045    let uri_str = format!(
4046        "{}/propertymappings/provider/scim/{pm_uuid}/used_by/",
4047        configuration.base_path,
4048        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
4049    );
4050    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4051
4052    if let Some(ref user_agent) = configuration.user_agent {
4053        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4054    }
4055    if let Some(ref token) = configuration.bearer_access_token {
4056        req_builder = req_builder.bearer_auth(token.to_owned());
4057    };
4058
4059    let req = req_builder.build()?;
4060    let resp = configuration.client.execute(req).await?;
4061
4062    let status = resp.status();
4063    let content_type = resp
4064        .headers()
4065        .get("content-type")
4066        .and_then(|v| v.to_str().ok())
4067        .unwrap_or("application/octet-stream");
4068    let content_type = super::ContentType::from(content_type);
4069
4070    if !status.is_client_error() && !status.is_server_error() {
4071        let content = resp.text().await?;
4072        match content_type {
4073            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4074            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`"))),
4075            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`")))),
4076        }
4077    } else {
4078        let content = resp.text().await?;
4079        let entity: Option<PropertymappingsProviderScimUsedByListError> = serde_json::from_str(&content).ok();
4080        Err(Error::ResponseError(ResponseContent {
4081            status,
4082            content,
4083            entity,
4084        }))
4085    }
4086}
4087
4088/// ScopeMapping Viewset
4089pub async fn propertymappings_provider_scope_create(
4090    configuration: &configuration::Configuration,
4091    scope_mapping_request: models::ScopeMappingRequest,
4092) -> Result<models::ScopeMapping, Error<PropertymappingsProviderScopeCreateError>> {
4093    // add a prefix to parameters to efficiently prevent name collisions
4094    let p_body_scope_mapping_request = scope_mapping_request;
4095
4096    let uri_str = format!("{}/propertymappings/provider/scope/", configuration.base_path);
4097    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4098
4099    if let Some(ref user_agent) = configuration.user_agent {
4100        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4101    }
4102    if let Some(ref token) = configuration.bearer_access_token {
4103        req_builder = req_builder.bearer_auth(token.to_owned());
4104    };
4105    req_builder = req_builder.json(&p_body_scope_mapping_request);
4106
4107    let req = req_builder.build()?;
4108    let resp = configuration.client.execute(req).await?;
4109
4110    let status = resp.status();
4111    let content_type = resp
4112        .headers()
4113        .get("content-type")
4114        .and_then(|v| v.to_str().ok())
4115        .unwrap_or("application/octet-stream");
4116    let content_type = super::ContentType::from(content_type);
4117
4118    if !status.is_client_error() && !status.is_server_error() {
4119        let content = resp.text().await?;
4120        match content_type {
4121            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4122            ContentType::Text => {
4123                return Err(Error::from(serde_json::Error::custom(
4124                    "Received `text/plain` content type response that cannot be converted to `models::ScopeMapping`",
4125                )))
4126            }
4127            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!(
4128                "Received `{unknown_type}` content type response that cannot be converted to `models::ScopeMapping`"
4129            )))),
4130        }
4131    } else {
4132        let content = resp.text().await?;
4133        let entity: Option<PropertymappingsProviderScopeCreateError> = serde_json::from_str(&content).ok();
4134        Err(Error::ResponseError(ResponseContent {
4135            status,
4136            content,
4137            entity,
4138        }))
4139    }
4140}
4141
4142/// ScopeMapping Viewset
4143pub async fn propertymappings_provider_scope_destroy(
4144    configuration: &configuration::Configuration,
4145    pm_uuid: &str,
4146) -> Result<(), Error<PropertymappingsProviderScopeDestroyError>> {
4147    // add a prefix to parameters to efficiently prevent name collisions
4148    let p_path_pm_uuid = pm_uuid;
4149
4150    let uri_str = format!(
4151        "{}/propertymappings/provider/scope/{pm_uuid}/",
4152        configuration.base_path,
4153        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
4154    );
4155    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4156
4157    if let Some(ref user_agent) = configuration.user_agent {
4158        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4159    }
4160    if let Some(ref token) = configuration.bearer_access_token {
4161        req_builder = req_builder.bearer_auth(token.to_owned());
4162    };
4163
4164    let req = req_builder.build()?;
4165    let resp = configuration.client.execute(req).await?;
4166
4167    let status = resp.status();
4168
4169    if !status.is_client_error() && !status.is_server_error() {
4170        Ok(())
4171    } else {
4172        let content = resp.text().await?;
4173        let entity: Option<PropertymappingsProviderScopeDestroyError> = serde_json::from_str(&content).ok();
4174        Err(Error::ResponseError(ResponseContent {
4175            status,
4176            content,
4177            entity,
4178        }))
4179    }
4180}
4181
4182/// ScopeMapping Viewset
4183pub async fn propertymappings_provider_scope_list(
4184    configuration: &configuration::Configuration,
4185    managed: Option<Vec<String>>,
4186    managed__isnull: Option<bool>,
4187    name: Option<&str>,
4188    ordering: Option<&str>,
4189    page: Option<i32>,
4190    page_size: Option<i32>,
4191    scope_name: Option<&str>,
4192    search: Option<&str>,
4193) -> Result<models::PaginatedScopeMappingList, Error<PropertymappingsProviderScopeListError>> {
4194    // add a prefix to parameters to efficiently prevent name collisions
4195    let p_query_managed = managed;
4196    let p_query_managed__isnull = managed__isnull;
4197    let p_query_name = name;
4198    let p_query_ordering = ordering;
4199    let p_query_page = page;
4200    let p_query_page_size = page_size;
4201    let p_query_scope_name = scope_name;
4202    let p_query_search = search;
4203
4204    let uri_str = format!("{}/propertymappings/provider/scope/", configuration.base_path);
4205    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4206
4207    if let Some(ref param_value) = p_query_managed {
4208        req_builder = match "multi" {
4209            "multi" => req_builder.query(
4210                &param_value
4211                    .into_iter()
4212                    .map(|p| ("managed".to_owned(), p.to_string()))
4213                    .collect::<Vec<(std::string::String, std::string::String)>>(),
4214            ),
4215            _ => req_builder.query(&[(
4216                "managed",
4217                &param_value
4218                    .into_iter()
4219                    .map(|p| p.to_string())
4220                    .collect::<Vec<String>>()
4221                    .join(",")
4222                    .to_string(),
4223            )]),
4224        };
4225    }
4226    if let Some(ref param_value) = p_query_managed__isnull {
4227        req_builder = req_builder.query(&[("managed__isnull", &param_value.to_string())]);
4228    }
4229    if let Some(ref param_value) = p_query_name {
4230        req_builder = req_builder.query(&[("name", &param_value.to_string())]);
4231    }
4232    if let Some(ref param_value) = p_query_ordering {
4233        req_builder = req_builder.query(&[("ordering", &param_value.to_string())]);
4234    }
4235    if let Some(ref param_value) = p_query_page {
4236        req_builder = req_builder.query(&[("page", &param_value.to_string())]);
4237    }
4238    if let Some(ref param_value) = p_query_page_size {
4239        req_builder = req_builder.query(&[("page_size", &param_value.to_string())]);
4240    }
4241    if let Some(ref param_value) = p_query_scope_name {
4242        req_builder = req_builder.query(&[("scope_name", &param_value.to_string())]);
4243    }
4244    if let Some(ref param_value) = p_query_search {
4245        req_builder = req_builder.query(&[("search", &param_value.to_string())]);
4246    }
4247    if let Some(ref user_agent) = configuration.user_agent {
4248        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4249    }
4250    if let Some(ref token) = configuration.bearer_access_token {
4251        req_builder = req_builder.bearer_auth(token.to_owned());
4252    };
4253
4254    let req = req_builder.build()?;
4255    let resp = configuration.client.execute(req).await?;
4256
4257    let status = resp.status();
4258    let content_type = resp
4259        .headers()
4260        .get("content-type")
4261        .and_then(|v| v.to_str().ok())
4262        .unwrap_or("application/octet-stream");
4263    let content_type = super::ContentType::from(content_type);
4264
4265    if !status.is_client_error() && !status.is_server_error() {
4266        let content = resp.text().await?;
4267        match content_type {
4268            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4269            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaginatedScopeMappingList`"))),
4270            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaginatedScopeMappingList`")))),
4271        }
4272    } else {
4273        let content = resp.text().await?;
4274        let entity: Option<PropertymappingsProviderScopeListError> = serde_json::from_str(&content).ok();
4275        Err(Error::ResponseError(ResponseContent {
4276            status,
4277            content,
4278            entity,
4279        }))
4280    }
4281}
4282
4283/// ScopeMapping Viewset
4284pub async fn propertymappings_provider_scope_partial_update(
4285    configuration: &configuration::Configuration,
4286    pm_uuid: &str,
4287    patched_scope_mapping_request: Option<models::PatchedScopeMappingRequest>,
4288) -> Result<models::ScopeMapping, Error<PropertymappingsProviderScopePartialUpdateError>> {
4289    // add a prefix to parameters to efficiently prevent name collisions
4290    let p_path_pm_uuid = pm_uuid;
4291    let p_body_patched_scope_mapping_request = patched_scope_mapping_request;
4292
4293    let uri_str = format!(
4294        "{}/propertymappings/provider/scope/{pm_uuid}/",
4295        configuration.base_path,
4296        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
4297    );
4298    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
4299
4300    if let Some(ref user_agent) = configuration.user_agent {
4301        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4302    }
4303    if let Some(ref token) = configuration.bearer_access_token {
4304        req_builder = req_builder.bearer_auth(token.to_owned());
4305    };
4306    req_builder = req_builder.json(&p_body_patched_scope_mapping_request);
4307
4308    let req = req_builder.build()?;
4309    let resp = configuration.client.execute(req).await?;
4310
4311    let status = resp.status();
4312    let content_type = resp
4313        .headers()
4314        .get("content-type")
4315        .and_then(|v| v.to_str().ok())
4316        .unwrap_or("application/octet-stream");
4317    let content_type = super::ContentType::from(content_type);
4318
4319    if !status.is_client_error() && !status.is_server_error() {
4320        let content = resp.text().await?;
4321        match content_type {
4322            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4323            ContentType::Text => {
4324                return Err(Error::from(serde_json::Error::custom(
4325                    "Received `text/plain` content type response that cannot be converted to `models::ScopeMapping`",
4326                )))
4327            }
4328            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!(
4329                "Received `{unknown_type}` content type response that cannot be converted to `models::ScopeMapping`"
4330            )))),
4331        }
4332    } else {
4333        let content = resp.text().await?;
4334        let entity: Option<PropertymappingsProviderScopePartialUpdateError> = serde_json::from_str(&content).ok();
4335        Err(Error::ResponseError(ResponseContent {
4336            status,
4337            content,
4338            entity,
4339        }))
4340    }
4341}
4342
4343/// ScopeMapping Viewset
4344pub async fn propertymappings_provider_scope_retrieve(
4345    configuration: &configuration::Configuration,
4346    pm_uuid: &str,
4347) -> Result<models::ScopeMapping, Error<PropertymappingsProviderScopeRetrieveError>> {
4348    // add a prefix to parameters to efficiently prevent name collisions
4349    let p_path_pm_uuid = pm_uuid;
4350
4351    let uri_str = format!(
4352        "{}/propertymappings/provider/scope/{pm_uuid}/",
4353        configuration.base_path,
4354        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
4355    );
4356    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4357
4358    if let Some(ref user_agent) = configuration.user_agent {
4359        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4360    }
4361    if let Some(ref token) = configuration.bearer_access_token {
4362        req_builder = req_builder.bearer_auth(token.to_owned());
4363    };
4364
4365    let req = req_builder.build()?;
4366    let resp = configuration.client.execute(req).await?;
4367
4368    let status = resp.status();
4369    let content_type = resp
4370        .headers()
4371        .get("content-type")
4372        .and_then(|v| v.to_str().ok())
4373        .unwrap_or("application/octet-stream");
4374    let content_type = super::ContentType::from(content_type);
4375
4376    if !status.is_client_error() && !status.is_server_error() {
4377        let content = resp.text().await?;
4378        match content_type {
4379            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4380            ContentType::Text => {
4381                return Err(Error::from(serde_json::Error::custom(
4382                    "Received `text/plain` content type response that cannot be converted to `models::ScopeMapping`",
4383                )))
4384            }
4385            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!(
4386                "Received `{unknown_type}` content type response that cannot be converted to `models::ScopeMapping`"
4387            )))),
4388        }
4389    } else {
4390        let content = resp.text().await?;
4391        let entity: Option<PropertymappingsProviderScopeRetrieveError> = serde_json::from_str(&content).ok();
4392        Err(Error::ResponseError(ResponseContent {
4393            status,
4394            content,
4395            entity,
4396        }))
4397    }
4398}
4399
4400/// ScopeMapping Viewset
4401pub async fn propertymappings_provider_scope_update(
4402    configuration: &configuration::Configuration,
4403    pm_uuid: &str,
4404    scope_mapping_request: models::ScopeMappingRequest,
4405) -> Result<models::ScopeMapping, Error<PropertymappingsProviderScopeUpdateError>> {
4406    // add a prefix to parameters to efficiently prevent name collisions
4407    let p_path_pm_uuid = pm_uuid;
4408    let p_body_scope_mapping_request = scope_mapping_request;
4409
4410    let uri_str = format!(
4411        "{}/propertymappings/provider/scope/{pm_uuid}/",
4412        configuration.base_path,
4413        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
4414    );
4415    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
4416
4417    if let Some(ref user_agent) = configuration.user_agent {
4418        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4419    }
4420    if let Some(ref token) = configuration.bearer_access_token {
4421        req_builder = req_builder.bearer_auth(token.to_owned());
4422    };
4423    req_builder = req_builder.json(&p_body_scope_mapping_request);
4424
4425    let req = req_builder.build()?;
4426    let resp = configuration.client.execute(req).await?;
4427
4428    let status = resp.status();
4429    let content_type = resp
4430        .headers()
4431        .get("content-type")
4432        .and_then(|v| v.to_str().ok())
4433        .unwrap_or("application/octet-stream");
4434    let content_type = super::ContentType::from(content_type);
4435
4436    if !status.is_client_error() && !status.is_server_error() {
4437        let content = resp.text().await?;
4438        match content_type {
4439            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4440            ContentType::Text => {
4441                return Err(Error::from(serde_json::Error::custom(
4442                    "Received `text/plain` content type response that cannot be converted to `models::ScopeMapping`",
4443                )))
4444            }
4445            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!(
4446                "Received `{unknown_type}` content type response that cannot be converted to `models::ScopeMapping`"
4447            )))),
4448        }
4449    } else {
4450        let content = resp.text().await?;
4451        let entity: Option<PropertymappingsProviderScopeUpdateError> = serde_json::from_str(&content).ok();
4452        Err(Error::ResponseError(ResponseContent {
4453            status,
4454            content,
4455            entity,
4456        }))
4457    }
4458}
4459
4460/// Get a list of all objects that use this object
4461pub async fn propertymappings_provider_scope_used_by_list(
4462    configuration: &configuration::Configuration,
4463    pm_uuid: &str,
4464) -> Result<Vec<models::UsedBy>, Error<PropertymappingsProviderScopeUsedByListError>> {
4465    // add a prefix to parameters to efficiently prevent name collisions
4466    let p_path_pm_uuid = pm_uuid;
4467
4468    let uri_str = format!(
4469        "{}/propertymappings/provider/scope/{pm_uuid}/used_by/",
4470        configuration.base_path,
4471        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
4472    );
4473    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4474
4475    if let Some(ref user_agent) = configuration.user_agent {
4476        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4477    }
4478    if let Some(ref token) = configuration.bearer_access_token {
4479        req_builder = req_builder.bearer_auth(token.to_owned());
4480    };
4481
4482    let req = req_builder.build()?;
4483    let resp = configuration.client.execute(req).await?;
4484
4485    let status = resp.status();
4486    let content_type = resp
4487        .headers()
4488        .get("content-type")
4489        .and_then(|v| v.to_str().ok())
4490        .unwrap_or("application/octet-stream");
4491    let content_type = super::ContentType::from(content_type);
4492
4493    if !status.is_client_error() && !status.is_server_error() {
4494        let content = resp.text().await?;
4495        match content_type {
4496            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4497            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`"))),
4498            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`")))),
4499        }
4500    } else {
4501        let content = resp.text().await?;
4502        let entity: Option<PropertymappingsProviderScopeUsedByListError> = serde_json::from_str(&content).ok();
4503        Err(Error::ResponseError(ResponseContent {
4504            status,
4505            content,
4506            entity,
4507        }))
4508    }
4509}
4510
4511/// KerberosSource PropertyMapping Viewset
4512pub async fn propertymappings_source_kerberos_create(
4513    configuration: &configuration::Configuration,
4514    kerberos_source_property_mapping_request: models::KerberosSourcePropertyMappingRequest,
4515) -> Result<models::KerberosSourcePropertyMapping, Error<PropertymappingsSourceKerberosCreateError>> {
4516    // add a prefix to parameters to efficiently prevent name collisions
4517    let p_body_kerberos_source_property_mapping_request = kerberos_source_property_mapping_request;
4518
4519    let uri_str = format!("{}/propertymappings/source/kerberos/", configuration.base_path);
4520    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4521
4522    if let Some(ref user_agent) = configuration.user_agent {
4523        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4524    }
4525    if let Some(ref token) = configuration.bearer_access_token {
4526        req_builder = req_builder.bearer_auth(token.to_owned());
4527    };
4528    req_builder = req_builder.json(&p_body_kerberos_source_property_mapping_request);
4529
4530    let req = req_builder.build()?;
4531    let resp = configuration.client.execute(req).await?;
4532
4533    let status = resp.status();
4534    let content_type = resp
4535        .headers()
4536        .get("content-type")
4537        .and_then(|v| v.to_str().ok())
4538        .unwrap_or("application/octet-stream");
4539    let content_type = super::ContentType::from(content_type);
4540
4541    if !status.is_client_error() && !status.is_server_error() {
4542        let content = resp.text().await?;
4543        match content_type {
4544            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4545            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::KerberosSourcePropertyMapping`"))),
4546            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::KerberosSourcePropertyMapping`")))),
4547        }
4548    } else {
4549        let content = resp.text().await?;
4550        let entity: Option<PropertymappingsSourceKerberosCreateError> = serde_json::from_str(&content).ok();
4551        Err(Error::ResponseError(ResponseContent {
4552            status,
4553            content,
4554            entity,
4555        }))
4556    }
4557}
4558
4559/// KerberosSource PropertyMapping Viewset
4560pub async fn propertymappings_source_kerberos_destroy(
4561    configuration: &configuration::Configuration,
4562    pm_uuid: &str,
4563) -> Result<(), Error<PropertymappingsSourceKerberosDestroyError>> {
4564    // add a prefix to parameters to efficiently prevent name collisions
4565    let p_path_pm_uuid = pm_uuid;
4566
4567    let uri_str = format!(
4568        "{}/propertymappings/source/kerberos/{pm_uuid}/",
4569        configuration.base_path,
4570        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
4571    );
4572    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4573
4574    if let Some(ref user_agent) = configuration.user_agent {
4575        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4576    }
4577    if let Some(ref token) = configuration.bearer_access_token {
4578        req_builder = req_builder.bearer_auth(token.to_owned());
4579    };
4580
4581    let req = req_builder.build()?;
4582    let resp = configuration.client.execute(req).await?;
4583
4584    let status = resp.status();
4585
4586    if !status.is_client_error() && !status.is_server_error() {
4587        Ok(())
4588    } else {
4589        let content = resp.text().await?;
4590        let entity: Option<PropertymappingsSourceKerberosDestroyError> = serde_json::from_str(&content).ok();
4591        Err(Error::ResponseError(ResponseContent {
4592            status,
4593            content,
4594            entity,
4595        }))
4596    }
4597}
4598
4599/// KerberosSource PropertyMapping Viewset
4600pub async fn propertymappings_source_kerberos_list(
4601    configuration: &configuration::Configuration,
4602    managed: Option<Vec<String>>,
4603    managed__isnull: Option<bool>,
4604    name: Option<&str>,
4605    ordering: Option<&str>,
4606    page: Option<i32>,
4607    page_size: Option<i32>,
4608    search: Option<&str>,
4609) -> Result<models::PaginatedKerberosSourcePropertyMappingList, Error<PropertymappingsSourceKerberosListError>> {
4610    // add a prefix to parameters to efficiently prevent name collisions
4611    let p_query_managed = managed;
4612    let p_query_managed__isnull = managed__isnull;
4613    let p_query_name = name;
4614    let p_query_ordering = ordering;
4615    let p_query_page = page;
4616    let p_query_page_size = page_size;
4617    let p_query_search = search;
4618
4619    let uri_str = format!("{}/propertymappings/source/kerberos/", configuration.base_path);
4620    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4621
4622    if let Some(ref param_value) = p_query_managed {
4623        req_builder = match "multi" {
4624            "multi" => req_builder.query(
4625                &param_value
4626                    .into_iter()
4627                    .map(|p| ("managed".to_owned(), p.to_string()))
4628                    .collect::<Vec<(std::string::String, std::string::String)>>(),
4629            ),
4630            _ => req_builder.query(&[(
4631                "managed",
4632                &param_value
4633                    .into_iter()
4634                    .map(|p| p.to_string())
4635                    .collect::<Vec<String>>()
4636                    .join(",")
4637                    .to_string(),
4638            )]),
4639        };
4640    }
4641    if let Some(ref param_value) = p_query_managed__isnull {
4642        req_builder = req_builder.query(&[("managed__isnull", &param_value.to_string())]);
4643    }
4644    if let Some(ref param_value) = p_query_name {
4645        req_builder = req_builder.query(&[("name", &param_value.to_string())]);
4646    }
4647    if let Some(ref param_value) = p_query_ordering {
4648        req_builder = req_builder.query(&[("ordering", &param_value.to_string())]);
4649    }
4650    if let Some(ref param_value) = p_query_page {
4651        req_builder = req_builder.query(&[("page", &param_value.to_string())]);
4652    }
4653    if let Some(ref param_value) = p_query_page_size {
4654        req_builder = req_builder.query(&[("page_size", &param_value.to_string())]);
4655    }
4656    if let Some(ref param_value) = p_query_search {
4657        req_builder = req_builder.query(&[("search", &param_value.to_string())]);
4658    }
4659    if let Some(ref user_agent) = configuration.user_agent {
4660        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4661    }
4662    if let Some(ref token) = configuration.bearer_access_token {
4663        req_builder = req_builder.bearer_auth(token.to_owned());
4664    };
4665
4666    let req = req_builder.build()?;
4667    let resp = configuration.client.execute(req).await?;
4668
4669    let status = resp.status();
4670    let content_type = resp
4671        .headers()
4672        .get("content-type")
4673        .and_then(|v| v.to_str().ok())
4674        .unwrap_or("application/octet-stream");
4675    let content_type = super::ContentType::from(content_type);
4676
4677    if !status.is_client_error() && !status.is_server_error() {
4678        let content = resp.text().await?;
4679        match content_type {
4680            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4681            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaginatedKerberosSourcePropertyMappingList`"))),
4682            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaginatedKerberosSourcePropertyMappingList`")))),
4683        }
4684    } else {
4685        let content = resp.text().await?;
4686        let entity: Option<PropertymappingsSourceKerberosListError> = serde_json::from_str(&content).ok();
4687        Err(Error::ResponseError(ResponseContent {
4688            status,
4689            content,
4690            entity,
4691        }))
4692    }
4693}
4694
4695/// KerberosSource PropertyMapping Viewset
4696pub async fn propertymappings_source_kerberos_partial_update(
4697    configuration: &configuration::Configuration,
4698    pm_uuid: &str,
4699    patched_kerberos_source_property_mapping_request: Option<models::PatchedKerberosSourcePropertyMappingRequest>,
4700) -> Result<models::KerberosSourcePropertyMapping, Error<PropertymappingsSourceKerberosPartialUpdateError>> {
4701    // add a prefix to parameters to efficiently prevent name collisions
4702    let p_path_pm_uuid = pm_uuid;
4703    let p_body_patched_kerberos_source_property_mapping_request = patched_kerberos_source_property_mapping_request;
4704
4705    let uri_str = format!(
4706        "{}/propertymappings/source/kerberos/{pm_uuid}/",
4707        configuration.base_path,
4708        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
4709    );
4710    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
4711
4712    if let Some(ref user_agent) = configuration.user_agent {
4713        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4714    }
4715    if let Some(ref token) = configuration.bearer_access_token {
4716        req_builder = req_builder.bearer_auth(token.to_owned());
4717    };
4718    req_builder = req_builder.json(&p_body_patched_kerberos_source_property_mapping_request);
4719
4720    let req = req_builder.build()?;
4721    let resp = configuration.client.execute(req).await?;
4722
4723    let status = resp.status();
4724    let content_type = resp
4725        .headers()
4726        .get("content-type")
4727        .and_then(|v| v.to_str().ok())
4728        .unwrap_or("application/octet-stream");
4729    let content_type = super::ContentType::from(content_type);
4730
4731    if !status.is_client_error() && !status.is_server_error() {
4732        let content = resp.text().await?;
4733        match content_type {
4734            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4735            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::KerberosSourcePropertyMapping`"))),
4736            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::KerberosSourcePropertyMapping`")))),
4737        }
4738    } else {
4739        let content = resp.text().await?;
4740        let entity: Option<PropertymappingsSourceKerberosPartialUpdateError> = serde_json::from_str(&content).ok();
4741        Err(Error::ResponseError(ResponseContent {
4742            status,
4743            content,
4744            entity,
4745        }))
4746    }
4747}
4748
4749/// KerberosSource PropertyMapping Viewset
4750pub async fn propertymappings_source_kerberos_retrieve(
4751    configuration: &configuration::Configuration,
4752    pm_uuid: &str,
4753) -> Result<models::KerberosSourcePropertyMapping, Error<PropertymappingsSourceKerberosRetrieveError>> {
4754    // add a prefix to parameters to efficiently prevent name collisions
4755    let p_path_pm_uuid = pm_uuid;
4756
4757    let uri_str = format!(
4758        "{}/propertymappings/source/kerberos/{pm_uuid}/",
4759        configuration.base_path,
4760        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
4761    );
4762    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4763
4764    if let Some(ref user_agent) = configuration.user_agent {
4765        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4766    }
4767    if let Some(ref token) = configuration.bearer_access_token {
4768        req_builder = req_builder.bearer_auth(token.to_owned());
4769    };
4770
4771    let req = req_builder.build()?;
4772    let resp = configuration.client.execute(req).await?;
4773
4774    let status = resp.status();
4775    let content_type = resp
4776        .headers()
4777        .get("content-type")
4778        .and_then(|v| v.to_str().ok())
4779        .unwrap_or("application/octet-stream");
4780    let content_type = super::ContentType::from(content_type);
4781
4782    if !status.is_client_error() && !status.is_server_error() {
4783        let content = resp.text().await?;
4784        match content_type {
4785            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4786            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::KerberosSourcePropertyMapping`"))),
4787            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::KerberosSourcePropertyMapping`")))),
4788        }
4789    } else {
4790        let content = resp.text().await?;
4791        let entity: Option<PropertymappingsSourceKerberosRetrieveError> = serde_json::from_str(&content).ok();
4792        Err(Error::ResponseError(ResponseContent {
4793            status,
4794            content,
4795            entity,
4796        }))
4797    }
4798}
4799
4800/// KerberosSource PropertyMapping Viewset
4801pub async fn propertymappings_source_kerberos_update(
4802    configuration: &configuration::Configuration,
4803    pm_uuid: &str,
4804    kerberos_source_property_mapping_request: models::KerberosSourcePropertyMappingRequest,
4805) -> Result<models::KerberosSourcePropertyMapping, Error<PropertymappingsSourceKerberosUpdateError>> {
4806    // add a prefix to parameters to efficiently prevent name collisions
4807    let p_path_pm_uuid = pm_uuid;
4808    let p_body_kerberos_source_property_mapping_request = kerberos_source_property_mapping_request;
4809
4810    let uri_str = format!(
4811        "{}/propertymappings/source/kerberos/{pm_uuid}/",
4812        configuration.base_path,
4813        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
4814    );
4815    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
4816
4817    if let Some(ref user_agent) = configuration.user_agent {
4818        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4819    }
4820    if let Some(ref token) = configuration.bearer_access_token {
4821        req_builder = req_builder.bearer_auth(token.to_owned());
4822    };
4823    req_builder = req_builder.json(&p_body_kerberos_source_property_mapping_request);
4824
4825    let req = req_builder.build()?;
4826    let resp = configuration.client.execute(req).await?;
4827
4828    let status = resp.status();
4829    let content_type = resp
4830        .headers()
4831        .get("content-type")
4832        .and_then(|v| v.to_str().ok())
4833        .unwrap_or("application/octet-stream");
4834    let content_type = super::ContentType::from(content_type);
4835
4836    if !status.is_client_error() && !status.is_server_error() {
4837        let content = resp.text().await?;
4838        match content_type {
4839            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4840            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::KerberosSourcePropertyMapping`"))),
4841            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::KerberosSourcePropertyMapping`")))),
4842        }
4843    } else {
4844        let content = resp.text().await?;
4845        let entity: Option<PropertymappingsSourceKerberosUpdateError> = serde_json::from_str(&content).ok();
4846        Err(Error::ResponseError(ResponseContent {
4847            status,
4848            content,
4849            entity,
4850        }))
4851    }
4852}
4853
4854/// Get a list of all objects that use this object
4855pub async fn propertymappings_source_kerberos_used_by_list(
4856    configuration: &configuration::Configuration,
4857    pm_uuid: &str,
4858) -> Result<Vec<models::UsedBy>, Error<PropertymappingsSourceKerberosUsedByListError>> {
4859    // add a prefix to parameters to efficiently prevent name collisions
4860    let p_path_pm_uuid = pm_uuid;
4861
4862    let uri_str = format!(
4863        "{}/propertymappings/source/kerberos/{pm_uuid}/used_by/",
4864        configuration.base_path,
4865        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
4866    );
4867    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4868
4869    if let Some(ref user_agent) = configuration.user_agent {
4870        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4871    }
4872    if let Some(ref token) = configuration.bearer_access_token {
4873        req_builder = req_builder.bearer_auth(token.to_owned());
4874    };
4875
4876    let req = req_builder.build()?;
4877    let resp = configuration.client.execute(req).await?;
4878
4879    let status = resp.status();
4880    let content_type = resp
4881        .headers()
4882        .get("content-type")
4883        .and_then(|v| v.to_str().ok())
4884        .unwrap_or("application/octet-stream");
4885    let content_type = super::ContentType::from(content_type);
4886
4887    if !status.is_client_error() && !status.is_server_error() {
4888        let content = resp.text().await?;
4889        match content_type {
4890            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4891            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`"))),
4892            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`")))),
4893        }
4894    } else {
4895        let content = resp.text().await?;
4896        let entity: Option<PropertymappingsSourceKerberosUsedByListError> = serde_json::from_str(&content).ok();
4897        Err(Error::ResponseError(ResponseContent {
4898            status,
4899            content,
4900            entity,
4901        }))
4902    }
4903}
4904
4905/// LDAP PropertyMapping Viewset
4906pub async fn propertymappings_source_ldap_create(
4907    configuration: &configuration::Configuration,
4908    ldap_source_property_mapping_request: models::LdapSourcePropertyMappingRequest,
4909) -> Result<models::LdapSourcePropertyMapping, Error<PropertymappingsSourceLdapCreateError>> {
4910    // add a prefix to parameters to efficiently prevent name collisions
4911    let p_body_ldap_source_property_mapping_request = ldap_source_property_mapping_request;
4912
4913    let uri_str = format!("{}/propertymappings/source/ldap/", configuration.base_path);
4914    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4915
4916    if let Some(ref user_agent) = configuration.user_agent {
4917        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4918    }
4919    if let Some(ref token) = configuration.bearer_access_token {
4920        req_builder = req_builder.bearer_auth(token.to_owned());
4921    };
4922    req_builder = req_builder.json(&p_body_ldap_source_property_mapping_request);
4923
4924    let req = req_builder.build()?;
4925    let resp = configuration.client.execute(req).await?;
4926
4927    let status = resp.status();
4928    let content_type = resp
4929        .headers()
4930        .get("content-type")
4931        .and_then(|v| v.to_str().ok())
4932        .unwrap_or("application/octet-stream");
4933    let content_type = super::ContentType::from(content_type);
4934
4935    if !status.is_client_error() && !status.is_server_error() {
4936        let content = resp.text().await?;
4937        match content_type {
4938            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4939            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::LdapSourcePropertyMapping`"))),
4940            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::LdapSourcePropertyMapping`")))),
4941        }
4942    } else {
4943        let content = resp.text().await?;
4944        let entity: Option<PropertymappingsSourceLdapCreateError> = serde_json::from_str(&content).ok();
4945        Err(Error::ResponseError(ResponseContent {
4946            status,
4947            content,
4948            entity,
4949        }))
4950    }
4951}
4952
4953/// LDAP PropertyMapping Viewset
4954pub async fn propertymappings_source_ldap_destroy(
4955    configuration: &configuration::Configuration,
4956    pm_uuid: &str,
4957) -> Result<(), Error<PropertymappingsSourceLdapDestroyError>> {
4958    // add a prefix to parameters to efficiently prevent name collisions
4959    let p_path_pm_uuid = pm_uuid;
4960
4961    let uri_str = format!(
4962        "{}/propertymappings/source/ldap/{pm_uuid}/",
4963        configuration.base_path,
4964        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
4965    );
4966    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
4967
4968    if let Some(ref user_agent) = configuration.user_agent {
4969        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4970    }
4971    if let Some(ref token) = configuration.bearer_access_token {
4972        req_builder = req_builder.bearer_auth(token.to_owned());
4973    };
4974
4975    let req = req_builder.build()?;
4976    let resp = configuration.client.execute(req).await?;
4977
4978    let status = resp.status();
4979
4980    if !status.is_client_error() && !status.is_server_error() {
4981        Ok(())
4982    } else {
4983        let content = resp.text().await?;
4984        let entity: Option<PropertymappingsSourceLdapDestroyError> = serde_json::from_str(&content).ok();
4985        Err(Error::ResponseError(ResponseContent {
4986            status,
4987            content,
4988            entity,
4989        }))
4990    }
4991}
4992
4993/// LDAP PropertyMapping Viewset
4994pub async fn propertymappings_source_ldap_list(
4995    configuration: &configuration::Configuration,
4996    managed: Option<Vec<String>>,
4997    managed__isnull: Option<bool>,
4998    name: Option<&str>,
4999    ordering: Option<&str>,
5000    page: Option<i32>,
5001    page_size: Option<i32>,
5002    search: Option<&str>,
5003) -> Result<models::PaginatedLdapSourcePropertyMappingList, Error<PropertymappingsSourceLdapListError>> {
5004    // add a prefix to parameters to efficiently prevent name collisions
5005    let p_query_managed = managed;
5006    let p_query_managed__isnull = managed__isnull;
5007    let p_query_name = name;
5008    let p_query_ordering = ordering;
5009    let p_query_page = page;
5010    let p_query_page_size = page_size;
5011    let p_query_search = search;
5012
5013    let uri_str = format!("{}/propertymappings/source/ldap/", configuration.base_path);
5014    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5015
5016    if let Some(ref param_value) = p_query_managed {
5017        req_builder = match "multi" {
5018            "multi" => req_builder.query(
5019                &param_value
5020                    .into_iter()
5021                    .map(|p| ("managed".to_owned(), p.to_string()))
5022                    .collect::<Vec<(std::string::String, std::string::String)>>(),
5023            ),
5024            _ => req_builder.query(&[(
5025                "managed",
5026                &param_value
5027                    .into_iter()
5028                    .map(|p| p.to_string())
5029                    .collect::<Vec<String>>()
5030                    .join(",")
5031                    .to_string(),
5032            )]),
5033        };
5034    }
5035    if let Some(ref param_value) = p_query_managed__isnull {
5036        req_builder = req_builder.query(&[("managed__isnull", &param_value.to_string())]);
5037    }
5038    if let Some(ref param_value) = p_query_name {
5039        req_builder = req_builder.query(&[("name", &param_value.to_string())]);
5040    }
5041    if let Some(ref param_value) = p_query_ordering {
5042        req_builder = req_builder.query(&[("ordering", &param_value.to_string())]);
5043    }
5044    if let Some(ref param_value) = p_query_page {
5045        req_builder = req_builder.query(&[("page", &param_value.to_string())]);
5046    }
5047    if let Some(ref param_value) = p_query_page_size {
5048        req_builder = req_builder.query(&[("page_size", &param_value.to_string())]);
5049    }
5050    if let Some(ref param_value) = p_query_search {
5051        req_builder = req_builder.query(&[("search", &param_value.to_string())]);
5052    }
5053    if let Some(ref user_agent) = configuration.user_agent {
5054        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5055    }
5056    if let Some(ref token) = configuration.bearer_access_token {
5057        req_builder = req_builder.bearer_auth(token.to_owned());
5058    };
5059
5060    let req = req_builder.build()?;
5061    let resp = configuration.client.execute(req).await?;
5062
5063    let status = resp.status();
5064    let content_type = resp
5065        .headers()
5066        .get("content-type")
5067        .and_then(|v| v.to_str().ok())
5068        .unwrap_or("application/octet-stream");
5069    let content_type = super::ContentType::from(content_type);
5070
5071    if !status.is_client_error() && !status.is_server_error() {
5072        let content = resp.text().await?;
5073        match content_type {
5074            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5075            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaginatedLdapSourcePropertyMappingList`"))),
5076            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaginatedLdapSourcePropertyMappingList`")))),
5077        }
5078    } else {
5079        let content = resp.text().await?;
5080        let entity: Option<PropertymappingsSourceLdapListError> = serde_json::from_str(&content).ok();
5081        Err(Error::ResponseError(ResponseContent {
5082            status,
5083            content,
5084            entity,
5085        }))
5086    }
5087}
5088
5089/// LDAP PropertyMapping Viewset
5090pub async fn propertymappings_source_ldap_partial_update(
5091    configuration: &configuration::Configuration,
5092    pm_uuid: &str,
5093    patched_ldap_source_property_mapping_request: Option<models::PatchedLdapSourcePropertyMappingRequest>,
5094) -> Result<models::LdapSourcePropertyMapping, Error<PropertymappingsSourceLdapPartialUpdateError>> {
5095    // add a prefix to parameters to efficiently prevent name collisions
5096    let p_path_pm_uuid = pm_uuid;
5097    let p_body_patched_ldap_source_property_mapping_request = patched_ldap_source_property_mapping_request;
5098
5099    let uri_str = format!(
5100        "{}/propertymappings/source/ldap/{pm_uuid}/",
5101        configuration.base_path,
5102        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
5103    );
5104    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
5105
5106    if let Some(ref user_agent) = configuration.user_agent {
5107        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5108    }
5109    if let Some(ref token) = configuration.bearer_access_token {
5110        req_builder = req_builder.bearer_auth(token.to_owned());
5111    };
5112    req_builder = req_builder.json(&p_body_patched_ldap_source_property_mapping_request);
5113
5114    let req = req_builder.build()?;
5115    let resp = configuration.client.execute(req).await?;
5116
5117    let status = resp.status();
5118    let content_type = resp
5119        .headers()
5120        .get("content-type")
5121        .and_then(|v| v.to_str().ok())
5122        .unwrap_or("application/octet-stream");
5123    let content_type = super::ContentType::from(content_type);
5124
5125    if !status.is_client_error() && !status.is_server_error() {
5126        let content = resp.text().await?;
5127        match content_type {
5128            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5129            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::LdapSourcePropertyMapping`"))),
5130            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::LdapSourcePropertyMapping`")))),
5131        }
5132    } else {
5133        let content = resp.text().await?;
5134        let entity: Option<PropertymappingsSourceLdapPartialUpdateError> = serde_json::from_str(&content).ok();
5135        Err(Error::ResponseError(ResponseContent {
5136            status,
5137            content,
5138            entity,
5139        }))
5140    }
5141}
5142
5143/// LDAP PropertyMapping Viewset
5144pub async fn propertymappings_source_ldap_retrieve(
5145    configuration: &configuration::Configuration,
5146    pm_uuid: &str,
5147) -> Result<models::LdapSourcePropertyMapping, Error<PropertymappingsSourceLdapRetrieveError>> {
5148    // add a prefix to parameters to efficiently prevent name collisions
5149    let p_path_pm_uuid = pm_uuid;
5150
5151    let uri_str = format!(
5152        "{}/propertymappings/source/ldap/{pm_uuid}/",
5153        configuration.base_path,
5154        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
5155    );
5156    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5157
5158    if let Some(ref user_agent) = configuration.user_agent {
5159        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5160    }
5161    if let Some(ref token) = configuration.bearer_access_token {
5162        req_builder = req_builder.bearer_auth(token.to_owned());
5163    };
5164
5165    let req = req_builder.build()?;
5166    let resp = configuration.client.execute(req).await?;
5167
5168    let status = resp.status();
5169    let content_type = resp
5170        .headers()
5171        .get("content-type")
5172        .and_then(|v| v.to_str().ok())
5173        .unwrap_or("application/octet-stream");
5174    let content_type = super::ContentType::from(content_type);
5175
5176    if !status.is_client_error() && !status.is_server_error() {
5177        let content = resp.text().await?;
5178        match content_type {
5179            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5180            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::LdapSourcePropertyMapping`"))),
5181            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::LdapSourcePropertyMapping`")))),
5182        }
5183    } else {
5184        let content = resp.text().await?;
5185        let entity: Option<PropertymappingsSourceLdapRetrieveError> = serde_json::from_str(&content).ok();
5186        Err(Error::ResponseError(ResponseContent {
5187            status,
5188            content,
5189            entity,
5190        }))
5191    }
5192}
5193
5194/// LDAP PropertyMapping Viewset
5195pub async fn propertymappings_source_ldap_update(
5196    configuration: &configuration::Configuration,
5197    pm_uuid: &str,
5198    ldap_source_property_mapping_request: models::LdapSourcePropertyMappingRequest,
5199) -> Result<models::LdapSourcePropertyMapping, Error<PropertymappingsSourceLdapUpdateError>> {
5200    // add a prefix to parameters to efficiently prevent name collisions
5201    let p_path_pm_uuid = pm_uuid;
5202    let p_body_ldap_source_property_mapping_request = ldap_source_property_mapping_request;
5203
5204    let uri_str = format!(
5205        "{}/propertymappings/source/ldap/{pm_uuid}/",
5206        configuration.base_path,
5207        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
5208    );
5209    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
5210
5211    if let Some(ref user_agent) = configuration.user_agent {
5212        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5213    }
5214    if let Some(ref token) = configuration.bearer_access_token {
5215        req_builder = req_builder.bearer_auth(token.to_owned());
5216    };
5217    req_builder = req_builder.json(&p_body_ldap_source_property_mapping_request);
5218
5219    let req = req_builder.build()?;
5220    let resp = configuration.client.execute(req).await?;
5221
5222    let status = resp.status();
5223    let content_type = resp
5224        .headers()
5225        .get("content-type")
5226        .and_then(|v| v.to_str().ok())
5227        .unwrap_or("application/octet-stream");
5228    let content_type = super::ContentType::from(content_type);
5229
5230    if !status.is_client_error() && !status.is_server_error() {
5231        let content = resp.text().await?;
5232        match content_type {
5233            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5234            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::LdapSourcePropertyMapping`"))),
5235            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::LdapSourcePropertyMapping`")))),
5236        }
5237    } else {
5238        let content = resp.text().await?;
5239        let entity: Option<PropertymappingsSourceLdapUpdateError> = serde_json::from_str(&content).ok();
5240        Err(Error::ResponseError(ResponseContent {
5241            status,
5242            content,
5243            entity,
5244        }))
5245    }
5246}
5247
5248/// Get a list of all objects that use this object
5249pub async fn propertymappings_source_ldap_used_by_list(
5250    configuration: &configuration::Configuration,
5251    pm_uuid: &str,
5252) -> Result<Vec<models::UsedBy>, Error<PropertymappingsSourceLdapUsedByListError>> {
5253    // add a prefix to parameters to efficiently prevent name collisions
5254    let p_path_pm_uuid = pm_uuid;
5255
5256    let uri_str = format!(
5257        "{}/propertymappings/source/ldap/{pm_uuid}/used_by/",
5258        configuration.base_path,
5259        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
5260    );
5261    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5262
5263    if let Some(ref user_agent) = configuration.user_agent {
5264        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5265    }
5266    if let Some(ref token) = configuration.bearer_access_token {
5267        req_builder = req_builder.bearer_auth(token.to_owned());
5268    };
5269
5270    let req = req_builder.build()?;
5271    let resp = configuration.client.execute(req).await?;
5272
5273    let status = resp.status();
5274    let content_type = resp
5275        .headers()
5276        .get("content-type")
5277        .and_then(|v| v.to_str().ok())
5278        .unwrap_or("application/octet-stream");
5279    let content_type = super::ContentType::from(content_type);
5280
5281    if !status.is_client_error() && !status.is_server_error() {
5282        let content = resp.text().await?;
5283        match content_type {
5284            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5285            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`"))),
5286            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`")))),
5287        }
5288    } else {
5289        let content = resp.text().await?;
5290        let entity: Option<PropertymappingsSourceLdapUsedByListError> = serde_json::from_str(&content).ok();
5291        Err(Error::ResponseError(ResponseContent {
5292            status,
5293            content,
5294            entity,
5295        }))
5296    }
5297}
5298
5299/// OAuthSourcePropertyMapping Viewset
5300pub async fn propertymappings_source_oauth_create(
5301    configuration: &configuration::Configuration,
5302    o_auth_source_property_mapping_request: models::OAuthSourcePropertyMappingRequest,
5303) -> Result<models::OAuthSourcePropertyMapping, Error<PropertymappingsSourceOauthCreateError>> {
5304    // add a prefix to parameters to efficiently prevent name collisions
5305    let p_body_o_auth_source_property_mapping_request = o_auth_source_property_mapping_request;
5306
5307    let uri_str = format!("{}/propertymappings/source/oauth/", configuration.base_path);
5308    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5309
5310    if let Some(ref user_agent) = configuration.user_agent {
5311        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5312    }
5313    if let Some(ref token) = configuration.bearer_access_token {
5314        req_builder = req_builder.bearer_auth(token.to_owned());
5315    };
5316    req_builder = req_builder.json(&p_body_o_auth_source_property_mapping_request);
5317
5318    let req = req_builder.build()?;
5319    let resp = configuration.client.execute(req).await?;
5320
5321    let status = resp.status();
5322    let content_type = resp
5323        .headers()
5324        .get("content-type")
5325        .and_then(|v| v.to_str().ok())
5326        .unwrap_or("application/octet-stream");
5327    let content_type = super::ContentType::from(content_type);
5328
5329    if !status.is_client_error() && !status.is_server_error() {
5330        let content = resp.text().await?;
5331        match content_type {
5332            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5333            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OAuthSourcePropertyMapping`"))),
5334            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OAuthSourcePropertyMapping`")))),
5335        }
5336    } else {
5337        let content = resp.text().await?;
5338        let entity: Option<PropertymappingsSourceOauthCreateError> = serde_json::from_str(&content).ok();
5339        Err(Error::ResponseError(ResponseContent {
5340            status,
5341            content,
5342            entity,
5343        }))
5344    }
5345}
5346
5347/// OAuthSourcePropertyMapping Viewset
5348pub async fn propertymappings_source_oauth_destroy(
5349    configuration: &configuration::Configuration,
5350    pm_uuid: &str,
5351) -> Result<(), Error<PropertymappingsSourceOauthDestroyError>> {
5352    // add a prefix to parameters to efficiently prevent name collisions
5353    let p_path_pm_uuid = pm_uuid;
5354
5355    let uri_str = format!(
5356        "{}/propertymappings/source/oauth/{pm_uuid}/",
5357        configuration.base_path,
5358        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
5359    );
5360    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
5361
5362    if let Some(ref user_agent) = configuration.user_agent {
5363        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5364    }
5365    if let Some(ref token) = configuration.bearer_access_token {
5366        req_builder = req_builder.bearer_auth(token.to_owned());
5367    };
5368
5369    let req = req_builder.build()?;
5370    let resp = configuration.client.execute(req).await?;
5371
5372    let status = resp.status();
5373
5374    if !status.is_client_error() && !status.is_server_error() {
5375        Ok(())
5376    } else {
5377        let content = resp.text().await?;
5378        let entity: Option<PropertymappingsSourceOauthDestroyError> = serde_json::from_str(&content).ok();
5379        Err(Error::ResponseError(ResponseContent {
5380            status,
5381            content,
5382            entity,
5383        }))
5384    }
5385}
5386
5387/// OAuthSourcePropertyMapping Viewset
5388pub async fn propertymappings_source_oauth_list(
5389    configuration: &configuration::Configuration,
5390    managed: Option<Vec<String>>,
5391    managed__isnull: Option<bool>,
5392    name: Option<&str>,
5393    ordering: Option<&str>,
5394    page: Option<i32>,
5395    page_size: Option<i32>,
5396    search: Option<&str>,
5397) -> Result<models::PaginatedOAuthSourcePropertyMappingList, Error<PropertymappingsSourceOauthListError>> {
5398    // add a prefix to parameters to efficiently prevent name collisions
5399    let p_query_managed = managed;
5400    let p_query_managed__isnull = managed__isnull;
5401    let p_query_name = name;
5402    let p_query_ordering = ordering;
5403    let p_query_page = page;
5404    let p_query_page_size = page_size;
5405    let p_query_search = search;
5406
5407    let uri_str = format!("{}/propertymappings/source/oauth/", configuration.base_path);
5408    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5409
5410    if let Some(ref param_value) = p_query_managed {
5411        req_builder = match "multi" {
5412            "multi" => req_builder.query(
5413                &param_value
5414                    .into_iter()
5415                    .map(|p| ("managed".to_owned(), p.to_string()))
5416                    .collect::<Vec<(std::string::String, std::string::String)>>(),
5417            ),
5418            _ => req_builder.query(&[(
5419                "managed",
5420                &param_value
5421                    .into_iter()
5422                    .map(|p| p.to_string())
5423                    .collect::<Vec<String>>()
5424                    .join(",")
5425                    .to_string(),
5426            )]),
5427        };
5428    }
5429    if let Some(ref param_value) = p_query_managed__isnull {
5430        req_builder = req_builder.query(&[("managed__isnull", &param_value.to_string())]);
5431    }
5432    if let Some(ref param_value) = p_query_name {
5433        req_builder = req_builder.query(&[("name", &param_value.to_string())]);
5434    }
5435    if let Some(ref param_value) = p_query_ordering {
5436        req_builder = req_builder.query(&[("ordering", &param_value.to_string())]);
5437    }
5438    if let Some(ref param_value) = p_query_page {
5439        req_builder = req_builder.query(&[("page", &param_value.to_string())]);
5440    }
5441    if let Some(ref param_value) = p_query_page_size {
5442        req_builder = req_builder.query(&[("page_size", &param_value.to_string())]);
5443    }
5444    if let Some(ref param_value) = p_query_search {
5445        req_builder = req_builder.query(&[("search", &param_value.to_string())]);
5446    }
5447    if let Some(ref user_agent) = configuration.user_agent {
5448        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5449    }
5450    if let Some(ref token) = configuration.bearer_access_token {
5451        req_builder = req_builder.bearer_auth(token.to_owned());
5452    };
5453
5454    let req = req_builder.build()?;
5455    let resp = configuration.client.execute(req).await?;
5456
5457    let status = resp.status();
5458    let content_type = resp
5459        .headers()
5460        .get("content-type")
5461        .and_then(|v| v.to_str().ok())
5462        .unwrap_or("application/octet-stream");
5463    let content_type = super::ContentType::from(content_type);
5464
5465    if !status.is_client_error() && !status.is_server_error() {
5466        let content = resp.text().await?;
5467        match content_type {
5468            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5469            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaginatedOAuthSourcePropertyMappingList`"))),
5470            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaginatedOAuthSourcePropertyMappingList`")))),
5471        }
5472    } else {
5473        let content = resp.text().await?;
5474        let entity: Option<PropertymappingsSourceOauthListError> = serde_json::from_str(&content).ok();
5475        Err(Error::ResponseError(ResponseContent {
5476            status,
5477            content,
5478            entity,
5479        }))
5480    }
5481}
5482
5483/// OAuthSourcePropertyMapping Viewset
5484pub async fn propertymappings_source_oauth_partial_update(
5485    configuration: &configuration::Configuration,
5486    pm_uuid: &str,
5487    patched_o_auth_source_property_mapping_request: Option<models::PatchedOAuthSourcePropertyMappingRequest>,
5488) -> Result<models::OAuthSourcePropertyMapping, Error<PropertymappingsSourceOauthPartialUpdateError>> {
5489    // add a prefix to parameters to efficiently prevent name collisions
5490    let p_path_pm_uuid = pm_uuid;
5491    let p_body_patched_o_auth_source_property_mapping_request = patched_o_auth_source_property_mapping_request;
5492
5493    let uri_str = format!(
5494        "{}/propertymappings/source/oauth/{pm_uuid}/",
5495        configuration.base_path,
5496        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
5497    );
5498    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
5499
5500    if let Some(ref user_agent) = configuration.user_agent {
5501        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5502    }
5503    if let Some(ref token) = configuration.bearer_access_token {
5504        req_builder = req_builder.bearer_auth(token.to_owned());
5505    };
5506    req_builder = req_builder.json(&p_body_patched_o_auth_source_property_mapping_request);
5507
5508    let req = req_builder.build()?;
5509    let resp = configuration.client.execute(req).await?;
5510
5511    let status = resp.status();
5512    let content_type = resp
5513        .headers()
5514        .get("content-type")
5515        .and_then(|v| v.to_str().ok())
5516        .unwrap_or("application/octet-stream");
5517    let content_type = super::ContentType::from(content_type);
5518
5519    if !status.is_client_error() && !status.is_server_error() {
5520        let content = resp.text().await?;
5521        match content_type {
5522            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5523            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OAuthSourcePropertyMapping`"))),
5524            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OAuthSourcePropertyMapping`")))),
5525        }
5526    } else {
5527        let content = resp.text().await?;
5528        let entity: Option<PropertymappingsSourceOauthPartialUpdateError> = serde_json::from_str(&content).ok();
5529        Err(Error::ResponseError(ResponseContent {
5530            status,
5531            content,
5532            entity,
5533        }))
5534    }
5535}
5536
5537/// OAuthSourcePropertyMapping Viewset
5538pub async fn propertymappings_source_oauth_retrieve(
5539    configuration: &configuration::Configuration,
5540    pm_uuid: &str,
5541) -> Result<models::OAuthSourcePropertyMapping, Error<PropertymappingsSourceOauthRetrieveError>> {
5542    // add a prefix to parameters to efficiently prevent name collisions
5543    let p_path_pm_uuid = pm_uuid;
5544
5545    let uri_str = format!(
5546        "{}/propertymappings/source/oauth/{pm_uuid}/",
5547        configuration.base_path,
5548        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
5549    );
5550    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5551
5552    if let Some(ref user_agent) = configuration.user_agent {
5553        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5554    }
5555    if let Some(ref token) = configuration.bearer_access_token {
5556        req_builder = req_builder.bearer_auth(token.to_owned());
5557    };
5558
5559    let req = req_builder.build()?;
5560    let resp = configuration.client.execute(req).await?;
5561
5562    let status = resp.status();
5563    let content_type = resp
5564        .headers()
5565        .get("content-type")
5566        .and_then(|v| v.to_str().ok())
5567        .unwrap_or("application/octet-stream");
5568    let content_type = super::ContentType::from(content_type);
5569
5570    if !status.is_client_error() && !status.is_server_error() {
5571        let content = resp.text().await?;
5572        match content_type {
5573            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5574            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OAuthSourcePropertyMapping`"))),
5575            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OAuthSourcePropertyMapping`")))),
5576        }
5577    } else {
5578        let content = resp.text().await?;
5579        let entity: Option<PropertymappingsSourceOauthRetrieveError> = serde_json::from_str(&content).ok();
5580        Err(Error::ResponseError(ResponseContent {
5581            status,
5582            content,
5583            entity,
5584        }))
5585    }
5586}
5587
5588/// OAuthSourcePropertyMapping Viewset
5589pub async fn propertymappings_source_oauth_update(
5590    configuration: &configuration::Configuration,
5591    pm_uuid: &str,
5592    o_auth_source_property_mapping_request: models::OAuthSourcePropertyMappingRequest,
5593) -> Result<models::OAuthSourcePropertyMapping, Error<PropertymappingsSourceOauthUpdateError>> {
5594    // add a prefix to parameters to efficiently prevent name collisions
5595    let p_path_pm_uuid = pm_uuid;
5596    let p_body_o_auth_source_property_mapping_request = o_auth_source_property_mapping_request;
5597
5598    let uri_str = format!(
5599        "{}/propertymappings/source/oauth/{pm_uuid}/",
5600        configuration.base_path,
5601        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
5602    );
5603    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
5604
5605    if let Some(ref user_agent) = configuration.user_agent {
5606        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5607    }
5608    if let Some(ref token) = configuration.bearer_access_token {
5609        req_builder = req_builder.bearer_auth(token.to_owned());
5610    };
5611    req_builder = req_builder.json(&p_body_o_auth_source_property_mapping_request);
5612
5613    let req = req_builder.build()?;
5614    let resp = configuration.client.execute(req).await?;
5615
5616    let status = resp.status();
5617    let content_type = resp
5618        .headers()
5619        .get("content-type")
5620        .and_then(|v| v.to_str().ok())
5621        .unwrap_or("application/octet-stream");
5622    let content_type = super::ContentType::from(content_type);
5623
5624    if !status.is_client_error() && !status.is_server_error() {
5625        let content = resp.text().await?;
5626        match content_type {
5627            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5628            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OAuthSourcePropertyMapping`"))),
5629            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OAuthSourcePropertyMapping`")))),
5630        }
5631    } else {
5632        let content = resp.text().await?;
5633        let entity: Option<PropertymappingsSourceOauthUpdateError> = serde_json::from_str(&content).ok();
5634        Err(Error::ResponseError(ResponseContent {
5635            status,
5636            content,
5637            entity,
5638        }))
5639    }
5640}
5641
5642/// Get a list of all objects that use this object
5643pub async fn propertymappings_source_oauth_used_by_list(
5644    configuration: &configuration::Configuration,
5645    pm_uuid: &str,
5646) -> Result<Vec<models::UsedBy>, Error<PropertymappingsSourceOauthUsedByListError>> {
5647    // add a prefix to parameters to efficiently prevent name collisions
5648    let p_path_pm_uuid = pm_uuid;
5649
5650    let uri_str = format!(
5651        "{}/propertymappings/source/oauth/{pm_uuid}/used_by/",
5652        configuration.base_path,
5653        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
5654    );
5655    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5656
5657    if let Some(ref user_agent) = configuration.user_agent {
5658        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5659    }
5660    if let Some(ref token) = configuration.bearer_access_token {
5661        req_builder = req_builder.bearer_auth(token.to_owned());
5662    };
5663
5664    let req = req_builder.build()?;
5665    let resp = configuration.client.execute(req).await?;
5666
5667    let status = resp.status();
5668    let content_type = resp
5669        .headers()
5670        .get("content-type")
5671        .and_then(|v| v.to_str().ok())
5672        .unwrap_or("application/octet-stream");
5673    let content_type = super::ContentType::from(content_type);
5674
5675    if !status.is_client_error() && !status.is_server_error() {
5676        let content = resp.text().await?;
5677        match content_type {
5678            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5679            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`"))),
5680            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`")))),
5681        }
5682    } else {
5683        let content = resp.text().await?;
5684        let entity: Option<PropertymappingsSourceOauthUsedByListError> = serde_json::from_str(&content).ok();
5685        Err(Error::ResponseError(ResponseContent {
5686            status,
5687            content,
5688            entity,
5689        }))
5690    }
5691}
5692
5693/// PlexSourcePropertyMapping Viewset
5694pub async fn propertymappings_source_plex_create(
5695    configuration: &configuration::Configuration,
5696    plex_source_property_mapping_request: models::PlexSourcePropertyMappingRequest,
5697) -> Result<models::PlexSourcePropertyMapping, Error<PropertymappingsSourcePlexCreateError>> {
5698    // add a prefix to parameters to efficiently prevent name collisions
5699    let p_body_plex_source_property_mapping_request = plex_source_property_mapping_request;
5700
5701    let uri_str = format!("{}/propertymappings/source/plex/", configuration.base_path);
5702    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5703
5704    if let Some(ref user_agent) = configuration.user_agent {
5705        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5706    }
5707    if let Some(ref token) = configuration.bearer_access_token {
5708        req_builder = req_builder.bearer_auth(token.to_owned());
5709    };
5710    req_builder = req_builder.json(&p_body_plex_source_property_mapping_request);
5711
5712    let req = req_builder.build()?;
5713    let resp = configuration.client.execute(req).await?;
5714
5715    let status = resp.status();
5716    let content_type = resp
5717        .headers()
5718        .get("content-type")
5719        .and_then(|v| v.to_str().ok())
5720        .unwrap_or("application/octet-stream");
5721    let content_type = super::ContentType::from(content_type);
5722
5723    if !status.is_client_error() && !status.is_server_error() {
5724        let content = resp.text().await?;
5725        match content_type {
5726            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5727            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PlexSourcePropertyMapping`"))),
5728            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PlexSourcePropertyMapping`")))),
5729        }
5730    } else {
5731        let content = resp.text().await?;
5732        let entity: Option<PropertymappingsSourcePlexCreateError> = serde_json::from_str(&content).ok();
5733        Err(Error::ResponseError(ResponseContent {
5734            status,
5735            content,
5736            entity,
5737        }))
5738    }
5739}
5740
5741/// PlexSourcePropertyMapping Viewset
5742pub async fn propertymappings_source_plex_destroy(
5743    configuration: &configuration::Configuration,
5744    pm_uuid: &str,
5745) -> Result<(), Error<PropertymappingsSourcePlexDestroyError>> {
5746    // add a prefix to parameters to efficiently prevent name collisions
5747    let p_path_pm_uuid = pm_uuid;
5748
5749    let uri_str = format!(
5750        "{}/propertymappings/source/plex/{pm_uuid}/",
5751        configuration.base_path,
5752        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
5753    );
5754    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
5755
5756    if let Some(ref user_agent) = configuration.user_agent {
5757        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5758    }
5759    if let Some(ref token) = configuration.bearer_access_token {
5760        req_builder = req_builder.bearer_auth(token.to_owned());
5761    };
5762
5763    let req = req_builder.build()?;
5764    let resp = configuration.client.execute(req).await?;
5765
5766    let status = resp.status();
5767
5768    if !status.is_client_error() && !status.is_server_error() {
5769        Ok(())
5770    } else {
5771        let content = resp.text().await?;
5772        let entity: Option<PropertymappingsSourcePlexDestroyError> = serde_json::from_str(&content).ok();
5773        Err(Error::ResponseError(ResponseContent {
5774            status,
5775            content,
5776            entity,
5777        }))
5778    }
5779}
5780
5781/// PlexSourcePropertyMapping Viewset
5782pub async fn propertymappings_source_plex_list(
5783    configuration: &configuration::Configuration,
5784    managed: Option<Vec<String>>,
5785    managed__isnull: Option<bool>,
5786    name: Option<&str>,
5787    ordering: Option<&str>,
5788    page: Option<i32>,
5789    page_size: Option<i32>,
5790    search: Option<&str>,
5791) -> Result<models::PaginatedPlexSourcePropertyMappingList, Error<PropertymappingsSourcePlexListError>> {
5792    // add a prefix to parameters to efficiently prevent name collisions
5793    let p_query_managed = managed;
5794    let p_query_managed__isnull = managed__isnull;
5795    let p_query_name = name;
5796    let p_query_ordering = ordering;
5797    let p_query_page = page;
5798    let p_query_page_size = page_size;
5799    let p_query_search = search;
5800
5801    let uri_str = format!("{}/propertymappings/source/plex/", configuration.base_path);
5802    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5803
5804    if let Some(ref param_value) = p_query_managed {
5805        req_builder = match "multi" {
5806            "multi" => req_builder.query(
5807                &param_value
5808                    .into_iter()
5809                    .map(|p| ("managed".to_owned(), p.to_string()))
5810                    .collect::<Vec<(std::string::String, std::string::String)>>(),
5811            ),
5812            _ => req_builder.query(&[(
5813                "managed",
5814                &param_value
5815                    .into_iter()
5816                    .map(|p| p.to_string())
5817                    .collect::<Vec<String>>()
5818                    .join(",")
5819                    .to_string(),
5820            )]),
5821        };
5822    }
5823    if let Some(ref param_value) = p_query_managed__isnull {
5824        req_builder = req_builder.query(&[("managed__isnull", &param_value.to_string())]);
5825    }
5826    if let Some(ref param_value) = p_query_name {
5827        req_builder = req_builder.query(&[("name", &param_value.to_string())]);
5828    }
5829    if let Some(ref param_value) = p_query_ordering {
5830        req_builder = req_builder.query(&[("ordering", &param_value.to_string())]);
5831    }
5832    if let Some(ref param_value) = p_query_page {
5833        req_builder = req_builder.query(&[("page", &param_value.to_string())]);
5834    }
5835    if let Some(ref param_value) = p_query_page_size {
5836        req_builder = req_builder.query(&[("page_size", &param_value.to_string())]);
5837    }
5838    if let Some(ref param_value) = p_query_search {
5839        req_builder = req_builder.query(&[("search", &param_value.to_string())]);
5840    }
5841    if let Some(ref user_agent) = configuration.user_agent {
5842        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5843    }
5844    if let Some(ref token) = configuration.bearer_access_token {
5845        req_builder = req_builder.bearer_auth(token.to_owned());
5846    };
5847
5848    let req = req_builder.build()?;
5849    let resp = configuration.client.execute(req).await?;
5850
5851    let status = resp.status();
5852    let content_type = resp
5853        .headers()
5854        .get("content-type")
5855        .and_then(|v| v.to_str().ok())
5856        .unwrap_or("application/octet-stream");
5857    let content_type = super::ContentType::from(content_type);
5858
5859    if !status.is_client_error() && !status.is_server_error() {
5860        let content = resp.text().await?;
5861        match content_type {
5862            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5863            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaginatedPlexSourcePropertyMappingList`"))),
5864            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaginatedPlexSourcePropertyMappingList`")))),
5865        }
5866    } else {
5867        let content = resp.text().await?;
5868        let entity: Option<PropertymappingsSourcePlexListError> = serde_json::from_str(&content).ok();
5869        Err(Error::ResponseError(ResponseContent {
5870            status,
5871            content,
5872            entity,
5873        }))
5874    }
5875}
5876
5877/// PlexSourcePropertyMapping Viewset
5878pub async fn propertymappings_source_plex_partial_update(
5879    configuration: &configuration::Configuration,
5880    pm_uuid: &str,
5881    patched_plex_source_property_mapping_request: Option<models::PatchedPlexSourcePropertyMappingRequest>,
5882) -> Result<models::PlexSourcePropertyMapping, Error<PropertymappingsSourcePlexPartialUpdateError>> {
5883    // add a prefix to parameters to efficiently prevent name collisions
5884    let p_path_pm_uuid = pm_uuid;
5885    let p_body_patched_plex_source_property_mapping_request = patched_plex_source_property_mapping_request;
5886
5887    let uri_str = format!(
5888        "{}/propertymappings/source/plex/{pm_uuid}/",
5889        configuration.base_path,
5890        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
5891    );
5892    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
5893
5894    if let Some(ref user_agent) = configuration.user_agent {
5895        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5896    }
5897    if let Some(ref token) = configuration.bearer_access_token {
5898        req_builder = req_builder.bearer_auth(token.to_owned());
5899    };
5900    req_builder = req_builder.json(&p_body_patched_plex_source_property_mapping_request);
5901
5902    let req = req_builder.build()?;
5903    let resp = configuration.client.execute(req).await?;
5904
5905    let status = resp.status();
5906    let content_type = resp
5907        .headers()
5908        .get("content-type")
5909        .and_then(|v| v.to_str().ok())
5910        .unwrap_or("application/octet-stream");
5911    let content_type = super::ContentType::from(content_type);
5912
5913    if !status.is_client_error() && !status.is_server_error() {
5914        let content = resp.text().await?;
5915        match content_type {
5916            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5917            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PlexSourcePropertyMapping`"))),
5918            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PlexSourcePropertyMapping`")))),
5919        }
5920    } else {
5921        let content = resp.text().await?;
5922        let entity: Option<PropertymappingsSourcePlexPartialUpdateError> = serde_json::from_str(&content).ok();
5923        Err(Error::ResponseError(ResponseContent {
5924            status,
5925            content,
5926            entity,
5927        }))
5928    }
5929}
5930
5931/// PlexSourcePropertyMapping Viewset
5932pub async fn propertymappings_source_plex_retrieve(
5933    configuration: &configuration::Configuration,
5934    pm_uuid: &str,
5935) -> Result<models::PlexSourcePropertyMapping, Error<PropertymappingsSourcePlexRetrieveError>> {
5936    // add a prefix to parameters to efficiently prevent name collisions
5937    let p_path_pm_uuid = pm_uuid;
5938
5939    let uri_str = format!(
5940        "{}/propertymappings/source/plex/{pm_uuid}/",
5941        configuration.base_path,
5942        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
5943    );
5944    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
5945
5946    if let Some(ref user_agent) = configuration.user_agent {
5947        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5948    }
5949    if let Some(ref token) = configuration.bearer_access_token {
5950        req_builder = req_builder.bearer_auth(token.to_owned());
5951    };
5952
5953    let req = req_builder.build()?;
5954    let resp = configuration.client.execute(req).await?;
5955
5956    let status = resp.status();
5957    let content_type = resp
5958        .headers()
5959        .get("content-type")
5960        .and_then(|v| v.to_str().ok())
5961        .unwrap_or("application/octet-stream");
5962    let content_type = super::ContentType::from(content_type);
5963
5964    if !status.is_client_error() && !status.is_server_error() {
5965        let content = resp.text().await?;
5966        match content_type {
5967            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5968            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PlexSourcePropertyMapping`"))),
5969            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PlexSourcePropertyMapping`")))),
5970        }
5971    } else {
5972        let content = resp.text().await?;
5973        let entity: Option<PropertymappingsSourcePlexRetrieveError> = serde_json::from_str(&content).ok();
5974        Err(Error::ResponseError(ResponseContent {
5975            status,
5976            content,
5977            entity,
5978        }))
5979    }
5980}
5981
5982/// PlexSourcePropertyMapping Viewset
5983pub async fn propertymappings_source_plex_update(
5984    configuration: &configuration::Configuration,
5985    pm_uuid: &str,
5986    plex_source_property_mapping_request: models::PlexSourcePropertyMappingRequest,
5987) -> Result<models::PlexSourcePropertyMapping, Error<PropertymappingsSourcePlexUpdateError>> {
5988    // add a prefix to parameters to efficiently prevent name collisions
5989    let p_path_pm_uuid = pm_uuid;
5990    let p_body_plex_source_property_mapping_request = plex_source_property_mapping_request;
5991
5992    let uri_str = format!(
5993        "{}/propertymappings/source/plex/{pm_uuid}/",
5994        configuration.base_path,
5995        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
5996    );
5997    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
5998
5999    if let Some(ref user_agent) = configuration.user_agent {
6000        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6001    }
6002    if let Some(ref token) = configuration.bearer_access_token {
6003        req_builder = req_builder.bearer_auth(token.to_owned());
6004    };
6005    req_builder = req_builder.json(&p_body_plex_source_property_mapping_request);
6006
6007    let req = req_builder.build()?;
6008    let resp = configuration.client.execute(req).await?;
6009
6010    let status = resp.status();
6011    let content_type = resp
6012        .headers()
6013        .get("content-type")
6014        .and_then(|v| v.to_str().ok())
6015        .unwrap_or("application/octet-stream");
6016    let content_type = super::ContentType::from(content_type);
6017
6018    if !status.is_client_error() && !status.is_server_error() {
6019        let content = resp.text().await?;
6020        match content_type {
6021            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6022            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PlexSourcePropertyMapping`"))),
6023            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PlexSourcePropertyMapping`")))),
6024        }
6025    } else {
6026        let content = resp.text().await?;
6027        let entity: Option<PropertymappingsSourcePlexUpdateError> = serde_json::from_str(&content).ok();
6028        Err(Error::ResponseError(ResponseContent {
6029            status,
6030            content,
6031            entity,
6032        }))
6033    }
6034}
6035
6036/// Get a list of all objects that use this object
6037pub async fn propertymappings_source_plex_used_by_list(
6038    configuration: &configuration::Configuration,
6039    pm_uuid: &str,
6040) -> Result<Vec<models::UsedBy>, Error<PropertymappingsSourcePlexUsedByListError>> {
6041    // add a prefix to parameters to efficiently prevent name collisions
6042    let p_path_pm_uuid = pm_uuid;
6043
6044    let uri_str = format!(
6045        "{}/propertymappings/source/plex/{pm_uuid}/used_by/",
6046        configuration.base_path,
6047        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
6048    );
6049    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6050
6051    if let Some(ref user_agent) = configuration.user_agent {
6052        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6053    }
6054    if let Some(ref token) = configuration.bearer_access_token {
6055        req_builder = req_builder.bearer_auth(token.to_owned());
6056    };
6057
6058    let req = req_builder.build()?;
6059    let resp = configuration.client.execute(req).await?;
6060
6061    let status = resp.status();
6062    let content_type = resp
6063        .headers()
6064        .get("content-type")
6065        .and_then(|v| v.to_str().ok())
6066        .unwrap_or("application/octet-stream");
6067    let content_type = super::ContentType::from(content_type);
6068
6069    if !status.is_client_error() && !status.is_server_error() {
6070        let content = resp.text().await?;
6071        match content_type {
6072            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6073            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`"))),
6074            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`")))),
6075        }
6076    } else {
6077        let content = resp.text().await?;
6078        let entity: Option<PropertymappingsSourcePlexUsedByListError> = serde_json::from_str(&content).ok();
6079        Err(Error::ResponseError(ResponseContent {
6080            status,
6081            content,
6082            entity,
6083        }))
6084    }
6085}
6086
6087/// SAMLSourcePropertyMapping Viewset
6088pub async fn propertymappings_source_saml_create(
6089    configuration: &configuration::Configuration,
6090    saml_source_property_mapping_request: models::SamlSourcePropertyMappingRequest,
6091) -> Result<models::SamlSourcePropertyMapping, Error<PropertymappingsSourceSamlCreateError>> {
6092    // add a prefix to parameters to efficiently prevent name collisions
6093    let p_body_saml_source_property_mapping_request = saml_source_property_mapping_request;
6094
6095    let uri_str = format!("{}/propertymappings/source/saml/", configuration.base_path);
6096    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
6097
6098    if let Some(ref user_agent) = configuration.user_agent {
6099        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6100    }
6101    if let Some(ref token) = configuration.bearer_access_token {
6102        req_builder = req_builder.bearer_auth(token.to_owned());
6103    };
6104    req_builder = req_builder.json(&p_body_saml_source_property_mapping_request);
6105
6106    let req = req_builder.build()?;
6107    let resp = configuration.client.execute(req).await?;
6108
6109    let status = resp.status();
6110    let content_type = resp
6111        .headers()
6112        .get("content-type")
6113        .and_then(|v| v.to_str().ok())
6114        .unwrap_or("application/octet-stream");
6115    let content_type = super::ContentType::from(content_type);
6116
6117    if !status.is_client_error() && !status.is_server_error() {
6118        let content = resp.text().await?;
6119        match content_type {
6120            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6121            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SamlSourcePropertyMapping`"))),
6122            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SamlSourcePropertyMapping`")))),
6123        }
6124    } else {
6125        let content = resp.text().await?;
6126        let entity: Option<PropertymappingsSourceSamlCreateError> = serde_json::from_str(&content).ok();
6127        Err(Error::ResponseError(ResponseContent {
6128            status,
6129            content,
6130            entity,
6131        }))
6132    }
6133}
6134
6135/// SAMLSourcePropertyMapping Viewset
6136pub async fn propertymappings_source_saml_destroy(
6137    configuration: &configuration::Configuration,
6138    pm_uuid: &str,
6139) -> Result<(), Error<PropertymappingsSourceSamlDestroyError>> {
6140    // add a prefix to parameters to efficiently prevent name collisions
6141    let p_path_pm_uuid = pm_uuid;
6142
6143    let uri_str = format!(
6144        "{}/propertymappings/source/saml/{pm_uuid}/",
6145        configuration.base_path,
6146        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
6147    );
6148    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
6149
6150    if let Some(ref user_agent) = configuration.user_agent {
6151        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6152    }
6153    if let Some(ref token) = configuration.bearer_access_token {
6154        req_builder = req_builder.bearer_auth(token.to_owned());
6155    };
6156
6157    let req = req_builder.build()?;
6158    let resp = configuration.client.execute(req).await?;
6159
6160    let status = resp.status();
6161
6162    if !status.is_client_error() && !status.is_server_error() {
6163        Ok(())
6164    } else {
6165        let content = resp.text().await?;
6166        let entity: Option<PropertymappingsSourceSamlDestroyError> = serde_json::from_str(&content).ok();
6167        Err(Error::ResponseError(ResponseContent {
6168            status,
6169            content,
6170            entity,
6171        }))
6172    }
6173}
6174
6175/// SAMLSourcePropertyMapping Viewset
6176pub async fn propertymappings_source_saml_list(
6177    configuration: &configuration::Configuration,
6178    managed: Option<Vec<String>>,
6179    managed__isnull: Option<bool>,
6180    name: Option<&str>,
6181    ordering: Option<&str>,
6182    page: Option<i32>,
6183    page_size: Option<i32>,
6184    search: Option<&str>,
6185) -> Result<models::PaginatedSamlSourcePropertyMappingList, Error<PropertymappingsSourceSamlListError>> {
6186    // add a prefix to parameters to efficiently prevent name collisions
6187    let p_query_managed = managed;
6188    let p_query_managed__isnull = managed__isnull;
6189    let p_query_name = name;
6190    let p_query_ordering = ordering;
6191    let p_query_page = page;
6192    let p_query_page_size = page_size;
6193    let p_query_search = search;
6194
6195    let uri_str = format!("{}/propertymappings/source/saml/", configuration.base_path);
6196    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6197
6198    if let Some(ref param_value) = p_query_managed {
6199        req_builder = match "multi" {
6200            "multi" => req_builder.query(
6201                &param_value
6202                    .into_iter()
6203                    .map(|p| ("managed".to_owned(), p.to_string()))
6204                    .collect::<Vec<(std::string::String, std::string::String)>>(),
6205            ),
6206            _ => req_builder.query(&[(
6207                "managed",
6208                &param_value
6209                    .into_iter()
6210                    .map(|p| p.to_string())
6211                    .collect::<Vec<String>>()
6212                    .join(",")
6213                    .to_string(),
6214            )]),
6215        };
6216    }
6217    if let Some(ref param_value) = p_query_managed__isnull {
6218        req_builder = req_builder.query(&[("managed__isnull", &param_value.to_string())]);
6219    }
6220    if let Some(ref param_value) = p_query_name {
6221        req_builder = req_builder.query(&[("name", &param_value.to_string())]);
6222    }
6223    if let Some(ref param_value) = p_query_ordering {
6224        req_builder = req_builder.query(&[("ordering", &param_value.to_string())]);
6225    }
6226    if let Some(ref param_value) = p_query_page {
6227        req_builder = req_builder.query(&[("page", &param_value.to_string())]);
6228    }
6229    if let Some(ref param_value) = p_query_page_size {
6230        req_builder = req_builder.query(&[("page_size", &param_value.to_string())]);
6231    }
6232    if let Some(ref param_value) = p_query_search {
6233        req_builder = req_builder.query(&[("search", &param_value.to_string())]);
6234    }
6235    if let Some(ref user_agent) = configuration.user_agent {
6236        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6237    }
6238    if let Some(ref token) = configuration.bearer_access_token {
6239        req_builder = req_builder.bearer_auth(token.to_owned());
6240    };
6241
6242    let req = req_builder.build()?;
6243    let resp = configuration.client.execute(req).await?;
6244
6245    let status = resp.status();
6246    let content_type = resp
6247        .headers()
6248        .get("content-type")
6249        .and_then(|v| v.to_str().ok())
6250        .unwrap_or("application/octet-stream");
6251    let content_type = super::ContentType::from(content_type);
6252
6253    if !status.is_client_error() && !status.is_server_error() {
6254        let content = resp.text().await?;
6255        match content_type {
6256            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6257            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaginatedSamlSourcePropertyMappingList`"))),
6258            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaginatedSamlSourcePropertyMappingList`")))),
6259        }
6260    } else {
6261        let content = resp.text().await?;
6262        let entity: Option<PropertymappingsSourceSamlListError> = serde_json::from_str(&content).ok();
6263        Err(Error::ResponseError(ResponseContent {
6264            status,
6265            content,
6266            entity,
6267        }))
6268    }
6269}
6270
6271/// SAMLSourcePropertyMapping Viewset
6272pub async fn propertymappings_source_saml_partial_update(
6273    configuration: &configuration::Configuration,
6274    pm_uuid: &str,
6275    patched_saml_source_property_mapping_request: Option<models::PatchedSamlSourcePropertyMappingRequest>,
6276) -> Result<models::SamlSourcePropertyMapping, Error<PropertymappingsSourceSamlPartialUpdateError>> {
6277    // add a prefix to parameters to efficiently prevent name collisions
6278    let p_path_pm_uuid = pm_uuid;
6279    let p_body_patched_saml_source_property_mapping_request = patched_saml_source_property_mapping_request;
6280
6281    let uri_str = format!(
6282        "{}/propertymappings/source/saml/{pm_uuid}/",
6283        configuration.base_path,
6284        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
6285    );
6286    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6287
6288    if let Some(ref user_agent) = configuration.user_agent {
6289        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6290    }
6291    if let Some(ref token) = configuration.bearer_access_token {
6292        req_builder = req_builder.bearer_auth(token.to_owned());
6293    };
6294    req_builder = req_builder.json(&p_body_patched_saml_source_property_mapping_request);
6295
6296    let req = req_builder.build()?;
6297    let resp = configuration.client.execute(req).await?;
6298
6299    let status = resp.status();
6300    let content_type = resp
6301        .headers()
6302        .get("content-type")
6303        .and_then(|v| v.to_str().ok())
6304        .unwrap_or("application/octet-stream");
6305    let content_type = super::ContentType::from(content_type);
6306
6307    if !status.is_client_error() && !status.is_server_error() {
6308        let content = resp.text().await?;
6309        match content_type {
6310            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6311            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SamlSourcePropertyMapping`"))),
6312            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SamlSourcePropertyMapping`")))),
6313        }
6314    } else {
6315        let content = resp.text().await?;
6316        let entity: Option<PropertymappingsSourceSamlPartialUpdateError> = serde_json::from_str(&content).ok();
6317        Err(Error::ResponseError(ResponseContent {
6318            status,
6319            content,
6320            entity,
6321        }))
6322    }
6323}
6324
6325/// SAMLSourcePropertyMapping Viewset
6326pub async fn propertymappings_source_saml_retrieve(
6327    configuration: &configuration::Configuration,
6328    pm_uuid: &str,
6329) -> Result<models::SamlSourcePropertyMapping, Error<PropertymappingsSourceSamlRetrieveError>> {
6330    // add a prefix to parameters to efficiently prevent name collisions
6331    let p_path_pm_uuid = pm_uuid;
6332
6333    let uri_str = format!(
6334        "{}/propertymappings/source/saml/{pm_uuid}/",
6335        configuration.base_path,
6336        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
6337    );
6338    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6339
6340    if let Some(ref user_agent) = configuration.user_agent {
6341        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6342    }
6343    if let Some(ref token) = configuration.bearer_access_token {
6344        req_builder = req_builder.bearer_auth(token.to_owned());
6345    };
6346
6347    let req = req_builder.build()?;
6348    let resp = configuration.client.execute(req).await?;
6349
6350    let status = resp.status();
6351    let content_type = resp
6352        .headers()
6353        .get("content-type")
6354        .and_then(|v| v.to_str().ok())
6355        .unwrap_or("application/octet-stream");
6356    let content_type = super::ContentType::from(content_type);
6357
6358    if !status.is_client_error() && !status.is_server_error() {
6359        let content = resp.text().await?;
6360        match content_type {
6361            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6362            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SamlSourcePropertyMapping`"))),
6363            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SamlSourcePropertyMapping`")))),
6364        }
6365    } else {
6366        let content = resp.text().await?;
6367        let entity: Option<PropertymappingsSourceSamlRetrieveError> = serde_json::from_str(&content).ok();
6368        Err(Error::ResponseError(ResponseContent {
6369            status,
6370            content,
6371            entity,
6372        }))
6373    }
6374}
6375
6376/// SAMLSourcePropertyMapping Viewset
6377pub async fn propertymappings_source_saml_update(
6378    configuration: &configuration::Configuration,
6379    pm_uuid: &str,
6380    saml_source_property_mapping_request: models::SamlSourcePropertyMappingRequest,
6381) -> Result<models::SamlSourcePropertyMapping, Error<PropertymappingsSourceSamlUpdateError>> {
6382    // add a prefix to parameters to efficiently prevent name collisions
6383    let p_path_pm_uuid = pm_uuid;
6384    let p_body_saml_source_property_mapping_request = saml_source_property_mapping_request;
6385
6386    let uri_str = format!(
6387        "{}/propertymappings/source/saml/{pm_uuid}/",
6388        configuration.base_path,
6389        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
6390    );
6391    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6392
6393    if let Some(ref user_agent) = configuration.user_agent {
6394        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6395    }
6396    if let Some(ref token) = configuration.bearer_access_token {
6397        req_builder = req_builder.bearer_auth(token.to_owned());
6398    };
6399    req_builder = req_builder.json(&p_body_saml_source_property_mapping_request);
6400
6401    let req = req_builder.build()?;
6402    let resp = configuration.client.execute(req).await?;
6403
6404    let status = resp.status();
6405    let content_type = resp
6406        .headers()
6407        .get("content-type")
6408        .and_then(|v| v.to_str().ok())
6409        .unwrap_or("application/octet-stream");
6410    let content_type = super::ContentType::from(content_type);
6411
6412    if !status.is_client_error() && !status.is_server_error() {
6413        let content = resp.text().await?;
6414        match content_type {
6415            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6416            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SamlSourcePropertyMapping`"))),
6417            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SamlSourcePropertyMapping`")))),
6418        }
6419    } else {
6420        let content = resp.text().await?;
6421        let entity: Option<PropertymappingsSourceSamlUpdateError> = serde_json::from_str(&content).ok();
6422        Err(Error::ResponseError(ResponseContent {
6423            status,
6424            content,
6425            entity,
6426        }))
6427    }
6428}
6429
6430/// Get a list of all objects that use this object
6431pub async fn propertymappings_source_saml_used_by_list(
6432    configuration: &configuration::Configuration,
6433    pm_uuid: &str,
6434) -> Result<Vec<models::UsedBy>, Error<PropertymappingsSourceSamlUsedByListError>> {
6435    // add a prefix to parameters to efficiently prevent name collisions
6436    let p_path_pm_uuid = pm_uuid;
6437
6438    let uri_str = format!(
6439        "{}/propertymappings/source/saml/{pm_uuid}/used_by/",
6440        configuration.base_path,
6441        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
6442    );
6443    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6444
6445    if let Some(ref user_agent) = configuration.user_agent {
6446        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6447    }
6448    if let Some(ref token) = configuration.bearer_access_token {
6449        req_builder = req_builder.bearer_auth(token.to_owned());
6450    };
6451
6452    let req = req_builder.build()?;
6453    let resp = configuration.client.execute(req).await?;
6454
6455    let status = resp.status();
6456    let content_type = resp
6457        .headers()
6458        .get("content-type")
6459        .and_then(|v| v.to_str().ok())
6460        .unwrap_or("application/octet-stream");
6461    let content_type = super::ContentType::from(content_type);
6462
6463    if !status.is_client_error() && !status.is_server_error() {
6464        let content = resp.text().await?;
6465        match content_type {
6466            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6467            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`"))),
6468            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`")))),
6469        }
6470    } else {
6471        let content = resp.text().await?;
6472        let entity: Option<PropertymappingsSourceSamlUsedByListError> = serde_json::from_str(&content).ok();
6473        Err(Error::ResponseError(ResponseContent {
6474            status,
6475            content,
6476            entity,
6477        }))
6478    }
6479}
6480
6481/// SCIMSourcePropertyMapping Viewset
6482pub async fn propertymappings_source_scim_create(
6483    configuration: &configuration::Configuration,
6484    scim_source_property_mapping_request: models::ScimSourcePropertyMappingRequest,
6485) -> Result<models::ScimSourcePropertyMapping, Error<PropertymappingsSourceScimCreateError>> {
6486    // add a prefix to parameters to efficiently prevent name collisions
6487    let p_body_scim_source_property_mapping_request = scim_source_property_mapping_request;
6488
6489    let uri_str = format!("{}/propertymappings/source/scim/", configuration.base_path);
6490    let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
6491
6492    if let Some(ref user_agent) = configuration.user_agent {
6493        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6494    }
6495    if let Some(ref token) = configuration.bearer_access_token {
6496        req_builder = req_builder.bearer_auth(token.to_owned());
6497    };
6498    req_builder = req_builder.json(&p_body_scim_source_property_mapping_request);
6499
6500    let req = req_builder.build()?;
6501    let resp = configuration.client.execute(req).await?;
6502
6503    let status = resp.status();
6504    let content_type = resp
6505        .headers()
6506        .get("content-type")
6507        .and_then(|v| v.to_str().ok())
6508        .unwrap_or("application/octet-stream");
6509    let content_type = super::ContentType::from(content_type);
6510
6511    if !status.is_client_error() && !status.is_server_error() {
6512        let content = resp.text().await?;
6513        match content_type {
6514            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6515            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ScimSourcePropertyMapping`"))),
6516            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ScimSourcePropertyMapping`")))),
6517        }
6518    } else {
6519        let content = resp.text().await?;
6520        let entity: Option<PropertymappingsSourceScimCreateError> = serde_json::from_str(&content).ok();
6521        Err(Error::ResponseError(ResponseContent {
6522            status,
6523            content,
6524            entity,
6525        }))
6526    }
6527}
6528
6529/// SCIMSourcePropertyMapping Viewset
6530pub async fn propertymappings_source_scim_destroy(
6531    configuration: &configuration::Configuration,
6532    pm_uuid: &str,
6533) -> Result<(), Error<PropertymappingsSourceScimDestroyError>> {
6534    // add a prefix to parameters to efficiently prevent name collisions
6535    let p_path_pm_uuid = pm_uuid;
6536
6537    let uri_str = format!(
6538        "{}/propertymappings/source/scim/{pm_uuid}/",
6539        configuration.base_path,
6540        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
6541    );
6542    let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
6543
6544    if let Some(ref user_agent) = configuration.user_agent {
6545        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6546    }
6547    if let Some(ref token) = configuration.bearer_access_token {
6548        req_builder = req_builder.bearer_auth(token.to_owned());
6549    };
6550
6551    let req = req_builder.build()?;
6552    let resp = configuration.client.execute(req).await?;
6553
6554    let status = resp.status();
6555
6556    if !status.is_client_error() && !status.is_server_error() {
6557        Ok(())
6558    } else {
6559        let content = resp.text().await?;
6560        let entity: Option<PropertymappingsSourceScimDestroyError> = serde_json::from_str(&content).ok();
6561        Err(Error::ResponseError(ResponseContent {
6562            status,
6563            content,
6564            entity,
6565        }))
6566    }
6567}
6568
6569/// SCIMSourcePropertyMapping Viewset
6570pub async fn propertymappings_source_scim_list(
6571    configuration: &configuration::Configuration,
6572    managed: Option<Vec<String>>,
6573    managed__isnull: Option<bool>,
6574    name: Option<&str>,
6575    ordering: Option<&str>,
6576    page: Option<i32>,
6577    page_size: Option<i32>,
6578    search: Option<&str>,
6579) -> Result<models::PaginatedScimSourcePropertyMappingList, Error<PropertymappingsSourceScimListError>> {
6580    // add a prefix to parameters to efficiently prevent name collisions
6581    let p_query_managed = managed;
6582    let p_query_managed__isnull = managed__isnull;
6583    let p_query_name = name;
6584    let p_query_ordering = ordering;
6585    let p_query_page = page;
6586    let p_query_page_size = page_size;
6587    let p_query_search = search;
6588
6589    let uri_str = format!("{}/propertymappings/source/scim/", configuration.base_path);
6590    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6591
6592    if let Some(ref param_value) = p_query_managed {
6593        req_builder = match "multi" {
6594            "multi" => req_builder.query(
6595                &param_value
6596                    .into_iter()
6597                    .map(|p| ("managed".to_owned(), p.to_string()))
6598                    .collect::<Vec<(std::string::String, std::string::String)>>(),
6599            ),
6600            _ => req_builder.query(&[(
6601                "managed",
6602                &param_value
6603                    .into_iter()
6604                    .map(|p| p.to_string())
6605                    .collect::<Vec<String>>()
6606                    .join(",")
6607                    .to_string(),
6608            )]),
6609        };
6610    }
6611    if let Some(ref param_value) = p_query_managed__isnull {
6612        req_builder = req_builder.query(&[("managed__isnull", &param_value.to_string())]);
6613    }
6614    if let Some(ref param_value) = p_query_name {
6615        req_builder = req_builder.query(&[("name", &param_value.to_string())]);
6616    }
6617    if let Some(ref param_value) = p_query_ordering {
6618        req_builder = req_builder.query(&[("ordering", &param_value.to_string())]);
6619    }
6620    if let Some(ref param_value) = p_query_page {
6621        req_builder = req_builder.query(&[("page", &param_value.to_string())]);
6622    }
6623    if let Some(ref param_value) = p_query_page_size {
6624        req_builder = req_builder.query(&[("page_size", &param_value.to_string())]);
6625    }
6626    if let Some(ref param_value) = p_query_search {
6627        req_builder = req_builder.query(&[("search", &param_value.to_string())]);
6628    }
6629    if let Some(ref user_agent) = configuration.user_agent {
6630        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6631    }
6632    if let Some(ref token) = configuration.bearer_access_token {
6633        req_builder = req_builder.bearer_auth(token.to_owned());
6634    };
6635
6636    let req = req_builder.build()?;
6637    let resp = configuration.client.execute(req).await?;
6638
6639    let status = resp.status();
6640    let content_type = resp
6641        .headers()
6642        .get("content-type")
6643        .and_then(|v| v.to_str().ok())
6644        .unwrap_or("application/octet-stream");
6645    let content_type = super::ContentType::from(content_type);
6646
6647    if !status.is_client_error() && !status.is_server_error() {
6648        let content = resp.text().await?;
6649        match content_type {
6650            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6651            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::PaginatedScimSourcePropertyMappingList`"))),
6652            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::PaginatedScimSourcePropertyMappingList`")))),
6653        }
6654    } else {
6655        let content = resp.text().await?;
6656        let entity: Option<PropertymappingsSourceScimListError> = serde_json::from_str(&content).ok();
6657        Err(Error::ResponseError(ResponseContent {
6658            status,
6659            content,
6660            entity,
6661        }))
6662    }
6663}
6664
6665/// SCIMSourcePropertyMapping Viewset
6666pub async fn propertymappings_source_scim_partial_update(
6667    configuration: &configuration::Configuration,
6668    pm_uuid: &str,
6669    patched_scim_source_property_mapping_request: Option<models::PatchedScimSourcePropertyMappingRequest>,
6670) -> Result<models::ScimSourcePropertyMapping, Error<PropertymappingsSourceScimPartialUpdateError>> {
6671    // add a prefix to parameters to efficiently prevent name collisions
6672    let p_path_pm_uuid = pm_uuid;
6673    let p_body_patched_scim_source_property_mapping_request = patched_scim_source_property_mapping_request;
6674
6675    let uri_str = format!(
6676        "{}/propertymappings/source/scim/{pm_uuid}/",
6677        configuration.base_path,
6678        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
6679    );
6680    let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
6681
6682    if let Some(ref user_agent) = configuration.user_agent {
6683        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6684    }
6685    if let Some(ref token) = configuration.bearer_access_token {
6686        req_builder = req_builder.bearer_auth(token.to_owned());
6687    };
6688    req_builder = req_builder.json(&p_body_patched_scim_source_property_mapping_request);
6689
6690    let req = req_builder.build()?;
6691    let resp = configuration.client.execute(req).await?;
6692
6693    let status = resp.status();
6694    let content_type = resp
6695        .headers()
6696        .get("content-type")
6697        .and_then(|v| v.to_str().ok())
6698        .unwrap_or("application/octet-stream");
6699    let content_type = super::ContentType::from(content_type);
6700
6701    if !status.is_client_error() && !status.is_server_error() {
6702        let content = resp.text().await?;
6703        match content_type {
6704            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6705            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ScimSourcePropertyMapping`"))),
6706            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ScimSourcePropertyMapping`")))),
6707        }
6708    } else {
6709        let content = resp.text().await?;
6710        let entity: Option<PropertymappingsSourceScimPartialUpdateError> = serde_json::from_str(&content).ok();
6711        Err(Error::ResponseError(ResponseContent {
6712            status,
6713            content,
6714            entity,
6715        }))
6716    }
6717}
6718
6719/// SCIMSourcePropertyMapping Viewset
6720pub async fn propertymappings_source_scim_retrieve(
6721    configuration: &configuration::Configuration,
6722    pm_uuid: &str,
6723) -> Result<models::ScimSourcePropertyMapping, Error<PropertymappingsSourceScimRetrieveError>> {
6724    // add a prefix to parameters to efficiently prevent name collisions
6725    let p_path_pm_uuid = pm_uuid;
6726
6727    let uri_str = format!(
6728        "{}/propertymappings/source/scim/{pm_uuid}/",
6729        configuration.base_path,
6730        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
6731    );
6732    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6733
6734    if let Some(ref user_agent) = configuration.user_agent {
6735        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6736    }
6737    if let Some(ref token) = configuration.bearer_access_token {
6738        req_builder = req_builder.bearer_auth(token.to_owned());
6739    };
6740
6741    let req = req_builder.build()?;
6742    let resp = configuration.client.execute(req).await?;
6743
6744    let status = resp.status();
6745    let content_type = resp
6746        .headers()
6747        .get("content-type")
6748        .and_then(|v| v.to_str().ok())
6749        .unwrap_or("application/octet-stream");
6750    let content_type = super::ContentType::from(content_type);
6751
6752    if !status.is_client_error() && !status.is_server_error() {
6753        let content = resp.text().await?;
6754        match content_type {
6755            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6756            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ScimSourcePropertyMapping`"))),
6757            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ScimSourcePropertyMapping`")))),
6758        }
6759    } else {
6760        let content = resp.text().await?;
6761        let entity: Option<PropertymappingsSourceScimRetrieveError> = serde_json::from_str(&content).ok();
6762        Err(Error::ResponseError(ResponseContent {
6763            status,
6764            content,
6765            entity,
6766        }))
6767    }
6768}
6769
6770/// SCIMSourcePropertyMapping Viewset
6771pub async fn propertymappings_source_scim_update(
6772    configuration: &configuration::Configuration,
6773    pm_uuid: &str,
6774    scim_source_property_mapping_request: models::ScimSourcePropertyMappingRequest,
6775) -> Result<models::ScimSourcePropertyMapping, Error<PropertymappingsSourceScimUpdateError>> {
6776    // add a prefix to parameters to efficiently prevent name collisions
6777    let p_path_pm_uuid = pm_uuid;
6778    let p_body_scim_source_property_mapping_request = scim_source_property_mapping_request;
6779
6780    let uri_str = format!(
6781        "{}/propertymappings/source/scim/{pm_uuid}/",
6782        configuration.base_path,
6783        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
6784    );
6785    let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6786
6787    if let Some(ref user_agent) = configuration.user_agent {
6788        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6789    }
6790    if let Some(ref token) = configuration.bearer_access_token {
6791        req_builder = req_builder.bearer_auth(token.to_owned());
6792    };
6793    req_builder = req_builder.json(&p_body_scim_source_property_mapping_request);
6794
6795    let req = req_builder.build()?;
6796    let resp = configuration.client.execute(req).await?;
6797
6798    let status = resp.status();
6799    let content_type = resp
6800        .headers()
6801        .get("content-type")
6802        .and_then(|v| v.to_str().ok())
6803        .unwrap_or("application/octet-stream");
6804    let content_type = super::ContentType::from(content_type);
6805
6806    if !status.is_client_error() && !status.is_server_error() {
6807        let content = resp.text().await?;
6808        match content_type {
6809            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6810            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ScimSourcePropertyMapping`"))),
6811            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ScimSourcePropertyMapping`")))),
6812        }
6813    } else {
6814        let content = resp.text().await?;
6815        let entity: Option<PropertymappingsSourceScimUpdateError> = serde_json::from_str(&content).ok();
6816        Err(Error::ResponseError(ResponseContent {
6817            status,
6818            content,
6819            entity,
6820        }))
6821    }
6822}
6823
6824/// Get a list of all objects that use this object
6825pub async fn propertymappings_source_scim_used_by_list(
6826    configuration: &configuration::Configuration,
6827    pm_uuid: &str,
6828) -> Result<Vec<models::UsedBy>, Error<PropertymappingsSourceScimUsedByListError>> {
6829    // add a prefix to parameters to efficiently prevent name collisions
6830    let p_path_pm_uuid = pm_uuid;
6831
6832    let uri_str = format!(
6833        "{}/propertymappings/source/scim/{pm_uuid}/used_by/",
6834        configuration.base_path,
6835        pm_uuid = crate::apis::urlencode(p_path_pm_uuid)
6836    );
6837    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
6838
6839    if let Some(ref user_agent) = configuration.user_agent {
6840        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6841    }
6842    if let Some(ref token) = configuration.bearer_access_token {
6843        req_builder = req_builder.bearer_auth(token.to_owned());
6844    };
6845
6846    let req = req_builder.build()?;
6847    let resp = configuration.client.execute(req).await?;
6848
6849    let status = resp.status();
6850    let content_type = resp
6851        .headers()
6852        .get("content-type")
6853        .and_then(|v| v.to_str().ok())
6854        .unwrap_or("application/octet-stream");
6855    let content_type = super::ContentType::from(content_type);
6856
6857    if !status.is_client_error() && !status.is_server_error() {
6858        let content = resp.text().await?;
6859        match content_type {
6860            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6861            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`"))),
6862            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::UsedBy&gt;`")))),
6863        }
6864    } else {
6865        let content = resp.text().await?;
6866        let entity: Option<PropertymappingsSourceScimUsedByListError> = serde_json::from_str(&content).ok();
6867        Err(Error::ResponseError(ResponseContent {
6868            status,
6869            content,
6870            entity,
6871        }))
6872    }
6873}