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