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