1use reqwest;
13use serde::{Deserialize, Serialize};
14use crate::{apis::ResponseContent, models};
15use super::{Error, configuration};
16
17
18#[derive(Debug, Clone, Serialize, Deserialize)]
20#[serde(untagged)]
21pub enum AddUserError {
22 UnknownValue(serde_json::Value),
23}
24
25#[derive(Debug, Clone, Serialize, Deserialize)]
27#[serde(untagged)]
28pub enum ArchiveWorkspaceError {
29 UnknownValue(serde_json::Value),
30}
31
32#[derive(Debug, Clone, Serialize, Deserialize)]
34#[serde(untagged)]
35pub enum AttachDevWorkspaceError {
36 UnknownValue(serde_json::Value),
37}
38
39#[derive(Debug, Clone, Serialize, Deserialize)]
41#[serde(untagged)]
42pub enum CancelDeploymentRequestError {
43 UnknownValue(serde_json::Value),
44}
45
46#[derive(Debug, Clone, Serialize, Deserialize)]
48#[serde(untagged)]
49pub enum ChangeWorkspaceColorError {
50 UnknownValue(serde_json::Value),
51}
52
53#[derive(Debug, Clone, Serialize, Deserialize)]
55#[serde(untagged)]
56pub enum ChangeWorkspaceIdError {
57 UnknownValue(serde_json::Value),
58}
59
60#[derive(Debug, Clone, Serialize, Deserialize)]
62#[serde(untagged)]
63pub enum ChangeWorkspaceNameError {
64 UnknownValue(serde_json::Value),
65}
66
67#[derive(Debug, Clone, Serialize, Deserialize)]
69#[serde(untagged)]
70pub enum CloseDeploymentRequestMergedError {
71 UnknownValue(serde_json::Value),
72}
73
74#[derive(Debug, Clone, Serialize, Deserialize)]
76#[serde(untagged)]
77pub enum CompareWorkspacesError {
78 UnknownValue(serde_json::Value),
79}
80
81#[derive(Debug, Clone, Serialize, Deserialize)]
83#[serde(untagged)]
84pub enum ConnectSlackError {
85 UnknownValue(serde_json::Value),
86}
87
88#[derive(Debug, Clone, Serialize, Deserialize)]
90#[serde(untagged)]
91pub enum ConnectTeamsError {
92 UnknownValue(serde_json::Value),
93}
94
95#[derive(Debug, Clone, Serialize, Deserialize)]
97#[serde(untagged)]
98pub enum CreateDatatableMigrationError {
99 UnknownValue(serde_json::Value),
100}
101
102#[derive(Debug, Clone, Serialize, Deserialize)]
104#[serde(untagged)]
105pub enum CreateDeploymentRequestError {
106 Status400(),
107 Status409(),
108 UnknownValue(serde_json::Value),
109}
110
111#[derive(Debug, Clone, Serialize, Deserialize)]
113#[serde(untagged)]
114pub enum CreateDeploymentRequestCommentError {
115 Status400(),
116 UnknownValue(serde_json::Value),
117}
118
119#[derive(Debug, Clone, Serialize, Deserialize)]
121#[serde(untagged)]
122pub enum CreatePgDatabaseError {
123 UnknownValue(serde_json::Value),
124}
125
126#[derive(Debug, Clone, Serialize, Deserialize)]
128#[serde(untagged)]
129pub enum CreateProtectionRuleError {
130 Status400(),
131 UnknownValue(serde_json::Value),
132}
133
134#[derive(Debug, Clone, Serialize, Deserialize)]
136#[serde(untagged)]
137pub enum CreateServiceAccountError {
138 UnknownValue(serde_json::Value),
139}
140
141#[derive(Debug, Clone, Serialize, Deserialize)]
143#[serde(untagged)]
144pub enum CreateWorkspaceError {
145 UnknownValue(serde_json::Value),
146}
147
148#[derive(Debug, Clone, Serialize, Deserialize)]
150#[serde(untagged)]
151pub enum CreateWorkspaceForkError {
152 UnknownValue(serde_json::Value),
153}
154
155#[derive(Debug, Clone, Serialize, Deserialize)]
157#[serde(untagged)]
158pub enum CreateWorkspaceForkGitBranchError {
159 UnknownValue(serde_json::Value),
160}
161
162#[derive(Debug, Clone, Serialize, Deserialize)]
164#[serde(untagged)]
165pub enum DeleteDatatableMigrationError {
166 UnknownValue(serde_json::Value),
167}
168
169#[derive(Debug, Clone, Serialize, Deserialize)]
171#[serde(untagged)]
172pub enum DeleteGitSyncRepositoryError {
173 UnknownValue(serde_json::Value),
174}
175
176#[derive(Debug, Clone, Serialize, Deserialize)]
178#[serde(untagged)]
179pub enum DeleteInviteError {
180 UnknownValue(serde_json::Value),
181}
182
183#[derive(Debug, Clone, Serialize, Deserialize)]
185#[serde(untagged)]
186pub enum DeleteProtectionRuleError {
187 Status404(),
188 UnknownValue(serde_json::Value),
189}
190
191#[derive(Debug, Clone, Serialize, Deserialize)]
193#[serde(untagged)]
194pub enum DeleteWorkspaceError {
195 UnknownValue(serde_json::Value),
196}
197
198#[derive(Debug, Clone, Serialize, Deserialize)]
200#[serde(untagged)]
201pub enum DeleteWorkspaceSlackOauthConfigError {
202 UnknownValue(serde_json::Value),
203}
204
205#[derive(Debug, Clone, Serialize, Deserialize)]
207#[serde(untagged)]
208pub enum DetachDevWorkspaceError {
209 UnknownValue(serde_json::Value),
210}
211
212#[derive(Debug, Clone, Serialize, Deserialize)]
214#[serde(untagged)]
215pub enum DisableDatatableMigrationsError {
216 UnknownValue(serde_json::Value),
217}
218
219#[derive(Debug, Clone, Serialize, Deserialize)]
221#[serde(untagged)]
222pub enum DropForkedDatatableDatabasesError {
223 UnknownValue(serde_json::Value),
224}
225
226#[derive(Debug, Clone, Serialize, Deserialize)]
228#[serde(untagged)]
229pub enum DropForkedDucklakeNamespacesError {
230 UnknownValue(serde_json::Value),
231}
232
233#[derive(Debug, Clone, Serialize, Deserialize)]
235#[serde(untagged)]
236pub enum EditAutoInviteError {
237 UnknownValue(serde_json::Value),
238}
239
240#[derive(Debug, Clone, Serialize, Deserialize)]
242#[serde(untagged)]
243pub enum EditCopilotConfigError {
244 UnknownValue(serde_json::Value),
245}
246
247#[derive(Debug, Clone, Serialize, Deserialize)]
249#[serde(untagged)]
250pub enum EditDataTableConfigError {
251 UnknownValue(serde_json::Value),
252}
253
254#[derive(Debug, Clone, Serialize, Deserialize)]
256#[serde(untagged)]
257pub enum EditDbtWarehousesError {
258 UnknownValue(serde_json::Value),
259}
260
261#[derive(Debug, Clone, Serialize, Deserialize)]
263#[serde(untagged)]
264pub enum EditDefaultScriptsError {
265 UnknownValue(serde_json::Value),
266}
267
268#[derive(Debug, Clone, Serialize, Deserialize)]
270#[serde(untagged)]
271pub enum EditDucklakeConfigError {
272 UnknownValue(serde_json::Value),
273}
274
275#[derive(Debug, Clone, Serialize, Deserialize)]
277#[serde(untagged)]
278pub enum EditErrorHandlerError {
279 UnknownValue(serde_json::Value),
280}
281
282#[derive(Debug, Clone, Serialize, Deserialize)]
284#[serde(untagged)]
285pub enum EditGitSyncRepositoryError {
286 UnknownValue(serde_json::Value),
287}
288
289#[derive(Debug, Clone, Serialize, Deserialize)]
291#[serde(untagged)]
292pub enum EditGuestAccessError {
293 UnknownValue(serde_json::Value),
294}
295
296#[derive(Debug, Clone, Serialize, Deserialize)]
298#[serde(untagged)]
299pub enum EditGuestJwtKeyError {
300 UnknownValue(serde_json::Value),
301}
302
303#[derive(Debug, Clone, Serialize, Deserialize)]
305#[serde(untagged)]
306pub enum EditInstanceGroupsError {
307 UnknownValue(serde_json::Value),
308}
309
310#[derive(Debug, Clone, Serialize, Deserialize)]
312#[serde(untagged)]
313pub enum EditLargeFileStorageConfigError {
314 UnknownValue(serde_json::Value),
315}
316
317#[derive(Debug, Clone, Serialize, Deserialize)]
319#[serde(untagged)]
320pub enum EditSlackCommandError {
321 UnknownValue(serde_json::Value),
322}
323
324#[derive(Debug, Clone, Serialize, Deserialize)]
326#[serde(untagged)]
327pub enum EditSuccessHandlerError {
328 UnknownValue(serde_json::Value),
329}
330
331#[derive(Debug, Clone, Serialize, Deserialize)]
333#[serde(untagged)]
334pub enum EditTeamsCommandError {
335 UnknownValue(serde_json::Value),
336}
337
338#[derive(Debug, Clone, Serialize, Deserialize)]
340#[serde(untagged)]
341pub enum EditWebhookError {
342 UnknownValue(serde_json::Value),
343}
344
345#[derive(Debug, Clone, Serialize, Deserialize)]
347#[serde(untagged)]
348pub enum EditWorkspaceDefaultAppError {
349 UnknownValue(serde_json::Value),
350}
351
352#[derive(Debug, Clone, Serialize, Deserialize)]
354#[serde(untagged)]
355pub enum EditWorkspaceDeployUiSettingsError {
356 UnknownValue(serde_json::Value),
357}
358
359#[derive(Debug, Clone, Serialize, Deserialize)]
361#[serde(untagged)]
362pub enum EditWorkspaceGitSyncConfigError {
363 UnknownValue(serde_json::Value),
364}
365
366#[derive(Debug, Clone, Serialize, Deserialize)]
368#[serde(untagged)]
369pub enum EnableDatatableMigrationsError {
370 UnknownValue(serde_json::Value),
371}
372
373#[derive(Debug, Clone, Serialize, Deserialize)]
375#[serde(untagged)]
376pub enum ExistsUsernameError {
377 UnknownValue(serde_json::Value),
378}
379
380#[derive(Debug, Clone, Serialize, Deserialize)]
382#[serde(untagged)]
383pub enum ExistsWorkspaceError {
384 UnknownValue(serde_json::Value),
385}
386
387#[derive(Debug, Clone, Serialize, Deserialize)]
389#[serde(untagged)]
390pub enum ExportPgSchemaError {
391 UnknownValue(serde_json::Value),
392}
393
394#[derive(Debug, Clone, Serialize, Deserialize)]
396#[serde(untagged)]
397pub enum GenerateInitialDatatableMigrationError {
398 UnknownValue(serde_json::Value),
399}
400
401#[derive(Debug, Clone, Serialize, Deserialize)]
403#[serde(untagged)]
404pub enum GetBillableSeatsError {
405 UnknownValue(serde_json::Value),
406}
407
408#[derive(Debug, Clone, Serialize, Deserialize)]
410#[serde(untagged)]
411pub enum GetCloudQuotasError {
412 UnknownValue(serde_json::Value),
413}
414
415#[derive(Debug, Clone, Serialize, Deserialize)]
417#[serde(untagged)]
418pub enum GetCopilotInfoError {
419 UnknownValue(serde_json::Value),
420}
421
422#[derive(Debug, Clone, Serialize, Deserialize)]
424#[serde(untagged)]
425pub enum GetCopilotSettingsStateError {
426 UnknownValue(serde_json::Value),
427}
428
429#[derive(Debug, Clone, Serialize, Deserialize)]
431#[serde(untagged)]
432pub enum GetDataTableTableSchemaError {
433 UnknownValue(serde_json::Value),
434}
435
436#[derive(Debug, Clone, Serialize, Deserialize)]
438#[serde(untagged)]
439pub enum GetDatatableFullSchemaError {
440 UnknownValue(serde_json::Value),
441}
442
443#[derive(Debug, Clone, Serialize, Deserialize)]
445#[serde(untagged)]
446pub enum GetDatatableMigrationsStatusError {
447 UnknownValue(serde_json::Value),
448}
449
450#[derive(Debug, Clone, Serialize, Deserialize)]
452#[serde(untagged)]
453pub enum GetDefaultScriptsError {
454 UnknownValue(serde_json::Value),
455}
456
457#[derive(Debug, Clone, Serialize, Deserialize)]
459#[serde(untagged)]
460pub enum GetDependencyMapError {
461 UnknownValue(serde_json::Value),
462}
463
464#[derive(Debug, Clone, Serialize, Deserialize)]
466#[serde(untagged)]
467pub enum GetDependentsError {
468 UnknownValue(serde_json::Value),
469}
470
471#[derive(Debug, Clone, Serialize, Deserialize)]
473#[serde(untagged)]
474pub enum GetDependentsAmountsError {
475 UnknownValue(serde_json::Value),
476}
477
478#[derive(Debug, Clone, Serialize, Deserialize)]
480#[serde(untagged)]
481pub enum GetDeployToError {
482 UnknownValue(serde_json::Value),
483}
484
485#[derive(Debug, Clone, Serialize, Deserialize)]
487#[serde(untagged)]
488pub enum GetDevWorkspaceError {
489 UnknownValue(serde_json::Value),
490}
491
492#[derive(Debug, Clone, Serialize, Deserialize)]
494#[serde(untagged)]
495pub enum GetGitSyncDeployModeError {
496 UnknownValue(serde_json::Value),
497}
498
499#[derive(Debug, Clone, Serialize, Deserialize)]
501#[serde(untagged)]
502pub enum GetGitSyncEnabledError {
503 UnknownValue(serde_json::Value),
504}
505
506#[derive(Debug, Clone, Serialize, Deserialize)]
508#[serde(untagged)]
509pub enum GetGithubAppRepoArchiveError {
510 UnknownValue(serde_json::Value),
511}
512
513#[derive(Debug, Clone, Serialize, Deserialize)]
515#[serde(untagged)]
516pub enum GetGithubAppTokenError {
517 UnknownValue(serde_json::Value),
518}
519
520#[derive(Debug, Clone, Serialize, Deserialize)]
522#[serde(untagged)]
523pub enum GetGuestUsageError {
524 UnknownValue(serde_json::Value),
525}
526
527#[derive(Debug, Clone, Serialize, Deserialize)]
529#[serde(untagged)]
530pub enum GetImportsError {
531 UnknownValue(serde_json::Value),
532}
533
534#[derive(Debug, Clone, Serialize, Deserialize)]
536#[serde(untagged)]
537pub enum GetIsPremiumError {
538 UnknownValue(serde_json::Value),
539}
540
541#[derive(Debug, Clone, Serialize, Deserialize)]
543#[serde(untagged)]
544pub enum GetOpenDeploymentRequestError {
545 UnknownValue(serde_json::Value),
546}
547
548#[derive(Debug, Clone, Serialize, Deserialize)]
550#[serde(untagged)]
551pub enum GetPremiumInfoError {
552 UnknownValue(serde_json::Value),
553}
554
555#[derive(Debug, Clone, Serialize, Deserialize)]
557#[serde(untagged)]
558pub enum GetPublicSettingsError {
559 UnknownValue(serde_json::Value),
560}
561
562#[derive(Debug, Clone, Serialize, Deserialize)]
564#[serde(untagged)]
565pub enum GetSessionWorkspaceStatusError {
566 UnknownValue(serde_json::Value),
567}
568
569#[derive(Debug, Clone, Serialize, Deserialize)]
571#[serde(untagged)]
572pub enum GetSettingsError {
573 UnknownValue(serde_json::Value),
574}
575
576#[derive(Debug, Clone, Serialize, Deserialize)]
578#[serde(untagged)]
579pub enum GetSharedUiError {
580 UnknownValue(serde_json::Value),
581}
582
583#[derive(Debug, Clone, Serialize, Deserialize)]
585#[serde(untagged)]
586pub enum GetSharedUiVersionError {
587 UnknownValue(serde_json::Value),
588}
589
590#[derive(Debug, Clone, Serialize, Deserialize)]
592#[serde(untagged)]
593pub enum GetThresholdAlertError {
594 UnknownValue(serde_json::Value),
595}
596
597#[derive(Debug, Clone, Serialize, Deserialize)]
599#[serde(untagged)]
600pub enum GetUsedTriggersError {
601 UnknownValue(serde_json::Value),
602}
603
604#[derive(Debug, Clone, Serialize, Deserialize)]
606#[serde(untagged)]
607pub enum GetWorkspaceAsSuperAdminError {
608 UnknownValue(serde_json::Value),
609}
610
611#[derive(Debug, Clone, Serialize, Deserialize)]
613#[serde(untagged)]
614pub enum GetWorkspaceDefaultAppError {
615 UnknownValue(serde_json::Value),
616}
617
618#[derive(Debug, Clone, Serialize, Deserialize)]
620#[serde(untagged)]
621pub enum GetWorkspaceEncryptionKeyError {
622 UnknownValue(serde_json::Value),
623}
624
625#[derive(Debug, Clone, Serialize, Deserialize)]
627#[serde(untagged)]
628pub enum GetWorkspaceNameError {
629 UnknownValue(serde_json::Value),
630}
631
632#[derive(Debug, Clone, Serialize, Deserialize)]
634#[serde(untagged)]
635pub enum GetWorkspaceSlackOauthConfigError {
636 UnknownValue(serde_json::Value),
637}
638
639#[derive(Debug, Clone, Serialize, Deserialize)]
641#[serde(untagged)]
642pub enum GetWorkspaceUsageError {
643 UnknownValue(serde_json::Value),
644}
645
646#[derive(Debug, Clone, Serialize, Deserialize)]
648#[serde(untagged)]
649pub enum ImportPgDatabaseError {
650 UnknownValue(serde_json::Value),
651}
652
653#[derive(Debug, Clone, Serialize, Deserialize)]
655#[serde(untagged)]
656pub enum InviteUserError {
657 UnknownValue(serde_json::Value),
658}
659
660#[derive(Debug, Clone, Serialize, Deserialize)]
662#[serde(untagged)]
663pub enum IsDomainAllowedError {
664 UnknownValue(serde_json::Value),
665}
666
667#[derive(Debug, Clone, Serialize, Deserialize)]
669#[serde(untagged)]
670pub enum LeaveWorkspaceError {
671 UnknownValue(serde_json::Value),
672}
673
674#[derive(Debug, Clone, Serialize, Deserialize)]
676#[serde(untagged)]
677pub enum ListAvailableTeamsChannelsError {
678 UnknownValue(serde_json::Value),
679}
680
681#[derive(Debug, Clone, Serialize, Deserialize)]
683#[serde(untagged)]
684pub enum ListAvailableTeamsIdsError {
685 UnknownValue(serde_json::Value),
686}
687
688#[derive(Debug, Clone, Serialize, Deserialize)]
690#[serde(untagged)]
691pub enum ListDataTableSchemasError {
692 UnknownValue(serde_json::Value),
693}
694
695#[derive(Debug, Clone, Serialize, Deserialize)]
697#[serde(untagged)]
698pub enum ListDataTableTablesError {
699 UnknownValue(serde_json::Value),
700}
701
702#[derive(Debug, Clone, Serialize, Deserialize)]
704#[serde(untagged)]
705pub enum ListDataTablesError {
706 UnknownValue(serde_json::Value),
707}
708
709#[derive(Debug, Clone, Serialize, Deserialize)]
711#[serde(untagged)]
712pub enum ListDatatableMigrationsError {
713 UnknownValue(serde_json::Value),
714}
715
716#[derive(Debug, Clone, Serialize, Deserialize)]
718#[serde(untagged)]
719pub enum ListDeploymentRequestEligibleDeployersError {
720 UnknownValue(serde_json::Value),
721}
722
723#[derive(Debug, Clone, Serialize, Deserialize)]
725#[serde(untagged)]
726pub enum ListDucklakesError {
727 UnknownValue(serde_json::Value),
728}
729
730#[derive(Debug, Clone, Serialize, Deserialize)]
732#[serde(untagged)]
733pub enum ListPendingInvitesError {
734 UnknownValue(serde_json::Value),
735}
736
737#[derive(Debug, Clone, Serialize, Deserialize)]
739#[serde(untagged)]
740pub enum ListProtectionRulesError {
741 UnknownValue(serde_json::Value),
742}
743
744#[derive(Debug, Clone, Serialize, Deserialize)]
746#[serde(untagged)]
747pub enum ListSharedUiError {
748 UnknownValue(serde_json::Value),
749}
750
751#[derive(Debug, Clone, Serialize, Deserialize)]
753#[serde(untagged)]
754pub enum ListUserWorkspacesError {
755 UnknownValue(serde_json::Value),
756}
757
758#[derive(Debug, Clone, Serialize, Deserialize)]
760#[serde(untagged)]
761pub enum ListWorkspacesError {
762 UnknownValue(serde_json::Value),
763}
764
765#[derive(Debug, Clone, Serialize, Deserialize)]
767#[serde(untagged)]
768pub enum ListWorkspacesAsSuperAdminError {
769 UnknownValue(serde_json::Value),
770}
771
772#[derive(Debug, Clone, Serialize, Deserialize)]
774#[serde(untagged)]
775pub enum ListWsSpecificError {
776 UnknownValue(serde_json::Value),
777}
778
779#[derive(Debug, Clone, Serialize, Deserialize)]
781#[serde(untagged)]
782pub enum ListWsSpecificVersionsError {
783 UnknownValue(serde_json::Value),
784}
785
786#[derive(Debug, Clone, Serialize, Deserialize)]
788#[serde(untagged)]
789pub enum LogFeatureUsageError {
790 UnknownValue(serde_json::Value),
791}
792
793#[derive(Debug, Clone, Serialize, Deserialize)]
795#[serde(untagged)]
796pub enum PruneVersionsError {
797 UnknownValue(serde_json::Value),
798}
799
800#[derive(Debug, Clone, Serialize, Deserialize)]
802#[serde(untagged)]
803pub enum RebuildDependencyMapError {
804 UnknownValue(serde_json::Value),
805}
806
807#[derive(Debug, Clone, Serialize, Deserialize)]
809#[serde(untagged)]
810pub enum ResetDiffTallyError {
811 UnknownValue(serde_json::Value),
812}
813
814#[derive(Debug, Clone, Serialize, Deserialize)]
816#[serde(untagged)]
817pub enum RollbackDatatableMigrationsError {
818 UnknownValue(serde_json::Value),
819}
820
821#[derive(Debug, Clone, Serialize, Deserialize)]
823#[serde(untagged)]
824pub enum RunDatatableMigrationsError {
825 UnknownValue(serde_json::Value),
826}
827
828#[derive(Debug, Clone, Serialize, Deserialize)]
830#[serde(untagged)]
831pub enum RunSlackMessageTestJobError {
832 UnknownValue(serde_json::Value),
833}
834
835#[derive(Debug, Clone, Serialize, Deserialize)]
837#[serde(untagged)]
838pub enum RunTeamsMessageTestJobError {
839 UnknownValue(serde_json::Value),
840}
841
842#[derive(Debug, Clone, Serialize, Deserialize)]
844#[serde(untagged)]
845pub enum SeedFullDiffScanError {
846 UnknownValue(serde_json::Value),
847}
848
849#[derive(Debug, Clone, Serialize, Deserialize)]
851#[serde(untagged)]
852pub enum SetEnvironmentVariableError {
853 UnknownValue(serde_json::Value),
854}
855
856#[derive(Debug, Clone, Serialize, Deserialize)]
858#[serde(untagged)]
859pub enum SetThresholdAlertError {
860 UnknownValue(serde_json::Value),
861}
862
863#[derive(Debug, Clone, Serialize, Deserialize)]
865#[serde(untagged)]
866pub enum SetWorkspaceEncryptionKeyError {
867 UnknownValue(serde_json::Value),
868}
869
870#[derive(Debug, Clone, Serialize, Deserialize)]
872#[serde(untagged)]
873pub enum SetWorkspaceSlackOauthConfigError {
874 UnknownValue(serde_json::Value),
875}
876
877#[derive(Debug, Clone, Serialize, Deserialize)]
879#[serde(untagged)]
880pub enum SetWsSpecificError {
881 UnknownValue(serde_json::Value),
882}
883
884#[derive(Debug, Clone, Serialize, Deserialize)]
886#[serde(untagged)]
887pub enum TestDataTableConnectionError {
888 UnknownValue(serde_json::Value),
889}
890
891#[derive(Debug, Clone, Serialize, Deserialize)]
893#[serde(untagged)]
894pub enum UnarchiveWorkspaceError {
895 UnknownValue(serde_json::Value),
896}
897
898#[derive(Debug, Clone, Serialize, Deserialize)]
900#[serde(untagged)]
901pub enum UpdateOperatorSettingsError {
902 UnknownValue(serde_json::Value),
903}
904
905#[derive(Debug, Clone, Serialize, Deserialize)]
907#[serde(untagged)]
908pub enum UpdateProtectionRuleError {
909 Status404(),
910 UnknownValue(serde_json::Value),
911}
912
913#[derive(Debug, Clone, Serialize, Deserialize)]
915#[serde(untagged)]
916pub enum UpdateSharedUiError {
917 UnknownValue(serde_json::Value),
918}
919
920#[derive(Debug, Clone, Serialize, Deserialize)]
922#[serde(untagged)]
923pub enum UpsertDatatableMigrationError {
924 UnknownValue(serde_json::Value),
925}
926
927
928pub async fn add_user(configuration: &configuration::Configuration, workspace: &str, add_user_request: models::AddUserRequest) -> Result<String, Error<AddUserError>> {
929 let local_var_configuration = configuration;
930
931 let local_var_client = &local_var_configuration.client;
932
933 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/add_user", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
934 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
935
936 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
937 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
938 }
939 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
940 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
941 };
942 local_var_req_builder = local_var_req_builder.json(&add_user_request);
943
944 let local_var_req = local_var_req_builder.build()?;
945 let local_var_resp = local_var_client.execute(local_var_req).await?;
946
947 let local_var_status = local_var_resp.status();
948 let local_var_content = local_var_resp.text().await?;
949
950 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
951 crate::from_str_patched(&local_var_content).map_err(Error::from)
952 } else {
953 let local_var_entity: Option<AddUserError> = crate::from_str_patched(&local_var_content).ok();
954 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
955 Err(Error::ResponseError(local_var_error))
956 }
957}
958
959pub async fn archive_workspace(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<ArchiveWorkspaceError>> {
960 let local_var_configuration = configuration;
961
962 let local_var_client = &local_var_configuration.client;
963
964 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/archive", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
965 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
966
967 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
968 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
969 }
970 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
971 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
972 };
973
974 let local_var_req = local_var_req_builder.build()?;
975 let local_var_resp = local_var_client.execute(local_var_req).await?;
976
977 let local_var_status = local_var_resp.status();
978 let local_var_content = local_var_resp.text().await?;
979
980 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
981 crate::from_str_patched(&local_var_content).map_err(Error::from)
982 } else {
983 let local_var_entity: Option<ArchiveWorkspaceError> = crate::from_str_patched(&local_var_content).ok();
984 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
985 Err(Error::ResponseError(local_var_error))
986 }
987}
988
989pub async fn attach_dev_workspace(configuration: &configuration::Configuration, workspace: &str, attach_dev_workspace_request: models::AttachDevWorkspaceRequest) -> Result<String, Error<AttachDevWorkspaceError>> {
990 let local_var_configuration = configuration;
991
992 let local_var_client = &local_var_configuration.client;
993
994 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/attach_dev_workspace", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
995 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
996
997 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
998 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
999 }
1000 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1001 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1002 };
1003 local_var_req_builder = local_var_req_builder.json(&attach_dev_workspace_request);
1004
1005 let local_var_req = local_var_req_builder.build()?;
1006 let local_var_resp = local_var_client.execute(local_var_req).await?;
1007
1008 let local_var_status = local_var_resp.status();
1009 let local_var_content = local_var_resp.text().await?;
1010
1011 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1012 crate::from_str_patched(&local_var_content).map_err(Error::from)
1013 } else {
1014 let local_var_entity: Option<AttachDevWorkspaceError> = crate::from_str_patched(&local_var_content).ok();
1015 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1016 Err(Error::ResponseError(local_var_error))
1017 }
1018}
1019
1020pub async fn cancel_deployment_request(configuration: &configuration::Configuration, workspace: &str, id: i64) -> Result<String, Error<CancelDeploymentRequestError>> {
1021 let local_var_configuration = configuration;
1022
1023 let local_var_client = &local_var_configuration.client;
1024
1025 let local_var_uri_str = format!("{}/w/{workspace}/deployment_request/{id}/cancel", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=id);
1026 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1027
1028 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1029 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1030 }
1031 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1032 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1033 };
1034
1035 let local_var_req = local_var_req_builder.build()?;
1036 let local_var_resp = local_var_client.execute(local_var_req).await?;
1037
1038 let local_var_status = local_var_resp.status();
1039 let local_var_content = local_var_resp.text().await?;
1040
1041 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1042 crate::from_str_patched(&local_var_content).map_err(Error::from)
1043 } else {
1044 let local_var_entity: Option<CancelDeploymentRequestError> = crate::from_str_patched(&local_var_content).ok();
1045 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1046 Err(Error::ResponseError(local_var_error))
1047 }
1048}
1049
1050pub async fn change_workspace_color(configuration: &configuration::Configuration, workspace: &str, change_workspace_color_request: Option<models::ChangeWorkspaceColorRequest>) -> Result<String, Error<ChangeWorkspaceColorError>> {
1051 let local_var_configuration = configuration;
1052
1053 let local_var_client = &local_var_configuration.client;
1054
1055 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/change_workspace_color", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1056 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1057
1058 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1059 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1060 }
1061 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1062 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1063 };
1064 local_var_req_builder = local_var_req_builder.json(&change_workspace_color_request);
1065
1066 let local_var_req = local_var_req_builder.build()?;
1067 let local_var_resp = local_var_client.execute(local_var_req).await?;
1068
1069 let local_var_status = local_var_resp.status();
1070 let local_var_content = local_var_resp.text().await?;
1071
1072 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1073 crate::from_str_patched(&local_var_content).map_err(Error::from)
1074 } else {
1075 let local_var_entity: Option<ChangeWorkspaceColorError> = crate::from_str_patched(&local_var_content).ok();
1076 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1077 Err(Error::ResponseError(local_var_error))
1078 }
1079}
1080
1081pub async fn change_workspace_id(configuration: &configuration::Configuration, workspace: &str, change_workspace_id_request: Option<models::ChangeWorkspaceIdRequest>) -> Result<String, Error<ChangeWorkspaceIdError>> {
1082 let local_var_configuration = configuration;
1083
1084 let local_var_client = &local_var_configuration.client;
1085
1086 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/change_workspace_id", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1087 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1088
1089 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1090 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1091 }
1092 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1093 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1094 };
1095 local_var_req_builder = local_var_req_builder.json(&change_workspace_id_request);
1096
1097 let local_var_req = local_var_req_builder.build()?;
1098 let local_var_resp = local_var_client.execute(local_var_req).await?;
1099
1100 let local_var_status = local_var_resp.status();
1101 let local_var_content = local_var_resp.text().await?;
1102
1103 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1104 crate::from_str_patched(&local_var_content).map_err(Error::from)
1105 } else {
1106 let local_var_entity: Option<ChangeWorkspaceIdError> = crate::from_str_patched(&local_var_content).ok();
1107 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1108 Err(Error::ResponseError(local_var_error))
1109 }
1110}
1111
1112pub async fn change_workspace_name(configuration: &configuration::Configuration, workspace: &str, change_workspace_name_request: Option<models::ChangeWorkspaceNameRequest>) -> Result<String, Error<ChangeWorkspaceNameError>> {
1113 let local_var_configuration = configuration;
1114
1115 let local_var_client = &local_var_configuration.client;
1116
1117 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/change_workspace_name", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1118 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1119
1120 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1121 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1122 }
1123 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1124 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1125 };
1126 local_var_req_builder = local_var_req_builder.json(&change_workspace_name_request);
1127
1128 let local_var_req = local_var_req_builder.build()?;
1129 let local_var_resp = local_var_client.execute(local_var_req).await?;
1130
1131 let local_var_status = local_var_resp.status();
1132 let local_var_content = local_var_resp.text().await?;
1133
1134 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1135 crate::from_str_patched(&local_var_content).map_err(Error::from)
1136 } else {
1137 let local_var_entity: Option<ChangeWorkspaceNameError> = crate::from_str_patched(&local_var_content).ok();
1138 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1139 Err(Error::ResponseError(local_var_error))
1140 }
1141}
1142
1143pub async fn close_deployment_request_merged(configuration: &configuration::Configuration, workspace: &str, id: i64) -> Result<String, Error<CloseDeploymentRequestMergedError>> {
1145 let local_var_configuration = configuration;
1146
1147 let local_var_client = &local_var_configuration.client;
1148
1149 let local_var_uri_str = format!("{}/w/{workspace}/deployment_request/{id}/close_merged", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=id);
1150 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1151
1152 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1153 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1154 }
1155 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1156 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1157 };
1158
1159 let local_var_req = local_var_req_builder.build()?;
1160 let local_var_resp = local_var_client.execute(local_var_req).await?;
1161
1162 let local_var_status = local_var_resp.status();
1163 let local_var_content = local_var_resp.text().await?;
1164
1165 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1166 crate::from_str_patched(&local_var_content).map_err(Error::from)
1167 } else {
1168 let local_var_entity: Option<CloseDeploymentRequestMergedError> = crate::from_str_patched(&local_var_content).ok();
1169 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1170 Err(Error::ResponseError(local_var_error))
1171 }
1172}
1173
1174pub async fn compare_workspaces(configuration: &configuration::Configuration, workspace: &str, target_workspace_id: &str) -> Result<models::WorkspaceComparison, Error<CompareWorkspacesError>> {
1176 let local_var_configuration = configuration;
1177
1178 let local_var_client = &local_var_configuration.client;
1179
1180 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/compare/{target_workspace_id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), target_workspace_id=crate::apis::urlencode(target_workspace_id));
1181 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1182
1183 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1184 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1185 }
1186 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1187 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1188 };
1189
1190 let local_var_req = local_var_req_builder.build()?;
1191 let local_var_resp = local_var_client.execute(local_var_req).await?;
1192
1193 let local_var_status = local_var_resp.status();
1194 let local_var_content = local_var_resp.text().await?;
1195
1196 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1197 crate::from_str_patched(&local_var_content).map_err(Error::from)
1198 } else {
1199 let local_var_entity: Option<CompareWorkspacesError> = crate::from_str_patched(&local_var_content).ok();
1200 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1201 Err(Error::ResponseError(local_var_error))
1202 }
1203}
1204
1205pub async fn connect_slack(configuration: &configuration::Configuration, workspace: &str, connect_slack_request: models::ConnectSlackRequest) -> Result<(), Error<ConnectSlackError>> {
1206 let local_var_configuration = configuration;
1207
1208 let local_var_client = &local_var_configuration.client;
1209
1210 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/connect_slack", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1211 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1212
1213 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1214 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1215 }
1216 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1217 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1218 };
1219 local_var_req_builder = local_var_req_builder.json(&connect_slack_request);
1220
1221 let local_var_req = local_var_req_builder.build()?;
1222 let local_var_resp = local_var_client.execute(local_var_req).await?;
1223
1224 let local_var_status = local_var_resp.status();
1225 let local_var_content = local_var_resp.text().await?;
1226
1227 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1228 Ok(())
1229 } else {
1230 let local_var_entity: Option<ConnectSlackError> = crate::from_str_patched(&local_var_content).ok();
1231 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1232 Err(Error::ResponseError(local_var_error))
1233 }
1234}
1235
1236pub async fn connect_teams(configuration: &configuration::Configuration, workspace: &str, connect_teams_request: models::ConnectTeamsRequest) -> Result<String, Error<ConnectTeamsError>> {
1237 let local_var_configuration = configuration;
1238
1239 let local_var_client = &local_var_configuration.client;
1240
1241 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/connect_teams", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1242 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1243
1244 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1245 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1246 }
1247 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1248 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1249 };
1250 local_var_req_builder = local_var_req_builder.json(&connect_teams_request);
1251
1252 let local_var_req = local_var_req_builder.build()?;
1253 let local_var_resp = local_var_client.execute(local_var_req).await?;
1254
1255 let local_var_status = local_var_resp.status();
1256 let local_var_content = local_var_resp.text().await?;
1257
1258 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1259 crate::from_str_patched(&local_var_content).map_err(Error::from)
1260 } else {
1261 let local_var_entity: Option<ConnectTeamsError> = crate::from_str_patched(&local_var_content).ok();
1262 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1263 Err(Error::ResponseError(local_var_error))
1264 }
1265}
1266
1267pub async fn create_datatable_migration(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str, create_datatable_migration_request: models::CreateDatatableMigrationRequest) -> Result<models::DatatableMigration, Error<CreateDatatableMigrationError>> {
1268 let local_var_configuration = configuration;
1269
1270 let local_var_client = &local_var_configuration.client;
1271
1272 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/create_datatable_migration/{datatable_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name));
1273 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1274
1275 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1276 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1277 }
1278 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1279 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1280 };
1281 local_var_req_builder = local_var_req_builder.json(&create_datatable_migration_request);
1282
1283 let local_var_req = local_var_req_builder.build()?;
1284 let local_var_resp = local_var_client.execute(local_var_req).await?;
1285
1286 let local_var_status = local_var_resp.status();
1287 let local_var_content = local_var_resp.text().await?;
1288
1289 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1290 crate::from_str_patched(&local_var_content).map_err(Error::from)
1291 } else {
1292 let local_var_entity: Option<CreateDatatableMigrationError> = crate::from_str_patched(&local_var_content).ok();
1293 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1294 Err(Error::ResponseError(local_var_error))
1295 }
1296}
1297
1298pub async fn create_deployment_request(configuration: &configuration::Configuration, workspace: &str, create_deployment_request_request: models::CreateDeploymentRequestRequest) -> Result<models::DeploymentRequest, Error<CreateDeploymentRequestError>> {
1299 let local_var_configuration = configuration;
1300
1301 let local_var_client = &local_var_configuration.client;
1302
1303 let local_var_uri_str = format!("{}/w/{workspace}/deployment_request", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1304 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1305
1306 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1307 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1308 }
1309 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1310 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1311 };
1312 local_var_req_builder = local_var_req_builder.json(&create_deployment_request_request);
1313
1314 let local_var_req = local_var_req_builder.build()?;
1315 let local_var_resp = local_var_client.execute(local_var_req).await?;
1316
1317 let local_var_status = local_var_resp.status();
1318 let local_var_content = local_var_resp.text().await?;
1319
1320 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1321 crate::from_str_patched(&local_var_content).map_err(Error::from)
1322 } else {
1323 let local_var_entity: Option<CreateDeploymentRequestError> = crate::from_str_patched(&local_var_content).ok();
1324 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1325 Err(Error::ResponseError(local_var_error))
1326 }
1327}
1328
1329pub async fn create_deployment_request_comment(configuration: &configuration::Configuration, workspace: &str, id: i64, create_deployment_request_comment_request: models::CreateDeploymentRequestCommentRequest) -> Result<models::DeploymentRequestComment, Error<CreateDeploymentRequestCommentError>> {
1330 let local_var_configuration = configuration;
1331
1332 let local_var_client = &local_var_configuration.client;
1333
1334 let local_var_uri_str = format!("{}/w/{workspace}/deployment_request/{id}/comment", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=id);
1335 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1336
1337 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1338 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1339 }
1340 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1341 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1342 };
1343 local_var_req_builder = local_var_req_builder.json(&create_deployment_request_comment_request);
1344
1345 let local_var_req = local_var_req_builder.build()?;
1346 let local_var_resp = local_var_client.execute(local_var_req).await?;
1347
1348 let local_var_status = local_var_resp.status();
1349 let local_var_content = local_var_resp.text().await?;
1350
1351 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1352 crate::from_str_patched(&local_var_content).map_err(Error::from)
1353 } else {
1354 let local_var_entity: Option<CreateDeploymentRequestCommentError> = crate::from_str_patched(&local_var_content).ok();
1355 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1356 Err(Error::ResponseError(local_var_error))
1357 }
1358}
1359
1360pub async fn create_pg_database(configuration: &configuration::Configuration, workspace: &str, create_pg_database_request: models::CreatePgDatabaseRequest) -> Result<String, Error<CreatePgDatabaseError>> {
1361 let local_var_configuration = configuration;
1362
1363 let local_var_client = &local_var_configuration.client;
1364
1365 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/create_pg_database", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1366 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1367
1368 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1369 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1370 }
1371 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1372 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1373 };
1374 local_var_req_builder = local_var_req_builder.json(&create_pg_database_request);
1375
1376 let local_var_req = local_var_req_builder.build()?;
1377 let local_var_resp = local_var_client.execute(local_var_req).await?;
1378
1379 let local_var_status = local_var_resp.status();
1380 let local_var_content = local_var_resp.text().await?;
1381
1382 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1383 crate::from_str_patched(&local_var_content).map_err(Error::from)
1384 } else {
1385 let local_var_entity: Option<CreatePgDatabaseError> = crate::from_str_patched(&local_var_content).ok();
1386 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1387 Err(Error::ResponseError(local_var_error))
1388 }
1389}
1390
1391pub async fn create_protection_rule(configuration: &configuration::Configuration, workspace: &str, create_protection_rule_request: models::CreateProtectionRuleRequest) -> Result<String, Error<CreateProtectionRuleError>> {
1392 let local_var_configuration = configuration;
1393
1394 let local_var_client = &local_var_configuration.client;
1395
1396 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/protection_rules", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1397 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1398
1399 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1400 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1401 }
1402 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1403 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1404 };
1405 local_var_req_builder = local_var_req_builder.json(&create_protection_rule_request);
1406
1407 let local_var_req = local_var_req_builder.build()?;
1408 let local_var_resp = local_var_client.execute(local_var_req).await?;
1409
1410 let local_var_status = local_var_resp.status();
1411 let local_var_content = local_var_resp.text().await?;
1412
1413 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1414 crate::from_str_patched(&local_var_content).map_err(Error::from)
1415 } else {
1416 let local_var_entity: Option<CreateProtectionRuleError> = crate::from_str_patched(&local_var_content).ok();
1417 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1418 Err(Error::ResponseError(local_var_error))
1419 }
1420}
1421
1422pub async fn create_service_account(configuration: &configuration::Configuration, workspace: &str, create_service_account_request: models::CreateServiceAccountRequest) -> Result<String, Error<CreateServiceAccountError>> {
1423 let local_var_configuration = configuration;
1424
1425 let local_var_client = &local_var_configuration.client;
1426
1427 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/create_service_account", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1428 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1429
1430 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1431 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1432 }
1433 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1434 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1435 };
1436 local_var_req_builder = local_var_req_builder.json(&create_service_account_request);
1437
1438 let local_var_req = local_var_req_builder.build()?;
1439 let local_var_resp = local_var_client.execute(local_var_req).await?;
1440
1441 let local_var_status = local_var_resp.status();
1442 let local_var_content = local_var_resp.text().await?;
1443
1444 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1445 crate::from_str_patched(&local_var_content).map_err(Error::from)
1446 } else {
1447 let local_var_entity: Option<CreateServiceAccountError> = crate::from_str_patched(&local_var_content).ok();
1448 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1449 Err(Error::ResponseError(local_var_error))
1450 }
1451}
1452
1453pub async fn create_workspace(configuration: &configuration::Configuration, create_workspace: models::CreateWorkspace) -> Result<String, Error<CreateWorkspaceError>> {
1454 let local_var_configuration = configuration;
1455
1456 let local_var_client = &local_var_configuration.client;
1457
1458 let local_var_uri_str = format!("{}/workspaces/create", local_var_configuration.base_path);
1459 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1460
1461 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1462 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1463 }
1464 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1465 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1466 };
1467 local_var_req_builder = local_var_req_builder.json(&create_workspace);
1468
1469 let local_var_req = local_var_req_builder.build()?;
1470 let local_var_resp = local_var_client.execute(local_var_req).await?;
1471
1472 let local_var_status = local_var_resp.status();
1473 let local_var_content = local_var_resp.text().await?;
1474
1475 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1476 crate::from_str_patched(&local_var_content).map_err(Error::from)
1477 } else {
1478 let local_var_entity: Option<CreateWorkspaceError> = crate::from_str_patched(&local_var_content).ok();
1479 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1480 Err(Error::ResponseError(local_var_error))
1481 }
1482}
1483
1484pub async fn create_workspace_fork(configuration: &configuration::Configuration, workspace: &str, create_workspace_fork: models::CreateWorkspaceFork) -> Result<String, Error<CreateWorkspaceForkError>> {
1485 let local_var_configuration = configuration;
1486
1487 let local_var_client = &local_var_configuration.client;
1488
1489 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/create_fork", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1490 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1491
1492 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1493 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1494 }
1495 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1496 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1497 };
1498 local_var_req_builder = local_var_req_builder.json(&create_workspace_fork);
1499
1500 let local_var_req = local_var_req_builder.build()?;
1501 let local_var_resp = local_var_client.execute(local_var_req).await?;
1502
1503 let local_var_status = local_var_resp.status();
1504 let local_var_content = local_var_resp.text().await?;
1505
1506 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1507 crate::from_str_patched(&local_var_content).map_err(Error::from)
1508 } else {
1509 let local_var_entity: Option<CreateWorkspaceForkError> = crate::from_str_patched(&local_var_content).ok();
1510 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1511 Err(Error::ResponseError(local_var_error))
1512 }
1513}
1514
1515pub async fn create_workspace_fork_git_branch(configuration: &configuration::Configuration, workspace: &str, create_workspace_fork: models::CreateWorkspaceFork) -> Result<Vec<uuid::Uuid>, Error<CreateWorkspaceForkGitBranchError>> {
1516 let local_var_configuration = configuration;
1517
1518 let local_var_client = &local_var_configuration.client;
1519
1520 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/create_workspace_fork_branch", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1521 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1522
1523 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1524 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1525 }
1526 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1527 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1528 };
1529 local_var_req_builder = local_var_req_builder.json(&create_workspace_fork);
1530
1531 let local_var_req = local_var_req_builder.build()?;
1532 let local_var_resp = local_var_client.execute(local_var_req).await?;
1533
1534 let local_var_status = local_var_resp.status();
1535 let local_var_content = local_var_resp.text().await?;
1536
1537 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1538 crate::from_str_patched(&local_var_content).map_err(Error::from)
1539 } else {
1540 let local_var_entity: Option<CreateWorkspaceForkGitBranchError> = crate::from_str_patched(&local_var_content).ok();
1541 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1542 Err(Error::ResponseError(local_var_error))
1543 }
1544}
1545
1546pub async fn delete_datatable_migration(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str, timestamp: i64) -> Result<String, Error<DeleteDatatableMigrationError>> {
1547 let local_var_configuration = configuration;
1548
1549 let local_var_client = &local_var_configuration.client;
1550
1551 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/delete_datatable_migration/{datatable_name}/{timestamp}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name), timestamp=timestamp);
1552 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1553
1554 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1555 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1556 }
1557 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1558 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1559 };
1560
1561 let local_var_req = local_var_req_builder.build()?;
1562 let local_var_resp = local_var_client.execute(local_var_req).await?;
1563
1564 let local_var_status = local_var_resp.status();
1565 let local_var_content = local_var_resp.text().await?;
1566
1567 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1568 crate::from_str_patched(&local_var_content).map_err(Error::from)
1569 } else {
1570 let local_var_entity: Option<DeleteDatatableMigrationError> = crate::from_str_patched(&local_var_content).ok();
1571 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1572 Err(Error::ResponseError(local_var_error))
1573 }
1574}
1575
1576pub async fn delete_git_sync_repository(configuration: &configuration::Configuration, workspace: &str, delete_git_sync_repository_request: models::DeleteGitSyncRepositoryRequest) -> Result<serde_json::Value, Error<DeleteGitSyncRepositoryError>> {
1577 let local_var_configuration = configuration;
1578
1579 let local_var_client = &local_var_configuration.client;
1580
1581 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/delete_git_sync_repository", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1582 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1583
1584 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1585 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1586 }
1587 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1588 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1589 };
1590 local_var_req_builder = local_var_req_builder.json(&delete_git_sync_repository_request);
1591
1592 let local_var_req = local_var_req_builder.build()?;
1593 let local_var_resp = local_var_client.execute(local_var_req).await?;
1594
1595 let local_var_status = local_var_resp.status();
1596 let local_var_content = local_var_resp.text().await?;
1597
1598 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1599 crate::from_str_patched(&local_var_content).map_err(Error::from)
1600 } else {
1601 let local_var_entity: Option<DeleteGitSyncRepositoryError> = crate::from_str_patched(&local_var_content).ok();
1602 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1603 Err(Error::ResponseError(local_var_error))
1604 }
1605}
1606
1607pub async fn delete_invite(configuration: &configuration::Configuration, workspace: &str, delete_invite_request: models::DeleteInviteRequest) -> Result<String, Error<DeleteInviteError>> {
1608 let local_var_configuration = configuration;
1609
1610 let local_var_client = &local_var_configuration.client;
1611
1612 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/delete_invite", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1613 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1614
1615 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1616 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1617 }
1618 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1619 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1620 };
1621 local_var_req_builder = local_var_req_builder.json(&delete_invite_request);
1622
1623 let local_var_req = local_var_req_builder.build()?;
1624 let local_var_resp = local_var_client.execute(local_var_req).await?;
1625
1626 let local_var_status = local_var_resp.status();
1627 let local_var_content = local_var_resp.text().await?;
1628
1629 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1630 crate::from_str_patched(&local_var_content).map_err(Error::from)
1631 } else {
1632 let local_var_entity: Option<DeleteInviteError> = crate::from_str_patched(&local_var_content).ok();
1633 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1634 Err(Error::ResponseError(local_var_error))
1635 }
1636}
1637
1638pub async fn delete_protection_rule(configuration: &configuration::Configuration, workspace: &str, rule_name: &str) -> Result<String, Error<DeleteProtectionRuleError>> {
1639 let local_var_configuration = configuration;
1640
1641 let local_var_client = &local_var_configuration.client;
1642
1643 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/protection_rules/{rule_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), rule_name=crate::apis::urlencode(rule_name));
1644 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1645
1646 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1647 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1648 }
1649 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1650 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1651 };
1652
1653 let local_var_req = local_var_req_builder.build()?;
1654 let local_var_resp = local_var_client.execute(local_var_req).await?;
1655
1656 let local_var_status = local_var_resp.status();
1657 let local_var_content = local_var_resp.text().await?;
1658
1659 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1660 crate::from_str_patched(&local_var_content).map_err(Error::from)
1661 } else {
1662 let local_var_entity: Option<DeleteProtectionRuleError> = crate::from_str_patched(&local_var_content).ok();
1663 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1664 Err(Error::ResponseError(local_var_error))
1665 }
1666}
1667
1668pub async fn delete_workspace(configuration: &configuration::Configuration, workspace: &str, only_delete_forks: Option<bool>) -> Result<String, Error<DeleteWorkspaceError>> {
1669 let local_var_configuration = configuration;
1670
1671 let local_var_client = &local_var_configuration.client;
1672
1673 let local_var_uri_str = format!("{}/workspaces/delete/{workspace}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1674 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1675
1676 if let Some(ref local_var_str) = only_delete_forks {
1677 local_var_req_builder = local_var_req_builder.query(&[("only_delete_forks", &local_var_str.to_string())]);
1678 }
1679 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1680 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1681 }
1682 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1683 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1684 };
1685
1686 let local_var_req = local_var_req_builder.build()?;
1687 let local_var_resp = local_var_client.execute(local_var_req).await?;
1688
1689 let local_var_status = local_var_resp.status();
1690 let local_var_content = local_var_resp.text().await?;
1691
1692 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1693 crate::from_str_patched(&local_var_content).map_err(Error::from)
1694 } else {
1695 let local_var_entity: Option<DeleteWorkspaceError> = crate::from_str_patched(&local_var_content).ok();
1696 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1697 Err(Error::ResponseError(local_var_error))
1698 }
1699}
1700
1701pub async fn delete_workspace_slack_oauth_config(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<DeleteWorkspaceSlackOauthConfigError>> {
1702 let local_var_configuration = configuration;
1703
1704 let local_var_client = &local_var_configuration.client;
1705
1706 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/slack_oauth_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1707 let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1708
1709 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1710 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1711 }
1712 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1713 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1714 };
1715
1716 let local_var_req = local_var_req_builder.build()?;
1717 let local_var_resp = local_var_client.execute(local_var_req).await?;
1718
1719 let local_var_status = local_var_resp.status();
1720 let local_var_content = local_var_resp.text().await?;
1721
1722 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1723 crate::from_str_patched(&local_var_content).map_err(Error::from)
1724 } else {
1725 let local_var_entity: Option<DeleteWorkspaceSlackOauthConfigError> = crate::from_str_patched(&local_var_content).ok();
1726 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1727 Err(Error::ResponseError(local_var_error))
1728 }
1729}
1730
1731pub async fn detach_dev_workspace(configuration: &configuration::Configuration, workspace: &str, detach_dev_workspace_request: models::DetachDevWorkspaceRequest) -> Result<String, Error<DetachDevWorkspaceError>> {
1732 let local_var_configuration = configuration;
1733
1734 let local_var_client = &local_var_configuration.client;
1735
1736 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/detach_dev_workspace", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1737 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1738
1739 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1740 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1741 }
1742 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1743 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1744 };
1745 local_var_req_builder = local_var_req_builder.json(&detach_dev_workspace_request);
1746
1747 let local_var_req = local_var_req_builder.build()?;
1748 let local_var_resp = local_var_client.execute(local_var_req).await?;
1749
1750 let local_var_status = local_var_resp.status();
1751 let local_var_content = local_var_resp.text().await?;
1752
1753 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1754 crate::from_str_patched(&local_var_content).map_err(Error::from)
1755 } else {
1756 let local_var_entity: Option<DetachDevWorkspaceError> = crate::from_str_patched(&local_var_content).ok();
1757 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1758 Err(Error::ResponseError(local_var_error))
1759 }
1760}
1761
1762pub async fn disable_datatable_migrations(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str) -> Result<String, Error<DisableDatatableMigrationsError>> {
1763 let local_var_configuration = configuration;
1764
1765 let local_var_client = &local_var_configuration.client;
1766
1767 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/disable_datatable_migrations/{datatable_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name));
1768 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1769
1770 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1771 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1772 }
1773 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1774 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1775 };
1776
1777 let local_var_req = local_var_req_builder.build()?;
1778 let local_var_resp = local_var_client.execute(local_var_req).await?;
1779
1780 let local_var_status = local_var_resp.status();
1781 let local_var_content = local_var_resp.text().await?;
1782
1783 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1784 crate::from_str_patched(&local_var_content).map_err(Error::from)
1785 } else {
1786 let local_var_entity: Option<DisableDatatableMigrationsError> = crate::from_str_patched(&local_var_content).ok();
1787 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1788 Err(Error::ResponseError(local_var_error))
1789 }
1790}
1791
1792pub async fn drop_forked_datatable_databases(configuration: &configuration::Configuration, workspace: &str, drop_forked_datatable_databases_request: models::DropForkedDatatableDatabasesRequest) -> Result<Vec<String>, Error<DropForkedDatatableDatabasesError>> {
1793 let local_var_configuration = configuration;
1794
1795 let local_var_client = &local_var_configuration.client;
1796
1797 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/drop_forked_datatable_databases", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1798 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1799
1800 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1801 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1802 }
1803 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1804 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1805 };
1806 local_var_req_builder = local_var_req_builder.json(&drop_forked_datatable_databases_request);
1807
1808 let local_var_req = local_var_req_builder.build()?;
1809 let local_var_resp = local_var_client.execute(local_var_req).await?;
1810
1811 let local_var_status = local_var_resp.status();
1812 let local_var_content = local_var_resp.text().await?;
1813
1814 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1815 crate::from_str_patched(&local_var_content).map_err(Error::from)
1816 } else {
1817 let local_var_entity: Option<DropForkedDatatableDatabasesError> = crate::from_str_patched(&local_var_content).ok();
1818 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1819 Err(Error::ResponseError(local_var_error))
1820 }
1821}
1822
1823pub async fn drop_forked_ducklake_namespaces(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<String>, Error<DropForkedDucklakeNamespacesError>> {
1824 let local_var_configuration = configuration;
1825
1826 let local_var_client = &local_var_configuration.client;
1827
1828 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/drop_forked_ducklake_namespaces", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1829 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1830
1831 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1832 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1833 }
1834 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1835 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1836 };
1837
1838 let local_var_req = local_var_req_builder.build()?;
1839 let local_var_resp = local_var_client.execute(local_var_req).await?;
1840
1841 let local_var_status = local_var_resp.status();
1842 let local_var_content = local_var_resp.text().await?;
1843
1844 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1845 crate::from_str_patched(&local_var_content).map_err(Error::from)
1846 } else {
1847 let local_var_entity: Option<DropForkedDucklakeNamespacesError> = crate::from_str_patched(&local_var_content).ok();
1848 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1849 Err(Error::ResponseError(local_var_error))
1850 }
1851}
1852
1853pub async fn edit_auto_invite(configuration: &configuration::Configuration, workspace: &str, edit_auto_invite_request: models::EditAutoInviteRequest) -> Result<String, Error<EditAutoInviteError>> {
1854 let local_var_configuration = configuration;
1855
1856 let local_var_client = &local_var_configuration.client;
1857
1858 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_auto_invite", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1859 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1860
1861 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1862 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1863 }
1864 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1865 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1866 };
1867 local_var_req_builder = local_var_req_builder.json(&edit_auto_invite_request);
1868
1869 let local_var_req = local_var_req_builder.build()?;
1870 let local_var_resp = local_var_client.execute(local_var_req).await?;
1871
1872 let local_var_status = local_var_resp.status();
1873 let local_var_content = local_var_resp.text().await?;
1874
1875 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1876 crate::from_str_patched(&local_var_content).map_err(Error::from)
1877 } else {
1878 let local_var_entity: Option<EditAutoInviteError> = crate::from_str_patched(&local_var_content).ok();
1879 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1880 Err(Error::ResponseError(local_var_error))
1881 }
1882}
1883
1884pub async fn edit_copilot_config(configuration: &configuration::Configuration, workspace: &str, ai_config: models::AiConfig) -> Result<models::EditCopilotConfig200Response, Error<EditCopilotConfigError>> {
1885 let local_var_configuration = configuration;
1886
1887 let local_var_client = &local_var_configuration.client;
1888
1889 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_copilot_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1890 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1891
1892 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1893 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1894 }
1895 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1896 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1897 };
1898 local_var_req_builder = local_var_req_builder.json(&ai_config);
1899
1900 let local_var_req = local_var_req_builder.build()?;
1901 let local_var_resp = local_var_client.execute(local_var_req).await?;
1902
1903 let local_var_status = local_var_resp.status();
1904 let local_var_content = local_var_resp.text().await?;
1905
1906 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1907 crate::from_str_patched(&local_var_content).map_err(Error::from)
1908 } else {
1909 let local_var_entity: Option<EditCopilotConfigError> = crate::from_str_patched(&local_var_content).ok();
1910 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1911 Err(Error::ResponseError(local_var_error))
1912 }
1913}
1914
1915pub async fn edit_data_table_config(configuration: &configuration::Configuration, workspace: &str, edit_data_table_config_request: models::EditDataTableConfigRequest) -> Result<serde_json::Value, Error<EditDataTableConfigError>> {
1916 let local_var_configuration = configuration;
1917
1918 let local_var_client = &local_var_configuration.client;
1919
1920 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_datatable_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1921 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1922
1923 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1924 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1925 }
1926 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1927 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1928 };
1929 local_var_req_builder = local_var_req_builder.json(&edit_data_table_config_request);
1930
1931 let local_var_req = local_var_req_builder.build()?;
1932 let local_var_resp = local_var_client.execute(local_var_req).await?;
1933
1934 let local_var_status = local_var_resp.status();
1935 let local_var_content = local_var_resp.text().await?;
1936
1937 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1938 crate::from_str_patched(&local_var_content).map_err(Error::from)
1939 } else {
1940 let local_var_entity: Option<EditDataTableConfigError> = crate::from_str_patched(&local_var_content).ok();
1941 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1942 Err(Error::ResponseError(local_var_error))
1943 }
1944}
1945
1946pub async fn edit_dbt_warehouses(configuration: &configuration::Configuration, workspace: &str, edit_dbt_warehouses_request: models::EditDbtWarehousesRequest) -> Result<serde_json::Value, Error<EditDbtWarehousesError>> {
1947 let local_var_configuration = configuration;
1948
1949 let local_var_client = &local_var_configuration.client;
1950
1951 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_dbt_warehouses", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1952 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1953
1954 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1955 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1956 }
1957 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1958 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1959 };
1960 local_var_req_builder = local_var_req_builder.json(&edit_dbt_warehouses_request);
1961
1962 let local_var_req = local_var_req_builder.build()?;
1963 let local_var_resp = local_var_client.execute(local_var_req).await?;
1964
1965 let local_var_status = local_var_resp.status();
1966 let local_var_content = local_var_resp.text().await?;
1967
1968 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1969 crate::from_str_patched(&local_var_content).map_err(Error::from)
1970 } else {
1971 let local_var_entity: Option<EditDbtWarehousesError> = crate::from_str_patched(&local_var_content).ok();
1972 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1973 Err(Error::ResponseError(local_var_error))
1974 }
1975}
1976
1977pub async fn edit_default_scripts(configuration: &configuration::Configuration, workspace: &str, workspace_default_scripts: Option<models::WorkspaceDefaultScripts>) -> Result<String, Error<EditDefaultScriptsError>> {
1978 let local_var_configuration = configuration;
1979
1980 let local_var_client = &local_var_configuration.client;
1981
1982 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/default_scripts", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1983 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1984
1985 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1986 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1987 }
1988 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1989 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1990 };
1991 local_var_req_builder = local_var_req_builder.json(&workspace_default_scripts);
1992
1993 let local_var_req = local_var_req_builder.build()?;
1994 let local_var_resp = local_var_client.execute(local_var_req).await?;
1995
1996 let local_var_status = local_var_resp.status();
1997 let local_var_content = local_var_resp.text().await?;
1998
1999 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2000 crate::from_str_patched(&local_var_content).map_err(Error::from)
2001 } else {
2002 let local_var_entity: Option<EditDefaultScriptsError> = crate::from_str_patched(&local_var_content).ok();
2003 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2004 Err(Error::ResponseError(local_var_error))
2005 }
2006}
2007
2008pub async fn edit_ducklake_config(configuration: &configuration::Configuration, workspace: &str, edit_ducklake_config_request: models::EditDucklakeConfigRequest) -> Result<serde_json::Value, Error<EditDucklakeConfigError>> {
2009 let local_var_configuration = configuration;
2010
2011 let local_var_client = &local_var_configuration.client;
2012
2013 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_ducklake_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2014 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2015
2016 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2017 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2018 }
2019 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2020 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2021 };
2022 local_var_req_builder = local_var_req_builder.json(&edit_ducklake_config_request);
2023
2024 let local_var_req = local_var_req_builder.build()?;
2025 let local_var_resp = local_var_client.execute(local_var_req).await?;
2026
2027 let local_var_status = local_var_resp.status();
2028 let local_var_content = local_var_resp.text().await?;
2029
2030 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2031 crate::from_str_patched(&local_var_content).map_err(Error::from)
2032 } else {
2033 let local_var_entity: Option<EditDucklakeConfigError> = crate::from_str_patched(&local_var_content).ok();
2034 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2035 Err(Error::ResponseError(local_var_error))
2036 }
2037}
2038
2039pub async fn edit_error_handler(configuration: &configuration::Configuration, workspace: &str, edit_error_handler: models::EditErrorHandler) -> Result<String, Error<EditErrorHandlerError>> {
2040 let local_var_configuration = configuration;
2041
2042 let local_var_client = &local_var_configuration.client;
2043
2044 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_error_handler", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2045 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2046
2047 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2048 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2049 }
2050 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2051 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2052 };
2053 local_var_req_builder = local_var_req_builder.json(&edit_error_handler);
2054
2055 let local_var_req = local_var_req_builder.build()?;
2056 let local_var_resp = local_var_client.execute(local_var_req).await?;
2057
2058 let local_var_status = local_var_resp.status();
2059 let local_var_content = local_var_resp.text().await?;
2060
2061 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2062 crate::from_str_patched(&local_var_content).map_err(Error::from)
2063 } else {
2064 let local_var_entity: Option<EditErrorHandlerError> = crate::from_str_patched(&local_var_content).ok();
2065 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2066 Err(Error::ResponseError(local_var_error))
2067 }
2068}
2069
2070pub async fn edit_git_sync_repository(configuration: &configuration::Configuration, workspace: &str, edit_git_sync_repository_request: models::EditGitSyncRepositoryRequest) -> Result<serde_json::Value, Error<EditGitSyncRepositoryError>> {
2071 let local_var_configuration = configuration;
2072
2073 let local_var_client = &local_var_configuration.client;
2074
2075 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_git_sync_repository", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2076 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2077
2078 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2079 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2080 }
2081 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2082 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2083 };
2084 local_var_req_builder = local_var_req_builder.json(&edit_git_sync_repository_request);
2085
2086 let local_var_req = local_var_req_builder.build()?;
2087 let local_var_resp = local_var_client.execute(local_var_req).await?;
2088
2089 let local_var_status = local_var_resp.status();
2090 let local_var_content = local_var_resp.text().await?;
2091
2092 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2093 crate::from_str_patched(&local_var_content).map_err(Error::from)
2094 } else {
2095 let local_var_entity: Option<EditGitSyncRepositoryError> = crate::from_str_patched(&local_var_content).ok();
2096 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2097 Err(Error::ResponseError(local_var_error))
2098 }
2099}
2100
2101pub async fn edit_guest_access(configuration: &configuration::Configuration, workspace: &str, edit_guest_access_request: models::EditGuestAccessRequest) -> Result<String, Error<EditGuestAccessError>> {
2103 let local_var_configuration = configuration;
2104
2105 let local_var_client = &local_var_configuration.client;
2106
2107 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_guest_access", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2108 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2109
2110 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2111 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2112 }
2113 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2114 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2115 };
2116 local_var_req_builder = local_var_req_builder.json(&edit_guest_access_request);
2117
2118 let local_var_req = local_var_req_builder.build()?;
2119 let local_var_resp = local_var_client.execute(local_var_req).await?;
2120
2121 let local_var_status = local_var_resp.status();
2122 let local_var_content = local_var_resp.text().await?;
2123
2124 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2125 crate::from_str_patched(&local_var_content).map_err(Error::from)
2126 } else {
2127 let local_var_entity: Option<EditGuestAccessError> = crate::from_str_patched(&local_var_content).ok();
2128 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2129 Err(Error::ResponseError(local_var_error))
2130 }
2131}
2132
2133pub async fn edit_guest_jwt_key(configuration: &configuration::Configuration, workspace: &str, edit_guest_jwt_key_request: models::EditGuestJwtKeyRequest) -> Result<String, Error<EditGuestJwtKeyError>> {
2135 let local_var_configuration = configuration;
2136
2137 let local_var_client = &local_var_configuration.client;
2138
2139 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_guest_jwt_key", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2140 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2141
2142 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2143 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2144 }
2145 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2146 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2147 };
2148 local_var_req_builder = local_var_req_builder.json(&edit_guest_jwt_key_request);
2149
2150 let local_var_req = local_var_req_builder.build()?;
2151 let local_var_resp = local_var_client.execute(local_var_req).await?;
2152
2153 let local_var_status = local_var_resp.status();
2154 let local_var_content = local_var_resp.text().await?;
2155
2156 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2157 crate::from_str_patched(&local_var_content).map_err(Error::from)
2158 } else {
2159 let local_var_entity: Option<EditGuestJwtKeyError> = crate::from_str_patched(&local_var_content).ok();
2160 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2161 Err(Error::ResponseError(local_var_error))
2162 }
2163}
2164
2165pub async fn edit_instance_groups(configuration: &configuration::Configuration, workspace: &str, edit_instance_groups_request: models::EditInstanceGroupsRequest) -> Result<String, Error<EditInstanceGroupsError>> {
2166 let local_var_configuration = configuration;
2167
2168 let local_var_client = &local_var_configuration.client;
2169
2170 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_instance_groups", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2171 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2172
2173 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2174 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2175 }
2176 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2177 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2178 };
2179 local_var_req_builder = local_var_req_builder.json(&edit_instance_groups_request);
2180
2181 let local_var_req = local_var_req_builder.build()?;
2182 let local_var_resp = local_var_client.execute(local_var_req).await?;
2183
2184 let local_var_status = local_var_resp.status();
2185 let local_var_content = local_var_resp.text().await?;
2186
2187 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2188 crate::from_str_patched(&local_var_content).map_err(Error::from)
2189 } else {
2190 let local_var_entity: Option<EditInstanceGroupsError> = crate::from_str_patched(&local_var_content).ok();
2191 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2192 Err(Error::ResponseError(local_var_error))
2193 }
2194}
2195
2196pub async fn edit_large_file_storage_config(configuration: &configuration::Configuration, workspace: &str, edit_large_file_storage_config_request: models::EditLargeFileStorageConfigRequest) -> Result<serde_json::Value, Error<EditLargeFileStorageConfigError>> {
2197 let local_var_configuration = configuration;
2198
2199 let local_var_client = &local_var_configuration.client;
2200
2201 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_large_file_storage_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2202 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2203
2204 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2205 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2206 }
2207 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2208 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2209 };
2210 local_var_req_builder = local_var_req_builder.json(&edit_large_file_storage_config_request);
2211
2212 let local_var_req = local_var_req_builder.build()?;
2213 let local_var_resp = local_var_client.execute(local_var_req).await?;
2214
2215 let local_var_status = local_var_resp.status();
2216 let local_var_content = local_var_resp.text().await?;
2217
2218 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2219 crate::from_str_patched(&local_var_content).map_err(Error::from)
2220 } else {
2221 let local_var_entity: Option<EditLargeFileStorageConfigError> = crate::from_str_patched(&local_var_content).ok();
2222 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2223 Err(Error::ResponseError(local_var_error))
2224 }
2225}
2226
2227pub async fn edit_slack_command(configuration: &configuration::Configuration, workspace: &str, edit_slack_command_request: models::EditSlackCommandRequest) -> Result<String, Error<EditSlackCommandError>> {
2228 let local_var_configuration = configuration;
2229
2230 let local_var_client = &local_var_configuration.client;
2231
2232 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_slack_command", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2233 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2234
2235 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2236 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2237 }
2238 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2239 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2240 };
2241 local_var_req_builder = local_var_req_builder.json(&edit_slack_command_request);
2242
2243 let local_var_req = local_var_req_builder.build()?;
2244 let local_var_resp = local_var_client.execute(local_var_req).await?;
2245
2246 let local_var_status = local_var_resp.status();
2247 let local_var_content = local_var_resp.text().await?;
2248
2249 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2250 crate::from_str_patched(&local_var_content).map_err(Error::from)
2251 } else {
2252 let local_var_entity: Option<EditSlackCommandError> = crate::from_str_patched(&local_var_content).ok();
2253 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2254 Err(Error::ResponseError(local_var_error))
2255 }
2256}
2257
2258pub async fn edit_success_handler(configuration: &configuration::Configuration, workspace: &str, edit_success_handler: models::EditSuccessHandler) -> Result<String, Error<EditSuccessHandlerError>> {
2259 let local_var_configuration = configuration;
2260
2261 let local_var_client = &local_var_configuration.client;
2262
2263 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_success_handler", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2264 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2265
2266 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2267 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2268 }
2269 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2270 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2271 };
2272 local_var_req_builder = local_var_req_builder.json(&edit_success_handler);
2273
2274 let local_var_req = local_var_req_builder.build()?;
2275 let local_var_resp = local_var_client.execute(local_var_req).await?;
2276
2277 let local_var_status = local_var_resp.status();
2278 let local_var_content = local_var_resp.text().await?;
2279
2280 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2281 crate::from_str_patched(&local_var_content).map_err(Error::from)
2282 } else {
2283 let local_var_entity: Option<EditSuccessHandlerError> = crate::from_str_patched(&local_var_content).ok();
2284 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2285 Err(Error::ResponseError(local_var_error))
2286 }
2287}
2288
2289pub async fn edit_teams_command(configuration: &configuration::Configuration, workspace: &str, edit_slack_command_request: models::EditSlackCommandRequest) -> Result<String, Error<EditTeamsCommandError>> {
2290 let local_var_configuration = configuration;
2291
2292 let local_var_client = &local_var_configuration.client;
2293
2294 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_teams_command", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2295 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2296
2297 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2298 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2299 }
2300 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2301 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2302 };
2303 local_var_req_builder = local_var_req_builder.json(&edit_slack_command_request);
2304
2305 let local_var_req = local_var_req_builder.build()?;
2306 let local_var_resp = local_var_client.execute(local_var_req).await?;
2307
2308 let local_var_status = local_var_resp.status();
2309 let local_var_content = local_var_resp.text().await?;
2310
2311 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2312 crate::from_str_patched(&local_var_content).map_err(Error::from)
2313 } else {
2314 let local_var_entity: Option<EditTeamsCommandError> = crate::from_str_patched(&local_var_content).ok();
2315 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2316 Err(Error::ResponseError(local_var_error))
2317 }
2318}
2319
2320pub async fn edit_webhook(configuration: &configuration::Configuration, workspace: &str, edit_webhook_request: models::EditWebhookRequest) -> Result<String, Error<EditWebhookError>> {
2321 let local_var_configuration = configuration;
2322
2323 let local_var_client = &local_var_configuration.client;
2324
2325 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_webhook", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2326 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2327
2328 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2329 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2330 }
2331 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2332 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2333 };
2334 local_var_req_builder = local_var_req_builder.json(&edit_webhook_request);
2335
2336 let local_var_req = local_var_req_builder.build()?;
2337 let local_var_resp = local_var_client.execute(local_var_req).await?;
2338
2339 let local_var_status = local_var_resp.status();
2340 let local_var_content = local_var_resp.text().await?;
2341
2342 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2343 crate::from_str_patched(&local_var_content).map_err(Error::from)
2344 } else {
2345 let local_var_entity: Option<EditWebhookError> = crate::from_str_patched(&local_var_content).ok();
2346 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2347 Err(Error::ResponseError(local_var_error))
2348 }
2349}
2350
2351pub async fn edit_workspace_default_app(configuration: &configuration::Configuration, workspace: &str, edit_workspace_default_app_request: models::EditWorkspaceDefaultAppRequest) -> Result<String, Error<EditWorkspaceDefaultAppError>> {
2352 let local_var_configuration = configuration;
2353
2354 let local_var_client = &local_var_configuration.client;
2355
2356 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_default_app", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2357 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2358
2359 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2360 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2361 }
2362 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2363 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2364 };
2365 local_var_req_builder = local_var_req_builder.json(&edit_workspace_default_app_request);
2366
2367 let local_var_req = local_var_req_builder.build()?;
2368 let local_var_resp = local_var_client.execute(local_var_req).await?;
2369
2370 let local_var_status = local_var_resp.status();
2371 let local_var_content = local_var_resp.text().await?;
2372
2373 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2374 crate::from_str_patched(&local_var_content).map_err(Error::from)
2375 } else {
2376 let local_var_entity: Option<EditWorkspaceDefaultAppError> = crate::from_str_patched(&local_var_content).ok();
2377 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2378 Err(Error::ResponseError(local_var_error))
2379 }
2380}
2381
2382pub async fn edit_workspace_deploy_ui_settings(configuration: &configuration::Configuration, workspace: &str, edit_workspace_deploy_ui_settings_request: models::EditWorkspaceDeployUiSettingsRequest) -> Result<serde_json::Value, Error<EditWorkspaceDeployUiSettingsError>> {
2383 let local_var_configuration = configuration;
2384
2385 let local_var_client = &local_var_configuration.client;
2386
2387 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_deploy_ui_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2388 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2389
2390 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2391 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2392 }
2393 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2394 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2395 };
2396 local_var_req_builder = local_var_req_builder.json(&edit_workspace_deploy_ui_settings_request);
2397
2398 let local_var_req = local_var_req_builder.build()?;
2399 let local_var_resp = local_var_client.execute(local_var_req).await?;
2400
2401 let local_var_status = local_var_resp.status();
2402 let local_var_content = local_var_resp.text().await?;
2403
2404 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2405 crate::from_str_patched(&local_var_content).map_err(Error::from)
2406 } else {
2407 let local_var_entity: Option<EditWorkspaceDeployUiSettingsError> = crate::from_str_patched(&local_var_content).ok();
2408 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2409 Err(Error::ResponseError(local_var_error))
2410 }
2411}
2412
2413pub async fn edit_workspace_git_sync_config(configuration: &configuration::Configuration, workspace: &str, edit_workspace_git_sync_config_request: models::EditWorkspaceGitSyncConfigRequest) -> Result<serde_json::Value, Error<EditWorkspaceGitSyncConfigError>> {
2414 let local_var_configuration = configuration;
2415
2416 let local_var_client = &local_var_configuration.client;
2417
2418 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_git_sync_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2419 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2420
2421 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2422 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2423 }
2424 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2425 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2426 };
2427 local_var_req_builder = local_var_req_builder.json(&edit_workspace_git_sync_config_request);
2428
2429 let local_var_req = local_var_req_builder.build()?;
2430 let local_var_resp = local_var_client.execute(local_var_req).await?;
2431
2432 let local_var_status = local_var_resp.status();
2433 let local_var_content = local_var_resp.text().await?;
2434
2435 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2436 crate::from_str_patched(&local_var_content).map_err(Error::from)
2437 } else {
2438 let local_var_entity: Option<EditWorkspaceGitSyncConfigError> = crate::from_str_patched(&local_var_content).ok();
2439 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2440 Err(Error::ResponseError(local_var_error))
2441 }
2442}
2443
2444pub async fn enable_datatable_migrations(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str) -> Result<String, Error<EnableDatatableMigrationsError>> {
2445 let local_var_configuration = configuration;
2446
2447 let local_var_client = &local_var_configuration.client;
2448
2449 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/enable_datatable_migrations/{datatable_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name));
2450 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2451
2452 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2453 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2454 }
2455 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2456 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2457 };
2458
2459 let local_var_req = local_var_req_builder.build()?;
2460 let local_var_resp = local_var_client.execute(local_var_req).await?;
2461
2462 let local_var_status = local_var_resp.status();
2463 let local_var_content = local_var_resp.text().await?;
2464
2465 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2466 crate::from_str_patched(&local_var_content).map_err(Error::from)
2467 } else {
2468 let local_var_entity: Option<EnableDatatableMigrationsError> = crate::from_str_patched(&local_var_content).ok();
2469 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2470 Err(Error::ResponseError(local_var_error))
2471 }
2472}
2473
2474pub async fn exists_username(configuration: &configuration::Configuration, exists_username_request: models::ExistsUsernameRequest) -> Result<bool, Error<ExistsUsernameError>> {
2475 let local_var_configuration = configuration;
2476
2477 let local_var_client = &local_var_configuration.client;
2478
2479 let local_var_uri_str = format!("{}/workspaces/exists_username", local_var_configuration.base_path);
2480 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2481
2482 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2483 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2484 }
2485 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2486 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2487 };
2488 local_var_req_builder = local_var_req_builder.json(&exists_username_request);
2489
2490 let local_var_req = local_var_req_builder.build()?;
2491 let local_var_resp = local_var_client.execute(local_var_req).await?;
2492
2493 let local_var_status = local_var_resp.status();
2494 let local_var_content = local_var_resp.text().await?;
2495
2496 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2497 crate::from_str_patched(&local_var_content).map_err(Error::from)
2498 } else {
2499 let local_var_entity: Option<ExistsUsernameError> = crate::from_str_patched(&local_var_content).ok();
2500 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2501 Err(Error::ResponseError(local_var_error))
2502 }
2503}
2504
2505pub async fn exists_workspace(configuration: &configuration::Configuration, exists_workspace_request: models::ExistsWorkspaceRequest) -> Result<bool, Error<ExistsWorkspaceError>> {
2506 let local_var_configuration = configuration;
2507
2508 let local_var_client = &local_var_configuration.client;
2509
2510 let local_var_uri_str = format!("{}/workspaces/exists", local_var_configuration.base_path);
2511 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2512
2513 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2514 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2515 }
2516 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2517 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2518 };
2519 local_var_req_builder = local_var_req_builder.json(&exists_workspace_request);
2520
2521 let local_var_req = local_var_req_builder.build()?;
2522 let local_var_resp = local_var_client.execute(local_var_req).await?;
2523
2524 let local_var_status = local_var_resp.status();
2525 let local_var_content = local_var_resp.text().await?;
2526
2527 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2528 crate::from_str_patched(&local_var_content).map_err(Error::from)
2529 } else {
2530 let local_var_entity: Option<ExistsWorkspaceError> = crate::from_str_patched(&local_var_content).ok();
2531 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2532 Err(Error::ResponseError(local_var_error))
2533 }
2534}
2535
2536pub async fn export_pg_schema(configuration: &configuration::Configuration, workspace: &str, export_pg_schema_request: models::ExportPgSchemaRequest) -> Result<String, Error<ExportPgSchemaError>> {
2537 let local_var_configuration = configuration;
2538
2539 let local_var_client = &local_var_configuration.client;
2540
2541 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/export_pg_schema", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2542 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2543
2544 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2545 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2546 }
2547 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2548 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2549 };
2550 local_var_req_builder = local_var_req_builder.json(&export_pg_schema_request);
2551
2552 let local_var_req = local_var_req_builder.build()?;
2553 let local_var_resp = local_var_client.execute(local_var_req).await?;
2554
2555 let local_var_status = local_var_resp.status();
2556 let local_var_content = local_var_resp.text().await?;
2557
2558 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2559 crate::from_str_patched(&local_var_content).map_err(Error::from)
2560 } else {
2561 let local_var_entity: Option<ExportPgSchemaError> = crate::from_str_patched(&local_var_content).ok();
2562 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2563 Err(Error::ResponseError(local_var_error))
2564 }
2565}
2566
2567pub async fn generate_initial_datatable_migration(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str) -> Result<models::DatatableMigration, Error<GenerateInitialDatatableMigrationError>> {
2568 let local_var_configuration = configuration;
2569
2570 let local_var_client = &local_var_configuration.client;
2571
2572 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/generate_initial_datatable_migration/{datatable_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name));
2573 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2574
2575 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2576 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2577 }
2578 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2579 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2580 };
2581
2582 let local_var_req = local_var_req_builder.build()?;
2583 let local_var_resp = local_var_client.execute(local_var_req).await?;
2584
2585 let local_var_status = local_var_resp.status();
2586 let local_var_content = local_var_resp.text().await?;
2587
2588 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2589 crate::from_str_patched(&local_var_content).map_err(Error::from)
2590 } else {
2591 let local_var_entity: Option<GenerateInitialDatatableMigrationError> = crate::from_str_patched(&local_var_content).ok();
2592 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2593 Err(Error::ResponseError(local_var_error))
2594 }
2595}
2596
2597pub async fn get_billable_seats(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetBillableSeats200Response, Error<GetBillableSeatsError>> {
2598 let local_var_configuration = configuration;
2599
2600 let local_var_client = &local_var_configuration.client;
2601
2602 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/billable_seats", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2603 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2604
2605 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2606 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2607 }
2608 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2609 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2610 };
2611
2612 let local_var_req = local_var_req_builder.build()?;
2613 let local_var_resp = local_var_client.execute(local_var_req).await?;
2614
2615 let local_var_status = local_var_resp.status();
2616 let local_var_content = local_var_resp.text().await?;
2617
2618 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2619 crate::from_str_patched(&local_var_content).map_err(Error::from)
2620 } else {
2621 let local_var_entity: Option<GetBillableSeatsError> = crate::from_str_patched(&local_var_content).ok();
2622 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2623 Err(Error::ResponseError(local_var_error))
2624 }
2625}
2626
2627pub async fn get_cloud_quotas(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetCloudQuotas200Response, Error<GetCloudQuotasError>> {
2628 let local_var_configuration = configuration;
2629
2630 let local_var_client = &local_var_configuration.client;
2631
2632 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/cloud_quotas", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2633 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2634
2635 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2636 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2637 }
2638 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2639 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2640 };
2641
2642 let local_var_req = local_var_req_builder.build()?;
2643 let local_var_resp = local_var_client.execute(local_var_req).await?;
2644
2645 let local_var_status = local_var_resp.status();
2646 let local_var_content = local_var_resp.text().await?;
2647
2648 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2649 crate::from_str_patched(&local_var_content).map_err(Error::from)
2650 } else {
2651 let local_var_entity: Option<GetCloudQuotasError> = crate::from_str_patched(&local_var_content).ok();
2652 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2653 Err(Error::ResponseError(local_var_error))
2654 }
2655}
2656
2657pub async fn get_copilot_info(configuration: &configuration::Configuration, workspace: &str) -> Result<models::AiConfig, Error<GetCopilotInfoError>> {
2658 let local_var_configuration = configuration;
2659
2660 let local_var_client = &local_var_configuration.client;
2661
2662 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_copilot_info", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2663 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2664
2665 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2666 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2667 }
2668 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2669 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2670 };
2671
2672 let local_var_req = local_var_req_builder.build()?;
2673 let local_var_resp = local_var_client.execute(local_var_req).await?;
2674
2675 let local_var_status = local_var_resp.status();
2676 let local_var_content = local_var_resp.text().await?;
2677
2678 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2679 crate::from_str_patched(&local_var_content).map_err(Error::from)
2680 } else {
2681 let local_var_entity: Option<GetCopilotInfoError> = crate::from_str_patched(&local_var_content).ok();
2682 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2683 Err(Error::ResponseError(local_var_error))
2684 }
2685}
2686
2687pub async fn get_copilot_settings_state(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetCopilotSettingsState200Response, Error<GetCopilotSettingsStateError>> {
2688 let local_var_configuration = configuration;
2689
2690 let local_var_client = &local_var_configuration.client;
2691
2692 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_copilot_settings_state", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2693 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2694
2695 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2696 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2697 }
2698 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2699 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2700 };
2701
2702 let local_var_req = local_var_req_builder.build()?;
2703 let local_var_resp = local_var_client.execute(local_var_req).await?;
2704
2705 let local_var_status = local_var_resp.status();
2706 let local_var_content = local_var_resp.text().await?;
2707
2708 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2709 crate::from_str_patched(&local_var_content).map_err(Error::from)
2710 } else {
2711 let local_var_entity: Option<GetCopilotSettingsStateError> = crate::from_str_patched(&local_var_content).ok();
2712 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2713 Err(Error::ResponseError(local_var_error))
2714 }
2715}
2716
2717pub async fn get_data_table_table_schema(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str, schema_name: &str, table_name: &str) -> Result<models::DataTableTableSchema, Error<GetDataTableTableSchemaError>> {
2718 let local_var_configuration = configuration;
2719
2720 let local_var_client = &local_var_configuration.client;
2721
2722 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_datatable_table_schema", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2723 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2724
2725 local_var_req_builder = local_var_req_builder.query(&[("datatable_name", &datatable_name.to_string())]);
2726 local_var_req_builder = local_var_req_builder.query(&[("schema_name", &schema_name.to_string())]);
2727 local_var_req_builder = local_var_req_builder.query(&[("table_name", &table_name.to_string())]);
2728 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2729 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2730 }
2731 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2732 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2733 };
2734
2735 let local_var_req = local_var_req_builder.build()?;
2736 let local_var_resp = local_var_client.execute(local_var_req).await?;
2737
2738 let local_var_status = local_var_resp.status();
2739 let local_var_content = local_var_resp.text().await?;
2740
2741 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2742 crate::from_str_patched(&local_var_content).map_err(Error::from)
2743 } else {
2744 let local_var_entity: Option<GetDataTableTableSchemaError> = crate::from_str_patched(&local_var_content).ok();
2745 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2746 Err(Error::ResponseError(local_var_error))
2747 }
2748}
2749
2750pub async fn get_datatable_full_schema(configuration: &configuration::Configuration, workspace: &str, get_datatable_full_schema_request: models::GetDatatableFullSchemaRequest) -> Result<std::collections::HashMap<String, std::collections::HashMap<String, models::GetDatatableFullSchema200ResponseValueValue>>, Error<GetDatatableFullSchemaError>> {
2751 let local_var_configuration = configuration;
2752
2753 let local_var_client = &local_var_configuration.client;
2754
2755 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_datatable_full_schema", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2756 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2757
2758 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2759 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2760 }
2761 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2762 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2763 };
2764 local_var_req_builder = local_var_req_builder.json(&get_datatable_full_schema_request);
2765
2766 let local_var_req = local_var_req_builder.build()?;
2767 let local_var_resp = local_var_client.execute(local_var_req).await?;
2768
2769 let local_var_status = local_var_resp.status();
2770 let local_var_content = local_var_resp.text().await?;
2771
2772 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2773 crate::from_str_patched(&local_var_content).map_err(Error::from)
2774 } else {
2775 let local_var_entity: Option<GetDatatableFullSchemaError> = crate::from_str_patched(&local_var_content).ok();
2776 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2777 Err(Error::ResponseError(local_var_error))
2778 }
2779}
2780
2781pub async fn get_datatable_migrations_status(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str) -> Result<models::GetDatatableMigrationsStatus200Response, Error<GetDatatableMigrationsStatusError>> {
2782 let local_var_configuration = configuration;
2783
2784 let local_var_client = &local_var_configuration.client;
2785
2786 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/datatable_migrations_status/{datatable_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name));
2787 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2788
2789 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2790 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2791 }
2792 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2793 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2794 };
2795
2796 let local_var_req = local_var_req_builder.build()?;
2797 let local_var_resp = local_var_client.execute(local_var_req).await?;
2798
2799 let local_var_status = local_var_resp.status();
2800 let local_var_content = local_var_resp.text().await?;
2801
2802 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2803 crate::from_str_patched(&local_var_content).map_err(Error::from)
2804 } else {
2805 let local_var_entity: Option<GetDatatableMigrationsStatusError> = crate::from_str_patched(&local_var_content).ok();
2806 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2807 Err(Error::ResponseError(local_var_error))
2808 }
2809}
2810
2811pub async fn get_default_scripts(configuration: &configuration::Configuration, workspace: &str) -> Result<models::WorkspaceDefaultScripts, Error<GetDefaultScriptsError>> {
2812 let local_var_configuration = configuration;
2813
2814 let local_var_client = &local_var_configuration.client;
2815
2816 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/default_scripts", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2817 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2818
2819 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2820 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2821 }
2822 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2823 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2824 };
2825
2826 let local_var_req = local_var_req_builder.build()?;
2827 let local_var_resp = local_var_client.execute(local_var_req).await?;
2828
2829 let local_var_status = local_var_resp.status();
2830 let local_var_content = local_var_resp.text().await?;
2831
2832 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2833 crate::from_str_patched(&local_var_content).map_err(Error::from)
2834 } else {
2835 let local_var_entity: Option<GetDefaultScriptsError> = crate::from_str_patched(&local_var_content).ok();
2836 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2837 Err(Error::ResponseError(local_var_error))
2838 }
2839}
2840
2841pub async fn get_dependency_map(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::DependencyMap>, Error<GetDependencyMapError>> {
2842 let local_var_configuration = configuration;
2843
2844 let local_var_client = &local_var_configuration.client;
2845
2846 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_dependency_map", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2847 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2848
2849 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2850 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2851 }
2852 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2853 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2854 };
2855
2856 let local_var_req = local_var_req_builder.build()?;
2857 let local_var_resp = local_var_client.execute(local_var_req).await?;
2858
2859 let local_var_status = local_var_resp.status();
2860 let local_var_content = local_var_resp.text().await?;
2861
2862 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2863 crate::from_str_patched(&local_var_content).map_err(Error::from)
2864 } else {
2865 let local_var_entity: Option<GetDependencyMapError> = crate::from_str_patched(&local_var_content).ok();
2866 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2867 Err(Error::ResponseError(local_var_error))
2868 }
2869}
2870
2871pub async fn get_dependents(configuration: &configuration::Configuration, workspace: &str, imported_path: &str) -> Result<Vec<models::DependencyDependent>, Error<GetDependentsError>> {
2872 let local_var_configuration = configuration;
2873
2874 let local_var_client = &local_var_configuration.client;
2875
2876 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_dependents/{imported_path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), imported_path=crate::apis::urlencode(imported_path));
2877 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2878
2879 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2880 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2881 }
2882 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2883 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2884 };
2885
2886 let local_var_req = local_var_req_builder.build()?;
2887 let local_var_resp = local_var_client.execute(local_var_req).await?;
2888
2889 let local_var_status = local_var_resp.status();
2890 let local_var_content = local_var_resp.text().await?;
2891
2892 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2893 crate::from_str_patched(&local_var_content).map_err(Error::from)
2894 } else {
2895 let local_var_entity: Option<GetDependentsError> = crate::from_str_patched(&local_var_content).ok();
2896 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2897 Err(Error::ResponseError(local_var_error))
2898 }
2899}
2900
2901pub async fn get_dependents_amounts(configuration: &configuration::Configuration, workspace: &str, request_body: Vec<String>) -> Result<Vec<models::DependentsAmount>, Error<GetDependentsAmountsError>> {
2902 let local_var_configuration = configuration;
2903
2904 let local_var_client = &local_var_configuration.client;
2905
2906 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_dependents_amounts", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2907 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2908
2909 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2910 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2911 }
2912 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2913 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2914 };
2915 local_var_req_builder = local_var_req_builder.json(&request_body);
2916
2917 let local_var_req = local_var_req_builder.build()?;
2918 let local_var_resp = local_var_client.execute(local_var_req).await?;
2919
2920 let local_var_status = local_var_resp.status();
2921 let local_var_content = local_var_resp.text().await?;
2922
2923 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2924 crate::from_str_patched(&local_var_content).map_err(Error::from)
2925 } else {
2926 let local_var_entity: Option<GetDependentsAmountsError> = crate::from_str_patched(&local_var_content).ok();
2927 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2928 Err(Error::ResponseError(local_var_error))
2929 }
2930}
2931
2932pub async fn get_deploy_to(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetDeployTo200Response, Error<GetDeployToError>> {
2933 let local_var_configuration = configuration;
2934
2935 let local_var_client = &local_var_configuration.client;
2936
2937 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_deploy_to", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2938 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2939
2940 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2941 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2942 }
2943 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2944 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2945 };
2946
2947 let local_var_req = local_var_req_builder.build()?;
2948 let local_var_resp = local_var_client.execute(local_var_req).await?;
2949
2950 let local_var_status = local_var_resp.status();
2951 let local_var_content = local_var_resp.text().await?;
2952
2953 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2954 crate::from_str_patched(&local_var_content).map_err(Error::from)
2955 } else {
2956 let local_var_entity: Option<GetDeployToError> = crate::from_str_patched(&local_var_content).ok();
2957 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2958 Err(Error::ResponseError(local_var_error))
2959 }
2960}
2961
2962pub async fn get_dev_workspace(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetDevWorkspace200Response, Error<GetDevWorkspaceError>> {
2963 let local_var_configuration = configuration;
2964
2965 let local_var_client = &local_var_configuration.client;
2966
2967 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_dev_workspace", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2968 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2969
2970 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2971 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2972 }
2973 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2974 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2975 };
2976
2977 let local_var_req = local_var_req_builder.build()?;
2978 let local_var_resp = local_var_client.execute(local_var_req).await?;
2979
2980 let local_var_status = local_var_resp.status();
2981 let local_var_content = local_var_resp.text().await?;
2982
2983 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2984 crate::from_str_patched(&local_var_content).map_err(Error::from)
2985 } else {
2986 let local_var_entity: Option<GetDevWorkspaceError> = crate::from_str_patched(&local_var_content).ok();
2987 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2988 Err(Error::ResponseError(local_var_error))
2989 }
2990}
2991
2992pub async fn get_git_sync_deploy_mode(configuration: &configuration::Configuration, workspace: &str, branch: Option<&str>) -> Result<models::GetGitSyncDeployMode200Response, Error<GetGitSyncDeployModeError>> {
2993 let local_var_configuration = configuration;
2994
2995 let local_var_client = &local_var_configuration.client;
2996
2997 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/git_sync_deploy_mode", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2998 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2999
3000 if let Some(ref local_var_str) = branch {
3001 local_var_req_builder = local_var_req_builder.query(&[("branch", &local_var_str.to_string())]);
3002 }
3003 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3004 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3005 }
3006 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3007 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3008 };
3009
3010 let local_var_req = local_var_req_builder.build()?;
3011 let local_var_resp = local_var_client.execute(local_var_req).await?;
3012
3013 let local_var_status = local_var_resp.status();
3014 let local_var_content = local_var_resp.text().await?;
3015
3016 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3017 crate::from_str_patched(&local_var_content).map_err(Error::from)
3018 } else {
3019 let local_var_entity: Option<GetGitSyncDeployModeError> = crate::from_str_patched(&local_var_content).ok();
3020 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3021 Err(Error::ResponseError(local_var_error))
3022 }
3023}
3024
3025pub async fn get_git_sync_enabled(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetGitSyncEnabled200Response, Error<GetGitSyncEnabledError>> {
3026 let local_var_configuration = configuration;
3027
3028 let local_var_client = &local_var_configuration.client;
3029
3030 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/git_sync_enabled", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3031 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3032
3033 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3034 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3035 }
3036 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3037 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3038 };
3039
3040 let local_var_req = local_var_req_builder.build()?;
3041 let local_var_resp = local_var_client.execute(local_var_req).await?;
3042
3043 let local_var_status = local_var_resp.status();
3044 let local_var_content = local_var_resp.text().await?;
3045
3046 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3047 crate::from_str_patched(&local_var_content).map_err(Error::from)
3048 } else {
3049 let local_var_entity: Option<GetGitSyncEnabledError> = crate::from_str_patched(&local_var_content).ok();
3050 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3051 Err(Error::ResponseError(local_var_error))
3052 }
3053}
3054
3055pub async fn get_github_app_repo_archive(configuration: &configuration::Configuration, workspace: &str, path: &str, r#ref: Option<&str>) -> Result<std::path::PathBuf, Error<GetGithubAppRepoArchiveError>> {
3056 let local_var_configuration = configuration;
3057
3058 let local_var_client = &local_var_configuration.client;
3059
3060 let local_var_uri_str = format!("{}/w/{workspace}/github_app/repo_archive/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
3061 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3062
3063 if let Some(ref local_var_str) = r#ref {
3064 local_var_req_builder = local_var_req_builder.query(&[("ref", &local_var_str.to_string())]);
3065 }
3066 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3067 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3068 }
3069 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3070 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3071 };
3072
3073 let local_var_req = local_var_req_builder.build()?;
3074 let local_var_resp = local_var_client.execute(local_var_req).await?;
3075
3076 let local_var_status = local_var_resp.status();
3077 let local_var_content = local_var_resp.text().await?;
3078
3079 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3080 crate::from_str_patched(&local_var_content).map_err(Error::from)
3081 } else {
3082 let local_var_entity: Option<GetGithubAppRepoArchiveError> = crate::from_str_patched(&local_var_content).ok();
3083 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3084 Err(Error::ResponseError(local_var_error))
3085 }
3086}
3087
3088pub async fn get_github_app_token(configuration: &configuration::Configuration, workspace: &str, get_github_app_token_request: models::GetGithubAppTokenRequest) -> Result<models::GetGithubAppToken200Response, Error<GetGithubAppTokenError>> {
3089 let local_var_configuration = configuration;
3090
3091 let local_var_client = &local_var_configuration.client;
3092
3093 let local_var_uri_str = format!("{}/w/{workspace}/github_app/token", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3094 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3095
3096 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3097 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3098 }
3099 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3100 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3101 };
3102 local_var_req_builder = local_var_req_builder.json(&get_github_app_token_request);
3103
3104 let local_var_req = local_var_req_builder.build()?;
3105 let local_var_resp = local_var_client.execute(local_var_req).await?;
3106
3107 let local_var_status = local_var_resp.status();
3108 let local_var_content = local_var_resp.text().await?;
3109
3110 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3111 crate::from_str_patched(&local_var_content).map_err(Error::from)
3112 } else {
3113 let local_var_entity: Option<GetGithubAppTokenError> = crate::from_str_patched(&local_var_content).ok();
3114 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3115 Err(Error::ResponseError(local_var_error))
3116 }
3117}
3118
3119pub async fn get_guest_usage(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GuestUsage, Error<GetGuestUsageError>> {
3121 let local_var_configuration = configuration;
3122
3123 let local_var_client = &local_var_configuration.client;
3124
3125 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/guest_usage", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3126 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3127
3128 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3129 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3130 }
3131 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3132 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3133 };
3134
3135 let local_var_req = local_var_req_builder.build()?;
3136 let local_var_resp = local_var_client.execute(local_var_req).await?;
3137
3138 let local_var_status = local_var_resp.status();
3139 let local_var_content = local_var_resp.text().await?;
3140
3141 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3142 crate::from_str_patched(&local_var_content).map_err(Error::from)
3143 } else {
3144 let local_var_entity: Option<GetGuestUsageError> = crate::from_str_patched(&local_var_content).ok();
3145 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3146 Err(Error::ResponseError(local_var_error))
3147 }
3148}
3149
3150pub async fn get_imports(configuration: &configuration::Configuration, workspace: &str, importer_path: &str) -> Result<Vec<String>, Error<GetImportsError>> {
3151 let local_var_configuration = configuration;
3152
3153 let local_var_client = &local_var_configuration.client;
3154
3155 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_imports/{importer_path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), importer_path=crate::apis::urlencode(importer_path));
3156 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3157
3158 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3159 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3160 }
3161 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3162 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3163 };
3164
3165 let local_var_req = local_var_req_builder.build()?;
3166 let local_var_resp = local_var_client.execute(local_var_req).await?;
3167
3168 let local_var_status = local_var_resp.status();
3169 let local_var_content = local_var_resp.text().await?;
3170
3171 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3172 crate::from_str_patched(&local_var_content).map_err(Error::from)
3173 } else {
3174 let local_var_entity: Option<GetImportsError> = crate::from_str_patched(&local_var_content).ok();
3175 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3176 Err(Error::ResponseError(local_var_error))
3177 }
3178}
3179
3180pub async fn get_is_premium(configuration: &configuration::Configuration, workspace: &str) -> Result<bool, Error<GetIsPremiumError>> {
3181 let local_var_configuration = configuration;
3182
3183 let local_var_client = &local_var_configuration.client;
3184
3185 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/is_premium", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3186 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3187
3188 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3189 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3190 }
3191 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3192 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3193 };
3194
3195 let local_var_req = local_var_req_builder.build()?;
3196 let local_var_resp = local_var_client.execute(local_var_req).await?;
3197
3198 let local_var_status = local_var_resp.status();
3199 let local_var_content = local_var_resp.text().await?;
3200
3201 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3202 crate::from_str_patched(&local_var_content).map_err(Error::from)
3203 } else {
3204 let local_var_entity: Option<GetIsPremiumError> = crate::from_str_patched(&local_var_content).ok();
3205 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3206 Err(Error::ResponseError(local_var_error))
3207 }
3208}
3209
3210pub async fn get_open_deployment_request(configuration: &configuration::Configuration, workspace: &str) -> Result<models::DeploymentRequest, Error<GetOpenDeploymentRequestError>> {
3211 let local_var_configuration = configuration;
3212
3213 let local_var_client = &local_var_configuration.client;
3214
3215 let local_var_uri_str = format!("{}/w/{workspace}/deployment_request/open", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3216 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3217
3218 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3219 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3220 }
3221 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3222 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3223 };
3224
3225 let local_var_req = local_var_req_builder.build()?;
3226 let local_var_resp = local_var_client.execute(local_var_req).await?;
3227
3228 let local_var_status = local_var_resp.status();
3229 let local_var_content = local_var_resp.text().await?;
3230
3231 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3232 crate::from_str_patched(&local_var_content).map_err(Error::from)
3233 } else {
3234 let local_var_entity: Option<GetOpenDeploymentRequestError> = crate::from_str_patched(&local_var_content).ok();
3235 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3236 Err(Error::ResponseError(local_var_error))
3237 }
3238}
3239
3240pub async fn get_premium_info(configuration: &configuration::Configuration, workspace: &str, skip_subscription_fetch: Option<bool>) -> Result<models::GetPremiumInfo200Response, Error<GetPremiumInfoError>> {
3241 let local_var_configuration = configuration;
3242
3243 let local_var_client = &local_var_configuration.client;
3244
3245 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/premium_info", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3246 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3247
3248 if let Some(ref local_var_str) = skip_subscription_fetch {
3249 local_var_req_builder = local_var_req_builder.query(&[("skip_subscription_fetch", &local_var_str.to_string())]);
3250 }
3251 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3252 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3253 }
3254 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3255 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3256 };
3257
3258 let local_var_req = local_var_req_builder.build()?;
3259 let local_var_resp = local_var_client.execute(local_var_req).await?;
3260
3261 let local_var_status = local_var_resp.status();
3262 let local_var_content = local_var_resp.text().await?;
3263
3264 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3265 crate::from_str_patched(&local_var_content).map_err(Error::from)
3266 } else {
3267 let local_var_entity: Option<GetPremiumInfoError> = crate::from_str_patched(&local_var_content).ok();
3268 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3269 Err(Error::ResponseError(local_var_error))
3270 }
3271}
3272
3273pub async fn get_public_settings(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetPublicSettings200Response, Error<GetPublicSettingsError>> {
3275 let local_var_configuration = configuration;
3276
3277 let local_var_client = &local_var_configuration.client;
3278
3279 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_public_settings", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3280 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3281
3282 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3283 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3284 }
3285 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3286 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3287 };
3288
3289 let local_var_req = local_var_req_builder.build()?;
3290 let local_var_resp = local_var_client.execute(local_var_req).await?;
3291
3292 let local_var_status = local_var_resp.status();
3293 let local_var_content = local_var_resp.text().await?;
3294
3295 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3296 crate::from_str_patched(&local_var_content).map_err(Error::from)
3297 } else {
3298 let local_var_entity: Option<GetPublicSettingsError> = crate::from_str_patched(&local_var_content).ok();
3299 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3300 Err(Error::ResponseError(local_var_error))
3301 }
3302}
3303
3304pub async fn get_session_workspace_status(configuration: &configuration::Configuration, get_session_workspace_status_request: models::GetSessionWorkspaceStatusRequest) -> Result<std::collections::HashMap<String, String>, Error<GetSessionWorkspaceStatusError>> {
3305 let local_var_configuration = configuration;
3306
3307 let local_var_client = &local_var_configuration.client;
3308
3309 let local_var_uri_str = format!("{}/workspaces/session_workspace_status", local_var_configuration.base_path);
3310 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3311
3312 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3313 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3314 }
3315 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3316 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3317 };
3318 local_var_req_builder = local_var_req_builder.json(&get_session_workspace_status_request);
3319
3320 let local_var_req = local_var_req_builder.build()?;
3321 let local_var_resp = local_var_client.execute(local_var_req).await?;
3322
3323 let local_var_status = local_var_resp.status();
3324 let local_var_content = local_var_resp.text().await?;
3325
3326 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3327 crate::from_str_patched(&local_var_content).map_err(Error::from)
3328 } else {
3329 let local_var_entity: Option<GetSessionWorkspaceStatusError> = crate::from_str_patched(&local_var_content).ok();
3330 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3331 Err(Error::ResponseError(local_var_error))
3332 }
3333}
3334
3335pub async fn get_settings(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetSettings200Response, Error<GetSettingsError>> {
3337 let local_var_configuration = configuration;
3338
3339 let local_var_client = &local_var_configuration.client;
3340
3341 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_settings", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3342 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3343
3344 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3345 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3346 }
3347 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3348 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3349 };
3350
3351 let local_var_req = local_var_req_builder.build()?;
3352 let local_var_resp = local_var_client.execute(local_var_req).await?;
3353
3354 let local_var_status = local_var_resp.status();
3355 let local_var_content = local_var_resp.text().await?;
3356
3357 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3358 crate::from_str_patched(&local_var_content).map_err(Error::from)
3359 } else {
3360 let local_var_entity: Option<GetSettingsError> = crate::from_str_patched(&local_var_content).ok();
3361 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3362 Err(Error::ResponseError(local_var_error))
3363 }
3364}
3365
3366pub async fn get_shared_ui(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetSharedUi200Response, Error<GetSharedUiError>> {
3367 let local_var_configuration = configuration;
3368
3369 let local_var_client = &local_var_configuration.client;
3370
3371 let local_var_uri_str = format!("{}/w/{workspace}/shared_ui/get", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3372 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3373
3374 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3375 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3376 }
3377 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3378 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3379 };
3380
3381 let local_var_req = local_var_req_builder.build()?;
3382 let local_var_resp = local_var_client.execute(local_var_req).await?;
3383
3384 let local_var_status = local_var_resp.status();
3385 let local_var_content = local_var_resp.text().await?;
3386
3387 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3388 crate::from_str_patched(&local_var_content).map_err(Error::from)
3389 } else {
3390 let local_var_entity: Option<GetSharedUiError> = crate::from_str_patched(&local_var_content).ok();
3391 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3392 Err(Error::ResponseError(local_var_error))
3393 }
3394}
3395
3396pub async fn get_shared_ui_version(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetSharedUiVersion200Response, Error<GetSharedUiVersionError>> {
3397 let local_var_configuration = configuration;
3398
3399 let local_var_client = &local_var_configuration.client;
3400
3401 let local_var_uri_str = format!("{}/w/{workspace}/shared_ui/version", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3402 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3403
3404 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3405 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3406 }
3407 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3408 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3409 };
3410
3411 let local_var_req = local_var_req_builder.build()?;
3412 let local_var_resp = local_var_client.execute(local_var_req).await?;
3413
3414 let local_var_status = local_var_resp.status();
3415 let local_var_content = local_var_resp.text().await?;
3416
3417 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3418 crate::from_str_patched(&local_var_content).map_err(Error::from)
3419 } else {
3420 let local_var_entity: Option<GetSharedUiVersionError> = crate::from_str_patched(&local_var_content).ok();
3421 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3422 Err(Error::ResponseError(local_var_error))
3423 }
3424}
3425
3426pub async fn get_threshold_alert(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetThresholdAlert200Response, Error<GetThresholdAlertError>> {
3427 let local_var_configuration = configuration;
3428
3429 let local_var_client = &local_var_configuration.client;
3430
3431 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/threshold_alert", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3432 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3433
3434 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3435 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3436 }
3437 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3438 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3439 };
3440
3441 let local_var_req = local_var_req_builder.build()?;
3442 let local_var_resp = local_var_client.execute(local_var_req).await?;
3443
3444 let local_var_status = local_var_resp.status();
3445 let local_var_content = local_var_resp.text().await?;
3446
3447 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3448 crate::from_str_patched(&local_var_content).map_err(Error::from)
3449 } else {
3450 let local_var_entity: Option<GetThresholdAlertError> = crate::from_str_patched(&local_var_content).ok();
3451 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3452 Err(Error::ResponseError(local_var_error))
3453 }
3454}
3455
3456pub async fn get_used_triggers(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetUsedTriggers200Response, Error<GetUsedTriggersError>> {
3457 let local_var_configuration = configuration;
3458
3459 let local_var_client = &local_var_configuration.client;
3460
3461 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/used_triggers", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3462 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3463
3464 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3465 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3466 }
3467 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3468 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3469 };
3470
3471 let local_var_req = local_var_req_builder.build()?;
3472 let local_var_resp = local_var_client.execute(local_var_req).await?;
3473
3474 let local_var_status = local_var_resp.status();
3475 let local_var_content = local_var_resp.text().await?;
3476
3477 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3478 crate::from_str_patched(&local_var_content).map_err(Error::from)
3479 } else {
3480 let local_var_entity: Option<GetUsedTriggersError> = crate::from_str_patched(&local_var_content).ok();
3481 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3482 Err(Error::ResponseError(local_var_error))
3483 }
3484}
3485
3486pub async fn get_workspace_as_super_admin(configuration: &configuration::Configuration, workspace: &str) -> Result<models::Workspace, Error<GetWorkspaceAsSuperAdminError>> {
3487 let local_var_configuration = configuration;
3488
3489 let local_var_client = &local_var_configuration.client;
3490
3491 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_as_superadmin", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3492 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3493
3494 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3495 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3496 }
3497 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3498 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3499 };
3500
3501 let local_var_req = local_var_req_builder.build()?;
3502 let local_var_resp = local_var_client.execute(local_var_req).await?;
3503
3504 let local_var_status = local_var_resp.status();
3505 let local_var_content = local_var_resp.text().await?;
3506
3507 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3508 crate::from_str_patched(&local_var_content).map_err(Error::from)
3509 } else {
3510 let local_var_entity: Option<GetWorkspaceAsSuperAdminError> = crate::from_str_patched(&local_var_content).ok();
3511 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3512 Err(Error::ResponseError(local_var_error))
3513 }
3514}
3515
3516pub async fn get_workspace_default_app(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetWorkspaceDefaultApp200Response, Error<GetWorkspaceDefaultAppError>> {
3517 let local_var_configuration = configuration;
3518
3519 let local_var_client = &local_var_configuration.client;
3520
3521 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/default_app", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3522 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3523
3524 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3525 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3526 }
3527 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3528 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3529 };
3530
3531 let local_var_req = local_var_req_builder.build()?;
3532 let local_var_resp = local_var_client.execute(local_var_req).await?;
3533
3534 let local_var_status = local_var_resp.status();
3535 let local_var_content = local_var_resp.text().await?;
3536
3537 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3538 crate::from_str_patched(&local_var_content).map_err(Error::from)
3539 } else {
3540 let local_var_entity: Option<GetWorkspaceDefaultAppError> = crate::from_str_patched(&local_var_content).ok();
3541 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3542 Err(Error::ResponseError(local_var_error))
3543 }
3544}
3545
3546pub async fn get_workspace_encryption_key(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetWorkspaceEncryptionKey200Response, Error<GetWorkspaceEncryptionKeyError>> {
3547 let local_var_configuration = configuration;
3548
3549 let local_var_client = &local_var_configuration.client;
3550
3551 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/encryption_key", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3552 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3553
3554 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3555 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3556 }
3557 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3558 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3559 };
3560
3561 let local_var_req = local_var_req_builder.build()?;
3562 let local_var_resp = local_var_client.execute(local_var_req).await?;
3563
3564 let local_var_status = local_var_resp.status();
3565 let local_var_content = local_var_resp.text().await?;
3566
3567 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3568 crate::from_str_patched(&local_var_content).map_err(Error::from)
3569 } else {
3570 let local_var_entity: Option<GetWorkspaceEncryptionKeyError> = crate::from_str_patched(&local_var_content).ok();
3571 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3572 Err(Error::ResponseError(local_var_error))
3573 }
3574}
3575
3576pub async fn get_workspace_name(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<GetWorkspaceNameError>> {
3577 let local_var_configuration = configuration;
3578
3579 let local_var_client = &local_var_configuration.client;
3580
3581 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_workspace_name", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3582 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3583
3584 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3585 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3586 }
3587 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3588 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3589 };
3590
3591 let local_var_req = local_var_req_builder.build()?;
3592 let local_var_resp = local_var_client.execute(local_var_req).await?;
3593
3594 let local_var_status = local_var_resp.status();
3595 let local_var_content = local_var_resp.text().await?;
3596
3597 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3598 crate::from_str_patched(&local_var_content).map_err(Error::from)
3599 } else {
3600 let local_var_entity: Option<GetWorkspaceNameError> = crate::from_str_patched(&local_var_content).ok();
3601 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3602 Err(Error::ResponseError(local_var_error))
3603 }
3604}
3605
3606pub async fn get_workspace_slack_oauth_config(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetWorkspaceSlackOauthConfig200Response, Error<GetWorkspaceSlackOauthConfigError>> {
3607 let local_var_configuration = configuration;
3608
3609 let local_var_client = &local_var_configuration.client;
3610
3611 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/slack_oauth_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3612 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3613
3614 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3615 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3616 }
3617 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3618 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3619 };
3620
3621 let local_var_req = local_var_req_builder.build()?;
3622 let local_var_resp = local_var_client.execute(local_var_req).await?;
3623
3624 let local_var_status = local_var_resp.status();
3625 let local_var_content = local_var_resp.text().await?;
3626
3627 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3628 crate::from_str_patched(&local_var_content).map_err(Error::from)
3629 } else {
3630 let local_var_entity: Option<GetWorkspaceSlackOauthConfigError> = crate::from_str_patched(&local_var_content).ok();
3631 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3632 Err(Error::ResponseError(local_var_error))
3633 }
3634}
3635
3636pub async fn get_workspace_usage(configuration: &configuration::Configuration, workspace: &str) -> Result<f64, Error<GetWorkspaceUsageError>> {
3637 let local_var_configuration = configuration;
3638
3639 let local_var_client = &local_var_configuration.client;
3640
3641 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/usage", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3642 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3643
3644 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3645 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3646 }
3647 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3648 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3649 };
3650
3651 let local_var_req = local_var_req_builder.build()?;
3652 let local_var_resp = local_var_client.execute(local_var_req).await?;
3653
3654 let local_var_status = local_var_resp.status();
3655 let local_var_content = local_var_resp.text().await?;
3656
3657 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3658 crate::from_str_patched(&local_var_content).map_err(Error::from)
3659 } else {
3660 let local_var_entity: Option<GetWorkspaceUsageError> = crate::from_str_patched(&local_var_content).ok();
3661 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3662 Err(Error::ResponseError(local_var_error))
3663 }
3664}
3665
3666pub async fn import_pg_database(configuration: &configuration::Configuration, workspace: &str, import_pg_database_request: models::ImportPgDatabaseRequest) -> Result<String, Error<ImportPgDatabaseError>> {
3667 let local_var_configuration = configuration;
3668
3669 let local_var_client = &local_var_configuration.client;
3670
3671 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/import_pg_database", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3672 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3673
3674 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3675 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3676 }
3677 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3678 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3679 };
3680 local_var_req_builder = local_var_req_builder.json(&import_pg_database_request);
3681
3682 let local_var_req = local_var_req_builder.build()?;
3683 let local_var_resp = local_var_client.execute(local_var_req).await?;
3684
3685 let local_var_status = local_var_resp.status();
3686 let local_var_content = local_var_resp.text().await?;
3687
3688 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3689 crate::from_str_patched(&local_var_content).map_err(Error::from)
3690 } else {
3691 let local_var_entity: Option<ImportPgDatabaseError> = crate::from_str_patched(&local_var_content).ok();
3692 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3693 Err(Error::ResponseError(local_var_error))
3694 }
3695}
3696
3697pub async fn invite_user(configuration: &configuration::Configuration, workspace: &str, invite_user_request: models::InviteUserRequest) -> Result<String, Error<InviteUserError>> {
3698 let local_var_configuration = configuration;
3699
3700 let local_var_client = &local_var_configuration.client;
3701
3702 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/invite_user", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3703 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3704
3705 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3706 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3707 }
3708 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3709 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3710 };
3711 local_var_req_builder = local_var_req_builder.json(&invite_user_request);
3712
3713 let local_var_req = local_var_req_builder.build()?;
3714 let local_var_resp = local_var_client.execute(local_var_req).await?;
3715
3716 let local_var_status = local_var_resp.status();
3717 let local_var_content = local_var_resp.text().await?;
3718
3719 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3720 crate::from_str_patched(&local_var_content).map_err(Error::from)
3721 } else {
3722 let local_var_entity: Option<InviteUserError> = crate::from_str_patched(&local_var_content).ok();
3723 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3724 Err(Error::ResponseError(local_var_error))
3725 }
3726}
3727
3728pub async fn is_domain_allowed(configuration: &configuration::Configuration, ) -> Result<bool, Error<IsDomainAllowedError>> {
3729 let local_var_configuration = configuration;
3730
3731 let local_var_client = &local_var_configuration.client;
3732
3733 let local_var_uri_str = format!("{}/workspaces/allowed_domain_auto_invite", local_var_configuration.base_path);
3734 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3735
3736 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3737 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3738 }
3739 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3740 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3741 };
3742
3743 let local_var_req = local_var_req_builder.build()?;
3744 let local_var_resp = local_var_client.execute(local_var_req).await?;
3745
3746 let local_var_status = local_var_resp.status();
3747 let local_var_content = local_var_resp.text().await?;
3748
3749 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3750 crate::from_str_patched(&local_var_content).map_err(Error::from)
3751 } else {
3752 let local_var_entity: Option<IsDomainAllowedError> = crate::from_str_patched(&local_var_content).ok();
3753 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3754 Err(Error::ResponseError(local_var_error))
3755 }
3756}
3757
3758pub async fn leave_workspace(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<LeaveWorkspaceError>> {
3759 let local_var_configuration = configuration;
3760
3761 let local_var_client = &local_var_configuration.client;
3762
3763 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/leave", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3764 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3765
3766 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3767 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3768 }
3769 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3770 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3771 };
3772
3773 let local_var_req = local_var_req_builder.build()?;
3774 let local_var_resp = local_var_client.execute(local_var_req).await?;
3775
3776 let local_var_status = local_var_resp.status();
3777 let local_var_content = local_var_resp.text().await?;
3778
3779 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3780 crate::from_str_patched(&local_var_content).map_err(Error::from)
3781 } else {
3782 let local_var_entity: Option<LeaveWorkspaceError> = crate::from_str_patched(&local_var_content).ok();
3783 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3784 Err(Error::ResponseError(local_var_error))
3785 }
3786}
3787
3788pub async fn list_available_teams_channels(configuration: &configuration::Configuration, workspace: &str, team_id: &str) -> Result<models::ListAvailableTeamsChannels200Response, Error<ListAvailableTeamsChannelsError>> {
3789 let local_var_configuration = configuration;
3790
3791 let local_var_client = &local_var_configuration.client;
3792
3793 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/available_teams_channels", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3794 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3795
3796 local_var_req_builder = local_var_req_builder.query(&[("team_id", &team_id.to_string())]);
3797 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3798 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3799 }
3800 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3801 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3802 };
3803
3804 let local_var_req = local_var_req_builder.build()?;
3805 let local_var_resp = local_var_client.execute(local_var_req).await?;
3806
3807 let local_var_status = local_var_resp.status();
3808 let local_var_content = local_var_resp.text().await?;
3809
3810 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3811 crate::from_str_patched(&local_var_content).map_err(Error::from)
3812 } else {
3813 let local_var_entity: Option<ListAvailableTeamsChannelsError> = crate::from_str_patched(&local_var_content).ok();
3814 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3815 Err(Error::ResponseError(local_var_error))
3816 }
3817}
3818
3819pub async fn list_available_teams_ids(configuration: &configuration::Configuration, workspace: &str, search: Option<&str>, next_link: Option<&str>) -> Result<models::ListAvailableTeamsIds200Response, Error<ListAvailableTeamsIdsError>> {
3820 let local_var_configuration = configuration;
3821
3822 let local_var_client = &local_var_configuration.client;
3823
3824 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/available_teams_ids", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3825 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3826
3827 if let Some(ref local_var_str) = search {
3828 local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
3829 }
3830 if let Some(ref local_var_str) = next_link {
3831 local_var_req_builder = local_var_req_builder.query(&[("next_link", &local_var_str.to_string())]);
3832 }
3833 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3834 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3835 }
3836 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3837 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3838 };
3839
3840 let local_var_req = local_var_req_builder.build()?;
3841 let local_var_resp = local_var_client.execute(local_var_req).await?;
3842
3843 let local_var_status = local_var_resp.status();
3844 let local_var_content = local_var_resp.text().await?;
3845
3846 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3847 crate::from_str_patched(&local_var_content).map_err(Error::from)
3848 } else {
3849 let local_var_entity: Option<ListAvailableTeamsIdsError> = crate::from_str_patched(&local_var_content).ok();
3850 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3851 Err(Error::ResponseError(local_var_error))
3852 }
3853}
3854
3855pub async fn list_data_table_schemas(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::DataTableSchema>, Error<ListDataTableSchemasError>> {
3856 let local_var_configuration = configuration;
3857
3858 let local_var_client = &local_var_configuration.client;
3859
3860 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_datatable_schemas", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3861 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3862
3863 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3864 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3865 }
3866 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3867 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3868 };
3869
3870 let local_var_req = local_var_req_builder.build()?;
3871 let local_var_resp = local_var_client.execute(local_var_req).await?;
3872
3873 let local_var_status = local_var_resp.status();
3874 let local_var_content = local_var_resp.text().await?;
3875
3876 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3877 crate::from_str_patched(&local_var_content).map_err(Error::from)
3878 } else {
3879 let local_var_entity: Option<ListDataTableSchemasError> = crate::from_str_patched(&local_var_content).ok();
3880 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3881 Err(Error::ResponseError(local_var_error))
3882 }
3883}
3884
3885pub async fn list_data_table_tables(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::DataTableTables>, Error<ListDataTableTablesError>> {
3886 let local_var_configuration = configuration;
3887
3888 let local_var_client = &local_var_configuration.client;
3889
3890 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_datatable_tables", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3891 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3892
3893 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3894 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3895 }
3896 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3897 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3898 };
3899
3900 let local_var_req = local_var_req_builder.build()?;
3901 let local_var_resp = local_var_client.execute(local_var_req).await?;
3902
3903 let local_var_status = local_var_resp.status();
3904 let local_var_content = local_var_resp.text().await?;
3905
3906 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3907 crate::from_str_patched(&local_var_content).map_err(Error::from)
3908 } else {
3909 let local_var_entity: Option<ListDataTableTablesError> = crate::from_str_patched(&local_var_content).ok();
3910 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3911 Err(Error::ResponseError(local_var_error))
3912 }
3913}
3914
3915pub async fn list_data_tables(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::ListDataTables200ResponseInner>, Error<ListDataTablesError>> {
3916 let local_var_configuration = configuration;
3917
3918 let local_var_client = &local_var_configuration.client;
3919
3920 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_datatables", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3921 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3922
3923 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3924 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3925 }
3926 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3927 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3928 };
3929
3930 let local_var_req = local_var_req_builder.build()?;
3931 let local_var_resp = local_var_client.execute(local_var_req).await?;
3932
3933 let local_var_status = local_var_resp.status();
3934 let local_var_content = local_var_resp.text().await?;
3935
3936 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3937 crate::from_str_patched(&local_var_content).map_err(Error::from)
3938 } else {
3939 let local_var_entity: Option<ListDataTablesError> = crate::from_str_patched(&local_var_content).ok();
3940 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3941 Err(Error::ResponseError(local_var_error))
3942 }
3943}
3944
3945pub async fn list_datatable_migrations(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::DatatableMigration>, Error<ListDatatableMigrationsError>> {
3946 let local_var_configuration = configuration;
3947
3948 let local_var_client = &local_var_configuration.client;
3949
3950 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_datatable_migrations", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3951 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3952
3953 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3954 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3955 }
3956 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3957 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3958 };
3959
3960 let local_var_req = local_var_req_builder.build()?;
3961 let local_var_resp = local_var_client.execute(local_var_req).await?;
3962
3963 let local_var_status = local_var_resp.status();
3964 let local_var_content = local_var_resp.text().await?;
3965
3966 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3967 crate::from_str_patched(&local_var_content).map_err(Error::from)
3968 } else {
3969 let local_var_entity: Option<ListDatatableMigrationsError> = crate::from_str_patched(&local_var_content).ok();
3970 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3971 Err(Error::ResponseError(local_var_error))
3972 }
3973}
3974
3975pub async fn list_deployment_request_eligible_deployers(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::DeploymentRequestEligibleDeployer>, Error<ListDeploymentRequestEligibleDeployersError>> {
3977 let local_var_configuration = configuration;
3978
3979 let local_var_client = &local_var_configuration.client;
3980
3981 let local_var_uri_str = format!("{}/w/{workspace}/deployment_request/eligible_deployers", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3982 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3983
3984 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3985 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3986 }
3987 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3988 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3989 };
3990
3991 let local_var_req = local_var_req_builder.build()?;
3992 let local_var_resp = local_var_client.execute(local_var_req).await?;
3993
3994 let local_var_status = local_var_resp.status();
3995 let local_var_content = local_var_resp.text().await?;
3996
3997 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3998 crate::from_str_patched(&local_var_content).map_err(Error::from)
3999 } else {
4000 let local_var_entity: Option<ListDeploymentRequestEligibleDeployersError> = crate::from_str_patched(&local_var_content).ok();
4001 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4002 Err(Error::ResponseError(local_var_error))
4003 }
4004}
4005
4006pub async fn list_ducklakes(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<String>, Error<ListDucklakesError>> {
4007 let local_var_configuration = configuration;
4008
4009 let local_var_client = &local_var_configuration.client;
4010
4011 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_ducklakes", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4012 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4013
4014 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4015 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4016 }
4017 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4018 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4019 };
4020
4021 let local_var_req = local_var_req_builder.build()?;
4022 let local_var_resp = local_var_client.execute(local_var_req).await?;
4023
4024 let local_var_status = local_var_resp.status();
4025 let local_var_content = local_var_resp.text().await?;
4026
4027 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4028 crate::from_str_patched(&local_var_content).map_err(Error::from)
4029 } else {
4030 let local_var_entity: Option<ListDucklakesError> = crate::from_str_patched(&local_var_content).ok();
4031 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4032 Err(Error::ResponseError(local_var_error))
4033 }
4034}
4035
4036pub async fn list_pending_invites(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::WorkspaceInvite>, Error<ListPendingInvitesError>> {
4037 let local_var_configuration = configuration;
4038
4039 let local_var_client = &local_var_configuration.client;
4040
4041 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_pending_invites", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4042 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4043
4044 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4045 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4046 }
4047 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4048 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4049 };
4050
4051 let local_var_req = local_var_req_builder.build()?;
4052 let local_var_resp = local_var_client.execute(local_var_req).await?;
4053
4054 let local_var_status = local_var_resp.status();
4055 let local_var_content = local_var_resp.text().await?;
4056
4057 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4058 crate::from_str_patched(&local_var_content).map_err(Error::from)
4059 } else {
4060 let local_var_entity: Option<ListPendingInvitesError> = crate::from_str_patched(&local_var_content).ok();
4061 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4062 Err(Error::ResponseError(local_var_error))
4063 }
4064}
4065
4066pub async fn list_protection_rules(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::ProtectionRuleset>, Error<ListProtectionRulesError>> {
4067 let local_var_configuration = configuration;
4068
4069 let local_var_client = &local_var_configuration.client;
4070
4071 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/protection_rules", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4072 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4073
4074 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4075 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4076 }
4077 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4078 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4079 };
4080
4081 let local_var_req = local_var_req_builder.build()?;
4082 let local_var_resp = local_var_client.execute(local_var_req).await?;
4083
4084 let local_var_status = local_var_resp.status();
4085 let local_var_content = local_var_resp.text().await?;
4086
4087 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4088 crate::from_str_patched(&local_var_content).map_err(Error::from)
4089 } else {
4090 let local_var_entity: Option<ListProtectionRulesError> = crate::from_str_patched(&local_var_content).ok();
4091 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4092 Err(Error::ResponseError(local_var_error))
4093 }
4094}
4095
4096pub async fn list_shared_ui(configuration: &configuration::Configuration, workspace: &str) -> Result<models::ListSharedUi200Response, Error<ListSharedUiError>> {
4097 let local_var_configuration = configuration;
4098
4099 let local_var_client = &local_var_configuration.client;
4100
4101 let local_var_uri_str = format!("{}/w/{workspace}/shared_ui/list", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4102 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4103
4104 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4105 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4106 }
4107 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4108 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4109 };
4110
4111 let local_var_req = local_var_req_builder.build()?;
4112 let local_var_resp = local_var_client.execute(local_var_req).await?;
4113
4114 let local_var_status = local_var_resp.status();
4115 let local_var_content = local_var_resp.text().await?;
4116
4117 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4118 crate::from_str_patched(&local_var_content).map_err(Error::from)
4119 } else {
4120 let local_var_entity: Option<ListSharedUiError> = crate::from_str_patched(&local_var_content).ok();
4121 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4122 Err(Error::ResponseError(local_var_error))
4123 }
4124}
4125
4126pub async fn list_user_workspaces(configuration: &configuration::Configuration, ) -> Result<models::UserWorkspaceList, Error<ListUserWorkspacesError>> {
4127 let local_var_configuration = configuration;
4128
4129 let local_var_client = &local_var_configuration.client;
4130
4131 let local_var_uri_str = format!("{}/workspaces/users", local_var_configuration.base_path);
4132 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4133
4134 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4135 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4136 }
4137 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4138 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4139 };
4140
4141 let local_var_req = local_var_req_builder.build()?;
4142 let local_var_resp = local_var_client.execute(local_var_req).await?;
4143
4144 let local_var_status = local_var_resp.status();
4145 let local_var_content = local_var_resp.text().await?;
4146
4147 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4148 crate::from_str_patched(&local_var_content).map_err(Error::from)
4149 } else {
4150 let local_var_entity: Option<ListUserWorkspacesError> = crate::from_str_patched(&local_var_content).ok();
4151 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4152 Err(Error::ResponseError(local_var_error))
4153 }
4154}
4155
4156pub async fn list_workspaces(configuration: &configuration::Configuration, ) -> Result<Vec<models::Workspace>, Error<ListWorkspacesError>> {
4157 let local_var_configuration = configuration;
4158
4159 let local_var_client = &local_var_configuration.client;
4160
4161 let local_var_uri_str = format!("{}/workspaces/list", local_var_configuration.base_path);
4162 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4163
4164 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4165 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4166 }
4167 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4168 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4169 };
4170
4171 let local_var_req = local_var_req_builder.build()?;
4172 let local_var_resp = local_var_client.execute(local_var_req).await?;
4173
4174 let local_var_status = local_var_resp.status();
4175 let local_var_content = local_var_resp.text().await?;
4176
4177 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4178 crate::from_str_patched(&local_var_content).map_err(Error::from)
4179 } else {
4180 let local_var_entity: Option<ListWorkspacesError> = crate::from_str_patched(&local_var_content).ok();
4181 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4182 Err(Error::ResponseError(local_var_error))
4183 }
4184}
4185
4186pub async fn list_workspaces_as_super_admin(configuration: &configuration::Configuration, page: Option<i32>, per_page: Option<i32>) -> Result<Vec<models::Workspace>, Error<ListWorkspacesAsSuperAdminError>> {
4187 let local_var_configuration = configuration;
4188
4189 let local_var_client = &local_var_configuration.client;
4190
4191 let local_var_uri_str = format!("{}/workspaces/list_as_superadmin", local_var_configuration.base_path);
4192 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4193
4194 if let Some(ref local_var_str) = page {
4195 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
4196 }
4197 if let Some(ref local_var_str) = per_page {
4198 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
4199 }
4200 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4201 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4202 }
4203 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4204 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4205 };
4206
4207 let local_var_req = local_var_req_builder.build()?;
4208 let local_var_resp = local_var_client.execute(local_var_req).await?;
4209
4210 let local_var_status = local_var_resp.status();
4211 let local_var_content = local_var_resp.text().await?;
4212
4213 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4214 crate::from_str_patched(&local_var_content).map_err(Error::from)
4215 } else {
4216 let local_var_entity: Option<ListWorkspacesAsSuperAdminError> = crate::from_str_patched(&local_var_content).ok();
4217 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4218 Err(Error::ResponseError(local_var_error))
4219 }
4220}
4221
4222pub async fn list_ws_specific(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::ListWsSpecific200ResponseInner>, Error<ListWsSpecificError>> {
4223 let local_var_configuration = configuration;
4224
4225 let local_var_client = &local_var_configuration.client;
4226
4227 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_ws_specific", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4228 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4229
4230 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4231 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4232 }
4233 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4234 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4235 };
4236
4237 let local_var_req = local_var_req_builder.build()?;
4238 let local_var_resp = local_var_client.execute(local_var_req).await?;
4239
4240 let local_var_status = local_var_resp.status();
4241 let local_var_content = local_var_resp.text().await?;
4242
4243 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4244 crate::from_str_patched(&local_var_content).map_err(Error::from)
4245 } else {
4246 let local_var_entity: Option<ListWsSpecificError> = crate::from_str_patched(&local_var_content).ok();
4247 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4248 Err(Error::ResponseError(local_var_error))
4249 }
4250}
4251
4252pub async fn list_ws_specific_versions(configuration: &configuration::Configuration, workspace: &str, kind: &str, path: &str) -> Result<Vec<String>, Error<ListWsSpecificVersionsError>> {
4253 let local_var_configuration = configuration;
4254
4255 let local_var_client = &local_var_configuration.client;
4256
4257 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_ws_specific_versions", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4258 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4259
4260 local_var_req_builder = local_var_req_builder.query(&[("kind", &kind.to_string())]);
4261 local_var_req_builder = local_var_req_builder.query(&[("path", &path.to_string())]);
4262 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4263 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4264 }
4265 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4266 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4267 };
4268
4269 let local_var_req = local_var_req_builder.build()?;
4270 let local_var_resp = local_var_client.execute(local_var_req).await?;
4271
4272 let local_var_status = local_var_resp.status();
4273 let local_var_content = local_var_resp.text().await?;
4274
4275 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4276 crate::from_str_patched(&local_var_content).map_err(Error::from)
4277 } else {
4278 let local_var_entity: Option<ListWsSpecificVersionsError> = crate::from_str_patched(&local_var_content).ok();
4279 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4280 Err(Error::ResponseError(local_var_error))
4281 }
4282}
4283
4284pub async fn log_feature_usage(configuration: &configuration::Configuration, workspace: &str, log_feature_usage_request: models::LogFeatureUsageRequest) -> Result<(), Error<LogFeatureUsageError>> {
4285 let local_var_configuration = configuration;
4286
4287 let local_var_client = &local_var_configuration.client;
4288
4289 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/log_feature_usage", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4290 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4291
4292 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4293 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4294 }
4295 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4296 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4297 };
4298 local_var_req_builder = local_var_req_builder.json(&log_feature_usage_request);
4299
4300 let local_var_req = local_var_req_builder.build()?;
4301 let local_var_resp = local_var_client.execute(local_var_req).await?;
4302
4303 let local_var_status = local_var_resp.status();
4304 let local_var_content = local_var_resp.text().await?;
4305
4306 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4307 Ok(())
4308 } else {
4309 let local_var_entity: Option<LogFeatureUsageError> = crate::from_str_patched(&local_var_content).ok();
4310 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4311 Err(Error::ResponseError(local_var_error))
4312 }
4313}
4314
4315pub async fn prune_versions(configuration: &configuration::Configuration, workspace: &str, prune_versions_request: models::PruneVersionsRequest) -> Result<models::PruneVersions200Response, Error<PruneVersionsError>> {
4316 let local_var_configuration = configuration;
4317
4318 let local_var_client = &local_var_configuration.client;
4319
4320 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/prune_versions", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4321 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4322
4323 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4324 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4325 }
4326 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4327 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4328 };
4329 local_var_req_builder = local_var_req_builder.json(&prune_versions_request);
4330
4331 let local_var_req = local_var_req_builder.build()?;
4332 let local_var_resp = local_var_client.execute(local_var_req).await?;
4333
4334 let local_var_status = local_var_resp.status();
4335 let local_var_content = local_var_resp.text().await?;
4336
4337 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4338 crate::from_str_patched(&local_var_content).map_err(Error::from)
4339 } else {
4340 let local_var_entity: Option<PruneVersionsError> = crate::from_str_patched(&local_var_content).ok();
4341 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4342 Err(Error::ResponseError(local_var_error))
4343 }
4344}
4345
4346pub async fn rebuild_dependency_map(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<RebuildDependencyMapError>> {
4347 let local_var_configuration = configuration;
4348
4349 let local_var_client = &local_var_configuration.client;
4350
4351 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/rebuild_dependency_map", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4352 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4353
4354 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4355 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4356 }
4357 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4358 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4359 };
4360
4361 let local_var_req = local_var_req_builder.build()?;
4362 let local_var_resp = local_var_client.execute(local_var_req).await?;
4363
4364 let local_var_status = local_var_resp.status();
4365 let local_var_content = local_var_resp.text().await?;
4366
4367 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4368 crate::from_str_patched(&local_var_content).map_err(Error::from)
4369 } else {
4370 let local_var_entity: Option<RebuildDependencyMapError> = crate::from_str_patched(&local_var_content).ok();
4371 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4372 Err(Error::ResponseError(local_var_error))
4373 }
4374}
4375
4376pub async fn reset_diff_tally(configuration: &configuration::Configuration, workspace: &str, fork_workspace_id: &str) -> Result<serde_json::Value, Error<ResetDiffTallyError>> {
4378 let local_var_configuration = configuration;
4379
4380 let local_var_client = &local_var_configuration.client;
4381
4382 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/reset_diff_tally/{fork_workspace_id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), fork_workspace_id=crate::apis::urlencode(fork_workspace_id));
4383 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4384
4385 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4386 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4387 }
4388 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4389 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4390 };
4391
4392 let local_var_req = local_var_req_builder.build()?;
4393 let local_var_resp = local_var_client.execute(local_var_req).await?;
4394
4395 let local_var_status = local_var_resp.status();
4396 let local_var_content = local_var_resp.text().await?;
4397
4398 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4399 crate::from_str_patched(&local_var_content).map_err(Error::from)
4400 } else {
4401 let local_var_entity: Option<ResetDiffTallyError> = crate::from_str_patched(&local_var_content).ok();
4402 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4403 Err(Error::ResponseError(local_var_error))
4404 }
4405}
4406
4407pub async fn rollback_datatable_migrations(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str, only: Option<i64>) -> Result<models::RollbackDatatableMigrations200Response, Error<RollbackDatatableMigrationsError>> {
4408 let local_var_configuration = configuration;
4409
4410 let local_var_client = &local_var_configuration.client;
4411
4412 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/rollback_datatable_migrations/{datatable_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name));
4413 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4414
4415 if let Some(ref local_var_str) = only {
4416 local_var_req_builder = local_var_req_builder.query(&[("only", &local_var_str.to_string())]);
4417 }
4418 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4419 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4420 }
4421 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4422 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4423 };
4424
4425 let local_var_req = local_var_req_builder.build()?;
4426 let local_var_resp = local_var_client.execute(local_var_req).await?;
4427
4428 let local_var_status = local_var_resp.status();
4429 let local_var_content = local_var_resp.text().await?;
4430
4431 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4432 crate::from_str_patched(&local_var_content).map_err(Error::from)
4433 } else {
4434 let local_var_entity: Option<RollbackDatatableMigrationsError> = crate::from_str_patched(&local_var_content).ok();
4435 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4436 Err(Error::ResponseError(local_var_error))
4437 }
4438}
4439
4440pub async fn run_datatable_migrations(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str, up_to: Option<i64>, only: Option<i64>) -> Result<models::RunDatatableMigrations200Response, Error<RunDatatableMigrationsError>> {
4441 let local_var_configuration = configuration;
4442
4443 let local_var_client = &local_var_configuration.client;
4444
4445 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/run_datatable_migrations/{datatable_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name));
4446 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4447
4448 if let Some(ref local_var_str) = up_to {
4449 local_var_req_builder = local_var_req_builder.query(&[("up_to", &local_var_str.to_string())]);
4450 }
4451 if let Some(ref local_var_str) = only {
4452 local_var_req_builder = local_var_req_builder.query(&[("only", &local_var_str.to_string())]);
4453 }
4454 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4455 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4456 }
4457 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4458 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4459 };
4460
4461 let local_var_req = local_var_req_builder.build()?;
4462 let local_var_resp = local_var_client.execute(local_var_req).await?;
4463
4464 let local_var_status = local_var_resp.status();
4465 let local_var_content = local_var_resp.text().await?;
4466
4467 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4468 crate::from_str_patched(&local_var_content).map_err(Error::from)
4469 } else {
4470 let local_var_entity: Option<RunDatatableMigrationsError> = crate::from_str_patched(&local_var_content).ok();
4471 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4472 Err(Error::ResponseError(local_var_error))
4473 }
4474}
4475
4476pub async fn run_slack_message_test_job(configuration: &configuration::Configuration, workspace: &str, run_slack_message_test_job_request: models::RunSlackMessageTestJobRequest) -> Result<models::RunSlackMessageTestJob200Response, Error<RunSlackMessageTestJobError>> {
4477 let local_var_configuration = configuration;
4478
4479 let local_var_client = &local_var_configuration.client;
4480
4481 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/run_slack_message_test_job", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4482 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4483
4484 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4485 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4486 }
4487 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4488 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4489 };
4490 local_var_req_builder = local_var_req_builder.json(&run_slack_message_test_job_request);
4491
4492 let local_var_req = local_var_req_builder.build()?;
4493 let local_var_resp = local_var_client.execute(local_var_req).await?;
4494
4495 let local_var_status = local_var_resp.status();
4496 let local_var_content = local_var_resp.text().await?;
4497
4498 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4499 crate::from_str_patched(&local_var_content).map_err(Error::from)
4500 } else {
4501 let local_var_entity: Option<RunSlackMessageTestJobError> = crate::from_str_patched(&local_var_content).ok();
4502 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4503 Err(Error::ResponseError(local_var_error))
4504 }
4505}
4506
4507pub async fn run_teams_message_test_job(configuration: &configuration::Configuration, workspace: &str, run_slack_message_test_job_request: models::RunSlackMessageTestJobRequest) -> Result<models::RunSlackMessageTestJob200Response, Error<RunTeamsMessageTestJobError>> {
4508 let local_var_configuration = configuration;
4509
4510 let local_var_client = &local_var_configuration.client;
4511
4512 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/run_teams_message_test_job", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4513 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4514
4515 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4516 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4517 }
4518 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4519 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4520 };
4521 local_var_req_builder = local_var_req_builder.json(&run_slack_message_test_job_request);
4522
4523 let local_var_req = local_var_req_builder.build()?;
4524 let local_var_resp = local_var_client.execute(local_var_req).await?;
4525
4526 let local_var_status = local_var_resp.status();
4527 let local_var_content = local_var_resp.text().await?;
4528
4529 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4530 crate::from_str_patched(&local_var_content).map_err(Error::from)
4531 } else {
4532 let local_var_entity: Option<RunTeamsMessageTestJobError> = crate::from_str_patched(&local_var_content).ok();
4533 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4534 Err(Error::ResponseError(local_var_error))
4535 }
4536}
4537
4538pub async fn seed_full_diff_scan(configuration: &configuration::Configuration, workspace: &str, target_workspace_id: &str) -> Result<models::SeedFullDiffScan200Response, Error<SeedFullDiffScanError>> {
4540 let local_var_configuration = configuration;
4541
4542 let local_var_client = &local_var_configuration.client;
4543
4544 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/seed_full_diff/{target_workspace_id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), target_workspace_id=crate::apis::urlencode(target_workspace_id));
4545 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4546
4547 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4548 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4549 }
4550 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4551 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4552 };
4553
4554 let local_var_req = local_var_req_builder.build()?;
4555 let local_var_resp = local_var_client.execute(local_var_req).await?;
4556
4557 let local_var_status = local_var_resp.status();
4558 let local_var_content = local_var_resp.text().await?;
4559
4560 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4561 crate::from_str_patched(&local_var_content).map_err(Error::from)
4562 } else {
4563 let local_var_entity: Option<SeedFullDiffScanError> = crate::from_str_patched(&local_var_content).ok();
4564 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4565 Err(Error::ResponseError(local_var_error))
4566 }
4567}
4568
4569pub async fn set_environment_variable(configuration: &configuration::Configuration, workspace: &str, set_environment_variable_request: models::SetEnvironmentVariableRequest) -> Result<String, Error<SetEnvironmentVariableError>> {
4570 let local_var_configuration = configuration;
4571
4572 let local_var_client = &local_var_configuration.client;
4573
4574 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/set_environment_variable", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4575 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4576
4577 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4578 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4579 }
4580 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4581 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4582 };
4583 local_var_req_builder = local_var_req_builder.json(&set_environment_variable_request);
4584
4585 let local_var_req = local_var_req_builder.build()?;
4586 let local_var_resp = local_var_client.execute(local_var_req).await?;
4587
4588 let local_var_status = local_var_resp.status();
4589 let local_var_content = local_var_resp.text().await?;
4590
4591 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4592 crate::from_str_patched(&local_var_content).map_err(Error::from)
4593 } else {
4594 let local_var_entity: Option<SetEnvironmentVariableError> = crate::from_str_patched(&local_var_content).ok();
4595 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4596 Err(Error::ResponseError(local_var_error))
4597 }
4598}
4599
4600pub async fn set_threshold_alert(configuration: &configuration::Configuration, workspace: &str, set_threshold_alert_request: models::SetThresholdAlertRequest) -> Result<String, Error<SetThresholdAlertError>> {
4601 let local_var_configuration = configuration;
4602
4603 let local_var_client = &local_var_configuration.client;
4604
4605 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/threshold_alert", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4606 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4607
4608 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4609 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4610 }
4611 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4612 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4613 };
4614 local_var_req_builder = local_var_req_builder.json(&set_threshold_alert_request);
4615
4616 let local_var_req = local_var_req_builder.build()?;
4617 let local_var_resp = local_var_client.execute(local_var_req).await?;
4618
4619 let local_var_status = local_var_resp.status();
4620 let local_var_content = local_var_resp.text().await?;
4621
4622 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4623 crate::from_str_patched(&local_var_content).map_err(Error::from)
4624 } else {
4625 let local_var_entity: Option<SetThresholdAlertError> = crate::from_str_patched(&local_var_content).ok();
4626 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4627 Err(Error::ResponseError(local_var_error))
4628 }
4629}
4630
4631pub async fn set_workspace_encryption_key(configuration: &configuration::Configuration, workspace: &str, set_workspace_encryption_key_request: models::SetWorkspaceEncryptionKeyRequest) -> Result<String, Error<SetWorkspaceEncryptionKeyError>> {
4632 let local_var_configuration = configuration;
4633
4634 let local_var_client = &local_var_configuration.client;
4635
4636 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/encryption_key", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4637 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4638
4639 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4640 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4641 }
4642 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4643 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4644 };
4645 local_var_req_builder = local_var_req_builder.json(&set_workspace_encryption_key_request);
4646
4647 let local_var_req = local_var_req_builder.build()?;
4648 let local_var_resp = local_var_client.execute(local_var_req).await?;
4649
4650 let local_var_status = local_var_resp.status();
4651 let local_var_content = local_var_resp.text().await?;
4652
4653 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4654 crate::from_str_patched(&local_var_content).map_err(Error::from)
4655 } else {
4656 let local_var_entity: Option<SetWorkspaceEncryptionKeyError> = crate::from_str_patched(&local_var_content).ok();
4657 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4658 Err(Error::ResponseError(local_var_error))
4659 }
4660}
4661
4662pub async fn set_workspace_slack_oauth_config(configuration: &configuration::Configuration, workspace: &str, set_workspace_slack_oauth_config_request: models::SetWorkspaceSlackOauthConfigRequest) -> Result<String, Error<SetWorkspaceSlackOauthConfigError>> {
4663 let local_var_configuration = configuration;
4664
4665 let local_var_client = &local_var_configuration.client;
4666
4667 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/slack_oauth_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4668 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4669
4670 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4671 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4672 }
4673 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4674 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4675 };
4676 local_var_req_builder = local_var_req_builder.json(&set_workspace_slack_oauth_config_request);
4677
4678 let local_var_req = local_var_req_builder.build()?;
4679 let local_var_resp = local_var_client.execute(local_var_req).await?;
4680
4681 let local_var_status = local_var_resp.status();
4682 let local_var_content = local_var_resp.text().await?;
4683
4684 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4685 crate::from_str_patched(&local_var_content).map_err(Error::from)
4686 } else {
4687 let local_var_entity: Option<SetWorkspaceSlackOauthConfigError> = crate::from_str_patched(&local_var_content).ok();
4688 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4689 Err(Error::ResponseError(local_var_error))
4690 }
4691}
4692
4693pub async fn set_ws_specific(configuration: &configuration::Configuration, workspace: &str, set_ws_specific_request: models::SetWsSpecificRequest) -> Result<String, Error<SetWsSpecificError>> {
4694 let local_var_configuration = configuration;
4695
4696 let local_var_client = &local_var_configuration.client;
4697
4698 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/set_ws_specific", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4699 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4700
4701 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4702 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4703 }
4704 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4705 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4706 };
4707 local_var_req_builder = local_var_req_builder.json(&set_ws_specific_request);
4708
4709 let local_var_req = local_var_req_builder.build()?;
4710 let local_var_resp = local_var_client.execute(local_var_req).await?;
4711
4712 let local_var_status = local_var_resp.status();
4713 let local_var_content = local_var_resp.text().await?;
4714
4715 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4716 crate::from_str_patched(&local_var_content).map_err(Error::from)
4717 } else {
4718 let local_var_entity: Option<SetWsSpecificError> = crate::from_str_patched(&local_var_content).ok();
4719 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4720 Err(Error::ResponseError(local_var_error))
4721 }
4722}
4723
4724pub async fn test_data_table_connection(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str) -> Result<models::TestDataTableConnection200Response, Error<TestDataTableConnectionError>> {
4725 let local_var_configuration = configuration;
4726
4727 let local_var_client = &local_var_configuration.client;
4728
4729 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/test_datatable_connection/{datatable_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name));
4730 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4731
4732 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4733 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4734 }
4735 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4736 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4737 };
4738
4739 let local_var_req = local_var_req_builder.build()?;
4740 let local_var_resp = local_var_client.execute(local_var_req).await?;
4741
4742 let local_var_status = local_var_resp.status();
4743 let local_var_content = local_var_resp.text().await?;
4744
4745 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4746 crate::from_str_patched(&local_var_content).map_err(Error::from)
4747 } else {
4748 let local_var_entity: Option<TestDataTableConnectionError> = crate::from_str_patched(&local_var_content).ok();
4749 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4750 Err(Error::ResponseError(local_var_error))
4751 }
4752}
4753
4754pub async fn unarchive_workspace(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<UnarchiveWorkspaceError>> {
4755 let local_var_configuration = configuration;
4756
4757 let local_var_client = &local_var_configuration.client;
4758
4759 let local_var_uri_str = format!("{}/workspaces/unarchive/{workspace}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4760 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4761
4762 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4763 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4764 }
4765 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4766 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4767 };
4768
4769 let local_var_req = local_var_req_builder.build()?;
4770 let local_var_resp = local_var_client.execute(local_var_req).await?;
4771
4772 let local_var_status = local_var_resp.status();
4773 let local_var_content = local_var_resp.text().await?;
4774
4775 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4776 crate::from_str_patched(&local_var_content).map_err(Error::from)
4777 } else {
4778 let local_var_entity: Option<UnarchiveWorkspaceError> = crate::from_str_patched(&local_var_content).ok();
4779 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4780 Err(Error::ResponseError(local_var_error))
4781 }
4782}
4783
4784pub async fn update_operator_settings(configuration: &configuration::Configuration, workspace: &str, operator_settings: Option<models::OperatorSettings>) -> Result<String, Error<UpdateOperatorSettingsError>> {
4786 let local_var_configuration = configuration;
4787
4788 let local_var_client = &local_var_configuration.client;
4789
4790 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/operator_settings", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4791 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4792
4793 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4794 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4795 }
4796 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4797 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4798 };
4799 local_var_req_builder = local_var_req_builder.json(&operator_settings);
4800
4801 let local_var_req = local_var_req_builder.build()?;
4802 let local_var_resp = local_var_client.execute(local_var_req).await?;
4803
4804 let local_var_status = local_var_resp.status();
4805 let local_var_content = local_var_resp.text().await?;
4806
4807 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4808 crate::from_str_patched(&local_var_content).map_err(Error::from)
4809 } else {
4810 let local_var_entity: Option<UpdateOperatorSettingsError> = crate::from_str_patched(&local_var_content).ok();
4811 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4812 Err(Error::ResponseError(local_var_error))
4813 }
4814}
4815
4816pub async fn update_protection_rule(configuration: &configuration::Configuration, workspace: &str, rule_name: &str, update_protection_rule_request: models::UpdateProtectionRuleRequest) -> Result<String, Error<UpdateProtectionRuleError>> {
4817 let local_var_configuration = configuration;
4818
4819 let local_var_client = &local_var_configuration.client;
4820
4821 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/protection_rules/{rule_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), rule_name=crate::apis::urlencode(rule_name));
4822 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4823
4824 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4825 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4826 }
4827 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4828 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4829 };
4830 local_var_req_builder = local_var_req_builder.json(&update_protection_rule_request);
4831
4832 let local_var_req = local_var_req_builder.build()?;
4833 let local_var_resp = local_var_client.execute(local_var_req).await?;
4834
4835 let local_var_status = local_var_resp.status();
4836 let local_var_content = local_var_resp.text().await?;
4837
4838 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4839 crate::from_str_patched(&local_var_content).map_err(Error::from)
4840 } else {
4841 let local_var_entity: Option<UpdateProtectionRuleError> = crate::from_str_patched(&local_var_content).ok();
4842 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4843 Err(Error::ResponseError(local_var_error))
4844 }
4845}
4846
4847pub async fn update_shared_ui(configuration: &configuration::Configuration, workspace: &str, update_shared_ui_request: models::UpdateSharedUiRequest) -> Result<String, Error<UpdateSharedUiError>> {
4848 let local_var_configuration = configuration;
4849
4850 let local_var_client = &local_var_configuration.client;
4851
4852 let local_var_uri_str = format!("{}/w/{workspace}/shared_ui", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4853 let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
4854
4855 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4856 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4857 }
4858 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4859 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4860 };
4861 local_var_req_builder = local_var_req_builder.json(&update_shared_ui_request);
4862
4863 let local_var_req = local_var_req_builder.build()?;
4864 let local_var_resp = local_var_client.execute(local_var_req).await?;
4865
4866 let local_var_status = local_var_resp.status();
4867 let local_var_content = local_var_resp.text().await?;
4868
4869 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4870 crate::from_str_patched(&local_var_content).map_err(Error::from)
4871 } else {
4872 let local_var_entity: Option<UpdateSharedUiError> = crate::from_str_patched(&local_var_content).ok();
4873 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4874 Err(Error::ResponseError(local_var_error))
4875 }
4876}
4877
4878pub async fn upsert_datatable_migration(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str, upsert_datatable_migration_request: models::UpsertDatatableMigrationRequest) -> Result<String, Error<UpsertDatatableMigrationError>> {
4879 let local_var_configuration = configuration;
4880
4881 let local_var_client = &local_var_configuration.client;
4882
4883 let local_var_uri_str = format!("{}/w/{workspace}/workspaces/upsert_datatable_migration/{datatable_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name));
4884 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4885
4886 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4887 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4888 }
4889 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4890 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4891 };
4892 local_var_req_builder = local_var_req_builder.json(&upsert_datatable_migration_request);
4893
4894 let local_var_req = local_var_req_builder.build()?;
4895 let local_var_resp = local_var_client.execute(local_var_req).await?;
4896
4897 let local_var_status = local_var_resp.status();
4898 let local_var_content = local_var_resp.text().await?;
4899
4900 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4901 crate::from_str_patched(&local_var_content).map_err(Error::from)
4902 } else {
4903 let local_var_entity: Option<UpsertDatatableMigrationError> = crate::from_str_patched(&local_var_content).ok();
4904 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4905 Err(Error::ResponseError(local_var_error))
4906 }
4907}
4908