Skip to main content

windmill_api/apis/
workspace_api.rs

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