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.814.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_auto_invite`]
234#[derive(Debug, Clone, Serialize, Deserialize)]
235#[serde(untagged)]
236pub enum EditAutoInviteError {
237    UnknownValue(serde_json::Value),
238}
239
240/// struct for typed errors of method [`edit_copilot_config`]
241#[derive(Debug, Clone, Serialize, Deserialize)]
242#[serde(untagged)]
243pub enum EditCopilotConfigError {
244    UnknownValue(serde_json::Value),
245}
246
247/// struct for typed errors of method [`edit_data_table_config`]
248#[derive(Debug, Clone, Serialize, Deserialize)]
249#[serde(untagged)]
250pub enum EditDataTableConfigError {
251    UnknownValue(serde_json::Value),
252}
253
254/// struct for typed errors of method [`edit_dbt_warehouses`]
255#[derive(Debug, Clone, Serialize, Deserialize)]
256#[serde(untagged)]
257pub enum EditDbtWarehousesError {
258    UnknownValue(serde_json::Value),
259}
260
261/// struct for typed errors of method [`edit_default_scripts`]
262#[derive(Debug, Clone, Serialize, Deserialize)]
263#[serde(untagged)]
264pub enum EditDefaultScriptsError {
265    UnknownValue(serde_json::Value),
266}
267
268/// struct for typed errors of method [`edit_ducklake_config`]
269#[derive(Debug, Clone, Serialize, Deserialize)]
270#[serde(untagged)]
271pub enum EditDucklakeConfigError {
272    UnknownValue(serde_json::Value),
273}
274
275/// struct for typed errors of method [`edit_error_handler`]
276#[derive(Debug, Clone, Serialize, Deserialize)]
277#[serde(untagged)]
278pub enum EditErrorHandlerError {
279    UnknownValue(serde_json::Value),
280}
281
282/// struct for typed errors of method [`edit_git_sync_repository`]
283#[derive(Debug, Clone, Serialize, Deserialize)]
284#[serde(untagged)]
285pub enum EditGitSyncRepositoryError {
286    UnknownValue(serde_json::Value),
287}
288
289/// struct for typed errors of method [`edit_guest_access`]
290#[derive(Debug, Clone, Serialize, Deserialize)]
291#[serde(untagged)]
292pub enum EditGuestAccessError {
293    UnknownValue(serde_json::Value),
294}
295
296/// struct for typed errors of method [`edit_guest_jwt_key`]
297#[derive(Debug, Clone, Serialize, Deserialize)]
298#[serde(untagged)]
299pub enum EditGuestJwtKeyError {
300    UnknownValue(serde_json::Value),
301}
302
303/// struct for typed errors of method [`edit_instance_groups`]
304#[derive(Debug, Clone, Serialize, Deserialize)]
305#[serde(untagged)]
306pub enum EditInstanceGroupsError {
307    UnknownValue(serde_json::Value),
308}
309
310/// struct for typed errors of method [`edit_large_file_storage_config`]
311#[derive(Debug, Clone, Serialize, Deserialize)]
312#[serde(untagged)]
313pub enum EditLargeFileStorageConfigError {
314    UnknownValue(serde_json::Value),
315}
316
317/// struct for typed errors of method [`edit_slack_command`]
318#[derive(Debug, Clone, Serialize, Deserialize)]
319#[serde(untagged)]
320pub enum EditSlackCommandError {
321    UnknownValue(serde_json::Value),
322}
323
324/// struct for typed errors of method [`edit_success_handler`]
325#[derive(Debug, Clone, Serialize, Deserialize)]
326#[serde(untagged)]
327pub enum EditSuccessHandlerError {
328    UnknownValue(serde_json::Value),
329}
330
331/// struct for typed errors of method [`edit_teams_command`]
332#[derive(Debug, Clone, Serialize, Deserialize)]
333#[serde(untagged)]
334pub enum EditTeamsCommandError {
335    UnknownValue(serde_json::Value),
336}
337
338/// struct for typed errors of method [`edit_webhook`]
339#[derive(Debug, Clone, Serialize, Deserialize)]
340#[serde(untagged)]
341pub enum EditWebhookError {
342    UnknownValue(serde_json::Value),
343}
344
345/// struct for typed errors of method [`edit_workspace_default_app`]
346#[derive(Debug, Clone, Serialize, Deserialize)]
347#[serde(untagged)]
348pub enum EditWorkspaceDefaultAppError {
349    UnknownValue(serde_json::Value),
350}
351
352/// struct for typed errors of method [`edit_workspace_deploy_ui_settings`]
353#[derive(Debug, Clone, Serialize, Deserialize)]
354#[serde(untagged)]
355pub enum EditWorkspaceDeployUiSettingsError {
356    UnknownValue(serde_json::Value),
357}
358
359/// struct for typed errors of method [`edit_workspace_git_sync_config`]
360#[derive(Debug, Clone, Serialize, Deserialize)]
361#[serde(untagged)]
362pub enum EditWorkspaceGitSyncConfigError {
363    UnknownValue(serde_json::Value),
364}
365
366/// struct for typed errors of method [`enable_datatable_migrations`]
367#[derive(Debug, Clone, Serialize, Deserialize)]
368#[serde(untagged)]
369pub enum EnableDatatableMigrationsError {
370    UnknownValue(serde_json::Value),
371}
372
373/// struct for typed errors of method [`exists_username`]
374#[derive(Debug, Clone, Serialize, Deserialize)]
375#[serde(untagged)]
376pub enum ExistsUsernameError {
377    UnknownValue(serde_json::Value),
378}
379
380/// struct for typed errors of method [`exists_workspace`]
381#[derive(Debug, Clone, Serialize, Deserialize)]
382#[serde(untagged)]
383pub enum ExistsWorkspaceError {
384    UnknownValue(serde_json::Value),
385}
386
387/// struct for typed errors of method [`export_pg_schema`]
388#[derive(Debug, Clone, Serialize, Deserialize)]
389#[serde(untagged)]
390pub enum ExportPgSchemaError {
391    UnknownValue(serde_json::Value),
392}
393
394/// struct for typed errors of method [`generate_initial_datatable_migration`]
395#[derive(Debug, Clone, Serialize, Deserialize)]
396#[serde(untagged)]
397pub enum GenerateInitialDatatableMigrationError {
398    UnknownValue(serde_json::Value),
399}
400
401/// struct for typed errors of method [`get_billable_seats`]
402#[derive(Debug, Clone, Serialize, Deserialize)]
403#[serde(untagged)]
404pub enum GetBillableSeatsError {
405    UnknownValue(serde_json::Value),
406}
407
408/// struct for typed errors of method [`get_cloud_quotas`]
409#[derive(Debug, Clone, Serialize, Deserialize)]
410#[serde(untagged)]
411pub enum GetCloudQuotasError {
412    UnknownValue(serde_json::Value),
413}
414
415/// struct for typed errors of method [`get_copilot_info`]
416#[derive(Debug, Clone, Serialize, Deserialize)]
417#[serde(untagged)]
418pub enum GetCopilotInfoError {
419    UnknownValue(serde_json::Value),
420}
421
422/// struct for typed errors of method [`get_copilot_settings_state`]
423#[derive(Debug, Clone, Serialize, Deserialize)]
424#[serde(untagged)]
425pub enum GetCopilotSettingsStateError {
426    UnknownValue(serde_json::Value),
427}
428
429/// struct for typed errors of method [`get_data_table_table_schema`]
430#[derive(Debug, Clone, Serialize, Deserialize)]
431#[serde(untagged)]
432pub enum GetDataTableTableSchemaError {
433    UnknownValue(serde_json::Value),
434}
435
436/// struct for typed errors of method [`get_datatable_full_schema`]
437#[derive(Debug, Clone, Serialize, Deserialize)]
438#[serde(untagged)]
439pub enum GetDatatableFullSchemaError {
440    UnknownValue(serde_json::Value),
441}
442
443/// struct for typed errors of method [`get_datatable_migrations_status`]
444#[derive(Debug, Clone, Serialize, Deserialize)]
445#[serde(untagged)]
446pub enum GetDatatableMigrationsStatusError {
447    UnknownValue(serde_json::Value),
448}
449
450/// struct for typed errors of method [`get_default_scripts`]
451#[derive(Debug, Clone, Serialize, Deserialize)]
452#[serde(untagged)]
453pub enum GetDefaultScriptsError {
454    UnknownValue(serde_json::Value),
455}
456
457/// struct for typed errors of method [`get_dependency_map`]
458#[derive(Debug, Clone, Serialize, Deserialize)]
459#[serde(untagged)]
460pub enum GetDependencyMapError {
461    UnknownValue(serde_json::Value),
462}
463
464/// struct for typed errors of method [`get_dependents`]
465#[derive(Debug, Clone, Serialize, Deserialize)]
466#[serde(untagged)]
467pub enum GetDependentsError {
468    UnknownValue(serde_json::Value),
469}
470
471/// struct for typed errors of method [`get_dependents_amounts`]
472#[derive(Debug, Clone, Serialize, Deserialize)]
473#[serde(untagged)]
474pub enum GetDependentsAmountsError {
475    UnknownValue(serde_json::Value),
476}
477
478/// struct for typed errors of method [`get_deploy_to`]
479#[derive(Debug, Clone, Serialize, Deserialize)]
480#[serde(untagged)]
481pub enum GetDeployToError {
482    UnknownValue(serde_json::Value),
483}
484
485/// struct for typed errors of method [`get_dev_workspace`]
486#[derive(Debug, Clone, Serialize, Deserialize)]
487#[serde(untagged)]
488pub enum GetDevWorkspaceError {
489    UnknownValue(serde_json::Value),
490}
491
492/// struct for typed errors of method [`get_git_sync_deploy_mode`]
493#[derive(Debug, Clone, Serialize, Deserialize)]
494#[serde(untagged)]
495pub enum GetGitSyncDeployModeError {
496    UnknownValue(serde_json::Value),
497}
498
499/// struct for typed errors of method [`get_git_sync_enabled`]
500#[derive(Debug, Clone, Serialize, Deserialize)]
501#[serde(untagged)]
502pub enum GetGitSyncEnabledError {
503    UnknownValue(serde_json::Value),
504}
505
506/// struct for typed errors of method [`get_github_app_repo_archive`]
507#[derive(Debug, Clone, Serialize, Deserialize)]
508#[serde(untagged)]
509pub enum GetGithubAppRepoArchiveError {
510    UnknownValue(serde_json::Value),
511}
512
513/// struct for typed errors of method [`get_github_app_token`]
514#[derive(Debug, Clone, Serialize, Deserialize)]
515#[serde(untagged)]
516pub enum GetGithubAppTokenError {
517    UnknownValue(serde_json::Value),
518}
519
520/// struct for typed errors of method [`get_guest_usage`]
521#[derive(Debug, Clone, Serialize, Deserialize)]
522#[serde(untagged)]
523pub enum GetGuestUsageError {
524    UnknownValue(serde_json::Value),
525}
526
527/// struct for typed errors of method [`get_imports`]
528#[derive(Debug, Clone, Serialize, Deserialize)]
529#[serde(untagged)]
530pub enum GetImportsError {
531    UnknownValue(serde_json::Value),
532}
533
534/// struct for typed errors of method [`get_is_premium`]
535#[derive(Debug, Clone, Serialize, Deserialize)]
536#[serde(untagged)]
537pub enum GetIsPremiumError {
538    UnknownValue(serde_json::Value),
539}
540
541/// struct for typed errors of method [`get_open_deployment_request`]
542#[derive(Debug, Clone, Serialize, Deserialize)]
543#[serde(untagged)]
544pub enum GetOpenDeploymentRequestError {
545    UnknownValue(serde_json::Value),
546}
547
548/// struct for typed errors of method [`get_premium_info`]
549#[derive(Debug, Clone, Serialize, Deserialize)]
550#[serde(untagged)]
551pub enum GetPremiumInfoError {
552    UnknownValue(serde_json::Value),
553}
554
555/// struct for typed errors of method [`get_public_settings`]
556#[derive(Debug, Clone, Serialize, Deserialize)]
557#[serde(untagged)]
558pub enum GetPublicSettingsError {
559    UnknownValue(serde_json::Value),
560}
561
562/// struct for typed errors of method [`get_session_workspace_retention`]
563#[derive(Debug, Clone, Serialize, Deserialize)]
564#[serde(untagged)]
565pub enum GetSessionWorkspaceRetentionError {
566    UnknownValue(serde_json::Value),
567}
568
569/// struct for typed errors of method [`get_session_workspace_status`]
570#[derive(Debug, Clone, Serialize, Deserialize)]
571#[serde(untagged)]
572pub enum GetSessionWorkspaceStatusError {
573    UnknownValue(serde_json::Value),
574}
575
576/// struct for typed errors of method [`get_settings`]
577#[derive(Debug, Clone, Serialize, Deserialize)]
578#[serde(untagged)]
579pub enum GetSettingsError {
580    UnknownValue(serde_json::Value),
581}
582
583/// struct for typed errors of method [`get_shared_ui`]
584#[derive(Debug, Clone, Serialize, Deserialize)]
585#[serde(untagged)]
586pub enum GetSharedUiError {
587    UnknownValue(serde_json::Value),
588}
589
590/// struct for typed errors of method [`get_shared_ui_version`]
591#[derive(Debug, Clone, Serialize, Deserialize)]
592#[serde(untagged)]
593pub enum GetSharedUiVersionError {
594    UnknownValue(serde_json::Value),
595}
596
597/// struct for typed errors of method [`get_threshold_alert`]
598#[derive(Debug, Clone, Serialize, Deserialize)]
599#[serde(untagged)]
600pub enum GetThresholdAlertError {
601    UnknownValue(serde_json::Value),
602}
603
604/// struct for typed errors of method [`get_used_triggers`]
605#[derive(Debug, Clone, Serialize, Deserialize)]
606#[serde(untagged)]
607pub enum GetUsedTriggersError {
608    UnknownValue(serde_json::Value),
609}
610
611/// struct for typed errors of method [`get_workspace_as_super_admin`]
612#[derive(Debug, Clone, Serialize, Deserialize)]
613#[serde(untagged)]
614pub enum GetWorkspaceAsSuperAdminError {
615    UnknownValue(serde_json::Value),
616}
617
618/// struct for typed errors of method [`get_workspace_default_app`]
619#[derive(Debug, Clone, Serialize, Deserialize)]
620#[serde(untagged)]
621pub enum GetWorkspaceDefaultAppError {
622    UnknownValue(serde_json::Value),
623}
624
625/// struct for typed errors of method [`get_workspace_encryption_key`]
626#[derive(Debug, Clone, Serialize, Deserialize)]
627#[serde(untagged)]
628pub enum GetWorkspaceEncryptionKeyError {
629    UnknownValue(serde_json::Value),
630}
631
632/// struct for typed errors of method [`get_workspace_name`]
633#[derive(Debug, Clone, Serialize, Deserialize)]
634#[serde(untagged)]
635pub enum GetWorkspaceNameError {
636    UnknownValue(serde_json::Value),
637}
638
639/// struct for typed errors of method [`get_workspace_slack_oauth_config`]
640#[derive(Debug, Clone, Serialize, Deserialize)]
641#[serde(untagged)]
642pub enum GetWorkspaceSlackOauthConfigError {
643    UnknownValue(serde_json::Value),
644}
645
646/// struct for typed errors of method [`get_workspace_usage`]
647#[derive(Debug, Clone, Serialize, Deserialize)]
648#[serde(untagged)]
649pub enum GetWorkspaceUsageError {
650    UnknownValue(serde_json::Value),
651}
652
653/// struct for typed errors of method [`import_pg_database`]
654#[derive(Debug, Clone, Serialize, Deserialize)]
655#[serde(untagged)]
656pub enum ImportPgDatabaseError {
657    UnknownValue(serde_json::Value),
658}
659
660/// struct for typed errors of method [`invite_user`]
661#[derive(Debug, Clone, Serialize, Deserialize)]
662#[serde(untagged)]
663pub enum InviteUserError {
664    UnknownValue(serde_json::Value),
665}
666
667/// struct for typed errors of method [`is_domain_allowed`]
668#[derive(Debug, Clone, Serialize, Deserialize)]
669#[serde(untagged)]
670pub enum IsDomainAllowedError {
671    UnknownValue(serde_json::Value),
672}
673
674/// struct for typed errors of method [`leave_workspace`]
675#[derive(Debug, Clone, Serialize, Deserialize)]
676#[serde(untagged)]
677pub enum LeaveWorkspaceError {
678    UnknownValue(serde_json::Value),
679}
680
681/// struct for typed errors of method [`list_available_teams_channels`]
682#[derive(Debug, Clone, Serialize, Deserialize)]
683#[serde(untagged)]
684pub enum ListAvailableTeamsChannelsError {
685    UnknownValue(serde_json::Value),
686}
687
688/// struct for typed errors of method [`list_available_teams_ids`]
689#[derive(Debug, Clone, Serialize, Deserialize)]
690#[serde(untagged)]
691pub enum ListAvailableTeamsIdsError {
692    UnknownValue(serde_json::Value),
693}
694
695/// struct for typed errors of method [`list_data_table_schemas`]
696#[derive(Debug, Clone, Serialize, Deserialize)]
697#[serde(untagged)]
698pub enum ListDataTableSchemasError {
699    UnknownValue(serde_json::Value),
700}
701
702/// struct for typed errors of method [`list_data_table_tables`]
703#[derive(Debug, Clone, Serialize, Deserialize)]
704#[serde(untagged)]
705pub enum ListDataTableTablesError {
706    UnknownValue(serde_json::Value),
707}
708
709/// struct for typed errors of method [`list_data_tables`]
710#[derive(Debug, Clone, Serialize, Deserialize)]
711#[serde(untagged)]
712pub enum ListDataTablesError {
713    UnknownValue(serde_json::Value),
714}
715
716/// struct for typed errors of method [`list_datatable_migrations`]
717#[derive(Debug, Clone, Serialize, Deserialize)]
718#[serde(untagged)]
719pub enum ListDatatableMigrationsError {
720    UnknownValue(serde_json::Value),
721}
722
723/// struct for typed errors of method [`list_deployment_request_eligible_deployers`]
724#[derive(Debug, Clone, Serialize, Deserialize)]
725#[serde(untagged)]
726pub enum ListDeploymentRequestEligibleDeployersError {
727    UnknownValue(serde_json::Value),
728}
729
730/// struct for typed errors of method [`list_ducklakes`]
731#[derive(Debug, Clone, Serialize, Deserialize)]
732#[serde(untagged)]
733pub enum ListDucklakesError {
734    UnknownValue(serde_json::Value),
735}
736
737/// struct for typed errors of method [`list_pending_invites`]
738#[derive(Debug, Clone, Serialize, Deserialize)]
739#[serde(untagged)]
740pub enum ListPendingInvitesError {
741    UnknownValue(serde_json::Value),
742}
743
744/// struct for typed errors of method [`list_protection_rules`]
745#[derive(Debug, Clone, Serialize, Deserialize)]
746#[serde(untagged)]
747pub enum ListProtectionRulesError {
748    UnknownValue(serde_json::Value),
749}
750
751/// struct for typed errors of method [`list_shared_ui`]
752#[derive(Debug, Clone, Serialize, Deserialize)]
753#[serde(untagged)]
754pub enum ListSharedUiError {
755    UnknownValue(serde_json::Value),
756}
757
758/// struct for typed errors of method [`list_user_workspaces`]
759#[derive(Debug, Clone, Serialize, Deserialize)]
760#[serde(untagged)]
761pub enum ListUserWorkspacesError {
762    UnknownValue(serde_json::Value),
763}
764
765/// struct for typed errors of method [`list_workspaces`]
766#[derive(Debug, Clone, Serialize, Deserialize)]
767#[serde(untagged)]
768pub enum ListWorkspacesError {
769    UnknownValue(serde_json::Value),
770}
771
772/// struct for typed errors of method [`list_workspaces_as_super_admin`]
773#[derive(Debug, Clone, Serialize, Deserialize)]
774#[serde(untagged)]
775pub enum ListWorkspacesAsSuperAdminError {
776    UnknownValue(serde_json::Value),
777}
778
779/// struct for typed errors of method [`list_ws_specific`]
780#[derive(Debug, Clone, Serialize, Deserialize)]
781#[serde(untagged)]
782pub enum ListWsSpecificError {
783    UnknownValue(serde_json::Value),
784}
785
786/// struct for typed errors of method [`list_ws_specific_versions`]
787#[derive(Debug, Clone, Serialize, Deserialize)]
788#[serde(untagged)]
789pub enum ListWsSpecificVersionsError {
790    UnknownValue(serde_json::Value),
791}
792
793/// struct for typed errors of method [`log_feature_usage`]
794#[derive(Debug, Clone, Serialize, Deserialize)]
795#[serde(untagged)]
796pub enum LogFeatureUsageError {
797    UnknownValue(serde_json::Value),
798}
799
800/// struct for typed errors of method [`prune_versions`]
801#[derive(Debug, Clone, Serialize, Deserialize)]
802#[serde(untagged)]
803pub enum PruneVersionsError {
804    UnknownValue(serde_json::Value),
805}
806
807/// struct for typed errors of method [`rebuild_dependency_map`]
808#[derive(Debug, Clone, Serialize, Deserialize)]
809#[serde(untagged)]
810pub enum RebuildDependencyMapError {
811    UnknownValue(serde_json::Value),
812}
813
814/// struct for typed errors of method [`reset_diff_tally`]
815#[derive(Debug, Clone, Serialize, Deserialize)]
816#[serde(untagged)]
817pub enum ResetDiffTallyError {
818    UnknownValue(serde_json::Value),
819}
820
821/// struct for typed errors of method [`rollback_datatable_migrations`]
822#[derive(Debug, Clone, Serialize, Deserialize)]
823#[serde(untagged)]
824pub enum RollbackDatatableMigrationsError {
825    UnknownValue(serde_json::Value),
826}
827
828/// struct for typed errors of method [`run_datatable_migrations`]
829#[derive(Debug, Clone, Serialize, Deserialize)]
830#[serde(untagged)]
831pub enum RunDatatableMigrationsError {
832    UnknownValue(serde_json::Value),
833}
834
835/// struct for typed errors of method [`run_slack_message_test_job`]
836#[derive(Debug, Clone, Serialize, Deserialize)]
837#[serde(untagged)]
838pub enum RunSlackMessageTestJobError {
839    UnknownValue(serde_json::Value),
840}
841
842/// struct for typed errors of method [`run_teams_message_test_job`]
843#[derive(Debug, Clone, Serialize, Deserialize)]
844#[serde(untagged)]
845pub enum RunTeamsMessageTestJobError {
846    UnknownValue(serde_json::Value),
847}
848
849/// struct for typed errors of method [`seed_full_diff_scan`]
850#[derive(Debug, Clone, Serialize, Deserialize)]
851#[serde(untagged)]
852pub enum SeedFullDiffScanError {
853    UnknownValue(serde_json::Value),
854}
855
856/// struct for typed errors of method [`set_environment_variable`]
857#[derive(Debug, Clone, Serialize, Deserialize)]
858#[serde(untagged)]
859pub enum SetEnvironmentVariableError {
860    UnknownValue(serde_json::Value),
861}
862
863/// struct for typed errors of method [`set_threshold_alert`]
864#[derive(Debug, Clone, Serialize, Deserialize)]
865#[serde(untagged)]
866pub enum SetThresholdAlertError {
867    UnknownValue(serde_json::Value),
868}
869
870/// struct for typed errors of method [`set_workspace_encryption_key`]
871#[derive(Debug, Clone, Serialize, Deserialize)]
872#[serde(untagged)]
873pub enum SetWorkspaceEncryptionKeyError {
874    UnknownValue(serde_json::Value),
875}
876
877/// struct for typed errors of method [`set_workspace_slack_oauth_config`]
878#[derive(Debug, Clone, Serialize, Deserialize)]
879#[serde(untagged)]
880pub enum SetWorkspaceSlackOauthConfigError {
881    UnknownValue(serde_json::Value),
882}
883
884/// struct for typed errors of method [`set_ws_specific`]
885#[derive(Debug, Clone, Serialize, Deserialize)]
886#[serde(untagged)]
887pub enum SetWsSpecificError {
888    UnknownValue(serde_json::Value),
889}
890
891/// struct for typed errors of method [`test_data_table_connection`]
892#[derive(Debug, Clone, Serialize, Deserialize)]
893#[serde(untagged)]
894pub enum TestDataTableConnectionError {
895    UnknownValue(serde_json::Value),
896}
897
898/// struct for typed errors of method [`unarchive_workspace`]
899#[derive(Debug, Clone, Serialize, Deserialize)]
900#[serde(untagged)]
901pub enum UnarchiveWorkspaceError {
902    UnknownValue(serde_json::Value),
903}
904
905/// struct for typed errors of method [`update_operator_settings`]
906#[derive(Debug, Clone, Serialize, Deserialize)]
907#[serde(untagged)]
908pub enum UpdateOperatorSettingsError {
909    UnknownValue(serde_json::Value),
910}
911
912/// struct for typed errors of method [`update_protection_rule`]
913#[derive(Debug, Clone, Serialize, Deserialize)]
914#[serde(untagged)]
915pub enum UpdateProtectionRuleError {
916    Status404(),
917    UnknownValue(serde_json::Value),
918}
919
920/// struct for typed errors of method [`update_shared_ui`]
921#[derive(Debug, Clone, Serialize, Deserialize)]
922#[serde(untagged)]
923pub enum UpdateSharedUiError {
924    UnknownValue(serde_json::Value),
925}
926
927/// struct for typed errors of method [`upsert_datatable_migration`]
928#[derive(Debug, Clone, Serialize, Deserialize)]
929#[serde(untagged)]
930pub enum UpsertDatatableMigrationError {
931    UnknownValue(serde_json::Value),
932}
933
934
935pub async fn add_user(configuration: &configuration::Configuration, workspace: &str, add_user_request: models::AddUserRequest) -> Result<String, Error<AddUserError>> {
936    let local_var_configuration = configuration;
937
938    let local_var_client = &local_var_configuration.client;
939
940    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/add_user", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
941    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
942
943    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
944        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
945    }
946    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
947        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
948    };
949    local_var_req_builder = local_var_req_builder.json(&add_user_request);
950
951    let local_var_req = local_var_req_builder.build()?;
952    let local_var_resp = local_var_client.execute(local_var_req).await?;
953
954    let local_var_status = local_var_resp.status();
955    let local_var_content = local_var_resp.text().await?;
956
957    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
958        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
959    } else {
960        let local_var_entity: Option<AddUserError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
961        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
962        Err(Error::ResponseError(local_var_error))
963    }
964}
965
966pub async fn archive_workspace(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<ArchiveWorkspaceError>> {
967    let local_var_configuration = configuration;
968
969    let local_var_client = &local_var_configuration.client;
970
971    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/archive", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
972    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
973
974    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
975        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
976    }
977    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
978        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
979    };
980
981    let local_var_req = local_var_req_builder.build()?;
982    let local_var_resp = local_var_client.execute(local_var_req).await?;
983
984    let local_var_status = local_var_resp.status();
985    let local_var_content = local_var_resp.text().await?;
986
987    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
988        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
989    } else {
990        let local_var_entity: Option<ArchiveWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
991        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
992        Err(Error::ResponseError(local_var_error))
993    }
994}
995
996pub async fn attach_dev_workspace(configuration: &configuration::Configuration, workspace: &str, attach_dev_workspace_request: models::AttachDevWorkspaceRequest) -> Result<String, Error<AttachDevWorkspaceError>> {
997    let local_var_configuration = configuration;
998
999    let local_var_client = &local_var_configuration.client;
1000
1001    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/attach_dev_workspace", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1002    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1003
1004    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1005        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1006    }
1007    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1008        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1009    };
1010    local_var_req_builder = local_var_req_builder.json(&attach_dev_workspace_request);
1011
1012    let local_var_req = local_var_req_builder.build()?;
1013    let local_var_resp = local_var_client.execute(local_var_req).await?;
1014
1015    let local_var_status = local_var_resp.status();
1016    let local_var_content = local_var_resp.text().await?;
1017
1018    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1019        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1020    } else {
1021        let local_var_entity: Option<AttachDevWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1022        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1023        Err(Error::ResponseError(local_var_error))
1024    }
1025}
1026
1027pub async fn cancel_deployment_request(configuration: &configuration::Configuration, workspace: &str, id: i64) -> Result<String, Error<CancelDeploymentRequestError>> {
1028    let local_var_configuration = configuration;
1029
1030    let local_var_client = &local_var_configuration.client;
1031
1032    let local_var_uri_str = format!("{}/w/{workspace}/deployment_request/{id}/cancel", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=id);
1033    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1034
1035    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1036        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1037    }
1038    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1039        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1040    };
1041
1042    let local_var_req = local_var_req_builder.build()?;
1043    let local_var_resp = local_var_client.execute(local_var_req).await?;
1044
1045    let local_var_status = local_var_resp.status();
1046    let local_var_content = local_var_resp.text().await?;
1047
1048    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1049        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1050    } else {
1051        let local_var_entity: Option<CancelDeploymentRequestError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1052        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1053        Err(Error::ResponseError(local_var_error))
1054    }
1055}
1056
1057pub async fn change_workspace_color(configuration: &configuration::Configuration, workspace: &str, change_workspace_color_request: Option<models::ChangeWorkspaceColorRequest>) -> Result<String, Error<ChangeWorkspaceColorError>> {
1058    let local_var_configuration = configuration;
1059
1060    let local_var_client = &local_var_configuration.client;
1061
1062    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/change_workspace_color", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1063    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1064
1065    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1066        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1067    }
1068    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1069        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1070    };
1071    local_var_req_builder = local_var_req_builder.json(&change_workspace_color_request);
1072
1073    let local_var_req = local_var_req_builder.build()?;
1074    let local_var_resp = local_var_client.execute(local_var_req).await?;
1075
1076    let local_var_status = local_var_resp.status();
1077    let local_var_content = local_var_resp.text().await?;
1078
1079    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1080        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1081    } else {
1082        let local_var_entity: Option<ChangeWorkspaceColorError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1083        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1084        Err(Error::ResponseError(local_var_error))
1085    }
1086}
1087
1088pub async fn change_workspace_id(configuration: &configuration::Configuration, workspace: &str, change_workspace_id_request: Option<models::ChangeWorkspaceIdRequest>) -> Result<String, Error<ChangeWorkspaceIdError>> {
1089    let local_var_configuration = configuration;
1090
1091    let local_var_client = &local_var_configuration.client;
1092
1093    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/change_workspace_id", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1094    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1095
1096    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1097        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1098    }
1099    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1100        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1101    };
1102    local_var_req_builder = local_var_req_builder.json(&change_workspace_id_request);
1103
1104    let local_var_req = local_var_req_builder.build()?;
1105    let local_var_resp = local_var_client.execute(local_var_req).await?;
1106
1107    let local_var_status = local_var_resp.status();
1108    let local_var_content = local_var_resp.text().await?;
1109
1110    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1111        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1112    } else {
1113        let local_var_entity: Option<ChangeWorkspaceIdError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1114        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1115        Err(Error::ResponseError(local_var_error))
1116    }
1117}
1118
1119pub async fn change_workspace_name(configuration: &configuration::Configuration, workspace: &str, change_workspace_name_request: Option<models::ChangeWorkspaceNameRequest>) -> Result<String, Error<ChangeWorkspaceNameError>> {
1120    let local_var_configuration = configuration;
1121
1122    let local_var_client = &local_var_configuration.client;
1123
1124    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/change_workspace_name", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1125    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1126
1127    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1128        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1129    }
1130    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1131        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1132    };
1133    local_var_req_builder = local_var_req_builder.json(&change_workspace_name_request);
1134
1135    let local_var_req = local_var_req_builder.build()?;
1136    let local_var_resp = local_var_client.execute(local_var_req).await?;
1137
1138    let local_var_status = local_var_resp.status();
1139    let local_var_content = local_var_resp.text().await?;
1140
1141    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1142        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1143    } else {
1144        let local_var_entity: Option<ChangeWorkspaceNameError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1145        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1146        Err(Error::ResponseError(local_var_error))
1147    }
1148}
1149
1150/// Called by the UI after the deploy loop completes. Closes the request and marks every comment obsolete. Idempotent.
1151pub async fn close_deployment_request_merged(configuration: &configuration::Configuration, workspace: &str, id: i64) -> Result<String, Error<CloseDeploymentRequestMergedError>> {
1152    let local_var_configuration = configuration;
1153
1154    let local_var_client = &local_var_configuration.client;
1155
1156    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);
1157    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1158
1159    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1160        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1161    }
1162    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1163        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1164    };
1165
1166    let local_var_req = local_var_req_builder.build()?;
1167    let local_var_resp = local_var_client.execute(local_var_req).await?;
1168
1169    let local_var_status = local_var_resp.status();
1170    let local_var_content = local_var_resp.text().await?;
1171
1172    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1173        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1174    } else {
1175        let local_var_entity: Option<CloseDeploymentRequestMergedError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1176        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1177        Err(Error::ResponseError(local_var_error))
1178    }
1179}
1180
1181/// 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.
1182pub async fn compare_workspaces(configuration: &configuration::Configuration, workspace: &str, target_workspace_id: &str) -> Result<models::WorkspaceComparison, Error<CompareWorkspacesError>> {
1183    let local_var_configuration = configuration;
1184
1185    let local_var_client = &local_var_configuration.client;
1186
1187    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));
1188    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1189
1190    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1191        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1192    }
1193    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1194        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1195    };
1196
1197    let local_var_req = local_var_req_builder.build()?;
1198    let local_var_resp = local_var_client.execute(local_var_req).await?;
1199
1200    let local_var_status = local_var_resp.status();
1201    let local_var_content = local_var_resp.text().await?;
1202
1203    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1204        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1205    } else {
1206        let local_var_entity: Option<CompareWorkspacesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1207        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1208        Err(Error::ResponseError(local_var_error))
1209    }
1210}
1211
1212pub async fn connect_slack(configuration: &configuration::Configuration, workspace: &str, connect_slack_request: models::ConnectSlackRequest) -> Result<(), Error<ConnectSlackError>> {
1213    let local_var_configuration = configuration;
1214
1215    let local_var_client = &local_var_configuration.client;
1216
1217    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/connect_slack", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1218    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1219
1220    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1221        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1222    }
1223    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1224        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1225    };
1226    local_var_req_builder = local_var_req_builder.json(&connect_slack_request);
1227
1228    let local_var_req = local_var_req_builder.build()?;
1229    let local_var_resp = local_var_client.execute(local_var_req).await?;
1230
1231    let local_var_status = local_var_resp.status();
1232    let local_var_content = local_var_resp.text().await?;
1233
1234    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1235        Ok(())
1236    } else {
1237        let local_var_entity: Option<ConnectSlackError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1238        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1239        Err(Error::ResponseError(local_var_error))
1240    }
1241}
1242
1243pub async fn connect_teams(configuration: &configuration::Configuration, workspace: &str, connect_teams_request: models::ConnectTeamsRequest) -> Result<String, Error<ConnectTeamsError>> {
1244    let local_var_configuration = configuration;
1245
1246    let local_var_client = &local_var_configuration.client;
1247
1248    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/connect_teams", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1249    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1250
1251    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1252        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1253    }
1254    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1255        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1256    };
1257    local_var_req_builder = local_var_req_builder.json(&connect_teams_request);
1258
1259    let local_var_req = local_var_req_builder.build()?;
1260    let local_var_resp = local_var_client.execute(local_var_req).await?;
1261
1262    let local_var_status = local_var_resp.status();
1263    let local_var_content = local_var_resp.text().await?;
1264
1265    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1266        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1267    } else {
1268        let local_var_entity: Option<ConnectTeamsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1269        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1270        Err(Error::ResponseError(local_var_error))
1271    }
1272}
1273
1274pub async fn create_datatable_migration(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str, create_datatable_migration_request: models::CreateDatatableMigrationRequest) -> Result<models::DatatableMigration, Error<CreateDatatableMigrationError>> {
1275    let local_var_configuration = configuration;
1276
1277    let local_var_client = &local_var_configuration.client;
1278
1279    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));
1280    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1281
1282    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1283        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1284    }
1285    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1286        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1287    };
1288    local_var_req_builder = local_var_req_builder.json(&create_datatable_migration_request);
1289
1290    let local_var_req = local_var_req_builder.build()?;
1291    let local_var_resp = local_var_client.execute(local_var_req).await?;
1292
1293    let local_var_status = local_var_resp.status();
1294    let local_var_content = local_var_resp.text().await?;
1295
1296    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1297        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1298    } else {
1299        let local_var_entity: Option<CreateDatatableMigrationError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1300        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1301        Err(Error::ResponseError(local_var_error))
1302    }
1303}
1304
1305pub async fn create_deployment_request(configuration: &configuration::Configuration, workspace: &str, create_deployment_request_request: models::CreateDeploymentRequestRequest) -> Result<models::DeploymentRequest, Error<CreateDeploymentRequestError>> {
1306    let local_var_configuration = configuration;
1307
1308    let local_var_client = &local_var_configuration.client;
1309
1310    let local_var_uri_str = format!("{}/w/{workspace}/deployment_request", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1311    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1312
1313    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1314        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1315    }
1316    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1317        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1318    };
1319    local_var_req_builder = local_var_req_builder.json(&create_deployment_request_request);
1320
1321    let local_var_req = local_var_req_builder.build()?;
1322    let local_var_resp = local_var_client.execute(local_var_req).await?;
1323
1324    let local_var_status = local_var_resp.status();
1325    let local_var_content = local_var_resp.text().await?;
1326
1327    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1328        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1329    } else {
1330        let local_var_entity: Option<CreateDeploymentRequestError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1331        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1332        Err(Error::ResponseError(local_var_error))
1333    }
1334}
1335
1336pub 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>> {
1337    let local_var_configuration = configuration;
1338
1339    let local_var_client = &local_var_configuration.client;
1340
1341    let local_var_uri_str = format!("{}/w/{workspace}/deployment_request/{id}/comment", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=id);
1342    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1343
1344    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1345        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1346    }
1347    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1348        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1349    };
1350    local_var_req_builder = local_var_req_builder.json(&create_deployment_request_comment_request);
1351
1352    let local_var_req = local_var_req_builder.build()?;
1353    let local_var_resp = local_var_client.execute(local_var_req).await?;
1354
1355    let local_var_status = local_var_resp.status();
1356    let local_var_content = local_var_resp.text().await?;
1357
1358    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1359        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1360    } else {
1361        let local_var_entity: Option<CreateDeploymentRequestCommentError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1362        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1363        Err(Error::ResponseError(local_var_error))
1364    }
1365}
1366
1367pub async fn create_pg_database(configuration: &configuration::Configuration, workspace: &str, create_pg_database_request: models::CreatePgDatabaseRequest) -> Result<String, Error<CreatePgDatabaseError>> {
1368    let local_var_configuration = configuration;
1369
1370    let local_var_client = &local_var_configuration.client;
1371
1372    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/create_pg_database", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1373    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1374
1375    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1376        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1377    }
1378    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1379        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1380    };
1381    local_var_req_builder = local_var_req_builder.json(&create_pg_database_request);
1382
1383    let local_var_req = local_var_req_builder.build()?;
1384    let local_var_resp = local_var_client.execute(local_var_req).await?;
1385
1386    let local_var_status = local_var_resp.status();
1387    let local_var_content = local_var_resp.text().await?;
1388
1389    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1390        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1391    } else {
1392        let local_var_entity: Option<CreatePgDatabaseError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1393        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1394        Err(Error::ResponseError(local_var_error))
1395    }
1396}
1397
1398pub async fn create_protection_rule(configuration: &configuration::Configuration, workspace: &str, create_protection_rule_request: models::CreateProtectionRuleRequest) -> Result<String, Error<CreateProtectionRuleError>> {
1399    let local_var_configuration = configuration;
1400
1401    let local_var_client = &local_var_configuration.client;
1402
1403    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/protection_rules", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1404    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1405
1406    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1407        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1408    }
1409    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1410        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1411    };
1412    local_var_req_builder = local_var_req_builder.json(&create_protection_rule_request);
1413
1414    let local_var_req = local_var_req_builder.build()?;
1415    let local_var_resp = local_var_client.execute(local_var_req).await?;
1416
1417    let local_var_status = local_var_resp.status();
1418    let local_var_content = local_var_resp.text().await?;
1419
1420    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1421        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1422    } else {
1423        let local_var_entity: Option<CreateProtectionRuleError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1424        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1425        Err(Error::ResponseError(local_var_error))
1426    }
1427}
1428
1429pub async fn create_service_account(configuration: &configuration::Configuration, workspace: &str, create_service_account_request: models::CreateServiceAccountRequest) -> Result<String, Error<CreateServiceAccountError>> {
1430    let local_var_configuration = configuration;
1431
1432    let local_var_client = &local_var_configuration.client;
1433
1434    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/create_service_account", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1435    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1436
1437    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1438        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1439    }
1440    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1441        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1442    };
1443    local_var_req_builder = local_var_req_builder.json(&create_service_account_request);
1444
1445    let local_var_req = local_var_req_builder.build()?;
1446    let local_var_resp = local_var_client.execute(local_var_req).await?;
1447
1448    let local_var_status = local_var_resp.status();
1449    let local_var_content = local_var_resp.text().await?;
1450
1451    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1452        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1453    } else {
1454        let local_var_entity: Option<CreateServiceAccountError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1455        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1456        Err(Error::ResponseError(local_var_error))
1457    }
1458}
1459
1460pub async fn create_workspace(configuration: &configuration::Configuration, create_workspace: models::CreateWorkspace) -> Result<String, Error<CreateWorkspaceError>> {
1461    let local_var_configuration = configuration;
1462
1463    let local_var_client = &local_var_configuration.client;
1464
1465    let local_var_uri_str = format!("{}/workspaces/create", local_var_configuration.base_path);
1466    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1467
1468    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1469        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1470    }
1471    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1472        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1473    };
1474    local_var_req_builder = local_var_req_builder.json(&create_workspace);
1475
1476    let local_var_req = local_var_req_builder.build()?;
1477    let local_var_resp = local_var_client.execute(local_var_req).await?;
1478
1479    let local_var_status = local_var_resp.status();
1480    let local_var_content = local_var_resp.text().await?;
1481
1482    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1483        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1484    } else {
1485        let local_var_entity: Option<CreateWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1486        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1487        Err(Error::ResponseError(local_var_error))
1488    }
1489}
1490
1491pub async fn create_workspace_fork(configuration: &configuration::Configuration, workspace: &str, create_workspace_fork: models::CreateWorkspaceFork) -> Result<String, Error<CreateWorkspaceForkError>> {
1492    let local_var_configuration = configuration;
1493
1494    let local_var_client = &local_var_configuration.client;
1495
1496    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/create_fork", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1497    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1498
1499    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1500        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1501    }
1502    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1503        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1504    };
1505    local_var_req_builder = local_var_req_builder.json(&create_workspace_fork);
1506
1507    let local_var_req = local_var_req_builder.build()?;
1508    let local_var_resp = local_var_client.execute(local_var_req).await?;
1509
1510    let local_var_status = local_var_resp.status();
1511    let local_var_content = local_var_resp.text().await?;
1512
1513    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1514        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1515    } else {
1516        let local_var_entity: Option<CreateWorkspaceForkError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1517        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1518        Err(Error::ResponseError(local_var_error))
1519    }
1520}
1521
1522pub async fn create_workspace_fork_git_branch(configuration: &configuration::Configuration, workspace: &str, create_workspace_fork: models::CreateWorkspaceFork) -> Result<Vec<uuid::Uuid>, Error<CreateWorkspaceForkGitBranchError>> {
1523    let local_var_configuration = configuration;
1524
1525    let local_var_client = &local_var_configuration.client;
1526
1527    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/create_workspace_fork_branch", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1528    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1529
1530    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1531        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1532    }
1533    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1534        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1535    };
1536    local_var_req_builder = local_var_req_builder.json(&create_workspace_fork);
1537
1538    let local_var_req = local_var_req_builder.build()?;
1539    let local_var_resp = local_var_client.execute(local_var_req).await?;
1540
1541    let local_var_status = local_var_resp.status();
1542    let local_var_content = local_var_resp.text().await?;
1543
1544    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1545        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1546    } else {
1547        let local_var_entity: Option<CreateWorkspaceForkGitBranchError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1548        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1549        Err(Error::ResponseError(local_var_error))
1550    }
1551}
1552
1553pub async fn delete_datatable_migration(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str, timestamp: i64) -> Result<String, Error<DeleteDatatableMigrationError>> {
1554    let local_var_configuration = configuration;
1555
1556    let local_var_client = &local_var_configuration.client;
1557
1558    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);
1559    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1560
1561    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1562        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1563    }
1564    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1565        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1566    };
1567
1568    let local_var_req = local_var_req_builder.build()?;
1569    let local_var_resp = local_var_client.execute(local_var_req).await?;
1570
1571    let local_var_status = local_var_resp.status();
1572    let local_var_content = local_var_resp.text().await?;
1573
1574    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1575        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1576    } else {
1577        let local_var_entity: Option<DeleteDatatableMigrationError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1578        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1579        Err(Error::ResponseError(local_var_error))
1580    }
1581}
1582
1583pub async fn delete_git_sync_repository(configuration: &configuration::Configuration, workspace: &str, delete_git_sync_repository_request: models::DeleteGitSyncRepositoryRequest) -> Result<serde_json::Value, Error<DeleteGitSyncRepositoryError>> {
1584    let local_var_configuration = configuration;
1585
1586    let local_var_client = &local_var_configuration.client;
1587
1588    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/delete_git_sync_repository", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1589    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1590
1591    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1592        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1593    }
1594    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1595        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1596    };
1597    local_var_req_builder = local_var_req_builder.json(&delete_git_sync_repository_request);
1598
1599    let local_var_req = local_var_req_builder.build()?;
1600    let local_var_resp = local_var_client.execute(local_var_req).await?;
1601
1602    let local_var_status = local_var_resp.status();
1603    let local_var_content = local_var_resp.text().await?;
1604
1605    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1606        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1607    } else {
1608        let local_var_entity: Option<DeleteGitSyncRepositoryError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1609        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1610        Err(Error::ResponseError(local_var_error))
1611    }
1612}
1613
1614pub async fn delete_invite(configuration: &configuration::Configuration, workspace: &str, delete_invite_request: models::DeleteInviteRequest) -> Result<String, Error<DeleteInviteError>> {
1615    let local_var_configuration = configuration;
1616
1617    let local_var_client = &local_var_configuration.client;
1618
1619    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/delete_invite", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1620    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1621
1622    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1623        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1624    }
1625    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1626        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1627    };
1628    local_var_req_builder = local_var_req_builder.json(&delete_invite_request);
1629
1630    let local_var_req = local_var_req_builder.build()?;
1631    let local_var_resp = local_var_client.execute(local_var_req).await?;
1632
1633    let local_var_status = local_var_resp.status();
1634    let local_var_content = local_var_resp.text().await?;
1635
1636    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1637        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1638    } else {
1639        let local_var_entity: Option<DeleteInviteError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1640        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1641        Err(Error::ResponseError(local_var_error))
1642    }
1643}
1644
1645pub async fn delete_protection_rule(configuration: &configuration::Configuration, workspace: &str, rule_name: &str) -> Result<String, Error<DeleteProtectionRuleError>> {
1646    let local_var_configuration = configuration;
1647
1648    let local_var_client = &local_var_configuration.client;
1649
1650    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));
1651    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1652
1653    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1654        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1655    }
1656    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1657        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1658    };
1659
1660    let local_var_req = local_var_req_builder.build()?;
1661    let local_var_resp = local_var_client.execute(local_var_req).await?;
1662
1663    let local_var_status = local_var_resp.status();
1664    let local_var_content = local_var_resp.text().await?;
1665
1666    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1667        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1668    } else {
1669        let local_var_entity: Option<DeleteProtectionRuleError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1670        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1671        Err(Error::ResponseError(local_var_error))
1672    }
1673}
1674
1675pub async fn delete_workspace(configuration: &configuration::Configuration, workspace: &str, only_delete_forks: Option<bool>) -> Result<String, Error<DeleteWorkspaceError>> {
1676    let local_var_configuration = configuration;
1677
1678    let local_var_client = &local_var_configuration.client;
1679
1680    let local_var_uri_str = format!("{}/workspaces/delete/{workspace}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1681    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1682
1683    if let Some(ref local_var_str) = only_delete_forks {
1684        local_var_req_builder = local_var_req_builder.query(&[("only_delete_forks", &local_var_str.to_string())]);
1685    }
1686    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1687        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1688    }
1689    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1690        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1691    };
1692
1693    let local_var_req = local_var_req_builder.build()?;
1694    let local_var_resp = local_var_client.execute(local_var_req).await?;
1695
1696    let local_var_status = local_var_resp.status();
1697    let local_var_content = local_var_resp.text().await?;
1698
1699    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1700        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1701    } else {
1702        let local_var_entity: Option<DeleteWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1703        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1704        Err(Error::ResponseError(local_var_error))
1705    }
1706}
1707
1708pub async fn delete_workspace_slack_oauth_config(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<DeleteWorkspaceSlackOauthConfigError>> {
1709    let local_var_configuration = configuration;
1710
1711    let local_var_client = &local_var_configuration.client;
1712
1713    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/slack_oauth_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1714    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
1715
1716    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1717        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1718    }
1719    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1720        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1721    };
1722
1723    let local_var_req = local_var_req_builder.build()?;
1724    let local_var_resp = local_var_client.execute(local_var_req).await?;
1725
1726    let local_var_status = local_var_resp.status();
1727    let local_var_content = local_var_resp.text().await?;
1728
1729    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1730        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1731    } else {
1732        let local_var_entity: Option<DeleteWorkspaceSlackOauthConfigError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1733        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1734        Err(Error::ResponseError(local_var_error))
1735    }
1736}
1737
1738pub async fn detach_dev_workspace(configuration: &configuration::Configuration, workspace: &str, detach_dev_workspace_request: models::DetachDevWorkspaceRequest) -> Result<String, Error<DetachDevWorkspaceError>> {
1739    let local_var_configuration = configuration;
1740
1741    let local_var_client = &local_var_configuration.client;
1742
1743    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/detach_dev_workspace", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1744    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1745
1746    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1747        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1748    }
1749    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1750        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1751    };
1752    local_var_req_builder = local_var_req_builder.json(&detach_dev_workspace_request);
1753
1754    let local_var_req = local_var_req_builder.build()?;
1755    let local_var_resp = local_var_client.execute(local_var_req).await?;
1756
1757    let local_var_status = local_var_resp.status();
1758    let local_var_content = local_var_resp.text().await?;
1759
1760    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1761        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1762    } else {
1763        let local_var_entity: Option<DetachDevWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1764        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1765        Err(Error::ResponseError(local_var_error))
1766    }
1767}
1768
1769pub async fn disable_datatable_migrations(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str) -> Result<String, Error<DisableDatatableMigrationsError>> {
1770    let local_var_configuration = configuration;
1771
1772    let local_var_client = &local_var_configuration.client;
1773
1774    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));
1775    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1776
1777    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1778        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1779    }
1780    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1781        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1782    };
1783
1784    let local_var_req = local_var_req_builder.build()?;
1785    let local_var_resp = local_var_client.execute(local_var_req).await?;
1786
1787    let local_var_status = local_var_resp.status();
1788    let local_var_content = local_var_resp.text().await?;
1789
1790    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1791        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1792    } else {
1793        let local_var_entity: Option<DisableDatatableMigrationsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1794        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1795        Err(Error::ResponseError(local_var_error))
1796    }
1797}
1798
1799pub async fn drop_forked_datatable_databases(configuration: &configuration::Configuration, workspace: &str, drop_forked_datatable_databases_request: models::DropForkedDatatableDatabasesRequest) -> Result<Vec<String>, Error<DropForkedDatatableDatabasesError>> {
1800    let local_var_configuration = configuration;
1801
1802    let local_var_client = &local_var_configuration.client;
1803
1804    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/drop_forked_datatable_databases", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1805    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1806
1807    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1808        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1809    }
1810    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1811        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1812    };
1813    local_var_req_builder = local_var_req_builder.json(&drop_forked_datatable_databases_request);
1814
1815    let local_var_req = local_var_req_builder.build()?;
1816    let local_var_resp = local_var_client.execute(local_var_req).await?;
1817
1818    let local_var_status = local_var_resp.status();
1819    let local_var_content = local_var_resp.text().await?;
1820
1821    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1822        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1823    } else {
1824        let local_var_entity: Option<DropForkedDatatableDatabasesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1825        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1826        Err(Error::ResponseError(local_var_error))
1827    }
1828}
1829
1830pub async fn drop_forked_ducklake_namespaces(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<String>, Error<DropForkedDucklakeNamespacesError>> {
1831    let local_var_configuration = configuration;
1832
1833    let local_var_client = &local_var_configuration.client;
1834
1835    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/drop_forked_ducklake_namespaces", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1836    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1837
1838    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1839        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1840    }
1841    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1842        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1843    };
1844
1845    let local_var_req = local_var_req_builder.build()?;
1846    let local_var_resp = local_var_client.execute(local_var_req).await?;
1847
1848    let local_var_status = local_var_resp.status();
1849    let local_var_content = local_var_resp.text().await?;
1850
1851    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1852        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1853    } else {
1854        let local_var_entity: Option<DropForkedDucklakeNamespacesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1855        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1856        Err(Error::ResponseError(local_var_error))
1857    }
1858}
1859
1860pub async fn edit_auto_invite(configuration: &configuration::Configuration, workspace: &str, edit_auto_invite_request: models::EditAutoInviteRequest) -> Result<String, Error<EditAutoInviteError>> {
1861    let local_var_configuration = configuration;
1862
1863    let local_var_client = &local_var_configuration.client;
1864
1865    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_auto_invite", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1866    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1867
1868    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1869        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1870    }
1871    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1872        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1873    };
1874    local_var_req_builder = local_var_req_builder.json(&edit_auto_invite_request);
1875
1876    let local_var_req = local_var_req_builder.build()?;
1877    let local_var_resp = local_var_client.execute(local_var_req).await?;
1878
1879    let local_var_status = local_var_resp.status();
1880    let local_var_content = local_var_resp.text().await?;
1881
1882    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1883        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1884    } else {
1885        let local_var_entity: Option<EditAutoInviteError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1886        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1887        Err(Error::ResponseError(local_var_error))
1888    }
1889}
1890
1891pub async fn edit_copilot_config(configuration: &configuration::Configuration, workspace: &str, ai_config: models::AiConfig) -> Result<models::EditCopilotConfig200Response, Error<EditCopilotConfigError>> {
1892    let local_var_configuration = configuration;
1893
1894    let local_var_client = &local_var_configuration.client;
1895
1896    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_copilot_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1897    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1898
1899    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1900        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1901    }
1902    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1903        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1904    };
1905    local_var_req_builder = local_var_req_builder.json(&ai_config);
1906
1907    let local_var_req = local_var_req_builder.build()?;
1908    let local_var_resp = local_var_client.execute(local_var_req).await?;
1909
1910    let local_var_status = local_var_resp.status();
1911    let local_var_content = local_var_resp.text().await?;
1912
1913    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1914        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1915    } else {
1916        let local_var_entity: Option<EditCopilotConfigError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1917        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1918        Err(Error::ResponseError(local_var_error))
1919    }
1920}
1921
1922pub async fn edit_data_table_config(configuration: &configuration::Configuration, workspace: &str, edit_data_table_config_request: models::EditDataTableConfigRequest) -> Result<serde_json::Value, Error<EditDataTableConfigError>> {
1923    let local_var_configuration = configuration;
1924
1925    let local_var_client = &local_var_configuration.client;
1926
1927    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_datatable_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1928    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1929
1930    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1931        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1932    }
1933    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1934        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1935    };
1936    local_var_req_builder = local_var_req_builder.json(&edit_data_table_config_request);
1937
1938    let local_var_req = local_var_req_builder.build()?;
1939    let local_var_resp = local_var_client.execute(local_var_req).await?;
1940
1941    let local_var_status = local_var_resp.status();
1942    let local_var_content = local_var_resp.text().await?;
1943
1944    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1945        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1946    } else {
1947        let local_var_entity: Option<EditDataTableConfigError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1948        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1949        Err(Error::ResponseError(local_var_error))
1950    }
1951}
1952
1953pub async fn edit_dbt_warehouses(configuration: &configuration::Configuration, workspace: &str, edit_dbt_warehouses_request: models::EditDbtWarehousesRequest) -> Result<serde_json::Value, Error<EditDbtWarehousesError>> {
1954    let local_var_configuration = configuration;
1955
1956    let local_var_client = &local_var_configuration.client;
1957
1958    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_dbt_warehouses", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1959    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1960
1961    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1962        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1963    }
1964    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1965        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1966    };
1967    local_var_req_builder = local_var_req_builder.json(&edit_dbt_warehouses_request);
1968
1969    let local_var_req = local_var_req_builder.build()?;
1970    let local_var_resp = local_var_client.execute(local_var_req).await?;
1971
1972    let local_var_status = local_var_resp.status();
1973    let local_var_content = local_var_resp.text().await?;
1974
1975    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1976        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1977    } else {
1978        let local_var_entity: Option<EditDbtWarehousesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1979        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1980        Err(Error::ResponseError(local_var_error))
1981    }
1982}
1983
1984pub async fn edit_default_scripts(configuration: &configuration::Configuration, workspace: &str, workspace_default_scripts: Option<models::WorkspaceDefaultScripts>) -> Result<String, Error<EditDefaultScriptsError>> {
1985    let local_var_configuration = configuration;
1986
1987    let local_var_client = &local_var_configuration.client;
1988
1989    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/default_scripts", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1990    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1991
1992    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1993        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1994    }
1995    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1996        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1997    };
1998    local_var_req_builder = local_var_req_builder.json(&workspace_default_scripts);
1999
2000    let local_var_req = local_var_req_builder.build()?;
2001    let local_var_resp = local_var_client.execute(local_var_req).await?;
2002
2003    let local_var_status = local_var_resp.status();
2004    let local_var_content = local_var_resp.text().await?;
2005
2006    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2007        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2008    } else {
2009        let local_var_entity: Option<EditDefaultScriptsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2010        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2011        Err(Error::ResponseError(local_var_error))
2012    }
2013}
2014
2015pub async fn edit_ducklake_config(configuration: &configuration::Configuration, workspace: &str, edit_ducklake_config_request: models::EditDucklakeConfigRequest) -> Result<serde_json::Value, Error<EditDucklakeConfigError>> {
2016    let local_var_configuration = configuration;
2017
2018    let local_var_client = &local_var_configuration.client;
2019
2020    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_ducklake_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2021    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2022
2023    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2024        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2025    }
2026    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2027        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2028    };
2029    local_var_req_builder = local_var_req_builder.json(&edit_ducklake_config_request);
2030
2031    let local_var_req = local_var_req_builder.build()?;
2032    let local_var_resp = local_var_client.execute(local_var_req).await?;
2033
2034    let local_var_status = local_var_resp.status();
2035    let local_var_content = local_var_resp.text().await?;
2036
2037    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2038        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2039    } else {
2040        let local_var_entity: Option<EditDucklakeConfigError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2041        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2042        Err(Error::ResponseError(local_var_error))
2043    }
2044}
2045
2046pub async fn edit_error_handler(configuration: &configuration::Configuration, workspace: &str, edit_error_handler: models::EditErrorHandler) -> Result<String, Error<EditErrorHandlerError>> {
2047    let local_var_configuration = configuration;
2048
2049    let local_var_client = &local_var_configuration.client;
2050
2051    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_error_handler", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2052    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2053
2054    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2055        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2056    }
2057    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2058        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2059    };
2060    local_var_req_builder = local_var_req_builder.json(&edit_error_handler);
2061
2062    let local_var_req = local_var_req_builder.build()?;
2063    let local_var_resp = local_var_client.execute(local_var_req).await?;
2064
2065    let local_var_status = local_var_resp.status();
2066    let local_var_content = local_var_resp.text().await?;
2067
2068    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2069        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2070    } else {
2071        let local_var_entity: Option<EditErrorHandlerError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2072        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2073        Err(Error::ResponseError(local_var_error))
2074    }
2075}
2076
2077pub async fn edit_git_sync_repository(configuration: &configuration::Configuration, workspace: &str, edit_git_sync_repository_request: models::EditGitSyncRepositoryRequest) -> Result<serde_json::Value, Error<EditGitSyncRepositoryError>> {
2078    let local_var_configuration = configuration;
2079
2080    let local_var_client = &local_var_configuration.client;
2081
2082    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_git_sync_repository", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2083    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2084
2085    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2086        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2087    }
2088    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2089        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2090    };
2091    local_var_req_builder = local_var_req_builder.json(&edit_git_sync_repository_request);
2092
2093    let local_var_req = local_var_req_builder.build()?;
2094    let local_var_resp = local_var_client.execute(local_var_req).await?;
2095
2096    let local_var_status = local_var_resp.status();
2097    let local_var_content = local_var_resp.text().await?;
2098
2099    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2100        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2101    } else {
2102        let local_var_entity: Option<EditGitSyncRepositoryError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2103        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2104        Err(Error::ResponseError(local_var_error))
2105    }
2106}
2107
2108/// 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.
2109pub async fn edit_guest_access(configuration: &configuration::Configuration, workspace: &str, edit_guest_access_request: models::EditGuestAccessRequest) -> Result<String, Error<EditGuestAccessError>> {
2110    let local_var_configuration = configuration;
2111
2112    let local_var_client = &local_var_configuration.client;
2113
2114    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_guest_access", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2115    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2116
2117    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2118        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2119    }
2120    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2121        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2122    };
2123    local_var_req_builder = local_var_req_builder.json(&edit_guest_access_request);
2124
2125    let local_var_req = local_var_req_builder.build()?;
2126    let local_var_resp = local_var_client.execute(local_var_req).await?;
2127
2128    let local_var_status = local_var_resp.status();
2129    let local_var_content = local_var_resp.text().await?;
2130
2131    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2132        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2133    } else {
2134        let local_var_entity: Option<EditGuestAccessError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2135        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2136        Err(Error::ResponseError(local_var_error))
2137    }
2138}
2139
2140/// 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.
2141pub async fn edit_guest_jwt_key(configuration: &configuration::Configuration, workspace: &str, edit_guest_jwt_key_request: models::EditGuestJwtKeyRequest) -> Result<String, Error<EditGuestJwtKeyError>> {
2142    let local_var_configuration = configuration;
2143
2144    let local_var_client = &local_var_configuration.client;
2145
2146    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_guest_jwt_key", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2147    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2148
2149    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2150        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2151    }
2152    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2153        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2154    };
2155    local_var_req_builder = local_var_req_builder.json(&edit_guest_jwt_key_request);
2156
2157    let local_var_req = local_var_req_builder.build()?;
2158    let local_var_resp = local_var_client.execute(local_var_req).await?;
2159
2160    let local_var_status = local_var_resp.status();
2161    let local_var_content = local_var_resp.text().await?;
2162
2163    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2164        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2165    } else {
2166        let local_var_entity: Option<EditGuestJwtKeyError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2167        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2168        Err(Error::ResponseError(local_var_error))
2169    }
2170}
2171
2172pub async fn edit_instance_groups(configuration: &configuration::Configuration, workspace: &str, edit_instance_groups_request: models::EditInstanceGroupsRequest) -> Result<String, Error<EditInstanceGroupsError>> {
2173    let local_var_configuration = configuration;
2174
2175    let local_var_client = &local_var_configuration.client;
2176
2177    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_instance_groups", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2178    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2179
2180    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2181        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2182    }
2183    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2184        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2185    };
2186    local_var_req_builder = local_var_req_builder.json(&edit_instance_groups_request);
2187
2188    let local_var_req = local_var_req_builder.build()?;
2189    let local_var_resp = local_var_client.execute(local_var_req).await?;
2190
2191    let local_var_status = local_var_resp.status();
2192    let local_var_content = local_var_resp.text().await?;
2193
2194    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2195        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2196    } else {
2197        let local_var_entity: Option<EditInstanceGroupsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2198        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2199        Err(Error::ResponseError(local_var_error))
2200    }
2201}
2202
2203pub 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>> {
2204    let local_var_configuration = configuration;
2205
2206    let local_var_client = &local_var_configuration.client;
2207
2208    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_large_file_storage_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2209    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2210
2211    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2212        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2213    }
2214    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2215        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2216    };
2217    local_var_req_builder = local_var_req_builder.json(&edit_large_file_storage_config_request);
2218
2219    let local_var_req = local_var_req_builder.build()?;
2220    let local_var_resp = local_var_client.execute(local_var_req).await?;
2221
2222    let local_var_status = local_var_resp.status();
2223    let local_var_content = local_var_resp.text().await?;
2224
2225    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2226        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2227    } else {
2228        let local_var_entity: Option<EditLargeFileStorageConfigError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2229        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2230        Err(Error::ResponseError(local_var_error))
2231    }
2232}
2233
2234pub async fn edit_slack_command(configuration: &configuration::Configuration, workspace: &str, edit_slack_command_request: models::EditSlackCommandRequest) -> Result<String, Error<EditSlackCommandError>> {
2235    let local_var_configuration = configuration;
2236
2237    let local_var_client = &local_var_configuration.client;
2238
2239    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_slack_command", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2240    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2241
2242    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2243        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2244    }
2245    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2246        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2247    };
2248    local_var_req_builder = local_var_req_builder.json(&edit_slack_command_request);
2249
2250    let local_var_req = local_var_req_builder.build()?;
2251    let local_var_resp = local_var_client.execute(local_var_req).await?;
2252
2253    let local_var_status = local_var_resp.status();
2254    let local_var_content = local_var_resp.text().await?;
2255
2256    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2257        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2258    } else {
2259        let local_var_entity: Option<EditSlackCommandError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2260        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2261        Err(Error::ResponseError(local_var_error))
2262    }
2263}
2264
2265pub async fn edit_success_handler(configuration: &configuration::Configuration, workspace: &str, edit_success_handler: models::EditSuccessHandler) -> Result<String, Error<EditSuccessHandlerError>> {
2266    let local_var_configuration = configuration;
2267
2268    let local_var_client = &local_var_configuration.client;
2269
2270    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_success_handler", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2271    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2272
2273    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2274        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2275    }
2276    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2277        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2278    };
2279    local_var_req_builder = local_var_req_builder.json(&edit_success_handler);
2280
2281    let local_var_req = local_var_req_builder.build()?;
2282    let local_var_resp = local_var_client.execute(local_var_req).await?;
2283
2284    let local_var_status = local_var_resp.status();
2285    let local_var_content = local_var_resp.text().await?;
2286
2287    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2288        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2289    } else {
2290        let local_var_entity: Option<EditSuccessHandlerError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2291        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2292        Err(Error::ResponseError(local_var_error))
2293    }
2294}
2295
2296pub async fn edit_teams_command(configuration: &configuration::Configuration, workspace: &str, edit_slack_command_request: models::EditSlackCommandRequest) -> Result<String, Error<EditTeamsCommandError>> {
2297    let local_var_configuration = configuration;
2298
2299    let local_var_client = &local_var_configuration.client;
2300
2301    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_teams_command", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2302    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2303
2304    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2305        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2306    }
2307    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2308        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2309    };
2310    local_var_req_builder = local_var_req_builder.json(&edit_slack_command_request);
2311
2312    let local_var_req = local_var_req_builder.build()?;
2313    let local_var_resp = local_var_client.execute(local_var_req).await?;
2314
2315    let local_var_status = local_var_resp.status();
2316    let local_var_content = local_var_resp.text().await?;
2317
2318    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2319        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2320    } else {
2321        let local_var_entity: Option<EditTeamsCommandError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2322        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2323        Err(Error::ResponseError(local_var_error))
2324    }
2325}
2326
2327pub async fn edit_webhook(configuration: &configuration::Configuration, workspace: &str, edit_webhook_request: models::EditWebhookRequest) -> Result<String, Error<EditWebhookError>> {
2328    let local_var_configuration = configuration;
2329
2330    let local_var_client = &local_var_configuration.client;
2331
2332    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_webhook", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2333    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2334
2335    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2336        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2337    }
2338    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2339        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2340    };
2341    local_var_req_builder = local_var_req_builder.json(&edit_webhook_request);
2342
2343    let local_var_req = local_var_req_builder.build()?;
2344    let local_var_resp = local_var_client.execute(local_var_req).await?;
2345
2346    let local_var_status = local_var_resp.status();
2347    let local_var_content = local_var_resp.text().await?;
2348
2349    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2350        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2351    } else {
2352        let local_var_entity: Option<EditWebhookError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2353        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2354        Err(Error::ResponseError(local_var_error))
2355    }
2356}
2357
2358pub async fn edit_workspace_default_app(configuration: &configuration::Configuration, workspace: &str, edit_workspace_default_app_request: models::EditWorkspaceDefaultAppRequest) -> Result<String, Error<EditWorkspaceDefaultAppError>> {
2359    let local_var_configuration = configuration;
2360
2361    let local_var_client = &local_var_configuration.client;
2362
2363    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_default_app", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2364    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2365
2366    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2367        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2368    }
2369    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2370        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2371    };
2372    local_var_req_builder = local_var_req_builder.json(&edit_workspace_default_app_request);
2373
2374    let local_var_req = local_var_req_builder.build()?;
2375    let local_var_resp = local_var_client.execute(local_var_req).await?;
2376
2377    let local_var_status = local_var_resp.status();
2378    let local_var_content = local_var_resp.text().await?;
2379
2380    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2381        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2382    } else {
2383        let local_var_entity: Option<EditWorkspaceDefaultAppError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2384        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2385        Err(Error::ResponseError(local_var_error))
2386    }
2387}
2388
2389pub 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>> {
2390    let local_var_configuration = configuration;
2391
2392    let local_var_client = &local_var_configuration.client;
2393
2394    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_deploy_ui_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2395    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2396
2397    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2398        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2399    }
2400    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2401        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2402    };
2403    local_var_req_builder = local_var_req_builder.json(&edit_workspace_deploy_ui_settings_request);
2404
2405    let local_var_req = local_var_req_builder.build()?;
2406    let local_var_resp = local_var_client.execute(local_var_req).await?;
2407
2408    let local_var_status = local_var_resp.status();
2409    let local_var_content = local_var_resp.text().await?;
2410
2411    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2412        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2413    } else {
2414        let local_var_entity: Option<EditWorkspaceDeployUiSettingsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2415        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2416        Err(Error::ResponseError(local_var_error))
2417    }
2418}
2419
2420pub async fn edit_workspace_git_sync_config(configuration: &configuration::Configuration, workspace: &str, edit_workspace_git_sync_config_request: models::EditWorkspaceGitSyncConfigRequest) -> Result<serde_json::Value, Error<EditWorkspaceGitSyncConfigError>> {
2421    let local_var_configuration = configuration;
2422
2423    let local_var_client = &local_var_configuration.client;
2424
2425    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_git_sync_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2426    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2427
2428    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2429        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2430    }
2431    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2432        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2433    };
2434    local_var_req_builder = local_var_req_builder.json(&edit_workspace_git_sync_config_request);
2435
2436    let local_var_req = local_var_req_builder.build()?;
2437    let local_var_resp = local_var_client.execute(local_var_req).await?;
2438
2439    let local_var_status = local_var_resp.status();
2440    let local_var_content = local_var_resp.text().await?;
2441
2442    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2443        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2444    } else {
2445        let local_var_entity: Option<EditWorkspaceGitSyncConfigError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2446        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2447        Err(Error::ResponseError(local_var_error))
2448    }
2449}
2450
2451pub async fn enable_datatable_migrations(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str) -> Result<String, Error<EnableDatatableMigrationsError>> {
2452    let local_var_configuration = configuration;
2453
2454    let local_var_client = &local_var_configuration.client;
2455
2456    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));
2457    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2458
2459    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2460        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2461    }
2462    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2463        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2464    };
2465
2466    let local_var_req = local_var_req_builder.build()?;
2467    let local_var_resp = local_var_client.execute(local_var_req).await?;
2468
2469    let local_var_status = local_var_resp.status();
2470    let local_var_content = local_var_resp.text().await?;
2471
2472    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2473        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2474    } else {
2475        let local_var_entity: Option<EnableDatatableMigrationsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2476        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2477        Err(Error::ResponseError(local_var_error))
2478    }
2479}
2480
2481pub async fn exists_username(configuration: &configuration::Configuration, exists_username_request: models::ExistsUsernameRequest) -> Result<bool, Error<ExistsUsernameError>> {
2482    let local_var_configuration = configuration;
2483
2484    let local_var_client = &local_var_configuration.client;
2485
2486    let local_var_uri_str = format!("{}/workspaces/exists_username", local_var_configuration.base_path);
2487    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2488
2489    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2490        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2491    }
2492    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2493        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2494    };
2495    local_var_req_builder = local_var_req_builder.json(&exists_username_request);
2496
2497    let local_var_req = local_var_req_builder.build()?;
2498    let local_var_resp = local_var_client.execute(local_var_req).await?;
2499
2500    let local_var_status = local_var_resp.status();
2501    let local_var_content = local_var_resp.text().await?;
2502
2503    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2504        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2505    } else {
2506        let local_var_entity: Option<ExistsUsernameError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2507        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2508        Err(Error::ResponseError(local_var_error))
2509    }
2510}
2511
2512pub async fn exists_workspace(configuration: &configuration::Configuration, exists_workspace_request: models::ExistsWorkspaceRequest) -> Result<bool, Error<ExistsWorkspaceError>> {
2513    let local_var_configuration = configuration;
2514
2515    let local_var_client = &local_var_configuration.client;
2516
2517    let local_var_uri_str = format!("{}/workspaces/exists", local_var_configuration.base_path);
2518    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2519
2520    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2521        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2522    }
2523    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2524        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2525    };
2526    local_var_req_builder = local_var_req_builder.json(&exists_workspace_request);
2527
2528    let local_var_req = local_var_req_builder.build()?;
2529    let local_var_resp = local_var_client.execute(local_var_req).await?;
2530
2531    let local_var_status = local_var_resp.status();
2532    let local_var_content = local_var_resp.text().await?;
2533
2534    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2535        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2536    } else {
2537        let local_var_entity: Option<ExistsWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2538        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2539        Err(Error::ResponseError(local_var_error))
2540    }
2541}
2542
2543pub async fn export_pg_schema(configuration: &configuration::Configuration, workspace: &str, export_pg_schema_request: models::ExportPgSchemaRequest) -> Result<String, Error<ExportPgSchemaError>> {
2544    let local_var_configuration = configuration;
2545
2546    let local_var_client = &local_var_configuration.client;
2547
2548    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/export_pg_schema", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2549    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2550
2551    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2552        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2553    }
2554    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2555        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2556    };
2557    local_var_req_builder = local_var_req_builder.json(&export_pg_schema_request);
2558
2559    let local_var_req = local_var_req_builder.build()?;
2560    let local_var_resp = local_var_client.execute(local_var_req).await?;
2561
2562    let local_var_status = local_var_resp.status();
2563    let local_var_content = local_var_resp.text().await?;
2564
2565    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2566        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2567    } else {
2568        let local_var_entity: Option<ExportPgSchemaError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2569        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2570        Err(Error::ResponseError(local_var_error))
2571    }
2572}
2573
2574pub async fn generate_initial_datatable_migration(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str) -> Result<models::DatatableMigration, Error<GenerateInitialDatatableMigrationError>> {
2575    let local_var_configuration = configuration;
2576
2577    let local_var_client = &local_var_configuration.client;
2578
2579    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));
2580    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2581
2582    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2583        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2584    }
2585    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2586        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2587    };
2588
2589    let local_var_req = local_var_req_builder.build()?;
2590    let local_var_resp = local_var_client.execute(local_var_req).await?;
2591
2592    let local_var_status = local_var_resp.status();
2593    let local_var_content = local_var_resp.text().await?;
2594
2595    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2596        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2597    } else {
2598        let local_var_entity: Option<GenerateInitialDatatableMigrationError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2599        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2600        Err(Error::ResponseError(local_var_error))
2601    }
2602}
2603
2604pub async fn get_billable_seats(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetBillableSeats200Response, Error<GetBillableSeatsError>> {
2605    let local_var_configuration = configuration;
2606
2607    let local_var_client = &local_var_configuration.client;
2608
2609    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/billable_seats", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2610    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2611
2612    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2613        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2614    }
2615    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2616        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2617    };
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<GetBillableSeatsError> = 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 get_cloud_quotas(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetCloudQuotas200Response, Error<GetCloudQuotasError>> {
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/cloud_quotas", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2640    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, 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<GetCloudQuotasError> = 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_copilot_info(configuration: &configuration::Configuration, workspace: &str) -> Result<models::AiConfig, Error<GetCopilotInfoError>> {
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/get_copilot_info", 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<GetCopilotInfoError> = 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_copilot_settings_state(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetCopilotSettingsState200Response, Error<GetCopilotSettingsStateError>> {
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/get_copilot_settings_state", 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<GetCopilotSettingsStateError> = 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_data_table_table_schema(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str, schema_name: &str, table_name: &str) -> Result<models::DataTableTableSchema, Error<GetDataTableTableSchemaError>> {
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_datatable_table_schema", 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    local_var_req_builder = local_var_req_builder.query(&[("datatable_name", &datatable_name.to_string())]);
2733    local_var_req_builder = local_var_req_builder.query(&[("schema_name", &schema_name.to_string())]);
2734    local_var_req_builder = local_var_req_builder.query(&[("table_name", &table_name.to_string())]);
2735    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2736        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2737    }
2738    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2739        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2740    };
2741
2742    let local_var_req = local_var_req_builder.build()?;
2743    let local_var_resp = local_var_client.execute(local_var_req).await?;
2744
2745    let local_var_status = local_var_resp.status();
2746    let local_var_content = local_var_resp.text().await?;
2747
2748    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2749        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2750    } else {
2751        let local_var_entity: Option<GetDataTableTableSchemaError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2752        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2753        Err(Error::ResponseError(local_var_error))
2754    }
2755}
2756
2757pub 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>> {
2758    let local_var_configuration = configuration;
2759
2760    let local_var_client = &local_var_configuration.client;
2761
2762    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_datatable_full_schema", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2763    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2764
2765    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2766        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2767    }
2768    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2769        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2770    };
2771    local_var_req_builder = local_var_req_builder.json(&get_datatable_full_schema_request);
2772
2773    let local_var_req = local_var_req_builder.build()?;
2774    let local_var_resp = local_var_client.execute(local_var_req).await?;
2775
2776    let local_var_status = local_var_resp.status();
2777    let local_var_content = local_var_resp.text().await?;
2778
2779    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2780        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2781    } else {
2782        let local_var_entity: Option<GetDatatableFullSchemaError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2783        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2784        Err(Error::ResponseError(local_var_error))
2785    }
2786}
2787
2788pub async fn get_datatable_migrations_status(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str) -> Result<models::GetDatatableMigrationsStatus200Response, Error<GetDatatableMigrationsStatusError>> {
2789    let local_var_configuration = configuration;
2790
2791    let local_var_client = &local_var_configuration.client;
2792
2793    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));
2794    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2795
2796    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2797        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2798    }
2799    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2800        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2801    };
2802
2803    let local_var_req = local_var_req_builder.build()?;
2804    let local_var_resp = local_var_client.execute(local_var_req).await?;
2805
2806    let local_var_status = local_var_resp.status();
2807    let local_var_content = local_var_resp.text().await?;
2808
2809    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2810        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2811    } else {
2812        let local_var_entity: Option<GetDatatableMigrationsStatusError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2813        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2814        Err(Error::ResponseError(local_var_error))
2815    }
2816}
2817
2818pub async fn get_default_scripts(configuration: &configuration::Configuration, workspace: &str) -> Result<models::WorkspaceDefaultScripts, Error<GetDefaultScriptsError>> {
2819    let local_var_configuration = configuration;
2820
2821    let local_var_client = &local_var_configuration.client;
2822
2823    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/default_scripts", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2824    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2825
2826    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2827        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2828    }
2829    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2830        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2831    };
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<GetDefaultScriptsError> = 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_dependency_map(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::DependencyMap>, Error<GetDependencyMapError>> {
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/get_dependency_map", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
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<GetDependencyMapError> = 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_dependents(configuration: &configuration::Configuration, workspace: &str, imported_path: &str) -> Result<Vec<models::DependencyDependent>, Error<GetDependentsError>> {
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/get_dependents/{imported_path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), imported_path=crate::apis::urlencode(imported_path));
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<GetDependentsError> = 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_dependents_amounts(configuration: &configuration::Configuration, workspace: &str, request_body: Vec<String>) -> Result<Vec<models::DependentsAmount>, Error<GetDependentsAmountsError>> {
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/get_dependents_amounts", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2914    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, 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    local_var_req_builder = local_var_req_builder.json(&request_body);
2923
2924    let local_var_req = local_var_req_builder.build()?;
2925    let local_var_resp = local_var_client.execute(local_var_req).await?;
2926
2927    let local_var_status = local_var_resp.status();
2928    let local_var_content = local_var_resp.text().await?;
2929
2930    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2931        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2932    } else {
2933        let local_var_entity: Option<GetDependentsAmountsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2934        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2935        Err(Error::ResponseError(local_var_error))
2936    }
2937}
2938
2939pub async fn get_deploy_to(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetDeployTo200Response, Error<GetDeployToError>> {
2940    let local_var_configuration = configuration;
2941
2942    let local_var_client = &local_var_configuration.client;
2943
2944    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_deploy_to", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2945    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2946
2947    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2948        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2949    }
2950    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2951        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2952    };
2953
2954    let local_var_req = local_var_req_builder.build()?;
2955    let local_var_resp = local_var_client.execute(local_var_req).await?;
2956
2957    let local_var_status = local_var_resp.status();
2958    let local_var_content = local_var_resp.text().await?;
2959
2960    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2961        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2962    } else {
2963        let local_var_entity: Option<GetDeployToError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2964        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2965        Err(Error::ResponseError(local_var_error))
2966    }
2967}
2968
2969pub async fn get_dev_workspace(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetDevWorkspace200Response, Error<GetDevWorkspaceError>> {
2970    let local_var_configuration = configuration;
2971
2972    let local_var_client = &local_var_configuration.client;
2973
2974    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_dev_workspace", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2975    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2976
2977    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2978        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2979    }
2980    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2981        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2982    };
2983
2984    let local_var_req = local_var_req_builder.build()?;
2985    let local_var_resp = local_var_client.execute(local_var_req).await?;
2986
2987    let local_var_status = local_var_resp.status();
2988    let local_var_content = local_var_resp.text().await?;
2989
2990    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2991        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2992    } else {
2993        let local_var_entity: Option<GetDevWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2994        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2995        Err(Error::ResponseError(local_var_error))
2996    }
2997}
2998
2999pub async fn get_git_sync_deploy_mode(configuration: &configuration::Configuration, workspace: &str, branch: Option<&str>) -> Result<models::GetGitSyncDeployMode200Response, Error<GetGitSyncDeployModeError>> {
3000    let local_var_configuration = configuration;
3001
3002    let local_var_client = &local_var_configuration.client;
3003
3004    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/git_sync_deploy_mode", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3005    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3006
3007    if let Some(ref local_var_str) = branch {
3008        local_var_req_builder = local_var_req_builder.query(&[("branch", &local_var_str.to_string())]);
3009    }
3010    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3011        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3012    }
3013    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3014        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3015    };
3016
3017    let local_var_req = local_var_req_builder.build()?;
3018    let local_var_resp = local_var_client.execute(local_var_req).await?;
3019
3020    let local_var_status = local_var_resp.status();
3021    let local_var_content = local_var_resp.text().await?;
3022
3023    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3024        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3025    } else {
3026        let local_var_entity: Option<GetGitSyncDeployModeError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3027        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3028        Err(Error::ResponseError(local_var_error))
3029    }
3030}
3031
3032pub async fn get_git_sync_enabled(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetGitSyncEnabled200Response, Error<GetGitSyncEnabledError>> {
3033    let local_var_configuration = configuration;
3034
3035    let local_var_client = &local_var_configuration.client;
3036
3037    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/git_sync_enabled", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3038    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3039
3040    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3041        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3042    }
3043    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3044        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3045    };
3046
3047    let local_var_req = local_var_req_builder.build()?;
3048    let local_var_resp = local_var_client.execute(local_var_req).await?;
3049
3050    let local_var_status = local_var_resp.status();
3051    let local_var_content = local_var_resp.text().await?;
3052
3053    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3054        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3055    } else {
3056        let local_var_entity: Option<GetGitSyncEnabledError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3057        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3058        Err(Error::ResponseError(local_var_error))
3059    }
3060}
3061
3062pub async fn get_github_app_repo_archive(configuration: &configuration::Configuration, workspace: &str, path: &str, r#ref: Option<&str>) -> Result<std::path::PathBuf, Error<GetGithubAppRepoArchiveError>> {
3063    let local_var_configuration = configuration;
3064
3065    let local_var_client = &local_var_configuration.client;
3066
3067    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));
3068    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3069
3070    if let Some(ref local_var_str) = r#ref {
3071        local_var_req_builder = local_var_req_builder.query(&[("ref", &local_var_str.to_string())]);
3072    }
3073    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3074        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3075    }
3076    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3077        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3078    };
3079
3080    let local_var_req = local_var_req_builder.build()?;
3081    let local_var_resp = local_var_client.execute(local_var_req).await?;
3082
3083    let local_var_status = local_var_resp.status();
3084    let local_var_content = local_var_resp.text().await?;
3085
3086    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3087        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3088    } else {
3089        let local_var_entity: Option<GetGithubAppRepoArchiveError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3090        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3091        Err(Error::ResponseError(local_var_error))
3092    }
3093}
3094
3095pub async fn get_github_app_token(configuration: &configuration::Configuration, workspace: &str, get_github_app_token_request: models::GetGithubAppTokenRequest) -> Result<models::GetGithubAppToken200Response, Error<GetGithubAppTokenError>> {
3096    let local_var_configuration = configuration;
3097
3098    let local_var_client = &local_var_configuration.client;
3099
3100    let local_var_uri_str = format!("{}/w/{workspace}/github_app/token", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3101    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3102
3103    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3104        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3105    }
3106    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3107        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3108    };
3109    local_var_req_builder = local_var_req_builder.json(&get_github_app_token_request);
3110
3111    let local_var_req = local_var_req_builder.build()?;
3112    let local_var_resp = local_var_client.execute(local_var_req).await?;
3113
3114    let local_var_status = local_var_resp.status();
3115    let local_var_content = local_var_resp.text().await?;
3116
3117    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3118        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3119    } else {
3120        let local_var_entity: Option<GetGithubAppTokenError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3121        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3122        Err(Error::ResponseError(local_var_error))
3123    }
3124}
3125
3126/// 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.
3127pub async fn get_guest_usage(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GuestUsage, Error<GetGuestUsageError>> {
3128    let local_var_configuration = configuration;
3129
3130    let local_var_client = &local_var_configuration.client;
3131
3132    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/guest_usage", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3133    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3134
3135    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3136        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3137    }
3138    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3139        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3140    };
3141
3142    let local_var_req = local_var_req_builder.build()?;
3143    let local_var_resp = local_var_client.execute(local_var_req).await?;
3144
3145    let local_var_status = local_var_resp.status();
3146    let local_var_content = local_var_resp.text().await?;
3147
3148    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3149        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3150    } else {
3151        let local_var_entity: Option<GetGuestUsageError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3152        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3153        Err(Error::ResponseError(local_var_error))
3154    }
3155}
3156
3157pub async fn get_imports(configuration: &configuration::Configuration, workspace: &str, importer_path: &str) -> Result<Vec<String>, Error<GetImportsError>> {
3158    let local_var_configuration = configuration;
3159
3160    let local_var_client = &local_var_configuration.client;
3161
3162    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));
3163    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3164
3165    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3166        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3167    }
3168    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3169        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3170    };
3171
3172    let local_var_req = local_var_req_builder.build()?;
3173    let local_var_resp = local_var_client.execute(local_var_req).await?;
3174
3175    let local_var_status = local_var_resp.status();
3176    let local_var_content = local_var_resp.text().await?;
3177
3178    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3179        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3180    } else {
3181        let local_var_entity: Option<GetImportsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3182        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3183        Err(Error::ResponseError(local_var_error))
3184    }
3185}
3186
3187pub async fn get_is_premium(configuration: &configuration::Configuration, workspace: &str) -> Result<bool, Error<GetIsPremiumError>> {
3188    let local_var_configuration = configuration;
3189
3190    let local_var_client = &local_var_configuration.client;
3191
3192    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/is_premium", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3193    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3194
3195    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3196        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3197    }
3198    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3199        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3200    };
3201
3202    let local_var_req = local_var_req_builder.build()?;
3203    let local_var_resp = local_var_client.execute(local_var_req).await?;
3204
3205    let local_var_status = local_var_resp.status();
3206    let local_var_content = local_var_resp.text().await?;
3207
3208    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3209        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3210    } else {
3211        let local_var_entity: Option<GetIsPremiumError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3212        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3213        Err(Error::ResponseError(local_var_error))
3214    }
3215}
3216
3217pub async fn get_open_deployment_request(configuration: &configuration::Configuration, workspace: &str) -> Result<models::DeploymentRequest, Error<GetOpenDeploymentRequestError>> {
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}/deployment_request/open", 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<GetOpenDeploymentRequestError> = 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_premium_info(configuration: &configuration::Configuration, workspace: &str, skip_subscription_fetch: Option<bool>) -> Result<models::GetPremiumInfo200Response, Error<GetPremiumInfoError>> {
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/premium_info", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
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_str) = skip_subscription_fetch {
3256        local_var_req_builder = local_var_req_builder.query(&[("skip_subscription_fetch", &local_var_str.to_string())]);
3257    }
3258    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3259        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3260    }
3261    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3262        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3263    };
3264
3265    let local_var_req = local_var_req_builder.build()?;
3266    let local_var_resp = local_var_client.execute(local_var_req).await?;
3267
3268    let local_var_status = local_var_resp.status();
3269    let local_var_content = local_var_resp.text().await?;
3270
3271    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3272        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3273    } else {
3274        let local_var_entity: Option<GetPremiumInfoError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3275        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3276        Err(Error::ResponseError(local_var_error))
3277    }
3278}
3279
3280/// Returns the subset of workspace settings safe to expose to any workspace member. The full settings struct is admin-only via `getSettings`.
3281pub async fn get_public_settings(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetPublicSettings200Response, Error<GetPublicSettingsError>> {
3282    let local_var_configuration = configuration;
3283
3284    let local_var_client = &local_var_configuration.client;
3285
3286    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_public_settings", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3287    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3288
3289    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3290        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3291    }
3292    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3293        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3294    };
3295
3296    let local_var_req = local_var_req_builder.build()?;
3297    let local_var_resp = local_var_client.execute(local_var_req).await?;
3298
3299    let local_var_status = local_var_resp.status();
3300    let local_var_content = local_var_resp.text().await?;
3301
3302    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3303        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3304    } else {
3305        let local_var_entity: Option<GetPublicSettingsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3306        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3307        Err(Error::ResponseError(local_var_error))
3308    }
3309}
3310
3311pub async fn get_session_workspace_retention(configuration: &configuration::Configuration, get_session_workspace_status_request: models::GetSessionWorkspaceStatusRequest) -> Result<std::collections::HashMap<String, i32>, Error<GetSessionWorkspaceRetentionError>> {
3312    let local_var_configuration = configuration;
3313
3314    let local_var_client = &local_var_configuration.client;
3315
3316    let local_var_uri_str = format!("{}/workspaces/session_workspace_retention", local_var_configuration.base_path);
3317    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3318
3319    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3320        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3321    }
3322    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3323        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3324    };
3325    local_var_req_builder = local_var_req_builder.json(&get_session_workspace_status_request);
3326
3327    let local_var_req = local_var_req_builder.build()?;
3328    let local_var_resp = local_var_client.execute(local_var_req).await?;
3329
3330    let local_var_status = local_var_resp.status();
3331    let local_var_content = local_var_resp.text().await?;
3332
3333    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3334        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3335    } else {
3336        let local_var_entity: Option<GetSessionWorkspaceRetentionError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3337        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3338        Err(Error::ResponseError(local_var_error))
3339    }
3340}
3341
3342pub async fn get_session_workspace_status(configuration: &configuration::Configuration, get_session_workspace_status_request: models::GetSessionWorkspaceStatusRequest) -> Result<std::collections::HashMap<String, String>, Error<GetSessionWorkspaceStatusError>> {
3343    let local_var_configuration = configuration;
3344
3345    let local_var_client = &local_var_configuration.client;
3346
3347    let local_var_uri_str = format!("{}/workspaces/session_workspace_status", local_var_configuration.base_path);
3348    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3349
3350    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3351        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3352    }
3353    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3354        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3355    };
3356    local_var_req_builder = local_var_req_builder.json(&get_session_workspace_status_request);
3357
3358    let local_var_req = local_var_req_builder.build()?;
3359    let local_var_resp = local_var_client.execute(local_var_req).await?;
3360
3361    let local_var_status = local_var_resp.status();
3362    let local_var_content = local_var_resp.text().await?;
3363
3364    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3365        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3366    } else {
3367        let local_var_entity: Option<GetSessionWorkspaceStatusError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3368        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3369        Err(Error::ResponseError(local_var_error))
3370    }
3371}
3372
3373/// Returns the full workspace settings including admin-managed integration credentials. Admin-only — non-admin callers should use `getPublicSettings`.
3374pub async fn get_settings(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetSettings200Response, Error<GetSettingsError>> {
3375    let local_var_configuration = configuration;
3376
3377    let local_var_client = &local_var_configuration.client;
3378
3379    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_settings", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3380    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3381
3382    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3383        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3384    }
3385    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3386        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3387    };
3388
3389    let local_var_req = local_var_req_builder.build()?;
3390    let local_var_resp = local_var_client.execute(local_var_req).await?;
3391
3392    let local_var_status = local_var_resp.status();
3393    let local_var_content = local_var_resp.text().await?;
3394
3395    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3396        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3397    } else {
3398        let local_var_entity: Option<GetSettingsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3399        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3400        Err(Error::ResponseError(local_var_error))
3401    }
3402}
3403
3404pub async fn get_shared_ui(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetSharedUi200Response, Error<GetSharedUiError>> {
3405    let local_var_configuration = configuration;
3406
3407    let local_var_client = &local_var_configuration.client;
3408
3409    let local_var_uri_str = format!("{}/w/{workspace}/shared_ui/get", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3410    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3411
3412    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3413        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3414    }
3415    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3416        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3417    };
3418
3419    let local_var_req = local_var_req_builder.build()?;
3420    let local_var_resp = local_var_client.execute(local_var_req).await?;
3421
3422    let local_var_status = local_var_resp.status();
3423    let local_var_content = local_var_resp.text().await?;
3424
3425    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3426        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3427    } else {
3428        let local_var_entity: Option<GetSharedUiError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3429        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3430        Err(Error::ResponseError(local_var_error))
3431    }
3432}
3433
3434pub async fn get_shared_ui_version(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetSharedUiVersion200Response, Error<GetSharedUiVersionError>> {
3435    let local_var_configuration = configuration;
3436
3437    let local_var_client = &local_var_configuration.client;
3438
3439    let local_var_uri_str = format!("{}/w/{workspace}/shared_ui/version", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3440    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3441
3442    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3443        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3444    }
3445    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3446        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3447    };
3448
3449    let local_var_req = local_var_req_builder.build()?;
3450    let local_var_resp = local_var_client.execute(local_var_req).await?;
3451
3452    let local_var_status = local_var_resp.status();
3453    let local_var_content = local_var_resp.text().await?;
3454
3455    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3456        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3457    } else {
3458        let local_var_entity: Option<GetSharedUiVersionError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3459        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3460        Err(Error::ResponseError(local_var_error))
3461    }
3462}
3463
3464pub async fn get_threshold_alert(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetThresholdAlert200Response, Error<GetThresholdAlertError>> {
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/threshold_alert", 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<GetThresholdAlertError> = 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_used_triggers(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetUsedTriggers200Response, Error<GetUsedTriggersError>> {
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}/workspaces/used_triggers", 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<GetUsedTriggersError> = 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_workspace_as_super_admin(configuration: &configuration::Configuration, workspace: &str) -> Result<models::Workspace, Error<GetWorkspaceAsSuperAdminError>> {
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}/workspaces/get_as_superadmin", 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<GetWorkspaceAsSuperAdminError> = 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_workspace_default_app(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetWorkspaceDefaultApp200Response, Error<GetWorkspaceDefaultAppError>> {
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/default_app", 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<GetWorkspaceDefaultAppError> = 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_workspace_encryption_key(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetWorkspaceEncryptionKey200Response, Error<GetWorkspaceEncryptionKeyError>> {
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/encryption_key", 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<GetWorkspaceEncryptionKeyError> = 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_name(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<GetWorkspaceNameError>> {
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_workspace_name", 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<GetWorkspaceNameError> = 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_slack_oauth_config(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetWorkspaceSlackOauthConfig200Response, Error<GetWorkspaceSlackOauthConfigError>> {
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/slack_oauth_config", 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<GetWorkspaceSlackOauthConfigError> = 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_usage(configuration: &configuration::Configuration, workspace: &str) -> Result<f64, Error<GetWorkspaceUsageError>> {
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/usage", 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<GetWorkspaceUsageError> = 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 import_pg_database(configuration: &configuration::Configuration, workspace: &str, import_pg_database_request: models::ImportPgDatabaseRequest) -> Result<String, Error<ImportPgDatabaseError>> {
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/import_pg_database", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3710    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, 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    local_var_req_builder = local_var_req_builder.json(&import_pg_database_request);
3719
3720    let local_var_req = local_var_req_builder.build()?;
3721    let local_var_resp = local_var_client.execute(local_var_req).await?;
3722
3723    let local_var_status = local_var_resp.status();
3724    let local_var_content = local_var_resp.text().await?;
3725
3726    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3727        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3728    } else {
3729        let local_var_entity: Option<ImportPgDatabaseError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3730        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3731        Err(Error::ResponseError(local_var_error))
3732    }
3733}
3734
3735pub async fn invite_user(configuration: &configuration::Configuration, workspace: &str, invite_user_request: models::InviteUserRequest) -> Result<String, Error<InviteUserError>> {
3736    let local_var_configuration = configuration;
3737
3738    let local_var_client = &local_var_configuration.client;
3739
3740    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/invite_user", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3741    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3742
3743    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3744        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3745    }
3746    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3747        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3748    };
3749    local_var_req_builder = local_var_req_builder.json(&invite_user_request);
3750
3751    let local_var_req = local_var_req_builder.build()?;
3752    let local_var_resp = local_var_client.execute(local_var_req).await?;
3753
3754    let local_var_status = local_var_resp.status();
3755    let local_var_content = local_var_resp.text().await?;
3756
3757    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3758        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3759    } else {
3760        let local_var_entity: Option<InviteUserError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3761        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3762        Err(Error::ResponseError(local_var_error))
3763    }
3764}
3765
3766pub async fn is_domain_allowed(configuration: &configuration::Configuration, ) -> Result<bool, Error<IsDomainAllowedError>> {
3767    let local_var_configuration = configuration;
3768
3769    let local_var_client = &local_var_configuration.client;
3770
3771    let local_var_uri_str = format!("{}/workspaces/allowed_domain_auto_invite", local_var_configuration.base_path);
3772    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3773
3774    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3775        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3776    }
3777    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3778        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3779    };
3780
3781    let local_var_req = local_var_req_builder.build()?;
3782    let local_var_resp = local_var_client.execute(local_var_req).await?;
3783
3784    let local_var_status = local_var_resp.status();
3785    let local_var_content = local_var_resp.text().await?;
3786
3787    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3788        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3789    } else {
3790        let local_var_entity: Option<IsDomainAllowedError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3791        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3792        Err(Error::ResponseError(local_var_error))
3793    }
3794}
3795
3796pub async fn leave_workspace(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<LeaveWorkspaceError>> {
3797    let local_var_configuration = configuration;
3798
3799    let local_var_client = &local_var_configuration.client;
3800
3801    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/leave", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3802    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3803
3804    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3805        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3806    }
3807    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3808        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3809    };
3810
3811    let local_var_req = local_var_req_builder.build()?;
3812    let local_var_resp = local_var_client.execute(local_var_req).await?;
3813
3814    let local_var_status = local_var_resp.status();
3815    let local_var_content = local_var_resp.text().await?;
3816
3817    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3818        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3819    } else {
3820        let local_var_entity: Option<LeaveWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3821        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3822        Err(Error::ResponseError(local_var_error))
3823    }
3824}
3825
3826pub async fn list_available_teams_channels(configuration: &configuration::Configuration, workspace: &str, team_id: &str) -> Result<models::ListAvailableTeamsChannels200Response, Error<ListAvailableTeamsChannelsError>> {
3827    let local_var_configuration = configuration;
3828
3829    let local_var_client = &local_var_configuration.client;
3830
3831    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/available_teams_channels", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3832    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3833
3834    local_var_req_builder = local_var_req_builder.query(&[("team_id", &team_id.to_string())]);
3835    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3836        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3837    }
3838    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3839        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3840    };
3841
3842    let local_var_req = local_var_req_builder.build()?;
3843    let local_var_resp = local_var_client.execute(local_var_req).await?;
3844
3845    let local_var_status = local_var_resp.status();
3846    let local_var_content = local_var_resp.text().await?;
3847
3848    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3849        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3850    } else {
3851        let local_var_entity: Option<ListAvailableTeamsChannelsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3852        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3853        Err(Error::ResponseError(local_var_error))
3854    }
3855}
3856
3857pub async fn list_available_teams_ids(configuration: &configuration::Configuration, workspace: &str, search: Option<&str>, next_link: Option<&str>) -> Result<models::ListAvailableTeamsIds200Response, Error<ListAvailableTeamsIdsError>> {
3858    let local_var_configuration = configuration;
3859
3860    let local_var_client = &local_var_configuration.client;
3861
3862    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/available_teams_ids", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3863    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3864
3865    if let Some(ref local_var_str) = search {
3866        local_var_req_builder = local_var_req_builder.query(&[("search", &local_var_str.to_string())]);
3867    }
3868    if let Some(ref local_var_str) = next_link {
3869        local_var_req_builder = local_var_req_builder.query(&[("next_link", &local_var_str.to_string())]);
3870    }
3871    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3872        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3873    }
3874    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3875        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3876    };
3877
3878    let local_var_req = local_var_req_builder.build()?;
3879    let local_var_resp = local_var_client.execute(local_var_req).await?;
3880
3881    let local_var_status = local_var_resp.status();
3882    let local_var_content = local_var_resp.text().await?;
3883
3884    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3885        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3886    } else {
3887        let local_var_entity: Option<ListAvailableTeamsIdsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3888        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3889        Err(Error::ResponseError(local_var_error))
3890    }
3891}
3892
3893pub async fn list_data_table_schemas(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::DataTableSchema>, Error<ListDataTableSchemasError>> {
3894    let local_var_configuration = configuration;
3895
3896    let local_var_client = &local_var_configuration.client;
3897
3898    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_datatable_schemas", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3899    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3900
3901    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3902        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3903    }
3904    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3905        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3906    };
3907
3908    let local_var_req = local_var_req_builder.build()?;
3909    let local_var_resp = local_var_client.execute(local_var_req).await?;
3910
3911    let local_var_status = local_var_resp.status();
3912    let local_var_content = local_var_resp.text().await?;
3913
3914    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3915        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3916    } else {
3917        let local_var_entity: Option<ListDataTableSchemasError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3918        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3919        Err(Error::ResponseError(local_var_error))
3920    }
3921}
3922
3923pub async fn list_data_table_tables(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::DataTableTables>, Error<ListDataTableTablesError>> {
3924    let local_var_configuration = configuration;
3925
3926    let local_var_client = &local_var_configuration.client;
3927
3928    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_datatable_tables", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3929    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3930
3931    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3932        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3933    }
3934    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3935        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3936    };
3937
3938    let local_var_req = local_var_req_builder.build()?;
3939    let local_var_resp = local_var_client.execute(local_var_req).await?;
3940
3941    let local_var_status = local_var_resp.status();
3942    let local_var_content = local_var_resp.text().await?;
3943
3944    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3945        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3946    } else {
3947        let local_var_entity: Option<ListDataTableTablesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3948        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3949        Err(Error::ResponseError(local_var_error))
3950    }
3951}
3952
3953pub async fn list_data_tables(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::ListDataTables200ResponseInner>, Error<ListDataTablesError>> {
3954    let local_var_configuration = configuration;
3955
3956    let local_var_client = &local_var_configuration.client;
3957
3958    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_datatables", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3959    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
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<ListDataTablesError> = 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_datatable_migrations(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::DatatableMigration>, Error<ListDatatableMigrationsError>> {
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_migrations", 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<ListDatatableMigrationsError> = 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
4013/// Returns admins and members of wm_deployers in the parent workspace of the fork at `{workspace}`.
4014pub async fn list_deployment_request_eligible_deployers(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::DeploymentRequestEligibleDeployer>, Error<ListDeploymentRequestEligibleDeployersError>> {
4015    let local_var_configuration = configuration;
4016
4017    let local_var_client = &local_var_configuration.client;
4018
4019    let local_var_uri_str = format!("{}/w/{workspace}/deployment_request/eligible_deployers", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4020    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4021
4022    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4023        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4024    }
4025    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4026        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4027    };
4028
4029    let local_var_req = local_var_req_builder.build()?;
4030    let local_var_resp = local_var_client.execute(local_var_req).await?;
4031
4032    let local_var_status = local_var_resp.status();
4033    let local_var_content = local_var_resp.text().await?;
4034
4035    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4036        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4037    } else {
4038        let local_var_entity: Option<ListDeploymentRequestEligibleDeployersError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4039        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4040        Err(Error::ResponseError(local_var_error))
4041    }
4042}
4043
4044pub async fn list_ducklakes(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<String>, Error<ListDucklakesError>> {
4045    let local_var_configuration = configuration;
4046
4047    let local_var_client = &local_var_configuration.client;
4048
4049    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_ducklakes", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4050    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4051
4052    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4053        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4054    }
4055    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4056        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4057    };
4058
4059    let local_var_req = local_var_req_builder.build()?;
4060    let local_var_resp = local_var_client.execute(local_var_req).await?;
4061
4062    let local_var_status = local_var_resp.status();
4063    let local_var_content = local_var_resp.text().await?;
4064
4065    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4066        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4067    } else {
4068        let local_var_entity: Option<ListDucklakesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4069        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4070        Err(Error::ResponseError(local_var_error))
4071    }
4072}
4073
4074pub async fn list_pending_invites(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::WorkspaceInvite>, Error<ListPendingInvitesError>> {
4075    let local_var_configuration = configuration;
4076
4077    let local_var_client = &local_var_configuration.client;
4078
4079    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_pending_invites", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4080    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4081
4082    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4083        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4084    }
4085    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4086        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4087    };
4088
4089    let local_var_req = local_var_req_builder.build()?;
4090    let local_var_resp = local_var_client.execute(local_var_req).await?;
4091
4092    let local_var_status = local_var_resp.status();
4093    let local_var_content = local_var_resp.text().await?;
4094
4095    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4096        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4097    } else {
4098        let local_var_entity: Option<ListPendingInvitesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4099        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4100        Err(Error::ResponseError(local_var_error))
4101    }
4102}
4103
4104pub async fn list_protection_rules(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::ProtectionRuleset>, Error<ListProtectionRulesError>> {
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}/workspaces/protection_rules", 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<ListProtectionRulesError> = 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_shared_ui(configuration: &configuration::Configuration, workspace: &str) -> Result<models::ListSharedUi200Response, Error<ListSharedUiError>> {
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}/shared_ui/list", 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<ListSharedUiError> = 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_user_workspaces(configuration: &configuration::Configuration, ) -> Result<models::UserWorkspaceList, Error<ListUserWorkspacesError>> {
4165    let local_var_configuration = configuration;
4166
4167    let local_var_client = &local_var_configuration.client;
4168
4169    let local_var_uri_str = format!("{}/workspaces/users", local_var_configuration.base_path);
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<ListUserWorkspacesError> = 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_workspaces(configuration: &configuration::Configuration, ) -> Result<Vec<models::Workspace>, Error<ListWorkspacesError>> {
4195    let local_var_configuration = configuration;
4196
4197    let local_var_client = &local_var_configuration.client;
4198
4199    let local_var_uri_str = format!("{}/workspaces/list", local_var_configuration.base_path);
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<ListWorkspacesError> = 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_workspaces_as_super_admin(configuration: &configuration::Configuration, page: Option<i32>, per_page: Option<i32>) -> Result<Vec<models::Workspace>, Error<ListWorkspacesAsSuperAdminError>> {
4225    let local_var_configuration = configuration;
4226
4227    let local_var_client = &local_var_configuration.client;
4228
4229    let local_var_uri_str = format!("{}/workspaces/list_as_superadmin", local_var_configuration.base_path);
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_str) = page {
4233        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
4234    }
4235    if let Some(ref local_var_str) = per_page {
4236        local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
4237    }
4238    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4239        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4240    }
4241    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4242        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4243    };
4244
4245    let local_var_req = local_var_req_builder.build()?;
4246    let local_var_resp = local_var_client.execute(local_var_req).await?;
4247
4248    let local_var_status = local_var_resp.status();
4249    let local_var_content = local_var_resp.text().await?;
4250
4251    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4252        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4253    } else {
4254        let local_var_entity: Option<ListWorkspacesAsSuperAdminError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4255        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4256        Err(Error::ResponseError(local_var_error))
4257    }
4258}
4259
4260pub async fn list_ws_specific(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::ListWsSpecific200ResponseInner>, Error<ListWsSpecificError>> {
4261    let local_var_configuration = configuration;
4262
4263    let local_var_client = &local_var_configuration.client;
4264
4265    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_ws_specific", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4266    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4267
4268    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4269        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4270    }
4271    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4272        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4273    };
4274
4275    let local_var_req = local_var_req_builder.build()?;
4276    let local_var_resp = local_var_client.execute(local_var_req).await?;
4277
4278    let local_var_status = local_var_resp.status();
4279    let local_var_content = local_var_resp.text().await?;
4280
4281    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4282        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4283    } else {
4284        let local_var_entity: Option<ListWsSpecificError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4285        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4286        Err(Error::ResponseError(local_var_error))
4287    }
4288}
4289
4290pub async fn list_ws_specific_versions(configuration: &configuration::Configuration, workspace: &str, kind: &str, path: &str) -> Result<Vec<String>, Error<ListWsSpecificVersionsError>> {
4291    let local_var_configuration = configuration;
4292
4293    let local_var_client = &local_var_configuration.client;
4294
4295    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_ws_specific_versions", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4296    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4297
4298    local_var_req_builder = local_var_req_builder.query(&[("kind", &kind.to_string())]);
4299    local_var_req_builder = local_var_req_builder.query(&[("path", &path.to_string())]);
4300    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4301        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4302    }
4303    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4304        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4305    };
4306
4307    let local_var_req = local_var_req_builder.build()?;
4308    let local_var_resp = local_var_client.execute(local_var_req).await?;
4309
4310    let local_var_status = local_var_resp.status();
4311    let local_var_content = local_var_resp.text().await?;
4312
4313    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4314        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4315    } else {
4316        let local_var_entity: Option<ListWsSpecificVersionsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4317        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4318        Err(Error::ResponseError(local_var_error))
4319    }
4320}
4321
4322pub async fn log_feature_usage(configuration: &configuration::Configuration, workspace: &str, log_feature_usage_request: models::LogFeatureUsageRequest) -> Result<(), Error<LogFeatureUsageError>> {
4323    let local_var_configuration = configuration;
4324
4325    let local_var_client = &local_var_configuration.client;
4326
4327    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/log_feature_usage", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4328    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4329
4330    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4331        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4332    }
4333    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4334        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4335    };
4336    local_var_req_builder = local_var_req_builder.json(&log_feature_usage_request);
4337
4338    let local_var_req = local_var_req_builder.build()?;
4339    let local_var_resp = local_var_client.execute(local_var_req).await?;
4340
4341    let local_var_status = local_var_resp.status();
4342    let local_var_content = local_var_resp.text().await?;
4343
4344    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4345        Ok(())
4346    } else {
4347        let local_var_entity: Option<LogFeatureUsageError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4348        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4349        Err(Error::ResponseError(local_var_error))
4350    }
4351}
4352
4353pub async fn prune_versions(configuration: &configuration::Configuration, workspace: &str, prune_versions_request: models::PruneVersionsRequest) -> Result<models::PruneVersions200Response, Error<PruneVersionsError>> {
4354    let local_var_configuration = configuration;
4355
4356    let local_var_client = &local_var_configuration.client;
4357
4358    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/prune_versions", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4359    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4360
4361    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4362        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4363    }
4364    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4365        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4366    };
4367    local_var_req_builder = local_var_req_builder.json(&prune_versions_request);
4368
4369    let local_var_req = local_var_req_builder.build()?;
4370    let local_var_resp = local_var_client.execute(local_var_req).await?;
4371
4372    let local_var_status = local_var_resp.status();
4373    let local_var_content = local_var_resp.text().await?;
4374
4375    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4376        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4377    } else {
4378        let local_var_entity: Option<PruneVersionsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4379        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4380        Err(Error::ResponseError(local_var_error))
4381    }
4382}
4383
4384pub async fn rebuild_dependency_map(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<RebuildDependencyMapError>> {
4385    let local_var_configuration = configuration;
4386
4387    let local_var_client = &local_var_configuration.client;
4388
4389    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/rebuild_dependency_map", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4390    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4391
4392    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4393        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4394    }
4395    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4396        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4397    };
4398
4399    let local_var_req = local_var_req_builder.build()?;
4400    let local_var_resp = local_var_client.execute(local_var_req).await?;
4401
4402    let local_var_status = local_var_resp.status();
4403    let local_var_content = local_var_resp.text().await?;
4404
4405    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4406        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4407    } else {
4408        let local_var_entity: Option<RebuildDependencyMapError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4409        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4410        Err(Error::ResponseError(local_var_error))
4411    }
4412}
4413
4414/// This endpoint should be called after a fork deployement
4415pub async fn reset_diff_tally(configuration: &configuration::Configuration, workspace: &str, fork_workspace_id: &str) -> Result<serde_json::Value, Error<ResetDiffTallyError>> {
4416    let local_var_configuration = configuration;
4417
4418    let local_var_client = &local_var_configuration.client;
4419
4420    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));
4421    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4422
4423    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4424        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4425    }
4426    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4427        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4428    };
4429
4430    let local_var_req = local_var_req_builder.build()?;
4431    let local_var_resp = local_var_client.execute(local_var_req).await?;
4432
4433    let local_var_status = local_var_resp.status();
4434    let local_var_content = local_var_resp.text().await?;
4435
4436    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4437        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4438    } else {
4439        let local_var_entity: Option<ResetDiffTallyError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4440        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4441        Err(Error::ResponseError(local_var_error))
4442    }
4443}
4444
4445pub async fn rollback_datatable_migrations(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str, only: Option<i64>) -> Result<models::RollbackDatatableMigrations200Response, Error<RollbackDatatableMigrationsError>> {
4446    let local_var_configuration = configuration;
4447
4448    let local_var_client = &local_var_configuration.client;
4449
4450    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));
4451    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4452
4453    if let Some(ref local_var_str) = only {
4454        local_var_req_builder = local_var_req_builder.query(&[("only", &local_var_str.to_string())]);
4455    }
4456    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4457        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4458    }
4459    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4460        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4461    };
4462
4463    let local_var_req = local_var_req_builder.build()?;
4464    let local_var_resp = local_var_client.execute(local_var_req).await?;
4465
4466    let local_var_status = local_var_resp.status();
4467    let local_var_content = local_var_resp.text().await?;
4468
4469    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4470        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4471    } else {
4472        let local_var_entity: Option<RollbackDatatableMigrationsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4473        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4474        Err(Error::ResponseError(local_var_error))
4475    }
4476}
4477
4478pub 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>> {
4479    let local_var_configuration = configuration;
4480
4481    let local_var_client = &local_var_configuration.client;
4482
4483    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));
4484    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4485
4486    if let Some(ref local_var_str) = up_to {
4487        local_var_req_builder = local_var_req_builder.query(&[("up_to", &local_var_str.to_string())]);
4488    }
4489    if let Some(ref local_var_str) = only {
4490        local_var_req_builder = local_var_req_builder.query(&[("only", &local_var_str.to_string())]);
4491    }
4492    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4493        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4494    }
4495    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4496        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4497    };
4498
4499    let local_var_req = local_var_req_builder.build()?;
4500    let local_var_resp = local_var_client.execute(local_var_req).await?;
4501
4502    let local_var_status = local_var_resp.status();
4503    let local_var_content = local_var_resp.text().await?;
4504
4505    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4506        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4507    } else {
4508        let local_var_entity: Option<RunDatatableMigrationsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4509        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4510        Err(Error::ResponseError(local_var_error))
4511    }
4512}
4513
4514pub 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>> {
4515    let local_var_configuration = configuration;
4516
4517    let local_var_client = &local_var_configuration.client;
4518
4519    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/run_slack_message_test_job", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4520    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4521
4522    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4523        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4524    }
4525    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4526        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4527    };
4528    local_var_req_builder = local_var_req_builder.json(&run_slack_message_test_job_request);
4529
4530    let local_var_req = local_var_req_builder.build()?;
4531    let local_var_resp = local_var_client.execute(local_var_req).await?;
4532
4533    let local_var_status = local_var_resp.status();
4534    let local_var_content = local_var_resp.text().await?;
4535
4536    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4537        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4538    } else {
4539        let local_var_entity: Option<RunSlackMessageTestJobError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4540        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4541        Err(Error::ResponseError(local_var_error))
4542    }
4543}
4544
4545pub 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>> {
4546    let local_var_configuration = configuration;
4547
4548    let local_var_client = &local_var_configuration.client;
4549
4550    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/run_teams_message_test_job", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4551    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4552
4553    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4554        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4555    }
4556    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4557        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4558    };
4559    local_var_req_builder = local_var_req_builder.json(&run_slack_message_test_job_request);
4560
4561    let local_var_req = local_var_req_builder.build()?;
4562    let local_var_resp = local_var_client.execute(local_var_req).await?;
4563
4564    let local_var_status = local_var_resp.status();
4565    let local_var_content = local_var_resp.text().await?;
4566
4567    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4568        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4569    } else {
4570        let local_var_entity: Option<RunTeamsMessageTestJobError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4571        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4572        Err(Error::ResponseError(local_var_error))
4573    }
4574}
4575
4576/// 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.
4577pub async fn seed_full_diff_scan(configuration: &configuration::Configuration, workspace: &str, target_workspace_id: &str) -> Result<models::SeedFullDiffScan200Response, Error<SeedFullDiffScanError>> {
4578    let local_var_configuration = configuration;
4579
4580    let local_var_client = &local_var_configuration.client;
4581
4582    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));
4583    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4584
4585    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4586        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4587    }
4588    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4589        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4590    };
4591
4592    let local_var_req = local_var_req_builder.build()?;
4593    let local_var_resp = local_var_client.execute(local_var_req).await?;
4594
4595    let local_var_status = local_var_resp.status();
4596    let local_var_content = local_var_resp.text().await?;
4597
4598    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4599        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4600    } else {
4601        let local_var_entity: Option<SeedFullDiffScanError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4602        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4603        Err(Error::ResponseError(local_var_error))
4604    }
4605}
4606
4607pub async fn set_environment_variable(configuration: &configuration::Configuration, workspace: &str, set_environment_variable_request: models::SetEnvironmentVariableRequest) -> Result<String, Error<SetEnvironmentVariableError>> {
4608    let local_var_configuration = configuration;
4609
4610    let local_var_client = &local_var_configuration.client;
4611
4612    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/set_environment_variable", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4613    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4614
4615    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4616        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4617    }
4618    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4619        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4620    };
4621    local_var_req_builder = local_var_req_builder.json(&set_environment_variable_request);
4622
4623    let local_var_req = local_var_req_builder.build()?;
4624    let local_var_resp = local_var_client.execute(local_var_req).await?;
4625
4626    let local_var_status = local_var_resp.status();
4627    let local_var_content = local_var_resp.text().await?;
4628
4629    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4630        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4631    } else {
4632        let local_var_entity: Option<SetEnvironmentVariableError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4633        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4634        Err(Error::ResponseError(local_var_error))
4635    }
4636}
4637
4638pub async fn set_threshold_alert(configuration: &configuration::Configuration, workspace: &str, set_threshold_alert_request: models::SetThresholdAlertRequest) -> Result<String, Error<SetThresholdAlertError>> {
4639    let local_var_configuration = configuration;
4640
4641    let local_var_client = &local_var_configuration.client;
4642
4643    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/threshold_alert", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4644    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4645
4646    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4647        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4648    }
4649    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4650        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4651    };
4652    local_var_req_builder = local_var_req_builder.json(&set_threshold_alert_request);
4653
4654    let local_var_req = local_var_req_builder.build()?;
4655    let local_var_resp = local_var_client.execute(local_var_req).await?;
4656
4657    let local_var_status = local_var_resp.status();
4658    let local_var_content = local_var_resp.text().await?;
4659
4660    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4661        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4662    } else {
4663        let local_var_entity: Option<SetThresholdAlertError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4664        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4665        Err(Error::ResponseError(local_var_error))
4666    }
4667}
4668
4669pub async fn set_workspace_encryption_key(configuration: &configuration::Configuration, workspace: &str, set_workspace_encryption_key_request: models::SetWorkspaceEncryptionKeyRequest) -> Result<String, Error<SetWorkspaceEncryptionKeyError>> {
4670    let local_var_configuration = configuration;
4671
4672    let local_var_client = &local_var_configuration.client;
4673
4674    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/encryption_key", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4675    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4676
4677    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4678        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4679    }
4680    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4681        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4682    };
4683    local_var_req_builder = local_var_req_builder.json(&set_workspace_encryption_key_request);
4684
4685    let local_var_req = local_var_req_builder.build()?;
4686    let local_var_resp = local_var_client.execute(local_var_req).await?;
4687
4688    let local_var_status = local_var_resp.status();
4689    let local_var_content = local_var_resp.text().await?;
4690
4691    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4692        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4693    } else {
4694        let local_var_entity: Option<SetWorkspaceEncryptionKeyError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4695        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4696        Err(Error::ResponseError(local_var_error))
4697    }
4698}
4699
4700pub async fn set_workspace_slack_oauth_config(configuration: &configuration::Configuration, workspace: &str, set_workspace_slack_oauth_config_request: models::SetWorkspaceSlackOauthConfigRequest) -> Result<String, Error<SetWorkspaceSlackOauthConfigError>> {
4701    let local_var_configuration = configuration;
4702
4703    let local_var_client = &local_var_configuration.client;
4704
4705    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/slack_oauth_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4706    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4707
4708    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4709        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4710    }
4711    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4712        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4713    };
4714    local_var_req_builder = local_var_req_builder.json(&set_workspace_slack_oauth_config_request);
4715
4716    let local_var_req = local_var_req_builder.build()?;
4717    let local_var_resp = local_var_client.execute(local_var_req).await?;
4718
4719    let local_var_status = local_var_resp.status();
4720    let local_var_content = local_var_resp.text().await?;
4721
4722    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4723        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4724    } else {
4725        let local_var_entity: Option<SetWorkspaceSlackOauthConfigError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4726        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4727        Err(Error::ResponseError(local_var_error))
4728    }
4729}
4730
4731pub async fn set_ws_specific(configuration: &configuration::Configuration, workspace: &str, set_ws_specific_request: models::SetWsSpecificRequest) -> Result<String, Error<SetWsSpecificError>> {
4732    let local_var_configuration = configuration;
4733
4734    let local_var_client = &local_var_configuration.client;
4735
4736    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/set_ws_specific", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4737    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4738
4739    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4740        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4741    }
4742    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4743        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4744    };
4745    local_var_req_builder = local_var_req_builder.json(&set_ws_specific_request);
4746
4747    let local_var_req = local_var_req_builder.build()?;
4748    let local_var_resp = local_var_client.execute(local_var_req).await?;
4749
4750    let local_var_status = local_var_resp.status();
4751    let local_var_content = local_var_resp.text().await?;
4752
4753    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4754        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4755    } else {
4756        let local_var_entity: Option<SetWsSpecificError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4757        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4758        Err(Error::ResponseError(local_var_error))
4759    }
4760}
4761
4762pub async fn test_data_table_connection(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str) -> Result<models::TestDataTableConnection200Response, Error<TestDataTableConnectionError>> {
4763    let local_var_configuration = configuration;
4764
4765    let local_var_client = &local_var_configuration.client;
4766
4767    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));
4768    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4769
4770    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4771        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4772    }
4773    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4774        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4775    };
4776
4777    let local_var_req = local_var_req_builder.build()?;
4778    let local_var_resp = local_var_client.execute(local_var_req).await?;
4779
4780    let local_var_status = local_var_resp.status();
4781    let local_var_content = local_var_resp.text().await?;
4782
4783    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4784        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4785    } else {
4786        let local_var_entity: Option<TestDataTableConnectionError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4787        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4788        Err(Error::ResponseError(local_var_error))
4789    }
4790}
4791
4792pub async fn unarchive_workspace(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<UnarchiveWorkspaceError>> {
4793    let local_var_configuration = configuration;
4794
4795    let local_var_client = &local_var_configuration.client;
4796
4797    let local_var_uri_str = format!("{}/workspaces/unarchive/{workspace}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4798    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4799
4800    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4801        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4802    }
4803    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4804        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4805    };
4806
4807    let local_var_req = local_var_req_builder.build()?;
4808    let local_var_resp = local_var_client.execute(local_var_req).await?;
4809
4810    let local_var_status = local_var_resp.status();
4811    let local_var_content = local_var_resp.text().await?;
4812
4813    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4814        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4815    } else {
4816        let local_var_entity: Option<UnarchiveWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4817        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4818        Err(Error::ResponseError(local_var_error))
4819    }
4820}
4821
4822/// Updates the operator settings for a specific workspace. Requires workspace admin privileges.
4823pub async fn update_operator_settings(configuration: &configuration::Configuration, workspace: &str, operator_settings: Option<models::OperatorSettings>) -> Result<String, Error<UpdateOperatorSettingsError>> {
4824    let local_var_configuration = configuration;
4825
4826    let local_var_client = &local_var_configuration.client;
4827
4828    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/operator_settings", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4829    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4830
4831    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4832        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4833    }
4834    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4835        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4836    };
4837    local_var_req_builder = local_var_req_builder.json(&operator_settings);
4838
4839    let local_var_req = local_var_req_builder.build()?;
4840    let local_var_resp = local_var_client.execute(local_var_req).await?;
4841
4842    let local_var_status = local_var_resp.status();
4843    let local_var_content = local_var_resp.text().await?;
4844
4845    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4846        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4847    } else {
4848        let local_var_entity: Option<UpdateOperatorSettingsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4849        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4850        Err(Error::ResponseError(local_var_error))
4851    }
4852}
4853
4854pub async fn update_protection_rule(configuration: &configuration::Configuration, workspace: &str, rule_name: &str, update_protection_rule_request: models::UpdateProtectionRuleRequest) -> Result<String, Error<UpdateProtectionRuleError>> {
4855    let local_var_configuration = configuration;
4856
4857    let local_var_client = &local_var_configuration.client;
4858
4859    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));
4860    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4861
4862    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4863        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4864    }
4865    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4866        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4867    };
4868    local_var_req_builder = local_var_req_builder.json(&update_protection_rule_request);
4869
4870    let local_var_req = local_var_req_builder.build()?;
4871    let local_var_resp = local_var_client.execute(local_var_req).await?;
4872
4873    let local_var_status = local_var_resp.status();
4874    let local_var_content = local_var_resp.text().await?;
4875
4876    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4877        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4878    } else {
4879        let local_var_entity: Option<UpdateProtectionRuleError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4880        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4881        Err(Error::ResponseError(local_var_error))
4882    }
4883}
4884
4885pub async fn update_shared_ui(configuration: &configuration::Configuration, workspace: &str, update_shared_ui_request: models::UpdateSharedUiRequest) -> Result<String, Error<UpdateSharedUiError>> {
4886    let local_var_configuration = configuration;
4887
4888    let local_var_client = &local_var_configuration.client;
4889
4890    let local_var_uri_str = format!("{}/w/{workspace}/shared_ui", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4891    let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str());
4892
4893    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4894        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4895    }
4896    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4897        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4898    };
4899    local_var_req_builder = local_var_req_builder.json(&update_shared_ui_request);
4900
4901    let local_var_req = local_var_req_builder.build()?;
4902    let local_var_resp = local_var_client.execute(local_var_req).await?;
4903
4904    let local_var_status = local_var_resp.status();
4905    let local_var_content = local_var_resp.text().await?;
4906
4907    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4908        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4909    } else {
4910        let local_var_entity: Option<UpdateSharedUiError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4911        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4912        Err(Error::ResponseError(local_var_error))
4913    }
4914}
4915
4916pub async fn upsert_datatable_migration(configuration: &configuration::Configuration, workspace: &str, datatable_name: &str, upsert_datatable_migration_request: models::UpsertDatatableMigrationRequest) -> Result<String, Error<UpsertDatatableMigrationError>> {
4917    let local_var_configuration = configuration;
4918
4919    let local_var_client = &local_var_configuration.client;
4920
4921    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));
4922    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4923
4924    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4925        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4926    }
4927    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4928        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4929    };
4930    local_var_req_builder = local_var_req_builder.json(&upsert_datatable_migration_request);
4931
4932    let local_var_req = local_var_req_builder.build()?;
4933    let local_var_resp = local_var_client.execute(local_var_req).await?;
4934
4935    let local_var_status = local_var_resp.status();
4936    let local_var_content = local_var_resp.text().await?;
4937
4938    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4939        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4940    } else {
4941        let local_var_entity: Option<UpsertDatatableMigrationError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4942        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4943        Err(Error::ResponseError(local_var_error))
4944    }
4945}
4946