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