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