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