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