Skip to main content

orvanta_api/apis/
workspace_api.rs

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