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