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