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