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.815.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12use reqwest;
13use serde::{Deserialize, Serialize};
14use crate::{apis::ResponseContent, models};
15use super::{Error, configuration};
16
17
18/// struct for typed errors of method [`add_user`]
19#[derive(Debug, Clone, Serialize, Deserialize)]
20#[serde(untagged)]
21pub enum AddUserError {
22    UnknownValue(serde_json::Value),
23}
24
25/// struct for typed errors of method [`archive_workspace`]
26#[derive(Debug, Clone, Serialize, Deserialize)]
27#[serde(untagged)]
28pub enum ArchiveWorkspaceError {
29    UnknownValue(serde_json::Value),
30}
31
32/// struct for typed errors of method [`attach_dev_workspace`]
33#[derive(Debug, Clone, Serialize, Deserialize)]
34#[serde(untagged)]
35pub enum AttachDevWorkspaceError {
36    UnknownValue(serde_json::Value),
37}
38
39/// struct for typed errors of method [`cancel_deployment_request`]
40#[derive(Debug, Clone, Serialize, Deserialize)]
41#[serde(untagged)]
42pub enum CancelDeploymentRequestError {
43    UnknownValue(serde_json::Value),
44}
45
46/// struct for typed errors of method [`change_workspace_color`]
47#[derive(Debug, Clone, Serialize, Deserialize)]
48#[serde(untagged)]
49pub enum ChangeWorkspaceColorError {
50    UnknownValue(serde_json::Value),
51}
52
53/// struct for typed errors of method [`change_workspace_id`]
54#[derive(Debug, Clone, Serialize, Deserialize)]
55#[serde(untagged)]
56pub enum ChangeWorkspaceIdError {
57    UnknownValue(serde_json::Value),
58}
59
60/// struct for typed errors of method [`change_workspace_name`]
61#[derive(Debug, Clone, Serialize, Deserialize)]
62#[serde(untagged)]
63pub enum ChangeWorkspaceNameError {
64    UnknownValue(serde_json::Value),
65}
66
67/// struct for typed errors of method [`close_deployment_request_merged`]
68#[derive(Debug, Clone, Serialize, Deserialize)]
69#[serde(untagged)]
70pub enum CloseDeploymentRequestMergedError {
71    UnknownValue(serde_json::Value),
72}
73
74/// struct for typed errors of method [`compare_workspaces`]
75#[derive(Debug, Clone, Serialize, Deserialize)]
76#[serde(untagged)]
77pub enum CompareWorkspacesError {
78    UnknownValue(serde_json::Value),
79}
80
81/// struct for typed errors of method [`connect_slack`]
82#[derive(Debug, Clone, Serialize, Deserialize)]
83#[serde(untagged)]
84pub enum ConnectSlackError {
85    UnknownValue(serde_json::Value),
86}
87
88/// struct for typed errors of method [`connect_teams`]
89#[derive(Debug, Clone, Serialize, Deserialize)]
90#[serde(untagged)]
91pub enum ConnectTeamsError {
92    UnknownValue(serde_json::Value),
93}
94
95/// struct for typed errors of method [`create_datatable_migration`]
96#[derive(Debug, Clone, Serialize, Deserialize)]
97#[serde(untagged)]
98pub enum CreateDatatableMigrationError {
99    UnknownValue(serde_json::Value),
100}
101
102/// struct for typed errors of method [`create_deployment_request`]
103#[derive(Debug, Clone, Serialize, Deserialize)]
104#[serde(untagged)]
105pub enum CreateDeploymentRequestError {
106    Status400(),
107    Status409(),
108    UnknownValue(serde_json::Value),
109}
110
111/// struct for typed errors of method [`create_deployment_request_comment`]
112#[derive(Debug, Clone, Serialize, Deserialize)]
113#[serde(untagged)]
114pub enum CreateDeploymentRequestCommentError {
115    Status400(),
116    UnknownValue(serde_json::Value),
117}
118
119/// struct for typed errors of method [`create_pg_database`]
120#[derive(Debug, Clone, Serialize, Deserialize)]
121#[serde(untagged)]
122pub enum CreatePgDatabaseError {
123    UnknownValue(serde_json::Value),
124}
125
126/// struct for typed errors of method [`create_protection_rule`]
127#[derive(Debug, Clone, Serialize, Deserialize)]
128#[serde(untagged)]
129pub enum CreateProtectionRuleError {
130    Status400(),
131    UnknownValue(serde_json::Value),
132}
133
134/// struct for typed errors of method [`create_service_account`]
135#[derive(Debug, Clone, Serialize, Deserialize)]
136#[serde(untagged)]
137pub enum CreateServiceAccountError {
138    UnknownValue(serde_json::Value),
139}
140
141/// struct for typed errors of method [`create_workspace`]
142#[derive(Debug, Clone, Serialize, Deserialize)]
143#[serde(untagged)]
144pub enum CreateWorkspaceError {
145    UnknownValue(serde_json::Value),
146}
147
148/// struct for typed errors of method [`create_workspace_fork`]
149#[derive(Debug, Clone, Serialize, Deserialize)]
150#[serde(untagged)]
151pub enum CreateWorkspaceForkError {
152    UnknownValue(serde_json::Value),
153}
154
155/// struct for typed errors of method [`create_workspace_fork_git_branch`]
156#[derive(Debug, Clone, Serialize, Deserialize)]
157#[serde(untagged)]
158pub enum CreateWorkspaceForkGitBranchError {
159    UnknownValue(serde_json::Value),
160}
161
162/// struct for typed errors of method [`delete_datatable_migration`]
163#[derive(Debug, Clone, Serialize, Deserialize)]
164#[serde(untagged)]
165pub enum DeleteDatatableMigrationError {
166    UnknownValue(serde_json::Value),
167}
168
169/// struct for typed errors of method [`delete_git_sync_repository`]
170#[derive(Debug, Clone, Serialize, Deserialize)]
171#[serde(untagged)]
172pub enum DeleteGitSyncRepositoryError {
173    UnknownValue(serde_json::Value),
174}
175
176/// struct for typed errors of method [`delete_invite`]
177#[derive(Debug, Clone, Serialize, Deserialize)]
178#[serde(untagged)]
179pub enum DeleteInviteError {
180    UnknownValue(serde_json::Value),
181}
182
183/// struct for typed errors of method [`delete_protection_rule`]
184#[derive(Debug, Clone, Serialize, Deserialize)]
185#[serde(untagged)]
186pub enum DeleteProtectionRuleError {
187    Status404(),
188    UnknownValue(serde_json::Value),
189}
190
191/// struct for typed errors of method [`delete_workspace`]
192#[derive(Debug, Clone, Serialize, Deserialize)]
193#[serde(untagged)]
194pub enum DeleteWorkspaceError {
195    UnknownValue(serde_json::Value),
196}
197
198/// struct for typed errors of method [`delete_workspace_slack_oauth_config`]
199#[derive(Debug, Clone, Serialize, Deserialize)]
200#[serde(untagged)]
201pub enum DeleteWorkspaceSlackOauthConfigError {
202    UnknownValue(serde_json::Value),
203}
204
205/// struct for typed errors of method [`detach_dev_workspace`]
206#[derive(Debug, Clone, Serialize, Deserialize)]
207#[serde(untagged)]
208pub enum DetachDevWorkspaceError {
209    UnknownValue(serde_json::Value),
210}
211
212/// struct for typed errors of method [`disable_datatable_migrations`]
213#[derive(Debug, Clone, Serialize, Deserialize)]
214#[serde(untagged)]
215pub enum DisableDatatableMigrationsError {
216    UnknownValue(serde_json::Value),
217}
218
219/// struct for typed errors of method [`drop_forked_datatable_databases`]
220#[derive(Debug, Clone, Serialize, Deserialize)]
221#[serde(untagged)]
222pub enum DropForkedDatatableDatabasesError {
223    UnknownValue(serde_json::Value),
224}
225
226/// struct for typed errors of method [`drop_forked_ducklake_namespaces`]
227#[derive(Debug, Clone, Serialize, Deserialize)]
228#[serde(untagged)]
229pub enum DropForkedDucklakeNamespacesError {
230    UnknownValue(serde_json::Value),
231}
232
233/// struct for typed errors of method [`edit_add_admins_and_developers_to_forks`]
234#[derive(Debug, Clone, Serialize, Deserialize)]
235#[serde(untagged)]
236pub enum EditAddAdminsAndDevelopersToForksError {
237    UnknownValue(serde_json::Value),
238}
239
240/// struct for typed errors of method [`edit_auto_invite`]
241#[derive(Debug, Clone, Serialize, Deserialize)]
242#[serde(untagged)]
243pub enum EditAutoInviteError {
244    UnknownValue(serde_json::Value),
245}
246
247/// struct for typed errors of method [`edit_copilot_config`]
248#[derive(Debug, Clone, Serialize, Deserialize)]
249#[serde(untagged)]
250pub enum EditCopilotConfigError {
251    UnknownValue(serde_json::Value),
252}
253
254/// struct for typed errors of method [`edit_data_table_config`]
255#[derive(Debug, Clone, Serialize, Deserialize)]
256#[serde(untagged)]
257pub enum EditDataTableConfigError {
258    UnknownValue(serde_json::Value),
259}
260
261/// struct for typed errors of method [`edit_dbt_warehouses`]
262#[derive(Debug, Clone, Serialize, Deserialize)]
263#[serde(untagged)]
264pub enum EditDbtWarehousesError {
265    UnknownValue(serde_json::Value),
266}
267
268/// struct for typed errors of method [`edit_default_scripts`]
269#[derive(Debug, Clone, Serialize, Deserialize)]
270#[serde(untagged)]
271pub enum EditDefaultScriptsError {
272    UnknownValue(serde_json::Value),
273}
274
275/// struct for typed errors of method [`edit_ducklake_config`]
276#[derive(Debug, Clone, Serialize, Deserialize)]
277#[serde(untagged)]
278pub enum EditDucklakeConfigError {
279    UnknownValue(serde_json::Value),
280}
281
282/// struct for typed errors of method [`edit_error_handler`]
283#[derive(Debug, Clone, Serialize, Deserialize)]
284#[serde(untagged)]
285pub enum EditErrorHandlerError {
286    UnknownValue(serde_json::Value),
287}
288
289/// struct for typed errors of method [`edit_git_sync_repository`]
290#[derive(Debug, Clone, Serialize, Deserialize)]
291#[serde(untagged)]
292pub enum EditGitSyncRepositoryError {
293    UnknownValue(serde_json::Value),
294}
295
296/// struct for typed errors of method [`edit_guest_access`]
297#[derive(Debug, Clone, Serialize, Deserialize)]
298#[serde(untagged)]
299pub enum EditGuestAccessError {
300    UnknownValue(serde_json::Value),
301}
302
303/// struct for typed errors of method [`edit_guest_jwt_key`]
304#[derive(Debug, Clone, Serialize, Deserialize)]
305#[serde(untagged)]
306pub enum EditGuestJwtKeyError {
307    UnknownValue(serde_json::Value),
308}
309
310/// struct for typed errors of method [`edit_instance_groups`]
311#[derive(Debug, Clone, Serialize, Deserialize)]
312#[serde(untagged)]
313pub enum EditInstanceGroupsError {
314    UnknownValue(serde_json::Value),
315}
316
317/// struct for typed errors of method [`edit_large_file_storage_config`]
318#[derive(Debug, Clone, Serialize, Deserialize)]
319#[serde(untagged)]
320pub enum EditLargeFileStorageConfigError {
321    UnknownValue(serde_json::Value),
322}
323
324/// struct for typed errors of method [`edit_slack_command`]
325#[derive(Debug, Clone, Serialize, Deserialize)]
326#[serde(untagged)]
327pub enum EditSlackCommandError {
328    UnknownValue(serde_json::Value),
329}
330
331/// struct for typed errors of method [`edit_success_handler`]
332#[derive(Debug, Clone, Serialize, Deserialize)]
333#[serde(untagged)]
334pub enum EditSuccessHandlerError {
335    UnknownValue(serde_json::Value),
336}
337
338/// struct for typed errors of method [`edit_teams_command`]
339#[derive(Debug, Clone, Serialize, Deserialize)]
340#[serde(untagged)]
341pub enum EditTeamsCommandError {
342    UnknownValue(serde_json::Value),
343}
344
345/// struct for typed errors of method [`edit_webhook`]
346#[derive(Debug, Clone, Serialize, Deserialize)]
347#[serde(untagged)]
348pub enum EditWebhookError {
349    UnknownValue(serde_json::Value),
350}
351
352/// struct for typed errors of method [`edit_workspace_default_app`]
353#[derive(Debug, Clone, Serialize, Deserialize)]
354#[serde(untagged)]
355pub enum EditWorkspaceDefaultAppError {
356    UnknownValue(serde_json::Value),
357}
358
359/// struct for typed errors of method [`edit_workspace_deploy_ui_settings`]
360#[derive(Debug, Clone, Serialize, Deserialize)]
361#[serde(untagged)]
362pub enum EditWorkspaceDeployUiSettingsError {
363    UnknownValue(serde_json::Value),
364}
365
366/// struct for typed errors of method [`edit_workspace_git_sync_config`]
367#[derive(Debug, Clone, Serialize, Deserialize)]
368#[serde(untagged)]
369pub enum EditWorkspaceGitSyncConfigError {
370    UnknownValue(serde_json::Value),
371}
372
373/// struct for typed errors of method [`enable_datatable_migrations`]
374#[derive(Debug, Clone, Serialize, Deserialize)]
375#[serde(untagged)]
376pub enum EnableDatatableMigrationsError {
377    UnknownValue(serde_json::Value),
378}
379
380/// struct for typed errors of method [`exists_username`]
381#[derive(Debug, Clone, Serialize, Deserialize)]
382#[serde(untagged)]
383pub enum ExistsUsernameError {
384    UnknownValue(serde_json::Value),
385}
386
387/// struct for typed errors of method [`exists_workspace`]
388#[derive(Debug, Clone, Serialize, Deserialize)]
389#[serde(untagged)]
390pub enum ExistsWorkspaceError {
391    UnknownValue(serde_json::Value),
392}
393
394/// struct for typed errors of method [`export_pg_schema`]
395#[derive(Debug, Clone, Serialize, Deserialize)]
396#[serde(untagged)]
397pub enum ExportPgSchemaError {
398    UnknownValue(serde_json::Value),
399}
400
401/// struct for typed errors of method [`generate_initial_datatable_migration`]
402#[derive(Debug, Clone, Serialize, Deserialize)]
403#[serde(untagged)]
404pub enum GenerateInitialDatatableMigrationError {
405    UnknownValue(serde_json::Value),
406}
407
408/// struct for typed errors of method [`get_billable_seats`]
409#[derive(Debug, Clone, Serialize, Deserialize)]
410#[serde(untagged)]
411pub enum GetBillableSeatsError {
412    UnknownValue(serde_json::Value),
413}
414
415/// struct for typed errors of method [`get_cloud_quotas`]
416#[derive(Debug, Clone, Serialize, Deserialize)]
417#[serde(untagged)]
418pub enum GetCloudQuotasError {
419    UnknownValue(serde_json::Value),
420}
421
422/// struct for typed errors of method [`get_copilot_info`]
423#[derive(Debug, Clone, Serialize, Deserialize)]
424#[serde(untagged)]
425pub enum GetCopilotInfoError {
426    UnknownValue(serde_json::Value),
427}
428
429/// struct for typed errors of method [`get_copilot_settings_state`]
430#[derive(Debug, Clone, Serialize, Deserialize)]
431#[serde(untagged)]
432pub enum GetCopilotSettingsStateError {
433    UnknownValue(serde_json::Value),
434}
435
436/// struct for typed errors of method [`get_data_table_table_schema`]
437#[derive(Debug, Clone, Serialize, Deserialize)]
438#[serde(untagged)]
439pub enum GetDataTableTableSchemaError {
440    UnknownValue(serde_json::Value),
441}
442
443/// struct for typed errors of method [`get_datatable_full_schema`]
444#[derive(Debug, Clone, Serialize, Deserialize)]
445#[serde(untagged)]
446pub enum GetDatatableFullSchemaError {
447    UnknownValue(serde_json::Value),
448}
449
450/// struct for typed errors of method [`get_datatable_migrations_status`]
451#[derive(Debug, Clone, Serialize, Deserialize)]
452#[serde(untagged)]
453pub enum GetDatatableMigrationsStatusError {
454    UnknownValue(serde_json::Value),
455}
456
457/// struct for typed errors of method [`get_datatable_permissions`]
458#[derive(Debug, Clone, Serialize, Deserialize)]
459#[serde(untagged)]
460pub enum GetDatatablePermissionsError {
461    UnknownValue(serde_json::Value),
462}
463
464/// struct for typed errors of method [`get_default_scripts`]
465#[derive(Debug, Clone, Serialize, Deserialize)]
466#[serde(untagged)]
467pub enum GetDefaultScriptsError {
468    UnknownValue(serde_json::Value),
469}
470
471/// struct for typed errors of method [`get_dependency_map`]
472#[derive(Debug, Clone, Serialize, Deserialize)]
473#[serde(untagged)]
474pub enum GetDependencyMapError {
475    UnknownValue(serde_json::Value),
476}
477
478/// struct for typed errors of method [`get_dependents`]
479#[derive(Debug, Clone, Serialize, Deserialize)]
480#[serde(untagged)]
481pub enum GetDependentsError {
482    UnknownValue(serde_json::Value),
483}
484
485/// struct for typed errors of method [`get_dependents_amounts`]
486#[derive(Debug, Clone, Serialize, Deserialize)]
487#[serde(untagged)]
488pub enum GetDependentsAmountsError {
489    UnknownValue(serde_json::Value),
490}
491
492/// struct for typed errors of method [`get_deploy_to`]
493#[derive(Debug, Clone, Serialize, Deserialize)]
494#[serde(untagged)]
495pub enum GetDeployToError {
496    UnknownValue(serde_json::Value),
497}
498
499/// struct for typed errors of method [`get_dev_workspace`]
500#[derive(Debug, Clone, Serialize, Deserialize)]
501#[serde(untagged)]
502pub enum GetDevWorkspaceError {
503    UnknownValue(serde_json::Value),
504}
505
506/// struct for typed errors of method [`get_git_sync_deploy_mode`]
507#[derive(Debug, Clone, Serialize, Deserialize)]
508#[serde(untagged)]
509pub enum GetGitSyncDeployModeError {
510    UnknownValue(serde_json::Value),
511}
512
513/// struct for typed errors of method [`get_git_sync_enabled`]
514#[derive(Debug, Clone, Serialize, Deserialize)]
515#[serde(untagged)]
516pub enum GetGitSyncEnabledError {
517    UnknownValue(serde_json::Value),
518}
519
520/// struct for typed errors of method [`get_github_app_repo_archive`]
521#[derive(Debug, Clone, Serialize, Deserialize)]
522#[serde(untagged)]
523pub enum GetGithubAppRepoArchiveError {
524    UnknownValue(serde_json::Value),
525}
526
527/// struct for typed errors of method [`get_github_app_token`]
528#[derive(Debug, Clone, Serialize, Deserialize)]
529#[serde(untagged)]
530pub enum GetGithubAppTokenError {
531    UnknownValue(serde_json::Value),
532}
533
534/// struct for typed errors of method [`get_guest_usage`]
535#[derive(Debug, Clone, Serialize, Deserialize)]
536#[serde(untagged)]
537pub enum GetGuestUsageError {
538    UnknownValue(serde_json::Value),
539}
540
541/// struct for typed errors of method [`get_imports`]
542#[derive(Debug, Clone, Serialize, Deserialize)]
543#[serde(untagged)]
544pub enum GetImportsError {
545    UnknownValue(serde_json::Value),
546}
547
548/// struct for typed errors of method [`get_is_premium`]
549#[derive(Debug, Clone, Serialize, Deserialize)]
550#[serde(untagged)]
551pub enum GetIsPremiumError {
552    UnknownValue(serde_json::Value),
553}
554
555/// struct for typed errors of method [`get_open_deployment_request`]
556#[derive(Debug, Clone, Serialize, Deserialize)]
557#[serde(untagged)]
558pub enum GetOpenDeploymentRequestError {
559    UnknownValue(serde_json::Value),
560}
561
562/// struct for typed errors of method [`get_premium_info`]
563#[derive(Debug, Clone, Serialize, Deserialize)]
564#[serde(untagged)]
565pub enum GetPremiumInfoError {
566    UnknownValue(serde_json::Value),
567}
568
569/// struct for typed errors of method [`get_public_settings`]
570#[derive(Debug, Clone, Serialize, Deserialize)]
571#[serde(untagged)]
572pub enum GetPublicSettingsError {
573    UnknownValue(serde_json::Value),
574}
575
576/// struct for typed errors of method [`get_session_workspace_retention`]
577#[derive(Debug, Clone, Serialize, Deserialize)]
578#[serde(untagged)]
579pub enum GetSessionWorkspaceRetentionError {
580    UnknownValue(serde_json::Value),
581}
582
583/// struct for typed errors of method [`get_session_workspace_status`]
584#[derive(Debug, Clone, Serialize, Deserialize)]
585#[serde(untagged)]
586pub enum GetSessionWorkspaceStatusError {
587    UnknownValue(serde_json::Value),
588}
589
590/// struct for typed errors of method [`get_settings`]
591#[derive(Debug, Clone, Serialize, Deserialize)]
592#[serde(untagged)]
593pub enum GetSettingsError {
594    UnknownValue(serde_json::Value),
595}
596
597/// struct for typed errors of method [`get_shared_ui`]
598#[derive(Debug, Clone, Serialize, Deserialize)]
599#[serde(untagged)]
600pub enum GetSharedUiError {
601    UnknownValue(serde_json::Value),
602}
603
604/// struct for typed errors of method [`get_shared_ui_version`]
605#[derive(Debug, Clone, Serialize, Deserialize)]
606#[serde(untagged)]
607pub enum GetSharedUiVersionError {
608    UnknownValue(serde_json::Value),
609}
610
611/// struct for typed errors of method [`get_threshold_alert`]
612#[derive(Debug, Clone, Serialize, Deserialize)]
613#[serde(untagged)]
614pub enum GetThresholdAlertError {
615    UnknownValue(serde_json::Value),
616}
617
618/// struct for typed errors of method [`get_used_triggers`]
619#[derive(Debug, Clone, Serialize, Deserialize)]
620#[serde(untagged)]
621pub enum GetUsedTriggersError {
622    UnknownValue(serde_json::Value),
623}
624
625/// struct for typed errors of method [`get_workspace_as_super_admin`]
626#[derive(Debug, Clone, Serialize, Deserialize)]
627#[serde(untagged)]
628pub enum GetWorkspaceAsSuperAdminError {
629    UnknownValue(serde_json::Value),
630}
631
632/// struct for typed errors of method [`get_workspace_default_app`]
633#[derive(Debug, Clone, Serialize, Deserialize)]
634#[serde(untagged)]
635pub enum GetWorkspaceDefaultAppError {
636    UnknownValue(serde_json::Value),
637}
638
639/// struct for typed errors of method [`get_workspace_encryption_key`]
640#[derive(Debug, Clone, Serialize, Deserialize)]
641#[serde(untagged)]
642pub enum GetWorkspaceEncryptionKeyError {
643    UnknownValue(serde_json::Value),
644}
645
646/// struct for typed errors of method [`get_workspace_name`]
647#[derive(Debug, Clone, Serialize, Deserialize)]
648#[serde(untagged)]
649pub enum GetWorkspaceNameError {
650    UnknownValue(serde_json::Value),
651}
652
653/// struct for typed errors of method [`get_workspace_slack_oauth_config`]
654#[derive(Debug, Clone, Serialize, Deserialize)]
655#[serde(untagged)]
656pub enum GetWorkspaceSlackOauthConfigError {
657    UnknownValue(serde_json::Value),
658}
659
660/// struct for typed errors of method [`get_workspace_usage`]
661#[derive(Debug, Clone, Serialize, Deserialize)]
662#[serde(untagged)]
663pub enum GetWorkspaceUsageError {
664    UnknownValue(serde_json::Value),
665}
666
667/// struct for typed errors of method [`import_pg_database`]
668#[derive(Debug, Clone, Serialize, Deserialize)]
669#[serde(untagged)]
670pub enum ImportPgDatabaseError {
671    UnknownValue(serde_json::Value),
672}
673
674/// struct for typed errors of method [`invite_user`]
675#[derive(Debug, Clone, Serialize, Deserialize)]
676#[serde(untagged)]
677pub enum InviteUserError {
678    UnknownValue(serde_json::Value),
679}
680
681/// struct for typed errors of method [`is_domain_allowed`]
682#[derive(Debug, Clone, Serialize, Deserialize)]
683#[serde(untagged)]
684pub enum IsDomainAllowedError {
685    UnknownValue(serde_json::Value),
686}
687
688/// struct for typed errors of method [`leave_workspace`]
689#[derive(Debug, Clone, Serialize, Deserialize)]
690#[serde(untagged)]
691pub enum LeaveWorkspaceError {
692    UnknownValue(serde_json::Value),
693}
694
695/// struct for typed errors of method [`list_available_teams_channels`]
696#[derive(Debug, Clone, Serialize, Deserialize)]
697#[serde(untagged)]
698pub enum ListAvailableTeamsChannelsError {
699    UnknownValue(serde_json::Value),
700}
701
702/// struct for typed errors of method [`list_available_teams_ids`]
703#[derive(Debug, Clone, Serialize, Deserialize)]
704#[serde(untagged)]
705pub enum ListAvailableTeamsIdsError {
706    UnknownValue(serde_json::Value),
707}
708
709/// struct for typed errors of method [`list_data_table_schemas`]
710#[derive(Debug, Clone, Serialize, Deserialize)]
711#[serde(untagged)]
712pub enum ListDataTableSchemasError {
713    UnknownValue(serde_json::Value),
714}
715
716/// struct for typed errors of method [`list_data_table_tables`]
717#[derive(Debug, Clone, Serialize, Deserialize)]
718#[serde(untagged)]
719pub enum ListDataTableTablesError {
720    UnknownValue(serde_json::Value),
721}
722
723/// struct for typed errors of method [`list_data_tables`]
724#[derive(Debug, Clone, Serialize, Deserialize)]
725#[serde(untagged)]
726pub enum ListDataTablesError {
727    UnknownValue(serde_json::Value),
728}
729
730/// struct for typed errors of method [`list_datatable_migrations`]
731#[derive(Debug, Clone, Serialize, Deserialize)]
732#[serde(untagged)]
733pub enum ListDatatableMigrationsError {
734    UnknownValue(serde_json::Value),
735}
736
737/// struct for typed errors of method [`list_deployment_request_eligible_deployers`]
738#[derive(Debug, Clone, Serialize, Deserialize)]
739#[serde(untagged)]
740pub enum ListDeploymentRequestEligibleDeployersError {
741    UnknownValue(serde_json::Value),
742}
743
744/// struct for typed errors of method [`list_ducklakes`]
745#[derive(Debug, Clone, Serialize, Deserialize)]
746#[serde(untagged)]
747pub enum ListDucklakesError {
748    UnknownValue(serde_json::Value),
749}
750
751/// struct for typed errors of method [`list_pending_invites`]
752#[derive(Debug, Clone, Serialize, Deserialize)]
753#[serde(untagged)]
754pub enum ListPendingInvitesError {
755    UnknownValue(serde_json::Value),
756}
757
758/// struct for typed errors of method [`list_protection_rules`]
759#[derive(Debug, Clone, Serialize, Deserialize)]
760#[serde(untagged)]
761pub enum ListProtectionRulesError {
762    UnknownValue(serde_json::Value),
763}
764
765/// struct for typed errors of method [`list_shared_ui`]
766#[derive(Debug, Clone, Serialize, Deserialize)]
767#[serde(untagged)]
768pub enum ListSharedUiError {
769    UnknownValue(serde_json::Value),
770}
771
772/// struct for typed errors of method [`list_usable_datatable_roles`]
773#[derive(Debug, Clone, Serialize, Deserialize)]
774#[serde(untagged)]
775pub enum ListUsableDatatableRolesError {
776    UnknownValue(serde_json::Value),
777}
778
779/// struct for typed errors of method [`list_user_workspaces`]
780#[derive(Debug, Clone, Serialize, Deserialize)]
781#[serde(untagged)]
782pub enum ListUserWorkspacesError {
783    UnknownValue(serde_json::Value),
784}
785
786/// struct for typed errors of method [`list_workspaces`]
787#[derive(Debug, Clone, Serialize, Deserialize)]
788#[serde(untagged)]
789pub enum ListWorkspacesError {
790    UnknownValue(serde_json::Value),
791}
792
793/// struct for typed errors of method [`list_workspaces_as_super_admin`]
794#[derive(Debug, Clone, Serialize, Deserialize)]
795#[serde(untagged)]
796pub enum ListWorkspacesAsSuperAdminError {
797    UnknownValue(serde_json::Value),
798}
799
800/// struct for typed errors of method [`list_ws_specific`]
801#[derive(Debug, Clone, Serialize, Deserialize)]
802#[serde(untagged)]
803pub enum ListWsSpecificError {
804    UnknownValue(serde_json::Value),
805}
806
807/// struct for typed errors of method [`list_ws_specific_versions`]
808#[derive(Debug, Clone, Serialize, Deserialize)]
809#[serde(untagged)]
810pub enum ListWsSpecificVersionsError {
811    UnknownValue(serde_json::Value),
812}
813
814/// struct for typed errors of method [`log_feature_usage`]
815#[derive(Debug, Clone, Serialize, Deserialize)]
816#[serde(untagged)]
817pub enum LogFeatureUsageError {
818    UnknownValue(serde_json::Value),
819}
820
821/// struct for typed errors of method [`prune_versions`]
822#[derive(Debug, Clone, Serialize, Deserialize)]
823#[serde(untagged)]
824pub enum PruneVersionsError {
825    UnknownValue(serde_json::Value),
826}
827
828/// struct for typed errors of method [`rebuild_dependency_map`]
829#[derive(Debug, Clone, Serialize, Deserialize)]
830#[serde(untagged)]
831pub enum RebuildDependencyMapError {
832    UnknownValue(serde_json::Value),
833}
834
835/// struct for typed errors of method [`reset_diff_tally`]
836#[derive(Debug, Clone, Serialize, Deserialize)]
837#[serde(untagged)]
838pub enum ResetDiffTallyError {
839    UnknownValue(serde_json::Value),
840}
841
842/// struct for typed errors of method [`rollback_datatable_migrations`]
843#[derive(Debug, Clone, Serialize, Deserialize)]
844#[serde(untagged)]
845pub enum RollbackDatatableMigrationsError {
846    UnknownValue(serde_json::Value),
847}
848
849/// struct for typed errors of method [`run_datatable_migrations`]
850#[derive(Debug, Clone, Serialize, Deserialize)]
851#[serde(untagged)]
852pub enum RunDatatableMigrationsError {
853    UnknownValue(serde_json::Value),
854}
855
856/// struct for typed errors of method [`run_slack_message_test_job`]
857#[derive(Debug, Clone, Serialize, Deserialize)]
858#[serde(untagged)]
859pub enum RunSlackMessageTestJobError {
860    UnknownValue(serde_json::Value),
861}
862
863/// struct for typed errors of method [`run_teams_message_test_job`]
864#[derive(Debug, Clone, Serialize, Deserialize)]
865#[serde(untagged)]
866pub enum RunTeamsMessageTestJobError {
867    UnknownValue(serde_json::Value),
868}
869
870/// struct for typed errors of method [`seed_full_diff_scan`]
871#[derive(Debug, Clone, Serialize, Deserialize)]
872#[serde(untagged)]
873pub enum SeedFullDiffScanError {
874    UnknownValue(serde_json::Value),
875}
876
877/// struct for typed errors of method [`set_datatable_permissions`]
878#[derive(Debug, Clone, Serialize, Deserialize)]
879#[serde(untagged)]
880pub enum SetDatatablePermissionsError {
881    UnknownValue(serde_json::Value),
882}
883
884/// struct for typed errors of method [`set_environment_variable`]
885#[derive(Debug, Clone, Serialize, Deserialize)]
886#[serde(untagged)]
887pub enum SetEnvironmentVariableError {
888    UnknownValue(serde_json::Value),
889}
890
891/// struct for typed errors of method [`set_threshold_alert`]
892#[derive(Debug, Clone, Serialize, Deserialize)]
893#[serde(untagged)]
894pub enum SetThresholdAlertError {
895    UnknownValue(serde_json::Value),
896}
897
898/// struct for typed errors of method [`set_workspace_encryption_key`]
899#[derive(Debug, Clone, Serialize, Deserialize)]
900#[serde(untagged)]
901pub enum SetWorkspaceEncryptionKeyError {
902    UnknownValue(serde_json::Value),
903}
904
905/// struct for typed errors of method [`set_workspace_slack_oauth_config`]
906#[derive(Debug, Clone, Serialize, Deserialize)]
907#[serde(untagged)]
908pub enum SetWorkspaceSlackOauthConfigError {
909    UnknownValue(serde_json::Value),
910}
911
912/// struct for typed errors of method [`set_ws_specific`]
913#[derive(Debug, Clone, Serialize, Deserialize)]
914#[serde(untagged)]
915pub enum SetWsSpecificError {
916    UnknownValue(serde_json::Value),
917}
918
919/// struct for typed errors of method [`test_data_table_connection`]
920#[derive(Debug, Clone, Serialize, Deserialize)]
921#[serde(untagged)]
922pub enum TestDataTableConnectionError {
923    UnknownValue(serde_json::Value),
924}
925
926/// struct for typed errors of method [`unarchive_workspace`]
927#[derive(Debug, Clone, Serialize, Deserialize)]
928#[serde(untagged)]
929pub enum UnarchiveWorkspaceError {
930    UnknownValue(serde_json::Value),
931}
932
933/// struct for typed errors of method [`update_operator_settings`]
934#[derive(Debug, Clone, Serialize, Deserialize)]
935#[serde(untagged)]
936pub enum UpdateOperatorSettingsError {
937    UnknownValue(serde_json::Value),
938}
939
940/// struct for typed errors of method [`update_protection_rule`]
941#[derive(Debug, Clone, Serialize, Deserialize)]
942#[serde(untagged)]
943pub enum UpdateProtectionRuleError {
944    Status404(),
945    UnknownValue(serde_json::Value),
946}
947
948/// struct for typed errors of method [`update_shared_ui`]
949#[derive(Debug, Clone, Serialize, Deserialize)]
950#[serde(untagged)]
951pub enum UpdateSharedUiError {
952    UnknownValue(serde_json::Value),
953}
954
955/// struct for typed errors of method [`upsert_datatable_migration`]
956#[derive(Debug, Clone, Serialize, Deserialize)]
957#[serde(untagged)]
958pub enum UpsertDatatableMigrationError {
959    UnknownValue(serde_json::Value),
960}
961
962
963pub async fn add_user(configuration: &configuration::Configuration, workspace: &str, add_user_request: models::AddUserRequest) -> Result<String, Error<AddUserError>> {
964    let local_var_configuration = configuration;
965
966    let local_var_client = &local_var_configuration.client;
967
968    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/add_user", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
969    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
970
971    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
972        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
973    }
974    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
975        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
976    };
977    local_var_req_builder = local_var_req_builder.json(&add_user_request);
978
979    let local_var_req = local_var_req_builder.build()?;
980    let local_var_resp = local_var_client.execute(local_var_req).await?;
981
982    let local_var_status = local_var_resp.status();
983    let local_var_content = local_var_resp.text().await?;
984
985    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
986        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
987    } else {
988        let local_var_entity: Option<AddUserError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
989        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
990        Err(Error::ResponseError(local_var_error))
991    }
992}
993
994pub async fn archive_workspace(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<ArchiveWorkspaceError>> {
995    let local_var_configuration = configuration;
996
997    let local_var_client = &local_var_configuration.client;
998
999    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/archive", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1000    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1001
1002    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1003        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1004    }
1005    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1006        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1007    };
1008
1009    let local_var_req = local_var_req_builder.build()?;
1010    let local_var_resp = local_var_client.execute(local_var_req).await?;
1011
1012    let local_var_status = local_var_resp.status();
1013    let local_var_content = local_var_resp.text().await?;
1014
1015    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1016        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1017    } else {
1018        let local_var_entity: Option<ArchiveWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1019        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1020        Err(Error::ResponseError(local_var_error))
1021    }
1022}
1023
1024pub async fn attach_dev_workspace(configuration: &configuration::Configuration, workspace: &str, attach_dev_workspace_request: models::AttachDevWorkspaceRequest) -> Result<String, Error<AttachDevWorkspaceError>> {
1025    let local_var_configuration = configuration;
1026
1027    let local_var_client = &local_var_configuration.client;
1028
1029    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/attach_dev_workspace", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1030    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1031
1032    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1033        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1034    }
1035    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1036        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1037    };
1038    local_var_req_builder = local_var_req_builder.json(&attach_dev_workspace_request);
1039
1040    let local_var_req = local_var_req_builder.build()?;
1041    let local_var_resp = local_var_client.execute(local_var_req).await?;
1042
1043    let local_var_status = local_var_resp.status();
1044    let local_var_content = local_var_resp.text().await?;
1045
1046    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1047        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1048    } else {
1049        let local_var_entity: Option<AttachDevWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1050        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1051        Err(Error::ResponseError(local_var_error))
1052    }
1053}
1054
1055pub async fn cancel_deployment_request(configuration: &configuration::Configuration, workspace: &str, id: i64) -> Result<String, Error<CancelDeploymentRequestError>> {
1056    let local_var_configuration = configuration;
1057
1058    let local_var_client = &local_var_configuration.client;
1059
1060    let local_var_uri_str = format!("{}/w/{workspace}/deployment_request/{id}/cancel", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=id);
1061    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1062
1063    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1064        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1065    }
1066    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1067        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1068    };
1069
1070    let local_var_req = local_var_req_builder.build()?;
1071    let local_var_resp = local_var_client.execute(local_var_req).await?;
1072
1073    let local_var_status = local_var_resp.status();
1074    let local_var_content = local_var_resp.text().await?;
1075
1076    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1077        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1078    } else {
1079        let local_var_entity: Option<CancelDeploymentRequestError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1080        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1081        Err(Error::ResponseError(local_var_error))
1082    }
1083}
1084
1085pub async fn change_workspace_color(configuration: &configuration::Configuration, workspace: &str, change_workspace_color_request: Option<models::ChangeWorkspaceColorRequest>) -> Result<String, Error<ChangeWorkspaceColorError>> {
1086    let local_var_configuration = configuration;
1087
1088    let local_var_client = &local_var_configuration.client;
1089
1090    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/change_workspace_color", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1091    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1092
1093    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1094        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1095    }
1096    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1097        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1098    };
1099    local_var_req_builder = local_var_req_builder.json(&change_workspace_color_request);
1100
1101    let local_var_req = local_var_req_builder.build()?;
1102    let local_var_resp = local_var_client.execute(local_var_req).await?;
1103
1104    let local_var_status = local_var_resp.status();
1105    let local_var_content = local_var_resp.text().await?;
1106
1107    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1108        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1109    } else {
1110        let local_var_entity: Option<ChangeWorkspaceColorError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1111        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1112        Err(Error::ResponseError(local_var_error))
1113    }
1114}
1115
1116pub async fn change_workspace_id(configuration: &configuration::Configuration, workspace: &str, change_workspace_id_request: Option<models::ChangeWorkspaceIdRequest>) -> Result<String, Error<ChangeWorkspaceIdError>> {
1117    let local_var_configuration = configuration;
1118
1119    let local_var_client = &local_var_configuration.client;
1120
1121    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/change_workspace_id", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1122    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1123
1124    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1125        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1126    }
1127    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1128        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1129    };
1130    local_var_req_builder = local_var_req_builder.json(&change_workspace_id_request);
1131
1132    let local_var_req = local_var_req_builder.build()?;
1133    let local_var_resp = local_var_client.execute(local_var_req).await?;
1134
1135    let local_var_status = local_var_resp.status();
1136    let local_var_content = local_var_resp.text().await?;
1137
1138    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1139        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1140    } else {
1141        let local_var_entity: Option<ChangeWorkspaceIdError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1142        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1143        Err(Error::ResponseError(local_var_error))
1144    }
1145}
1146
1147pub async fn change_workspace_name(configuration: &configuration::Configuration, workspace: &str, change_workspace_name_request: Option<models::ChangeWorkspaceNameRequest>) -> Result<String, Error<ChangeWorkspaceNameError>> {
1148    let local_var_configuration = configuration;
1149
1150    let local_var_client = &local_var_configuration.client;
1151
1152    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/change_workspace_name", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1153    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1154
1155    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1156        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1157    }
1158    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1159        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1160    };
1161    local_var_req_builder = local_var_req_builder.json(&change_workspace_name_request);
1162
1163    let local_var_req = local_var_req_builder.build()?;
1164    let local_var_resp = local_var_client.execute(local_var_req).await?;
1165
1166    let local_var_status = local_var_resp.status();
1167    let local_var_content = local_var_resp.text().await?;
1168
1169    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1170        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1171    } else {
1172        let local_var_entity: Option<ChangeWorkspaceNameError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1173        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1174        Err(Error::ResponseError(local_var_error))
1175    }
1176}
1177
1178/// Called by the UI after the deploy loop completes. Closes the request and marks every comment obsolete. Idempotent.
1179pub async fn close_deployment_request_merged(configuration: &configuration::Configuration, workspace: &str, id: i64) -> Result<String, Error<CloseDeploymentRequestMergedError>> {
1180    let local_var_configuration = configuration;
1181
1182    let local_var_client = &local_var_configuration.client;
1183
1184    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);
1185    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1186
1187    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1188        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1189    }
1190    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1191        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1192    };
1193
1194    let local_var_req = local_var_req_builder.build()?;
1195    let local_var_resp = local_var_client.execute(local_var_req).await?;
1196
1197    let local_var_status = local_var_resp.status();
1198    let local_var_content = local_var_resp.text().await?;
1199
1200    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1201        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1202    } else {
1203        let local_var_entity: Option<CloseDeploymentRequestMergedError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1204        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1205        Err(Error::ResponseError(local_var_error))
1206    }
1207}
1208
1209/// 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.
1210pub async fn compare_workspaces(configuration: &configuration::Configuration, workspace: &str, target_workspace_id: &str) -> Result<models::WorkspaceComparison, Error<CompareWorkspacesError>> {
1211    let local_var_configuration = configuration;
1212
1213    let local_var_client = &local_var_configuration.client;
1214
1215    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));
1216    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1217
1218    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1219        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1220    }
1221    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1222        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1223    };
1224
1225    let local_var_req = local_var_req_builder.build()?;
1226    let local_var_resp = local_var_client.execute(local_var_req).await?;
1227
1228    let local_var_status = local_var_resp.status();
1229    let local_var_content = local_var_resp.text().await?;
1230
1231    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1232        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1233    } else {
1234        let local_var_entity: Option<CompareWorkspacesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1235        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1236        Err(Error::ResponseError(local_var_error))
1237    }
1238}
1239
1240pub async fn connect_slack(configuration: &configuration::Configuration, workspace: &str, connect_slack_request: models::ConnectSlackRequest) -> Result<(), Error<ConnectSlackError>> {
1241    let local_var_configuration = configuration;
1242
1243    let local_var_client = &local_var_configuration.client;
1244
1245    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/connect_slack", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1246    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1247
1248    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1249        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1250    }
1251    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1252        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1253    };
1254    local_var_req_builder = local_var_req_builder.json(&connect_slack_request);
1255
1256    let local_var_req = local_var_req_builder.build()?;
1257    let local_var_resp = local_var_client.execute(local_var_req).await?;
1258
1259    let local_var_status = local_var_resp.status();
1260    let local_var_content = local_var_resp.text().await?;
1261
1262    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1263        Ok(())
1264    } else {
1265        let local_var_entity: Option<ConnectSlackError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1266        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1267        Err(Error::ResponseError(local_var_error))
1268    }
1269}
1270
1271pub async fn connect_teams(configuration: &configuration::Configuration, workspace: &str, connect_teams_request: models::ConnectTeamsRequest) -> Result<String, Error<ConnectTeamsError>> {
1272    let local_var_configuration = configuration;
1273
1274    let local_var_client = &local_var_configuration.client;
1275
1276    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/connect_teams", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1277    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1278
1279    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1280        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1281    }
1282    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1283        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1284    };
1285    local_var_req_builder = local_var_req_builder.json(&connect_teams_request);
1286
1287    let local_var_req = local_var_req_builder.build()?;
1288    let local_var_resp = local_var_client.execute(local_var_req).await?;
1289
1290    let local_var_status = local_var_resp.status();
1291    let local_var_content = local_var_resp.text().await?;
1292
1293    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1294        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1295    } else {
1296        let local_var_entity: Option<ConnectTeamsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1297        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1298        Err(Error::ResponseError(local_var_error))
1299    }
1300}
1301
1302pub async fn create_datatable_migration(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str, create_datatable_migration_request: models::CreateDatatableMigrationRequest) -> Result<models::DatatableMigration, Error<CreateDatatableMigrationError>> {
1303    let local_var_configuration = configuration;
1304
1305    let local_var_client = &local_var_configuration.client;
1306
1307    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/create_datatable_migration/{datatable_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name));
1308    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1309
1310    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1311        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1312    }
1313    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1314        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1315    };
1316    local_var_req_builder = local_var_req_builder.json(&create_datatable_migration_request);
1317
1318    let local_var_req = local_var_req_builder.build()?;
1319    let local_var_resp = local_var_client.execute(local_var_req).await?;
1320
1321    let local_var_status = local_var_resp.status();
1322    let local_var_content = local_var_resp.text().await?;
1323
1324    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1325        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1326    } else {
1327        let local_var_entity: Option<CreateDatatableMigrationError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1328        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1329        Err(Error::ResponseError(local_var_error))
1330    }
1331}
1332
1333pub async fn create_deployment_request(configuration: &configuration::Configuration, workspace: &str, create_deployment_request_request: models::CreateDeploymentRequestRequest) -> Result<models::DeploymentRequest, Error<CreateDeploymentRequestError>> {
1334    let local_var_configuration = configuration;
1335
1336    let local_var_client = &local_var_configuration.client;
1337
1338    let local_var_uri_str = format!("{}/w/{workspace}/deployment_request", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1339    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1340
1341    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1342        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1343    }
1344    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1345        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1346    };
1347    local_var_req_builder = local_var_req_builder.json(&create_deployment_request_request);
1348
1349    let local_var_req = local_var_req_builder.build()?;
1350    let local_var_resp = local_var_client.execute(local_var_req).await?;
1351
1352    let local_var_status = local_var_resp.status();
1353    let local_var_content = local_var_resp.text().await?;
1354
1355    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1356        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1357    } else {
1358        let local_var_entity: Option<CreateDeploymentRequestError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1359        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1360        Err(Error::ResponseError(local_var_error))
1361    }
1362}
1363
1364pub async fn create_deployment_request_comment(configuration: &configuration::Configuration, workspace: &str, id: i64, create_deployment_request_comment_request: models::CreateDeploymentRequestCommentRequest) -> Result<models::DeploymentRequestComment, Error<CreateDeploymentRequestCommentError>> {
1365    let local_var_configuration = configuration;
1366
1367    let local_var_client = &local_var_configuration.client;
1368
1369    let local_var_uri_str = format!("{}/w/{workspace}/deployment_request/{id}/comment", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=id);
1370    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1371
1372    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1373        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1374    }
1375    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1376        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1377    };
1378    local_var_req_builder = local_var_req_builder.json(&create_deployment_request_comment_request);
1379
1380    let local_var_req = local_var_req_builder.build()?;
1381    let local_var_resp = local_var_client.execute(local_var_req).await?;
1382
1383    let local_var_status = local_var_resp.status();
1384    let local_var_content = local_var_resp.text().await?;
1385
1386    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1387        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1388    } else {
1389        let local_var_entity: Option<CreateDeploymentRequestCommentError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1390        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1391        Err(Error::ResponseError(local_var_error))
1392    }
1393}
1394
1395pub async fn create_pg_database(configuration: &configuration::Configuration, workspace: &str, create_pg_database_request: models::CreatePgDatabaseRequest) -> Result<String, Error<CreatePgDatabaseError>> {
1396    let local_var_configuration = configuration;
1397
1398    let local_var_client = &local_var_configuration.client;
1399
1400    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/create_pg_database", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1401    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1402
1403    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1404        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1405    }
1406    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1407        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1408    };
1409    local_var_req_builder = local_var_req_builder.json(&create_pg_database_request);
1410
1411    let local_var_req = local_var_req_builder.build()?;
1412    let local_var_resp = local_var_client.execute(local_var_req).await?;
1413
1414    let local_var_status = local_var_resp.status();
1415    let local_var_content = local_var_resp.text().await?;
1416
1417    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1418        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1419    } else {
1420        let local_var_entity: Option<CreatePgDatabaseError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1421        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1422        Err(Error::ResponseError(local_var_error))
1423    }
1424}
1425
1426pub async fn create_protection_rule(configuration: &configuration::Configuration, workspace: &str, create_protection_rule_request: models::CreateProtectionRuleRequest) -> Result<String, Error<CreateProtectionRuleError>> {
1427    let local_var_configuration = configuration;
1428
1429    let local_var_client = &local_var_configuration.client;
1430
1431    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/protection_rules", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1432    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1433
1434    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1435        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1436    }
1437    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1438        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1439    };
1440    local_var_req_builder = local_var_req_builder.json(&create_protection_rule_request);
1441
1442    let local_var_req = local_var_req_builder.build()?;
1443    let local_var_resp = local_var_client.execute(local_var_req).await?;
1444
1445    let local_var_status = local_var_resp.status();
1446    let local_var_content = local_var_resp.text().await?;
1447
1448    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1449        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1450    } else {
1451        let local_var_entity: Option<CreateProtectionRuleError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1452        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1453        Err(Error::ResponseError(local_var_error))
1454    }
1455}
1456
1457pub async fn create_service_account(configuration: &configuration::Configuration, workspace: &str, create_service_account_request: models::CreateServiceAccountRequest) -> Result<String, Error<CreateServiceAccountError>> {
1458    let local_var_configuration = configuration;
1459
1460    let local_var_client = &local_var_configuration.client;
1461
1462    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/create_service_account", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1463    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1464
1465    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1466        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1467    }
1468    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1469        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1470    };
1471    local_var_req_builder = local_var_req_builder.json(&create_service_account_request);
1472
1473    let local_var_req = local_var_req_builder.build()?;
1474    let local_var_resp = local_var_client.execute(local_var_req).await?;
1475
1476    let local_var_status = local_var_resp.status();
1477    let local_var_content = local_var_resp.text().await?;
1478
1479    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1480        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1481    } else {
1482        let local_var_entity: Option<CreateServiceAccountError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1483        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1484        Err(Error::ResponseError(local_var_error))
1485    }
1486}
1487
1488pub async fn create_workspace(configuration: &configuration::Configuration, create_workspace: models::CreateWorkspace) -> Result<String, Error<CreateWorkspaceError>> {
1489    let local_var_configuration = configuration;
1490
1491    let local_var_client = &local_var_configuration.client;
1492
1493    let local_var_uri_str = format!("{}/workspaces/create", local_var_configuration.base_path);
1494    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1495
1496    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1497        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1498    }
1499    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1500        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1501    };
1502    local_var_req_builder = local_var_req_builder.json(&create_workspace);
1503
1504    let local_var_req = local_var_req_builder.build()?;
1505    let local_var_resp = local_var_client.execute(local_var_req).await?;
1506
1507    let local_var_status = local_var_resp.status();
1508    let local_var_content = local_var_resp.text().await?;
1509
1510    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1511        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1512    } else {
1513        let local_var_entity: Option<CreateWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1514        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1515        Err(Error::ResponseError(local_var_error))
1516    }
1517}
1518
1519pub async fn create_workspace_fork(configuration: &configuration::Configuration, workspace: &str, create_workspace_fork: models::CreateWorkspaceFork) -> Result<String, Error<CreateWorkspaceForkError>> {
1520    let local_var_configuration = configuration;
1521
1522    let local_var_client = &local_var_configuration.client;
1523
1524    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/create_fork", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1525    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1526
1527    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1528        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1529    }
1530    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1531        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1532    };
1533    local_var_req_builder = local_var_req_builder.json(&create_workspace_fork);
1534
1535    let local_var_req = local_var_req_builder.build()?;
1536    let local_var_resp = local_var_client.execute(local_var_req).await?;
1537
1538    let local_var_status = local_var_resp.status();
1539    let local_var_content = local_var_resp.text().await?;
1540
1541    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1542        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1543    } else {
1544        let local_var_entity: Option<CreateWorkspaceForkError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1545        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1546        Err(Error::ResponseError(local_var_error))
1547    }
1548}
1549
1550pub async fn create_workspace_fork_git_branch(configuration: &configuration::Configuration, workspace: &str, create_workspace_fork: models::CreateWorkspaceFork) -> Result<Vec<uuid::Uuid>, Error<CreateWorkspaceForkGitBranchError>> {
1551    let local_var_configuration = configuration;
1552
1553    let local_var_client = &local_var_configuration.client;
1554
1555    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/create_workspace_fork_branch", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1556    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1557
1558    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1559        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1560    }
1561    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1562        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1563    };
1564    local_var_req_builder = local_var_req_builder.json(&create_workspace_fork);
1565
1566    let local_var_req = local_var_req_builder.build()?;
1567    let local_var_resp = local_var_client.execute(local_var_req).await?;
1568
1569    let local_var_status = local_var_resp.status();
1570    let local_var_content = local_var_resp.text().await?;
1571
1572    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1573        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1574    } else {
1575        let local_var_entity: Option<CreateWorkspaceForkGitBranchError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1576        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1577        Err(Error::ResponseError(local_var_error))
1578    }
1579}
1580
1581pub async fn delete_datatable_migration(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str, timestamp: i64) -> Result<String, Error<DeleteDatatableMigrationError>> {
1582    let local_var_configuration = configuration;
1583
1584    let local_var_client = &local_var_configuration.client;
1585
1586    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/delete_datatable_migration/{datatable_name}/{timestamp}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name), timestamp=timestamp);
1587    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1588
1589    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1590        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1591    }
1592    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1593        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1594    };
1595
1596    let local_var_req = local_var_req_builder.build()?;
1597    let local_var_resp = local_var_client.execute(local_var_req).await?;
1598
1599    let local_var_status = local_var_resp.status();
1600    let local_var_content = local_var_resp.text().await?;
1601
1602    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1603        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1604    } else {
1605        let local_var_entity: Option<DeleteDatatableMigrationError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1606        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1607        Err(Error::ResponseError(local_var_error))
1608    }
1609}
1610
1611pub async fn delete_git_sync_repository(configuration: &configuration::Configuration, workspace: &str, delete_git_sync_repository_request: models::DeleteGitSyncRepositoryRequest) -> Result<serde_json::Value, Error<DeleteGitSyncRepositoryError>> {
1612    let local_var_configuration = configuration;
1613
1614    let local_var_client = &local_var_configuration.client;
1615
1616    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/delete_git_sync_repository", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1617    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1618
1619    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1620        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1621    }
1622    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1623        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1624    };
1625    local_var_req_builder = local_var_req_builder.json(&delete_git_sync_repository_request);
1626
1627    let local_var_req = local_var_req_builder.build()?;
1628    let local_var_resp = local_var_client.execute(local_var_req).await?;
1629
1630    let local_var_status = local_var_resp.status();
1631    let local_var_content = local_var_resp.text().await?;
1632
1633    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1634        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1635    } else {
1636        let local_var_entity: Option<DeleteGitSyncRepositoryError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1637        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1638        Err(Error::ResponseError(local_var_error))
1639    }
1640}
1641
1642pub async fn delete_invite(configuration: &configuration::Configuration, workspace: &str, delete_invite_request: models::DeleteInviteRequest) -> Result<String, Error<DeleteInviteError>> {
1643    let local_var_configuration = configuration;
1644
1645    let local_var_client = &local_var_configuration.client;
1646
1647    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/delete_invite", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1648    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1649
1650    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1651        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1652    }
1653    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1654        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1655    };
1656    local_var_req_builder = local_var_req_builder.json(&delete_invite_request);
1657
1658    let local_var_req = local_var_req_builder.build()?;
1659    let local_var_resp = local_var_client.execute(local_var_req).await?;
1660
1661    let local_var_status = local_var_resp.status();
1662    let local_var_content = local_var_resp.text().await?;
1663
1664    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1665        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1666    } else {
1667        let local_var_entity: Option<DeleteInviteError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1668        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1669        Err(Error::ResponseError(local_var_error))
1670    }
1671}
1672
1673pub async fn delete_protection_rule(configuration: &configuration::Configuration, workspace: &str, rule_name: &str) -> Result<String, Error<DeleteProtectionRuleError>> {
1674    let local_var_configuration = configuration;
1675
1676    let local_var_client = &local_var_configuration.client;
1677
1678    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));
1679    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1680
1681    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1682        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1683    }
1684    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1685        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1686    };
1687
1688    let local_var_req = local_var_req_builder.build()?;
1689    let local_var_resp = local_var_client.execute(local_var_req).await?;
1690
1691    let local_var_status = local_var_resp.status();
1692    let local_var_content = local_var_resp.text().await?;
1693
1694    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1695        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1696    } else {
1697        let local_var_entity: Option<DeleteProtectionRuleError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1698        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1699        Err(Error::ResponseError(local_var_error))
1700    }
1701}
1702
1703pub async fn delete_workspace(configuration: &configuration::Configuration, workspace: &str, only_delete_forks: Option<bool>) -> Result<String, Error<DeleteWorkspaceError>> {
1704    let local_var_configuration = configuration;
1705
1706    let local_var_client = &local_var_configuration.client;
1707
1708    let local_var_uri_str = format!("{}/workspaces/delete/{workspace}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1709    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1710
1711    if let Some(ref local_var_str) = only_delete_forks {
1712        local_var_req_builder = local_var_req_builder.query(&[("only_delete_forks", &local_var_str.to_string())]);
1713    }
1714    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1715        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1716    }
1717    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1718        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1719    };
1720
1721    let local_var_req = local_var_req_builder.build()?;
1722    let local_var_resp = local_var_client.execute(local_var_req).await?;
1723
1724    let local_var_status = local_var_resp.status();
1725    let local_var_content = local_var_resp.text().await?;
1726
1727    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1728        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1729    } else {
1730        let local_var_entity: Option<DeleteWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1731        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1732        Err(Error::ResponseError(local_var_error))
1733    }
1734}
1735
1736pub async fn delete_workspace_slack_oauth_config(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<DeleteWorkspaceSlackOauthConfigError>> {
1737    let local_var_configuration = configuration;
1738
1739    let local_var_client = &local_var_configuration.client;
1740
1741    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/slack_oauth_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1742    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1743
1744    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1745        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1746    }
1747    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1748        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1749    };
1750
1751    let local_var_req = local_var_req_builder.build()?;
1752    let local_var_resp = local_var_client.execute(local_var_req).await?;
1753
1754    let local_var_status = local_var_resp.status();
1755    let local_var_content = local_var_resp.text().await?;
1756
1757    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1758        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1759    } else {
1760        let local_var_entity: Option<DeleteWorkspaceSlackOauthConfigError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1761        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1762        Err(Error::ResponseError(local_var_error))
1763    }
1764}
1765
1766pub async fn detach_dev_workspace(configuration: &configuration::Configuration, workspace: &str, detach_dev_workspace_request: models::DetachDevWorkspaceRequest) -> Result<String, Error<DetachDevWorkspaceError>> {
1767    let local_var_configuration = configuration;
1768
1769    let local_var_client = &local_var_configuration.client;
1770
1771    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/detach_dev_workspace", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1772    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1773
1774    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1775        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1776    }
1777    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1778        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1779    };
1780    local_var_req_builder = local_var_req_builder.json(&detach_dev_workspace_request);
1781
1782    let local_var_req = local_var_req_builder.build()?;
1783    let local_var_resp = local_var_client.execute(local_var_req).await?;
1784
1785    let local_var_status = local_var_resp.status();
1786    let local_var_content = local_var_resp.text().await?;
1787
1788    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1789        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1790    } else {
1791        let local_var_entity: Option<DetachDevWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1792        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1793        Err(Error::ResponseError(local_var_error))
1794    }
1795}
1796
1797pub async fn disable_datatable_migrations(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str) -> Result<String, Error<DisableDatatableMigrationsError>> {
1798    let local_var_configuration = configuration;
1799
1800    let local_var_client = &local_var_configuration.client;
1801
1802    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/disable_datatable_migrations/{datatable_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name));
1803    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1804
1805    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1806        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1807    }
1808    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1809        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1810    };
1811
1812    let local_var_req = local_var_req_builder.build()?;
1813    let local_var_resp = local_var_client.execute(local_var_req).await?;
1814
1815    let local_var_status = local_var_resp.status();
1816    let local_var_content = local_var_resp.text().await?;
1817
1818    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1819        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1820    } else {
1821        let local_var_entity: Option<DisableDatatableMigrationsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1822        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1823        Err(Error::ResponseError(local_var_error))
1824    }
1825}
1826
1827pub async fn drop_forked_datatable_databases(configuration: &configuration::Configuration, workspace: &str, drop_forked_datatable_databases_request: models::DropForkedDatatableDatabasesRequest) -> Result<Vec<String>, Error<DropForkedDatatableDatabasesError>> {
1828    let local_var_configuration = configuration;
1829
1830    let local_var_client = &local_var_configuration.client;
1831
1832    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/drop_forked_datatable_databases", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1833    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1834
1835    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1836        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1837    }
1838    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1839        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1840    };
1841    local_var_req_builder = local_var_req_builder.json(&drop_forked_datatable_databases_request);
1842
1843    let local_var_req = local_var_req_builder.build()?;
1844    let local_var_resp = local_var_client.execute(local_var_req).await?;
1845
1846    let local_var_status = local_var_resp.status();
1847    let local_var_content = local_var_resp.text().await?;
1848
1849    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1850        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1851    } else {
1852        let local_var_entity: Option<DropForkedDatatableDatabasesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1853        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1854        Err(Error::ResponseError(local_var_error))
1855    }
1856}
1857
1858pub async fn drop_forked_ducklake_namespaces(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<String>, Error<DropForkedDucklakeNamespacesError>> {
1859    let local_var_configuration = configuration;
1860
1861    let local_var_client = &local_var_configuration.client;
1862
1863    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/drop_forked_ducklake_namespaces", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1864    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1865
1866    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1867        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1868    }
1869    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1870        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1871    };
1872
1873    let local_var_req = local_var_req_builder.build()?;
1874    let local_var_resp = local_var_client.execute(local_var_req).await?;
1875
1876    let local_var_status = local_var_resp.status();
1877    let local_var_content = local_var_resp.text().await?;
1878
1879    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1880        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1881    } else {
1882        let local_var_entity: Option<DropForkedDucklakeNamespacesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1883        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1884        Err(Error::ResponseError(local_var_error))
1885    }
1886}
1887
1888/// When on, every fork created from this workspace gets the workspace's admins and developers as members, with the role they hold here; operators, disabled users and service accounts are left out. The setting is copied into each fork, so forks of a fork follow it too. Off by default. Workspace-admin gated.
1889pub async fn edit_add_admins_and_developers_to_forks(configuration: &configuration::Configuration, workspace: &str, edit_add_admins_and_developers_to_forks_request: models::EditAddAdminsAndDevelopersToForksRequest) -> Result<String, Error<EditAddAdminsAndDevelopersToForksError>> {
1890    let local_var_configuration = configuration;
1891
1892    let local_var_client = &local_var_configuration.client;
1893
1894    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_add_admins_and_developers_to_forks", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1895    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1896
1897    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1898        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1899    }
1900    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1901        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1902    };
1903    local_var_req_builder = local_var_req_builder.json(&edit_add_admins_and_developers_to_forks_request);
1904
1905    let local_var_req = local_var_req_builder.build()?;
1906    let local_var_resp = local_var_client.execute(local_var_req).await?;
1907
1908    let local_var_status = local_var_resp.status();
1909    let local_var_content = local_var_resp.text().await?;
1910
1911    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1912        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1913    } else {
1914        let local_var_entity: Option<EditAddAdminsAndDevelopersToForksError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1915        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1916        Err(Error::ResponseError(local_var_error))
1917    }
1918}
1919
1920pub async fn edit_auto_invite(configuration: &configuration::Configuration, workspace: &str, edit_auto_invite_request: models::EditAutoInviteRequest) -> Result<String, Error<EditAutoInviteError>> {
1921    let local_var_configuration = configuration;
1922
1923    let local_var_client = &local_var_configuration.client;
1924
1925    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_auto_invite", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1926    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1927
1928    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1929        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1930    }
1931    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1932        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1933    };
1934    local_var_req_builder = local_var_req_builder.json(&edit_auto_invite_request);
1935
1936    let local_var_req = local_var_req_builder.build()?;
1937    let local_var_resp = local_var_client.execute(local_var_req).await?;
1938
1939    let local_var_status = local_var_resp.status();
1940    let local_var_content = local_var_resp.text().await?;
1941
1942    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1943        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1944    } else {
1945        let local_var_entity: Option<EditAutoInviteError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1946        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1947        Err(Error::ResponseError(local_var_error))
1948    }
1949}
1950
1951pub async fn edit_copilot_config(configuration: &configuration::Configuration, workspace: &str, ai_config: models::AiConfig) -> Result<models::EditCopilotConfig200Response, Error<EditCopilotConfigError>> {
1952    let local_var_configuration = configuration;
1953
1954    let local_var_client = &local_var_configuration.client;
1955
1956    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_copilot_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1957    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1958
1959    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1960        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1961    }
1962    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1963        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1964    };
1965    local_var_req_builder = local_var_req_builder.json(&ai_config);
1966
1967    let local_var_req = local_var_req_builder.build()?;
1968    let local_var_resp = local_var_client.execute(local_var_req).await?;
1969
1970    let local_var_status = local_var_resp.status();
1971    let local_var_content = local_var_resp.text().await?;
1972
1973    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1974        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1975    } else {
1976        let local_var_entity: Option<EditCopilotConfigError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1977        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1978        Err(Error::ResponseError(local_var_error))
1979    }
1980}
1981
1982pub async fn edit_data_table_config(configuration: &configuration::Configuration, workspace: &str, edit_data_table_config_request: models::EditDataTableConfigRequest) -> Result<models::EditDataTableConfig200Response, Error<EditDataTableConfigError>> {
1983    let local_var_configuration = configuration;
1984
1985    let local_var_client = &local_var_configuration.client;
1986
1987    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_datatable_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1988    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1989
1990    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1991        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1992    }
1993    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1994        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1995    };
1996    local_var_req_builder = local_var_req_builder.json(&edit_data_table_config_request);
1997
1998    let local_var_req = local_var_req_builder.build()?;
1999    let local_var_resp = local_var_client.execute(local_var_req).await?;
2000
2001    let local_var_status = local_var_resp.status();
2002    let local_var_content = local_var_resp.text().await?;
2003
2004    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2005        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2006    } else {
2007        let local_var_entity: Option<EditDataTableConfigError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2008        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2009        Err(Error::ResponseError(local_var_error))
2010    }
2011}
2012
2013pub async fn edit_dbt_warehouses(configuration: &configuration::Configuration, workspace: &str, edit_dbt_warehouses_request: models::EditDbtWarehousesRequest) -> Result<serde_json::Value, Error<EditDbtWarehousesError>> {
2014    let local_var_configuration = configuration;
2015
2016    let local_var_client = &local_var_configuration.client;
2017
2018    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_dbt_warehouses", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2019    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2020
2021    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2022        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2023    }
2024    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2025        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2026    };
2027    local_var_req_builder = local_var_req_builder.json(&edit_dbt_warehouses_request);
2028
2029    let local_var_req = local_var_req_builder.build()?;
2030    let local_var_resp = local_var_client.execute(local_var_req).await?;
2031
2032    let local_var_status = local_var_resp.status();
2033    let local_var_content = local_var_resp.text().await?;
2034
2035    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2036        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2037    } else {
2038        let local_var_entity: Option<EditDbtWarehousesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2039        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2040        Err(Error::ResponseError(local_var_error))
2041    }
2042}
2043
2044pub async fn edit_default_scripts(configuration: &configuration::Configuration, workspace: &str, workspace_default_scripts: Option<models::WorkspaceDefaultScripts>) -> Result<String, Error<EditDefaultScriptsError>> {
2045    let local_var_configuration = configuration;
2046
2047    let local_var_client = &local_var_configuration.client;
2048
2049    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/default_scripts", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2050    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2051
2052    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2053        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2054    }
2055    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2056        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2057    };
2058    local_var_req_builder = local_var_req_builder.json(&workspace_default_scripts);
2059
2060    let local_var_req = local_var_req_builder.build()?;
2061    let local_var_resp = local_var_client.execute(local_var_req).await?;
2062
2063    let local_var_status = local_var_resp.status();
2064    let local_var_content = local_var_resp.text().await?;
2065
2066    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2067        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2068    } else {
2069        let local_var_entity: Option<EditDefaultScriptsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2070        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2071        Err(Error::ResponseError(local_var_error))
2072    }
2073}
2074
2075pub async fn edit_ducklake_config(configuration: &configuration::Configuration, workspace: &str, edit_ducklake_config_request: models::EditDucklakeConfigRequest) -> Result<serde_json::Value, Error<EditDucklakeConfigError>> {
2076    let local_var_configuration = configuration;
2077
2078    let local_var_client = &local_var_configuration.client;
2079
2080    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_ducklake_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2081    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2082
2083    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2084        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2085    }
2086    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2087        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2088    };
2089    local_var_req_builder = local_var_req_builder.json(&edit_ducklake_config_request);
2090
2091    let local_var_req = local_var_req_builder.build()?;
2092    let local_var_resp = local_var_client.execute(local_var_req).await?;
2093
2094    let local_var_status = local_var_resp.status();
2095    let local_var_content = local_var_resp.text().await?;
2096
2097    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2098        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2099    } else {
2100        let local_var_entity: Option<EditDucklakeConfigError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2101        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2102        Err(Error::ResponseError(local_var_error))
2103    }
2104}
2105
2106pub async fn edit_error_handler(configuration: &configuration::Configuration, workspace: &str, edit_error_handler: models::EditErrorHandler) -> Result<String, Error<EditErrorHandlerError>> {
2107    let local_var_configuration = configuration;
2108
2109    let local_var_client = &local_var_configuration.client;
2110
2111    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_error_handler", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2112    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2113
2114    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2115        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2116    }
2117    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2118        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2119    };
2120    local_var_req_builder = local_var_req_builder.json(&edit_error_handler);
2121
2122    let local_var_req = local_var_req_builder.build()?;
2123    let local_var_resp = local_var_client.execute(local_var_req).await?;
2124
2125    let local_var_status = local_var_resp.status();
2126    let local_var_content = local_var_resp.text().await?;
2127
2128    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2129        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2130    } else {
2131        let local_var_entity: Option<EditErrorHandlerError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2132        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2133        Err(Error::ResponseError(local_var_error))
2134    }
2135}
2136
2137pub async fn edit_git_sync_repository(configuration: &configuration::Configuration, workspace: &str, edit_git_sync_repository_request: models::EditGitSyncRepositoryRequest) -> Result<serde_json::Value, Error<EditGitSyncRepositoryError>> {
2138    let local_var_configuration = configuration;
2139
2140    let local_var_client = &local_var_configuration.client;
2141
2142    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_git_sync_repository", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2143    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2144
2145    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2146        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2147    }
2148    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2149        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2150    };
2151    local_var_req_builder = local_var_req_builder.json(&edit_git_sync_repository_request);
2152
2153    let local_var_req = local_var_req_builder.build()?;
2154    let local_var_resp = local_var_client.execute(local_var_req).await?;
2155
2156    let local_var_status = local_var_resp.status();
2157    let local_var_content = local_var_resp.text().await?;
2158
2159    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2160        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2161    } else {
2162        let local_var_entity: Option<EditGitSyncRepositoryError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2163        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2164        Err(Error::ResponseError(local_var_error))
2165    }
2166}
2167
2168/// Guests are people the identity provider authenticates who have no Windmill account; the `guest` app execution mode admits them. Off by default. Re-read where a guest session is minted and at the auth door on every guest request, so turning it off takes effect immediately, for sessions already issued and for apps whose policy already says `guest`. Turning it *on* is refused with a 400 where guests are unavailable (the shared cloud); turning it off always works.
2169pub async fn edit_guest_access(configuration: &configuration::Configuration, workspace: &str, edit_guest_access_request: models::EditGuestAccessRequest) -> Result<String, Error<EditGuestAccessError>> {
2170    let local_var_configuration = configuration;
2171
2172    let local_var_client = &local_var_configuration.client;
2173
2174    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_guest_access", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2175    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2176
2177    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2178        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2179    }
2180    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2181        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2182    };
2183    local_var_req_builder = local_var_req_builder.json(&edit_guest_access_request);
2184
2185    let local_var_req = local_var_req_builder.build()?;
2186    let local_var_resp = local_var_client.execute(local_var_req).await?;
2187
2188    let local_var_status = local_var_resp.status();
2189    let local_var_content = local_var_resp.text().await?;
2190
2191    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2192        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2193    } else {
2194        let local_var_entity: Option<EditGuestAccessError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2195        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2196        Err(Error::ResponseError(local_var_error))
2197    }
2198}
2199
2200/// A guest JWT (`jwt_guest_`) is minted by the embedding customer's own backend and verified against this key: a PEM public key (RS/ES family, HS* refused) or a JWKS URL, at most one. Both empty clears the workspace key; off cloud, verification then falls back to the instance issuer (`JWT_EXT_JWKS_URL`) if one is set, else no guest JWT is accepted (`guest_access_enabled` is the on/off switch). Workspace-admin gated. The key is validated before it is stored. Setting a key is refused with a 400 where guests are unavailable (the shared cloud); clearing one always works.
2201pub async fn edit_guest_jwt_key(configuration: &configuration::Configuration, workspace: &str, edit_guest_jwt_key_request: models::EditGuestJwtKeyRequest) -> Result<String, Error<EditGuestJwtKeyError>> {
2202    let local_var_configuration = configuration;
2203
2204    let local_var_client = &local_var_configuration.client;
2205
2206    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_guest_jwt_key", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2207    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2208
2209    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2210        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2211    }
2212    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2213        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2214    };
2215    local_var_req_builder = local_var_req_builder.json(&edit_guest_jwt_key_request);
2216
2217    let local_var_req = local_var_req_builder.build()?;
2218    let local_var_resp = local_var_client.execute(local_var_req).await?;
2219
2220    let local_var_status = local_var_resp.status();
2221    let local_var_content = local_var_resp.text().await?;
2222
2223    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2224        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2225    } else {
2226        let local_var_entity: Option<EditGuestJwtKeyError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2227        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2228        Err(Error::ResponseError(local_var_error))
2229    }
2230}
2231
2232pub async fn edit_instance_groups(configuration: &configuration::Configuration, workspace: &str, edit_instance_groups_request: models::EditInstanceGroupsRequest) -> Result<String, Error<EditInstanceGroupsError>> {
2233    let local_var_configuration = configuration;
2234
2235    let local_var_client = &local_var_configuration.client;
2236
2237    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_instance_groups", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2238    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2239
2240    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2241        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2242    }
2243    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2244        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2245    };
2246    local_var_req_builder = local_var_req_builder.json(&edit_instance_groups_request);
2247
2248    let local_var_req = local_var_req_builder.build()?;
2249    let local_var_resp = local_var_client.execute(local_var_req).await?;
2250
2251    let local_var_status = local_var_resp.status();
2252    let local_var_content = local_var_resp.text().await?;
2253
2254    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2255        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2256    } else {
2257        let local_var_entity: Option<EditInstanceGroupsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2258        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2259        Err(Error::ResponseError(local_var_error))
2260    }
2261}
2262
2263pub 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>> {
2264    let local_var_configuration = configuration;
2265
2266    let local_var_client = &local_var_configuration.client;
2267
2268    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_large_file_storage_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2269    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2270
2271    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2272        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2273    }
2274    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2275        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2276    };
2277    local_var_req_builder = local_var_req_builder.json(&edit_large_file_storage_config_request);
2278
2279    let local_var_req = local_var_req_builder.build()?;
2280    let local_var_resp = local_var_client.execute(local_var_req).await?;
2281
2282    let local_var_status = local_var_resp.status();
2283    let local_var_content = local_var_resp.text().await?;
2284
2285    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2286        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2287    } else {
2288        let local_var_entity: Option<EditLargeFileStorageConfigError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2289        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2290        Err(Error::ResponseError(local_var_error))
2291    }
2292}
2293
2294pub async fn edit_slack_command(configuration: &configuration::Configuration, workspace: &str, edit_slack_command_request: models::EditSlackCommandRequest) -> Result<String, Error<EditSlackCommandError>> {
2295    let local_var_configuration = configuration;
2296
2297    let local_var_client = &local_var_configuration.client;
2298
2299    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_slack_command", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2300    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2301
2302    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2303        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2304    }
2305    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2306        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2307    };
2308    local_var_req_builder = local_var_req_builder.json(&edit_slack_command_request);
2309
2310    let local_var_req = local_var_req_builder.build()?;
2311    let local_var_resp = local_var_client.execute(local_var_req).await?;
2312
2313    let local_var_status = local_var_resp.status();
2314    let local_var_content = local_var_resp.text().await?;
2315
2316    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2317        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2318    } else {
2319        let local_var_entity: Option<EditSlackCommandError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2320        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2321        Err(Error::ResponseError(local_var_error))
2322    }
2323}
2324
2325pub async fn edit_success_handler(configuration: &configuration::Configuration, workspace: &str, edit_success_handler: models::EditSuccessHandler) -> Result<String, Error<EditSuccessHandlerError>> {
2326    let local_var_configuration = configuration;
2327
2328    let local_var_client = &local_var_configuration.client;
2329
2330    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_success_handler", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2331    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2332
2333    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2334        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2335    }
2336    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2337        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2338    };
2339    local_var_req_builder = local_var_req_builder.json(&edit_success_handler);
2340
2341    let local_var_req = local_var_req_builder.build()?;
2342    let local_var_resp = local_var_client.execute(local_var_req).await?;
2343
2344    let local_var_status = local_var_resp.status();
2345    let local_var_content = local_var_resp.text().await?;
2346
2347    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2348        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2349    } else {
2350        let local_var_entity: Option<EditSuccessHandlerError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2351        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2352        Err(Error::ResponseError(local_var_error))
2353    }
2354}
2355
2356pub async fn edit_teams_command(configuration: &configuration::Configuration, workspace: &str, edit_slack_command_request: models::EditSlackCommandRequest) -> Result<String, Error<EditTeamsCommandError>> {
2357    let local_var_configuration = configuration;
2358
2359    let local_var_client = &local_var_configuration.client;
2360
2361    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_teams_command", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2362    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2363
2364    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2365        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2366    }
2367    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2368        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2369    };
2370    local_var_req_builder = local_var_req_builder.json(&edit_slack_command_request);
2371
2372    let local_var_req = local_var_req_builder.build()?;
2373    let local_var_resp = local_var_client.execute(local_var_req).await?;
2374
2375    let local_var_status = local_var_resp.status();
2376    let local_var_content = local_var_resp.text().await?;
2377
2378    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2379        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2380    } else {
2381        let local_var_entity: Option<EditTeamsCommandError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2382        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2383        Err(Error::ResponseError(local_var_error))
2384    }
2385}
2386
2387pub async fn edit_webhook(configuration: &configuration::Configuration, workspace: &str, edit_webhook_request: models::EditWebhookRequest) -> Result<String, Error<EditWebhookError>> {
2388    let local_var_configuration = configuration;
2389
2390    let local_var_client = &local_var_configuration.client;
2391
2392    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_webhook", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2393    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2394
2395    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2396        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2397    }
2398    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2399        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2400    };
2401    local_var_req_builder = local_var_req_builder.json(&edit_webhook_request);
2402
2403    let local_var_req = local_var_req_builder.build()?;
2404    let local_var_resp = local_var_client.execute(local_var_req).await?;
2405
2406    let local_var_status = local_var_resp.status();
2407    let local_var_content = local_var_resp.text().await?;
2408
2409    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2410        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2411    } else {
2412        let local_var_entity: Option<EditWebhookError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2413        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2414        Err(Error::ResponseError(local_var_error))
2415    }
2416}
2417
2418pub async fn edit_workspace_default_app(configuration: &configuration::Configuration, workspace: &str, edit_workspace_default_app_request: models::EditWorkspaceDefaultAppRequest) -> Result<String, Error<EditWorkspaceDefaultAppError>> {
2419    let local_var_configuration = configuration;
2420
2421    let local_var_client = &local_var_configuration.client;
2422
2423    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_default_app", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2424    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2425
2426    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2427        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2428    }
2429    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2430        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2431    };
2432    local_var_req_builder = local_var_req_builder.json(&edit_workspace_default_app_request);
2433
2434    let local_var_req = local_var_req_builder.build()?;
2435    let local_var_resp = local_var_client.execute(local_var_req).await?;
2436
2437    let local_var_status = local_var_resp.status();
2438    let local_var_content = local_var_resp.text().await?;
2439
2440    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2441        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2442    } else {
2443        let local_var_entity: Option<EditWorkspaceDefaultAppError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2444        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2445        Err(Error::ResponseError(local_var_error))
2446    }
2447}
2448
2449pub 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>> {
2450    let local_var_configuration = configuration;
2451
2452    let local_var_client = &local_var_configuration.client;
2453
2454    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_deploy_ui_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2455    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2456
2457    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2458        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2459    }
2460    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2461        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2462    };
2463    local_var_req_builder = local_var_req_builder.json(&edit_workspace_deploy_ui_settings_request);
2464
2465    let local_var_req = local_var_req_builder.build()?;
2466    let local_var_resp = local_var_client.execute(local_var_req).await?;
2467
2468    let local_var_status = local_var_resp.status();
2469    let local_var_content = local_var_resp.text().await?;
2470
2471    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2472        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2473    } else {
2474        let local_var_entity: Option<EditWorkspaceDeployUiSettingsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2475        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2476        Err(Error::ResponseError(local_var_error))
2477    }
2478}
2479
2480pub 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>> {
2481    let local_var_configuration = configuration;
2482
2483    let local_var_client = &local_var_configuration.client;
2484
2485    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_git_sync_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2486    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2487
2488    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2489        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2490    }
2491    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2492        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2493    };
2494    local_var_req_builder = local_var_req_builder.json(&edit_workspace_git_sync_config_request);
2495
2496    let local_var_req = local_var_req_builder.build()?;
2497    let local_var_resp = local_var_client.execute(local_var_req).await?;
2498
2499    let local_var_status = local_var_resp.status();
2500    let local_var_content = local_var_resp.text().await?;
2501
2502    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2503        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2504    } else {
2505        let local_var_entity: Option<EditWorkspaceGitSyncConfigError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2506        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2507        Err(Error::ResponseError(local_var_error))
2508    }
2509}
2510
2511pub async fn enable_datatable_migrations(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str) -> Result<String, Error<EnableDatatableMigrationsError>> {
2512    let local_var_configuration = configuration;
2513
2514    let local_var_client = &local_var_configuration.client;
2515
2516    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/enable_datatable_migrations/{datatable_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name));
2517    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2518
2519    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2520        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2521    }
2522    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2523        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2524    };
2525
2526    let local_var_req = local_var_req_builder.build()?;
2527    let local_var_resp = local_var_client.execute(local_var_req).await?;
2528
2529    let local_var_status = local_var_resp.status();
2530    let local_var_content = local_var_resp.text().await?;
2531
2532    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2533        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2534    } else {
2535        let local_var_entity: Option<EnableDatatableMigrationsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2536        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2537        Err(Error::ResponseError(local_var_error))
2538    }
2539}
2540
2541pub async fn exists_username(configuration: &configuration::Configuration, exists_username_request: models::ExistsUsernameRequest) -> Result<bool, Error<ExistsUsernameError>> {
2542    let local_var_configuration = configuration;
2543
2544    let local_var_client = &local_var_configuration.client;
2545
2546    let local_var_uri_str = format!("{}/workspaces/exists_username", local_var_configuration.base_path);
2547    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2548
2549    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2550        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2551    }
2552    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2553        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2554    };
2555    local_var_req_builder = local_var_req_builder.json(&exists_username_request);
2556
2557    let local_var_req = local_var_req_builder.build()?;
2558    let local_var_resp = local_var_client.execute(local_var_req).await?;
2559
2560    let local_var_status = local_var_resp.status();
2561    let local_var_content = local_var_resp.text().await?;
2562
2563    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2564        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2565    } else {
2566        let local_var_entity: Option<ExistsUsernameError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2567        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2568        Err(Error::ResponseError(local_var_error))
2569    }
2570}
2571
2572pub async fn exists_workspace(configuration: &configuration::Configuration, exists_workspace_request: models::ExistsWorkspaceRequest) -> Result<bool, Error<ExistsWorkspaceError>> {
2573    let local_var_configuration = configuration;
2574
2575    let local_var_client = &local_var_configuration.client;
2576
2577    let local_var_uri_str = format!("{}/workspaces/exists", local_var_configuration.base_path);
2578    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2579
2580    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2581        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2582    }
2583    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2584        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2585    };
2586    local_var_req_builder = local_var_req_builder.json(&exists_workspace_request);
2587
2588    let local_var_req = local_var_req_builder.build()?;
2589    let local_var_resp = local_var_client.execute(local_var_req).await?;
2590
2591    let local_var_status = local_var_resp.status();
2592    let local_var_content = local_var_resp.text().await?;
2593
2594    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2595        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2596    } else {
2597        let local_var_entity: Option<ExistsWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2598        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2599        Err(Error::ResponseError(local_var_error))
2600    }
2601}
2602
2603pub async fn export_pg_schema(configuration: &configuration::Configuration, workspace: &str, export_pg_schema_request: models::ExportPgSchemaRequest) -> Result<String, Error<ExportPgSchemaError>> {
2604    let local_var_configuration = configuration;
2605
2606    let local_var_client = &local_var_configuration.client;
2607
2608    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/export_pg_schema", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2609    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2610
2611    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2612        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2613    }
2614    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2615        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2616    };
2617    local_var_req_builder = local_var_req_builder.json(&export_pg_schema_request);
2618
2619    let local_var_req = local_var_req_builder.build()?;
2620    let local_var_resp = local_var_client.execute(local_var_req).await?;
2621
2622    let local_var_status = local_var_resp.status();
2623    let local_var_content = local_var_resp.text().await?;
2624
2625    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2626        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2627    } else {
2628        let local_var_entity: Option<ExportPgSchemaError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2629        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2630        Err(Error::ResponseError(local_var_error))
2631    }
2632}
2633
2634pub async fn generate_initial_datatable_migration(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str) -> Result<models::DatatableMigration, Error<GenerateInitialDatatableMigrationError>> {
2635    let local_var_configuration = configuration;
2636
2637    let local_var_client = &local_var_configuration.client;
2638
2639    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/generate_initial_datatable_migration/{datatable_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name));
2640    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2641
2642    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2643        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2644    }
2645    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2646        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2647    };
2648
2649    let local_var_req = local_var_req_builder.build()?;
2650    let local_var_resp = local_var_client.execute(local_var_req).await?;
2651
2652    let local_var_status = local_var_resp.status();
2653    let local_var_content = local_var_resp.text().await?;
2654
2655    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2656        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2657    } else {
2658        let local_var_entity: Option<GenerateInitialDatatableMigrationError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2659        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2660        Err(Error::ResponseError(local_var_error))
2661    }
2662}
2663
2664pub async fn get_billable_seats(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetBillableSeats200Response, Error<GetBillableSeatsError>> {
2665    let local_var_configuration = configuration;
2666
2667    let local_var_client = &local_var_configuration.client;
2668
2669    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/billable_seats", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2670    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2671
2672    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2673        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2674    }
2675    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2676        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2677    };
2678
2679    let local_var_req = local_var_req_builder.build()?;
2680    let local_var_resp = local_var_client.execute(local_var_req).await?;
2681
2682    let local_var_status = local_var_resp.status();
2683    let local_var_content = local_var_resp.text().await?;
2684
2685    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2686        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2687    } else {
2688        let local_var_entity: Option<GetBillableSeatsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2689        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2690        Err(Error::ResponseError(local_var_error))
2691    }
2692}
2693
2694pub async fn get_cloud_quotas(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetCloudQuotas200Response, Error<GetCloudQuotasError>> {
2695    let local_var_configuration = configuration;
2696
2697    let local_var_client = &local_var_configuration.client;
2698
2699    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/cloud_quotas", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2700    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2701
2702    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2703        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2704    }
2705    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2706        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2707    };
2708
2709    let local_var_req = local_var_req_builder.build()?;
2710    let local_var_resp = local_var_client.execute(local_var_req).await?;
2711
2712    let local_var_status = local_var_resp.status();
2713    let local_var_content = local_var_resp.text().await?;
2714
2715    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2716        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2717    } else {
2718        let local_var_entity: Option<GetCloudQuotasError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2719        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2720        Err(Error::ResponseError(local_var_error))
2721    }
2722}
2723
2724pub async fn get_copilot_info(configuration: &configuration::Configuration, workspace: &str) -> Result<models::AiConfig, Error<GetCopilotInfoError>> {
2725    let local_var_configuration = configuration;
2726
2727    let local_var_client = &local_var_configuration.client;
2728
2729    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_copilot_info", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2730    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2731
2732    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2733        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2734    }
2735    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2736        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2737    };
2738
2739    let local_var_req = local_var_req_builder.build()?;
2740    let local_var_resp = local_var_client.execute(local_var_req).await?;
2741
2742    let local_var_status = local_var_resp.status();
2743    let local_var_content = local_var_resp.text().await?;
2744
2745    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2746        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2747    } else {
2748        let local_var_entity: Option<GetCopilotInfoError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2749        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2750        Err(Error::ResponseError(local_var_error))
2751    }
2752}
2753
2754pub async fn get_copilot_settings_state(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetCopilotSettingsState200Response, Error<GetCopilotSettingsStateError>> {
2755    let local_var_configuration = configuration;
2756
2757    let local_var_client = &local_var_configuration.client;
2758
2759    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_copilot_settings_state", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2760    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2761
2762    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2763        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2764    }
2765    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2766        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2767    };
2768
2769    let local_var_req = local_var_req_builder.build()?;
2770    let local_var_resp = local_var_client.execute(local_var_req).await?;
2771
2772    let local_var_status = local_var_resp.status();
2773    let local_var_content = local_var_resp.text().await?;
2774
2775    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2776        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2777    } else {
2778        let local_var_entity: Option<GetCopilotSettingsStateError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2779        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2780        Err(Error::ResponseError(local_var_error))
2781    }
2782}
2783
2784pub 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>> {
2785    let local_var_configuration = configuration;
2786
2787    let local_var_client = &local_var_configuration.client;
2788
2789    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_datatable_table_schema", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2790    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2791
2792    local_var_req_builder = local_var_req_builder.query(&[("datatable_name", &datatable_name.to_string())]);
2793    local_var_req_builder = local_var_req_builder.query(&[("schema_name", &schema_name.to_string())]);
2794    local_var_req_builder = local_var_req_builder.query(&[("table_name", &table_name.to_string())]);
2795    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2796        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2797    }
2798    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2799        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2800    };
2801
2802    let local_var_req = local_var_req_builder.build()?;
2803    let local_var_resp = local_var_client.execute(local_var_req).await?;
2804
2805    let local_var_status = local_var_resp.status();
2806    let local_var_content = local_var_resp.text().await?;
2807
2808    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2809        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2810    } else {
2811        let local_var_entity: Option<GetDataTableTableSchemaError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2812        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2813        Err(Error::ResponseError(local_var_error))
2814    }
2815}
2816
2817pub 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>> {
2818    let local_var_configuration = configuration;
2819
2820    let local_var_client = &local_var_configuration.client;
2821
2822    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_datatable_full_schema", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2823    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2824
2825    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2826        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2827    }
2828    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2829        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2830    };
2831    local_var_req_builder = local_var_req_builder.json(&get_datatable_full_schema_request);
2832
2833    let local_var_req = local_var_req_builder.build()?;
2834    let local_var_resp = local_var_client.execute(local_var_req).await?;
2835
2836    let local_var_status = local_var_resp.status();
2837    let local_var_content = local_var_resp.text().await?;
2838
2839    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2840        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2841    } else {
2842        let local_var_entity: Option<GetDatatableFullSchemaError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2843        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2844        Err(Error::ResponseError(local_var_error))
2845    }
2846}
2847
2848pub async fn get_datatable_migrations_status(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str) -> Result<models::GetDatatableMigrationsStatus200Response, Error<GetDatatableMigrationsStatusError>> {
2849    let local_var_configuration = configuration;
2850
2851    let local_var_client = &local_var_configuration.client;
2852
2853    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/datatable_migrations_status/{datatable_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name));
2854    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2855
2856    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2857        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2858    }
2859    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2860        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2861    };
2862
2863    let local_var_req = local_var_req_builder.build()?;
2864    let local_var_resp = local_var_client.execute(local_var_req).await?;
2865
2866    let local_var_status = local_var_resp.status();
2867    let local_var_content = local_var_resp.text().await?;
2868
2869    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2870        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2871    } else {
2872        let local_var_entity: Option<GetDatatableMigrationsStatusError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2873        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2874        Err(Error::ResponseError(local_var_error))
2875    }
2876}
2877
2878pub async fn get_datatable_permissions(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str) -> Result<models::DatatablePermissions, Error<GetDatatablePermissionsError>> {
2879    let local_var_configuration = configuration;
2880
2881    let local_var_client = &local_var_configuration.client;
2882
2883    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/datatable_permissions/{datatable_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name));
2884    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2885
2886    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2887        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2888    }
2889    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2890        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2891    };
2892
2893    let local_var_req = local_var_req_builder.build()?;
2894    let local_var_resp = local_var_client.execute(local_var_req).await?;
2895
2896    let local_var_status = local_var_resp.status();
2897    let local_var_content = local_var_resp.text().await?;
2898
2899    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2900        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2901    } else {
2902        let local_var_entity: Option<GetDatatablePermissionsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2903        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2904        Err(Error::ResponseError(local_var_error))
2905    }
2906}
2907
2908pub async fn get_default_scripts(configuration: &configuration::Configuration, workspace: &str) -> Result<models::WorkspaceDefaultScripts, Error<GetDefaultScriptsError>> {
2909    let local_var_configuration = configuration;
2910
2911    let local_var_client = &local_var_configuration.client;
2912
2913    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/default_scripts", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2914    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2915
2916    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2917        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2918    }
2919    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2920        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2921    };
2922
2923    let local_var_req = local_var_req_builder.build()?;
2924    let local_var_resp = local_var_client.execute(local_var_req).await?;
2925
2926    let local_var_status = local_var_resp.status();
2927    let local_var_content = local_var_resp.text().await?;
2928
2929    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2930        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2931    } else {
2932        let local_var_entity: Option<GetDefaultScriptsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2933        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2934        Err(Error::ResponseError(local_var_error))
2935    }
2936}
2937
2938pub async fn get_dependency_map(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::DependencyMap>, Error<GetDependencyMapError>> {
2939    let local_var_configuration = configuration;
2940
2941    let local_var_client = &local_var_configuration.client;
2942
2943    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_dependency_map", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2944    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2945
2946    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2947        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2948    }
2949    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2950        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2951    };
2952
2953    let local_var_req = local_var_req_builder.build()?;
2954    let local_var_resp = local_var_client.execute(local_var_req).await?;
2955
2956    let local_var_status = local_var_resp.status();
2957    let local_var_content = local_var_resp.text().await?;
2958
2959    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2960        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2961    } else {
2962        let local_var_entity: Option<GetDependencyMapError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2963        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2964        Err(Error::ResponseError(local_var_error))
2965    }
2966}
2967
2968pub async fn get_dependents(configuration: &configuration::Configuration, workspace: &str, imported_path: &str) -> Result<Vec<models::DependencyDependent>, Error<GetDependentsError>> {
2969    let local_var_configuration = configuration;
2970
2971    let local_var_client = &local_var_configuration.client;
2972
2973    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));
2974    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2975
2976    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2977        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2978    }
2979    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2980        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2981    };
2982
2983    let local_var_req = local_var_req_builder.build()?;
2984    let local_var_resp = local_var_client.execute(local_var_req).await?;
2985
2986    let local_var_status = local_var_resp.status();
2987    let local_var_content = local_var_resp.text().await?;
2988
2989    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2990        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2991    } else {
2992        let local_var_entity: Option<GetDependentsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2993        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2994        Err(Error::ResponseError(local_var_error))
2995    }
2996}
2997
2998pub async fn get_dependents_amounts(configuration: &configuration::Configuration, workspace: &str, request_body: Vec<String>) -> Result<Vec<models::DependentsAmount>, Error<GetDependentsAmountsError>> {
2999    let local_var_configuration = configuration;
3000
3001    let local_var_client = &local_var_configuration.client;
3002
3003    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_dependents_amounts", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3004    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3005
3006    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3007        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3008    }
3009    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3010        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3011    };
3012    local_var_req_builder = local_var_req_builder.json(&request_body);
3013
3014    let local_var_req = local_var_req_builder.build()?;
3015    let local_var_resp = local_var_client.execute(local_var_req).await?;
3016
3017    let local_var_status = local_var_resp.status();
3018    let local_var_content = local_var_resp.text().await?;
3019
3020    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3021        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3022    } else {
3023        let local_var_entity: Option<GetDependentsAmountsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3024        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3025        Err(Error::ResponseError(local_var_error))
3026    }
3027}
3028
3029pub async fn get_deploy_to(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetDeployTo200Response, Error<GetDeployToError>> {
3030    let local_var_configuration = configuration;
3031
3032    let local_var_client = &local_var_configuration.client;
3033
3034    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_deploy_to", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3035    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3036
3037    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3038        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3039    }
3040    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3041        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3042    };
3043
3044    let local_var_req = local_var_req_builder.build()?;
3045    let local_var_resp = local_var_client.execute(local_var_req).await?;
3046
3047    let local_var_status = local_var_resp.status();
3048    let local_var_content = local_var_resp.text().await?;
3049
3050    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3051        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3052    } else {
3053        let local_var_entity: Option<GetDeployToError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3054        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3055        Err(Error::ResponseError(local_var_error))
3056    }
3057}
3058
3059pub async fn get_dev_workspace(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetDevWorkspace200Response, Error<GetDevWorkspaceError>> {
3060    let local_var_configuration = configuration;
3061
3062    let local_var_client = &local_var_configuration.client;
3063
3064    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_dev_workspace", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3065    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3066
3067    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3068        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3069    }
3070    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3071        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3072    };
3073
3074    let local_var_req = local_var_req_builder.build()?;
3075    let local_var_resp = local_var_client.execute(local_var_req).await?;
3076
3077    let local_var_status = local_var_resp.status();
3078    let local_var_content = local_var_resp.text().await?;
3079
3080    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3081        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3082    } else {
3083        let local_var_entity: Option<GetDevWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3084        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3085        Err(Error::ResponseError(local_var_error))
3086    }
3087}
3088
3089pub async fn get_git_sync_deploy_mode(configuration: &configuration::Configuration, workspace: &str, branch: Option<&str>) -> Result<models::GetGitSyncDeployMode200Response, Error<GetGitSyncDeployModeError>> {
3090    let local_var_configuration = configuration;
3091
3092    let local_var_client = &local_var_configuration.client;
3093
3094    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/git_sync_deploy_mode", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3095    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3096
3097    if let Some(ref local_var_str) = branch {
3098        local_var_req_builder = local_var_req_builder.query(&[("branch", &local_var_str.to_string())]);
3099    }
3100    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3101        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3102    }
3103    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3104        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3105    };
3106
3107    let local_var_req = local_var_req_builder.build()?;
3108    let local_var_resp = local_var_client.execute(local_var_req).await?;
3109
3110    let local_var_status = local_var_resp.status();
3111    let local_var_content = local_var_resp.text().await?;
3112
3113    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3114        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3115    } else {
3116        let local_var_entity: Option<GetGitSyncDeployModeError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3117        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3118        Err(Error::ResponseError(local_var_error))
3119    }
3120}
3121
3122pub async fn get_git_sync_enabled(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetGitSyncEnabled200Response, Error<GetGitSyncEnabledError>> {
3123    let local_var_configuration = configuration;
3124
3125    let local_var_client = &local_var_configuration.client;
3126
3127    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/git_sync_enabled", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3128    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3129
3130    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3131        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3132    }
3133    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3134        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3135    };
3136
3137    let local_var_req = local_var_req_builder.build()?;
3138    let local_var_resp = local_var_client.execute(local_var_req).await?;
3139
3140    let local_var_status = local_var_resp.status();
3141    let local_var_content = local_var_resp.text().await?;
3142
3143    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3144        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3145    } else {
3146        let local_var_entity: Option<GetGitSyncEnabledError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3147        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3148        Err(Error::ResponseError(local_var_error))
3149    }
3150}
3151
3152pub async fn get_github_app_repo_archive(configuration: &configuration::Configuration, workspace: &str, path: &str, r#ref: Option<&str>) -> Result<std::path::PathBuf, Error<GetGithubAppRepoArchiveError>> {
3153    let local_var_configuration = configuration;
3154
3155    let local_var_client = &local_var_configuration.client;
3156
3157    let local_var_uri_str = format!("{}/w/{workspace}/github_app/repo_archive/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
3158    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3159
3160    if let Some(ref local_var_str) = r#ref {
3161        local_var_req_builder = local_var_req_builder.query(&[("ref", &local_var_str.to_string())]);
3162    }
3163    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3164        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3165    }
3166    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3167        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3168    };
3169
3170    let local_var_req = local_var_req_builder.build()?;
3171    let local_var_resp = local_var_client.execute(local_var_req).await?;
3172
3173    let local_var_status = local_var_resp.status();
3174    let local_var_content = local_var_resp.text().await?;
3175
3176    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3177        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3178    } else {
3179        let local_var_entity: Option<GetGithubAppRepoArchiveError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3180        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3181        Err(Error::ResponseError(local_var_error))
3182    }
3183}
3184
3185pub async fn get_github_app_token(configuration: &configuration::Configuration, workspace: &str, get_github_app_token_request: models::GetGithubAppTokenRequest) -> Result<models::GetGithubAppToken200Response, Error<GetGithubAppTokenError>> {
3186    let local_var_configuration = configuration;
3187
3188    let local_var_client = &local_var_configuration.client;
3189
3190    let local_var_uri_str = format!("{}/w/{workspace}/github_app/token", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3191    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3192
3193    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3194        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3195    }
3196    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3197        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3198    };
3199    local_var_req_builder = local_var_req_builder.json(&get_github_app_token_request);
3200
3201    let local_var_req = local_var_req_builder.build()?;
3202    let local_var_resp = local_var_client.execute(local_var_req).await?;
3203
3204    let local_var_status = local_var_resp.status();
3205    let local_var_content = local_var_resp.text().await?;
3206
3207    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3208        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3209    } else {
3210        let local_var_entity: Option<GetGithubAppTokenError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3211        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3212        Err(Error::ResponseError(local_var_error))
3213    }
3214}
3215
3216/// Instance-wide, since a licence is per instance and one email is one guest however many workspaces it opens. Read by workspace admins and app publishers to see how close the cap (Community and Pro) or the meter (Enterprise) is.
3217pub async fn get_guest_usage(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GuestUsage, Error<GetGuestUsageError>> {
3218    let local_var_configuration = configuration;
3219
3220    let local_var_client = &local_var_configuration.client;
3221
3222    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/guest_usage", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3223    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3224
3225    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3226        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3227    }
3228    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3229        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3230    };
3231
3232    let local_var_req = local_var_req_builder.build()?;
3233    let local_var_resp = local_var_client.execute(local_var_req).await?;
3234
3235    let local_var_status = local_var_resp.status();
3236    let local_var_content = local_var_resp.text().await?;
3237
3238    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3239        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3240    } else {
3241        let local_var_entity: Option<GetGuestUsageError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3242        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3243        Err(Error::ResponseError(local_var_error))
3244    }
3245}
3246
3247pub async fn get_imports(configuration: &configuration::Configuration, workspace: &str, importer_path: &str) -> Result<Vec<String>, Error<GetImportsError>> {
3248    let local_var_configuration = configuration;
3249
3250    let local_var_client = &local_var_configuration.client;
3251
3252    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));
3253    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3254
3255    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3256        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3257    }
3258    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3259        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3260    };
3261
3262    let local_var_req = local_var_req_builder.build()?;
3263    let local_var_resp = local_var_client.execute(local_var_req).await?;
3264
3265    let local_var_status = local_var_resp.status();
3266    let local_var_content = local_var_resp.text().await?;
3267
3268    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3269        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3270    } else {
3271        let local_var_entity: Option<GetImportsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3272        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3273        Err(Error::ResponseError(local_var_error))
3274    }
3275}
3276
3277pub async fn get_is_premium(configuration: &configuration::Configuration, workspace: &str) -> Result<bool, Error<GetIsPremiumError>> {
3278    let local_var_configuration = configuration;
3279
3280    let local_var_client = &local_var_configuration.client;
3281
3282    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/is_premium", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3283    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3284
3285    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3286        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3287    }
3288    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3289        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3290    };
3291
3292    let local_var_req = local_var_req_builder.build()?;
3293    let local_var_resp = local_var_client.execute(local_var_req).await?;
3294
3295    let local_var_status = local_var_resp.status();
3296    let local_var_content = local_var_resp.text().await?;
3297
3298    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3299        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3300    } else {
3301        let local_var_entity: Option<GetIsPremiumError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3302        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3303        Err(Error::ResponseError(local_var_error))
3304    }
3305}
3306
3307pub async fn get_open_deployment_request(configuration: &configuration::Configuration, workspace: &str) -> Result<models::DeploymentRequest, Error<GetOpenDeploymentRequestError>> {
3308    let local_var_configuration = configuration;
3309
3310    let local_var_client = &local_var_configuration.client;
3311
3312    let local_var_uri_str = format!("{}/w/{workspace}/deployment_request/open", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3313    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3314
3315    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3316        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3317    }
3318    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3319        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3320    };
3321
3322    let local_var_req = local_var_req_builder.build()?;
3323    let local_var_resp = local_var_client.execute(local_var_req).await?;
3324
3325    let local_var_status = local_var_resp.status();
3326    let local_var_content = local_var_resp.text().await?;
3327
3328    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3329        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3330    } else {
3331        let local_var_entity: Option<GetOpenDeploymentRequestError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3332        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3333        Err(Error::ResponseError(local_var_error))
3334    }
3335}
3336
3337pub async fn get_premium_info(configuration: &configuration::Configuration, workspace: &str, skip_subscription_fetch: Option<bool>) -> Result<models::GetPremiumInfo200Response, Error<GetPremiumInfoError>> {
3338    let local_var_configuration = configuration;
3339
3340    let local_var_client = &local_var_configuration.client;
3341
3342    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/premium_info", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3343    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3344
3345    if let Some(ref local_var_str) = skip_subscription_fetch {
3346        local_var_req_builder = local_var_req_builder.query(&[("skip_subscription_fetch", &local_var_str.to_string())]);
3347    }
3348    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3349        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3350    }
3351    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3352        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3353    };
3354
3355    let local_var_req = local_var_req_builder.build()?;
3356    let local_var_resp = local_var_client.execute(local_var_req).await?;
3357
3358    let local_var_status = local_var_resp.status();
3359    let local_var_content = local_var_resp.text().await?;
3360
3361    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3362        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3363    } else {
3364        let local_var_entity: Option<GetPremiumInfoError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3365        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3366        Err(Error::ResponseError(local_var_error))
3367    }
3368}
3369
3370/// Returns the subset of workspace settings safe to expose to any workspace member. The full settings struct is admin-only via `getSettings`.
3371pub async fn get_public_settings(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetPublicSettings200Response, Error<GetPublicSettingsError>> {
3372    let local_var_configuration = configuration;
3373
3374    let local_var_client = &local_var_configuration.client;
3375
3376    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_public_settings", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3377    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3378
3379    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3380        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3381    }
3382    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3383        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3384    };
3385
3386    let local_var_req = local_var_req_builder.build()?;
3387    let local_var_resp = local_var_client.execute(local_var_req).await?;
3388
3389    let local_var_status = local_var_resp.status();
3390    let local_var_content = local_var_resp.text().await?;
3391
3392    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3393        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3394    } else {
3395        let local_var_entity: Option<GetPublicSettingsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3396        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3397        Err(Error::ResponseError(local_var_error))
3398    }
3399}
3400
3401pub async fn get_session_workspace_retention(configuration: &configuration::Configuration, get_session_workspace_status_request: models::GetSessionWorkspaceStatusRequest) -> Result<std::collections::HashMap<String, i32>, Error<GetSessionWorkspaceRetentionError>> {
3402    let local_var_configuration = configuration;
3403
3404    let local_var_client = &local_var_configuration.client;
3405
3406    let local_var_uri_str = format!("{}/workspaces/session_workspace_retention", local_var_configuration.base_path);
3407    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3408
3409    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3410        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3411    }
3412    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3413        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3414    };
3415    local_var_req_builder = local_var_req_builder.json(&get_session_workspace_status_request);
3416
3417    let local_var_req = local_var_req_builder.build()?;
3418    let local_var_resp = local_var_client.execute(local_var_req).await?;
3419
3420    let local_var_status = local_var_resp.status();
3421    let local_var_content = local_var_resp.text().await?;
3422
3423    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3424        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3425    } else {
3426        let local_var_entity: Option<GetSessionWorkspaceRetentionError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3427        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3428        Err(Error::ResponseError(local_var_error))
3429    }
3430}
3431
3432pub async fn get_session_workspace_status(configuration: &configuration::Configuration, get_session_workspace_status_request: models::GetSessionWorkspaceStatusRequest) -> Result<std::collections::HashMap<String, String>, Error<GetSessionWorkspaceStatusError>> {
3433    let local_var_configuration = configuration;
3434
3435    let local_var_client = &local_var_configuration.client;
3436
3437    let local_var_uri_str = format!("{}/workspaces/session_workspace_status", local_var_configuration.base_path);
3438    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3439
3440    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3441        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3442    }
3443    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3444        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3445    };
3446    local_var_req_builder = local_var_req_builder.json(&get_session_workspace_status_request);
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<GetSessionWorkspaceStatusError> = 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
3463/// Returns the full workspace settings including admin-managed integration credentials. Admin-only — non-admin callers should use `getPublicSettings`.
3464pub async fn get_settings(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetSettings200Response, Error<GetSettingsError>> {
3465    let local_var_configuration = configuration;
3466
3467    let local_var_client = &local_var_configuration.client;
3468
3469    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_settings", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3470    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3471
3472    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3473        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3474    }
3475    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3476        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3477    };
3478
3479    let local_var_req = local_var_req_builder.build()?;
3480    let local_var_resp = local_var_client.execute(local_var_req).await?;
3481
3482    let local_var_status = local_var_resp.status();
3483    let local_var_content = local_var_resp.text().await?;
3484
3485    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3486        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3487    } else {
3488        let local_var_entity: Option<GetSettingsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3489        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3490        Err(Error::ResponseError(local_var_error))
3491    }
3492}
3493
3494pub async fn get_shared_ui(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetSharedUi200Response, Error<GetSharedUiError>> {
3495    let local_var_configuration = configuration;
3496
3497    let local_var_client = &local_var_configuration.client;
3498
3499    let local_var_uri_str = format!("{}/w/{workspace}/shared_ui/get", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3500    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3501
3502    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3503        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3504    }
3505    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3506        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3507    };
3508
3509    let local_var_req = local_var_req_builder.build()?;
3510    let local_var_resp = local_var_client.execute(local_var_req).await?;
3511
3512    let local_var_status = local_var_resp.status();
3513    let local_var_content = local_var_resp.text().await?;
3514
3515    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3516        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3517    } else {
3518        let local_var_entity: Option<GetSharedUiError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3519        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3520        Err(Error::ResponseError(local_var_error))
3521    }
3522}
3523
3524pub async fn get_shared_ui_version(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetSharedUiVersion200Response, Error<GetSharedUiVersionError>> {
3525    let local_var_configuration = configuration;
3526
3527    let local_var_client = &local_var_configuration.client;
3528
3529    let local_var_uri_str = format!("{}/w/{workspace}/shared_ui/version", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3530    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3531
3532    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3533        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3534    }
3535    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3536        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3537    };
3538
3539    let local_var_req = local_var_req_builder.build()?;
3540    let local_var_resp = local_var_client.execute(local_var_req).await?;
3541
3542    let local_var_status = local_var_resp.status();
3543    let local_var_content = local_var_resp.text().await?;
3544
3545    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3546        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3547    } else {
3548        let local_var_entity: Option<GetSharedUiVersionError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3549        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3550        Err(Error::ResponseError(local_var_error))
3551    }
3552}
3553
3554pub async fn get_threshold_alert(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetThresholdAlert200Response, Error<GetThresholdAlertError>> {
3555    let local_var_configuration = configuration;
3556
3557    let local_var_client = &local_var_configuration.client;
3558
3559    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/threshold_alert", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3560    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3561
3562    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3563        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3564    }
3565    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3566        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3567    };
3568
3569    let local_var_req = local_var_req_builder.build()?;
3570    let local_var_resp = local_var_client.execute(local_var_req).await?;
3571
3572    let local_var_status = local_var_resp.status();
3573    let local_var_content = local_var_resp.text().await?;
3574
3575    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3576        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3577    } else {
3578        let local_var_entity: Option<GetThresholdAlertError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3579        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3580        Err(Error::ResponseError(local_var_error))
3581    }
3582}
3583
3584pub async fn get_used_triggers(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetUsedTriggers200Response, Error<GetUsedTriggersError>> {
3585    let local_var_configuration = configuration;
3586
3587    let local_var_client = &local_var_configuration.client;
3588
3589    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/used_triggers", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3590    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3591
3592    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3593        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3594    }
3595    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3596        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3597    };
3598
3599    let local_var_req = local_var_req_builder.build()?;
3600    let local_var_resp = local_var_client.execute(local_var_req).await?;
3601
3602    let local_var_status = local_var_resp.status();
3603    let local_var_content = local_var_resp.text().await?;
3604
3605    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3606        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3607    } else {
3608        let local_var_entity: Option<GetUsedTriggersError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3609        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3610        Err(Error::ResponseError(local_var_error))
3611    }
3612}
3613
3614pub async fn get_workspace_as_super_admin(configuration: &configuration::Configuration, workspace: &str) -> Result<models::Workspace, Error<GetWorkspaceAsSuperAdminError>> {
3615    let local_var_configuration = configuration;
3616
3617    let local_var_client = &local_var_configuration.client;
3618
3619    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_as_superadmin", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3620    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3621
3622    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3623        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3624    }
3625    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3626        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3627    };
3628
3629    let local_var_req = local_var_req_builder.build()?;
3630    let local_var_resp = local_var_client.execute(local_var_req).await?;
3631
3632    let local_var_status = local_var_resp.status();
3633    let local_var_content = local_var_resp.text().await?;
3634
3635    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3636        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3637    } else {
3638        let local_var_entity: Option<GetWorkspaceAsSuperAdminError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3639        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3640        Err(Error::ResponseError(local_var_error))
3641    }
3642}
3643
3644pub async fn get_workspace_default_app(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetWorkspaceDefaultApp200Response, Error<GetWorkspaceDefaultAppError>> {
3645    let local_var_configuration = configuration;
3646
3647    let local_var_client = &local_var_configuration.client;
3648
3649    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/default_app", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3650    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3651
3652    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3653        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3654    }
3655    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3656        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3657    };
3658
3659    let local_var_req = local_var_req_builder.build()?;
3660    let local_var_resp = local_var_client.execute(local_var_req).await?;
3661
3662    let local_var_status = local_var_resp.status();
3663    let local_var_content = local_var_resp.text().await?;
3664
3665    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3666        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3667    } else {
3668        let local_var_entity: Option<GetWorkspaceDefaultAppError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3669        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3670        Err(Error::ResponseError(local_var_error))
3671    }
3672}
3673
3674pub async fn get_workspace_encryption_key(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetWorkspaceEncryptionKey200Response, Error<GetWorkspaceEncryptionKeyError>> {
3675    let local_var_configuration = configuration;
3676
3677    let local_var_client = &local_var_configuration.client;
3678
3679    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/encryption_key", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3680    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3681
3682    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3683        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3684    }
3685    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3686        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3687    };
3688
3689    let local_var_req = local_var_req_builder.build()?;
3690    let local_var_resp = local_var_client.execute(local_var_req).await?;
3691
3692    let local_var_status = local_var_resp.status();
3693    let local_var_content = local_var_resp.text().await?;
3694
3695    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3696        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3697    } else {
3698        let local_var_entity: Option<GetWorkspaceEncryptionKeyError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3699        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3700        Err(Error::ResponseError(local_var_error))
3701    }
3702}
3703
3704pub async fn get_workspace_name(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<GetWorkspaceNameError>> {
3705    let local_var_configuration = configuration;
3706
3707    let local_var_client = &local_var_configuration.client;
3708
3709    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_workspace_name", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3710    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3711
3712    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3713        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3714    }
3715    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3716        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3717    };
3718
3719    let local_var_req = local_var_req_builder.build()?;
3720    let local_var_resp = local_var_client.execute(local_var_req).await?;
3721
3722    let local_var_status = local_var_resp.status();
3723    let local_var_content = local_var_resp.text().await?;
3724
3725    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3726        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3727    } else {
3728        let local_var_entity: Option<GetWorkspaceNameError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3729        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3730        Err(Error::ResponseError(local_var_error))
3731    }
3732}
3733
3734pub async fn get_workspace_slack_oauth_config(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetWorkspaceSlackOauthConfig200Response, Error<GetWorkspaceSlackOauthConfigError>> {
3735    let local_var_configuration = configuration;
3736
3737    let local_var_client = &local_var_configuration.client;
3738
3739    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/slack_oauth_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3740    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3741
3742    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3743        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3744    }
3745    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3746        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3747    };
3748
3749    let local_var_req = local_var_req_builder.build()?;
3750    let local_var_resp = local_var_client.execute(local_var_req).await?;
3751
3752    let local_var_status = local_var_resp.status();
3753    let local_var_content = local_var_resp.text().await?;
3754
3755    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3756        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3757    } else {
3758        let local_var_entity: Option<GetWorkspaceSlackOauthConfigError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3759        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3760        Err(Error::ResponseError(local_var_error))
3761    }
3762}
3763
3764pub async fn get_workspace_usage(configuration: &configuration::Configuration, workspace: &str) -> Result<f64, Error<GetWorkspaceUsageError>> {
3765    let local_var_configuration = configuration;
3766
3767    let local_var_client = &local_var_configuration.client;
3768
3769    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/usage", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3770    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3771
3772    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3773        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3774    }
3775    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3776        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3777    };
3778
3779    let local_var_req = local_var_req_builder.build()?;
3780    let local_var_resp = local_var_client.execute(local_var_req).await?;
3781
3782    let local_var_status = local_var_resp.status();
3783    let local_var_content = local_var_resp.text().await?;
3784
3785    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3786        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3787    } else {
3788        let local_var_entity: Option<GetWorkspaceUsageError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3789        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3790        Err(Error::ResponseError(local_var_error))
3791    }
3792}
3793
3794pub async fn import_pg_database(configuration: &configuration::Configuration, workspace: &str, import_pg_database_request: models::ImportPgDatabaseRequest) -> Result<String, Error<ImportPgDatabaseError>> {
3795    let local_var_configuration = configuration;
3796
3797    let local_var_client = &local_var_configuration.client;
3798
3799    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/import_pg_database", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3800    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3801
3802    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3803        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3804    }
3805    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3806        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3807    };
3808    local_var_req_builder = local_var_req_builder.json(&import_pg_database_request);
3809
3810    let local_var_req = local_var_req_builder.build()?;
3811    let local_var_resp = local_var_client.execute(local_var_req).await?;
3812
3813    let local_var_status = local_var_resp.status();
3814    let local_var_content = local_var_resp.text().await?;
3815
3816    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3817        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3818    } else {
3819        let local_var_entity: Option<ImportPgDatabaseError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3820        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3821        Err(Error::ResponseError(local_var_error))
3822    }
3823}
3824
3825pub async fn invite_user(configuration: &configuration::Configuration, workspace: &str, invite_user_request: models::InviteUserRequest) -> Result<String, Error<InviteUserError>> {
3826    let local_var_configuration = configuration;
3827
3828    let local_var_client = &local_var_configuration.client;
3829
3830    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/invite_user", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3831    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3832
3833    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3834        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3835    }
3836    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3837        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3838    };
3839    local_var_req_builder = local_var_req_builder.json(&invite_user_request);
3840
3841    let local_var_req = local_var_req_builder.build()?;
3842    let local_var_resp = local_var_client.execute(local_var_req).await?;
3843
3844    let local_var_status = local_var_resp.status();
3845    let local_var_content = local_var_resp.text().await?;
3846
3847    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3848        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3849    } else {
3850        let local_var_entity: Option<InviteUserError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3851        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3852        Err(Error::ResponseError(local_var_error))
3853    }
3854}
3855
3856pub async fn is_domain_allowed(configuration: &configuration::Configuration, ) -> Result<bool, Error<IsDomainAllowedError>> {
3857    let local_var_configuration = configuration;
3858
3859    let local_var_client = &local_var_configuration.client;
3860
3861    let local_var_uri_str = format!("{}/workspaces/allowed_domain_auto_invite", local_var_configuration.base_path);
3862    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3863
3864    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3865        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3866    }
3867    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3868        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3869    };
3870
3871    let local_var_req = local_var_req_builder.build()?;
3872    let local_var_resp = local_var_client.execute(local_var_req).await?;
3873
3874    let local_var_status = local_var_resp.status();
3875    let local_var_content = local_var_resp.text().await?;
3876
3877    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3878        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3879    } else {
3880        let local_var_entity: Option<IsDomainAllowedError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3881        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3882        Err(Error::ResponseError(local_var_error))
3883    }
3884}
3885
3886pub async fn leave_workspace(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<LeaveWorkspaceError>> {
3887    let local_var_configuration = configuration;
3888
3889    let local_var_client = &local_var_configuration.client;
3890
3891    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/leave", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3892    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3893
3894    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3895        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3896    }
3897    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3898        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3899    };
3900
3901    let local_var_req = local_var_req_builder.build()?;
3902    let local_var_resp = local_var_client.execute(local_var_req).await?;
3903
3904    let local_var_status = local_var_resp.status();
3905    let local_var_content = local_var_resp.text().await?;
3906
3907    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3908        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3909    } else {
3910        let local_var_entity: Option<LeaveWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3911        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3912        Err(Error::ResponseError(local_var_error))
3913    }
3914}
3915
3916pub async fn list_available_teams_channels(configuration: &configuration::Configuration, workspace: &str, team_id: &str) -> Result<models::ListAvailableTeamsChannels200Response, Error<ListAvailableTeamsChannelsError>> {
3917    let local_var_configuration = configuration;
3918
3919    let local_var_client = &local_var_configuration.client;
3920
3921    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/available_teams_channels", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3922    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3923
3924    local_var_req_builder = local_var_req_builder.query(&[("team_id", &team_id.to_string())]);
3925    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3926        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3927    }
3928    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3929        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3930    };
3931
3932    let local_var_req = local_var_req_builder.build()?;
3933    let local_var_resp = local_var_client.execute(local_var_req).await?;
3934
3935    let local_var_status = local_var_resp.status();
3936    let local_var_content = local_var_resp.text().await?;
3937
3938    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3939        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3940    } else {
3941        let local_var_entity: Option<ListAvailableTeamsChannelsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3942        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3943        Err(Error::ResponseError(local_var_error))
3944    }
3945}
3946
3947pub async fn list_available_teams_ids(configuration: &configuration::Configuration, workspace: &str, search: Option<&str>, next_link: Option<&str>) -> Result<models::ListAvailableTeamsIds200Response, Error<ListAvailableTeamsIdsError>> {
3948    let local_var_configuration = configuration;
3949
3950    let local_var_client = &local_var_configuration.client;
3951
3952    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/available_teams_ids", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3953    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3954
3955    if let Some(ref local_var_str) = search {
3956        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
3957    }
3958    if let Some(ref local_var_str) = next_link {
3959        local_var_req_builder = local_var_req_builder.query(&[("next_link", &local_var_str.to_string())]);
3960    }
3961    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3962        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3963    }
3964    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3965        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3966    };
3967
3968    let local_var_req = local_var_req_builder.build()?;
3969    let local_var_resp = local_var_client.execute(local_var_req).await?;
3970
3971    let local_var_status = local_var_resp.status();
3972    let local_var_content = local_var_resp.text().await?;
3973
3974    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3975        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3976    } else {
3977        let local_var_entity: Option<ListAvailableTeamsIdsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3978        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3979        Err(Error::ResponseError(local_var_error))
3980    }
3981}
3982
3983pub async fn list_data_table_schemas(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::DataTableSchema>, Error<ListDataTableSchemasError>> {
3984    let local_var_configuration = configuration;
3985
3986    let local_var_client = &local_var_configuration.client;
3987
3988    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_datatable_schemas", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3989    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3990
3991    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3992        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3993    }
3994    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3995        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3996    };
3997
3998    let local_var_req = local_var_req_builder.build()?;
3999    let local_var_resp = local_var_client.execute(local_var_req).await?;
4000
4001    let local_var_status = local_var_resp.status();
4002    let local_var_content = local_var_resp.text().await?;
4003
4004    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4005        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4006    } else {
4007        let local_var_entity: Option<ListDataTableSchemasError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4008        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4009        Err(Error::ResponseError(local_var_error))
4010    }
4011}
4012
4013pub async fn list_data_table_tables(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::DataTableTables>, Error<ListDataTableTablesError>> {
4014    let local_var_configuration = configuration;
4015
4016    let local_var_client = &local_var_configuration.client;
4017
4018    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_datatable_tables", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4019    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4020
4021    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4022        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4023    }
4024    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4025        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4026    };
4027
4028    let local_var_req = local_var_req_builder.build()?;
4029    let local_var_resp = local_var_client.execute(local_var_req).await?;
4030
4031    let local_var_status = local_var_resp.status();
4032    let local_var_content = local_var_resp.text().await?;
4033
4034    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4035        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4036    } else {
4037        let local_var_entity: Option<ListDataTableTablesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4038        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4039        Err(Error::ResponseError(local_var_error))
4040    }
4041}
4042
4043pub async fn list_data_tables(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::ListDataTables200ResponseInner>, Error<ListDataTablesError>> {
4044    let local_var_configuration = configuration;
4045
4046    let local_var_client = &local_var_configuration.client;
4047
4048    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_datatables", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4049    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4050
4051    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4052        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4053    }
4054    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4055        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4056    };
4057
4058    let local_var_req = local_var_req_builder.build()?;
4059    let local_var_resp = local_var_client.execute(local_var_req).await?;
4060
4061    let local_var_status = local_var_resp.status();
4062    let local_var_content = local_var_resp.text().await?;
4063
4064    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4065        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4066    } else {
4067        let local_var_entity: Option<ListDataTablesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4068        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4069        Err(Error::ResponseError(local_var_error))
4070    }
4071}
4072
4073pub async fn list_datatable_migrations(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::DatatableMigration>, Error<ListDatatableMigrationsError>> {
4074    let local_var_configuration = configuration;
4075
4076    let local_var_client = &local_var_configuration.client;
4077
4078    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_datatable_migrations", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4079    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4080
4081    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4082        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4083    }
4084    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4085        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4086    };
4087
4088    let local_var_req = local_var_req_builder.build()?;
4089    let local_var_resp = local_var_client.execute(local_var_req).await?;
4090
4091    let local_var_status = local_var_resp.status();
4092    let local_var_content = local_var_resp.text().await?;
4093
4094    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4095        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4096    } else {
4097        let local_var_entity: Option<ListDatatableMigrationsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4098        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4099        Err(Error::ResponseError(local_var_error))
4100    }
4101}
4102
4103/// Returns admins and members of wm_deployers in the parent workspace of the fork at `{workspace}`.
4104pub async fn list_deployment_request_eligible_deployers(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::DeploymentRequestEligibleDeployer>, Error<ListDeploymentRequestEligibleDeployersError>> {
4105    let local_var_configuration = configuration;
4106
4107    let local_var_client = &local_var_configuration.client;
4108
4109    let local_var_uri_str = format!("{}/w/{workspace}/deployment_request/eligible_deployers", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4110    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4111
4112    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4113        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4114    }
4115    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4116        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4117    };
4118
4119    let local_var_req = local_var_req_builder.build()?;
4120    let local_var_resp = local_var_client.execute(local_var_req).await?;
4121
4122    let local_var_status = local_var_resp.status();
4123    let local_var_content = local_var_resp.text().await?;
4124
4125    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4126        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4127    } else {
4128        let local_var_entity: Option<ListDeploymentRequestEligibleDeployersError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4129        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4130        Err(Error::ResponseError(local_var_error))
4131    }
4132}
4133
4134pub async fn list_ducklakes(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<String>, Error<ListDucklakesError>> {
4135    let local_var_configuration = configuration;
4136
4137    let local_var_client = &local_var_configuration.client;
4138
4139    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_ducklakes", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4140    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4141
4142    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4143        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4144    }
4145    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4146        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4147    };
4148
4149    let local_var_req = local_var_req_builder.build()?;
4150    let local_var_resp = local_var_client.execute(local_var_req).await?;
4151
4152    let local_var_status = local_var_resp.status();
4153    let local_var_content = local_var_resp.text().await?;
4154
4155    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4156        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4157    } else {
4158        let local_var_entity: Option<ListDucklakesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4159        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4160        Err(Error::ResponseError(local_var_error))
4161    }
4162}
4163
4164pub async fn list_pending_invites(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::WorkspaceInvite>, Error<ListPendingInvitesError>> {
4165    let local_var_configuration = configuration;
4166
4167    let local_var_client = &local_var_configuration.client;
4168
4169    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_pending_invites", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4170    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4171
4172    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4173        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4174    }
4175    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4176        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4177    };
4178
4179    let local_var_req = local_var_req_builder.build()?;
4180    let local_var_resp = local_var_client.execute(local_var_req).await?;
4181
4182    let local_var_status = local_var_resp.status();
4183    let local_var_content = local_var_resp.text().await?;
4184
4185    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4186        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4187    } else {
4188        let local_var_entity: Option<ListPendingInvitesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4189        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4190        Err(Error::ResponseError(local_var_error))
4191    }
4192}
4193
4194pub async fn list_protection_rules(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::ProtectionRuleset>, Error<ListProtectionRulesError>> {
4195    let local_var_configuration = configuration;
4196
4197    let local_var_client = &local_var_configuration.client;
4198
4199    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/protection_rules", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4200    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4201
4202    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4203        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4204    }
4205    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4206        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4207    };
4208
4209    let local_var_req = local_var_req_builder.build()?;
4210    let local_var_resp = local_var_client.execute(local_var_req).await?;
4211
4212    let local_var_status = local_var_resp.status();
4213    let local_var_content = local_var_resp.text().await?;
4214
4215    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4216        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4217    } else {
4218        let local_var_entity: Option<ListProtectionRulesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4219        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4220        Err(Error::ResponseError(local_var_error))
4221    }
4222}
4223
4224pub async fn list_shared_ui(configuration: &configuration::Configuration, workspace: &str) -> Result<models::ListSharedUi200Response, Error<ListSharedUiError>> {
4225    let local_var_configuration = configuration;
4226
4227    let local_var_client = &local_var_configuration.client;
4228
4229    let local_var_uri_str = format!("{}/w/{workspace}/shared_ui/list", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4230    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4231
4232    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4233        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4234    }
4235    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4236        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4237    };
4238
4239    let local_var_req = local_var_req_builder.build()?;
4240    let local_var_resp = local_var_client.execute(local_var_req).await?;
4241
4242    let local_var_status = local_var_resp.status();
4243    let local_var_content = local_var_resp.text().await?;
4244
4245    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4246        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4247    } else {
4248        let local_var_entity: Option<ListSharedUiError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4249        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4250        Err(Error::ResponseError(local_var_error))
4251    }
4252}
4253
4254pub async fn list_usable_datatable_roles(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str) -> Result<models::ListUsableDatatableRoles200Response, Error<ListUsableDatatableRolesError>> {
4255    let local_var_configuration = configuration;
4256
4257    let local_var_client = &local_var_configuration.client;
4258
4259    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/datatable_usable_roles/{datatable_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name));
4260    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4261
4262    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4263        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4264    }
4265    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4266        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4267    };
4268
4269    let local_var_req = local_var_req_builder.build()?;
4270    let local_var_resp = local_var_client.execute(local_var_req).await?;
4271
4272    let local_var_status = local_var_resp.status();
4273    let local_var_content = local_var_resp.text().await?;
4274
4275    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4276        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4277    } else {
4278        let local_var_entity: Option<ListUsableDatatableRolesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4279        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4280        Err(Error::ResponseError(local_var_error))
4281    }
4282}
4283
4284pub async fn list_user_workspaces(configuration: &configuration::Configuration, ) -> Result<models::UserWorkspaceList, Error<ListUserWorkspacesError>> {
4285    let local_var_configuration = configuration;
4286
4287    let local_var_client = &local_var_configuration.client;
4288
4289    let local_var_uri_str = format!("{}/workspaces/users", local_var_configuration.base_path);
4290    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4291
4292    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4293        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4294    }
4295    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4296        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4297    };
4298
4299    let local_var_req = local_var_req_builder.build()?;
4300    let local_var_resp = local_var_client.execute(local_var_req).await?;
4301
4302    let local_var_status = local_var_resp.status();
4303    let local_var_content = local_var_resp.text().await?;
4304
4305    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4306        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4307    } else {
4308        let local_var_entity: Option<ListUserWorkspacesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4309        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4310        Err(Error::ResponseError(local_var_error))
4311    }
4312}
4313
4314pub async fn list_workspaces(configuration: &configuration::Configuration, ) -> Result<Vec<models::Workspace>, Error<ListWorkspacesError>> {
4315    let local_var_configuration = configuration;
4316
4317    let local_var_client = &local_var_configuration.client;
4318
4319    let local_var_uri_str = format!("{}/workspaces/list", local_var_configuration.base_path);
4320    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4321
4322    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4323        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4324    }
4325    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4326        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4327    };
4328
4329    let local_var_req = local_var_req_builder.build()?;
4330    let local_var_resp = local_var_client.execute(local_var_req).await?;
4331
4332    let local_var_status = local_var_resp.status();
4333    let local_var_content = local_var_resp.text().await?;
4334
4335    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4336        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4337    } else {
4338        let local_var_entity: Option<ListWorkspacesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4339        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4340        Err(Error::ResponseError(local_var_error))
4341    }
4342}
4343
4344pub async fn list_workspaces_as_super_admin(configuration: &configuration::Configuration, page: Option<i32>, per_page: Option<i32>) -> Result<Vec<models::Workspace>, Error<ListWorkspacesAsSuperAdminError>> {
4345    let local_var_configuration = configuration;
4346
4347    let local_var_client = &local_var_configuration.client;
4348
4349    let local_var_uri_str = format!("{}/workspaces/list_as_superadmin", local_var_configuration.base_path);
4350    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4351
4352    if let Some(ref local_var_str) = page {
4353        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
4354    }
4355    if let Some(ref local_var_str) = per_page {
4356        local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
4357    }
4358    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4359        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4360    }
4361    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4362        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4363    };
4364
4365    let local_var_req = local_var_req_builder.build()?;
4366    let local_var_resp = local_var_client.execute(local_var_req).await?;
4367
4368    let local_var_status = local_var_resp.status();
4369    let local_var_content = local_var_resp.text().await?;
4370
4371    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4372        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4373    } else {
4374        let local_var_entity: Option<ListWorkspacesAsSuperAdminError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4375        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4376        Err(Error::ResponseError(local_var_error))
4377    }
4378}
4379
4380pub async fn list_ws_specific(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::ListWsSpecific200ResponseInner>, Error<ListWsSpecificError>> {
4381    let local_var_configuration = configuration;
4382
4383    let local_var_client = &local_var_configuration.client;
4384
4385    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_ws_specific", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4386    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4387
4388    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4389        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4390    }
4391    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4392        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4393    };
4394
4395    let local_var_req = local_var_req_builder.build()?;
4396    let local_var_resp = local_var_client.execute(local_var_req).await?;
4397
4398    let local_var_status = local_var_resp.status();
4399    let local_var_content = local_var_resp.text().await?;
4400
4401    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4402        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4403    } else {
4404        let local_var_entity: Option<ListWsSpecificError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4405        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4406        Err(Error::ResponseError(local_var_error))
4407    }
4408}
4409
4410pub async fn list_ws_specific_versions(configuration: &configuration::Configuration, workspace: &str, kind: &str, path: &str) -> Result<Vec<String>, Error<ListWsSpecificVersionsError>> {
4411    let local_var_configuration = configuration;
4412
4413    let local_var_client = &local_var_configuration.client;
4414
4415    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_ws_specific_versions", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4416    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4417
4418    local_var_req_builder = local_var_req_builder.query(&[("kind", &kind.to_string())]);
4419    local_var_req_builder = local_var_req_builder.query(&[("path", &path.to_string())]);
4420    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4421        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4422    }
4423    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4424        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4425    };
4426
4427    let local_var_req = local_var_req_builder.build()?;
4428    let local_var_resp = local_var_client.execute(local_var_req).await?;
4429
4430    let local_var_status = local_var_resp.status();
4431    let local_var_content = local_var_resp.text().await?;
4432
4433    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4434        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4435    } else {
4436        let local_var_entity: Option<ListWsSpecificVersionsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4437        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4438        Err(Error::ResponseError(local_var_error))
4439    }
4440}
4441
4442pub async fn log_feature_usage(configuration: &configuration::Configuration, workspace: &str, log_feature_usage_request: models::LogFeatureUsageRequest) -> Result<(), Error<LogFeatureUsageError>> {
4443    let local_var_configuration = configuration;
4444
4445    let local_var_client = &local_var_configuration.client;
4446
4447    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/log_feature_usage", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4448    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4449
4450    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4451        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4452    }
4453    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4454        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4455    };
4456    local_var_req_builder = local_var_req_builder.json(&log_feature_usage_request);
4457
4458    let local_var_req = local_var_req_builder.build()?;
4459    let local_var_resp = local_var_client.execute(local_var_req).await?;
4460
4461    let local_var_status = local_var_resp.status();
4462    let local_var_content = local_var_resp.text().await?;
4463
4464    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4465        Ok(())
4466    } else {
4467        let local_var_entity: Option<LogFeatureUsageError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4468        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4469        Err(Error::ResponseError(local_var_error))
4470    }
4471}
4472
4473pub async fn prune_versions(configuration: &configuration::Configuration, workspace: &str, prune_versions_request: models::PruneVersionsRequest) -> Result<models::PruneVersions200Response, Error<PruneVersionsError>> {
4474    let local_var_configuration = configuration;
4475
4476    let local_var_client = &local_var_configuration.client;
4477
4478    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/prune_versions", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4479    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4480
4481    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4482        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4483    }
4484    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4485        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4486    };
4487    local_var_req_builder = local_var_req_builder.json(&prune_versions_request);
4488
4489    let local_var_req = local_var_req_builder.build()?;
4490    let local_var_resp = local_var_client.execute(local_var_req).await?;
4491
4492    let local_var_status = local_var_resp.status();
4493    let local_var_content = local_var_resp.text().await?;
4494
4495    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4496        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4497    } else {
4498        let local_var_entity: Option<PruneVersionsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4499        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4500        Err(Error::ResponseError(local_var_error))
4501    }
4502}
4503
4504pub async fn rebuild_dependency_map(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<RebuildDependencyMapError>> {
4505    let local_var_configuration = configuration;
4506
4507    let local_var_client = &local_var_configuration.client;
4508
4509    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/rebuild_dependency_map", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4510    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4511
4512    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4513        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4514    }
4515    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4516        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4517    };
4518
4519    let local_var_req = local_var_req_builder.build()?;
4520    let local_var_resp = local_var_client.execute(local_var_req).await?;
4521
4522    let local_var_status = local_var_resp.status();
4523    let local_var_content = local_var_resp.text().await?;
4524
4525    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4526        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4527    } else {
4528        let local_var_entity: Option<RebuildDependencyMapError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4529        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4530        Err(Error::ResponseError(local_var_error))
4531    }
4532}
4533
4534/// This endpoint should be called after a fork deployement
4535pub async fn reset_diff_tally(configuration: &configuration::Configuration, workspace: &str, fork_workspace_id: &str) -> Result<serde_json::Value, Error<ResetDiffTallyError>> {
4536    let local_var_configuration = configuration;
4537
4538    let local_var_client = &local_var_configuration.client;
4539
4540    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));
4541    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4542
4543    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4544        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4545    }
4546    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4547        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4548    };
4549
4550    let local_var_req = local_var_req_builder.build()?;
4551    let local_var_resp = local_var_client.execute(local_var_req).await?;
4552
4553    let local_var_status = local_var_resp.status();
4554    let local_var_content = local_var_resp.text().await?;
4555
4556    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4557        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4558    } else {
4559        let local_var_entity: Option<ResetDiffTallyError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4560        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4561        Err(Error::ResponseError(local_var_error))
4562    }
4563}
4564
4565pub async fn rollback_datatable_migrations(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str, only: Option<i64>) -> Result<models::RollbackDatatableMigrations200Response, Error<RollbackDatatableMigrationsError>> {
4566    let local_var_configuration = configuration;
4567
4568    let local_var_client = &local_var_configuration.client;
4569
4570    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/rollback_datatable_migrations/{datatable_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name));
4571    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4572
4573    if let Some(ref local_var_str) = only {
4574        local_var_req_builder = local_var_req_builder.query(&[("only", &local_var_str.to_string())]);
4575    }
4576    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4577        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4578    }
4579    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4580        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4581    };
4582
4583    let local_var_req = local_var_req_builder.build()?;
4584    let local_var_resp = local_var_client.execute(local_var_req).await?;
4585
4586    let local_var_status = local_var_resp.status();
4587    let local_var_content = local_var_resp.text().await?;
4588
4589    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4590        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4591    } else {
4592        let local_var_entity: Option<RollbackDatatableMigrationsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4593        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4594        Err(Error::ResponseError(local_var_error))
4595    }
4596}
4597
4598pub async fn run_datatable_migrations(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str, up_to: Option<i64>, only: Option<i64>) -> Result<models::RunDatatableMigrations200Response, Error<RunDatatableMigrationsError>> {
4599    let local_var_configuration = configuration;
4600
4601    let local_var_client = &local_var_configuration.client;
4602
4603    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/run_datatable_migrations/{datatable_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name));
4604    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4605
4606    if let Some(ref local_var_str) = up_to {
4607        local_var_req_builder = local_var_req_builder.query(&[("up_to", &local_var_str.to_string())]);
4608    }
4609    if let Some(ref local_var_str) = only {
4610        local_var_req_builder = local_var_req_builder.query(&[("only", &local_var_str.to_string())]);
4611    }
4612    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4613        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4614    }
4615    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4616        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4617    };
4618
4619    let local_var_req = local_var_req_builder.build()?;
4620    let local_var_resp = local_var_client.execute(local_var_req).await?;
4621
4622    let local_var_status = local_var_resp.status();
4623    let local_var_content = local_var_resp.text().await?;
4624
4625    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4626        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4627    } else {
4628        let local_var_entity: Option<RunDatatableMigrationsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4629        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4630        Err(Error::ResponseError(local_var_error))
4631    }
4632}
4633
4634pub 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>> {
4635    let local_var_configuration = configuration;
4636
4637    let local_var_client = &local_var_configuration.client;
4638
4639    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/run_slack_message_test_job", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4640    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4641
4642    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4643        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4644    }
4645    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4646        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4647    };
4648    local_var_req_builder = local_var_req_builder.json(&run_slack_message_test_job_request);
4649
4650    let local_var_req = local_var_req_builder.build()?;
4651    let local_var_resp = local_var_client.execute(local_var_req).await?;
4652
4653    let local_var_status = local_var_resp.status();
4654    let local_var_content = local_var_resp.text().await?;
4655
4656    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4657        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4658    } else {
4659        let local_var_entity: Option<RunSlackMessageTestJobError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4660        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4661        Err(Error::ResponseError(local_var_error))
4662    }
4663}
4664
4665pub 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>> {
4666    let local_var_configuration = configuration;
4667
4668    let local_var_client = &local_var_configuration.client;
4669
4670    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/run_teams_message_test_job", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4671    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4672
4673    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4674        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4675    }
4676    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4677        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4678    };
4679    local_var_req_builder = local_var_req_builder.json(&run_slack_message_test_job_request);
4680
4681    let local_var_req = local_var_req_builder.build()?;
4682    let local_var_resp = local_var_client.execute(local_var_req).await?;
4683
4684    let local_var_status = local_var_resp.status();
4685    let local_var_content = local_var_resp.text().await?;
4686
4687    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4688        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4689    } else {
4690        let local_var_entity: Option<RunTeamsMessageTestJobError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4691        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4692        Err(Error::ResponseError(local_var_error))
4693    }
4694}
4695
4696/// Enumerates every item of both workspaces as an undecided diff candidate so `compareWorkspaces` can compare a pair the fork lineage does not track. Requires being an admin of both workspaces, and is rejected for a pair already linked by the lineage (whose diff is tallied continuously). The comparison itself is what compares the candidates, and is the expensive step.
4697pub async fn seed_full_diff_scan(configuration: &configuration::Configuration, workspace: &str, target_workspace_id: &str) -> Result<models::SeedFullDiffScan200Response, Error<SeedFullDiffScanError>> {
4698    let local_var_configuration = configuration;
4699
4700    let local_var_client = &local_var_configuration.client;
4701
4702    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/seed_full_diff/{target_workspace_id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), target_workspace_id=crate::apis::urlencode(target_workspace_id));
4703    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4704
4705    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4706        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4707    }
4708    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4709        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4710    };
4711
4712    let local_var_req = local_var_req_builder.build()?;
4713    let local_var_resp = local_var_client.execute(local_var_req).await?;
4714
4715    let local_var_status = local_var_resp.status();
4716    let local_var_content = local_var_resp.text().await?;
4717
4718    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4719        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4720    } else {
4721        let local_var_entity: Option<SeedFullDiffScanError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4722        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4723        Err(Error::ResponseError(local_var_error))
4724    }
4725}
4726
4727pub async fn set_datatable_permissions(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str, set_datatable_permissions_request: models::SetDatatablePermissionsRequest) -> Result<String, Error<SetDatatablePermissionsError>> {
4728    let local_var_configuration = configuration;
4729
4730    let local_var_client = &local_var_configuration.client;
4731
4732    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/datatable_permissions/{datatable_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name));
4733    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4734
4735    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4736        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4737    }
4738    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4739        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4740    };
4741    local_var_req_builder = local_var_req_builder.json(&set_datatable_permissions_request);
4742
4743    let local_var_req = local_var_req_builder.build()?;
4744    let local_var_resp = local_var_client.execute(local_var_req).await?;
4745
4746    let local_var_status = local_var_resp.status();
4747    let local_var_content = local_var_resp.text().await?;
4748
4749    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4750        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4751    } else {
4752        let local_var_entity: Option<SetDatatablePermissionsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4753        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4754        Err(Error::ResponseError(local_var_error))
4755    }
4756}
4757
4758pub async fn set_environment_variable(configuration: &configuration::Configuration, workspace: &str, set_environment_variable_request: models::SetEnvironmentVariableRequest) -> Result<String, Error<SetEnvironmentVariableError>> {
4759    let local_var_configuration = configuration;
4760
4761    let local_var_client = &local_var_configuration.client;
4762
4763    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/set_environment_variable", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4764    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4765
4766    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4767        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4768    }
4769    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4770        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4771    };
4772    local_var_req_builder = local_var_req_builder.json(&set_environment_variable_request);
4773
4774    let local_var_req = local_var_req_builder.build()?;
4775    let local_var_resp = local_var_client.execute(local_var_req).await?;
4776
4777    let local_var_status = local_var_resp.status();
4778    let local_var_content = local_var_resp.text().await?;
4779
4780    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4781        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4782    } else {
4783        let local_var_entity: Option<SetEnvironmentVariableError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4784        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4785        Err(Error::ResponseError(local_var_error))
4786    }
4787}
4788
4789pub async fn set_threshold_alert(configuration: &configuration::Configuration, workspace: &str, set_threshold_alert_request: models::SetThresholdAlertRequest) -> Result<String, Error<SetThresholdAlertError>> {
4790    let local_var_configuration = configuration;
4791
4792    let local_var_client = &local_var_configuration.client;
4793
4794    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/threshold_alert", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4795    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4796
4797    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4798        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4799    }
4800    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4801        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4802    };
4803    local_var_req_builder = local_var_req_builder.json(&set_threshold_alert_request);
4804
4805    let local_var_req = local_var_req_builder.build()?;
4806    let local_var_resp = local_var_client.execute(local_var_req).await?;
4807
4808    let local_var_status = local_var_resp.status();
4809    let local_var_content = local_var_resp.text().await?;
4810
4811    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4812        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4813    } else {
4814        let local_var_entity: Option<SetThresholdAlertError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4815        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4816        Err(Error::ResponseError(local_var_error))
4817    }
4818}
4819
4820pub async fn set_workspace_encryption_key(configuration: &configuration::Configuration, workspace: &str, set_workspace_encryption_key_request: models::SetWorkspaceEncryptionKeyRequest) -> Result<String, Error<SetWorkspaceEncryptionKeyError>> {
4821    let local_var_configuration = configuration;
4822
4823    let local_var_client = &local_var_configuration.client;
4824
4825    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/encryption_key", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4826    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4827
4828    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4829        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4830    }
4831    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4832        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4833    };
4834    local_var_req_builder = local_var_req_builder.json(&set_workspace_encryption_key_request);
4835
4836    let local_var_req = local_var_req_builder.build()?;
4837    let local_var_resp = local_var_client.execute(local_var_req).await?;
4838
4839    let local_var_status = local_var_resp.status();
4840    let local_var_content = local_var_resp.text().await?;
4841
4842    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4843        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4844    } else {
4845        let local_var_entity: Option<SetWorkspaceEncryptionKeyError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4846        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4847        Err(Error::ResponseError(local_var_error))
4848    }
4849}
4850
4851pub async fn set_workspace_slack_oauth_config(configuration: &configuration::Configuration, workspace: &str, set_workspace_slack_oauth_config_request: models::SetWorkspaceSlackOauthConfigRequest) -> Result<String, Error<SetWorkspaceSlackOauthConfigError>> {
4852    let local_var_configuration = configuration;
4853
4854    let local_var_client = &local_var_configuration.client;
4855
4856    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/slack_oauth_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4857    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4858
4859    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4860        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4861    }
4862    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4863        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4864    };
4865    local_var_req_builder = local_var_req_builder.json(&set_workspace_slack_oauth_config_request);
4866
4867    let local_var_req = local_var_req_builder.build()?;
4868    let local_var_resp = local_var_client.execute(local_var_req).await?;
4869
4870    let local_var_status = local_var_resp.status();
4871    let local_var_content = local_var_resp.text().await?;
4872
4873    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4874        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4875    } else {
4876        let local_var_entity: Option<SetWorkspaceSlackOauthConfigError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4877        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4878        Err(Error::ResponseError(local_var_error))
4879    }
4880}
4881
4882pub async fn set_ws_specific(configuration: &configuration::Configuration, workspace: &str, set_ws_specific_request: models::SetWsSpecificRequest) -> Result<String, Error<SetWsSpecificError>> {
4883    let local_var_configuration = configuration;
4884
4885    let local_var_client = &local_var_configuration.client;
4886
4887    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/set_ws_specific", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4888    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4889
4890    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4891        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4892    }
4893    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4894        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4895    };
4896    local_var_req_builder = local_var_req_builder.json(&set_ws_specific_request);
4897
4898    let local_var_req = local_var_req_builder.build()?;
4899    let local_var_resp = local_var_client.execute(local_var_req).await?;
4900
4901    let local_var_status = local_var_resp.status();
4902    let local_var_content = local_var_resp.text().await?;
4903
4904    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4905        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4906    } else {
4907        let local_var_entity: Option<SetWsSpecificError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4908        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4909        Err(Error::ResponseError(local_var_error))
4910    }
4911}
4912
4913pub async fn test_data_table_connection(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str) -> Result<models::TestDataTableConnection200Response, Error<TestDataTableConnectionError>> {
4914    let local_var_configuration = configuration;
4915
4916    let local_var_client = &local_var_configuration.client;
4917
4918    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/test_datatable_connection/{datatable_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name));
4919    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4920
4921    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4922        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4923    }
4924    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4925        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4926    };
4927
4928    let local_var_req = local_var_req_builder.build()?;
4929    let local_var_resp = local_var_client.execute(local_var_req).await?;
4930
4931    let local_var_status = local_var_resp.status();
4932    let local_var_content = local_var_resp.text().await?;
4933
4934    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4935        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4936    } else {
4937        let local_var_entity: Option<TestDataTableConnectionError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4938        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4939        Err(Error::ResponseError(local_var_error))
4940    }
4941}
4942
4943pub async fn unarchive_workspace(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<UnarchiveWorkspaceError>> {
4944    let local_var_configuration = configuration;
4945
4946    let local_var_client = &local_var_configuration.client;
4947
4948    let local_var_uri_str = format!("{}/workspaces/unarchive/{workspace}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4949    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4950
4951    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4952        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4953    }
4954    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4955        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4956    };
4957
4958    let local_var_req = local_var_req_builder.build()?;
4959    let local_var_resp = local_var_client.execute(local_var_req).await?;
4960
4961    let local_var_status = local_var_resp.status();
4962    let local_var_content = local_var_resp.text().await?;
4963
4964    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4965        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4966    } else {
4967        let local_var_entity: Option<UnarchiveWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4968        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4969        Err(Error::ResponseError(local_var_error))
4970    }
4971}
4972
4973/// Updates the operator settings for a specific workspace. Requires workspace admin privileges.
4974pub async fn update_operator_settings(configuration: &configuration::Configuration, workspace: &str, operator_settings: Option<models::OperatorSettings>) -> Result<String, Error<UpdateOperatorSettingsError>> {
4975    let local_var_configuration = configuration;
4976
4977    let local_var_client = &local_var_configuration.client;
4978
4979    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/operator_settings", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4980    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4981
4982    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4983        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4984    }
4985    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4986        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4987    };
4988    local_var_req_builder = local_var_req_builder.json(&operator_settings);
4989
4990    let local_var_req = local_var_req_builder.build()?;
4991    let local_var_resp = local_var_client.execute(local_var_req).await?;
4992
4993    let local_var_status = local_var_resp.status();
4994    let local_var_content = local_var_resp.text().await?;
4995
4996    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4997        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4998    } else {
4999        let local_var_entity: Option<UpdateOperatorSettingsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
5000        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5001        Err(Error::ResponseError(local_var_error))
5002    }
5003}
5004
5005pub async fn update_protection_rule(configuration: &configuration::Configuration, workspace: &str, rule_name: &str, update_protection_rule_request: models::UpdateProtectionRuleRequest) -> Result<String, Error<UpdateProtectionRuleError>> {
5006    let local_var_configuration = configuration;
5007
5008    let local_var_client = &local_var_configuration.client;
5009
5010    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));
5011    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
5012
5013    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5014        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5015    }
5016    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
5017        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
5018    };
5019    local_var_req_builder = local_var_req_builder.json(&update_protection_rule_request);
5020
5021    let local_var_req = local_var_req_builder.build()?;
5022    let local_var_resp = local_var_client.execute(local_var_req).await?;
5023
5024    let local_var_status = local_var_resp.status();
5025    let local_var_content = local_var_resp.text().await?;
5026
5027    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5028        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
5029    } else {
5030        let local_var_entity: Option<UpdateProtectionRuleError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
5031        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5032        Err(Error::ResponseError(local_var_error))
5033    }
5034}
5035
5036pub async fn update_shared_ui(configuration: &configuration::Configuration, workspace: &str, update_shared_ui_request: models::UpdateSharedUiRequest) -> Result<String, Error<UpdateSharedUiError>> {
5037    let local_var_configuration = configuration;
5038
5039    let local_var_client = &local_var_configuration.client;
5040
5041    let local_var_uri_str = format!("{}/w/{workspace}/shared_ui", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
5042    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
5043
5044    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5045        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5046    }
5047    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
5048        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
5049    };
5050    local_var_req_builder = local_var_req_builder.json(&update_shared_ui_request);
5051
5052    let local_var_req = local_var_req_builder.build()?;
5053    let local_var_resp = local_var_client.execute(local_var_req).await?;
5054
5055    let local_var_status = local_var_resp.status();
5056    let local_var_content = local_var_resp.text().await?;
5057
5058    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5059        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
5060    } else {
5061        let local_var_entity: Option<UpdateSharedUiError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
5062        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5063        Err(Error::ResponseError(local_var_error))
5064    }
5065}
5066
5067pub async fn upsert_datatable_migration(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str, upsert_datatable_migration_request: models::UpsertDatatableMigrationRequest) -> Result<String, Error<UpsertDatatableMigrationError>> {
5068    let local_var_configuration = configuration;
5069
5070    let local_var_client = &local_var_configuration.client;
5071
5072    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/upsert_datatable_migration/{datatable_name}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), datatable_name=crate::apis::urlencode(datatable_name));
5073    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
5074
5075    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5076        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5077    }
5078    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
5079        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
5080    };
5081    local_var_req_builder = local_var_req_builder.json(&upsert_datatable_migration_request);
5082
5083    let local_var_req = local_var_req_builder.build()?;
5084    let local_var_resp = local_var_client.execute(local_var_req).await?;
5085
5086    let local_var_status = local_var_resp.status();
5087    let local_var_content = local_var_resp.text().await?;
5088
5089    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5090        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
5091    } else {
5092        let local_var_entity: Option<UpsertDatatableMigrationError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
5093        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5094        Err(Error::ResponseError(local_var_error))
5095    }
5096}
5097