1use reqwest;
13use serde::{Deserialize, Serialize, de::Error as _};
14use crate::{apis::ResponseContent, models};
15use super::{Error, configuration, ContentType};
16
17
18#[derive(Debug, Clone, Serialize, Deserialize)]
20#[serde(untagged)]
21pub enum AddProviderError {
22 UnknownValue(serde_json::Value),
23}
24
25#[derive(Debug, Clone, Serialize, Deserialize)]
27#[serde(untagged)]
28pub enum AddTokenError {
29 UnknownValue(serde_json::Value),
30}
31
32#[derive(Debug, Clone, Serialize, Deserialize)]
34#[serde(untagged)]
35pub enum AddWebauthnCredentialError {
36 UnknownValue(serde_json::Value),
37}
38
39#[derive(Debug, Clone, Serialize, Deserialize)]
41#[serde(untagged)]
42pub enum CreateOrganizationError {
43 UnknownValue(serde_json::Value),
44}
45
46#[derive(Debug, Clone, Serialize, Deserialize)]
48#[serde(untagged)]
49pub enum CreateSessionError {
50 UnknownValue(serde_json::Value),
51}
52
53#[derive(Debug, Clone, Serialize, Deserialize)]
55#[serde(untagged)]
56pub enum DeleteIamApplicationsByOwnerByNameError {
57 UnknownValue(serde_json::Value),
58}
59
60#[derive(Debug, Clone, Serialize, Deserialize)]
62#[serde(untagged)]
63pub enum DeleteIamAuditLogsByOwnerByNameError {
64 UnknownValue(serde_json::Value),
65}
66
67#[derive(Debug, Clone, Serialize, Deserialize)]
69#[serde(untagged)]
70pub enum DeleteIamCertsByOwnerByNameError {
71 UnknownValue(serde_json::Value),
72}
73
74#[derive(Debug, Clone, Serialize, Deserialize)]
76#[serde(untagged)]
77pub enum DeleteIamInvitationsByOwnerByNameError {
78 UnknownValue(serde_json::Value),
79}
80
81#[derive(Debug, Clone, Serialize, Deserialize)]
83#[serde(untagged)]
84pub enum DeleteIamKeysByOwnerByNameError {
85 UnknownValue(serde_json::Value),
86}
87
88#[derive(Debug, Clone, Serialize, Deserialize)]
90#[serde(untagged)]
91pub enum DeleteIamMfaError {
92 UnknownValue(serde_json::Value),
93}
94
95#[derive(Debug, Clone, Serialize, Deserialize)]
97#[serde(untagged)]
98pub enum DeleteIamPermissionsByOwnerByNameError {
99 UnknownValue(serde_json::Value),
100}
101
102#[derive(Debug, Clone, Serialize, Deserialize)]
104#[serde(untagged)]
105pub enum DeleteIamProjectsByOwnerByNameError {
106 UnknownValue(serde_json::Value),
107}
108
109#[derive(Debug, Clone, Serialize, Deserialize)]
111#[serde(untagged)]
112pub enum DeleteIamRolesByOwnerByNameError {
113 UnknownValue(serde_json::Value),
114}
115
116#[derive(Debug, Clone, Serialize, Deserialize)]
118#[serde(untagged)]
119pub enum DeleteIamScimV2UsersByOwnerByNameError {
120 UnknownValue(serde_json::Value),
121}
122
123#[derive(Debug, Clone, Serialize, Deserialize)]
125#[serde(untagged)]
126pub enum DeleteIamServiceAccountsByNameError {
127 UnknownValue(serde_json::Value),
128}
129
130#[derive(Debug, Clone, Serialize, Deserialize)]
132#[serde(untagged)]
133pub enum DeleteIamUsersByOwnerByNameError {
134 UnknownValue(serde_json::Value),
135}
136
137#[derive(Debug, Clone, Serialize, Deserialize)]
139#[serde(untagged)]
140pub enum DeleteIamUsersByOwnerByNameKeysError {
141 UnknownValue(serde_json::Value),
142}
143
144#[derive(Debug, Clone, Serialize, Deserialize)]
146#[serde(untagged)]
147pub enum DeleteIamWorkspacesByOwnerByNameError {
148 UnknownValue(serde_json::Value),
149}
150
151#[derive(Debug, Clone, Serialize, Deserialize)]
153#[serde(untagged)]
154pub enum DeleteOrganizationError {
155 UnknownValue(serde_json::Value),
156}
157
158#[derive(Debug, Clone, Serialize, Deserialize)]
160#[serde(untagged)]
161pub enum DeleteProviderError {
162 UnknownValue(serde_json::Value),
163}
164
165#[derive(Debug, Clone, Serialize, Deserialize)]
167#[serde(untagged)]
168pub enum DeleteSessionError {
169 UnknownValue(serde_json::Value),
170}
171
172#[derive(Debug, Clone, Serialize, Deserialize)]
174#[serde(untagged)]
175pub enum DeleteTokenError {
176 UnknownValue(serde_json::Value),
177}
178
179#[derive(Debug, Clone, Serialize, Deserialize)]
181#[serde(untagged)]
182pub enum DeleteWebauthnCredentialError {
183 UnknownValue(serde_json::Value),
184}
185
186#[derive(Debug, Clone, Serialize, Deserialize)]
188#[serde(untagged)]
189pub enum GetIamAccountError {
190 UnknownValue(serde_json::Value),
191}
192
193#[derive(Debug, Clone, Serialize, Deserialize)]
195#[serde(untagged)]
196pub enum GetIamApplicationsError {
197 UnknownValue(serde_json::Value),
198}
199
200#[derive(Debug, Clone, Serialize, Deserialize)]
202#[serde(untagged)]
203pub enum GetIamApplicationsByOwnerByNameError {
204 UnknownValue(serde_json::Value),
205}
206
207#[derive(Debug, Clone, Serialize, Deserialize)]
209#[serde(untagged)]
210pub enum GetIamAuditLogsError {
211 UnknownValue(serde_json::Value),
212}
213
214#[derive(Debug, Clone, Serialize, Deserialize)]
216#[serde(untagged)]
217pub enum GetIamAuditLogsByOwnerByNameError {
218 UnknownValue(serde_json::Value),
219}
220
221#[derive(Debug, Clone, Serialize, Deserialize)]
223#[serde(untagged)]
224pub enum GetIamAuthApplicationError {
225 Status400(models::IamPeriodAnswer),
226 UnknownValue(serde_json::Value),
227}
228
229#[derive(Debug, Clone, Serialize, Deserialize)]
231#[serde(untagged)]
232pub enum GetIamAuthMethodsError {
233 Status400(models::IamPeriodAnswer),
234 UnknownValue(serde_json::Value),
235}
236
237#[derive(Debug, Clone, Serialize, Deserialize)]
239#[serde(untagged)]
240pub enum GetIamCertsError {
241 UnknownValue(serde_json::Value),
242}
243
244#[derive(Debug, Clone, Serialize, Deserialize)]
246#[serde(untagged)]
247pub enum GetIamCertsByOwnerByNameError {
248 UnknownValue(serde_json::Value),
249}
250
251#[derive(Debug, Clone, Serialize, Deserialize)]
253#[serde(untagged)]
254pub enum GetIamConsentError {
255 UnknownValue(serde_json::Value),
256}
257
258#[derive(Debug, Clone, Serialize, Deserialize)]
260#[serde(untagged)]
261pub enum GetIamInvitationsError {
262 UnknownValue(serde_json::Value),
263}
264
265#[derive(Debug, Clone, Serialize, Deserialize)]
267#[serde(untagged)]
268pub enum GetIamInvitationsByOwnerByNameError {
269 UnknownValue(serde_json::Value),
270}
271
272#[derive(Debug, Clone, Serialize, Deserialize)]
274#[serde(untagged)]
275pub enum GetIamKeysError {
276 UnknownValue(serde_json::Value),
277}
278
279#[derive(Debug, Clone, Serialize, Deserialize)]
281#[serde(untagged)]
282pub enum GetIamKeysByOwnerByNameError {
283 UnknownValue(serde_json::Value),
284}
285
286#[derive(Debug, Clone, Serialize, Deserialize)]
288#[serde(untagged)]
289pub enum GetIamKeysOrgError {
290 UnknownValue(serde_json::Value),
291}
292
293#[derive(Debug, Clone, Serialize, Deserialize)]
295#[serde(untagged)]
296pub enum GetIamKeysPrincipalError {
297 UnknownValue(serde_json::Value),
298}
299
300#[derive(Debug, Clone, Serialize, Deserialize)]
302#[serde(untagged)]
303pub enum GetIamLinkedAccountsError {
304 UnknownValue(serde_json::Value),
305}
306
307#[derive(Debug, Clone, Serialize, Deserialize)]
309#[serde(untagged)]
310pub enum GetIamMembershipsError {
311 Status400(models::IamPeriodAnswer),
312 UnknownValue(serde_json::Value),
313}
314
315#[derive(Debug, Clone, Serialize, Deserialize)]
317#[serde(untagged)]
318pub enum GetIamOauthAuthorizeError {
319 UnknownValue(serde_json::Value),
320}
321
322#[derive(Debug, Clone, Serialize, Deserialize)]
324#[serde(untagged)]
325pub enum GetIamOauthCallbackError {
326 UnknownValue(serde_json::Value),
327}
328
329#[derive(Debug, Clone, Serialize, Deserialize)]
331#[serde(untagged)]
332pub enum GetIamOauthLogoutError {
333 UnknownValue(serde_json::Value),
334}
335
336#[derive(Debug, Clone, Serialize, Deserialize)]
338#[serde(untagged)]
339pub enum GetIamOauthUserinfoError {
340 UnknownValue(serde_json::Value),
341}
342
343#[derive(Debug, Clone, Serialize, Deserialize)]
345#[serde(untagged)]
346pub enum GetIamPeriodWellKnownJwksError {
347 UnknownValue(serde_json::Value),
348}
349
350#[derive(Debug, Clone, Serialize, Deserialize)]
352#[serde(untagged)]
353pub enum GetIamPeriodWellKnownOauthAuthorizationServerError {
354 UnknownValue(serde_json::Value),
355}
356
357#[derive(Debug, Clone, Serialize, Deserialize)]
359#[serde(untagged)]
360pub enum GetIamPeriodWellKnownOpenidConfigurationError {
361 UnknownValue(serde_json::Value),
362}
363
364#[derive(Debug, Clone, Serialize, Deserialize)]
366#[serde(untagged)]
367pub enum GetIamPermissionsError {
368 UnknownValue(serde_json::Value),
369}
370
371#[derive(Debug, Clone, Serialize, Deserialize)]
373#[serde(untagged)]
374pub enum GetIamPermissionsByOwnerByNameError {
375 UnknownValue(serde_json::Value),
376}
377
378#[derive(Debug, Clone, Serialize, Deserialize)]
380#[serde(untagged)]
381pub enum GetIamProjectsError {
382 UnknownValue(serde_json::Value),
383}
384
385#[derive(Debug, Clone, Serialize, Deserialize)]
387#[serde(untagged)]
388pub enum GetIamProjectsByOwnerByNameError {
389 UnknownValue(serde_json::Value),
390}
391
392#[derive(Debug, Clone, Serialize, Deserialize)]
394#[serde(untagged)]
395pub enum GetIamRegistryJwksError {
396 UnknownValue(serde_json::Value),
397}
398
399#[derive(Debug, Clone, Serialize, Deserialize)]
401#[serde(untagged)]
402pub enum GetIamRegistryTokenError {
403 UnknownValue(serde_json::Value),
404}
405
406#[derive(Debug, Clone, Serialize, Deserialize)]
408#[serde(untagged)]
409pub enum GetIamRolesError {
410 UnknownValue(serde_json::Value),
411}
412
413#[derive(Debug, Clone, Serialize, Deserialize)]
415#[serde(untagged)]
416pub enum GetIamRolesByOwnerByNameError {
417 UnknownValue(serde_json::Value),
418}
419
420#[derive(Debug, Clone, Serialize, Deserialize)]
422#[serde(untagged)]
423pub enum GetIamScimV2ResourcetypesError {
424 UnknownValue(serde_json::Value),
425}
426
427#[derive(Debug, Clone, Serialize, Deserialize)]
429#[serde(untagged)]
430pub enum GetIamScimV2ResourcetypesByNameError {
431 Status404(serde_json::Value),
432 UnknownValue(serde_json::Value),
433}
434
435#[derive(Debug, Clone, Serialize, Deserialize)]
437#[serde(untagged)]
438pub enum GetIamScimV2SchemasError {
439 UnknownValue(serde_json::Value),
440}
441
442#[derive(Debug, Clone, Serialize, Deserialize)]
444#[serde(untagged)]
445pub enum GetIamScimV2SchemasByIdError {
446 Status404(serde_json::Value),
447 UnknownValue(serde_json::Value),
448}
449
450#[derive(Debug, Clone, Serialize, Deserialize)]
452#[serde(untagged)]
453pub enum GetIamScimV2ServiceproviderconfigError {
454 UnknownValue(serde_json::Value),
455}
456
457#[derive(Debug, Clone, Serialize, Deserialize)]
459#[serde(untagged)]
460pub enum GetIamScimV2UsersError {
461 UnknownValue(serde_json::Value),
462}
463
464#[derive(Debug, Clone, Serialize, Deserialize)]
466#[serde(untagged)]
467pub enum GetIamScimV2UsersByOwnerByNameError {
468 UnknownValue(serde_json::Value),
469}
470
471#[derive(Debug, Clone, Serialize, Deserialize)]
473#[serde(untagged)]
474pub enum GetIamServiceAccountsError {
475 Status400(models::IamPeriodAnswer),
476 UnknownValue(serde_json::Value),
477}
478
479#[derive(Debug, Clone, Serialize, Deserialize)]
481#[serde(untagged)]
482pub enum GetIamUsersError {
483 UnknownValue(serde_json::Value),
484}
485
486#[derive(Debug, Clone, Serialize, Deserialize)]
488#[serde(untagged)]
489pub enum GetIamUsersByOwnerByNameError {
490 UnknownValue(serde_json::Value),
491}
492
493#[derive(Debug, Clone, Serialize, Deserialize)]
495#[serde(untagged)]
496pub enum GetIamWeb3NonceError {
497 UnknownValue(serde_json::Value),
498}
499
500#[derive(Debug, Clone, Serialize, Deserialize)]
502#[serde(untagged)]
503pub enum GetIamWebauthnSigninBeginError {
504 UnknownValue(serde_json::Value),
505}
506
507#[derive(Debug, Clone, Serialize, Deserialize)]
509#[serde(untagged)]
510pub enum GetIamWebauthnSignupBeginError {
511 UnknownValue(serde_json::Value),
512}
513
514#[derive(Debug, Clone, Serialize, Deserialize)]
516#[serde(untagged)]
517pub enum GetIamWhoamiError {
518 UnknownValue(serde_json::Value),
519}
520
521#[derive(Debug, Clone, Serialize, Deserialize)]
523#[serde(untagged)]
524pub enum GetIamWorkspacesError {
525 UnknownValue(serde_json::Value),
526}
527
528#[derive(Debug, Clone, Serialize, Deserialize)]
530#[serde(untagged)]
531pub enum GetIamWorkspacesByOwnerByNameError {
532 UnknownValue(serde_json::Value),
533}
534
535#[derive(Debug, Clone, Serialize, Deserialize)]
537#[serde(untagged)]
538pub enum GetOrganizationError {
539 UnknownValue(serde_json::Value),
540}
541
542#[derive(Debug, Clone, Serialize, Deserialize)]
544#[serde(untagged)]
545pub enum GetProviderError {
546 UnknownValue(serde_json::Value),
547}
548
549#[derive(Debug, Clone, Serialize, Deserialize)]
551#[serde(untagged)]
552pub enum GetSessionError {
553 UnknownValue(serde_json::Value),
554}
555
556#[derive(Debug, Clone, Serialize, Deserialize)]
558#[serde(untagged)]
559pub enum GetTokenError {
560 UnknownValue(serde_json::Value),
561}
562
563#[derive(Debug, Clone, Serialize, Deserialize)]
565#[serde(untagged)]
566pub enum GetWebauthnCredentialError {
567 UnknownValue(serde_json::Value),
568}
569
570#[derive(Debug, Clone, Serialize, Deserialize)]
572#[serde(untagged)]
573pub enum ListOrganizationsError {
574 UnknownValue(serde_json::Value),
575}
576
577#[derive(Debug, Clone, Serialize, Deserialize)]
579#[serde(untagged)]
580pub enum ListProvidersError {
581 UnknownValue(serde_json::Value),
582}
583
584#[derive(Debug, Clone, Serialize, Deserialize)]
586#[serde(untagged)]
587pub enum ListSessionsError {
588 UnknownValue(serde_json::Value),
589}
590
591#[derive(Debug, Clone, Serialize, Deserialize)]
593#[serde(untagged)]
594pub enum ListTokensError {
595 UnknownValue(serde_json::Value),
596}
597
598#[derive(Debug, Clone, Serialize, Deserialize)]
600#[serde(untagged)]
601pub enum ListWebauthnCredentialsError {
602 UnknownValue(serde_json::Value),
603}
604
605#[derive(Debug, Clone, Serialize, Deserialize)]
607#[serde(untagged)]
608pub enum PatchIamScimV2UsersByOwnerByNameError {
609 UnknownValue(serde_json::Value),
610}
611
612#[derive(Debug, Clone, Serialize, Deserialize)]
614#[serde(untagged)]
615pub enum PostIamAdminProvisionError {
616 UnknownValue(serde_json::Value),
617}
618
619#[derive(Debug, Clone, Serialize, Deserialize)]
621#[serde(untagged)]
622pub enum PostIamApplicationsError {
623 UnknownValue(serde_json::Value),
624}
625
626#[derive(Debug, Clone, Serialize, Deserialize)]
628#[serde(untagged)]
629pub enum PostIamAssumeError {
630 Status400(models::IamPeriodAnswer),
631 Status401(models::IamPeriodAnswer),
632 Status403(models::IamPeriodAnswer),
633 Status404(models::IamPeriodAnswer),
634 UnknownValue(serde_json::Value),
635}
636
637#[derive(Debug, Clone, Serialize, Deserialize)]
639#[serde(untagged)]
640pub enum PostIamAuditLogsError {
641 UnknownValue(serde_json::Value),
642}
643
644#[derive(Debug, Clone, Serialize, Deserialize)]
646#[serde(untagged)]
647pub enum PostIamCertsError {
648 UnknownValue(serde_json::Value),
649}
650
651#[derive(Debug, Clone, Serialize, Deserialize)]
653#[serde(untagged)]
654pub enum PostIamDeleteMembershipError {
655 UnknownValue(serde_json::Value),
656}
657
658#[derive(Debug, Clone, Serialize, Deserialize)]
660#[serde(untagged)]
661pub enum PostIamInvitationsError {
662 UnknownValue(serde_json::Value),
663}
664
665#[derive(Debug, Clone, Serialize, Deserialize)]
667#[serde(untagged)]
668pub enum PostIamKeysError {
669 UnknownValue(serde_json::Value),
670}
671
672#[derive(Debug, Clone, Serialize, Deserialize)]
674#[serde(untagged)]
675pub enum PostIamLinkError {
676 UnknownValue(serde_json::Value),
677}
678
679#[derive(Debug, Clone, Serialize, Deserialize)]
681#[serde(untagged)]
682pub enum PostIamLoginError {
683 UnknownValue(serde_json::Value),
684}
685
686#[derive(Debug, Clone, Serialize, Deserialize)]
688#[serde(untagged)]
689pub enum PostIamMembershipsError {
690 UnknownValue(serde_json::Value),
691}
692
693#[derive(Debug, Clone, Serialize, Deserialize)]
695#[serde(untagged)]
696pub enum PostIamMfaPreferredError {
697 UnknownValue(serde_json::Value),
698}
699
700#[derive(Debug, Clone, Serialize, Deserialize)]
702#[serde(untagged)]
703pub enum PostIamMfaSetupEnableError {
704 UnknownValue(serde_json::Value),
705}
706
707#[derive(Debug, Clone, Serialize, Deserialize)]
709#[serde(untagged)]
710pub enum PostIamMfaSetupInitiateError {
711 UnknownValue(serde_json::Value),
712}
713
714#[derive(Debug, Clone, Serialize, Deserialize)]
716#[serde(untagged)]
717pub enum PostIamOauthAuthorizeError {
718 UnknownValue(serde_json::Value),
719}
720
721#[derive(Debug, Clone, Serialize, Deserialize)]
723#[serde(untagged)]
724pub enum PostIamOauthDeviceError {
725 UnknownValue(serde_json::Value),
726}
727
728#[derive(Debug, Clone, Serialize, Deserialize)]
730#[serde(untagged)]
731pub enum PostIamOauthDeviceInfoError {
732 UnknownValue(serde_json::Value),
733}
734
735#[derive(Debug, Clone, Serialize, Deserialize)]
737#[serde(untagged)]
738pub enum PostIamOauthFederationMfaError {
739 UnknownValue(serde_json::Value),
740}
741
742#[derive(Debug, Clone, Serialize, Deserialize)]
744#[serde(untagged)]
745pub enum PostIamOauthIntrospectError {
746 UnknownValue(serde_json::Value),
747}
748
749#[derive(Debug, Clone, Serialize, Deserialize)]
751#[serde(untagged)]
752pub enum PostIamOauthLogoutError {
753 UnknownValue(serde_json::Value),
754}
755
756#[derive(Debug, Clone, Serialize, Deserialize)]
758#[serde(untagged)]
759pub enum PostIamOauthRevokeError {
760 UnknownValue(serde_json::Value),
761}
762
763#[derive(Debug, Clone, Serialize, Deserialize)]
765#[serde(untagged)]
766pub enum PostIamOauthTokenError {
767 UnknownValue(serde_json::Value),
768}
769
770#[derive(Debug, Clone, Serialize, Deserialize)]
772#[serde(untagged)]
773pub enum PostIamOauthUserinfoError {
774 UnknownValue(serde_json::Value),
775}
776
777#[derive(Debug, Clone, Serialize, Deserialize)]
779#[serde(untagged)]
780pub enum PostIamOnboardError {
781 UnknownValue(serde_json::Value),
782}
783
784#[derive(Debug, Clone, Serialize, Deserialize)]
786#[serde(untagged)]
787pub enum PostIamPermissionsError {
788 UnknownValue(serde_json::Value),
789}
790
791#[derive(Debug, Clone, Serialize, Deserialize)]
793#[serde(untagged)]
794pub enum PostIamPreferencesError {
795 UnknownValue(serde_json::Value),
796}
797
798#[derive(Debug, Clone, Serialize, Deserialize)]
800#[serde(untagged)]
801pub enum PostIamProjectsError {
802 UnknownValue(serde_json::Value),
803}
804
805#[derive(Debug, Clone, Serialize, Deserialize)]
807#[serde(untagged)]
808pub enum PostIamRegistryTokenError {
809 UnknownValue(serde_json::Value),
810}
811
812#[derive(Debug, Clone, Serialize, Deserialize)]
814#[serde(untagged)]
815pub enum PostIamReleaseError {
816 Status400(models::IamPeriodAnswer),
817 Status401(models::IamPeriodAnswer),
818 UnknownValue(serde_json::Value),
819}
820
821#[derive(Debug, Clone, Serialize, Deserialize)]
823#[serde(untagged)]
824pub enum PostIamRolesError {
825 UnknownValue(serde_json::Value),
826}
827
828#[derive(Debug, Clone, Serialize, Deserialize)]
830#[serde(untagged)]
831pub enum PostIamScimV2UsersError {
832 UnknownValue(serde_json::Value),
833}
834
835#[derive(Debug, Clone, Serialize, Deserialize)]
837#[serde(untagged)]
838pub enum PostIamServiceAccountsError {
839 UnknownValue(serde_json::Value),
840}
841
842#[derive(Debug, Clone, Serialize, Deserialize)]
844#[serde(untagged)]
845pub enum PostIamServiceAccountsByNameKeysError {
846 UnknownValue(serde_json::Value),
847}
848
849#[derive(Debug, Clone, Serialize, Deserialize)]
851#[serde(untagged)]
852pub enum PostIamSigninError {
853 UnknownValue(serde_json::Value),
854}
855
856#[derive(Debug, Clone, Serialize, Deserialize)]
858#[serde(untagged)]
859pub enum PostIamSignupError {
860 UnknownValue(serde_json::Value),
861}
862
863#[derive(Debug, Clone, Serialize, Deserialize)]
865#[serde(untagged)]
866pub enum PostIamTokensIssueError {
867 UnknownValue(serde_json::Value),
868}
869
870#[derive(Debug, Clone, Serialize, Deserialize)]
872#[serde(untagged)]
873pub enum PostIamUnlinkError {
874 UnknownValue(serde_json::Value),
875}
876
877#[derive(Debug, Clone, Serialize, Deserialize)]
879#[serde(untagged)]
880pub enum PostIamUsersError {
881 UnknownValue(serde_json::Value),
882}
883
884#[derive(Debug, Clone, Serialize, Deserialize)]
886#[serde(untagged)]
887pub enum PostIamUsersByOwnerByNameKeysError {
888 UnknownValue(serde_json::Value),
889}
890
891#[derive(Debug, Clone, Serialize, Deserialize)]
893#[serde(untagged)]
894pub enum PostIamVerificationCodesError {
895 UnknownValue(serde_json::Value),
896}
897
898#[derive(Debug, Clone, Serialize, Deserialize)]
900#[serde(untagged)]
901pub enum PostIamWeb3VerifyError {
902 UnknownValue(serde_json::Value),
903}
904
905#[derive(Debug, Clone, Serialize, Deserialize)]
907#[serde(untagged)]
908pub enum PostIamWebauthnSigninFinishError {
909 UnknownValue(serde_json::Value),
910}
911
912#[derive(Debug, Clone, Serialize, Deserialize)]
914#[serde(untagged)]
915pub enum PostIamWebauthnSignupFinishError {
916 UnknownValue(serde_json::Value),
917}
918
919#[derive(Debug, Clone, Serialize, Deserialize)]
921#[serde(untagged)]
922pub enum PostIamWorkspacesError {
923 UnknownValue(serde_json::Value),
924}
925
926#[derive(Debug, Clone, Serialize, Deserialize)]
928#[serde(untagged)]
929pub enum PutIamAccountError {
930 Status400(models::IamPeriodAnswer),
931 UnknownValue(serde_json::Value),
932}
933
934#[derive(Debug, Clone, Serialize, Deserialize)]
936#[serde(untagged)]
937pub enum PutIamApplicationsByOwnerByNameError {
938 UnknownValue(serde_json::Value),
939}
940
941#[derive(Debug, Clone, Serialize, Deserialize)]
943#[serde(untagged)]
944pub enum PutIamAuditLogsByOwnerByNameError {
945 UnknownValue(serde_json::Value),
946}
947
948#[derive(Debug, Clone, Serialize, Deserialize)]
950#[serde(untagged)]
951pub enum PutIamCertsByOwnerByNameError {
952 UnknownValue(serde_json::Value),
953}
954
955#[derive(Debug, Clone, Serialize, Deserialize)]
957#[serde(untagged)]
958pub enum PutIamConsentError {
959 UnknownValue(serde_json::Value),
960}
961
962#[derive(Debug, Clone, Serialize, Deserialize)]
964#[serde(untagged)]
965pub enum PutIamInvitationsByOwnerByNameError {
966 UnknownValue(serde_json::Value),
967}
968
969#[derive(Debug, Clone, Serialize, Deserialize)]
971#[serde(untagged)]
972pub enum PutIamKeysByOwnerByNameError {
973 UnknownValue(serde_json::Value),
974}
975
976#[derive(Debug, Clone, Serialize, Deserialize)]
978#[serde(untagged)]
979pub enum PutIamPasswordError {
980 Status400(models::IamPeriodAnswer),
981 UnknownValue(serde_json::Value),
982}
983
984#[derive(Debug, Clone, Serialize, Deserialize)]
986#[serde(untagged)]
987pub enum PutIamPermissionsByOwnerByNameError {
988 UnknownValue(serde_json::Value),
989}
990
991#[derive(Debug, Clone, Serialize, Deserialize)]
993#[serde(untagged)]
994pub enum PutIamProjectsByOwnerByNameError {
995 UnknownValue(serde_json::Value),
996}
997
998#[derive(Debug, Clone, Serialize, Deserialize)]
1000#[serde(untagged)]
1001pub enum PutIamRolesByOwnerByNameError {
1002 UnknownValue(serde_json::Value),
1003}
1004
1005#[derive(Debug, Clone, Serialize, Deserialize)]
1007#[serde(untagged)]
1008pub enum PutIamScimV2UsersByOwnerByNameError {
1009 UnknownValue(serde_json::Value),
1010}
1011
1012#[derive(Debug, Clone, Serialize, Deserialize)]
1014#[serde(untagged)]
1015pub enum PutIamUsersByOwnerByNameError {
1016 UnknownValue(serde_json::Value),
1017}
1018
1019#[derive(Debug, Clone, Serialize, Deserialize)]
1021#[serde(untagged)]
1022pub enum PutIamWorkspacesByOwnerByNameError {
1023 UnknownValue(serde_json::Value),
1024}
1025
1026#[derive(Debug, Clone, Serialize, Deserialize)]
1028#[serde(untagged)]
1029pub enum SetOrganizationAvatarError {
1030 UnknownValue(serde_json::Value),
1031}
1032
1033#[derive(Debug, Clone, Serialize, Deserialize)]
1035#[serde(untagged)]
1036pub enum UpdateOrganizationError {
1037 UnknownValue(serde_json::Value),
1038}
1039
1040#[derive(Debug, Clone, Serialize, Deserialize)]
1042#[serde(untagged)]
1043pub enum UpdateProviderError {
1044 UnknownValue(serde_json::Value),
1045}
1046
1047#[derive(Debug, Clone, Serialize, Deserialize)]
1049#[serde(untagged)]
1050pub enum UpdateSessionError {
1051 UnknownValue(serde_json::Value),
1052}
1053
1054#[derive(Debug, Clone, Serialize, Deserialize)]
1056#[serde(untagged)]
1057pub enum UpdateTokenError {
1058 UnknownValue(serde_json::Value),
1059}
1060
1061#[derive(Debug, Clone, Serialize, Deserialize)]
1063#[serde(untagged)]
1064pub enum UpdateWebauthnCredentialError {
1065 UnknownValue(serde_json::Value),
1066}
1067
1068#[derive(Debug, Clone, Serialize, Deserialize)]
1070#[serde(untagged)]
1071pub enum UpsertApplicationError {
1072 Status400(models::IamPeriodReply),
1073 Status401(models::IamPeriodReply),
1074 Status500(models::IamPeriodReply),
1075 UnknownValue(serde_json::Value),
1076}
1077
1078#[derive(Debug, Clone, Serialize, Deserialize)]
1080#[serde(untagged)]
1081pub enum UpsertUserError {
1082 Status400(models::IamPeriodReply),
1083 Status401(models::IamPeriodReply),
1084 Status500(models::IamPeriodReply),
1085 UnknownValue(serde_json::Value),
1086}
1087
1088
1089pub async fn add_provider(configuration: &configuration::Configuration, iam_period_provider: models::IamPeriodProvider) -> Result<models::IamPeriodProviderResult, Error<AddProviderError>> {
1091 let p_iam_period_provider = iam_period_provider;
1093
1094 let uri_str = format!("{}/v1/iam/providers", configuration.base_path);
1095 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
1096
1097 if let Some(ref user_agent) = configuration.user_agent {
1098 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1099 }
1100 if let Some(ref token) = configuration.bearer_access_token {
1101 req_builder = req_builder.bearer_auth(token.to_owned());
1102 };
1103 req_builder = req_builder.json(&p_iam_period_provider);
1104
1105 let req = req_builder.build()?;
1106 let resp = configuration.client.execute(req).await?;
1107
1108 let status = resp.status();
1109 let content_type = resp
1110 .headers()
1111 .get("content-type")
1112 .and_then(|v| v.to_str().ok())
1113 .unwrap_or("application/octet-stream");
1114 let content_type = super::ContentType::from(content_type);
1115
1116 if !status.is_client_error() && !status.is_server_error() {
1117 let content = resp.text().await?;
1118 match content_type {
1119 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1120 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodProviderResult`"))),
1121 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::IamPeriodProviderResult`")))),
1122 }
1123 } else {
1124 let content = resp.text().await?;
1125 let entity: Option<AddProviderError> = serde_json::from_str(&content).ok();
1126 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1127 }
1128}
1129
1130pub async fn add_token(configuration: &configuration::Configuration, iam_period_token: models::IamPeriodToken) -> Result<models::IamPeriodTokenResult, Error<AddTokenError>> {
1132 let p_iam_period_token = iam_period_token;
1134
1135 let uri_str = format!("{}/v1/iam/tokens", configuration.base_path);
1136 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
1137
1138 if let Some(ref user_agent) = configuration.user_agent {
1139 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1140 }
1141 if let Some(ref token) = configuration.bearer_access_token {
1142 req_builder = req_builder.bearer_auth(token.to_owned());
1143 };
1144 req_builder = req_builder.json(&p_iam_period_token);
1145
1146 let req = req_builder.build()?;
1147 let resp = configuration.client.execute(req).await?;
1148
1149 let status = resp.status();
1150 let content_type = resp
1151 .headers()
1152 .get("content-type")
1153 .and_then(|v| v.to_str().ok())
1154 .unwrap_or("application/octet-stream");
1155 let content_type = super::ContentType::from(content_type);
1156
1157 if !status.is_client_error() && !status.is_server_error() {
1158 let content = resp.text().await?;
1159 match content_type {
1160 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1161 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodTokenResult`"))),
1162 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::IamPeriodTokenResult`")))),
1163 }
1164 } else {
1165 let content = resp.text().await?;
1166 let entity: Option<AddTokenError> = serde_json::from_str(&content).ok();
1167 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1168 }
1169}
1170
1171pub async fn add_webauthn_credential(configuration: &configuration::Configuration, iam_period_webauthn_credential: models::IamPeriodWebauthnCredential) -> Result<models::IamPeriodWebauthnCredentialResult, Error<AddWebauthnCredentialError>> {
1173 let p_iam_period_webauthn_credential = iam_period_webauthn_credential;
1175
1176 let uri_str = format!("{}/v1/iam/webauthn-credentials", configuration.base_path);
1177 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
1178
1179 if let Some(ref user_agent) = configuration.user_agent {
1180 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1181 }
1182 if let Some(ref token) = configuration.bearer_access_token {
1183 req_builder = req_builder.bearer_auth(token.to_owned());
1184 };
1185 req_builder = req_builder.json(&p_iam_period_webauthn_credential);
1186
1187 let req = req_builder.build()?;
1188 let resp = configuration.client.execute(req).await?;
1189
1190 let status = resp.status();
1191 let content_type = resp
1192 .headers()
1193 .get("content-type")
1194 .and_then(|v| v.to_str().ok())
1195 .unwrap_or("application/octet-stream");
1196 let content_type = super::ContentType::from(content_type);
1197
1198 if !status.is_client_error() && !status.is_server_error() {
1199 let content = resp.text().await?;
1200 match content_type {
1201 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1202 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodWebauthnCredentialResult`"))),
1203 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::IamPeriodWebauthnCredentialResult`")))),
1204 }
1205 } else {
1206 let content = resp.text().await?;
1207 let entity: Option<AddWebauthnCredentialError> = serde_json::from_str(&content).ok();
1208 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1209 }
1210}
1211
1212pub async fn create_organization(configuration: &configuration::Configuration, iam_period_create_organization_input: models::IamPeriodCreateOrganizationInput) -> Result<models::IamPeriodOrganization, Error<CreateOrganizationError>> {
1214 let p_iam_period_create_organization_input = iam_period_create_organization_input;
1216
1217 let uri_str = format!("{}/v1/iam/organizations", configuration.base_path);
1218 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
1219
1220 if let Some(ref user_agent) = configuration.user_agent {
1221 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1222 }
1223 if let Some(ref token) = configuration.bearer_access_token {
1224 req_builder = req_builder.bearer_auth(token.to_owned());
1225 };
1226 req_builder = req_builder.json(&p_iam_period_create_organization_input);
1227
1228 let req = req_builder.build()?;
1229 let resp = configuration.client.execute(req).await?;
1230
1231 let status = resp.status();
1232 let content_type = resp
1233 .headers()
1234 .get("content-type")
1235 .and_then(|v| v.to_str().ok())
1236 .unwrap_or("application/octet-stream");
1237 let content_type = super::ContentType::from(content_type);
1238
1239 if !status.is_client_error() && !status.is_server_error() {
1240 let content = resp.text().await?;
1241 match content_type {
1242 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1243 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodOrganization`"))),
1244 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::IamPeriodOrganization`")))),
1245 }
1246 } else {
1247 let content = resp.text().await?;
1248 let entity: Option<CreateOrganizationError> = serde_json::from_str(&content).ok();
1249 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1250 }
1251}
1252
1253pub async fn create_session(configuration: &configuration::Configuration, iam_period_create_session_in: models::IamPeriodCreateSessionIn) -> Result<models::IamPeriodSession, Error<CreateSessionError>> {
1255 let p_iam_period_create_session_in = iam_period_create_session_in;
1257
1258 let uri_str = format!("{}/v1/iam/sessions", configuration.base_path);
1259 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
1260
1261 if let Some(ref user_agent) = configuration.user_agent {
1262 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1263 }
1264 if let Some(ref token) = configuration.bearer_access_token {
1265 req_builder = req_builder.bearer_auth(token.to_owned());
1266 };
1267 req_builder = req_builder.json(&p_iam_period_create_session_in);
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 `models::IamPeriodSession`"))),
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 `models::IamPeriodSession`")))),
1286 }
1287 } else {
1288 let content = resp.text().await?;
1289 let entity: Option<CreateSessionError> = serde_json::from_str(&content).ok();
1290 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1291 }
1292}
1293
1294pub async fn delete_iam_applications_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodDeleteResult, Error<DeleteIamApplicationsByOwnerByNameError>> {
1296 let p_owner = owner;
1298 let p_name = name;
1299
1300 let uri_str = format!("{}/v1/iam/applications/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
1301 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1302
1303 if let Some(ref user_agent) = configuration.user_agent {
1304 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1305 }
1306 if let Some(ref token) = configuration.bearer_access_token {
1307 req_builder = req_builder.bearer_auth(token.to_owned());
1308 };
1309
1310 let req = req_builder.build()?;
1311 let resp = configuration.client.execute(req).await?;
1312
1313 let status = resp.status();
1314 let content_type = resp
1315 .headers()
1316 .get("content-type")
1317 .and_then(|v| v.to_str().ok())
1318 .unwrap_or("application/octet-stream");
1319 let content_type = super::ContentType::from(content_type);
1320
1321 if !status.is_client_error() && !status.is_server_error() {
1322 let content = resp.text().await?;
1323 match content_type {
1324 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1325 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodDeleteResult`"))),
1326 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::IamPeriodDeleteResult`")))),
1327 }
1328 } else {
1329 let content = resp.text().await?;
1330 let entity: Option<DeleteIamApplicationsByOwnerByNameError> = serde_json::from_str(&content).ok();
1331 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1332 }
1333}
1334
1335pub async fn delete_iam_audit_logs_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodDeleteOutput, Error<DeleteIamAuditLogsByOwnerByNameError>> {
1337 let p_owner = owner;
1339 let p_name = name;
1340
1341 let uri_str = format!("{}/v1/iam/audit-logs/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
1342 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1343
1344 if let Some(ref user_agent) = configuration.user_agent {
1345 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1346 }
1347 if let Some(ref token) = configuration.bearer_access_token {
1348 req_builder = req_builder.bearer_auth(token.to_owned());
1349 };
1350
1351 let req = req_builder.build()?;
1352 let resp = configuration.client.execute(req).await?;
1353
1354 let status = resp.status();
1355 let content_type = resp
1356 .headers()
1357 .get("content-type")
1358 .and_then(|v| v.to_str().ok())
1359 .unwrap_or("application/octet-stream");
1360 let content_type = super::ContentType::from(content_type);
1361
1362 if !status.is_client_error() && !status.is_server_error() {
1363 let content = resp.text().await?;
1364 match content_type {
1365 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1366 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodDeleteOutput`"))),
1367 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::IamPeriodDeleteOutput`")))),
1368 }
1369 } else {
1370 let content = resp.text().await?;
1371 let entity: Option<DeleteIamAuditLogsByOwnerByNameError> = serde_json::from_str(&content).ok();
1372 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1373 }
1374}
1375
1376pub async fn delete_iam_certs_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodCertsPeriodDeleteOutput, Error<DeleteIamCertsByOwnerByNameError>> {
1378 let p_owner = owner;
1380 let p_name = name;
1381
1382 let uri_str = format!("{}/v1/iam/certs/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
1383 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1384
1385 if let Some(ref user_agent) = configuration.user_agent {
1386 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1387 }
1388 if let Some(ref token) = configuration.bearer_access_token {
1389 req_builder = req_builder.bearer_auth(token.to_owned());
1390 };
1391
1392 let req = req_builder.build()?;
1393 let resp = configuration.client.execute(req).await?;
1394
1395 let status = resp.status();
1396 let content_type = resp
1397 .headers()
1398 .get("content-type")
1399 .and_then(|v| v.to_str().ok())
1400 .unwrap_or("application/octet-stream");
1401 let content_type = super::ContentType::from(content_type);
1402
1403 if !status.is_client_error() && !status.is_server_error() {
1404 let content = resp.text().await?;
1405 match content_type {
1406 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1407 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodCertsPeriodDeleteOutput`"))),
1408 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::IamPeriodCertsPeriodDeleteOutput`")))),
1409 }
1410 } else {
1411 let content = resp.text().await?;
1412 let entity: Option<DeleteIamCertsByOwnerByNameError> = serde_json::from_str(&content).ok();
1413 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1414 }
1415}
1416
1417pub async fn delete_iam_invitations_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodInvitationsPeriodDeleteOutput, Error<DeleteIamInvitationsByOwnerByNameError>> {
1419 let p_owner = owner;
1421 let p_name = name;
1422
1423 let uri_str = format!("{}/v1/iam/invitations/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
1424 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1425
1426 if let Some(ref user_agent) = configuration.user_agent {
1427 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1428 }
1429 if let Some(ref token) = configuration.bearer_access_token {
1430 req_builder = req_builder.bearer_auth(token.to_owned());
1431 };
1432
1433 let req = req_builder.build()?;
1434 let resp = configuration.client.execute(req).await?;
1435
1436 let status = resp.status();
1437 let content_type = resp
1438 .headers()
1439 .get("content-type")
1440 .and_then(|v| v.to_str().ok())
1441 .unwrap_or("application/octet-stream");
1442 let content_type = super::ContentType::from(content_type);
1443
1444 if !status.is_client_error() && !status.is_server_error() {
1445 let content = resp.text().await?;
1446 match content_type {
1447 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1448 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodInvitationsPeriodDeleteOutput`"))),
1449 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::IamPeriodInvitationsPeriodDeleteOutput`")))),
1450 }
1451 } else {
1452 let content = resp.text().await?;
1453 let entity: Option<DeleteIamInvitationsByOwnerByNameError> = serde_json::from_str(&content).ok();
1454 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1455 }
1456}
1457
1458pub async fn delete_iam_keys_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodDeleteResponse, Error<DeleteIamKeysByOwnerByNameError>> {
1460 let p_owner = owner;
1462 let p_name = name;
1463
1464 let uri_str = format!("{}/v1/iam/keys/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
1465 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1466
1467 if let Some(ref user_agent) = configuration.user_agent {
1468 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1469 }
1470 if let Some(ref token) = configuration.bearer_access_token {
1471 req_builder = req_builder.bearer_auth(token.to_owned());
1472 };
1473
1474 let req = req_builder.build()?;
1475 let resp = configuration.client.execute(req).await?;
1476
1477 let status = resp.status();
1478 let content_type = resp
1479 .headers()
1480 .get("content-type")
1481 .and_then(|v| v.to_str().ok())
1482 .unwrap_or("application/octet-stream");
1483 let content_type = super::ContentType::from(content_type);
1484
1485 if !status.is_client_error() && !status.is_server_error() {
1486 let content = resp.text().await?;
1487 match content_type {
1488 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1489 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodDeleteResponse`"))),
1490 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::IamPeriodDeleteResponse`")))),
1491 }
1492 } else {
1493 let content = resp.text().await?;
1494 let entity: Option<DeleteIamKeysByOwnerByNameError> = serde_json::from_str(&content).ok();
1495 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1496 }
1497}
1498
1499pub async fn delete_iam_mfa(configuration: &configuration::Configuration, ) -> Result<(), Error<DeleteIamMfaError>> {
1501
1502 let uri_str = format!("{}/v1/iam/mfa", configuration.base_path);
1503 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1504
1505 if let Some(ref user_agent) = configuration.user_agent {
1506 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1507 }
1508 if let Some(ref token) = configuration.bearer_access_token {
1509 req_builder = req_builder.bearer_auth(token.to_owned());
1510 };
1511
1512 let req = req_builder.build()?;
1513 let resp = configuration.client.execute(req).await?;
1514
1515 let status = resp.status();
1516
1517 if !status.is_client_error() && !status.is_server_error() {
1518 Ok(())
1519 } else {
1520 let content = resp.text().await?;
1521 let entity: Option<DeleteIamMfaError> = serde_json::from_str(&content).ok();
1522 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1523 }
1524}
1525
1526pub async fn delete_iam_permissions_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodPermissionPeriodDeleteResponse, Error<DeleteIamPermissionsByOwnerByNameError>> {
1528 let p_owner = owner;
1530 let p_name = name;
1531
1532 let uri_str = format!("{}/v1/iam/permissions/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
1533 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1534
1535 if let Some(ref user_agent) = configuration.user_agent {
1536 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1537 }
1538 if let Some(ref token) = configuration.bearer_access_token {
1539 req_builder = req_builder.bearer_auth(token.to_owned());
1540 };
1541
1542 let req = req_builder.build()?;
1543 let resp = configuration.client.execute(req).await?;
1544
1545 let status = resp.status();
1546 let content_type = resp
1547 .headers()
1548 .get("content-type")
1549 .and_then(|v| v.to_str().ok())
1550 .unwrap_or("application/octet-stream");
1551 let content_type = super::ContentType::from(content_type);
1552
1553 if !status.is_client_error() && !status.is_server_error() {
1554 let content = resp.text().await?;
1555 match content_type {
1556 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1557 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodPermissionPeriodDeleteResponse`"))),
1558 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::IamPeriodPermissionPeriodDeleteResponse`")))),
1559 }
1560 } else {
1561 let content = resp.text().await?;
1562 let entity: Option<DeleteIamPermissionsByOwnerByNameError> = serde_json::from_str(&content).ok();
1563 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1564 }
1565}
1566
1567pub async fn delete_iam_projects_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodProjectsPeriodDeleteOutput, Error<DeleteIamProjectsByOwnerByNameError>> {
1569 let p_owner = owner;
1571 let p_name = name;
1572
1573 let uri_str = format!("{}/v1/iam/projects/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
1574 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1575
1576 if let Some(ref user_agent) = configuration.user_agent {
1577 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1578 }
1579 if let Some(ref token) = configuration.bearer_access_token {
1580 req_builder = req_builder.bearer_auth(token.to_owned());
1581 };
1582
1583 let req = req_builder.build()?;
1584 let resp = configuration.client.execute(req).await?;
1585
1586 let status = resp.status();
1587 let content_type = resp
1588 .headers()
1589 .get("content-type")
1590 .and_then(|v| v.to_str().ok())
1591 .unwrap_or("application/octet-stream");
1592 let content_type = super::ContentType::from(content_type);
1593
1594 if !status.is_client_error() && !status.is_server_error() {
1595 let content = resp.text().await?;
1596 match content_type {
1597 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1598 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodProjectsPeriodDeleteOutput`"))),
1599 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::IamPeriodProjectsPeriodDeleteOutput`")))),
1600 }
1601 } else {
1602 let content = resp.text().await?;
1603 let entity: Option<DeleteIamProjectsByOwnerByNameError> = serde_json::from_str(&content).ok();
1604 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1605 }
1606}
1607
1608pub async fn delete_iam_roles_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodRolesPeriodDeleteOutput, Error<DeleteIamRolesByOwnerByNameError>> {
1610 let p_owner = owner;
1612 let p_name = name;
1613
1614 let uri_str = format!("{}/v1/iam/roles/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
1615 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1616
1617 if let Some(ref user_agent) = configuration.user_agent {
1618 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1619 }
1620 if let Some(ref token) = configuration.bearer_access_token {
1621 req_builder = req_builder.bearer_auth(token.to_owned());
1622 };
1623
1624 let req = req_builder.build()?;
1625 let resp = configuration.client.execute(req).await?;
1626
1627 let status = resp.status();
1628 let content_type = resp
1629 .headers()
1630 .get("content-type")
1631 .and_then(|v| v.to_str().ok())
1632 .unwrap_or("application/octet-stream");
1633 let content_type = super::ContentType::from(content_type);
1634
1635 if !status.is_client_error() && !status.is_server_error() {
1636 let content = resp.text().await?;
1637 match content_type {
1638 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1639 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodRolesPeriodDeleteOutput`"))),
1640 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::IamPeriodRolesPeriodDeleteOutput`")))),
1641 }
1642 } else {
1643 let content = resp.text().await?;
1644 let entity: Option<DeleteIamRolesByOwnerByNameError> = serde_json::from_str(&content).ok();
1645 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1646 }
1647}
1648
1649pub async fn delete_iam_scim_v2_users_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteIamScimV2UsersByOwnerByNameError>> {
1651 let p_owner = owner;
1653 let p_name = name;
1654
1655 let uri_str = format!("{}/v1/iam/scim/v2/Users/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
1656 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1657
1658 if let Some(ref user_agent) = configuration.user_agent {
1659 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1660 }
1661 if let Some(ref token) = configuration.bearer_access_token {
1662 req_builder = req_builder.bearer_auth(token.to_owned());
1663 };
1664
1665 let req = req_builder.build()?;
1666 let resp = configuration.client.execute(req).await?;
1667
1668 let status = resp.status();
1669
1670 if !status.is_client_error() && !status.is_server_error() {
1671 Ok(())
1672 } else {
1673 let content = resp.text().await?;
1674 let entity: Option<DeleteIamScimV2UsersByOwnerByNameError> = serde_json::from_str(&content).ok();
1675 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1676 }
1677}
1678
1679pub async fn delete_iam_service_accounts_by_name(configuration: &configuration::Configuration, name: &str) -> Result<(), Error<DeleteIamServiceAccountsByNameError>> {
1681 let p_name = name;
1683
1684 let uri_str = format!("{}/v1/iam/service-accounts/{name}", configuration.base_path, name=crate::apis::urlencode(p_name));
1685 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1686
1687 if let Some(ref user_agent) = configuration.user_agent {
1688 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1689 }
1690 if let Some(ref token) = configuration.bearer_access_token {
1691 req_builder = req_builder.bearer_auth(token.to_owned());
1692 };
1693
1694 let req = req_builder.build()?;
1695 let resp = configuration.client.execute(req).await?;
1696
1697 let status = resp.status();
1698
1699 if !status.is_client_error() && !status.is_server_error() {
1700 Ok(())
1701 } else {
1702 let content = resp.text().await?;
1703 let entity: Option<DeleteIamServiceAccountsByNameError> = serde_json::from_str(&content).ok();
1704 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1705 }
1706}
1707
1708pub async fn delete_iam_users_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodUsersPeriodDeleteOutput, Error<DeleteIamUsersByOwnerByNameError>> {
1710 let p_owner = owner;
1712 let p_name = name;
1713
1714 let uri_str = format!("{}/v1/iam/users/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
1715 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1716
1717 if let Some(ref user_agent) = configuration.user_agent {
1718 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1719 }
1720 if let Some(ref token) = configuration.bearer_access_token {
1721 req_builder = req_builder.bearer_auth(token.to_owned());
1722 };
1723
1724 let req = req_builder.build()?;
1725 let resp = configuration.client.execute(req).await?;
1726
1727 let status = resp.status();
1728 let content_type = resp
1729 .headers()
1730 .get("content-type")
1731 .and_then(|v| v.to_str().ok())
1732 .unwrap_or("application/octet-stream");
1733 let content_type = super::ContentType::from(content_type);
1734
1735 if !status.is_client_error() && !status.is_server_error() {
1736 let content = resp.text().await?;
1737 match content_type {
1738 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1739 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodUsersPeriodDeleteOutput`"))),
1740 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::IamPeriodUsersPeriodDeleteOutput`")))),
1741 }
1742 } else {
1743 let content = resp.text().await?;
1744 let entity: Option<DeleteIamUsersByOwnerByNameError> = serde_json::from_str(&content).ok();
1745 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1746 }
1747}
1748
1749pub async fn delete_iam_users_by_owner_by_name_keys(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<DeleteIamUsersByOwnerByNameKeysError>> {
1751 let p_owner = owner;
1753 let p_name = name;
1754
1755 let uri_str = format!("{}/v1/iam/users/{owner}/{name}/keys", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
1756 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1757
1758 if let Some(ref user_agent) = configuration.user_agent {
1759 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1760 }
1761 if let Some(ref token) = configuration.bearer_access_token {
1762 req_builder = req_builder.bearer_auth(token.to_owned());
1763 };
1764
1765 let req = req_builder.build()?;
1766 let resp = configuration.client.execute(req).await?;
1767
1768 let status = resp.status();
1769
1770 if !status.is_client_error() && !status.is_server_error() {
1771 Ok(())
1772 } else {
1773 let content = resp.text().await?;
1774 let entity: Option<DeleteIamUsersByOwnerByNameKeysError> = serde_json::from_str(&content).ok();
1775 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1776 }
1777}
1778
1779pub async fn delete_iam_workspaces_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodWorkspacesPeriodDeleteOutput, Error<DeleteIamWorkspacesByOwnerByNameError>> {
1781 let p_owner = owner;
1783 let p_name = name;
1784
1785 let uri_str = format!("{}/v1/iam/workspaces/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
1786 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1787
1788 if let Some(ref user_agent) = configuration.user_agent {
1789 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1790 }
1791 if let Some(ref token) = configuration.bearer_access_token {
1792 req_builder = req_builder.bearer_auth(token.to_owned());
1793 };
1794
1795 let req = req_builder.build()?;
1796 let resp = configuration.client.execute(req).await?;
1797
1798 let status = resp.status();
1799 let content_type = resp
1800 .headers()
1801 .get("content-type")
1802 .and_then(|v| v.to_str().ok())
1803 .unwrap_or("application/octet-stream");
1804 let content_type = super::ContentType::from(content_type);
1805
1806 if !status.is_client_error() && !status.is_server_error() {
1807 let content = resp.text().await?;
1808 match content_type {
1809 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1810 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodWorkspacesPeriodDeleteOutput`"))),
1811 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::IamPeriodWorkspacesPeriodDeleteOutput`")))),
1812 }
1813 } else {
1814 let content = resp.text().await?;
1815 let entity: Option<DeleteIamWorkspacesByOwnerByNameError> = serde_json::from_str(&content).ok();
1816 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1817 }
1818}
1819
1820pub async fn delete_organization(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodDeleteOrganizationOutput, Error<DeleteOrganizationError>> {
1822 let p_owner = owner;
1824 let p_name = name;
1825
1826 let uri_str = format!("{}/v1/iam/organizations/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
1827 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1828
1829 if let Some(ref user_agent) = configuration.user_agent {
1830 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1831 }
1832 if let Some(ref token) = configuration.bearer_access_token {
1833 req_builder = req_builder.bearer_auth(token.to_owned());
1834 };
1835
1836 let req = req_builder.build()?;
1837 let resp = configuration.client.execute(req).await?;
1838
1839 let status = resp.status();
1840 let content_type = resp
1841 .headers()
1842 .get("content-type")
1843 .and_then(|v| v.to_str().ok())
1844 .unwrap_or("application/octet-stream");
1845 let content_type = super::ContentType::from(content_type);
1846
1847 if !status.is_client_error() && !status.is_server_error() {
1848 let content = resp.text().await?;
1849 match content_type {
1850 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1851 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodDeleteOrganizationOutput`"))),
1852 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::IamPeriodDeleteOrganizationOutput`")))),
1853 }
1854 } else {
1855 let content = resp.text().await?;
1856 let entity: Option<DeleteOrganizationError> = serde_json::from_str(&content).ok();
1857 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1858 }
1859}
1860
1861pub async fn delete_provider(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodMutationResult, Error<DeleteProviderError>> {
1863 let p_owner = owner;
1865 let p_name = name;
1866
1867 let uri_str = format!("{}/v1/iam/providers/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
1868 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1869
1870 if let Some(ref user_agent) = configuration.user_agent {
1871 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1872 }
1873 if let Some(ref token) = configuration.bearer_access_token {
1874 req_builder = req_builder.bearer_auth(token.to_owned());
1875 };
1876
1877 let req = req_builder.build()?;
1878 let resp = configuration.client.execute(req).await?;
1879
1880 let status = resp.status();
1881 let content_type = resp
1882 .headers()
1883 .get("content-type")
1884 .and_then(|v| v.to_str().ok())
1885 .unwrap_or("application/octet-stream");
1886 let content_type = super::ContentType::from(content_type);
1887
1888 if !status.is_client_error() && !status.is_server_error() {
1889 let content = resp.text().await?;
1890 match content_type {
1891 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1892 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodMutationResult`"))),
1893 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::IamPeriodMutationResult`")))),
1894 }
1895 } else {
1896 let content = resp.text().await?;
1897 let entity: Option<DeleteProviderError> = serde_json::from_str(&content).ok();
1898 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1899 }
1900}
1901
1902pub async fn delete_session(configuration: &configuration::Configuration, owner: &str, name: &str, application: &str) -> Result<models::IamPeriodDeleteSessionOut, Error<DeleteSessionError>> {
1904 let p_owner = owner;
1906 let p_name = name;
1907 let p_application = application;
1908
1909 let uri_str = format!("{}/v1/iam/sessions/{owner}/{name}/{application}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name), application=crate::apis::urlencode(p_application));
1910 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1911
1912 if let Some(ref user_agent) = configuration.user_agent {
1913 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1914 }
1915 if let Some(ref token) = configuration.bearer_access_token {
1916 req_builder = req_builder.bearer_auth(token.to_owned());
1917 };
1918
1919 let req = req_builder.build()?;
1920 let resp = configuration.client.execute(req).await?;
1921
1922 let status = resp.status();
1923 let content_type = resp
1924 .headers()
1925 .get("content-type")
1926 .and_then(|v| v.to_str().ok())
1927 .unwrap_or("application/octet-stream");
1928 let content_type = super::ContentType::from(content_type);
1929
1930 if !status.is_client_error() && !status.is_server_error() {
1931 let content = resp.text().await?;
1932 match content_type {
1933 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1934 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodDeleteSessionOut`"))),
1935 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::IamPeriodDeleteSessionOut`")))),
1936 }
1937 } else {
1938 let content = resp.text().await?;
1939 let entity: Option<DeleteSessionError> = serde_json::from_str(&content).ok();
1940 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1941 }
1942}
1943
1944pub async fn delete_token(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodTokenMutation, Error<DeleteTokenError>> {
1946 let p_owner = owner;
1948 let p_name = name;
1949
1950 let uri_str = format!("{}/v1/iam/tokens/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
1951 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1952
1953 if let Some(ref user_agent) = configuration.user_agent {
1954 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1955 }
1956 if let Some(ref token) = configuration.bearer_access_token {
1957 req_builder = req_builder.bearer_auth(token.to_owned());
1958 };
1959
1960 let req = req_builder.build()?;
1961 let resp = configuration.client.execute(req).await?;
1962
1963 let status = resp.status();
1964 let content_type = resp
1965 .headers()
1966 .get("content-type")
1967 .and_then(|v| v.to_str().ok())
1968 .unwrap_or("application/octet-stream");
1969 let content_type = super::ContentType::from(content_type);
1970
1971 if !status.is_client_error() && !status.is_server_error() {
1972 let content = resp.text().await?;
1973 match content_type {
1974 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1975 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodTokenMutation`"))),
1976 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::IamPeriodTokenMutation`")))),
1977 }
1978 } else {
1979 let content = resp.text().await?;
1980 let entity: Option<DeleteTokenError> = serde_json::from_str(&content).ok();
1981 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1982 }
1983}
1984
1985pub async fn delete_webauthn_credential(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodWebauthnCredentialMutationResult, Error<DeleteWebauthnCredentialError>> {
1987 let p_owner = owner;
1989 let p_name = name;
1990
1991 let uri_str = format!("{}/v1/iam/webauthn-credentials/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
1992 let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str);
1993
1994 if let Some(ref user_agent) = configuration.user_agent {
1995 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1996 }
1997 if let Some(ref token) = configuration.bearer_access_token {
1998 req_builder = req_builder.bearer_auth(token.to_owned());
1999 };
2000
2001 let req = req_builder.build()?;
2002 let resp = configuration.client.execute(req).await?;
2003
2004 let status = resp.status();
2005 let content_type = resp
2006 .headers()
2007 .get("content-type")
2008 .and_then(|v| v.to_str().ok())
2009 .unwrap_or("application/octet-stream");
2010 let content_type = super::ContentType::from(content_type);
2011
2012 if !status.is_client_error() && !status.is_server_error() {
2013 let content = resp.text().await?;
2014 match content_type {
2015 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2016 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodWebauthnCredentialMutationResult`"))),
2017 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::IamPeriodWebauthnCredentialMutationResult`")))),
2018 }
2019 } else {
2020 let content = resp.text().await?;
2021 let entity: Option<DeleteWebauthnCredentialError> = serde_json::from_str(&content).ok();
2022 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2023 }
2024}
2025
2026pub async fn get_iam_account(configuration: &configuration::Configuration, ) -> Result<(), Error<GetIamAccountError>> {
2028
2029 let uri_str = format!("{}/v1/iam/account", configuration.base_path);
2030 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2031
2032 if let Some(ref user_agent) = configuration.user_agent {
2033 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2034 }
2035 if let Some(ref token) = configuration.bearer_access_token {
2036 req_builder = req_builder.bearer_auth(token.to_owned());
2037 };
2038
2039 let req = req_builder.build()?;
2040 let resp = configuration.client.execute(req).await?;
2041
2042 let status = resp.status();
2043
2044 if !status.is_client_error() && !status.is_server_error() {
2045 Ok(())
2046 } else {
2047 let content = resp.text().await?;
2048 let entity: Option<GetIamAccountError> = serde_json::from_str(&content).ok();
2049 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2050 }
2051}
2052
2053pub async fn get_iam_applications(configuration: &configuration::Configuration, owner: &str) -> Result<models::IamPeriodApplicationListResult, Error<GetIamApplicationsError>> {
2055 let p_owner = owner;
2057
2058 let uri_str = format!("{}/v1/iam/applications", configuration.base_path);
2059 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2060
2061 req_builder = req_builder.query(&[("owner", &p_owner.to_string())]);
2062 if let Some(ref user_agent) = configuration.user_agent {
2063 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2064 }
2065 if let Some(ref token) = configuration.bearer_access_token {
2066 req_builder = req_builder.bearer_auth(token.to_owned());
2067 };
2068
2069 let req = req_builder.build()?;
2070 let resp = configuration.client.execute(req).await?;
2071
2072 let status = resp.status();
2073 let content_type = resp
2074 .headers()
2075 .get("content-type")
2076 .and_then(|v| v.to_str().ok())
2077 .unwrap_or("application/octet-stream");
2078 let content_type = super::ContentType::from(content_type);
2079
2080 if !status.is_client_error() && !status.is_server_error() {
2081 let content = resp.text().await?;
2082 match content_type {
2083 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2084 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodApplicationListResult`"))),
2085 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::IamPeriodApplicationListResult`")))),
2086 }
2087 } else {
2088 let content = resp.text().await?;
2089 let entity: Option<GetIamApplicationsError> = serde_json::from_str(&content).ok();
2090 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2091 }
2092}
2093
2094pub async fn get_iam_applications_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodApplication, Error<GetIamApplicationsByOwnerByNameError>> {
2096 let p_owner = owner;
2098 let p_name = name;
2099
2100 let uri_str = format!("{}/v1/iam/applications/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2101 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2102
2103 if let Some(ref user_agent) = configuration.user_agent {
2104 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2105 }
2106 if let Some(ref token) = configuration.bearer_access_token {
2107 req_builder = req_builder.bearer_auth(token.to_owned());
2108 };
2109
2110 let req = req_builder.build()?;
2111 let resp = configuration.client.execute(req).await?;
2112
2113 let status = resp.status();
2114 let content_type = resp
2115 .headers()
2116 .get("content-type")
2117 .and_then(|v| v.to_str().ok())
2118 .unwrap_or("application/octet-stream");
2119 let content_type = super::ContentType::from(content_type);
2120
2121 if !status.is_client_error() && !status.is_server_error() {
2122 let content = resp.text().await?;
2123 match content_type {
2124 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2125 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodApplication`"))),
2126 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::IamPeriodApplication`")))),
2127 }
2128 } else {
2129 let content = resp.text().await?;
2130 let entity: Option<GetIamApplicationsByOwnerByNameError> = serde_json::from_str(&content).ok();
2131 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2132 }
2133}
2134
2135pub async fn get_iam_audit_logs(configuration: &configuration::Configuration, owner: Option<&str>) -> Result<models::IamPeriodListOutput, Error<GetIamAuditLogsError>> {
2137 let p_owner = owner;
2139
2140 let uri_str = format!("{}/v1/iam/audit-logs", configuration.base_path);
2141 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2142
2143 if let Some(ref param_value) = p_owner {
2144 req_builder = req_builder.query(&[("owner", ¶m_value.to_string())]);
2145 }
2146 if let Some(ref user_agent) = configuration.user_agent {
2147 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2148 }
2149 if let Some(ref token) = configuration.bearer_access_token {
2150 req_builder = req_builder.bearer_auth(token.to_owned());
2151 };
2152
2153 let req = req_builder.build()?;
2154 let resp = configuration.client.execute(req).await?;
2155
2156 let status = resp.status();
2157 let content_type = resp
2158 .headers()
2159 .get("content-type")
2160 .and_then(|v| v.to_str().ok())
2161 .unwrap_or("application/octet-stream");
2162 let content_type = super::ContentType::from(content_type);
2163
2164 if !status.is_client_error() && !status.is_server_error() {
2165 let content = resp.text().await?;
2166 match content_type {
2167 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2168 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodListOutput`"))),
2169 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::IamPeriodListOutput`")))),
2170 }
2171 } else {
2172 let content = resp.text().await?;
2173 let entity: Option<GetIamAuditLogsError> = serde_json::from_str(&content).ok();
2174 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2175 }
2176}
2177
2178pub async fn get_iam_audit_logs_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodAuditLog, Error<GetIamAuditLogsByOwnerByNameError>> {
2180 let p_owner = owner;
2182 let p_name = name;
2183
2184 let uri_str = format!("{}/v1/iam/audit-logs/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2185 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2186
2187 if let Some(ref user_agent) = configuration.user_agent {
2188 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2189 }
2190 if let Some(ref token) = configuration.bearer_access_token {
2191 req_builder = req_builder.bearer_auth(token.to_owned());
2192 };
2193
2194 let req = req_builder.build()?;
2195 let resp = configuration.client.execute(req).await?;
2196
2197 let status = resp.status();
2198 let content_type = resp
2199 .headers()
2200 .get("content-type")
2201 .and_then(|v| v.to_str().ok())
2202 .unwrap_or("application/octet-stream");
2203 let content_type = super::ContentType::from(content_type);
2204
2205 if !status.is_client_error() && !status.is_server_error() {
2206 let content = resp.text().await?;
2207 match content_type {
2208 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2209 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodAuditLog`"))),
2210 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::IamPeriodAuditLog`")))),
2211 }
2212 } else {
2213 let content = resp.text().await?;
2214 let entity: Option<GetIamAuditLogsByOwnerByNameError> = serde_json::from_str(&content).ok();
2215 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2216 }
2217}
2218
2219pub async fn get_iam_auth_application(configuration: &configuration::Configuration, client_id: Option<&str>, response_type: Option<&str>) -> Result<models::IamPeriodAnswer, Error<GetIamAuthApplicationError>> {
2221 let p_client_id = client_id;
2223 let p_response_type = response_type;
2224
2225 let uri_str = format!("{}/v1/iam/auth/application", configuration.base_path);
2226 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2227
2228 if let Some(ref param_value) = p_client_id {
2229 req_builder = req_builder.query(&[("clientId", ¶m_value.to_string())]);
2230 }
2231 if let Some(ref param_value) = p_response_type {
2232 req_builder = req_builder.query(&[("responseType", ¶m_value.to_string())]);
2233 }
2234 if let Some(ref user_agent) = configuration.user_agent {
2235 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2236 }
2237 if let Some(ref token) = configuration.bearer_access_token {
2238 req_builder = req_builder.bearer_auth(token.to_owned());
2239 };
2240
2241 let req = req_builder.build()?;
2242 let resp = configuration.client.execute(req).await?;
2243
2244 let status = resp.status();
2245 let content_type = resp
2246 .headers()
2247 .get("content-type")
2248 .and_then(|v| v.to_str().ok())
2249 .unwrap_or("application/octet-stream");
2250 let content_type = super::ContentType::from(content_type);
2251
2252 if !status.is_client_error() && !status.is_server_error() {
2253 let content = resp.text().await?;
2254 match content_type {
2255 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2256 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodAnswer`"))),
2257 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::IamPeriodAnswer`")))),
2258 }
2259 } else {
2260 let content = resp.text().await?;
2261 let entity: Option<GetIamAuthApplicationError> = serde_json::from_str(&content).ok();
2262 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2263 }
2264}
2265
2266pub async fn get_iam_auth_methods(configuration: &configuration::Configuration, client_id: Option<&str>) -> Result<models::IamPeriodAnswer, Error<GetIamAuthMethodsError>> {
2268 let p_client_id = client_id;
2270
2271 let uri_str = format!("{}/v1/iam/auth/methods", configuration.base_path);
2272 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2273
2274 if let Some(ref param_value) = p_client_id {
2275 req_builder = req_builder.query(&[("clientId", ¶m_value.to_string())]);
2276 }
2277 if let Some(ref user_agent) = configuration.user_agent {
2278 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2279 }
2280 if let Some(ref token) = configuration.bearer_access_token {
2281 req_builder = req_builder.bearer_auth(token.to_owned());
2282 };
2283
2284 let req = req_builder.build()?;
2285 let resp = configuration.client.execute(req).await?;
2286
2287 let status = resp.status();
2288 let content_type = resp
2289 .headers()
2290 .get("content-type")
2291 .and_then(|v| v.to_str().ok())
2292 .unwrap_or("application/octet-stream");
2293 let content_type = super::ContentType::from(content_type);
2294
2295 if !status.is_client_error() && !status.is_server_error() {
2296 let content = resp.text().await?;
2297 match content_type {
2298 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2299 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodAnswer`"))),
2300 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::IamPeriodAnswer`")))),
2301 }
2302 } else {
2303 let content = resp.text().await?;
2304 let entity: Option<GetIamAuthMethodsError> = serde_json::from_str(&content).ok();
2305 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2306 }
2307}
2308
2309pub async fn get_iam_certs(configuration: &configuration::Configuration, owner: Option<&str>) -> Result<models::IamPeriodCertsPeriodListOutput, Error<GetIamCertsError>> {
2311 let p_owner = owner;
2313
2314 let uri_str = format!("{}/v1/iam/certs", configuration.base_path);
2315 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2316
2317 if let Some(ref param_value) = p_owner {
2318 req_builder = req_builder.query(&[("owner", ¶m_value.to_string())]);
2319 }
2320 if let Some(ref user_agent) = configuration.user_agent {
2321 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2322 }
2323 if let Some(ref token) = configuration.bearer_access_token {
2324 req_builder = req_builder.bearer_auth(token.to_owned());
2325 };
2326
2327 let req = req_builder.build()?;
2328 let resp = configuration.client.execute(req).await?;
2329
2330 let status = resp.status();
2331 let content_type = resp
2332 .headers()
2333 .get("content-type")
2334 .and_then(|v| v.to_str().ok())
2335 .unwrap_or("application/octet-stream");
2336 let content_type = super::ContentType::from(content_type);
2337
2338 if !status.is_client_error() && !status.is_server_error() {
2339 let content = resp.text().await?;
2340 match content_type {
2341 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2342 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodCertsPeriodListOutput`"))),
2343 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::IamPeriodCertsPeriodListOutput`")))),
2344 }
2345 } else {
2346 let content = resp.text().await?;
2347 let entity: Option<GetIamCertsError> = serde_json::from_str(&content).ok();
2348 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2349 }
2350}
2351
2352pub async fn get_iam_certs_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodCert, Error<GetIamCertsByOwnerByNameError>> {
2354 let p_owner = owner;
2356 let p_name = name;
2357
2358 let uri_str = format!("{}/v1/iam/certs/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2359 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2360
2361 if let Some(ref user_agent) = configuration.user_agent {
2362 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2363 }
2364 if let Some(ref token) = configuration.bearer_access_token {
2365 req_builder = req_builder.bearer_auth(token.to_owned());
2366 };
2367
2368 let req = req_builder.build()?;
2369 let resp = configuration.client.execute(req).await?;
2370
2371 let status = resp.status();
2372 let content_type = resp
2373 .headers()
2374 .get("content-type")
2375 .and_then(|v| v.to_str().ok())
2376 .unwrap_or("application/octet-stream");
2377 let content_type = super::ContentType::from(content_type);
2378
2379 if !status.is_client_error() && !status.is_server_error() {
2380 let content = resp.text().await?;
2381 match content_type {
2382 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2383 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodCert`"))),
2384 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::IamPeriodCert`")))),
2385 }
2386 } else {
2387 let content = resp.text().await?;
2388 let entity: Option<GetIamCertsByOwnerByNameError> = serde_json::from_str(&content).ok();
2389 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2390 }
2391}
2392
2393pub async fn get_iam_consent(configuration: &configuration::Configuration, ) -> Result<(), Error<GetIamConsentError>> {
2395
2396 let uri_str = format!("{}/v1/iam/consent", configuration.base_path);
2397 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2398
2399 if let Some(ref user_agent) = configuration.user_agent {
2400 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2401 }
2402 if let Some(ref token) = configuration.bearer_access_token {
2403 req_builder = req_builder.bearer_auth(token.to_owned());
2404 };
2405
2406 let req = req_builder.build()?;
2407 let resp = configuration.client.execute(req).await?;
2408
2409 let status = resp.status();
2410
2411 if !status.is_client_error() && !status.is_server_error() {
2412 Ok(())
2413 } else {
2414 let content = resp.text().await?;
2415 let entity: Option<GetIamConsentError> = serde_json::from_str(&content).ok();
2416 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2417 }
2418}
2419
2420pub async fn get_iam_invitations(configuration: &configuration::Configuration, owner: Option<&str>) -> Result<models::IamPeriodInvitationsPeriodListOutput, Error<GetIamInvitationsError>> {
2422 let p_owner = owner;
2424
2425 let uri_str = format!("{}/v1/iam/invitations", configuration.base_path);
2426 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2427
2428 if let Some(ref param_value) = p_owner {
2429 req_builder = req_builder.query(&[("owner", ¶m_value.to_string())]);
2430 }
2431 if let Some(ref user_agent) = configuration.user_agent {
2432 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2433 }
2434 if let Some(ref token) = configuration.bearer_access_token {
2435 req_builder = req_builder.bearer_auth(token.to_owned());
2436 };
2437
2438 let req = req_builder.build()?;
2439 let resp = configuration.client.execute(req).await?;
2440
2441 let status = resp.status();
2442 let content_type = resp
2443 .headers()
2444 .get("content-type")
2445 .and_then(|v| v.to_str().ok())
2446 .unwrap_or("application/octet-stream");
2447 let content_type = super::ContentType::from(content_type);
2448
2449 if !status.is_client_error() && !status.is_server_error() {
2450 let content = resp.text().await?;
2451 match content_type {
2452 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2453 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodInvitationsPeriodListOutput`"))),
2454 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::IamPeriodInvitationsPeriodListOutput`")))),
2455 }
2456 } else {
2457 let content = resp.text().await?;
2458 let entity: Option<GetIamInvitationsError> = serde_json::from_str(&content).ok();
2459 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2460 }
2461}
2462
2463pub async fn get_iam_invitations_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodInvitation, Error<GetIamInvitationsByOwnerByNameError>> {
2465 let p_owner = owner;
2467 let p_name = name;
2468
2469 let uri_str = format!("{}/v1/iam/invitations/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2470 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2471
2472 if let Some(ref user_agent) = configuration.user_agent {
2473 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2474 }
2475 if let Some(ref token) = configuration.bearer_access_token {
2476 req_builder = req_builder.bearer_auth(token.to_owned());
2477 };
2478
2479 let req = req_builder.build()?;
2480 let resp = configuration.client.execute(req).await?;
2481
2482 let status = resp.status();
2483 let content_type = resp
2484 .headers()
2485 .get("content-type")
2486 .and_then(|v| v.to_str().ok())
2487 .unwrap_or("application/octet-stream");
2488 let content_type = super::ContentType::from(content_type);
2489
2490 if !status.is_client_error() && !status.is_server_error() {
2491 let content = resp.text().await?;
2492 match content_type {
2493 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2494 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodInvitation`"))),
2495 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::IamPeriodInvitation`")))),
2496 }
2497 } else {
2498 let content = resp.text().await?;
2499 let entity: Option<GetIamInvitationsByOwnerByNameError> = serde_json::from_str(&content).ok();
2500 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2501 }
2502}
2503
2504pub async fn get_iam_keys(configuration: &configuration::Configuration, owner: Option<&str>) -> Result<models::IamPeriodListResponse, Error<GetIamKeysError>> {
2506 let p_owner = owner;
2508
2509 let uri_str = format!("{}/v1/iam/keys", configuration.base_path);
2510 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2511
2512 if let Some(ref param_value) = p_owner {
2513 req_builder = req_builder.query(&[("owner", ¶m_value.to_string())]);
2514 }
2515 if let Some(ref user_agent) = configuration.user_agent {
2516 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2517 }
2518 if let Some(ref token) = configuration.bearer_access_token {
2519 req_builder = req_builder.bearer_auth(token.to_owned());
2520 };
2521
2522 let req = req_builder.build()?;
2523 let resp = configuration.client.execute(req).await?;
2524
2525 let status = resp.status();
2526 let content_type = resp
2527 .headers()
2528 .get("content-type")
2529 .and_then(|v| v.to_str().ok())
2530 .unwrap_or("application/octet-stream");
2531 let content_type = super::ContentType::from(content_type);
2532
2533 if !status.is_client_error() && !status.is_server_error() {
2534 let content = resp.text().await?;
2535 match content_type {
2536 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2537 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodListResponse`"))),
2538 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::IamPeriodListResponse`")))),
2539 }
2540 } else {
2541 let content = resp.text().await?;
2542 let entity: Option<GetIamKeysError> = serde_json::from_str(&content).ok();
2543 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2544 }
2545}
2546
2547pub async fn get_iam_keys_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodKey, Error<GetIamKeysByOwnerByNameError>> {
2549 let p_owner = owner;
2551 let p_name = name;
2552
2553 let uri_str = format!("{}/v1/iam/keys/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2554 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2555
2556 if let Some(ref user_agent) = configuration.user_agent {
2557 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2558 }
2559 if let Some(ref token) = configuration.bearer_access_token {
2560 req_builder = req_builder.bearer_auth(token.to_owned());
2561 };
2562
2563 let req = req_builder.build()?;
2564 let resp = configuration.client.execute(req).await?;
2565
2566 let status = resp.status();
2567 let content_type = resp
2568 .headers()
2569 .get("content-type")
2570 .and_then(|v| v.to_str().ok())
2571 .unwrap_or("application/octet-stream");
2572 let content_type = super::ContentType::from(content_type);
2573
2574 if !status.is_client_error() && !status.is_server_error() {
2575 let content = resp.text().await?;
2576 match content_type {
2577 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2578 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodKey`"))),
2579 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::IamPeriodKey`")))),
2580 }
2581 } else {
2582 let content = resp.text().await?;
2583 let entity: Option<GetIamKeysByOwnerByNameError> = serde_json::from_str(&content).ok();
2584 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2585 }
2586}
2587
2588pub async fn get_iam_keys_org(configuration: &configuration::Configuration, ) -> Result<(), Error<GetIamKeysOrgError>> {
2590
2591 let uri_str = format!("{}/v1/iam/keys/org", configuration.base_path);
2592 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2593
2594 if let Some(ref user_agent) = configuration.user_agent {
2595 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2596 }
2597 if let Some(ref token) = configuration.bearer_access_token {
2598 req_builder = req_builder.bearer_auth(token.to_owned());
2599 };
2600
2601 let req = req_builder.build()?;
2602 let resp = configuration.client.execute(req).await?;
2603
2604 let status = resp.status();
2605
2606 if !status.is_client_error() && !status.is_server_error() {
2607 Ok(())
2608 } else {
2609 let content = resp.text().await?;
2610 let entity: Option<GetIamKeysOrgError> = serde_json::from_str(&content).ok();
2611 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2612 }
2613}
2614
2615pub async fn get_iam_keys_principal(configuration: &configuration::Configuration, ) -> Result<(), Error<GetIamKeysPrincipalError>> {
2617
2618 let uri_str = format!("{}/v1/iam/keys/principal", configuration.base_path);
2619 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2620
2621 if let Some(ref user_agent) = configuration.user_agent {
2622 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2623 }
2624 if let Some(ref token) = configuration.bearer_access_token {
2625 req_builder = req_builder.bearer_auth(token.to_owned());
2626 };
2627
2628 let req = req_builder.build()?;
2629 let resp = configuration.client.execute(req).await?;
2630
2631 let status = resp.status();
2632
2633 if !status.is_client_error() && !status.is_server_error() {
2634 Ok(())
2635 } else {
2636 let content = resp.text().await?;
2637 let entity: Option<GetIamKeysPrincipalError> = serde_json::from_str(&content).ok();
2638 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2639 }
2640}
2641
2642pub async fn get_iam_linked_accounts(configuration: &configuration::Configuration, ) -> Result<(), Error<GetIamLinkedAccountsError>> {
2644
2645 let uri_str = format!("{}/v1/iam/linked-accounts", configuration.base_path);
2646 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2647
2648 if let Some(ref user_agent) = configuration.user_agent {
2649 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2650 }
2651 if let Some(ref token) = configuration.bearer_access_token {
2652 req_builder = req_builder.bearer_auth(token.to_owned());
2653 };
2654
2655 let req = req_builder.build()?;
2656 let resp = configuration.client.execute(req).await?;
2657
2658 let status = resp.status();
2659
2660 if !status.is_client_error() && !status.is_server_error() {
2661 Ok(())
2662 } else {
2663 let content = resp.text().await?;
2664 let entity: Option<GetIamLinkedAccountsError> = serde_json::from_str(&content).ok();
2665 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2666 }
2667}
2668
2669pub async fn get_iam_memberships(configuration: &configuration::Configuration, user: Option<&str>, org: Option<&str>) -> Result<models::IamPeriodAnswer, Error<GetIamMembershipsError>> {
2671 let p_user = user;
2673 let p_org = org;
2674
2675 let uri_str = format!("{}/v1/iam/memberships", configuration.base_path);
2676 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2677
2678 if let Some(ref param_value) = p_user {
2679 req_builder = req_builder.query(&[("user", ¶m_value.to_string())]);
2680 }
2681 if let Some(ref param_value) = p_org {
2682 req_builder = req_builder.query(&[("org", ¶m_value.to_string())]);
2683 }
2684 if let Some(ref user_agent) = configuration.user_agent {
2685 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2686 }
2687 if let Some(ref token) = configuration.bearer_access_token {
2688 req_builder = req_builder.bearer_auth(token.to_owned());
2689 };
2690
2691 let req = req_builder.build()?;
2692 let resp = configuration.client.execute(req).await?;
2693
2694 let status = resp.status();
2695 let content_type = resp
2696 .headers()
2697 .get("content-type")
2698 .and_then(|v| v.to_str().ok())
2699 .unwrap_or("application/octet-stream");
2700 let content_type = super::ContentType::from(content_type);
2701
2702 if !status.is_client_error() && !status.is_server_error() {
2703 let content = resp.text().await?;
2704 match content_type {
2705 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2706 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodAnswer`"))),
2707 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::IamPeriodAnswer`")))),
2708 }
2709 } else {
2710 let content = resp.text().await?;
2711 let entity: Option<GetIamMembershipsError> = serde_json::from_str(&content).ok();
2712 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2713 }
2714}
2715
2716pub async fn get_iam_oauth_authorize(configuration: &configuration::Configuration, ) -> Result<(), Error<GetIamOauthAuthorizeError>> {
2718
2719 let uri_str = format!("{}/v1/iam/oauth/authorize", configuration.base_path);
2720 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2721
2722 if let Some(ref user_agent) = configuration.user_agent {
2723 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2724 }
2725 if let Some(ref token) = configuration.bearer_access_token {
2726 req_builder = req_builder.bearer_auth(token.to_owned());
2727 };
2728
2729 let req = req_builder.build()?;
2730 let resp = configuration.client.execute(req).await?;
2731
2732 let status = resp.status();
2733
2734 if !status.is_client_error() && !status.is_server_error() {
2735 Ok(())
2736 } else {
2737 let content = resp.text().await?;
2738 let entity: Option<GetIamOauthAuthorizeError> = serde_json::from_str(&content).ok();
2739 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2740 }
2741}
2742
2743pub async fn get_iam_oauth_callback(configuration: &configuration::Configuration, ) -> Result<(), Error<GetIamOauthCallbackError>> {
2745
2746 let uri_str = format!("{}/v1/iam/oauth/callback", configuration.base_path);
2747 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2748
2749 if let Some(ref user_agent) = configuration.user_agent {
2750 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2751 }
2752 if let Some(ref token) = configuration.bearer_access_token {
2753 req_builder = req_builder.bearer_auth(token.to_owned());
2754 };
2755
2756 let req = req_builder.build()?;
2757 let resp = configuration.client.execute(req).await?;
2758
2759 let status = resp.status();
2760
2761 if !status.is_client_error() && !status.is_server_error() {
2762 Ok(())
2763 } else {
2764 let content = resp.text().await?;
2765 let entity: Option<GetIamOauthCallbackError> = serde_json::from_str(&content).ok();
2766 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2767 }
2768}
2769
2770pub async fn get_iam_oauth_logout(configuration: &configuration::Configuration, ) -> Result<(), Error<GetIamOauthLogoutError>> {
2772
2773 let uri_str = format!("{}/v1/iam/oauth/logout", configuration.base_path);
2774 let mut req_builder = configuration.client.request(reqwest::Method::GET, &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
2783 let req = req_builder.build()?;
2784 let resp = configuration.client.execute(req).await?;
2785
2786 let status = resp.status();
2787
2788 if !status.is_client_error() && !status.is_server_error() {
2789 Ok(())
2790 } else {
2791 let content = resp.text().await?;
2792 let entity: Option<GetIamOauthLogoutError> = serde_json::from_str(&content).ok();
2793 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2794 }
2795}
2796
2797pub async fn get_iam_oauth_userinfo(configuration: &configuration::Configuration, ) -> Result<(), Error<GetIamOauthUserinfoError>> {
2799
2800 let uri_str = format!("{}/v1/iam/oauth/userinfo", configuration.base_path);
2801 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2802
2803 if let Some(ref user_agent) = configuration.user_agent {
2804 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2805 }
2806 if let Some(ref token) = configuration.bearer_access_token {
2807 req_builder = req_builder.bearer_auth(token.to_owned());
2808 };
2809
2810 let req = req_builder.build()?;
2811 let resp = configuration.client.execute(req).await?;
2812
2813 let status = resp.status();
2814
2815 if !status.is_client_error() && !status.is_server_error() {
2816 Ok(())
2817 } else {
2818 let content = resp.text().await?;
2819 let entity: Option<GetIamOauthUserinfoError> = serde_json::from_str(&content).ok();
2820 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2821 }
2822}
2823
2824pub async fn get_iam_period_well_known_jwks(configuration: &configuration::Configuration, ) -> Result<(), Error<GetIamPeriodWellKnownJwksError>> {
2826
2827 let uri_str = format!("{}/v1/iam/.well-known/jwks", configuration.base_path);
2828 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2829
2830 if let Some(ref user_agent) = configuration.user_agent {
2831 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2832 }
2833 if let Some(ref token) = configuration.bearer_access_token {
2834 req_builder = req_builder.bearer_auth(token.to_owned());
2835 };
2836
2837 let req = req_builder.build()?;
2838 let resp = configuration.client.execute(req).await?;
2839
2840 let status = resp.status();
2841
2842 if !status.is_client_error() && !status.is_server_error() {
2843 Ok(())
2844 } else {
2845 let content = resp.text().await?;
2846 let entity: Option<GetIamPeriodWellKnownJwksError> = serde_json::from_str(&content).ok();
2847 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2848 }
2849}
2850
2851pub async fn get_iam_period_well_known_oauth_authorization_server(configuration: &configuration::Configuration, ) -> Result<(), Error<GetIamPeriodWellKnownOauthAuthorizationServerError>> {
2853
2854 let uri_str = format!("{}/v1/iam/.well-known/oauth-authorization-server", configuration.base_path);
2855 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2856
2857 if let Some(ref user_agent) = configuration.user_agent {
2858 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2859 }
2860 if let Some(ref token) = configuration.bearer_access_token {
2861 req_builder = req_builder.bearer_auth(token.to_owned());
2862 };
2863
2864 let req = req_builder.build()?;
2865 let resp = configuration.client.execute(req).await?;
2866
2867 let status = resp.status();
2868
2869 if !status.is_client_error() && !status.is_server_error() {
2870 Ok(())
2871 } else {
2872 let content = resp.text().await?;
2873 let entity: Option<GetIamPeriodWellKnownOauthAuthorizationServerError> = serde_json::from_str(&content).ok();
2874 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2875 }
2876}
2877
2878pub async fn get_iam_period_well_known_openid_configuration(configuration: &configuration::Configuration, ) -> Result<(), Error<GetIamPeriodWellKnownOpenidConfigurationError>> {
2880
2881 let uri_str = format!("{}/v1/iam/.well-known/openid-configuration", configuration.base_path);
2882 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2883
2884 if let Some(ref user_agent) = configuration.user_agent {
2885 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2886 }
2887 if let Some(ref token) = configuration.bearer_access_token {
2888 req_builder = req_builder.bearer_auth(token.to_owned());
2889 };
2890
2891 let req = req_builder.build()?;
2892 let resp = configuration.client.execute(req).await?;
2893
2894 let status = resp.status();
2895
2896 if !status.is_client_error() && !status.is_server_error() {
2897 Ok(())
2898 } else {
2899 let content = resp.text().await?;
2900 let entity: Option<GetIamPeriodWellKnownOpenidConfigurationError> = serde_json::from_str(&content).ok();
2901 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2902 }
2903}
2904
2905pub async fn get_iam_permissions(configuration: &configuration::Configuration, owner: Option<&str>) -> Result<models::IamPeriodPermissionPeriodListResponse, Error<GetIamPermissionsError>> {
2907 let p_owner = owner;
2909
2910 let uri_str = format!("{}/v1/iam/permissions", configuration.base_path);
2911 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2912
2913 if let Some(ref param_value) = p_owner {
2914 req_builder = req_builder.query(&[("owner", ¶m_value.to_string())]);
2915 }
2916 if let Some(ref user_agent) = configuration.user_agent {
2917 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2918 }
2919 if let Some(ref token) = configuration.bearer_access_token {
2920 req_builder = req_builder.bearer_auth(token.to_owned());
2921 };
2922
2923 let req = req_builder.build()?;
2924 let resp = configuration.client.execute(req).await?;
2925
2926 let status = resp.status();
2927 let content_type = resp
2928 .headers()
2929 .get("content-type")
2930 .and_then(|v| v.to_str().ok())
2931 .unwrap_or("application/octet-stream");
2932 let content_type = super::ContentType::from(content_type);
2933
2934 if !status.is_client_error() && !status.is_server_error() {
2935 let content = resp.text().await?;
2936 match content_type {
2937 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2938 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodPermissionPeriodListResponse`"))),
2939 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::IamPeriodPermissionPeriodListResponse`")))),
2940 }
2941 } else {
2942 let content = resp.text().await?;
2943 let entity: Option<GetIamPermissionsError> = serde_json::from_str(&content).ok();
2944 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2945 }
2946}
2947
2948pub async fn get_iam_permissions_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodPermission, Error<GetIamPermissionsByOwnerByNameError>> {
2950 let p_owner = owner;
2952 let p_name = name;
2953
2954 let uri_str = format!("{}/v1/iam/permissions/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
2955 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2956
2957 if let Some(ref user_agent) = configuration.user_agent {
2958 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
2959 }
2960 if let Some(ref token) = configuration.bearer_access_token {
2961 req_builder = req_builder.bearer_auth(token.to_owned());
2962 };
2963
2964 let req = req_builder.build()?;
2965 let resp = configuration.client.execute(req).await?;
2966
2967 let status = resp.status();
2968 let content_type = resp
2969 .headers()
2970 .get("content-type")
2971 .and_then(|v| v.to_str().ok())
2972 .unwrap_or("application/octet-stream");
2973 let content_type = super::ContentType::from(content_type);
2974
2975 if !status.is_client_error() && !status.is_server_error() {
2976 let content = resp.text().await?;
2977 match content_type {
2978 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
2979 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodPermission`"))),
2980 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::IamPeriodPermission`")))),
2981 }
2982 } else {
2983 let content = resp.text().await?;
2984 let entity: Option<GetIamPermissionsByOwnerByNameError> = serde_json::from_str(&content).ok();
2985 Err(Error::ResponseError(ResponseContent { status, content, entity }))
2986 }
2987}
2988
2989pub async fn get_iam_projects(configuration: &configuration::Configuration, owner: Option<&str>) -> Result<models::IamPeriodProjectsPeriodListOutput, Error<GetIamProjectsError>> {
2991 let p_owner = owner;
2993
2994 let uri_str = format!("{}/v1/iam/projects", configuration.base_path);
2995 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
2996
2997 if let Some(ref param_value) = p_owner {
2998 req_builder = req_builder.query(&[("owner", ¶m_value.to_string())]);
2999 }
3000 if let Some(ref user_agent) = configuration.user_agent {
3001 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3002 }
3003 if let Some(ref token) = configuration.bearer_access_token {
3004 req_builder = req_builder.bearer_auth(token.to_owned());
3005 };
3006
3007 let req = req_builder.build()?;
3008 let resp = configuration.client.execute(req).await?;
3009
3010 let status = resp.status();
3011 let content_type = resp
3012 .headers()
3013 .get("content-type")
3014 .and_then(|v| v.to_str().ok())
3015 .unwrap_or("application/octet-stream");
3016 let content_type = super::ContentType::from(content_type);
3017
3018 if !status.is_client_error() && !status.is_server_error() {
3019 let content = resp.text().await?;
3020 match content_type {
3021 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3022 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodProjectsPeriodListOutput`"))),
3023 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::IamPeriodProjectsPeriodListOutput`")))),
3024 }
3025 } else {
3026 let content = resp.text().await?;
3027 let entity: Option<GetIamProjectsError> = serde_json::from_str(&content).ok();
3028 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3029 }
3030}
3031
3032pub async fn get_iam_projects_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodProject, Error<GetIamProjectsByOwnerByNameError>> {
3034 let p_owner = owner;
3036 let p_name = name;
3037
3038 let uri_str = format!("{}/v1/iam/projects/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
3039 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3040
3041 if let Some(ref user_agent) = configuration.user_agent {
3042 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3043 }
3044 if let Some(ref token) = configuration.bearer_access_token {
3045 req_builder = req_builder.bearer_auth(token.to_owned());
3046 };
3047
3048 let req = req_builder.build()?;
3049 let resp = configuration.client.execute(req).await?;
3050
3051 let status = resp.status();
3052 let content_type = resp
3053 .headers()
3054 .get("content-type")
3055 .and_then(|v| v.to_str().ok())
3056 .unwrap_or("application/octet-stream");
3057 let content_type = super::ContentType::from(content_type);
3058
3059 if !status.is_client_error() && !status.is_server_error() {
3060 let content = resp.text().await?;
3061 match content_type {
3062 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3063 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodProject`"))),
3064 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::IamPeriodProject`")))),
3065 }
3066 } else {
3067 let content = resp.text().await?;
3068 let entity: Option<GetIamProjectsByOwnerByNameError> = serde_json::from_str(&content).ok();
3069 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3070 }
3071}
3072
3073pub async fn get_iam_registry_jwks(configuration: &configuration::Configuration, ) -> Result<(), Error<GetIamRegistryJwksError>> {
3075
3076 let uri_str = format!("{}/v1/iam/registry/jwks", configuration.base_path);
3077 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3078
3079 if let Some(ref user_agent) = configuration.user_agent {
3080 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3081 }
3082 if let Some(ref token) = configuration.bearer_access_token {
3083 req_builder = req_builder.bearer_auth(token.to_owned());
3084 };
3085
3086 let req = req_builder.build()?;
3087 let resp = configuration.client.execute(req).await?;
3088
3089 let status = resp.status();
3090
3091 if !status.is_client_error() && !status.is_server_error() {
3092 Ok(())
3093 } else {
3094 let content = resp.text().await?;
3095 let entity: Option<GetIamRegistryJwksError> = serde_json::from_str(&content).ok();
3096 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3097 }
3098}
3099
3100pub async fn get_iam_registry_token(configuration: &configuration::Configuration, ) -> Result<(), Error<GetIamRegistryTokenError>> {
3102
3103 let uri_str = format!("{}/v1/iam/registry/token", configuration.base_path);
3104 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3105
3106 if let Some(ref user_agent) = configuration.user_agent {
3107 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3108 }
3109 if let Some(ref token) = configuration.bearer_access_token {
3110 req_builder = req_builder.bearer_auth(token.to_owned());
3111 };
3112
3113 let req = req_builder.build()?;
3114 let resp = configuration.client.execute(req).await?;
3115
3116 let status = resp.status();
3117
3118 if !status.is_client_error() && !status.is_server_error() {
3119 Ok(())
3120 } else {
3121 let content = resp.text().await?;
3122 let entity: Option<GetIamRegistryTokenError> = serde_json::from_str(&content).ok();
3123 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3124 }
3125}
3126
3127pub async fn get_iam_roles(configuration: &configuration::Configuration, owner: Option<&str>) -> Result<models::IamPeriodRolesPeriodListOutput, Error<GetIamRolesError>> {
3129 let p_owner = owner;
3131
3132 let uri_str = format!("{}/v1/iam/roles", configuration.base_path);
3133 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3134
3135 if let Some(ref param_value) = p_owner {
3136 req_builder = req_builder.query(&[("owner", ¶m_value.to_string())]);
3137 }
3138 if let Some(ref user_agent) = configuration.user_agent {
3139 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3140 }
3141 if let Some(ref token) = configuration.bearer_access_token {
3142 req_builder = req_builder.bearer_auth(token.to_owned());
3143 };
3144
3145 let req = req_builder.build()?;
3146 let resp = configuration.client.execute(req).await?;
3147
3148 let status = resp.status();
3149 let content_type = resp
3150 .headers()
3151 .get("content-type")
3152 .and_then(|v| v.to_str().ok())
3153 .unwrap_or("application/octet-stream");
3154 let content_type = super::ContentType::from(content_type);
3155
3156 if !status.is_client_error() && !status.is_server_error() {
3157 let content = resp.text().await?;
3158 match content_type {
3159 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3160 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodRolesPeriodListOutput`"))),
3161 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::IamPeriodRolesPeriodListOutput`")))),
3162 }
3163 } else {
3164 let content = resp.text().await?;
3165 let entity: Option<GetIamRolesError> = serde_json::from_str(&content).ok();
3166 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3167 }
3168}
3169
3170pub async fn get_iam_roles_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodRole, Error<GetIamRolesByOwnerByNameError>> {
3172 let p_owner = owner;
3174 let p_name = name;
3175
3176 let uri_str = format!("{}/v1/iam/roles/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
3177 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3178
3179 if let Some(ref user_agent) = configuration.user_agent {
3180 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3181 }
3182 if let Some(ref token) = configuration.bearer_access_token {
3183 req_builder = req_builder.bearer_auth(token.to_owned());
3184 };
3185
3186 let req = req_builder.build()?;
3187 let resp = configuration.client.execute(req).await?;
3188
3189 let status = resp.status();
3190 let content_type = resp
3191 .headers()
3192 .get("content-type")
3193 .and_then(|v| v.to_str().ok())
3194 .unwrap_or("application/octet-stream");
3195 let content_type = super::ContentType::from(content_type);
3196
3197 if !status.is_client_error() && !status.is_server_error() {
3198 let content = resp.text().await?;
3199 match content_type {
3200 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3201 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodRole`"))),
3202 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::IamPeriodRole`")))),
3203 }
3204 } else {
3205 let content = resp.text().await?;
3206 let entity: Option<GetIamRolesByOwnerByNameError> = serde_json::from_str(&content).ok();
3207 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3208 }
3209}
3210
3211pub async fn get_iam_scim_v2_resourcetypes(configuration: &configuration::Configuration, ) -> Result<models::IamPeriodListResponse, Error<GetIamScimV2ResourcetypesError>> {
3213
3214 let uri_str = format!("{}/v1/iam/scim/v2/ResourceTypes", configuration.base_path);
3215 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3216
3217 if let Some(ref user_agent) = configuration.user_agent {
3218 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3219 }
3220 if let Some(ref token) = configuration.bearer_access_token {
3221 req_builder = req_builder.bearer_auth(token.to_owned());
3222 };
3223
3224 let req = req_builder.build()?;
3225 let resp = configuration.client.execute(req).await?;
3226
3227 let status = resp.status();
3228 let content_type = resp
3229 .headers()
3230 .get("content-type")
3231 .and_then(|v| v.to_str().ok())
3232 .unwrap_or("application/octet-stream");
3233 let content_type = super::ContentType::from(content_type);
3234
3235 if !status.is_client_error() && !status.is_server_error() {
3236 let content = resp.text().await?;
3237 match content_type {
3238 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3239 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodListResponse`"))),
3240 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::IamPeriodListResponse`")))),
3241 }
3242 } else {
3243 let content = resp.text().await?;
3244 let entity: Option<GetIamScimV2ResourcetypesError> = serde_json::from_str(&content).ok();
3245 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3246 }
3247}
3248
3249pub async fn get_iam_scim_v2_resourcetypes_by_name(configuration: &configuration::Configuration, name: &str) -> Result<serde_json::Value, Error<GetIamScimV2ResourcetypesByNameError>> {
3251 let p_name = name;
3253
3254 let uri_str = format!("{}/v1/iam/scim/v2/ResourceTypes/{name}", configuration.base_path, name=crate::apis::urlencode(p_name));
3255 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3256
3257 if let Some(ref user_agent) = configuration.user_agent {
3258 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3259 }
3260 if let Some(ref token) = configuration.bearer_access_token {
3261 req_builder = req_builder.bearer_auth(token.to_owned());
3262 };
3263
3264 let req = req_builder.build()?;
3265 let resp = configuration.client.execute(req).await?;
3266
3267 let status = resp.status();
3268 let content_type = resp
3269 .headers()
3270 .get("content-type")
3271 .and_then(|v| v.to_str().ok())
3272 .unwrap_or("application/octet-stream");
3273 let content_type = super::ContentType::from(content_type);
3274
3275 if !status.is_client_error() && !status.is_server_error() {
3276 let content = resp.text().await?;
3277 match content_type {
3278 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3279 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))),
3280 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))),
3281 }
3282 } else {
3283 let content = resp.text().await?;
3284 let entity: Option<GetIamScimV2ResourcetypesByNameError> = serde_json::from_str(&content).ok();
3285 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3286 }
3287}
3288
3289pub async fn get_iam_scim_v2_schemas(configuration: &configuration::Configuration, ) -> Result<models::IamPeriodListResponse, Error<GetIamScimV2SchemasError>> {
3291
3292 let uri_str = format!("{}/v1/iam/scim/v2/Schemas", configuration.base_path);
3293 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3294
3295 if let Some(ref user_agent) = configuration.user_agent {
3296 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3297 }
3298 if let Some(ref token) = configuration.bearer_access_token {
3299 req_builder = req_builder.bearer_auth(token.to_owned());
3300 };
3301
3302 let req = req_builder.build()?;
3303 let resp = configuration.client.execute(req).await?;
3304
3305 let status = resp.status();
3306 let content_type = resp
3307 .headers()
3308 .get("content-type")
3309 .and_then(|v| v.to_str().ok())
3310 .unwrap_or("application/octet-stream");
3311 let content_type = super::ContentType::from(content_type);
3312
3313 if !status.is_client_error() && !status.is_server_error() {
3314 let content = resp.text().await?;
3315 match content_type {
3316 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3317 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodListResponse`"))),
3318 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::IamPeriodListResponse`")))),
3319 }
3320 } else {
3321 let content = resp.text().await?;
3322 let entity: Option<GetIamScimV2SchemasError> = serde_json::from_str(&content).ok();
3323 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3324 }
3325}
3326
3327pub async fn get_iam_scim_v2_schemas_by_id(configuration: &configuration::Configuration, id: &str) -> Result<serde_json::Value, Error<GetIamScimV2SchemasByIdError>> {
3329 let p_id = id;
3331
3332 let uri_str = format!("{}/v1/iam/scim/v2/Schemas/{id}", configuration.base_path, id=crate::apis::urlencode(p_id));
3333 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3334
3335 if let Some(ref user_agent) = configuration.user_agent {
3336 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3337 }
3338 if let Some(ref token) = configuration.bearer_access_token {
3339 req_builder = req_builder.bearer_auth(token.to_owned());
3340 };
3341
3342 let req = req_builder.build()?;
3343 let resp = configuration.client.execute(req).await?;
3344
3345 let status = resp.status();
3346 let content_type = resp
3347 .headers()
3348 .get("content-type")
3349 .and_then(|v| v.to_str().ok())
3350 .unwrap_or("application/octet-stream");
3351 let content_type = super::ContentType::from(content_type);
3352
3353 if !status.is_client_error() && !status.is_server_error() {
3354 let content = resp.text().await?;
3355 match content_type {
3356 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3357 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))),
3358 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))),
3359 }
3360 } else {
3361 let content = resp.text().await?;
3362 let entity: Option<GetIamScimV2SchemasByIdError> = serde_json::from_str(&content).ok();
3363 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3364 }
3365}
3366
3367pub async fn get_iam_scim_v2_serviceproviderconfig(configuration: &configuration::Configuration, ) -> Result<models::IamPeriodConfig, Error<GetIamScimV2ServiceproviderconfigError>> {
3369
3370 let uri_str = format!("{}/v1/iam/scim/v2/ServiceProviderConfig", configuration.base_path);
3371 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3372
3373 if let Some(ref user_agent) = configuration.user_agent {
3374 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3375 }
3376 if let Some(ref token) = configuration.bearer_access_token {
3377 req_builder = req_builder.bearer_auth(token.to_owned());
3378 };
3379
3380 let req = req_builder.build()?;
3381 let resp = configuration.client.execute(req).await?;
3382
3383 let status = resp.status();
3384 let content_type = resp
3385 .headers()
3386 .get("content-type")
3387 .and_then(|v| v.to_str().ok())
3388 .unwrap_or("application/octet-stream");
3389 let content_type = super::ContentType::from(content_type);
3390
3391 if !status.is_client_error() && !status.is_server_error() {
3392 let content = resp.text().await?;
3393 match content_type {
3394 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3395 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodConfig`"))),
3396 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::IamPeriodConfig`")))),
3397 }
3398 } else {
3399 let content = resp.text().await?;
3400 let entity: Option<GetIamScimV2ServiceproviderconfigError> = serde_json::from_str(&content).ok();
3401 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3402 }
3403}
3404
3405pub async fn get_iam_scim_v2_users(configuration: &configuration::Configuration, ) -> Result<(), Error<GetIamScimV2UsersError>> {
3407
3408 let uri_str = format!("{}/v1/iam/scim/v2/Users", configuration.base_path);
3409 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3410
3411 if let Some(ref user_agent) = configuration.user_agent {
3412 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3413 }
3414 if let Some(ref token) = configuration.bearer_access_token {
3415 req_builder = req_builder.bearer_auth(token.to_owned());
3416 };
3417
3418 let req = req_builder.build()?;
3419 let resp = configuration.client.execute(req).await?;
3420
3421 let status = resp.status();
3422
3423 if !status.is_client_error() && !status.is_server_error() {
3424 Ok(())
3425 } else {
3426 let content = resp.text().await?;
3427 let entity: Option<GetIamScimV2UsersError> = serde_json::from_str(&content).ok();
3428 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3429 }
3430}
3431
3432pub async fn get_iam_scim_v2_users_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<GetIamScimV2UsersByOwnerByNameError>> {
3434 let p_owner = owner;
3436 let p_name = name;
3437
3438 let uri_str = format!("{}/v1/iam/scim/v2/Users/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
3439 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3440
3441 if let Some(ref user_agent) = configuration.user_agent {
3442 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3443 }
3444 if let Some(ref token) = configuration.bearer_access_token {
3445 req_builder = req_builder.bearer_auth(token.to_owned());
3446 };
3447
3448 let req = req_builder.build()?;
3449 let resp = configuration.client.execute(req).await?;
3450
3451 let status = resp.status();
3452
3453 if !status.is_client_error() && !status.is_server_error() {
3454 Ok(())
3455 } else {
3456 let content = resp.text().await?;
3457 let entity: Option<GetIamScimV2UsersByOwnerByNameError> = serde_json::from_str(&content).ok();
3458 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3459 }
3460}
3461
3462pub async fn get_iam_service_accounts(configuration: &configuration::Configuration, organization: Option<&str>, p: Option<i32>, page_size: Option<i32>) -> Result<models::IamPeriodAnswer, Error<GetIamServiceAccountsError>> {
3464 let p_organization = organization;
3466 let p_p = p;
3467 let p_page_size = page_size;
3468
3469 let uri_str = format!("{}/v1/iam/service-accounts", configuration.base_path);
3470 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3471
3472 if let Some(ref param_value) = p_organization {
3473 req_builder = req_builder.query(&[("organization", ¶m_value.to_string())]);
3474 }
3475 if let Some(ref param_value) = p_p {
3476 req_builder = req_builder.query(&[("p", ¶m_value.to_string())]);
3477 }
3478 if let Some(ref param_value) = p_page_size {
3479 req_builder = req_builder.query(&[("pageSize", ¶m_value.to_string())]);
3480 }
3481 if let Some(ref user_agent) = configuration.user_agent {
3482 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3483 }
3484 if let Some(ref token) = configuration.bearer_access_token {
3485 req_builder = req_builder.bearer_auth(token.to_owned());
3486 };
3487
3488 let req = req_builder.build()?;
3489 let resp = configuration.client.execute(req).await?;
3490
3491 let status = resp.status();
3492 let content_type = resp
3493 .headers()
3494 .get("content-type")
3495 .and_then(|v| v.to_str().ok())
3496 .unwrap_or("application/octet-stream");
3497 let content_type = super::ContentType::from(content_type);
3498
3499 if !status.is_client_error() && !status.is_server_error() {
3500 let content = resp.text().await?;
3501 match content_type {
3502 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3503 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodAnswer`"))),
3504 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::IamPeriodAnswer`")))),
3505 }
3506 } else {
3507 let content = resp.text().await?;
3508 let entity: Option<GetIamServiceAccountsError> = serde_json::from_str(&content).ok();
3509 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3510 }
3511}
3512
3513pub async fn get_iam_users(configuration: &configuration::Configuration, owner: &str, email: Option<&str>, limit: Option<i32>, offset: Option<i32>) -> Result<models::IamPeriodUsersPeriodListOutput, Error<GetIamUsersError>> {
3515 let p_owner = owner;
3517 let p_email = email;
3518 let p_limit = limit;
3519 let p_offset = offset;
3520
3521 let uri_str = format!("{}/v1/iam/users", configuration.base_path);
3522 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3523
3524 req_builder = req_builder.query(&[("owner", &p_owner.to_string())]);
3525 if let Some(ref param_value) = p_email {
3526 req_builder = req_builder.query(&[("email", ¶m_value.to_string())]);
3527 }
3528 if let Some(ref param_value) = p_limit {
3529 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
3530 }
3531 if let Some(ref param_value) = p_offset {
3532 req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]);
3533 }
3534 if let Some(ref user_agent) = configuration.user_agent {
3535 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3536 }
3537 if let Some(ref token) = configuration.bearer_access_token {
3538 req_builder = req_builder.bearer_auth(token.to_owned());
3539 };
3540
3541 let req = req_builder.build()?;
3542 let resp = configuration.client.execute(req).await?;
3543
3544 let status = resp.status();
3545 let content_type = resp
3546 .headers()
3547 .get("content-type")
3548 .and_then(|v| v.to_str().ok())
3549 .unwrap_or("application/octet-stream");
3550 let content_type = super::ContentType::from(content_type);
3551
3552 if !status.is_client_error() && !status.is_server_error() {
3553 let content = resp.text().await?;
3554 match content_type {
3555 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3556 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodUsersPeriodListOutput`"))),
3557 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::IamPeriodUsersPeriodListOutput`")))),
3558 }
3559 } else {
3560 let content = resp.text().await?;
3561 let entity: Option<GetIamUsersError> = serde_json::from_str(&content).ok();
3562 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3563 }
3564}
3565
3566pub async fn get_iam_users_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str, email: Option<&str>) -> Result<models::IamPeriodUser, Error<GetIamUsersByOwnerByNameError>> {
3568 let p_owner = owner;
3570 let p_name = name;
3571 let p_email = email;
3572
3573 let uri_str = format!("{}/v1/iam/users/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
3574 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3575
3576 if let Some(ref param_value) = p_email {
3577 req_builder = req_builder.query(&[("email", ¶m_value.to_string())]);
3578 }
3579 if let Some(ref user_agent) = configuration.user_agent {
3580 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3581 }
3582 if let Some(ref token) = configuration.bearer_access_token {
3583 req_builder = req_builder.bearer_auth(token.to_owned());
3584 };
3585
3586 let req = req_builder.build()?;
3587 let resp = configuration.client.execute(req).await?;
3588
3589 let status = resp.status();
3590 let content_type = resp
3591 .headers()
3592 .get("content-type")
3593 .and_then(|v| v.to_str().ok())
3594 .unwrap_or("application/octet-stream");
3595 let content_type = super::ContentType::from(content_type);
3596
3597 if !status.is_client_error() && !status.is_server_error() {
3598 let content = resp.text().await?;
3599 match content_type {
3600 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3601 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodUser`"))),
3602 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::IamPeriodUser`")))),
3603 }
3604 } else {
3605 let content = resp.text().await?;
3606 let entity: Option<GetIamUsersByOwnerByNameError> = serde_json::from_str(&content).ok();
3607 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3608 }
3609}
3610
3611pub async fn get_iam_web3_nonce(configuration: &configuration::Configuration, ) -> Result<(), Error<GetIamWeb3NonceError>> {
3613
3614 let uri_str = format!("{}/v1/iam/web3/nonce", configuration.base_path);
3615 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3616
3617 if let Some(ref user_agent) = configuration.user_agent {
3618 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3619 }
3620 if let Some(ref token) = configuration.bearer_access_token {
3621 req_builder = req_builder.bearer_auth(token.to_owned());
3622 };
3623
3624 let req = req_builder.build()?;
3625 let resp = configuration.client.execute(req).await?;
3626
3627 let status = resp.status();
3628
3629 if !status.is_client_error() && !status.is_server_error() {
3630 Ok(())
3631 } else {
3632 let content = resp.text().await?;
3633 let entity: Option<GetIamWeb3NonceError> = serde_json::from_str(&content).ok();
3634 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3635 }
3636}
3637
3638pub async fn get_iam_webauthn_signin_begin(configuration: &configuration::Configuration, ) -> Result<(), Error<GetIamWebauthnSigninBeginError>> {
3640
3641 let uri_str = format!("{}/v1/iam/webauthn/signin/begin", configuration.base_path);
3642 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3643
3644 if let Some(ref user_agent) = configuration.user_agent {
3645 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3646 }
3647 if let Some(ref token) = configuration.bearer_access_token {
3648 req_builder = req_builder.bearer_auth(token.to_owned());
3649 };
3650
3651 let req = req_builder.build()?;
3652 let resp = configuration.client.execute(req).await?;
3653
3654 let status = resp.status();
3655
3656 if !status.is_client_error() && !status.is_server_error() {
3657 Ok(())
3658 } else {
3659 let content = resp.text().await?;
3660 let entity: Option<GetIamWebauthnSigninBeginError> = serde_json::from_str(&content).ok();
3661 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3662 }
3663}
3664
3665pub async fn get_iam_webauthn_signup_begin(configuration: &configuration::Configuration, ) -> Result<(), Error<GetIamWebauthnSignupBeginError>> {
3667
3668 let uri_str = format!("{}/v1/iam/webauthn/signup/begin", configuration.base_path);
3669 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3670
3671 if let Some(ref user_agent) = configuration.user_agent {
3672 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3673 }
3674 if let Some(ref token) = configuration.bearer_access_token {
3675 req_builder = req_builder.bearer_auth(token.to_owned());
3676 };
3677
3678 let req = req_builder.build()?;
3679 let resp = configuration.client.execute(req).await?;
3680
3681 let status = resp.status();
3682
3683 if !status.is_client_error() && !status.is_server_error() {
3684 Ok(())
3685 } else {
3686 let content = resp.text().await?;
3687 let entity: Option<GetIamWebauthnSignupBeginError> = serde_json::from_str(&content).ok();
3688 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3689 }
3690}
3691
3692pub async fn get_iam_whoami(configuration: &configuration::Configuration, ) -> Result<(), Error<GetIamWhoamiError>> {
3694
3695 let uri_str = format!("{}/v1/iam/whoami", configuration.base_path);
3696 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3697
3698 if let Some(ref user_agent) = configuration.user_agent {
3699 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3700 }
3701 if let Some(ref token) = configuration.bearer_access_token {
3702 req_builder = req_builder.bearer_auth(token.to_owned());
3703 };
3704
3705 let req = req_builder.build()?;
3706 let resp = configuration.client.execute(req).await?;
3707
3708 let status = resp.status();
3709
3710 if !status.is_client_error() && !status.is_server_error() {
3711 Ok(())
3712 } else {
3713 let content = resp.text().await?;
3714 let entity: Option<GetIamWhoamiError> = serde_json::from_str(&content).ok();
3715 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3716 }
3717}
3718
3719pub async fn get_iam_workspaces(configuration: &configuration::Configuration, owner: Option<&str>) -> Result<models::IamPeriodWorkspacesPeriodListOutput, Error<GetIamWorkspacesError>> {
3721 let p_owner = owner;
3723
3724 let uri_str = format!("{}/v1/iam/workspaces", configuration.base_path);
3725 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3726
3727 if let Some(ref param_value) = p_owner {
3728 req_builder = req_builder.query(&[("owner", ¶m_value.to_string())]);
3729 }
3730 if let Some(ref user_agent) = configuration.user_agent {
3731 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3732 }
3733 if let Some(ref token) = configuration.bearer_access_token {
3734 req_builder = req_builder.bearer_auth(token.to_owned());
3735 };
3736
3737 let req = req_builder.build()?;
3738 let resp = configuration.client.execute(req).await?;
3739
3740 let status = resp.status();
3741 let content_type = resp
3742 .headers()
3743 .get("content-type")
3744 .and_then(|v| v.to_str().ok())
3745 .unwrap_or("application/octet-stream");
3746 let content_type = super::ContentType::from(content_type);
3747
3748 if !status.is_client_error() && !status.is_server_error() {
3749 let content = resp.text().await?;
3750 match content_type {
3751 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3752 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodWorkspacesPeriodListOutput`"))),
3753 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::IamPeriodWorkspacesPeriodListOutput`")))),
3754 }
3755 } else {
3756 let content = resp.text().await?;
3757 let entity: Option<GetIamWorkspacesError> = serde_json::from_str(&content).ok();
3758 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3759 }
3760}
3761
3762pub async fn get_iam_workspaces_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodWorkspace, Error<GetIamWorkspacesByOwnerByNameError>> {
3764 let p_owner = owner;
3766 let p_name = name;
3767
3768 let uri_str = format!("{}/v1/iam/workspaces/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
3769 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3770
3771 if let Some(ref user_agent) = configuration.user_agent {
3772 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3773 }
3774 if let Some(ref token) = configuration.bearer_access_token {
3775 req_builder = req_builder.bearer_auth(token.to_owned());
3776 };
3777
3778 let req = req_builder.build()?;
3779 let resp = configuration.client.execute(req).await?;
3780
3781 let status = resp.status();
3782 let content_type = resp
3783 .headers()
3784 .get("content-type")
3785 .and_then(|v| v.to_str().ok())
3786 .unwrap_or("application/octet-stream");
3787 let content_type = super::ContentType::from(content_type);
3788
3789 if !status.is_client_error() && !status.is_server_error() {
3790 let content = resp.text().await?;
3791 match content_type {
3792 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3793 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodWorkspace`"))),
3794 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::IamPeriodWorkspace`")))),
3795 }
3796 } else {
3797 let content = resp.text().await?;
3798 let entity: Option<GetIamWorkspacesByOwnerByNameError> = serde_json::from_str(&content).ok();
3799 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3800 }
3801}
3802
3803pub async fn get_organization(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodOrganization, Error<GetOrganizationError>> {
3805 let p_owner = owner;
3807 let p_name = name;
3808
3809 let uri_str = format!("{}/v1/iam/organizations/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
3810 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3811
3812 if let Some(ref user_agent) = configuration.user_agent {
3813 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3814 }
3815 if let Some(ref token) = configuration.bearer_access_token {
3816 req_builder = req_builder.bearer_auth(token.to_owned());
3817 };
3818
3819 let req = req_builder.build()?;
3820 let resp = configuration.client.execute(req).await?;
3821
3822 let status = resp.status();
3823 let content_type = resp
3824 .headers()
3825 .get("content-type")
3826 .and_then(|v| v.to_str().ok())
3827 .unwrap_or("application/octet-stream");
3828 let content_type = super::ContentType::from(content_type);
3829
3830 if !status.is_client_error() && !status.is_server_error() {
3831 let content = resp.text().await?;
3832 match content_type {
3833 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3834 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodOrganization`"))),
3835 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::IamPeriodOrganization`")))),
3836 }
3837 } else {
3838 let content = resp.text().await?;
3839 let entity: Option<GetOrganizationError> = serde_json::from_str(&content).ok();
3840 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3841 }
3842}
3843
3844pub async fn get_provider(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodProviderResult, Error<GetProviderError>> {
3846 let p_owner = owner;
3848 let p_name = name;
3849
3850 let uri_str = format!("{}/v1/iam/providers/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
3851 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3852
3853 if let Some(ref user_agent) = configuration.user_agent {
3854 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3855 }
3856 if let Some(ref token) = configuration.bearer_access_token {
3857 req_builder = req_builder.bearer_auth(token.to_owned());
3858 };
3859
3860 let req = req_builder.build()?;
3861 let resp = configuration.client.execute(req).await?;
3862
3863 let status = resp.status();
3864 let content_type = resp
3865 .headers()
3866 .get("content-type")
3867 .and_then(|v| v.to_str().ok())
3868 .unwrap_or("application/octet-stream");
3869 let content_type = super::ContentType::from(content_type);
3870
3871 if !status.is_client_error() && !status.is_server_error() {
3872 let content = resp.text().await?;
3873 match content_type {
3874 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3875 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodProviderResult`"))),
3876 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::IamPeriodProviderResult`")))),
3877 }
3878 } else {
3879 let content = resp.text().await?;
3880 let entity: Option<GetProviderError> = serde_json::from_str(&content).ok();
3881 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3882 }
3883}
3884
3885pub async fn get_session(configuration: &configuration::Configuration, owner: &str, name: &str, application: &str) -> Result<models::IamPeriodSession, Error<GetSessionError>> {
3887 let p_owner = owner;
3889 let p_name = name;
3890 let p_application = application;
3891
3892 let uri_str = format!("{}/v1/iam/sessions/{owner}/{name}/{application}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name), application=crate::apis::urlencode(p_application));
3893 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3894
3895 if let Some(ref user_agent) = configuration.user_agent {
3896 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3897 }
3898 if let Some(ref token) = configuration.bearer_access_token {
3899 req_builder = req_builder.bearer_auth(token.to_owned());
3900 };
3901
3902 let req = req_builder.build()?;
3903 let resp = configuration.client.execute(req).await?;
3904
3905 let status = resp.status();
3906 let content_type = resp
3907 .headers()
3908 .get("content-type")
3909 .and_then(|v| v.to_str().ok())
3910 .unwrap_or("application/octet-stream");
3911 let content_type = super::ContentType::from(content_type);
3912
3913 if !status.is_client_error() && !status.is_server_error() {
3914 let content = resp.text().await?;
3915 match content_type {
3916 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3917 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodSession`"))),
3918 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::IamPeriodSession`")))),
3919 }
3920 } else {
3921 let content = resp.text().await?;
3922 let entity: Option<GetSessionError> = serde_json::from_str(&content).ok();
3923 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3924 }
3925}
3926
3927pub async fn get_token(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodTokenResult, Error<GetTokenError>> {
3929 let p_owner = owner;
3931 let p_name = name;
3932
3933 let uri_str = format!("{}/v1/iam/tokens/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
3934 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3935
3936 if let Some(ref user_agent) = configuration.user_agent {
3937 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3938 }
3939 if let Some(ref token) = configuration.bearer_access_token {
3940 req_builder = req_builder.bearer_auth(token.to_owned());
3941 };
3942
3943 let req = req_builder.build()?;
3944 let resp = configuration.client.execute(req).await?;
3945
3946 let status = resp.status();
3947 let content_type = resp
3948 .headers()
3949 .get("content-type")
3950 .and_then(|v| v.to_str().ok())
3951 .unwrap_or("application/octet-stream");
3952 let content_type = super::ContentType::from(content_type);
3953
3954 if !status.is_client_error() && !status.is_server_error() {
3955 let content = resp.text().await?;
3956 match content_type {
3957 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3958 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodTokenResult`"))),
3959 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::IamPeriodTokenResult`")))),
3960 }
3961 } else {
3962 let content = resp.text().await?;
3963 let entity: Option<GetTokenError> = serde_json::from_str(&content).ok();
3964 Err(Error::ResponseError(ResponseContent { status, content, entity }))
3965 }
3966}
3967
3968pub async fn get_webauthn_credential(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<models::IamPeriodWebauthnCredentialResult, Error<GetWebauthnCredentialError>> {
3970 let p_owner = owner;
3972 let p_name = name;
3973
3974 let uri_str = format!("{}/v1/iam/webauthn-credentials/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
3975 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
3976
3977 if let Some(ref user_agent) = configuration.user_agent {
3978 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
3979 }
3980 if let Some(ref token) = configuration.bearer_access_token {
3981 req_builder = req_builder.bearer_auth(token.to_owned());
3982 };
3983
3984 let req = req_builder.build()?;
3985 let resp = configuration.client.execute(req).await?;
3986
3987 let status = resp.status();
3988 let content_type = resp
3989 .headers()
3990 .get("content-type")
3991 .and_then(|v| v.to_str().ok())
3992 .unwrap_or("application/octet-stream");
3993 let content_type = super::ContentType::from(content_type);
3994
3995 if !status.is_client_error() && !status.is_server_error() {
3996 let content = resp.text().await?;
3997 match content_type {
3998 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
3999 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodWebauthnCredentialResult`"))),
4000 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::IamPeriodWebauthnCredentialResult`")))),
4001 }
4002 } else {
4003 let content = resp.text().await?;
4004 let entity: Option<GetWebauthnCredentialError> = serde_json::from_str(&content).ok();
4005 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4006 }
4007}
4008
4009pub async fn list_organizations(configuration: &configuration::Configuration, x_forwarded_for: Option<&str>, q: Option<&str>, limit: Option<i32>, cursor: Option<&str>) -> Result<models::IamPeriodListOrganizationsOutput, Error<ListOrganizationsError>> {
4011 let p_x_forwarded_for = x_forwarded_for;
4013 let p_q = q;
4014 let p_limit = limit;
4015 let p_cursor = cursor;
4016
4017 let uri_str = format!("{}/v1/iam/organizations", configuration.base_path);
4018 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4019
4020 if let Some(ref param_value) = p_q {
4021 req_builder = req_builder.query(&[("q", ¶m_value.to_string())]);
4022 }
4023 if let Some(ref param_value) = p_limit {
4024 req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]);
4025 }
4026 if let Some(ref param_value) = p_cursor {
4027 req_builder = req_builder.query(&[("cursor", ¶m_value.to_string())]);
4028 }
4029 if let Some(ref user_agent) = configuration.user_agent {
4030 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4031 }
4032 if let Some(param_value) = p_x_forwarded_for {
4033 req_builder = req_builder.header("X-Forwarded-For", param_value.to_string());
4034 }
4035 if let Some(ref token) = configuration.bearer_access_token {
4036 req_builder = req_builder.bearer_auth(token.to_owned());
4037 };
4038
4039 let req = req_builder.build()?;
4040 let resp = configuration.client.execute(req).await?;
4041
4042 let status = resp.status();
4043 let content_type = resp
4044 .headers()
4045 .get("content-type")
4046 .and_then(|v| v.to_str().ok())
4047 .unwrap_or("application/octet-stream");
4048 let content_type = super::ContentType::from(content_type);
4049
4050 if !status.is_client_error() && !status.is_server_error() {
4051 let content = resp.text().await?;
4052 match content_type {
4053 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4054 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodListOrganizationsOutput`"))),
4055 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::IamPeriodListOrganizationsOutput`")))),
4056 }
4057 } else {
4058 let content = resp.text().await?;
4059 let entity: Option<ListOrganizationsError> = serde_json::from_str(&content).ok();
4060 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4061 }
4062}
4063
4064pub async fn list_providers(configuration: &configuration::Configuration, owner: Option<&str>) -> Result<models::IamPeriodListProvidersOut, Error<ListProvidersError>> {
4066 let p_owner = owner;
4068
4069 let uri_str = format!("{}/v1/iam/providers", configuration.base_path);
4070 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4071
4072 if let Some(ref param_value) = p_owner {
4073 req_builder = req_builder.query(&[("owner", ¶m_value.to_string())]);
4074 }
4075 if let Some(ref user_agent) = configuration.user_agent {
4076 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4077 }
4078 if let Some(ref token) = configuration.bearer_access_token {
4079 req_builder = req_builder.bearer_auth(token.to_owned());
4080 };
4081
4082 let req = req_builder.build()?;
4083 let resp = configuration.client.execute(req).await?;
4084
4085 let status = resp.status();
4086 let content_type = resp
4087 .headers()
4088 .get("content-type")
4089 .and_then(|v| v.to_str().ok())
4090 .unwrap_or("application/octet-stream");
4091 let content_type = super::ContentType::from(content_type);
4092
4093 if !status.is_client_error() && !status.is_server_error() {
4094 let content = resp.text().await?;
4095 match content_type {
4096 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4097 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodListProvidersOut`"))),
4098 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::IamPeriodListProvidersOut`")))),
4099 }
4100 } else {
4101 let content = resp.text().await?;
4102 let entity: Option<ListProvidersError> = serde_json::from_str(&content).ok();
4103 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4104 }
4105}
4106
4107pub async fn list_sessions(configuration: &configuration::Configuration, owner: &str, name: Option<&str>, application: Option<&str>) -> Result<models::IamPeriodListSessionsOut, Error<ListSessionsError>> {
4109 let p_owner = owner;
4111 let p_name = name;
4112 let p_application = application;
4113
4114 let uri_str = format!("{}/v1/iam/sessions", configuration.base_path);
4115 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4116
4117 req_builder = req_builder.query(&[("owner", &p_owner.to_string())]);
4118 if let Some(ref param_value) = p_name {
4119 req_builder = req_builder.query(&[("name", ¶m_value.to_string())]);
4120 }
4121 if let Some(ref param_value) = p_application {
4122 req_builder = req_builder.query(&[("application", ¶m_value.to_string())]);
4123 }
4124 if let Some(ref user_agent) = configuration.user_agent {
4125 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4126 }
4127 if let Some(ref token) = configuration.bearer_access_token {
4128 req_builder = req_builder.bearer_auth(token.to_owned());
4129 };
4130
4131 let req = req_builder.build()?;
4132 let resp = configuration.client.execute(req).await?;
4133
4134 let status = resp.status();
4135 let content_type = resp
4136 .headers()
4137 .get("content-type")
4138 .and_then(|v| v.to_str().ok())
4139 .unwrap_or("application/octet-stream");
4140 let content_type = super::ContentType::from(content_type);
4141
4142 if !status.is_client_error() && !status.is_server_error() {
4143 let content = resp.text().await?;
4144 match content_type {
4145 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4146 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodListSessionsOut`"))),
4147 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::IamPeriodListSessionsOut`")))),
4148 }
4149 } else {
4150 let content = resp.text().await?;
4151 let entity: Option<ListSessionsError> = serde_json::from_str(&content).ok();
4152 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4153 }
4154}
4155
4156pub async fn list_tokens(configuration: &configuration::Configuration, owner: Option<&str>, organization: Option<&str>) -> Result<models::IamPeriodListTokensOut, Error<ListTokensError>> {
4158 let p_owner = owner;
4160 let p_organization = organization;
4161
4162 let uri_str = format!("{}/v1/iam/tokens", configuration.base_path);
4163 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4164
4165 if let Some(ref param_value) = p_owner {
4166 req_builder = req_builder.query(&[("owner", ¶m_value.to_string())]);
4167 }
4168 if let Some(ref param_value) = p_organization {
4169 req_builder = req_builder.query(&[("organization", ¶m_value.to_string())]);
4170 }
4171 if let Some(ref user_agent) = configuration.user_agent {
4172 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4173 }
4174 if let Some(ref token) = configuration.bearer_access_token {
4175 req_builder = req_builder.bearer_auth(token.to_owned());
4176 };
4177
4178 let req = req_builder.build()?;
4179 let resp = configuration.client.execute(req).await?;
4180
4181 let status = resp.status();
4182 let content_type = resp
4183 .headers()
4184 .get("content-type")
4185 .and_then(|v| v.to_str().ok())
4186 .unwrap_or("application/octet-stream");
4187 let content_type = super::ContentType::from(content_type);
4188
4189 if !status.is_client_error() && !status.is_server_error() {
4190 let content = resp.text().await?;
4191 match content_type {
4192 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4193 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodListTokensOut`"))),
4194 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::IamPeriodListTokensOut`")))),
4195 }
4196 } else {
4197 let content = resp.text().await?;
4198 let entity: Option<ListTokensError> = serde_json::from_str(&content).ok();
4199 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4200 }
4201}
4202
4203pub async fn list_webauthn_credentials(configuration: &configuration::Configuration, user: Option<&str>) -> Result<models::IamPeriodListWebauthnCredentialsOut, Error<ListWebauthnCredentialsError>> {
4205 let p_user = user;
4207
4208 let uri_str = format!("{}/v1/iam/webauthn-credentials", configuration.base_path);
4209 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
4210
4211 if let Some(ref param_value) = p_user {
4212 req_builder = req_builder.query(&[("user", ¶m_value.to_string())]);
4213 }
4214 if let Some(ref user_agent) = configuration.user_agent {
4215 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4216 }
4217 if let Some(ref token) = configuration.bearer_access_token {
4218 req_builder = req_builder.bearer_auth(token.to_owned());
4219 };
4220
4221 let req = req_builder.build()?;
4222 let resp = configuration.client.execute(req).await?;
4223
4224 let status = resp.status();
4225 let content_type = resp
4226 .headers()
4227 .get("content-type")
4228 .and_then(|v| v.to_str().ok())
4229 .unwrap_or("application/octet-stream");
4230 let content_type = super::ContentType::from(content_type);
4231
4232 if !status.is_client_error() && !status.is_server_error() {
4233 let content = resp.text().await?;
4234 match content_type {
4235 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4236 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodListWebauthnCredentialsOut`"))),
4237 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::IamPeriodListWebauthnCredentialsOut`")))),
4238 }
4239 } else {
4240 let content = resp.text().await?;
4241 let entity: Option<ListWebauthnCredentialsError> = serde_json::from_str(&content).ok();
4242 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4243 }
4244}
4245
4246pub async fn patch_iam_scim_v2_users_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PatchIamScimV2UsersByOwnerByNameError>> {
4248 let p_owner = owner;
4250 let p_name = name;
4251
4252 let uri_str = format!("{}/v1/iam/scim/v2/Users/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
4253 let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str);
4254
4255 if let Some(ref user_agent) = configuration.user_agent {
4256 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4257 }
4258 if let Some(ref token) = configuration.bearer_access_token {
4259 req_builder = req_builder.bearer_auth(token.to_owned());
4260 };
4261
4262 let req = req_builder.build()?;
4263 let resp = configuration.client.execute(req).await?;
4264
4265 let status = resp.status();
4266
4267 if !status.is_client_error() && !status.is_server_error() {
4268 Ok(())
4269 } else {
4270 let content = resp.text().await?;
4271 let entity: Option<PatchIamScimV2UsersByOwnerByNameError> = serde_json::from_str(&content).ok();
4272 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4273 }
4274}
4275
4276pub async fn post_iam_admin_provision(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamAdminProvisionError>> {
4278
4279 let uri_str = format!("{}/v1/iam/admin/provision", configuration.base_path);
4280 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4281
4282 if let Some(ref user_agent) = configuration.user_agent {
4283 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4284 }
4285 if let Some(ref token) = configuration.bearer_access_token {
4286 req_builder = req_builder.bearer_auth(token.to_owned());
4287 };
4288
4289 let req = req_builder.build()?;
4290 let resp = configuration.client.execute(req).await?;
4291
4292 let status = resp.status();
4293
4294 if !status.is_client_error() && !status.is_server_error() {
4295 Ok(())
4296 } else {
4297 let content = resp.text().await?;
4298 let entity: Option<PostIamAdminProvisionError> = serde_json::from_str(&content).ok();
4299 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4300 }
4301}
4302
4303pub async fn post_iam_applications(configuration: &configuration::Configuration, iam_period_application: models::IamPeriodApplication) -> Result<models::IamPeriodApplication, Error<PostIamApplicationsError>> {
4305 let p_iam_period_application = iam_period_application;
4307
4308 let uri_str = format!("{}/v1/iam/applications", configuration.base_path);
4309 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4310
4311 if let Some(ref user_agent) = configuration.user_agent {
4312 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4313 }
4314 if let Some(ref token) = configuration.bearer_access_token {
4315 req_builder = req_builder.bearer_auth(token.to_owned());
4316 };
4317 req_builder = req_builder.json(&p_iam_period_application);
4318
4319 let req = req_builder.build()?;
4320 let resp = configuration.client.execute(req).await?;
4321
4322 let status = resp.status();
4323 let content_type = resp
4324 .headers()
4325 .get("content-type")
4326 .and_then(|v| v.to_str().ok())
4327 .unwrap_or("application/octet-stream");
4328 let content_type = super::ContentType::from(content_type);
4329
4330 if !status.is_client_error() && !status.is_server_error() {
4331 let content = resp.text().await?;
4332 match content_type {
4333 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4334 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodApplication`"))),
4335 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::IamPeriodApplication`")))),
4336 }
4337 } else {
4338 let content = resp.text().await?;
4339 let entity: Option<PostIamApplicationsError> = serde_json::from_str(&content).ok();
4340 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4341 }
4342}
4343
4344pub async fn post_iam_assume(configuration: &configuration::Configuration, iam_period_assume_body: models::IamPeriodAssumeBody, authorization: Option<&str>, x_forwarded_for: Option<&str>) -> Result<models::IamPeriodAnswer, Error<PostIamAssumeError>> {
4346 let p_iam_period_assume_body = iam_period_assume_body;
4348 let p_authorization = authorization;
4349 let p_x_forwarded_for = x_forwarded_for;
4350
4351 let uri_str = format!("{}/v1/iam/assume", configuration.base_path);
4352 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4353
4354 if let Some(ref user_agent) = configuration.user_agent {
4355 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4356 }
4357 if let Some(param_value) = p_authorization {
4358 req_builder = req_builder.header("Authorization", param_value.to_string());
4359 }
4360 if let Some(param_value) = p_x_forwarded_for {
4361 req_builder = req_builder.header("X-Forwarded-For", param_value.to_string());
4362 }
4363 if let Some(ref token) = configuration.bearer_access_token {
4364 req_builder = req_builder.bearer_auth(token.to_owned());
4365 };
4366 req_builder = req_builder.json(&p_iam_period_assume_body);
4367
4368 let req = req_builder.build()?;
4369 let resp = configuration.client.execute(req).await?;
4370
4371 let status = resp.status();
4372 let content_type = resp
4373 .headers()
4374 .get("content-type")
4375 .and_then(|v| v.to_str().ok())
4376 .unwrap_or("application/octet-stream");
4377 let content_type = super::ContentType::from(content_type);
4378
4379 if !status.is_client_error() && !status.is_server_error() {
4380 let content = resp.text().await?;
4381 match content_type {
4382 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4383 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodAnswer`"))),
4384 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::IamPeriodAnswer`")))),
4385 }
4386 } else {
4387 let content = resp.text().await?;
4388 let entity: Option<PostIamAssumeError> = serde_json::from_str(&content).ok();
4389 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4390 }
4391}
4392
4393pub async fn post_iam_audit_logs(configuration: &configuration::Configuration, iam_period_input: models::IamPeriodInput) -> Result<models::IamPeriodAuditLog, Error<PostIamAuditLogsError>> {
4395 let p_iam_period_input = iam_period_input;
4397
4398 let uri_str = format!("{}/v1/iam/audit-logs", configuration.base_path);
4399 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4400
4401 if let Some(ref user_agent) = configuration.user_agent {
4402 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4403 }
4404 if let Some(ref token) = configuration.bearer_access_token {
4405 req_builder = req_builder.bearer_auth(token.to_owned());
4406 };
4407 req_builder = req_builder.json(&p_iam_period_input);
4408
4409 let req = req_builder.build()?;
4410 let resp = configuration.client.execute(req).await?;
4411
4412 let status = resp.status();
4413 let content_type = resp
4414 .headers()
4415 .get("content-type")
4416 .and_then(|v| v.to_str().ok())
4417 .unwrap_or("application/octet-stream");
4418 let content_type = super::ContentType::from(content_type);
4419
4420 if !status.is_client_error() && !status.is_server_error() {
4421 let content = resp.text().await?;
4422 match content_type {
4423 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4424 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodAuditLog`"))),
4425 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::IamPeriodAuditLog`")))),
4426 }
4427 } else {
4428 let content = resp.text().await?;
4429 let entity: Option<PostIamAuditLogsError> = serde_json::from_str(&content).ok();
4430 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4431 }
4432}
4433
4434pub async fn post_iam_certs(configuration: &configuration::Configuration, iam_period_cert: models::IamPeriodCert) -> Result<models::IamPeriodCert, Error<PostIamCertsError>> {
4436 let p_iam_period_cert = iam_period_cert;
4438
4439 let uri_str = format!("{}/v1/iam/certs", configuration.base_path);
4440 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4441
4442 if let Some(ref user_agent) = configuration.user_agent {
4443 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4444 }
4445 if let Some(ref token) = configuration.bearer_access_token {
4446 req_builder = req_builder.bearer_auth(token.to_owned());
4447 };
4448 req_builder = req_builder.json(&p_iam_period_cert);
4449
4450 let req = req_builder.build()?;
4451 let resp = configuration.client.execute(req).await?;
4452
4453 let status = resp.status();
4454 let content_type = resp
4455 .headers()
4456 .get("content-type")
4457 .and_then(|v| v.to_str().ok())
4458 .unwrap_or("application/octet-stream");
4459 let content_type = super::ContentType::from(content_type);
4460
4461 if !status.is_client_error() && !status.is_server_error() {
4462 let content = resp.text().await?;
4463 match content_type {
4464 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4465 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodCert`"))),
4466 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::IamPeriodCert`")))),
4467 }
4468 } else {
4469 let content = resp.text().await?;
4470 let entity: Option<PostIamCertsError> = serde_json::from_str(&content).ok();
4471 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4472 }
4473}
4474
4475pub async fn post_iam_delete_membership(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamDeleteMembershipError>> {
4477
4478 let uri_str = format!("{}/v1/iam/delete-membership", configuration.base_path);
4479 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4480
4481 if let Some(ref user_agent) = configuration.user_agent {
4482 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4483 }
4484 if let Some(ref token) = configuration.bearer_access_token {
4485 req_builder = req_builder.bearer_auth(token.to_owned());
4486 };
4487
4488 let req = req_builder.build()?;
4489 let resp = configuration.client.execute(req).await?;
4490
4491 let status = resp.status();
4492
4493 if !status.is_client_error() && !status.is_server_error() {
4494 Ok(())
4495 } else {
4496 let content = resp.text().await?;
4497 let entity: Option<PostIamDeleteMembershipError> = serde_json::from_str(&content).ok();
4498 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4499 }
4500}
4501
4502pub async fn post_iam_invitations(configuration: &configuration::Configuration, iam_period_invitations_period_input: models::IamPeriodInvitationsPeriodInput) -> Result<models::IamPeriodInvitation, Error<PostIamInvitationsError>> {
4504 let p_iam_period_invitations_period_input = iam_period_invitations_period_input;
4506
4507 let uri_str = format!("{}/v1/iam/invitations", configuration.base_path);
4508 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4509
4510 if let Some(ref user_agent) = configuration.user_agent {
4511 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4512 }
4513 if let Some(ref token) = configuration.bearer_access_token {
4514 req_builder = req_builder.bearer_auth(token.to_owned());
4515 };
4516 req_builder = req_builder.json(&p_iam_period_invitations_period_input);
4517
4518 let req = req_builder.build()?;
4519 let resp = configuration.client.execute(req).await?;
4520
4521 let status = resp.status();
4522 let content_type = resp
4523 .headers()
4524 .get("content-type")
4525 .and_then(|v| v.to_str().ok())
4526 .unwrap_or("application/octet-stream");
4527 let content_type = super::ContentType::from(content_type);
4528
4529 if !status.is_client_error() && !status.is_server_error() {
4530 let content = resp.text().await?;
4531 match content_type {
4532 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4533 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodInvitation`"))),
4534 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::IamPeriodInvitation`")))),
4535 }
4536 } else {
4537 let content = resp.text().await?;
4538 let entity: Option<PostIamInvitationsError> = serde_json::from_str(&content).ok();
4539 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4540 }
4541}
4542
4543pub async fn post_iam_keys(configuration: &configuration::Configuration, iam_period_key: models::IamPeriodKey) -> Result<models::IamPeriodKey, Error<PostIamKeysError>> {
4545 let p_iam_period_key = iam_period_key;
4547
4548 let uri_str = format!("{}/v1/iam/keys", configuration.base_path);
4549 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4550
4551 if let Some(ref user_agent) = configuration.user_agent {
4552 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4553 }
4554 if let Some(ref token) = configuration.bearer_access_token {
4555 req_builder = req_builder.bearer_auth(token.to_owned());
4556 };
4557 req_builder = req_builder.json(&p_iam_period_key);
4558
4559 let req = req_builder.build()?;
4560 let resp = configuration.client.execute(req).await?;
4561
4562 let status = resp.status();
4563 let content_type = resp
4564 .headers()
4565 .get("content-type")
4566 .and_then(|v| v.to_str().ok())
4567 .unwrap_or("application/octet-stream");
4568 let content_type = super::ContentType::from(content_type);
4569
4570 if !status.is_client_error() && !status.is_server_error() {
4571 let content = resp.text().await?;
4572 match content_type {
4573 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
4574 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodKey`"))),
4575 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::IamPeriodKey`")))),
4576 }
4577 } else {
4578 let content = resp.text().await?;
4579 let entity: Option<PostIamKeysError> = serde_json::from_str(&content).ok();
4580 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4581 }
4582}
4583
4584pub async fn post_iam_link(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamLinkError>> {
4586
4587 let uri_str = format!("{}/v1/iam/link", configuration.base_path);
4588 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4589
4590 if let Some(ref user_agent) = configuration.user_agent {
4591 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4592 }
4593 if let Some(ref token) = configuration.bearer_access_token {
4594 req_builder = req_builder.bearer_auth(token.to_owned());
4595 };
4596
4597 let req = req_builder.build()?;
4598 let resp = configuration.client.execute(req).await?;
4599
4600 let status = resp.status();
4601
4602 if !status.is_client_error() && !status.is_server_error() {
4603 Ok(())
4604 } else {
4605 let content = resp.text().await?;
4606 let entity: Option<PostIamLinkError> = serde_json::from_str(&content).ok();
4607 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4608 }
4609}
4610
4611pub async fn post_iam_login(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamLoginError>> {
4613
4614 let uri_str = format!("{}/v1/iam/login", configuration.base_path);
4615 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4616
4617 if let Some(ref user_agent) = configuration.user_agent {
4618 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4619 }
4620 if let Some(ref token) = configuration.bearer_access_token {
4621 req_builder = req_builder.bearer_auth(token.to_owned());
4622 };
4623
4624 let req = req_builder.build()?;
4625 let resp = configuration.client.execute(req).await?;
4626
4627 let status = resp.status();
4628
4629 if !status.is_client_error() && !status.is_server_error() {
4630 Ok(())
4631 } else {
4632 let content = resp.text().await?;
4633 let entity: Option<PostIamLoginError> = serde_json::from_str(&content).ok();
4634 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4635 }
4636}
4637
4638pub async fn post_iam_memberships(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamMembershipsError>> {
4640
4641 let uri_str = format!("{}/v1/iam/memberships", configuration.base_path);
4642 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4643
4644 if let Some(ref user_agent) = configuration.user_agent {
4645 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4646 }
4647 if let Some(ref token) = configuration.bearer_access_token {
4648 req_builder = req_builder.bearer_auth(token.to_owned());
4649 };
4650
4651 let req = req_builder.build()?;
4652 let resp = configuration.client.execute(req).await?;
4653
4654 let status = resp.status();
4655
4656 if !status.is_client_error() && !status.is_server_error() {
4657 Ok(())
4658 } else {
4659 let content = resp.text().await?;
4660 let entity: Option<PostIamMembershipsError> = serde_json::from_str(&content).ok();
4661 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4662 }
4663}
4664
4665pub async fn post_iam_mfa_preferred(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamMfaPreferredError>> {
4667
4668 let uri_str = format!("{}/v1/iam/mfa/preferred", configuration.base_path);
4669 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4670
4671 if let Some(ref user_agent) = configuration.user_agent {
4672 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4673 }
4674 if let Some(ref token) = configuration.bearer_access_token {
4675 req_builder = req_builder.bearer_auth(token.to_owned());
4676 };
4677
4678 let req = req_builder.build()?;
4679 let resp = configuration.client.execute(req).await?;
4680
4681 let status = resp.status();
4682
4683 if !status.is_client_error() && !status.is_server_error() {
4684 Ok(())
4685 } else {
4686 let content = resp.text().await?;
4687 let entity: Option<PostIamMfaPreferredError> = serde_json::from_str(&content).ok();
4688 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4689 }
4690}
4691
4692pub async fn post_iam_mfa_setup_enable(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamMfaSetupEnableError>> {
4694
4695 let uri_str = format!("{}/v1/iam/mfa/setup/enable", configuration.base_path);
4696 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4697
4698 if let Some(ref user_agent) = configuration.user_agent {
4699 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4700 }
4701 if let Some(ref token) = configuration.bearer_access_token {
4702 req_builder = req_builder.bearer_auth(token.to_owned());
4703 };
4704
4705 let req = req_builder.build()?;
4706 let resp = configuration.client.execute(req).await?;
4707
4708 let status = resp.status();
4709
4710 if !status.is_client_error() && !status.is_server_error() {
4711 Ok(())
4712 } else {
4713 let content = resp.text().await?;
4714 let entity: Option<PostIamMfaSetupEnableError> = serde_json::from_str(&content).ok();
4715 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4716 }
4717}
4718
4719pub async fn post_iam_mfa_setup_initiate(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamMfaSetupInitiateError>> {
4721
4722 let uri_str = format!("{}/v1/iam/mfa/setup/initiate", configuration.base_path);
4723 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4724
4725 if let Some(ref user_agent) = configuration.user_agent {
4726 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4727 }
4728 if let Some(ref token) = configuration.bearer_access_token {
4729 req_builder = req_builder.bearer_auth(token.to_owned());
4730 };
4731
4732 let req = req_builder.build()?;
4733 let resp = configuration.client.execute(req).await?;
4734
4735 let status = resp.status();
4736
4737 if !status.is_client_error() && !status.is_server_error() {
4738 Ok(())
4739 } else {
4740 let content = resp.text().await?;
4741 let entity: Option<PostIamMfaSetupInitiateError> = serde_json::from_str(&content).ok();
4742 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4743 }
4744}
4745
4746pub async fn post_iam_oauth_authorize(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamOauthAuthorizeError>> {
4748
4749 let uri_str = format!("{}/v1/iam/oauth/authorize", configuration.base_path);
4750 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4751
4752 if let Some(ref user_agent) = configuration.user_agent {
4753 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4754 }
4755 if let Some(ref token) = configuration.bearer_access_token {
4756 req_builder = req_builder.bearer_auth(token.to_owned());
4757 };
4758
4759 let req = req_builder.build()?;
4760 let resp = configuration.client.execute(req).await?;
4761
4762 let status = resp.status();
4763
4764 if !status.is_client_error() && !status.is_server_error() {
4765 Ok(())
4766 } else {
4767 let content = resp.text().await?;
4768 let entity: Option<PostIamOauthAuthorizeError> = serde_json::from_str(&content).ok();
4769 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4770 }
4771}
4772
4773pub async fn post_iam_oauth_device(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamOauthDeviceError>> {
4775
4776 let uri_str = format!("{}/v1/iam/oauth/device", configuration.base_path);
4777 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4778
4779 if let Some(ref user_agent) = configuration.user_agent {
4780 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4781 }
4782 if let Some(ref token) = configuration.bearer_access_token {
4783 req_builder = req_builder.bearer_auth(token.to_owned());
4784 };
4785
4786 let req = req_builder.build()?;
4787 let resp = configuration.client.execute(req).await?;
4788
4789 let status = resp.status();
4790
4791 if !status.is_client_error() && !status.is_server_error() {
4792 Ok(())
4793 } else {
4794 let content = resp.text().await?;
4795 let entity: Option<PostIamOauthDeviceError> = serde_json::from_str(&content).ok();
4796 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4797 }
4798}
4799
4800pub async fn post_iam_oauth_device_info(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamOauthDeviceInfoError>> {
4802
4803 let uri_str = format!("{}/v1/iam/oauth/device/info", configuration.base_path);
4804 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4805
4806 if let Some(ref user_agent) = configuration.user_agent {
4807 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4808 }
4809 if let Some(ref token) = configuration.bearer_access_token {
4810 req_builder = req_builder.bearer_auth(token.to_owned());
4811 };
4812
4813 let req = req_builder.build()?;
4814 let resp = configuration.client.execute(req).await?;
4815
4816 let status = resp.status();
4817
4818 if !status.is_client_error() && !status.is_server_error() {
4819 Ok(())
4820 } else {
4821 let content = resp.text().await?;
4822 let entity: Option<PostIamOauthDeviceInfoError> = serde_json::from_str(&content).ok();
4823 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4824 }
4825}
4826
4827pub async fn post_iam_oauth_federation_mfa(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamOauthFederationMfaError>> {
4829
4830 let uri_str = format!("{}/v1/iam/oauth/federation/mfa", configuration.base_path);
4831 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4832
4833 if let Some(ref user_agent) = configuration.user_agent {
4834 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4835 }
4836 if let Some(ref token) = configuration.bearer_access_token {
4837 req_builder = req_builder.bearer_auth(token.to_owned());
4838 };
4839
4840 let req = req_builder.build()?;
4841 let resp = configuration.client.execute(req).await?;
4842
4843 let status = resp.status();
4844
4845 if !status.is_client_error() && !status.is_server_error() {
4846 Ok(())
4847 } else {
4848 let content = resp.text().await?;
4849 let entity: Option<PostIamOauthFederationMfaError> = serde_json::from_str(&content).ok();
4850 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4851 }
4852}
4853
4854pub async fn post_iam_oauth_introspect(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamOauthIntrospectError>> {
4856
4857 let uri_str = format!("{}/v1/iam/oauth/introspect", configuration.base_path);
4858 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4859
4860 if let Some(ref user_agent) = configuration.user_agent {
4861 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4862 }
4863 if let Some(ref token) = configuration.bearer_access_token {
4864 req_builder = req_builder.bearer_auth(token.to_owned());
4865 };
4866
4867 let req = req_builder.build()?;
4868 let resp = configuration.client.execute(req).await?;
4869
4870 let status = resp.status();
4871
4872 if !status.is_client_error() && !status.is_server_error() {
4873 Ok(())
4874 } else {
4875 let content = resp.text().await?;
4876 let entity: Option<PostIamOauthIntrospectError> = serde_json::from_str(&content).ok();
4877 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4878 }
4879}
4880
4881pub async fn post_iam_oauth_logout(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamOauthLogoutError>> {
4883
4884 let uri_str = format!("{}/v1/iam/oauth/logout", configuration.base_path);
4885 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4886
4887 if let Some(ref user_agent) = configuration.user_agent {
4888 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4889 }
4890 if let Some(ref token) = configuration.bearer_access_token {
4891 req_builder = req_builder.bearer_auth(token.to_owned());
4892 };
4893
4894 let req = req_builder.build()?;
4895 let resp = configuration.client.execute(req).await?;
4896
4897 let status = resp.status();
4898
4899 if !status.is_client_error() && !status.is_server_error() {
4900 Ok(())
4901 } else {
4902 let content = resp.text().await?;
4903 let entity: Option<PostIamOauthLogoutError> = serde_json::from_str(&content).ok();
4904 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4905 }
4906}
4907
4908pub async fn post_iam_oauth_revoke(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamOauthRevokeError>> {
4910
4911 let uri_str = format!("{}/v1/iam/oauth/revoke", configuration.base_path);
4912 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4913
4914 if let Some(ref user_agent) = configuration.user_agent {
4915 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4916 }
4917 if let Some(ref token) = configuration.bearer_access_token {
4918 req_builder = req_builder.bearer_auth(token.to_owned());
4919 };
4920
4921 let req = req_builder.build()?;
4922 let resp = configuration.client.execute(req).await?;
4923
4924 let status = resp.status();
4925
4926 if !status.is_client_error() && !status.is_server_error() {
4927 Ok(())
4928 } else {
4929 let content = resp.text().await?;
4930 let entity: Option<PostIamOauthRevokeError> = serde_json::from_str(&content).ok();
4931 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4932 }
4933}
4934
4935pub async fn post_iam_oauth_token(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamOauthTokenError>> {
4937
4938 let uri_str = format!("{}/v1/iam/oauth/token", configuration.base_path);
4939 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4940
4941 if let Some(ref user_agent) = configuration.user_agent {
4942 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4943 }
4944 if let Some(ref token) = configuration.bearer_access_token {
4945 req_builder = req_builder.bearer_auth(token.to_owned());
4946 };
4947
4948 let req = req_builder.build()?;
4949 let resp = configuration.client.execute(req).await?;
4950
4951 let status = resp.status();
4952
4953 if !status.is_client_error() && !status.is_server_error() {
4954 Ok(())
4955 } else {
4956 let content = resp.text().await?;
4957 let entity: Option<PostIamOauthTokenError> = serde_json::from_str(&content).ok();
4958 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4959 }
4960}
4961
4962pub async fn post_iam_oauth_userinfo(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamOauthUserinfoError>> {
4964
4965 let uri_str = format!("{}/v1/iam/oauth/userinfo", configuration.base_path);
4966 let mut req_builder = configuration.client.request(reqwest::Method::POST, &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<PostIamOauthUserinfoError> = serde_json::from_str(&content).ok();
4985 Err(Error::ResponseError(ResponseContent { status, content, entity }))
4986 }
4987}
4988
4989pub async fn post_iam_onboard(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamOnboardError>> {
4991
4992 let uri_str = format!("{}/v1/iam/onboard", configuration.base_path);
4993 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
4994
4995 if let Some(ref user_agent) = configuration.user_agent {
4996 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
4997 }
4998 if let Some(ref token) = configuration.bearer_access_token {
4999 req_builder = req_builder.bearer_auth(token.to_owned());
5000 };
5001
5002 let req = req_builder.build()?;
5003 let resp = configuration.client.execute(req).await?;
5004
5005 let status = resp.status();
5006
5007 if !status.is_client_error() && !status.is_server_error() {
5008 Ok(())
5009 } else {
5010 let content = resp.text().await?;
5011 let entity: Option<PostIamOnboardError> = serde_json::from_str(&content).ok();
5012 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5013 }
5014}
5015
5016pub async fn post_iam_permissions(configuration: &configuration::Configuration, iam_period_permission: models::IamPeriodPermission) -> Result<models::IamPeriodPermission, Error<PostIamPermissionsError>> {
5018 let p_iam_period_permission = iam_period_permission;
5020
5021 let uri_str = format!("{}/v1/iam/permissions", configuration.base_path);
5022 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5023
5024 if let Some(ref user_agent) = configuration.user_agent {
5025 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5026 }
5027 if let Some(ref token) = configuration.bearer_access_token {
5028 req_builder = req_builder.bearer_auth(token.to_owned());
5029 };
5030 req_builder = req_builder.json(&p_iam_period_permission);
5031
5032 let req = req_builder.build()?;
5033 let resp = configuration.client.execute(req).await?;
5034
5035 let status = resp.status();
5036 let content_type = resp
5037 .headers()
5038 .get("content-type")
5039 .and_then(|v| v.to_str().ok())
5040 .unwrap_or("application/octet-stream");
5041 let content_type = super::ContentType::from(content_type);
5042
5043 if !status.is_client_error() && !status.is_server_error() {
5044 let content = resp.text().await?;
5045 match content_type {
5046 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5047 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodPermission`"))),
5048 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::IamPeriodPermission`")))),
5049 }
5050 } else {
5051 let content = resp.text().await?;
5052 let entity: Option<PostIamPermissionsError> = serde_json::from_str(&content).ok();
5053 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5054 }
5055}
5056
5057pub async fn post_iam_preferences(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamPreferencesError>> {
5059
5060 let uri_str = format!("{}/v1/iam/preferences", configuration.base_path);
5061 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5062
5063 if let Some(ref user_agent) = configuration.user_agent {
5064 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5065 }
5066 if let Some(ref token) = configuration.bearer_access_token {
5067 req_builder = req_builder.bearer_auth(token.to_owned());
5068 };
5069
5070 let req = req_builder.build()?;
5071 let resp = configuration.client.execute(req).await?;
5072
5073 let status = resp.status();
5074
5075 if !status.is_client_error() && !status.is_server_error() {
5076 Ok(())
5077 } else {
5078 let content = resp.text().await?;
5079 let entity: Option<PostIamPreferencesError> = serde_json::from_str(&content).ok();
5080 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5081 }
5082}
5083
5084pub async fn post_iam_projects(configuration: &configuration::Configuration, iam_period_projects_period_input: models::IamPeriodProjectsPeriodInput) -> Result<models::IamPeriodProject, Error<PostIamProjectsError>> {
5086 let p_iam_period_projects_period_input = iam_period_projects_period_input;
5088
5089 let uri_str = format!("{}/v1/iam/projects", configuration.base_path);
5090 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5091
5092 if let Some(ref user_agent) = configuration.user_agent {
5093 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5094 }
5095 if let Some(ref token) = configuration.bearer_access_token {
5096 req_builder = req_builder.bearer_auth(token.to_owned());
5097 };
5098 req_builder = req_builder.json(&p_iam_period_projects_period_input);
5099
5100 let req = req_builder.build()?;
5101 let resp = configuration.client.execute(req).await?;
5102
5103 let status = resp.status();
5104 let content_type = resp
5105 .headers()
5106 .get("content-type")
5107 .and_then(|v| v.to_str().ok())
5108 .unwrap_or("application/octet-stream");
5109 let content_type = super::ContentType::from(content_type);
5110
5111 if !status.is_client_error() && !status.is_server_error() {
5112 let content = resp.text().await?;
5113 match content_type {
5114 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5115 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodProject`"))),
5116 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::IamPeriodProject`")))),
5117 }
5118 } else {
5119 let content = resp.text().await?;
5120 let entity: Option<PostIamProjectsError> = serde_json::from_str(&content).ok();
5121 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5122 }
5123}
5124
5125pub async fn post_iam_registry_token(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamRegistryTokenError>> {
5127
5128 let uri_str = format!("{}/v1/iam/registry/token", configuration.base_path);
5129 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5130
5131 if let Some(ref user_agent) = configuration.user_agent {
5132 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5133 }
5134 if let Some(ref token) = configuration.bearer_access_token {
5135 req_builder = req_builder.bearer_auth(token.to_owned());
5136 };
5137
5138 let req = req_builder.build()?;
5139 let resp = configuration.client.execute(req).await?;
5140
5141 let status = resp.status();
5142
5143 if !status.is_client_error() && !status.is_server_error() {
5144 Ok(())
5145 } else {
5146 let content = resp.text().await?;
5147 let entity: Option<PostIamRegistryTokenError> = serde_json::from_str(&content).ok();
5148 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5149 }
5150}
5151
5152pub async fn post_iam_release(configuration: &configuration::Configuration, iam_period_assume_body: models::IamPeriodAssumeBody, authorization: Option<&str>, x_forwarded_for: Option<&str>) -> Result<models::IamPeriodAnswer, Error<PostIamReleaseError>> {
5154 let p_iam_period_assume_body = iam_period_assume_body;
5156 let p_authorization = authorization;
5157 let p_x_forwarded_for = x_forwarded_for;
5158
5159 let uri_str = format!("{}/v1/iam/release", configuration.base_path);
5160 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5161
5162 if let Some(ref user_agent) = configuration.user_agent {
5163 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5164 }
5165 if let Some(param_value) = p_authorization {
5166 req_builder = req_builder.header("Authorization", param_value.to_string());
5167 }
5168 if let Some(param_value) = p_x_forwarded_for {
5169 req_builder = req_builder.header("X-Forwarded-For", param_value.to_string());
5170 }
5171 if let Some(ref token) = configuration.bearer_access_token {
5172 req_builder = req_builder.bearer_auth(token.to_owned());
5173 };
5174 req_builder = req_builder.json(&p_iam_period_assume_body);
5175
5176 let req = req_builder.build()?;
5177 let resp = configuration.client.execute(req).await?;
5178
5179 let status = resp.status();
5180 let content_type = resp
5181 .headers()
5182 .get("content-type")
5183 .and_then(|v| v.to_str().ok())
5184 .unwrap_or("application/octet-stream");
5185 let content_type = super::ContentType::from(content_type);
5186
5187 if !status.is_client_error() && !status.is_server_error() {
5188 let content = resp.text().await?;
5189 match content_type {
5190 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5191 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodAnswer`"))),
5192 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::IamPeriodAnswer`")))),
5193 }
5194 } else {
5195 let content = resp.text().await?;
5196 let entity: Option<PostIamReleaseError> = serde_json::from_str(&content).ok();
5197 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5198 }
5199}
5200
5201pub async fn post_iam_roles(configuration: &configuration::Configuration, iam_period_roles_period_input: models::IamPeriodRolesPeriodInput) -> Result<models::IamPeriodRole, Error<PostIamRolesError>> {
5203 let p_iam_period_roles_period_input = iam_period_roles_period_input;
5205
5206 let uri_str = format!("{}/v1/iam/roles", configuration.base_path);
5207 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5208
5209 if let Some(ref user_agent) = configuration.user_agent {
5210 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5211 }
5212 if let Some(ref token) = configuration.bearer_access_token {
5213 req_builder = req_builder.bearer_auth(token.to_owned());
5214 };
5215 req_builder = req_builder.json(&p_iam_period_roles_period_input);
5216
5217 let req = req_builder.build()?;
5218 let resp = configuration.client.execute(req).await?;
5219
5220 let status = resp.status();
5221 let content_type = resp
5222 .headers()
5223 .get("content-type")
5224 .and_then(|v| v.to_str().ok())
5225 .unwrap_or("application/octet-stream");
5226 let content_type = super::ContentType::from(content_type);
5227
5228 if !status.is_client_error() && !status.is_server_error() {
5229 let content = resp.text().await?;
5230 match content_type {
5231 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5232 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodRole`"))),
5233 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::IamPeriodRole`")))),
5234 }
5235 } else {
5236 let content = resp.text().await?;
5237 let entity: Option<PostIamRolesError> = serde_json::from_str(&content).ok();
5238 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5239 }
5240}
5241
5242pub async fn post_iam_scim_v2_users(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamScimV2UsersError>> {
5244
5245 let uri_str = format!("{}/v1/iam/scim/v2/Users", configuration.base_path);
5246 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5247
5248 if let Some(ref user_agent) = configuration.user_agent {
5249 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5250 }
5251 if let Some(ref token) = configuration.bearer_access_token {
5252 req_builder = req_builder.bearer_auth(token.to_owned());
5253 };
5254
5255 let req = req_builder.build()?;
5256 let resp = configuration.client.execute(req).await?;
5257
5258 let status = resp.status();
5259
5260 if !status.is_client_error() && !status.is_server_error() {
5261 Ok(())
5262 } else {
5263 let content = resp.text().await?;
5264 let entity: Option<PostIamScimV2UsersError> = serde_json::from_str(&content).ok();
5265 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5266 }
5267}
5268
5269pub async fn post_iam_service_accounts(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamServiceAccountsError>> {
5271
5272 let uri_str = format!("{}/v1/iam/service-accounts", configuration.base_path);
5273 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5274
5275 if let Some(ref user_agent) = configuration.user_agent {
5276 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5277 }
5278 if let Some(ref token) = configuration.bearer_access_token {
5279 req_builder = req_builder.bearer_auth(token.to_owned());
5280 };
5281
5282 let req = req_builder.build()?;
5283 let resp = configuration.client.execute(req).await?;
5284
5285 let status = resp.status();
5286
5287 if !status.is_client_error() && !status.is_server_error() {
5288 Ok(())
5289 } else {
5290 let content = resp.text().await?;
5291 let entity: Option<PostIamServiceAccountsError> = serde_json::from_str(&content).ok();
5292 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5293 }
5294}
5295
5296pub async fn post_iam_service_accounts_by_name_keys(configuration: &configuration::Configuration, name: &str) -> Result<(), Error<PostIamServiceAccountsByNameKeysError>> {
5298 let p_name = name;
5300
5301 let uri_str = format!("{}/v1/iam/service-accounts/{name}/keys", configuration.base_path, name=crate::apis::urlencode(p_name));
5302 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5303
5304 if let Some(ref user_agent) = configuration.user_agent {
5305 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5306 }
5307 if let Some(ref token) = configuration.bearer_access_token {
5308 req_builder = req_builder.bearer_auth(token.to_owned());
5309 };
5310
5311 let req = req_builder.build()?;
5312 let resp = configuration.client.execute(req).await?;
5313
5314 let status = resp.status();
5315
5316 if !status.is_client_error() && !status.is_server_error() {
5317 Ok(())
5318 } else {
5319 let content = resp.text().await?;
5320 let entity: Option<PostIamServiceAccountsByNameKeysError> = serde_json::from_str(&content).ok();
5321 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5322 }
5323}
5324
5325pub async fn post_iam_signin(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamSigninError>> {
5327
5328 let uri_str = format!("{}/v1/iam/signin", configuration.base_path);
5329 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5330
5331 if let Some(ref user_agent) = configuration.user_agent {
5332 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5333 }
5334 if let Some(ref token) = configuration.bearer_access_token {
5335 req_builder = req_builder.bearer_auth(token.to_owned());
5336 };
5337
5338 let req = req_builder.build()?;
5339 let resp = configuration.client.execute(req).await?;
5340
5341 let status = resp.status();
5342
5343 if !status.is_client_error() && !status.is_server_error() {
5344 Ok(())
5345 } else {
5346 let content = resp.text().await?;
5347 let entity: Option<PostIamSigninError> = serde_json::from_str(&content).ok();
5348 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5349 }
5350}
5351
5352pub async fn post_iam_signup(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamSignupError>> {
5354
5355 let uri_str = format!("{}/v1/iam/signup", configuration.base_path);
5356 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5357
5358 if let Some(ref user_agent) = configuration.user_agent {
5359 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5360 }
5361 if let Some(ref token) = configuration.bearer_access_token {
5362 req_builder = req_builder.bearer_auth(token.to_owned());
5363 };
5364
5365 let req = req_builder.build()?;
5366 let resp = configuration.client.execute(req).await?;
5367
5368 let status = resp.status();
5369
5370 if !status.is_client_error() && !status.is_server_error() {
5371 Ok(())
5372 } else {
5373 let content = resp.text().await?;
5374 let entity: Option<PostIamSignupError> = serde_json::from_str(&content).ok();
5375 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5376 }
5377}
5378
5379pub async fn post_iam_tokens_issue(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamTokensIssueError>> {
5381
5382 let uri_str = format!("{}/v1/iam/tokens/issue", configuration.base_path);
5383 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5384
5385 if let Some(ref user_agent) = configuration.user_agent {
5386 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5387 }
5388 if let Some(ref token) = configuration.bearer_access_token {
5389 req_builder = req_builder.bearer_auth(token.to_owned());
5390 };
5391
5392 let req = req_builder.build()?;
5393 let resp = configuration.client.execute(req).await?;
5394
5395 let status = resp.status();
5396
5397 if !status.is_client_error() && !status.is_server_error() {
5398 Ok(())
5399 } else {
5400 let content = resp.text().await?;
5401 let entity: Option<PostIamTokensIssueError> = serde_json::from_str(&content).ok();
5402 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5403 }
5404}
5405
5406pub async fn post_iam_unlink(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamUnlinkError>> {
5408
5409 let uri_str = format!("{}/v1/iam/unlink", configuration.base_path);
5410 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5411
5412 if let Some(ref user_agent) = configuration.user_agent {
5413 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5414 }
5415 if let Some(ref token) = configuration.bearer_access_token {
5416 req_builder = req_builder.bearer_auth(token.to_owned());
5417 };
5418
5419 let req = req_builder.build()?;
5420 let resp = configuration.client.execute(req).await?;
5421
5422 let status = resp.status();
5423
5424 if !status.is_client_error() && !status.is_server_error() {
5425 Ok(())
5426 } else {
5427 let content = resp.text().await?;
5428 let entity: Option<PostIamUnlinkError> = serde_json::from_str(&content).ok();
5429 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5430 }
5431}
5432
5433pub async fn post_iam_users(configuration: &configuration::Configuration, iam_period_create_input: models::IamPeriodCreateInput) -> Result<models::IamPeriodUser, Error<PostIamUsersError>> {
5435 let p_iam_period_create_input = iam_period_create_input;
5437
5438 let uri_str = format!("{}/v1/iam/users", configuration.base_path);
5439 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5440
5441 if let Some(ref user_agent) = configuration.user_agent {
5442 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5443 }
5444 if let Some(ref token) = configuration.bearer_access_token {
5445 req_builder = req_builder.bearer_auth(token.to_owned());
5446 };
5447 req_builder = req_builder.json(&p_iam_period_create_input);
5448
5449 let req = req_builder.build()?;
5450 let resp = configuration.client.execute(req).await?;
5451
5452 let status = resp.status();
5453 let content_type = resp
5454 .headers()
5455 .get("content-type")
5456 .and_then(|v| v.to_str().ok())
5457 .unwrap_or("application/octet-stream");
5458 let content_type = super::ContentType::from(content_type);
5459
5460 if !status.is_client_error() && !status.is_server_error() {
5461 let content = resp.text().await?;
5462 match content_type {
5463 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5464 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodUser`"))),
5465 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::IamPeriodUser`")))),
5466 }
5467 } else {
5468 let content = resp.text().await?;
5469 let entity: Option<PostIamUsersError> = serde_json::from_str(&content).ok();
5470 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5471 }
5472}
5473
5474pub async fn post_iam_users_by_owner_by_name_keys(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PostIamUsersByOwnerByNameKeysError>> {
5476 let p_owner = owner;
5478 let p_name = name;
5479
5480 let uri_str = format!("{}/v1/iam/users/{owner}/{name}/keys", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
5481 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5482
5483 if let Some(ref user_agent) = configuration.user_agent {
5484 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5485 }
5486 if let Some(ref token) = configuration.bearer_access_token {
5487 req_builder = req_builder.bearer_auth(token.to_owned());
5488 };
5489
5490 let req = req_builder.build()?;
5491 let resp = configuration.client.execute(req).await?;
5492
5493 let status = resp.status();
5494
5495 if !status.is_client_error() && !status.is_server_error() {
5496 Ok(())
5497 } else {
5498 let content = resp.text().await?;
5499 let entity: Option<PostIamUsersByOwnerByNameKeysError> = serde_json::from_str(&content).ok();
5500 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5501 }
5502}
5503
5504pub async fn post_iam_verification_codes(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamVerificationCodesError>> {
5506
5507 let uri_str = format!("{}/v1/iam/verification-codes", configuration.base_path);
5508 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5509
5510 if let Some(ref user_agent) = configuration.user_agent {
5511 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5512 }
5513 if let Some(ref token) = configuration.bearer_access_token {
5514 req_builder = req_builder.bearer_auth(token.to_owned());
5515 };
5516
5517 let req = req_builder.build()?;
5518 let resp = configuration.client.execute(req).await?;
5519
5520 let status = resp.status();
5521
5522 if !status.is_client_error() && !status.is_server_error() {
5523 Ok(())
5524 } else {
5525 let content = resp.text().await?;
5526 let entity: Option<PostIamVerificationCodesError> = serde_json::from_str(&content).ok();
5527 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5528 }
5529}
5530
5531pub async fn post_iam_web3_verify(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamWeb3VerifyError>> {
5533
5534 let uri_str = format!("{}/v1/iam/web3/verify", configuration.base_path);
5535 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5536
5537 if let Some(ref user_agent) = configuration.user_agent {
5538 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5539 }
5540 if let Some(ref token) = configuration.bearer_access_token {
5541 req_builder = req_builder.bearer_auth(token.to_owned());
5542 };
5543
5544 let req = req_builder.build()?;
5545 let resp = configuration.client.execute(req).await?;
5546
5547 let status = resp.status();
5548
5549 if !status.is_client_error() && !status.is_server_error() {
5550 Ok(())
5551 } else {
5552 let content = resp.text().await?;
5553 let entity: Option<PostIamWeb3VerifyError> = serde_json::from_str(&content).ok();
5554 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5555 }
5556}
5557
5558pub async fn post_iam_webauthn_signin_finish(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamWebauthnSigninFinishError>> {
5560
5561 let uri_str = format!("{}/v1/iam/webauthn/signin/finish", configuration.base_path);
5562 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5563
5564 if let Some(ref user_agent) = configuration.user_agent {
5565 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5566 }
5567 if let Some(ref token) = configuration.bearer_access_token {
5568 req_builder = req_builder.bearer_auth(token.to_owned());
5569 };
5570
5571 let req = req_builder.build()?;
5572 let resp = configuration.client.execute(req).await?;
5573
5574 let status = resp.status();
5575
5576 if !status.is_client_error() && !status.is_server_error() {
5577 Ok(())
5578 } else {
5579 let content = resp.text().await?;
5580 let entity: Option<PostIamWebauthnSigninFinishError> = serde_json::from_str(&content).ok();
5581 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5582 }
5583}
5584
5585pub async fn post_iam_webauthn_signup_finish(configuration: &configuration::Configuration, ) -> Result<(), Error<PostIamWebauthnSignupFinishError>> {
5587
5588 let uri_str = format!("{}/v1/iam/webauthn/signup/finish", configuration.base_path);
5589 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5590
5591 if let Some(ref user_agent) = configuration.user_agent {
5592 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5593 }
5594 if let Some(ref token) = configuration.bearer_access_token {
5595 req_builder = req_builder.bearer_auth(token.to_owned());
5596 };
5597
5598 let req = req_builder.build()?;
5599 let resp = configuration.client.execute(req).await?;
5600
5601 let status = resp.status();
5602
5603 if !status.is_client_error() && !status.is_server_error() {
5604 Ok(())
5605 } else {
5606 let content = resp.text().await?;
5607 let entity: Option<PostIamWebauthnSignupFinishError> = serde_json::from_str(&content).ok();
5608 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5609 }
5610}
5611
5612pub async fn post_iam_workspaces(configuration: &configuration::Configuration, iam_period_workspaces_period_input: models::IamPeriodWorkspacesPeriodInput) -> Result<models::IamPeriodWorkspace, Error<PostIamWorkspacesError>> {
5614 let p_iam_period_workspaces_period_input = iam_period_workspaces_period_input;
5616
5617 let uri_str = format!("{}/v1/iam/workspaces", configuration.base_path);
5618 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
5619
5620 if let Some(ref user_agent) = configuration.user_agent {
5621 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5622 }
5623 if let Some(ref token) = configuration.bearer_access_token {
5624 req_builder = req_builder.bearer_auth(token.to_owned());
5625 };
5626 req_builder = req_builder.json(&p_iam_period_workspaces_period_input);
5627
5628 let req = req_builder.build()?;
5629 let resp = configuration.client.execute(req).await?;
5630
5631 let status = resp.status();
5632 let content_type = resp
5633 .headers()
5634 .get("content-type")
5635 .and_then(|v| v.to_str().ok())
5636 .unwrap_or("application/octet-stream");
5637 let content_type = super::ContentType::from(content_type);
5638
5639 if !status.is_client_error() && !status.is_server_error() {
5640 let content = resp.text().await?;
5641 match content_type {
5642 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5643 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodWorkspace`"))),
5644 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::IamPeriodWorkspace`")))),
5645 }
5646 } else {
5647 let content = resp.text().await?;
5648 let entity: Option<PostIamWorkspacesError> = serde_json::from_str(&content).ok();
5649 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5650 }
5651}
5652
5653pub async fn put_iam_account(configuration: &configuration::Configuration, iam_period_account_body: models::IamPeriodAccountBody, cookie: Option<&str>, authorization: Option<&str>) -> Result<models::IamPeriodAnswer, Error<PutIamAccountError>> {
5655 let p_iam_period_account_body = iam_period_account_body;
5657 let p_cookie = cookie;
5658 let p_authorization = authorization;
5659
5660 let uri_str = format!("{}/v1/iam/account", configuration.base_path);
5661 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
5662
5663 if let Some(ref user_agent) = configuration.user_agent {
5664 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5665 }
5666 if let Some(param_value) = p_cookie {
5667 req_builder = req_builder.header("Cookie", param_value.to_string());
5668 }
5669 if let Some(param_value) = p_authorization {
5670 req_builder = req_builder.header("Authorization", param_value.to_string());
5671 }
5672 if let Some(ref token) = configuration.bearer_access_token {
5673 req_builder = req_builder.bearer_auth(token.to_owned());
5674 };
5675 req_builder = req_builder.json(&p_iam_period_account_body);
5676
5677 let req = req_builder.build()?;
5678 let resp = configuration.client.execute(req).await?;
5679
5680 let status = resp.status();
5681 let content_type = resp
5682 .headers()
5683 .get("content-type")
5684 .and_then(|v| v.to_str().ok())
5685 .unwrap_or("application/octet-stream");
5686 let content_type = super::ContentType::from(content_type);
5687
5688 if !status.is_client_error() && !status.is_server_error() {
5689 let content = resp.text().await?;
5690 match content_type {
5691 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5692 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodAnswer`"))),
5693 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::IamPeriodAnswer`")))),
5694 }
5695 } else {
5696 let content = resp.text().await?;
5697 let entity: Option<PutIamAccountError> = serde_json::from_str(&content).ok();
5698 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5699 }
5700}
5701
5702pub async fn put_iam_applications_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str, iam_period_application: models::IamPeriodApplication) -> Result<models::IamPeriodApplication, Error<PutIamApplicationsByOwnerByNameError>> {
5704 let p_owner = owner;
5706 let p_name = name;
5707 let p_iam_period_application = iam_period_application;
5708
5709 let uri_str = format!("{}/v1/iam/applications/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
5710 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
5711
5712 if let Some(ref user_agent) = configuration.user_agent {
5713 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5714 }
5715 if let Some(ref token) = configuration.bearer_access_token {
5716 req_builder = req_builder.bearer_auth(token.to_owned());
5717 };
5718 req_builder = req_builder.json(&p_iam_period_application);
5719
5720 let req = req_builder.build()?;
5721 let resp = configuration.client.execute(req).await?;
5722
5723 let status = resp.status();
5724 let content_type = resp
5725 .headers()
5726 .get("content-type")
5727 .and_then(|v| v.to_str().ok())
5728 .unwrap_or("application/octet-stream");
5729 let content_type = super::ContentType::from(content_type);
5730
5731 if !status.is_client_error() && !status.is_server_error() {
5732 let content = resp.text().await?;
5733 match content_type {
5734 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5735 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodApplication`"))),
5736 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::IamPeriodApplication`")))),
5737 }
5738 } else {
5739 let content = resp.text().await?;
5740 let entity: Option<PutIamApplicationsByOwnerByNameError> = serde_json::from_str(&content).ok();
5741 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5742 }
5743}
5744
5745pub async fn put_iam_audit_logs_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str, iam_period_input: models::IamPeriodInput) -> Result<models::IamPeriodAuditLog, Error<PutIamAuditLogsByOwnerByNameError>> {
5747 let p_owner = owner;
5749 let p_name = name;
5750 let p_iam_period_input = iam_period_input;
5751
5752 let uri_str = format!("{}/v1/iam/audit-logs/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
5753 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
5754
5755 if let Some(ref user_agent) = configuration.user_agent {
5756 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5757 }
5758 if let Some(ref token) = configuration.bearer_access_token {
5759 req_builder = req_builder.bearer_auth(token.to_owned());
5760 };
5761 req_builder = req_builder.json(&p_iam_period_input);
5762
5763 let req = req_builder.build()?;
5764 let resp = configuration.client.execute(req).await?;
5765
5766 let status = resp.status();
5767 let content_type = resp
5768 .headers()
5769 .get("content-type")
5770 .and_then(|v| v.to_str().ok())
5771 .unwrap_or("application/octet-stream");
5772 let content_type = super::ContentType::from(content_type);
5773
5774 if !status.is_client_error() && !status.is_server_error() {
5775 let content = resp.text().await?;
5776 match content_type {
5777 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5778 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodAuditLog`"))),
5779 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::IamPeriodAuditLog`")))),
5780 }
5781 } else {
5782 let content = resp.text().await?;
5783 let entity: Option<PutIamAuditLogsByOwnerByNameError> = serde_json::from_str(&content).ok();
5784 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5785 }
5786}
5787
5788pub async fn put_iam_certs_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str, iam_period_cert: models::IamPeriodCert) -> Result<models::IamPeriodCert, Error<PutIamCertsByOwnerByNameError>> {
5790 let p_owner = owner;
5792 let p_name = name;
5793 let p_iam_period_cert = iam_period_cert;
5794
5795 let uri_str = format!("{}/v1/iam/certs/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
5796 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
5797
5798 if let Some(ref user_agent) = configuration.user_agent {
5799 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5800 }
5801 if let Some(ref token) = configuration.bearer_access_token {
5802 req_builder = req_builder.bearer_auth(token.to_owned());
5803 };
5804 req_builder = req_builder.json(&p_iam_period_cert);
5805
5806 let req = req_builder.build()?;
5807 let resp = configuration.client.execute(req).await?;
5808
5809 let status = resp.status();
5810 let content_type = resp
5811 .headers()
5812 .get("content-type")
5813 .and_then(|v| v.to_str().ok())
5814 .unwrap_or("application/octet-stream");
5815 let content_type = super::ContentType::from(content_type);
5816
5817 if !status.is_client_error() && !status.is_server_error() {
5818 let content = resp.text().await?;
5819 match content_type {
5820 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5821 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodCert`"))),
5822 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::IamPeriodCert`")))),
5823 }
5824 } else {
5825 let content = resp.text().await?;
5826 let entity: Option<PutIamCertsByOwnerByNameError> = serde_json::from_str(&content).ok();
5827 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5828 }
5829}
5830
5831pub async fn put_iam_consent(configuration: &configuration::Configuration, ) -> Result<(), Error<PutIamConsentError>> {
5833
5834 let uri_str = format!("{}/v1/iam/consent", configuration.base_path);
5835 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
5836
5837 if let Some(ref user_agent) = configuration.user_agent {
5838 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5839 }
5840 if let Some(ref token) = configuration.bearer_access_token {
5841 req_builder = req_builder.bearer_auth(token.to_owned());
5842 };
5843
5844 let req = req_builder.build()?;
5845 let resp = configuration.client.execute(req).await?;
5846
5847 let status = resp.status();
5848
5849 if !status.is_client_error() && !status.is_server_error() {
5850 Ok(())
5851 } else {
5852 let content = resp.text().await?;
5853 let entity: Option<PutIamConsentError> = serde_json::from_str(&content).ok();
5854 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5855 }
5856}
5857
5858pub async fn put_iam_invitations_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str, iam_period_invitations_period_input: models::IamPeriodInvitationsPeriodInput) -> Result<models::IamPeriodInvitation, Error<PutIamInvitationsByOwnerByNameError>> {
5860 let p_owner = owner;
5862 let p_name = name;
5863 let p_iam_period_invitations_period_input = iam_period_invitations_period_input;
5864
5865 let uri_str = format!("{}/v1/iam/invitations/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
5866 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
5867
5868 if let Some(ref user_agent) = configuration.user_agent {
5869 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5870 }
5871 if let Some(ref token) = configuration.bearer_access_token {
5872 req_builder = req_builder.bearer_auth(token.to_owned());
5873 };
5874 req_builder = req_builder.json(&p_iam_period_invitations_period_input);
5875
5876 let req = req_builder.build()?;
5877 let resp = configuration.client.execute(req).await?;
5878
5879 let status = resp.status();
5880 let content_type = resp
5881 .headers()
5882 .get("content-type")
5883 .and_then(|v| v.to_str().ok())
5884 .unwrap_or("application/octet-stream");
5885 let content_type = super::ContentType::from(content_type);
5886
5887 if !status.is_client_error() && !status.is_server_error() {
5888 let content = resp.text().await?;
5889 match content_type {
5890 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5891 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodInvitation`"))),
5892 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::IamPeriodInvitation`")))),
5893 }
5894 } else {
5895 let content = resp.text().await?;
5896 let entity: Option<PutIamInvitationsByOwnerByNameError> = serde_json::from_str(&content).ok();
5897 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5898 }
5899}
5900
5901pub async fn put_iam_keys_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str, iam_period_key: models::IamPeriodKey) -> Result<models::IamPeriodKey, Error<PutIamKeysByOwnerByNameError>> {
5903 let p_owner = owner;
5905 let p_name = name;
5906 let p_iam_period_key = iam_period_key;
5907
5908 let uri_str = format!("{}/v1/iam/keys/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
5909 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
5910
5911 if let Some(ref user_agent) = configuration.user_agent {
5912 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5913 }
5914 if let Some(ref token) = configuration.bearer_access_token {
5915 req_builder = req_builder.bearer_auth(token.to_owned());
5916 };
5917 req_builder = req_builder.json(&p_iam_period_key);
5918
5919 let req = req_builder.build()?;
5920 let resp = configuration.client.execute(req).await?;
5921
5922 let status = resp.status();
5923 let content_type = resp
5924 .headers()
5925 .get("content-type")
5926 .and_then(|v| v.to_str().ok())
5927 .unwrap_or("application/octet-stream");
5928 let content_type = super::ContentType::from(content_type);
5929
5930 if !status.is_client_error() && !status.is_server_error() {
5931 let content = resp.text().await?;
5932 match content_type {
5933 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5934 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodKey`"))),
5935 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::IamPeriodKey`")))),
5936 }
5937 } else {
5938 let content = resp.text().await?;
5939 let entity: Option<PutIamKeysByOwnerByNameError> = serde_json::from_str(&content).ok();
5940 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5941 }
5942}
5943
5944pub async fn put_iam_password(configuration: &configuration::Configuration, iam_period_password_body: models::IamPeriodPasswordBody, cookie: Option<&str>, authorization: Option<&str>) -> Result<models::IamPeriodAnswer, Error<PutIamPasswordError>> {
5946 let p_iam_period_password_body = iam_period_password_body;
5948 let p_cookie = cookie;
5949 let p_authorization = authorization;
5950
5951 let uri_str = format!("{}/v1/iam/password", configuration.base_path);
5952 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
5953
5954 if let Some(ref user_agent) = configuration.user_agent {
5955 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
5956 }
5957 if let Some(param_value) = p_cookie {
5958 req_builder = req_builder.header("Cookie", param_value.to_string());
5959 }
5960 if let Some(param_value) = p_authorization {
5961 req_builder = req_builder.header("Authorization", param_value.to_string());
5962 }
5963 if let Some(ref token) = configuration.bearer_access_token {
5964 req_builder = req_builder.bearer_auth(token.to_owned());
5965 };
5966 req_builder = req_builder.json(&p_iam_period_password_body);
5967
5968 let req = req_builder.build()?;
5969 let resp = configuration.client.execute(req).await?;
5970
5971 let status = resp.status();
5972 let content_type = resp
5973 .headers()
5974 .get("content-type")
5975 .and_then(|v| v.to_str().ok())
5976 .unwrap_or("application/octet-stream");
5977 let content_type = super::ContentType::from(content_type);
5978
5979 if !status.is_client_error() && !status.is_server_error() {
5980 let content = resp.text().await?;
5981 match content_type {
5982 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
5983 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodAnswer`"))),
5984 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::IamPeriodAnswer`")))),
5985 }
5986 } else {
5987 let content = resp.text().await?;
5988 let entity: Option<PutIamPasswordError> = serde_json::from_str(&content).ok();
5989 Err(Error::ResponseError(ResponseContent { status, content, entity }))
5990 }
5991}
5992
5993pub async fn put_iam_permissions_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str, iam_period_permission: models::IamPeriodPermission) -> Result<models::IamPeriodPermission, Error<PutIamPermissionsByOwnerByNameError>> {
5995 let p_owner = owner;
5997 let p_name = name;
5998 let p_iam_period_permission = iam_period_permission;
5999
6000 let uri_str = format!("{}/v1/iam/permissions/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6001 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6002
6003 if let Some(ref user_agent) = configuration.user_agent {
6004 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6005 }
6006 if let Some(ref token) = configuration.bearer_access_token {
6007 req_builder = req_builder.bearer_auth(token.to_owned());
6008 };
6009 req_builder = req_builder.json(&p_iam_period_permission);
6010
6011 let req = req_builder.build()?;
6012 let resp = configuration.client.execute(req).await?;
6013
6014 let status = resp.status();
6015 let content_type = resp
6016 .headers()
6017 .get("content-type")
6018 .and_then(|v| v.to_str().ok())
6019 .unwrap_or("application/octet-stream");
6020 let content_type = super::ContentType::from(content_type);
6021
6022 if !status.is_client_error() && !status.is_server_error() {
6023 let content = resp.text().await?;
6024 match content_type {
6025 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6026 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodPermission`"))),
6027 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::IamPeriodPermission`")))),
6028 }
6029 } else {
6030 let content = resp.text().await?;
6031 let entity: Option<PutIamPermissionsByOwnerByNameError> = serde_json::from_str(&content).ok();
6032 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6033 }
6034}
6035
6036pub async fn put_iam_projects_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str, iam_period_projects_period_input: models::IamPeriodProjectsPeriodInput) -> Result<models::IamPeriodProject, Error<PutIamProjectsByOwnerByNameError>> {
6038 let p_owner = owner;
6040 let p_name = name;
6041 let p_iam_period_projects_period_input = iam_period_projects_period_input;
6042
6043 let uri_str = format!("{}/v1/iam/projects/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6044 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6045
6046 if let Some(ref user_agent) = configuration.user_agent {
6047 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6048 }
6049 if let Some(ref token) = configuration.bearer_access_token {
6050 req_builder = req_builder.bearer_auth(token.to_owned());
6051 };
6052 req_builder = req_builder.json(&p_iam_period_projects_period_input);
6053
6054 let req = req_builder.build()?;
6055 let resp = configuration.client.execute(req).await?;
6056
6057 let status = resp.status();
6058 let content_type = resp
6059 .headers()
6060 .get("content-type")
6061 .and_then(|v| v.to_str().ok())
6062 .unwrap_or("application/octet-stream");
6063 let content_type = super::ContentType::from(content_type);
6064
6065 if !status.is_client_error() && !status.is_server_error() {
6066 let content = resp.text().await?;
6067 match content_type {
6068 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6069 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodProject`"))),
6070 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::IamPeriodProject`")))),
6071 }
6072 } else {
6073 let content = resp.text().await?;
6074 let entity: Option<PutIamProjectsByOwnerByNameError> = serde_json::from_str(&content).ok();
6075 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6076 }
6077}
6078
6079pub async fn put_iam_roles_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str, iam_period_roles_period_input: models::IamPeriodRolesPeriodInput) -> Result<models::IamPeriodRole, Error<PutIamRolesByOwnerByNameError>> {
6081 let p_owner = owner;
6083 let p_name = name;
6084 let p_iam_period_roles_period_input = iam_period_roles_period_input;
6085
6086 let uri_str = format!("{}/v1/iam/roles/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6087 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6088
6089 if let Some(ref user_agent) = configuration.user_agent {
6090 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6091 }
6092 if let Some(ref token) = configuration.bearer_access_token {
6093 req_builder = req_builder.bearer_auth(token.to_owned());
6094 };
6095 req_builder = req_builder.json(&p_iam_period_roles_period_input);
6096
6097 let req = req_builder.build()?;
6098 let resp = configuration.client.execute(req).await?;
6099
6100 let status = resp.status();
6101 let content_type = resp
6102 .headers()
6103 .get("content-type")
6104 .and_then(|v| v.to_str().ok())
6105 .unwrap_or("application/octet-stream");
6106 let content_type = super::ContentType::from(content_type);
6107
6108 if !status.is_client_error() && !status.is_server_error() {
6109 let content = resp.text().await?;
6110 match content_type {
6111 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6112 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodRole`"))),
6113 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::IamPeriodRole`")))),
6114 }
6115 } else {
6116 let content = resp.text().await?;
6117 let entity: Option<PutIamRolesByOwnerByNameError> = serde_json::from_str(&content).ok();
6118 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6119 }
6120}
6121
6122pub async fn put_iam_scim_v2_users_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str) -> Result<(), Error<PutIamScimV2UsersByOwnerByNameError>> {
6124 let p_owner = owner;
6126 let p_name = name;
6127
6128 let uri_str = format!("{}/v1/iam/scim/v2/Users/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6129 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6130
6131 if let Some(ref user_agent) = configuration.user_agent {
6132 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6133 }
6134 if let Some(ref token) = configuration.bearer_access_token {
6135 req_builder = req_builder.bearer_auth(token.to_owned());
6136 };
6137
6138 let req = req_builder.build()?;
6139 let resp = configuration.client.execute(req).await?;
6140
6141 let status = resp.status();
6142
6143 if !status.is_client_error() && !status.is_server_error() {
6144 Ok(())
6145 } else {
6146 let content = resp.text().await?;
6147 let entity: Option<PutIamScimV2UsersByOwnerByNameError> = serde_json::from_str(&content).ok();
6148 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6149 }
6150}
6151
6152pub async fn put_iam_users_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str, iam_period_update_input: models::IamPeriodUpdateInput) -> Result<models::IamPeriodUser, Error<PutIamUsersByOwnerByNameError>> {
6154 let p_owner = owner;
6156 let p_name = name;
6157 let p_iam_period_update_input = iam_period_update_input;
6158
6159 let uri_str = format!("{}/v1/iam/users/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6160 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6161
6162 if let Some(ref user_agent) = configuration.user_agent {
6163 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6164 }
6165 if let Some(ref token) = configuration.bearer_access_token {
6166 req_builder = req_builder.bearer_auth(token.to_owned());
6167 };
6168 req_builder = req_builder.json(&p_iam_period_update_input);
6169
6170 let req = req_builder.build()?;
6171 let resp = configuration.client.execute(req).await?;
6172
6173 let status = resp.status();
6174 let content_type = resp
6175 .headers()
6176 .get("content-type")
6177 .and_then(|v| v.to_str().ok())
6178 .unwrap_or("application/octet-stream");
6179 let content_type = super::ContentType::from(content_type);
6180
6181 if !status.is_client_error() && !status.is_server_error() {
6182 let content = resp.text().await?;
6183 match content_type {
6184 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6185 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodUser`"))),
6186 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::IamPeriodUser`")))),
6187 }
6188 } else {
6189 let content = resp.text().await?;
6190 let entity: Option<PutIamUsersByOwnerByNameError> = serde_json::from_str(&content).ok();
6191 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6192 }
6193}
6194
6195pub async fn put_iam_workspaces_by_owner_by_name(configuration: &configuration::Configuration, owner: &str, name: &str, iam_period_workspaces_period_input: models::IamPeriodWorkspacesPeriodInput) -> Result<models::IamPeriodWorkspace, Error<PutIamWorkspacesByOwnerByNameError>> {
6197 let p_owner = owner;
6199 let p_name = name;
6200 let p_iam_period_workspaces_period_input = iam_period_workspaces_period_input;
6201
6202 let uri_str = format!("{}/v1/iam/workspaces/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6203 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6204
6205 if let Some(ref user_agent) = configuration.user_agent {
6206 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6207 }
6208 if let Some(ref token) = configuration.bearer_access_token {
6209 req_builder = req_builder.bearer_auth(token.to_owned());
6210 };
6211 req_builder = req_builder.json(&p_iam_period_workspaces_period_input);
6212
6213 let req = req_builder.build()?;
6214 let resp = configuration.client.execute(req).await?;
6215
6216 let status = resp.status();
6217 let content_type = resp
6218 .headers()
6219 .get("content-type")
6220 .and_then(|v| v.to_str().ok())
6221 .unwrap_or("application/octet-stream");
6222 let content_type = super::ContentType::from(content_type);
6223
6224 if !status.is_client_error() && !status.is_server_error() {
6225 let content = resp.text().await?;
6226 match content_type {
6227 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6228 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodWorkspace`"))),
6229 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::IamPeriodWorkspace`")))),
6230 }
6231 } else {
6232 let content = resp.text().await?;
6233 let entity: Option<PutIamWorkspacesByOwnerByNameError> = serde_json::from_str(&content).ok();
6234 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6235 }
6236}
6237
6238pub async fn set_organization_avatar(configuration: &configuration::Configuration, iam_period_set_avatar_input: models::IamPeriodSetAvatarInput) -> Result<models::IamPeriodOrganization, Error<SetOrganizationAvatarError>> {
6240 let p_iam_period_set_avatar_input = iam_period_set_avatar_input;
6242
6243 let uri_str = format!("{}/v1/iam/organizations/avatar", configuration.base_path);
6244 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
6245
6246 if let Some(ref user_agent) = configuration.user_agent {
6247 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6248 }
6249 if let Some(ref token) = configuration.bearer_access_token {
6250 req_builder = req_builder.bearer_auth(token.to_owned());
6251 };
6252 req_builder = req_builder.json(&p_iam_period_set_avatar_input);
6253
6254 let req = req_builder.build()?;
6255 let resp = configuration.client.execute(req).await?;
6256
6257 let status = resp.status();
6258 let content_type = resp
6259 .headers()
6260 .get("content-type")
6261 .and_then(|v| v.to_str().ok())
6262 .unwrap_or("application/octet-stream");
6263 let content_type = super::ContentType::from(content_type);
6264
6265 if !status.is_client_error() && !status.is_server_error() {
6266 let content = resp.text().await?;
6267 match content_type {
6268 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6269 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodOrganization`"))),
6270 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::IamPeriodOrganization`")))),
6271 }
6272 } else {
6273 let content = resp.text().await?;
6274 let entity: Option<SetOrganizationAvatarError> = serde_json::from_str(&content).ok();
6275 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6276 }
6277}
6278
6279pub async fn update_organization(configuration: &configuration::Configuration, owner: &str, name: &str, iam_period_update_organization_input: models::IamPeriodUpdateOrganizationInput) -> Result<models::IamPeriodOrganization, Error<UpdateOrganizationError>> {
6281 let p_owner = owner;
6283 let p_name = name;
6284 let p_iam_period_update_organization_input = iam_period_update_organization_input;
6285
6286 let uri_str = format!("{}/v1/iam/organizations/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6287 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6288
6289 if let Some(ref user_agent) = configuration.user_agent {
6290 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6291 }
6292 if let Some(ref token) = configuration.bearer_access_token {
6293 req_builder = req_builder.bearer_auth(token.to_owned());
6294 };
6295 req_builder = req_builder.json(&p_iam_period_update_organization_input);
6296
6297 let req = req_builder.build()?;
6298 let resp = configuration.client.execute(req).await?;
6299
6300 let status = resp.status();
6301 let content_type = resp
6302 .headers()
6303 .get("content-type")
6304 .and_then(|v| v.to_str().ok())
6305 .unwrap_or("application/octet-stream");
6306 let content_type = super::ContentType::from(content_type);
6307
6308 if !status.is_client_error() && !status.is_server_error() {
6309 let content = resp.text().await?;
6310 match content_type {
6311 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6312 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodOrganization`"))),
6313 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::IamPeriodOrganization`")))),
6314 }
6315 } else {
6316 let content = resp.text().await?;
6317 let entity: Option<UpdateOrganizationError> = serde_json::from_str(&content).ok();
6318 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6319 }
6320}
6321
6322pub async fn update_provider(configuration: &configuration::Configuration, owner: &str, name: &str, iam_period_provider: models::IamPeriodProvider) -> Result<models::IamPeriodMutationResult, Error<UpdateProviderError>> {
6324 let p_owner = owner;
6326 let p_name = name;
6327 let p_iam_period_provider = iam_period_provider;
6328
6329 let uri_str = format!("{}/v1/iam/providers/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6330 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6331
6332 if let Some(ref user_agent) = configuration.user_agent {
6333 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6334 }
6335 if let Some(ref token) = configuration.bearer_access_token {
6336 req_builder = req_builder.bearer_auth(token.to_owned());
6337 };
6338 req_builder = req_builder.json(&p_iam_period_provider);
6339
6340 let req = req_builder.build()?;
6341 let resp = configuration.client.execute(req).await?;
6342
6343 let status = resp.status();
6344 let content_type = resp
6345 .headers()
6346 .get("content-type")
6347 .and_then(|v| v.to_str().ok())
6348 .unwrap_or("application/octet-stream");
6349 let content_type = super::ContentType::from(content_type);
6350
6351 if !status.is_client_error() && !status.is_server_error() {
6352 let content = resp.text().await?;
6353 match content_type {
6354 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6355 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodMutationResult`"))),
6356 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::IamPeriodMutationResult`")))),
6357 }
6358 } else {
6359 let content = resp.text().await?;
6360 let entity: Option<UpdateProviderError> = serde_json::from_str(&content).ok();
6361 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6362 }
6363}
6364
6365pub async fn update_session(configuration: &configuration::Configuration, owner: &str, name: &str, application: &str, iam_period_update_session_in: models::IamPeriodUpdateSessionIn) -> Result<models::IamPeriodSession, Error<UpdateSessionError>> {
6367 let p_owner = owner;
6369 let p_name = name;
6370 let p_application = application;
6371 let p_iam_period_update_session_in = iam_period_update_session_in;
6372
6373 let uri_str = format!("{}/v1/iam/sessions/{owner}/{name}/{application}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name), application=crate::apis::urlencode(p_application));
6374 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6375
6376 if let Some(ref user_agent) = configuration.user_agent {
6377 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6378 }
6379 if let Some(ref token) = configuration.bearer_access_token {
6380 req_builder = req_builder.bearer_auth(token.to_owned());
6381 };
6382 req_builder = req_builder.json(&p_iam_period_update_session_in);
6383
6384 let req = req_builder.build()?;
6385 let resp = configuration.client.execute(req).await?;
6386
6387 let status = resp.status();
6388 let content_type = resp
6389 .headers()
6390 .get("content-type")
6391 .and_then(|v| v.to_str().ok())
6392 .unwrap_or("application/octet-stream");
6393 let content_type = super::ContentType::from(content_type);
6394
6395 if !status.is_client_error() && !status.is_server_error() {
6396 let content = resp.text().await?;
6397 match content_type {
6398 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6399 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodSession`"))),
6400 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::IamPeriodSession`")))),
6401 }
6402 } else {
6403 let content = resp.text().await?;
6404 let entity: Option<UpdateSessionError> = serde_json::from_str(&content).ok();
6405 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6406 }
6407}
6408
6409pub async fn update_token(configuration: &configuration::Configuration, owner: &str, name: &str, iam_period_token: models::IamPeriodToken) -> Result<models::IamPeriodTokenMutation, Error<UpdateTokenError>> {
6411 let p_owner = owner;
6413 let p_name = name;
6414 let p_iam_period_token = iam_period_token;
6415
6416 let uri_str = format!("{}/v1/iam/tokens/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6417 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6418
6419 if let Some(ref user_agent) = configuration.user_agent {
6420 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6421 }
6422 if let Some(ref token) = configuration.bearer_access_token {
6423 req_builder = req_builder.bearer_auth(token.to_owned());
6424 };
6425 req_builder = req_builder.json(&p_iam_period_token);
6426
6427 let req = req_builder.build()?;
6428 let resp = configuration.client.execute(req).await?;
6429
6430 let status = resp.status();
6431 let content_type = resp
6432 .headers()
6433 .get("content-type")
6434 .and_then(|v| v.to_str().ok())
6435 .unwrap_or("application/octet-stream");
6436 let content_type = super::ContentType::from(content_type);
6437
6438 if !status.is_client_error() && !status.is_server_error() {
6439 let content = resp.text().await?;
6440 match content_type {
6441 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6442 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodTokenMutation`"))),
6443 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::IamPeriodTokenMutation`")))),
6444 }
6445 } else {
6446 let content = resp.text().await?;
6447 let entity: Option<UpdateTokenError> = serde_json::from_str(&content).ok();
6448 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6449 }
6450}
6451
6452pub async fn update_webauthn_credential(configuration: &configuration::Configuration, owner: &str, name: &str, iam_period_webauthn_credential: models::IamPeriodWebauthnCredential) -> Result<models::IamPeriodWebauthnCredentialMutationResult, Error<UpdateWebauthnCredentialError>> {
6454 let p_owner = owner;
6456 let p_name = name;
6457 let p_iam_period_webauthn_credential = iam_period_webauthn_credential;
6458
6459 let uri_str = format!("{}/v1/iam/webauthn-credentials/{owner}/{name}", configuration.base_path, owner=crate::apis::urlencode(p_owner), name=crate::apis::urlencode(p_name));
6460 let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str);
6461
6462 if let Some(ref user_agent) = configuration.user_agent {
6463 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6464 }
6465 if let Some(ref token) = configuration.bearer_access_token {
6466 req_builder = req_builder.bearer_auth(token.to_owned());
6467 };
6468 req_builder = req_builder.json(&p_iam_period_webauthn_credential);
6469
6470 let req = req_builder.build()?;
6471 let resp = configuration.client.execute(req).await?;
6472
6473 let status = resp.status();
6474 let content_type = resp
6475 .headers()
6476 .get("content-type")
6477 .and_then(|v| v.to_str().ok())
6478 .unwrap_or("application/octet-stream");
6479 let content_type = super::ContentType::from(content_type);
6480
6481 if !status.is_client_error() && !status.is_server_error() {
6482 let content = resp.text().await?;
6483 match content_type {
6484 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6485 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodWebauthnCredentialMutationResult`"))),
6486 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::IamPeriodWebauthnCredentialMutationResult`")))),
6487 }
6488 } else {
6489 let content = resp.text().await?;
6490 let entity: Option<UpdateWebauthnCredentialError> = serde_json::from_str(&content).ok();
6491 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6492 }
6493}
6494
6495pub async fn upsert_application(configuration: &configuration::Configuration, iam_period_registration: models::IamPeriodRegistration, authorization: Option<&str>) -> Result<models::IamPeriodReply, Error<UpsertApplicationError>> {
6497 let p_iam_period_registration = iam_period_registration;
6499 let p_authorization = authorization;
6500
6501 let uri_str = format!("{}/v1/iam/admin/applications/upsert", configuration.base_path);
6502 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
6503
6504 if let Some(ref user_agent) = configuration.user_agent {
6505 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6506 }
6507 if let Some(param_value) = p_authorization {
6508 req_builder = req_builder.header("Authorization", param_value.to_string());
6509 }
6510 if let Some(ref token) = configuration.bearer_access_token {
6511 req_builder = req_builder.bearer_auth(token.to_owned());
6512 };
6513 req_builder = req_builder.json(&p_iam_period_registration);
6514
6515 let req = req_builder.build()?;
6516 let resp = configuration.client.execute(req).await?;
6517
6518 let status = resp.status();
6519 let content_type = resp
6520 .headers()
6521 .get("content-type")
6522 .and_then(|v| v.to_str().ok())
6523 .unwrap_or("application/octet-stream");
6524 let content_type = super::ContentType::from(content_type);
6525
6526 if !status.is_client_error() && !status.is_server_error() {
6527 let content = resp.text().await?;
6528 match content_type {
6529 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6530 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodReply`"))),
6531 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::IamPeriodReply`")))),
6532 }
6533 } else {
6534 let content = resp.text().await?;
6535 let entity: Option<UpsertApplicationError> = serde_json::from_str(&content).ok();
6536 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6537 }
6538}
6539
6540pub async fn upsert_user(configuration: &configuration::Configuration, iam_period_person: models::IamPeriodPerson, authorization: Option<&str>) -> Result<models::IamPeriodReply, Error<UpsertUserError>> {
6542 let p_iam_period_person = iam_period_person;
6544 let p_authorization = authorization;
6545
6546 let uri_str = format!("{}/v1/iam/admin/users/upsert", configuration.base_path);
6547 let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str);
6548
6549 if let Some(ref user_agent) = configuration.user_agent {
6550 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
6551 }
6552 if let Some(param_value) = p_authorization {
6553 req_builder = req_builder.header("Authorization", param_value.to_string());
6554 }
6555 if let Some(ref token) = configuration.bearer_access_token {
6556 req_builder = req_builder.bearer_auth(token.to_owned());
6557 };
6558 req_builder = req_builder.json(&p_iam_period_person);
6559
6560 let req = req_builder.build()?;
6561 let resp = configuration.client.execute(req).await?;
6562
6563 let status = resp.status();
6564 let content_type = resp
6565 .headers()
6566 .get("content-type")
6567 .and_then(|v| v.to_str().ok())
6568 .unwrap_or("application/octet-stream");
6569 let content_type = super::ContentType::from(content_type);
6570
6571 if !status.is_client_error() && !status.is_server_error() {
6572 let content = resp.text().await?;
6573 match content_type {
6574 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
6575 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IamPeriodReply`"))),
6576 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::IamPeriodReply`")))),
6577 }
6578 } else {
6579 let content = resp.text().await?;
6580 let entity: Option<UpsertUserError> = serde_json::from_str(&content).ok();
6581 Err(Error::ResponseError(ResponseContent { status, content, entity }))
6582 }
6583}
6584