Skip to main content

windmill_api/apis/
workspace_api.rs

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