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