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