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