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.542.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 [`change_workspace_color`]
33#[derive(Debug, Clone, Serialize, Deserialize)]
34#[serde(untagged)]
35pub enum ChangeWorkspaceColorError {
36    UnknownValue(serde_json::Value),
37}
38
39/// struct for typed errors of method [`change_workspace_id`]
40#[derive(Debug, Clone, Serialize, Deserialize)]
41#[serde(untagged)]
42pub enum ChangeWorkspaceIdError {
43    UnknownValue(serde_json::Value),
44}
45
46/// struct for typed errors of method [`change_workspace_name`]
47#[derive(Debug, Clone, Serialize, Deserialize)]
48#[serde(untagged)]
49pub enum ChangeWorkspaceNameError {
50    UnknownValue(serde_json::Value),
51}
52
53/// struct for typed errors of method [`connect_teams`]
54#[derive(Debug, Clone, Serialize, Deserialize)]
55#[serde(untagged)]
56pub enum ConnectTeamsError {
57    UnknownValue(serde_json::Value),
58}
59
60/// struct for typed errors of method [`create_workspace`]
61#[derive(Debug, Clone, Serialize, Deserialize)]
62#[serde(untagged)]
63pub enum CreateWorkspaceError {
64    UnknownValue(serde_json::Value),
65}
66
67/// struct for typed errors of method [`create_workspace_fork`]
68#[derive(Debug, Clone, Serialize, Deserialize)]
69#[serde(untagged)]
70pub enum CreateWorkspaceForkError {
71    UnknownValue(serde_json::Value),
72}
73
74/// struct for typed errors of method [`delete_git_sync_repository`]
75#[derive(Debug, Clone, Serialize, Deserialize)]
76#[serde(untagged)]
77pub enum DeleteGitSyncRepositoryError {
78    UnknownValue(serde_json::Value),
79}
80
81/// struct for typed errors of method [`delete_invite`]
82#[derive(Debug, Clone, Serialize, Deserialize)]
83#[serde(untagged)]
84pub enum DeleteInviteError {
85    UnknownValue(serde_json::Value),
86}
87
88/// struct for typed errors of method [`delete_workspace`]
89#[derive(Debug, Clone, Serialize, Deserialize)]
90#[serde(untagged)]
91pub enum DeleteWorkspaceError {
92    UnknownValue(serde_json::Value),
93}
94
95/// struct for typed errors of method [`edit_auto_invite`]
96#[derive(Debug, Clone, Serialize, Deserialize)]
97#[serde(untagged)]
98pub enum EditAutoInviteError {
99    UnknownValue(serde_json::Value),
100}
101
102/// struct for typed errors of method [`edit_copilot_config`]
103#[derive(Debug, Clone, Serialize, Deserialize)]
104#[serde(untagged)]
105pub enum EditCopilotConfigError {
106    UnknownValue(serde_json::Value),
107}
108
109/// struct for typed errors of method [`edit_default_scripts`]
110#[derive(Debug, Clone, Serialize, Deserialize)]
111#[serde(untagged)]
112pub enum EditDefaultScriptsError {
113    UnknownValue(serde_json::Value),
114}
115
116/// struct for typed errors of method [`edit_deploy_to`]
117#[derive(Debug, Clone, Serialize, Deserialize)]
118#[serde(untagged)]
119pub enum EditDeployToError {
120    UnknownValue(serde_json::Value),
121}
122
123/// struct for typed errors of method [`edit_ducklake_config`]
124#[derive(Debug, Clone, Serialize, Deserialize)]
125#[serde(untagged)]
126pub enum EditDucklakeConfigError {
127    UnknownValue(serde_json::Value),
128}
129
130/// struct for typed errors of method [`edit_error_handler`]
131#[derive(Debug, Clone, Serialize, Deserialize)]
132#[serde(untagged)]
133pub enum EditErrorHandlerError {
134    UnknownValue(serde_json::Value),
135}
136
137/// struct for typed errors of method [`edit_git_sync_repository`]
138#[derive(Debug, Clone, Serialize, Deserialize)]
139#[serde(untagged)]
140pub enum EditGitSyncRepositoryError {
141    UnknownValue(serde_json::Value),
142}
143
144/// struct for typed errors of method [`edit_instance_groups`]
145#[derive(Debug, Clone, Serialize, Deserialize)]
146#[serde(untagged)]
147pub enum EditInstanceGroupsError {
148    UnknownValue(serde_json::Value),
149}
150
151/// struct for typed errors of method [`edit_large_file_storage_config`]
152#[derive(Debug, Clone, Serialize, Deserialize)]
153#[serde(untagged)]
154pub enum EditLargeFileStorageConfigError {
155    UnknownValue(serde_json::Value),
156}
157
158/// struct for typed errors of method [`edit_slack_command`]
159#[derive(Debug, Clone, Serialize, Deserialize)]
160#[serde(untagged)]
161pub enum EditSlackCommandError {
162    UnknownValue(serde_json::Value),
163}
164
165/// struct for typed errors of method [`edit_teams_command`]
166#[derive(Debug, Clone, Serialize, Deserialize)]
167#[serde(untagged)]
168pub enum EditTeamsCommandError {
169    UnknownValue(serde_json::Value),
170}
171
172/// struct for typed errors of method [`edit_webhook`]
173#[derive(Debug, Clone, Serialize, Deserialize)]
174#[serde(untagged)]
175pub enum EditWebhookError {
176    UnknownValue(serde_json::Value),
177}
178
179/// struct for typed errors of method [`edit_workspace_default_app`]
180#[derive(Debug, Clone, Serialize, Deserialize)]
181#[serde(untagged)]
182pub enum EditWorkspaceDefaultAppError {
183    UnknownValue(serde_json::Value),
184}
185
186/// struct for typed errors of method [`edit_workspace_deploy_ui_settings`]
187#[derive(Debug, Clone, Serialize, Deserialize)]
188#[serde(untagged)]
189pub enum EditWorkspaceDeployUiSettingsError {
190    UnknownValue(serde_json::Value),
191}
192
193/// struct for typed errors of method [`edit_workspace_git_sync_config`]
194#[derive(Debug, Clone, Serialize, Deserialize)]
195#[serde(untagged)]
196pub enum EditWorkspaceGitSyncConfigError {
197    UnknownValue(serde_json::Value),
198}
199
200/// struct for typed errors of method [`exists_username`]
201#[derive(Debug, Clone, Serialize, Deserialize)]
202#[serde(untagged)]
203pub enum ExistsUsernameError {
204    UnknownValue(serde_json::Value),
205}
206
207/// struct for typed errors of method [`exists_workspace`]
208#[derive(Debug, Clone, Serialize, Deserialize)]
209#[serde(untagged)]
210pub enum ExistsWorkspaceError {
211    UnknownValue(serde_json::Value),
212}
213
214/// struct for typed errors of method [`get_copilot_info`]
215#[derive(Debug, Clone, Serialize, Deserialize)]
216#[serde(untagged)]
217pub enum GetCopilotInfoError {
218    UnknownValue(serde_json::Value),
219}
220
221/// struct for typed errors of method [`get_default_scripts`]
222#[derive(Debug, Clone, Serialize, Deserialize)]
223#[serde(untagged)]
224pub enum GetDefaultScriptsError {
225    UnknownValue(serde_json::Value),
226}
227
228/// struct for typed errors of method [`get_deploy_to`]
229#[derive(Debug, Clone, Serialize, Deserialize)]
230#[serde(untagged)]
231pub enum GetDeployToError {
232    UnknownValue(serde_json::Value),
233}
234
235/// struct for typed errors of method [`get_github_app_token`]
236#[derive(Debug, Clone, Serialize, Deserialize)]
237#[serde(untagged)]
238pub enum GetGithubAppTokenError {
239    UnknownValue(serde_json::Value),
240}
241
242/// struct for typed errors of method [`get_is_premium`]
243#[derive(Debug, Clone, Serialize, Deserialize)]
244#[serde(untagged)]
245pub enum GetIsPremiumError {
246    UnknownValue(serde_json::Value),
247}
248
249/// struct for typed errors of method [`get_large_file_storage_config`]
250#[derive(Debug, Clone, Serialize, Deserialize)]
251#[serde(untagged)]
252pub enum GetLargeFileStorageConfigError {
253    UnknownValue(serde_json::Value),
254}
255
256/// struct for typed errors of method [`get_premium_info`]
257#[derive(Debug, Clone, Serialize, Deserialize)]
258#[serde(untagged)]
259pub enum GetPremiumInfoError {
260    UnknownValue(serde_json::Value),
261}
262
263/// struct for typed errors of method [`get_settings`]
264#[derive(Debug, Clone, Serialize, Deserialize)]
265#[serde(untagged)]
266pub enum GetSettingsError {
267    UnknownValue(serde_json::Value),
268}
269
270/// struct for typed errors of method [`get_threshold_alert`]
271#[derive(Debug, Clone, Serialize, Deserialize)]
272#[serde(untagged)]
273pub enum GetThresholdAlertError {
274    UnknownValue(serde_json::Value),
275}
276
277/// struct for typed errors of method [`get_used_triggers`]
278#[derive(Debug, Clone, Serialize, Deserialize)]
279#[serde(untagged)]
280pub enum GetUsedTriggersError {
281    UnknownValue(serde_json::Value),
282}
283
284/// struct for typed errors of method [`get_workspace_default_app`]
285#[derive(Debug, Clone, Serialize, Deserialize)]
286#[serde(untagged)]
287pub enum GetWorkspaceDefaultAppError {
288    UnknownValue(serde_json::Value),
289}
290
291/// struct for typed errors of method [`get_workspace_encryption_key`]
292#[derive(Debug, Clone, Serialize, Deserialize)]
293#[serde(untagged)]
294pub enum GetWorkspaceEncryptionKeyError {
295    UnknownValue(serde_json::Value),
296}
297
298/// struct for typed errors of method [`get_workspace_name`]
299#[derive(Debug, Clone, Serialize, Deserialize)]
300#[serde(untagged)]
301pub enum GetWorkspaceNameError {
302    UnknownValue(serde_json::Value),
303}
304
305/// struct for typed errors of method [`get_workspace_usage`]
306#[derive(Debug, Clone, Serialize, Deserialize)]
307#[serde(untagged)]
308pub enum GetWorkspaceUsageError {
309    UnknownValue(serde_json::Value),
310}
311
312/// struct for typed errors of method [`invite_user`]
313#[derive(Debug, Clone, Serialize, Deserialize)]
314#[serde(untagged)]
315pub enum InviteUserError {
316    UnknownValue(serde_json::Value),
317}
318
319/// struct for typed errors of method [`is_domain_allowed`]
320#[derive(Debug, Clone, Serialize, Deserialize)]
321#[serde(untagged)]
322pub enum IsDomainAllowedError {
323    UnknownValue(serde_json::Value),
324}
325
326/// struct for typed errors of method [`leave_workspace`]
327#[derive(Debug, Clone, Serialize, Deserialize)]
328#[serde(untagged)]
329pub enum LeaveWorkspaceError {
330    UnknownValue(serde_json::Value),
331}
332
333/// struct for typed errors of method [`list_available_teams_channels`]
334#[derive(Debug, Clone, Serialize, Deserialize)]
335#[serde(untagged)]
336pub enum ListAvailableTeamsChannelsError {
337    UnknownValue(serde_json::Value),
338}
339
340/// struct for typed errors of method [`list_available_teams_ids`]
341#[derive(Debug, Clone, Serialize, Deserialize)]
342#[serde(untagged)]
343pub enum ListAvailableTeamsIdsError {
344    UnknownValue(serde_json::Value),
345}
346
347/// struct for typed errors of method [`list_ducklakes`]
348#[derive(Debug, Clone, Serialize, Deserialize)]
349#[serde(untagged)]
350pub enum ListDucklakesError {
351    UnknownValue(serde_json::Value),
352}
353
354/// struct for typed errors of method [`list_pending_invites`]
355#[derive(Debug, Clone, Serialize, Deserialize)]
356#[serde(untagged)]
357pub enum ListPendingInvitesError {
358    UnknownValue(serde_json::Value),
359}
360
361/// struct for typed errors of method [`list_user_workspaces`]
362#[derive(Debug, Clone, Serialize, Deserialize)]
363#[serde(untagged)]
364pub enum ListUserWorkspacesError {
365    UnknownValue(serde_json::Value),
366}
367
368/// struct for typed errors of method [`list_workspaces`]
369#[derive(Debug, Clone, Serialize, Deserialize)]
370#[serde(untagged)]
371pub enum ListWorkspacesError {
372    UnknownValue(serde_json::Value),
373}
374
375/// struct for typed errors of method [`list_workspaces_as_super_admin`]
376#[derive(Debug, Clone, Serialize, Deserialize)]
377#[serde(untagged)]
378pub enum ListWorkspacesAsSuperAdminError {
379    UnknownValue(serde_json::Value),
380}
381
382/// struct for typed errors of method [`run_slack_message_test_job`]
383#[derive(Debug, Clone, Serialize, Deserialize)]
384#[serde(untagged)]
385pub enum RunSlackMessageTestJobError {
386    UnknownValue(serde_json::Value),
387}
388
389/// struct for typed errors of method [`run_teams_message_test_job`]
390#[derive(Debug, Clone, Serialize, Deserialize)]
391#[serde(untagged)]
392pub enum RunTeamsMessageTestJobError {
393    UnknownValue(serde_json::Value),
394}
395
396/// struct for typed errors of method [`set_environment_variable`]
397#[derive(Debug, Clone, Serialize, Deserialize)]
398#[serde(untagged)]
399pub enum SetEnvironmentVariableError {
400    UnknownValue(serde_json::Value),
401}
402
403/// struct for typed errors of method [`set_threshold_alert`]
404#[derive(Debug, Clone, Serialize, Deserialize)]
405#[serde(untagged)]
406pub enum SetThresholdAlertError {
407    UnknownValue(serde_json::Value),
408}
409
410/// struct for typed errors of method [`set_workspace_encryption_key`]
411#[derive(Debug, Clone, Serialize, Deserialize)]
412#[serde(untagged)]
413pub enum SetWorkspaceEncryptionKeyError {
414    UnknownValue(serde_json::Value),
415}
416
417/// struct for typed errors of method [`unarchive_workspace`]
418#[derive(Debug, Clone, Serialize, Deserialize)]
419#[serde(untagged)]
420pub enum UnarchiveWorkspaceError {
421    UnknownValue(serde_json::Value),
422}
423
424/// struct for typed errors of method [`update_operator_settings`]
425#[derive(Debug, Clone, Serialize, Deserialize)]
426#[serde(untagged)]
427pub enum UpdateOperatorSettingsError {
428    UnknownValue(serde_json::Value),
429}
430
431
432pub async fn add_user(configuration: &configuration::Configuration, workspace: &str, add_user_request: models::AddUserRequest) -> Result<String, Error<AddUserError>> {
433    let local_var_configuration = configuration;
434
435    let local_var_client = &local_var_configuration.client;
436
437    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/add_user", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
438    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
439
440    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
441        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
442    }
443    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
444        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
445    };
446    local_var_req_builder = local_var_req_builder.json(&add_user_request);
447
448    let local_var_req = local_var_req_builder.build()?;
449    let local_var_resp = local_var_client.execute(local_var_req).await?;
450
451    let local_var_status = local_var_resp.status();
452    let local_var_content = local_var_resp.text().await?;
453
454    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
455        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
456    } else {
457        let local_var_entity: Option<AddUserError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
458        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
459        Err(Error::ResponseError(local_var_error))
460    }
461}
462
463pub async fn archive_workspace(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<ArchiveWorkspaceError>> {
464    let local_var_configuration = configuration;
465
466    let local_var_client = &local_var_configuration.client;
467
468    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/archive", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
469    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
470
471    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
472        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
473    }
474    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
475        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
476    };
477
478    let local_var_req = local_var_req_builder.build()?;
479    let local_var_resp = local_var_client.execute(local_var_req).await?;
480
481    let local_var_status = local_var_resp.status();
482    let local_var_content = local_var_resp.text().await?;
483
484    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
485        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
486    } else {
487        let local_var_entity: Option<ArchiveWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
488        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
489        Err(Error::ResponseError(local_var_error))
490    }
491}
492
493pub async fn change_workspace_color(configuration: &configuration::Configuration, workspace: &str, change_workspace_color_request: Option<models::ChangeWorkspaceColorRequest>) -> Result<String, Error<ChangeWorkspaceColorError>> {
494    let local_var_configuration = configuration;
495
496    let local_var_client = &local_var_configuration.client;
497
498    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/change_workspace_color", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
499    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
500
501    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
502        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
503    }
504    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
505        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
506    };
507    local_var_req_builder = local_var_req_builder.json(&change_workspace_color_request);
508
509    let local_var_req = local_var_req_builder.build()?;
510    let local_var_resp = local_var_client.execute(local_var_req).await?;
511
512    let local_var_status = local_var_resp.status();
513    let local_var_content = local_var_resp.text().await?;
514
515    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
516        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
517    } else {
518        let local_var_entity: Option<ChangeWorkspaceColorError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
519        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
520        Err(Error::ResponseError(local_var_error))
521    }
522}
523
524pub async fn change_workspace_id(configuration: &configuration::Configuration, workspace: &str, change_workspace_id_request: Option<models::ChangeWorkspaceIdRequest>) -> Result<String, Error<ChangeWorkspaceIdError>> {
525    let local_var_configuration = configuration;
526
527    let local_var_client = &local_var_configuration.client;
528
529    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/change_workspace_id", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
530    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
531
532    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
533        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
534    }
535    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
536        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
537    };
538    local_var_req_builder = local_var_req_builder.json(&change_workspace_id_request);
539
540    let local_var_req = local_var_req_builder.build()?;
541    let local_var_resp = local_var_client.execute(local_var_req).await?;
542
543    let local_var_status = local_var_resp.status();
544    let local_var_content = local_var_resp.text().await?;
545
546    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
547        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
548    } else {
549        let local_var_entity: Option<ChangeWorkspaceIdError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
550        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
551        Err(Error::ResponseError(local_var_error))
552    }
553}
554
555pub async fn change_workspace_name(configuration: &configuration::Configuration, workspace: &str, change_workspace_name_request: Option<models::ChangeWorkspaceNameRequest>) -> Result<String, Error<ChangeWorkspaceNameError>> {
556    let local_var_configuration = configuration;
557
558    let local_var_client = &local_var_configuration.client;
559
560    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/change_workspace_name", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
561    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
562
563    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
564        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
565    }
566    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
567        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
568    };
569    local_var_req_builder = local_var_req_builder.json(&change_workspace_name_request);
570
571    let local_var_req = local_var_req_builder.build()?;
572    let local_var_resp = local_var_client.execute(local_var_req).await?;
573
574    let local_var_status = local_var_resp.status();
575    let local_var_content = local_var_resp.text().await?;
576
577    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
578        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
579    } else {
580        let local_var_entity: Option<ChangeWorkspaceNameError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
581        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
582        Err(Error::ResponseError(local_var_error))
583    }
584}
585
586pub async fn connect_teams(configuration: &configuration::Configuration, workspace: &str, connect_teams_request: models::ConnectTeamsRequest) -> Result<String, Error<ConnectTeamsError>> {
587    let local_var_configuration = configuration;
588
589    let local_var_client = &local_var_configuration.client;
590
591    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/connect_teams", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
592    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
593
594    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
595        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
596    }
597    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
598        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
599    };
600    local_var_req_builder = local_var_req_builder.json(&connect_teams_request);
601
602    let local_var_req = local_var_req_builder.build()?;
603    let local_var_resp = local_var_client.execute(local_var_req).await?;
604
605    let local_var_status = local_var_resp.status();
606    let local_var_content = local_var_resp.text().await?;
607
608    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
609        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
610    } else {
611        let local_var_entity: Option<ConnectTeamsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
612        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
613        Err(Error::ResponseError(local_var_error))
614    }
615}
616
617pub async fn create_workspace(configuration: &configuration::Configuration, create_workspace: models::CreateWorkspace) -> Result<String, Error<CreateWorkspaceError>> {
618    let local_var_configuration = configuration;
619
620    let local_var_client = &local_var_configuration.client;
621
622    let local_var_uri_str = format!("{}/workspaces/create", local_var_configuration.base_path);
623    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
624
625    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
626        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
627    }
628    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
629        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
630    };
631    local_var_req_builder = local_var_req_builder.json(&create_workspace);
632
633    let local_var_req = local_var_req_builder.build()?;
634    let local_var_resp = local_var_client.execute(local_var_req).await?;
635
636    let local_var_status = local_var_resp.status();
637    let local_var_content = local_var_resp.text().await?;
638
639    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
640        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
641    } else {
642        let local_var_entity: Option<CreateWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
643        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
644        Err(Error::ResponseError(local_var_error))
645    }
646}
647
648pub async fn create_workspace_fork(configuration: &configuration::Configuration, create_workspace_fork: models::CreateWorkspaceFork) -> Result<String, Error<CreateWorkspaceForkError>> {
649    let local_var_configuration = configuration;
650
651    let local_var_client = &local_var_configuration.client;
652
653    let local_var_uri_str = format!("{}/workspaces/create_fork", local_var_configuration.base_path);
654    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
655
656    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
657        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
658    }
659    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
660        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
661    };
662    local_var_req_builder = local_var_req_builder.json(&create_workspace_fork);
663
664    let local_var_req = local_var_req_builder.build()?;
665    let local_var_resp = local_var_client.execute(local_var_req).await?;
666
667    let local_var_status = local_var_resp.status();
668    let local_var_content = local_var_resp.text().await?;
669
670    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
671        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
672    } else {
673        let local_var_entity: Option<CreateWorkspaceForkError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
674        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
675        Err(Error::ResponseError(local_var_error))
676    }
677}
678
679pub async fn delete_git_sync_repository(configuration: &configuration::Configuration, workspace: &str, delete_git_sync_repository_request: models::DeleteGitSyncRepositoryRequest) -> Result<serde_json::Value, Error<DeleteGitSyncRepositoryError>> {
680    let local_var_configuration = configuration;
681
682    let local_var_client = &local_var_configuration.client;
683
684    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/delete_git_sync_repository", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
685    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
686
687    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
688        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
689    }
690    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
691        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
692    };
693    local_var_req_builder = local_var_req_builder.json(&delete_git_sync_repository_request);
694
695    let local_var_req = local_var_req_builder.build()?;
696    let local_var_resp = local_var_client.execute(local_var_req).await?;
697
698    let local_var_status = local_var_resp.status();
699    let local_var_content = local_var_resp.text().await?;
700
701    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
702        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
703    } else {
704        let local_var_entity: Option<DeleteGitSyncRepositoryError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
705        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
706        Err(Error::ResponseError(local_var_error))
707    }
708}
709
710pub async fn delete_invite(configuration: &configuration::Configuration, workspace: &str, delete_invite_request: models::DeleteInviteRequest) -> Result<String, Error<DeleteInviteError>> {
711    let local_var_configuration = configuration;
712
713    let local_var_client = &local_var_configuration.client;
714
715    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/delete_invite", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
716    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
717
718    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
719        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
720    }
721    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
722        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
723    };
724    local_var_req_builder = local_var_req_builder.json(&delete_invite_request);
725
726    let local_var_req = local_var_req_builder.build()?;
727    let local_var_resp = local_var_client.execute(local_var_req).await?;
728
729    let local_var_status = local_var_resp.status();
730    let local_var_content = local_var_resp.text().await?;
731
732    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
733        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
734    } else {
735        let local_var_entity: Option<DeleteInviteError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
736        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
737        Err(Error::ResponseError(local_var_error))
738    }
739}
740
741pub async fn delete_workspace(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<DeleteWorkspaceError>> {
742    let local_var_configuration = configuration;
743
744    let local_var_client = &local_var_configuration.client;
745
746    let local_var_uri_str = format!("{}/workspaces/delete/{workspace}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
747    let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str());
748
749    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
750        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
751    }
752    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
753        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
754    };
755
756    let local_var_req = local_var_req_builder.build()?;
757    let local_var_resp = local_var_client.execute(local_var_req).await?;
758
759    let local_var_status = local_var_resp.status();
760    let local_var_content = local_var_resp.text().await?;
761
762    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
763        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
764    } else {
765        let local_var_entity: Option<DeleteWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
766        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
767        Err(Error::ResponseError(local_var_error))
768    }
769}
770
771pub async fn edit_auto_invite(configuration: &configuration::Configuration, workspace: &str, edit_auto_invite_request: models::EditAutoInviteRequest) -> Result<String, Error<EditAutoInviteError>> {
772    let local_var_configuration = configuration;
773
774    let local_var_client = &local_var_configuration.client;
775
776    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_auto_invite", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
777    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
778
779    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
780        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
781    }
782    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
783        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
784    };
785    local_var_req_builder = local_var_req_builder.json(&edit_auto_invite_request);
786
787    let local_var_req = local_var_req_builder.build()?;
788    let local_var_resp = local_var_client.execute(local_var_req).await?;
789
790    let local_var_status = local_var_resp.status();
791    let local_var_content = local_var_resp.text().await?;
792
793    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
794        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
795    } else {
796        let local_var_entity: Option<EditAutoInviteError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
797        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
798        Err(Error::ResponseError(local_var_error))
799    }
800}
801
802pub async fn edit_copilot_config(configuration: &configuration::Configuration, workspace: &str, ai_config: models::AiConfig) -> Result<String, Error<EditCopilotConfigError>> {
803    let local_var_configuration = configuration;
804
805    let local_var_client = &local_var_configuration.client;
806
807    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_copilot_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
808    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
809
810    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
811        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
812    }
813    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
814        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
815    };
816    local_var_req_builder = local_var_req_builder.json(&ai_config);
817
818    let local_var_req = local_var_req_builder.build()?;
819    let local_var_resp = local_var_client.execute(local_var_req).await?;
820
821    let local_var_status = local_var_resp.status();
822    let local_var_content = local_var_resp.text().await?;
823
824    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
825        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
826    } else {
827        let local_var_entity: Option<EditCopilotConfigError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
828        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
829        Err(Error::ResponseError(local_var_error))
830    }
831}
832
833pub async fn edit_default_scripts(configuration: &configuration::Configuration, workspace: &str, workspace_default_scripts: Option<models::WorkspaceDefaultScripts>) -> Result<String, Error<EditDefaultScriptsError>> {
834    let local_var_configuration = configuration;
835
836    let local_var_client = &local_var_configuration.client;
837
838    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/default_scripts", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
839    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
840
841    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
842        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
843    }
844    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
845        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
846    };
847    local_var_req_builder = local_var_req_builder.json(&workspace_default_scripts);
848
849    let local_var_req = local_var_req_builder.build()?;
850    let local_var_resp = local_var_client.execute(local_var_req).await?;
851
852    let local_var_status = local_var_resp.status();
853    let local_var_content = local_var_resp.text().await?;
854
855    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
856        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
857    } else {
858        let local_var_entity: Option<EditDefaultScriptsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
859        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
860        Err(Error::ResponseError(local_var_error))
861    }
862}
863
864pub async fn edit_deploy_to(configuration: &configuration::Configuration, workspace: &str, get_deploy_to200_response: models::GetDeployTo200Response) -> Result<String, Error<EditDeployToError>> {
865    let local_var_configuration = configuration;
866
867    let local_var_client = &local_var_configuration.client;
868
869    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_deploy_to", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
870    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
871
872    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
873        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
874    }
875    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
876        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
877    };
878    local_var_req_builder = local_var_req_builder.json(&get_deploy_to200_response);
879
880    let local_var_req = local_var_req_builder.build()?;
881    let local_var_resp = local_var_client.execute(local_var_req).await?;
882
883    let local_var_status = local_var_resp.status();
884    let local_var_content = local_var_resp.text().await?;
885
886    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
887        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
888    } else {
889        let local_var_entity: Option<EditDeployToError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
890        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
891        Err(Error::ResponseError(local_var_error))
892    }
893}
894
895pub async fn edit_ducklake_config(configuration: &configuration::Configuration, workspace: &str, edit_ducklake_config_request: models::EditDucklakeConfigRequest) -> Result<serde_json::Value, Error<EditDucklakeConfigError>> {
896    let local_var_configuration = configuration;
897
898    let local_var_client = &local_var_configuration.client;
899
900    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_ducklake_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
901    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
902
903    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
904        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
905    }
906    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
907        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
908    };
909    local_var_req_builder = local_var_req_builder.json(&edit_ducklake_config_request);
910
911    let local_var_req = local_var_req_builder.build()?;
912    let local_var_resp = local_var_client.execute(local_var_req).await?;
913
914    let local_var_status = local_var_resp.status();
915    let local_var_content = local_var_resp.text().await?;
916
917    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
918        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
919    } else {
920        let local_var_entity: Option<EditDucklakeConfigError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
921        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
922        Err(Error::ResponseError(local_var_error))
923    }
924}
925
926pub async fn edit_error_handler(configuration: &configuration::Configuration, workspace: &str, edit_error_handler_request: models::EditErrorHandlerRequest) -> Result<String, Error<EditErrorHandlerError>> {
927    let local_var_configuration = configuration;
928
929    let local_var_client = &local_var_configuration.client;
930
931    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_error_handler", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
932    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
933
934    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
935        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
936    }
937    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
938        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
939    };
940    local_var_req_builder = local_var_req_builder.json(&edit_error_handler_request);
941
942    let local_var_req = local_var_req_builder.build()?;
943    let local_var_resp = local_var_client.execute(local_var_req).await?;
944
945    let local_var_status = local_var_resp.status();
946    let local_var_content = local_var_resp.text().await?;
947
948    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
949        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
950    } else {
951        let local_var_entity: Option<EditErrorHandlerError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
952        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
953        Err(Error::ResponseError(local_var_error))
954    }
955}
956
957pub async fn edit_git_sync_repository(configuration: &configuration::Configuration, workspace: &str, edit_git_sync_repository_request: models::EditGitSyncRepositoryRequest) -> Result<serde_json::Value, Error<EditGitSyncRepositoryError>> {
958    let local_var_configuration = configuration;
959
960    let local_var_client = &local_var_configuration.client;
961
962    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_git_sync_repository", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
963    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
964
965    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
966        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
967    }
968    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
969        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
970    };
971    local_var_req_builder = local_var_req_builder.json(&edit_git_sync_repository_request);
972
973    let local_var_req = local_var_req_builder.build()?;
974    let local_var_resp = local_var_client.execute(local_var_req).await?;
975
976    let local_var_status = local_var_resp.status();
977    let local_var_content = local_var_resp.text().await?;
978
979    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
980        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
981    } else {
982        let local_var_entity: Option<EditGitSyncRepositoryError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
983        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
984        Err(Error::ResponseError(local_var_error))
985    }
986}
987
988pub async fn edit_instance_groups(configuration: &configuration::Configuration, workspace: &str, edit_instance_groups_request: models::EditInstanceGroupsRequest) -> Result<String, Error<EditInstanceGroupsError>> {
989    let local_var_configuration = configuration;
990
991    let local_var_client = &local_var_configuration.client;
992
993    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_instance_groups", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
994    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
995
996    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
997        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
998    }
999    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1000        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1001    };
1002    local_var_req_builder = local_var_req_builder.json(&edit_instance_groups_request);
1003
1004    let local_var_req = local_var_req_builder.build()?;
1005    let local_var_resp = local_var_client.execute(local_var_req).await?;
1006
1007    let local_var_status = local_var_resp.status();
1008    let local_var_content = local_var_resp.text().await?;
1009
1010    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1011        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1012    } else {
1013        let local_var_entity: Option<EditInstanceGroupsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1014        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1015        Err(Error::ResponseError(local_var_error))
1016    }
1017}
1018
1019pub 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>> {
1020    let local_var_configuration = configuration;
1021
1022    let local_var_client = &local_var_configuration.client;
1023
1024    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_large_file_storage_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1025    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1026
1027    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1028        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1029    }
1030    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1031        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1032    };
1033    local_var_req_builder = local_var_req_builder.json(&edit_large_file_storage_config_request);
1034
1035    let local_var_req = local_var_req_builder.build()?;
1036    let local_var_resp = local_var_client.execute(local_var_req).await?;
1037
1038    let local_var_status = local_var_resp.status();
1039    let local_var_content = local_var_resp.text().await?;
1040
1041    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1042        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1043    } else {
1044        let local_var_entity: Option<EditLargeFileStorageConfigError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1045        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1046        Err(Error::ResponseError(local_var_error))
1047    }
1048}
1049
1050pub async fn edit_slack_command(configuration: &configuration::Configuration, workspace: &str, edit_slack_command_request: models::EditSlackCommandRequest) -> Result<String, Error<EditSlackCommandError>> {
1051    let local_var_configuration = configuration;
1052
1053    let local_var_client = &local_var_configuration.client;
1054
1055    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_slack_command", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1056    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1057
1058    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1059        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1060    }
1061    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1062        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1063    };
1064    local_var_req_builder = local_var_req_builder.json(&edit_slack_command_request);
1065
1066    let local_var_req = local_var_req_builder.build()?;
1067    let local_var_resp = local_var_client.execute(local_var_req).await?;
1068
1069    let local_var_status = local_var_resp.status();
1070    let local_var_content = local_var_resp.text().await?;
1071
1072    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1073        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1074    } else {
1075        let local_var_entity: Option<EditSlackCommandError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1076        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1077        Err(Error::ResponseError(local_var_error))
1078    }
1079}
1080
1081pub async fn edit_teams_command(configuration: &configuration::Configuration, workspace: &str, edit_slack_command_request: models::EditSlackCommandRequest) -> Result<String, Error<EditTeamsCommandError>> {
1082    let local_var_configuration = configuration;
1083
1084    let local_var_client = &local_var_configuration.client;
1085
1086    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_teams_command", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1087    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1088
1089    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1090        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1091    }
1092    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1093        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1094    };
1095    local_var_req_builder = local_var_req_builder.json(&edit_slack_command_request);
1096
1097    let local_var_req = local_var_req_builder.build()?;
1098    let local_var_resp = local_var_client.execute(local_var_req).await?;
1099
1100    let local_var_status = local_var_resp.status();
1101    let local_var_content = local_var_resp.text().await?;
1102
1103    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1104        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1105    } else {
1106        let local_var_entity: Option<EditTeamsCommandError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1107        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1108        Err(Error::ResponseError(local_var_error))
1109    }
1110}
1111
1112pub async fn edit_webhook(configuration: &configuration::Configuration, workspace: &str, edit_webhook_request: models::EditWebhookRequest) -> Result<String, Error<EditWebhookError>> {
1113    let local_var_configuration = configuration;
1114
1115    let local_var_client = &local_var_configuration.client;
1116
1117    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_webhook", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1118    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1119
1120    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1121        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1122    }
1123    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1124        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1125    };
1126    local_var_req_builder = local_var_req_builder.json(&edit_webhook_request);
1127
1128    let local_var_req = local_var_req_builder.build()?;
1129    let local_var_resp = local_var_client.execute(local_var_req).await?;
1130
1131    let local_var_status = local_var_resp.status();
1132    let local_var_content = local_var_resp.text().await?;
1133
1134    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1135        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1136    } else {
1137        let local_var_entity: Option<EditWebhookError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1138        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1139        Err(Error::ResponseError(local_var_error))
1140    }
1141}
1142
1143pub async fn edit_workspace_default_app(configuration: &configuration::Configuration, workspace: &str, edit_workspace_default_app_request: models::EditWorkspaceDefaultAppRequest) -> Result<String, Error<EditWorkspaceDefaultAppError>> {
1144    let local_var_configuration = configuration;
1145
1146    let local_var_client = &local_var_configuration.client;
1147
1148    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_default_app", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1149    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1150
1151    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1152        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1153    }
1154    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1155        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1156    };
1157    local_var_req_builder = local_var_req_builder.json(&edit_workspace_default_app_request);
1158
1159    let local_var_req = local_var_req_builder.build()?;
1160    let local_var_resp = local_var_client.execute(local_var_req).await?;
1161
1162    let local_var_status = local_var_resp.status();
1163    let local_var_content = local_var_resp.text().await?;
1164
1165    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1166        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1167    } else {
1168        let local_var_entity: Option<EditWorkspaceDefaultAppError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1169        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1170        Err(Error::ResponseError(local_var_error))
1171    }
1172}
1173
1174pub 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>> {
1175    let local_var_configuration = configuration;
1176
1177    let local_var_client = &local_var_configuration.client;
1178
1179    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_deploy_ui_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1180    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1181
1182    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1183        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1184    }
1185    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1186        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1187    };
1188    local_var_req_builder = local_var_req_builder.json(&edit_workspace_deploy_ui_settings_request);
1189
1190    let local_var_req = local_var_req_builder.build()?;
1191    let local_var_resp = local_var_client.execute(local_var_req).await?;
1192
1193    let local_var_status = local_var_resp.status();
1194    let local_var_content = local_var_resp.text().await?;
1195
1196    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1197        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1198    } else {
1199        let local_var_entity: Option<EditWorkspaceDeployUiSettingsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1200        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1201        Err(Error::ResponseError(local_var_error))
1202    }
1203}
1204
1205pub 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>> {
1206    let local_var_configuration = configuration;
1207
1208    let local_var_client = &local_var_configuration.client;
1209
1210    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/edit_git_sync_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1211    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1212
1213    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1214        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1215    }
1216    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1217        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1218    };
1219    local_var_req_builder = local_var_req_builder.json(&edit_workspace_git_sync_config_request);
1220
1221    let local_var_req = local_var_req_builder.build()?;
1222    let local_var_resp = local_var_client.execute(local_var_req).await?;
1223
1224    let local_var_status = local_var_resp.status();
1225    let local_var_content = local_var_resp.text().await?;
1226
1227    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1228        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1229    } else {
1230        let local_var_entity: Option<EditWorkspaceGitSyncConfigError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1231        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1232        Err(Error::ResponseError(local_var_error))
1233    }
1234}
1235
1236pub async fn exists_username(configuration: &configuration::Configuration, exists_username_request: models::ExistsUsernameRequest) -> Result<bool, Error<ExistsUsernameError>> {
1237    let local_var_configuration = configuration;
1238
1239    let local_var_client = &local_var_configuration.client;
1240
1241    let local_var_uri_str = format!("{}/workspaces/exists_username", local_var_configuration.base_path);
1242    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1243
1244    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1245        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1246    }
1247    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1248        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1249    };
1250    local_var_req_builder = local_var_req_builder.json(&exists_username_request);
1251
1252    let local_var_req = local_var_req_builder.build()?;
1253    let local_var_resp = local_var_client.execute(local_var_req).await?;
1254
1255    let local_var_status = local_var_resp.status();
1256    let local_var_content = local_var_resp.text().await?;
1257
1258    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1259        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1260    } else {
1261        let local_var_entity: Option<ExistsUsernameError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1262        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1263        Err(Error::ResponseError(local_var_error))
1264    }
1265}
1266
1267pub async fn exists_workspace(configuration: &configuration::Configuration, exists_workspace_request: models::ExistsWorkspaceRequest) -> Result<bool, Error<ExistsWorkspaceError>> {
1268    let local_var_configuration = configuration;
1269
1270    let local_var_client = &local_var_configuration.client;
1271
1272    let local_var_uri_str = format!("{}/workspaces/exists", local_var_configuration.base_path);
1273    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1274
1275    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1276        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1277    }
1278    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1279        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1280    };
1281    local_var_req_builder = local_var_req_builder.json(&exists_workspace_request);
1282
1283    let local_var_req = local_var_req_builder.build()?;
1284    let local_var_resp = local_var_client.execute(local_var_req).await?;
1285
1286    let local_var_status = local_var_resp.status();
1287    let local_var_content = local_var_resp.text().await?;
1288
1289    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1290        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1291    } else {
1292        let local_var_entity: Option<ExistsWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1293        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1294        Err(Error::ResponseError(local_var_error))
1295    }
1296}
1297
1298pub async fn get_copilot_info(configuration: &configuration::Configuration, workspace: &str) -> Result<models::AiConfig, Error<GetCopilotInfoError>> {
1299    let local_var_configuration = configuration;
1300
1301    let local_var_client = &local_var_configuration.client;
1302
1303    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_copilot_info", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1304    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1305
1306    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1307        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1308    }
1309    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1310        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1311    };
1312
1313    let local_var_req = local_var_req_builder.build()?;
1314    let local_var_resp = local_var_client.execute(local_var_req).await?;
1315
1316    let local_var_status = local_var_resp.status();
1317    let local_var_content = local_var_resp.text().await?;
1318
1319    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1320        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1321    } else {
1322        let local_var_entity: Option<GetCopilotInfoError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1323        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1324        Err(Error::ResponseError(local_var_error))
1325    }
1326}
1327
1328pub async fn get_default_scripts(configuration: &configuration::Configuration, workspace: &str) -> Result<models::WorkspaceDefaultScripts, Error<GetDefaultScriptsError>> {
1329    let local_var_configuration = configuration;
1330
1331    let local_var_client = &local_var_configuration.client;
1332
1333    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/default_scripts", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1334    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1335
1336    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1337        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1338    }
1339    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1340        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1341    };
1342
1343    let local_var_req = local_var_req_builder.build()?;
1344    let local_var_resp = local_var_client.execute(local_var_req).await?;
1345
1346    let local_var_status = local_var_resp.status();
1347    let local_var_content = local_var_resp.text().await?;
1348
1349    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1350        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1351    } else {
1352        let local_var_entity: Option<GetDefaultScriptsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1353        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1354        Err(Error::ResponseError(local_var_error))
1355    }
1356}
1357
1358pub async fn get_deploy_to(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetDeployTo200Response, Error<GetDeployToError>> {
1359    let local_var_configuration = configuration;
1360
1361    let local_var_client = &local_var_configuration.client;
1362
1363    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_deploy_to", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1364    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1365
1366    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1367        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1368    }
1369    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1370        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1371    };
1372
1373    let local_var_req = local_var_req_builder.build()?;
1374    let local_var_resp = local_var_client.execute(local_var_req).await?;
1375
1376    let local_var_status = local_var_resp.status();
1377    let local_var_content = local_var_resp.text().await?;
1378
1379    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1380        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1381    } else {
1382        let local_var_entity: Option<GetDeployToError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1383        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1384        Err(Error::ResponseError(local_var_error))
1385    }
1386}
1387
1388pub async fn get_github_app_token(configuration: &configuration::Configuration, workspace: &str, get_github_app_token_request: models::GetGithubAppTokenRequest) -> Result<models::GetGithubAppToken200Response, Error<GetGithubAppTokenError>> {
1389    let local_var_configuration = configuration;
1390
1391    let local_var_client = &local_var_configuration.client;
1392
1393    let local_var_uri_str = format!("{}/w/{workspace}/github_app/token", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1394    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1395
1396    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1397        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1398    }
1399    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1400        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1401    };
1402    local_var_req_builder = local_var_req_builder.json(&get_github_app_token_request);
1403
1404    let local_var_req = local_var_req_builder.build()?;
1405    let local_var_resp = local_var_client.execute(local_var_req).await?;
1406
1407    let local_var_status = local_var_resp.status();
1408    let local_var_content = local_var_resp.text().await?;
1409
1410    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1411        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1412    } else {
1413        let local_var_entity: Option<GetGithubAppTokenError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1414        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1415        Err(Error::ResponseError(local_var_error))
1416    }
1417}
1418
1419pub async fn get_is_premium(configuration: &configuration::Configuration, workspace: &str) -> Result<bool, Error<GetIsPremiumError>> {
1420    let local_var_configuration = configuration;
1421
1422    let local_var_client = &local_var_configuration.client;
1423
1424    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/is_premium", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1425    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1426
1427    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1428        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1429    }
1430    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1431        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1432    };
1433
1434    let local_var_req = local_var_req_builder.build()?;
1435    let local_var_resp = local_var_client.execute(local_var_req).await?;
1436
1437    let local_var_status = local_var_resp.status();
1438    let local_var_content = local_var_resp.text().await?;
1439
1440    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1441        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1442    } else {
1443        let local_var_entity: Option<GetIsPremiumError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1444        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1445        Err(Error::ResponseError(local_var_error))
1446    }
1447}
1448
1449pub async fn get_large_file_storage_config(configuration: &configuration::Configuration, workspace: &str) -> Result<models::LargeFileStorage, Error<GetLargeFileStorageConfigError>> {
1450    let local_var_configuration = configuration;
1451
1452    let local_var_client = &local_var_configuration.client;
1453
1454    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_large_file_storage_config", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1455    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1456
1457    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1458        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1459    }
1460    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1461        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1462    };
1463
1464    let local_var_req = local_var_req_builder.build()?;
1465    let local_var_resp = local_var_client.execute(local_var_req).await?;
1466
1467    let local_var_status = local_var_resp.status();
1468    let local_var_content = local_var_resp.text().await?;
1469
1470    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1471        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1472    } else {
1473        let local_var_entity: Option<GetLargeFileStorageConfigError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1474        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1475        Err(Error::ResponseError(local_var_error))
1476    }
1477}
1478
1479pub async fn get_premium_info(configuration: &configuration::Configuration, workspace: &str, skip_subscription_fetch: Option<bool>) -> Result<models::GetPremiumInfo200Response, Error<GetPremiumInfoError>> {
1480    let local_var_configuration = configuration;
1481
1482    let local_var_client = &local_var_configuration.client;
1483
1484    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/premium_info", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1485    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1486
1487    if let Some(ref local_var_str) = skip_subscription_fetch {
1488        local_var_req_builder = local_var_req_builder.query(&[("skip_subscription_fetch", &local_var_str.to_string())]);
1489    }
1490    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1491        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1492    }
1493    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1494        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1495    };
1496
1497    let local_var_req = local_var_req_builder.build()?;
1498    let local_var_resp = local_var_client.execute(local_var_req).await?;
1499
1500    let local_var_status = local_var_resp.status();
1501    let local_var_content = local_var_resp.text().await?;
1502
1503    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1504        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1505    } else {
1506        let local_var_entity: Option<GetPremiumInfoError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1507        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1508        Err(Error::ResponseError(local_var_error))
1509    }
1510}
1511
1512pub async fn get_settings(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetSettings200Response, Error<GetSettingsError>> {
1513    let local_var_configuration = configuration;
1514
1515    let local_var_client = &local_var_configuration.client;
1516
1517    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_settings", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1518    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1519
1520    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1521        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1522    }
1523    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1524        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1525    };
1526
1527    let local_var_req = local_var_req_builder.build()?;
1528    let local_var_resp = local_var_client.execute(local_var_req).await?;
1529
1530    let local_var_status = local_var_resp.status();
1531    let local_var_content = local_var_resp.text().await?;
1532
1533    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1534        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1535    } else {
1536        let local_var_entity: Option<GetSettingsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1537        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1538        Err(Error::ResponseError(local_var_error))
1539    }
1540}
1541
1542pub async fn get_threshold_alert(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetThresholdAlert200Response, Error<GetThresholdAlertError>> {
1543    let local_var_configuration = configuration;
1544
1545    let local_var_client = &local_var_configuration.client;
1546
1547    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/threshold_alert", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1548    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1549
1550    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1551        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1552    }
1553    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1554        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1555    };
1556
1557    let local_var_req = local_var_req_builder.build()?;
1558    let local_var_resp = local_var_client.execute(local_var_req).await?;
1559
1560    let local_var_status = local_var_resp.status();
1561    let local_var_content = local_var_resp.text().await?;
1562
1563    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1564        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1565    } else {
1566        let local_var_entity: Option<GetThresholdAlertError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1567        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1568        Err(Error::ResponseError(local_var_error))
1569    }
1570}
1571
1572pub async fn get_used_triggers(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetUsedTriggers200Response, Error<GetUsedTriggersError>> {
1573    let local_var_configuration = configuration;
1574
1575    let local_var_client = &local_var_configuration.client;
1576
1577    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/used_triggers", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1578    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1579
1580    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1581        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1582    }
1583    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1584        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1585    };
1586
1587    let local_var_req = local_var_req_builder.build()?;
1588    let local_var_resp = local_var_client.execute(local_var_req).await?;
1589
1590    let local_var_status = local_var_resp.status();
1591    let local_var_content = local_var_resp.text().await?;
1592
1593    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1594        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1595    } else {
1596        let local_var_entity: Option<GetUsedTriggersError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1597        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1598        Err(Error::ResponseError(local_var_error))
1599    }
1600}
1601
1602pub async fn get_workspace_default_app(configuration: &configuration::Configuration, workspace: &str) -> Result<models::EditWorkspaceDefaultAppRequest, Error<GetWorkspaceDefaultAppError>> {
1603    let local_var_configuration = configuration;
1604
1605    let local_var_client = &local_var_configuration.client;
1606
1607    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/default_app", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1608    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1609
1610    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1611        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1612    }
1613    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1614        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1615    };
1616
1617    let local_var_req = local_var_req_builder.build()?;
1618    let local_var_resp = local_var_client.execute(local_var_req).await?;
1619
1620    let local_var_status = local_var_resp.status();
1621    let local_var_content = local_var_resp.text().await?;
1622
1623    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1624        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1625    } else {
1626        let local_var_entity: Option<GetWorkspaceDefaultAppError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1627        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1628        Err(Error::ResponseError(local_var_error))
1629    }
1630}
1631
1632pub async fn get_workspace_encryption_key(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetWorkspaceEncryptionKey200Response, Error<GetWorkspaceEncryptionKeyError>> {
1633    let local_var_configuration = configuration;
1634
1635    let local_var_client = &local_var_configuration.client;
1636
1637    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/encryption_key", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1638    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1639
1640    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1641        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1642    }
1643    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1644        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1645    };
1646
1647    let local_var_req = local_var_req_builder.build()?;
1648    let local_var_resp = local_var_client.execute(local_var_req).await?;
1649
1650    let local_var_status = local_var_resp.status();
1651    let local_var_content = local_var_resp.text().await?;
1652
1653    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1654        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1655    } else {
1656        let local_var_entity: Option<GetWorkspaceEncryptionKeyError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1657        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1658        Err(Error::ResponseError(local_var_error))
1659    }
1660}
1661
1662pub async fn get_workspace_name(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<GetWorkspaceNameError>> {
1663    let local_var_configuration = configuration;
1664
1665    let local_var_client = &local_var_configuration.client;
1666
1667    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/get_workspace_name", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1668    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1669
1670    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1671        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1672    }
1673    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1674        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1675    };
1676
1677    let local_var_req = local_var_req_builder.build()?;
1678    let local_var_resp = local_var_client.execute(local_var_req).await?;
1679
1680    let local_var_status = local_var_resp.status();
1681    let local_var_content = local_var_resp.text().await?;
1682
1683    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1684        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1685    } else {
1686        let local_var_entity: Option<GetWorkspaceNameError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1687        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1688        Err(Error::ResponseError(local_var_error))
1689    }
1690}
1691
1692pub async fn get_workspace_usage(configuration: &configuration::Configuration, workspace: &str) -> Result<f64, Error<GetWorkspaceUsageError>> {
1693    let local_var_configuration = configuration;
1694
1695    let local_var_client = &local_var_configuration.client;
1696
1697    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/usage", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1698    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1699
1700    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1701        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1702    }
1703    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1704        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1705    };
1706
1707    let local_var_req = local_var_req_builder.build()?;
1708    let local_var_resp = local_var_client.execute(local_var_req).await?;
1709
1710    let local_var_status = local_var_resp.status();
1711    let local_var_content = local_var_resp.text().await?;
1712
1713    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1714        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1715    } else {
1716        let local_var_entity: Option<GetWorkspaceUsageError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1717        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1718        Err(Error::ResponseError(local_var_error))
1719    }
1720}
1721
1722pub async fn invite_user(configuration: &configuration::Configuration, workspace: &str, invite_user_request: models::InviteUserRequest) -> Result<String, Error<InviteUserError>> {
1723    let local_var_configuration = configuration;
1724
1725    let local_var_client = &local_var_configuration.client;
1726
1727    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/invite_user", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1728    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1729
1730    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1731        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1732    }
1733    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1734        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1735    };
1736    local_var_req_builder = local_var_req_builder.json(&invite_user_request);
1737
1738    let local_var_req = local_var_req_builder.build()?;
1739    let local_var_resp = local_var_client.execute(local_var_req).await?;
1740
1741    let local_var_status = local_var_resp.status();
1742    let local_var_content = local_var_resp.text().await?;
1743
1744    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1745        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1746    } else {
1747        let local_var_entity: Option<InviteUserError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1748        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1749        Err(Error::ResponseError(local_var_error))
1750    }
1751}
1752
1753pub async fn is_domain_allowed(configuration: &configuration::Configuration, ) -> Result<bool, Error<IsDomainAllowedError>> {
1754    let local_var_configuration = configuration;
1755
1756    let local_var_client = &local_var_configuration.client;
1757
1758    let local_var_uri_str = format!("{}/workspaces/allowed_domain_auto_invite", local_var_configuration.base_path);
1759    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1760
1761    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1762        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1763    }
1764    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1765        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1766    };
1767
1768    let local_var_req = local_var_req_builder.build()?;
1769    let local_var_resp = local_var_client.execute(local_var_req).await?;
1770
1771    let local_var_status = local_var_resp.status();
1772    let local_var_content = local_var_resp.text().await?;
1773
1774    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1775        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1776    } else {
1777        let local_var_entity: Option<IsDomainAllowedError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1778        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1779        Err(Error::ResponseError(local_var_error))
1780    }
1781}
1782
1783pub async fn leave_workspace(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<LeaveWorkspaceError>> {
1784    let local_var_configuration = configuration;
1785
1786    let local_var_client = &local_var_configuration.client;
1787
1788    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/leave", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1789    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1790
1791    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1792        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1793    }
1794    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1795        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1796    };
1797
1798    let local_var_req = local_var_req_builder.build()?;
1799    let local_var_resp = local_var_client.execute(local_var_req).await?;
1800
1801    let local_var_status = local_var_resp.status();
1802    let local_var_content = local_var_resp.text().await?;
1803
1804    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1805        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1806    } else {
1807        let local_var_entity: Option<LeaveWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1808        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1809        Err(Error::ResponseError(local_var_error))
1810    }
1811}
1812
1813pub async fn list_available_teams_channels(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::ListAvailableTeamsChannels200ResponseInner>, Error<ListAvailableTeamsChannelsError>> {
1814    let local_var_configuration = configuration;
1815
1816    let local_var_client = &local_var_configuration.client;
1817
1818    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/available_teams_channels", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1819    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1820
1821    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1822        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1823    }
1824    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1825        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1826    };
1827
1828    let local_var_req = local_var_req_builder.build()?;
1829    let local_var_resp = local_var_client.execute(local_var_req).await?;
1830
1831    let local_var_status = local_var_resp.status();
1832    let local_var_content = local_var_resp.text().await?;
1833
1834    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1835        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1836    } else {
1837        let local_var_entity: Option<ListAvailableTeamsChannelsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1838        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1839        Err(Error::ResponseError(local_var_error))
1840    }
1841}
1842
1843pub async fn list_available_teams_ids(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::ListAvailableTeamsIds200ResponseInner>, Error<ListAvailableTeamsIdsError>> {
1844    let local_var_configuration = configuration;
1845
1846    let local_var_client = &local_var_configuration.client;
1847
1848    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/available_teams_ids", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1849    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1850
1851    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1852        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1853    }
1854    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1855        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1856    };
1857
1858    let local_var_req = local_var_req_builder.build()?;
1859    let local_var_resp = local_var_client.execute(local_var_req).await?;
1860
1861    let local_var_status = local_var_resp.status();
1862    let local_var_content = local_var_resp.text().await?;
1863
1864    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1865        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1866    } else {
1867        let local_var_entity: Option<ListAvailableTeamsIdsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1868        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1869        Err(Error::ResponseError(local_var_error))
1870    }
1871}
1872
1873pub async fn list_ducklakes(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<String>, Error<ListDucklakesError>> {
1874    let local_var_configuration = configuration;
1875
1876    let local_var_client = &local_var_configuration.client;
1877
1878    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_ducklakes", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1879    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1880
1881    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1882        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1883    }
1884    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1885        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1886    };
1887
1888    let local_var_req = local_var_req_builder.build()?;
1889    let local_var_resp = local_var_client.execute(local_var_req).await?;
1890
1891    let local_var_status = local_var_resp.status();
1892    let local_var_content = local_var_resp.text().await?;
1893
1894    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1895        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1896    } else {
1897        let local_var_entity: Option<ListDucklakesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1898        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1899        Err(Error::ResponseError(local_var_error))
1900    }
1901}
1902
1903pub async fn list_pending_invites(configuration: &configuration::Configuration, workspace: &str) -> Result<Vec<models::WorkspaceInvite>, Error<ListPendingInvitesError>> {
1904    let local_var_configuration = configuration;
1905
1906    let local_var_client = &local_var_configuration.client;
1907
1908    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/list_pending_invites", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1909    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1910
1911    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1912        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1913    }
1914    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1915        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1916    };
1917
1918    let local_var_req = local_var_req_builder.build()?;
1919    let local_var_resp = local_var_client.execute(local_var_req).await?;
1920
1921    let local_var_status = local_var_resp.status();
1922    let local_var_content = local_var_resp.text().await?;
1923
1924    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1925        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1926    } else {
1927        let local_var_entity: Option<ListPendingInvitesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1928        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1929        Err(Error::ResponseError(local_var_error))
1930    }
1931}
1932
1933pub async fn list_user_workspaces(configuration: &configuration::Configuration, ) -> Result<models::UserWorkspaceList, Error<ListUserWorkspacesError>> {
1934    let local_var_configuration = configuration;
1935
1936    let local_var_client = &local_var_configuration.client;
1937
1938    let local_var_uri_str = format!("{}/workspaces/users", local_var_configuration.base_path);
1939    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1940
1941    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1942        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1943    }
1944    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1945        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1946    };
1947
1948    let local_var_req = local_var_req_builder.build()?;
1949    let local_var_resp = local_var_client.execute(local_var_req).await?;
1950
1951    let local_var_status = local_var_resp.status();
1952    let local_var_content = local_var_resp.text().await?;
1953
1954    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1955        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1956    } else {
1957        let local_var_entity: Option<ListUserWorkspacesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1958        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1959        Err(Error::ResponseError(local_var_error))
1960    }
1961}
1962
1963pub async fn list_workspaces(configuration: &configuration::Configuration, ) -> Result<Vec<models::Workspace>, Error<ListWorkspacesError>> {
1964    let local_var_configuration = configuration;
1965
1966    let local_var_client = &local_var_configuration.client;
1967
1968    let local_var_uri_str = format!("{}/workspaces/list", local_var_configuration.base_path);
1969    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1970
1971    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1972        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1973    }
1974    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1975        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1976    };
1977
1978    let local_var_req = local_var_req_builder.build()?;
1979    let local_var_resp = local_var_client.execute(local_var_req).await?;
1980
1981    let local_var_status = local_var_resp.status();
1982    let local_var_content = local_var_resp.text().await?;
1983
1984    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1985        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1986    } else {
1987        let local_var_entity: Option<ListWorkspacesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1988        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1989        Err(Error::ResponseError(local_var_error))
1990    }
1991}
1992
1993pub async fn list_workspaces_as_super_admin(configuration: &configuration::Configuration, page: Option<i32>, per_page: Option<i32>) -> Result<Vec<models::Workspace>, Error<ListWorkspacesAsSuperAdminError>> {
1994    let local_var_configuration = configuration;
1995
1996    let local_var_client = &local_var_configuration.client;
1997
1998    let local_var_uri_str = format!("{}/workspaces/list_as_superadmin", local_var_configuration.base_path);
1999    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2000
2001    if let Some(ref local_var_str) = page {
2002        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
2003    }
2004    if let Some(ref local_var_str) = per_page {
2005        local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
2006    }
2007    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2008        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2009    }
2010    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2011        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2012    };
2013
2014    let local_var_req = local_var_req_builder.build()?;
2015    let local_var_resp = local_var_client.execute(local_var_req).await?;
2016
2017    let local_var_status = local_var_resp.status();
2018    let local_var_content = local_var_resp.text().await?;
2019
2020    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2021        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2022    } else {
2023        let local_var_entity: Option<ListWorkspacesAsSuperAdminError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2024        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2025        Err(Error::ResponseError(local_var_error))
2026    }
2027}
2028
2029pub async fn run_slack_message_test_job(configuration: &configuration::Configuration, workspace: &str, run_slack_message_test_job_request: models::RunSlackMessageTestJobRequest) -> Result<models::RunSlackMessageTestJob200Response, Error<RunSlackMessageTestJobError>> {
2030    let local_var_configuration = configuration;
2031
2032    let local_var_client = &local_var_configuration.client;
2033
2034    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/run_slack_message_test_job", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2035    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2036
2037    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2038        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2039    }
2040    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2041        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2042    };
2043    local_var_req_builder = local_var_req_builder.json(&run_slack_message_test_job_request);
2044
2045    let local_var_req = local_var_req_builder.build()?;
2046    let local_var_resp = local_var_client.execute(local_var_req).await?;
2047
2048    let local_var_status = local_var_resp.status();
2049    let local_var_content = local_var_resp.text().await?;
2050
2051    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2052        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2053    } else {
2054        let local_var_entity: Option<RunSlackMessageTestJobError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2055        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2056        Err(Error::ResponseError(local_var_error))
2057    }
2058}
2059
2060pub async fn run_teams_message_test_job(configuration: &configuration::Configuration, workspace: &str, run_slack_message_test_job_request: models::RunSlackMessageTestJobRequest) -> Result<models::RunSlackMessageTestJob200Response, Error<RunTeamsMessageTestJobError>> {
2061    let local_var_configuration = configuration;
2062
2063    let local_var_client = &local_var_configuration.client;
2064
2065    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/run_teams_message_test_job", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2066    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2067
2068    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2069        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2070    }
2071    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2072        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2073    };
2074    local_var_req_builder = local_var_req_builder.json(&run_slack_message_test_job_request);
2075
2076    let local_var_req = local_var_req_builder.build()?;
2077    let local_var_resp = local_var_client.execute(local_var_req).await?;
2078
2079    let local_var_status = local_var_resp.status();
2080    let local_var_content = local_var_resp.text().await?;
2081
2082    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2083        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2084    } else {
2085        let local_var_entity: Option<RunTeamsMessageTestJobError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2086        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2087        Err(Error::ResponseError(local_var_error))
2088    }
2089}
2090
2091pub async fn set_environment_variable(configuration: &configuration::Configuration, workspace: &str, set_environment_variable_request: models::SetEnvironmentVariableRequest) -> Result<String, Error<SetEnvironmentVariableError>> {
2092    let local_var_configuration = configuration;
2093
2094    let local_var_client = &local_var_configuration.client;
2095
2096    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/set_environment_variable", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2097    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2098
2099    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2100        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2101    }
2102    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2103        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2104    };
2105    local_var_req_builder = local_var_req_builder.json(&set_environment_variable_request);
2106
2107    let local_var_req = local_var_req_builder.build()?;
2108    let local_var_resp = local_var_client.execute(local_var_req).await?;
2109
2110    let local_var_status = local_var_resp.status();
2111    let local_var_content = local_var_resp.text().await?;
2112
2113    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2114        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2115    } else {
2116        let local_var_entity: Option<SetEnvironmentVariableError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2117        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2118        Err(Error::ResponseError(local_var_error))
2119    }
2120}
2121
2122pub async fn set_threshold_alert(configuration: &configuration::Configuration, workspace: &str, set_threshold_alert_request: models::SetThresholdAlertRequest) -> Result<String, Error<SetThresholdAlertError>> {
2123    let local_var_configuration = configuration;
2124
2125    let local_var_client = &local_var_configuration.client;
2126
2127    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/threshold_alert", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2128    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2129
2130    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2131        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2132    }
2133    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2134        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2135    };
2136    local_var_req_builder = local_var_req_builder.json(&set_threshold_alert_request);
2137
2138    let local_var_req = local_var_req_builder.build()?;
2139    let local_var_resp = local_var_client.execute(local_var_req).await?;
2140
2141    let local_var_status = local_var_resp.status();
2142    let local_var_content = local_var_resp.text().await?;
2143
2144    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2145        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2146    } else {
2147        let local_var_entity: Option<SetThresholdAlertError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2148        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2149        Err(Error::ResponseError(local_var_error))
2150    }
2151}
2152
2153pub async fn set_workspace_encryption_key(configuration: &configuration::Configuration, workspace: &str, set_workspace_encryption_key_request: models::SetWorkspaceEncryptionKeyRequest) -> Result<String, Error<SetWorkspaceEncryptionKeyError>> {
2154    let local_var_configuration = configuration;
2155
2156    let local_var_client = &local_var_configuration.client;
2157
2158    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/encryption_key", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2159    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2160
2161    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2162        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2163    }
2164    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2165        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2166    };
2167    local_var_req_builder = local_var_req_builder.json(&set_workspace_encryption_key_request);
2168
2169    let local_var_req = local_var_req_builder.build()?;
2170    let local_var_resp = local_var_client.execute(local_var_req).await?;
2171
2172    let local_var_status = local_var_resp.status();
2173    let local_var_content = local_var_resp.text().await?;
2174
2175    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2176        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2177    } else {
2178        let local_var_entity: Option<SetWorkspaceEncryptionKeyError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2179        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2180        Err(Error::ResponseError(local_var_error))
2181    }
2182}
2183
2184pub async fn unarchive_workspace(configuration: &configuration::Configuration, workspace: &str) -> Result<String, Error<UnarchiveWorkspaceError>> {
2185    let local_var_configuration = configuration;
2186
2187    let local_var_client = &local_var_configuration.client;
2188
2189    let local_var_uri_str = format!("{}/workspaces/unarchive/{workspace}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2190    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2191
2192    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2193        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2194    }
2195    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2196        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2197    };
2198
2199    let local_var_req = local_var_req_builder.build()?;
2200    let local_var_resp = local_var_client.execute(local_var_req).await?;
2201
2202    let local_var_status = local_var_resp.status();
2203    let local_var_content = local_var_resp.text().await?;
2204
2205    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2206        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2207    } else {
2208        let local_var_entity: Option<UnarchiveWorkspaceError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2209        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2210        Err(Error::ResponseError(local_var_error))
2211    }
2212}
2213
2214/// Updates the operator settings for a specific workspace. Requires workspace admin privileges.
2215pub async fn update_operator_settings(configuration: &configuration::Configuration, workspace: &str, operator_settings: Option<models::OperatorSettings>) -> Result<String, Error<UpdateOperatorSettingsError>> {
2216    let local_var_configuration = configuration;
2217
2218    let local_var_client = &local_var_configuration.client;
2219
2220    let local_var_uri_str = format!("{}/w/{workspace}/workspaces/operator_settings", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2221    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2222
2223    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2224        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2225    }
2226    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2227        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2228    };
2229    local_var_req_builder = local_var_req_builder.json(&operator_settings);
2230
2231    let local_var_req = local_var_req_builder.build()?;
2232    let local_var_resp = local_var_client.execute(local_var_req).await?;
2233
2234    let local_var_status = local_var_resp.status();
2235    let local_var_content = local_var_resp.text().await?;
2236
2237    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2238        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2239    } else {
2240        let local_var_entity: Option<UpdateOperatorSettingsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2241        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2242        Err(Error::ResponseError(local_var_error))
2243    }
2244}
2245