1use reqwest;
13use serde::{Deserialize, Serialize};
14use crate::{apis::ResponseContent, models};
15use super::{Error, configuration};
16
17
18#[derive(Debug, Clone, Serialize, Deserialize)]
20#[serde(untagged)]
21pub enum BatchReRunJobsError {
22 UnknownValue(serde_json::Value),
23}
24
25#[derive(Debug, Clone, Serialize, Deserialize)]
27#[serde(untagged)]
28pub enum CancelPersistentQueuedJobsError {
29 UnknownValue(serde_json::Value),
30}
31
32#[derive(Debug, Clone, Serialize, Deserialize)]
34#[serde(untagged)]
35pub enum CancelQueuedJobError {
36 UnknownValue(serde_json::Value),
37}
38
39#[derive(Debug, Clone, Serialize, Deserialize)]
41#[serde(untagged)]
42pub enum CancelSelectionError {
43 UnknownValue(serde_json::Value),
44}
45
46#[derive(Debug, Clone, Serialize, Deserialize)]
48#[serde(untagged)]
49pub enum CancelSuspendedJobGetError {
50 UnknownValue(serde_json::Value),
51}
52
53#[derive(Debug, Clone, Serialize, Deserialize)]
55#[serde(untagged)]
56pub enum CancelSuspendedJobPostError {
57 UnknownValue(serde_json::Value),
58}
59
60#[derive(Debug, Clone, Serialize, Deserialize)]
62#[serde(untagged)]
63pub enum CountCompletedJobsError {
64 UnknownValue(serde_json::Value),
65}
66
67#[derive(Debug, Clone, Serialize, Deserialize)]
69#[serde(untagged)]
70pub enum CountJobsByTagError {
71 UnknownValue(serde_json::Value),
72}
73
74#[derive(Debug, Clone, Serialize, Deserialize)]
76#[serde(untagged)]
77pub enum CreateJobSignatureError {
78 UnknownValue(serde_json::Value),
79}
80
81#[derive(Debug, Clone, Serialize, Deserialize)]
83#[serde(untagged)]
84pub enum DeleteCompletedJobError {
85 UnknownValue(serde_json::Value),
86}
87
88#[derive(Debug, Clone, Serialize, Deserialize)]
90#[serde(untagged)]
91pub enum ForceCancelQueuedJobError {
92 UnknownValue(serde_json::Value),
93}
94
95#[derive(Debug, Clone, Serialize, Deserialize)]
97#[serde(untagged)]
98pub enum GetCompletedCountError {
99 UnknownValue(serde_json::Value),
100}
101
102#[derive(Debug, Clone, Serialize, Deserialize)]
104#[serde(untagged)]
105pub enum GetCompletedJobError {
106 UnknownValue(serde_json::Value),
107}
108
109#[derive(Debug, Clone, Serialize, Deserialize)]
111#[serde(untagged)]
112pub enum GetCompletedJobLogsTailError {
113 UnknownValue(serde_json::Value),
114}
115
116#[derive(Debug, Clone, Serialize, Deserialize)]
118#[serde(untagged)]
119pub enum GetCompletedJobResultError {
120 UnknownValue(serde_json::Value),
121}
122
123#[derive(Debug, Clone, Serialize, Deserialize)]
125#[serde(untagged)]
126pub enum GetCompletedJobResultMaybeError {
127 UnknownValue(serde_json::Value),
128}
129
130#[derive(Debug, Clone, Serialize, Deserialize)]
132#[serde(untagged)]
133pub enum GetDbClockError {
134 UnknownValue(serde_json::Value),
135}
136
137#[derive(Debug, Clone, Serialize, Deserialize)]
139#[serde(untagged)]
140pub enum GetFlowDebugInfoError {
141 UnknownValue(serde_json::Value),
142}
143
144#[derive(Debug, Clone, Serialize, Deserialize)]
146#[serde(untagged)]
147pub enum GetFlowUserStateError {
148 UnknownValue(serde_json::Value),
149}
150
151#[derive(Debug, Clone, Serialize, Deserialize)]
153#[serde(untagged)]
154pub enum GetJobError {
155 UnknownValue(serde_json::Value),
156}
157
158#[derive(Debug, Clone, Serialize, Deserialize)]
160#[serde(untagged)]
161pub enum GetJobArgsError {
162 UnknownValue(serde_json::Value),
163}
164
165#[derive(Debug, Clone, Serialize, Deserialize)]
167#[serde(untagged)]
168pub enum GetJobLogsError {
169 UnknownValue(serde_json::Value),
170}
171
172#[derive(Debug, Clone, Serialize, Deserialize)]
174#[serde(untagged)]
175pub enum GetJobUpdatesError {
176 UnknownValue(serde_json::Value),
177}
178
179#[derive(Debug, Clone, Serialize, Deserialize)]
181#[serde(untagged)]
182pub enum GetJobUpdatesSseError {
183 UnknownValue(serde_json::Value),
184}
185
186#[derive(Debug, Clone, Serialize, Deserialize)]
188#[serde(untagged)]
189pub enum GetLogFileFromStoreError {
190 UnknownValue(serde_json::Value),
191}
192
193#[derive(Debug, Clone, Serialize, Deserialize)]
195#[serde(untagged)]
196pub enum GetQueueCountError {
197 UnknownValue(serde_json::Value),
198}
199
200#[derive(Debug, Clone, Serialize, Deserialize)]
202#[serde(untagged)]
203pub enum GetQueuePositionError {
204 UnknownValue(serde_json::Value),
205}
206
207#[derive(Debug, Clone, Serialize, Deserialize)]
209#[serde(untagged)]
210pub enum GetResumeUrlsError {
211 UnknownValue(serde_json::Value),
212}
213
214#[derive(Debug, Clone, Serialize, Deserialize)]
216#[serde(untagged)]
217pub enum GetRootJobIdError {
218 UnknownValue(serde_json::Value),
219}
220
221#[derive(Debug, Clone, Serialize, Deserialize)]
223#[serde(untagged)]
224pub enum GetScheduledForError {
225 UnknownValue(serde_json::Value),
226}
227
228#[derive(Debug, Clone, Serialize, Deserialize)]
230#[serde(untagged)]
231pub enum GetSlackApprovalPayloadError {
232 UnknownValue(serde_json::Value),
233}
234
235#[derive(Debug, Clone, Serialize, Deserialize)]
237#[serde(untagged)]
238pub enum GetStartedAtByIdsError {
239 UnknownValue(serde_json::Value),
240}
241
242#[derive(Debug, Clone, Serialize, Deserialize)]
244#[serde(untagged)]
245pub enum GetSuspendedJobFlowError {
246 UnknownValue(serde_json::Value),
247}
248
249#[derive(Debug, Clone, Serialize, Deserialize)]
251#[serde(untagged)]
252pub enum GetTeamsApprovalPayloadError {
253 UnknownValue(serde_json::Value),
254}
255
256#[derive(Debug, Clone, Serialize, Deserialize)]
258#[serde(untagged)]
259pub enum ListCompletedJobsError {
260 UnknownValue(serde_json::Value),
261}
262
263#[derive(Debug, Clone, Serialize, Deserialize)]
265#[serde(untagged)]
266pub enum ListExtendedJobsError {
267 UnknownValue(serde_json::Value),
268}
269
270#[derive(Debug, Clone, Serialize, Deserialize)]
272#[serde(untagged)]
273pub enum ListFilteredJobsUuidsError {
274 UnknownValue(serde_json::Value),
275}
276
277#[derive(Debug, Clone, Serialize, Deserialize)]
279#[serde(untagged)]
280pub enum ListFilteredQueueUuidsError {
281 UnknownValue(serde_json::Value),
282}
283
284#[derive(Debug, Clone, Serialize, Deserialize)]
286#[serde(untagged)]
287pub enum ListJobsError {
288 UnknownValue(serde_json::Value),
289}
290
291#[derive(Debug, Clone, Serialize, Deserialize)]
293#[serde(untagged)]
294pub enum ListQueueError {
295 UnknownValue(serde_json::Value),
296}
297
298#[derive(Debug, Clone, Serialize, Deserialize)]
300#[serde(untagged)]
301pub enum ListSelectedJobGroupsError {
302 UnknownValue(serde_json::Value),
303}
304
305#[derive(Debug, Clone, Serialize, Deserialize)]
307#[serde(untagged)]
308pub enum RestartFlowAtStepError {
309 UnknownValue(serde_json::Value),
310}
311
312#[derive(Debug, Clone, Serialize, Deserialize)]
314#[serde(untagged)]
315pub enum ResultByIdError {
316 UnknownValue(serde_json::Value),
317}
318
319#[derive(Debug, Clone, Serialize, Deserialize)]
321#[serde(untagged)]
322pub enum ResumeSuspendedFlowAsOwnerError {
323 UnknownValue(serde_json::Value),
324}
325
326#[derive(Debug, Clone, Serialize, Deserialize)]
328#[serde(untagged)]
329pub enum ResumeSuspendedJobGetError {
330 UnknownValue(serde_json::Value),
331}
332
333#[derive(Debug, Clone, Serialize, Deserialize)]
335#[serde(untagged)]
336pub enum ResumeSuspendedJobPostError {
337 UnknownValue(serde_json::Value),
338}
339
340#[derive(Debug, Clone, Serialize, Deserialize)]
342#[serde(untagged)]
343pub enum RunCodeWorkflowTaskError {
344 UnknownValue(serde_json::Value),
345}
346
347#[derive(Debug, Clone, Serialize, Deserialize)]
349#[serde(untagged)]
350pub enum RunDynamicSelectError {
351 UnknownValue(serde_json::Value),
352}
353
354#[derive(Debug, Clone, Serialize, Deserialize)]
356#[serde(untagged)]
357pub enum RunFlowByPathError {
358 UnknownValue(serde_json::Value),
359}
360
361#[derive(Debug, Clone, Serialize, Deserialize)]
363#[serde(untagged)]
364pub enum RunFlowPreviewError {
365 UnknownValue(serde_json::Value),
366}
367
368#[derive(Debug, Clone, Serialize, Deserialize)]
370#[serde(untagged)]
371pub enum RunFlowPreviewAndWaitResultError {
372 UnknownValue(serde_json::Value),
373}
374
375#[derive(Debug, Clone, Serialize, Deserialize)]
377#[serde(untagged)]
378pub enum RunRawScriptDependenciesError {
379 UnknownValue(serde_json::Value),
380}
381
382#[derive(Debug, Clone, Serialize, Deserialize)]
384#[serde(untagged)]
385pub enum RunScriptByHashError {
386 UnknownValue(serde_json::Value),
387}
388
389#[derive(Debug, Clone, Serialize, Deserialize)]
391#[serde(untagged)]
392pub enum RunScriptByPathError {
393 UnknownValue(serde_json::Value),
394}
395
396#[derive(Debug, Clone, Serialize, Deserialize)]
398#[serde(untagged)]
399pub enum RunScriptPreviewError {
400 UnknownValue(serde_json::Value),
401}
402
403#[derive(Debug, Clone, Serialize, Deserialize)]
405#[serde(untagged)]
406pub enum RunScriptPreviewAndWaitResultError {
407 UnknownValue(serde_json::Value),
408}
409
410#[derive(Debug, Clone, Serialize, Deserialize)]
412#[serde(untagged)]
413pub enum RunWaitResultFlowByPathError {
414 UnknownValue(serde_json::Value),
415}
416
417#[derive(Debug, Clone, Serialize, Deserialize)]
419#[serde(untagged)]
420pub enum RunWaitResultScriptByPathError {
421 UnknownValue(serde_json::Value),
422}
423
424#[derive(Debug, Clone, Serialize, Deserialize)]
426#[serde(untagged)]
427pub enum RunWaitResultScriptByPathGetError {
428 UnknownValue(serde_json::Value),
429}
430
431#[derive(Debug, Clone, Serialize, Deserialize)]
433#[serde(untagged)]
434pub enum SetFlowUserStateError {
435 UnknownValue(serde_json::Value),
436}
437
438
439pub async fn batch_re_run_jobs(configuration: &configuration::Configuration, workspace: &str, batch_re_run_jobs_request: models::BatchReRunJobsRequest) -> Result<String, Error<BatchReRunJobsError>> {
440 let local_var_configuration = configuration;
441
442 let local_var_client = &local_var_configuration.client;
443
444 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/batch_rerun_jobs", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
445 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
446
447 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
448 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
449 }
450 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
451 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
452 };
453 local_var_req_builder = local_var_req_builder.json(&batch_re_run_jobs_request);
454
455 let local_var_req = local_var_req_builder.build()?;
456 let local_var_resp = local_var_client.execute(local_var_req).await?;
457
458 let local_var_status = local_var_resp.status();
459 let local_var_content = local_var_resp.text().await?;
460
461 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
462 crate::from_str_patched(&local_var_content).map_err(Error::from)
463 } else {
464 let local_var_entity: Option<BatchReRunJobsError> = crate::from_str_patched(&local_var_content).ok();
465 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
466 Err(Error::ResponseError(local_var_error))
467 }
468}
469
470pub async fn cancel_persistent_queued_jobs(configuration: &configuration::Configuration, workspace: &str, path: &str, cancel_queued_job_request: models::CancelQueuedJobRequest) -> Result<String, Error<CancelPersistentQueuedJobsError>> {
471 let local_var_configuration = configuration;
472
473 let local_var_client = &local_var_configuration.client;
474
475 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/queue/cancel_persistent/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
476 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
477
478 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
479 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
480 }
481 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
482 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
483 };
484 local_var_req_builder = local_var_req_builder.json(&cancel_queued_job_request);
485
486 let local_var_req = local_var_req_builder.build()?;
487 let local_var_resp = local_var_client.execute(local_var_req).await?;
488
489 let local_var_status = local_var_resp.status();
490 let local_var_content = local_var_resp.text().await?;
491
492 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
493 crate::from_str_patched(&local_var_content).map_err(Error::from)
494 } else {
495 let local_var_entity: Option<CancelPersistentQueuedJobsError> = crate::from_str_patched(&local_var_content).ok();
496 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
497 Err(Error::ResponseError(local_var_error))
498 }
499}
500
501pub async fn cancel_queued_job(configuration: &configuration::Configuration, workspace: &str, id: &str, cancel_queued_job_request: models::CancelQueuedJobRequest) -> Result<String, Error<CancelQueuedJobError>> {
502 let local_var_configuration = configuration;
503
504 let local_var_client = &local_var_configuration.client;
505
506 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/queue/cancel/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
507 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
508
509 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
510 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
511 }
512 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
513 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
514 };
515 local_var_req_builder = local_var_req_builder.json(&cancel_queued_job_request);
516
517 let local_var_req = local_var_req_builder.build()?;
518 let local_var_resp = local_var_client.execute(local_var_req).await?;
519
520 let local_var_status = local_var_resp.status();
521 let local_var_content = local_var_resp.text().await?;
522
523 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
524 crate::from_str_patched(&local_var_content).map_err(Error::from)
525 } else {
526 let local_var_entity: Option<CancelQueuedJobError> = crate::from_str_patched(&local_var_content).ok();
527 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
528 Err(Error::ResponseError(local_var_error))
529 }
530}
531
532pub async fn cancel_selection(configuration: &configuration::Configuration, workspace: &str, request_body: Vec<String>, force_cancel: Option<bool>) -> Result<Vec<String>, Error<CancelSelectionError>> {
533 let local_var_configuration = configuration;
534
535 let local_var_client = &local_var_configuration.client;
536
537 let local_var_uri_str = format!("{}/w/{workspace}/jobs/queue/cancel_selection", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
538 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
539
540 if let Some(ref local_var_str) = force_cancel {
541 local_var_req_builder = local_var_req_builder.query(&[("force_cancel", &local_var_str.to_string())]);
542 }
543 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
544 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
545 }
546 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
547 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
548 };
549 local_var_req_builder = local_var_req_builder.json(&request_body);
550
551 let local_var_req = local_var_req_builder.build()?;
552 let local_var_resp = local_var_client.execute(local_var_req).await?;
553
554 let local_var_status = local_var_resp.status();
555 let local_var_content = local_var_resp.text().await?;
556
557 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
558 crate::from_str_patched(&local_var_content).map_err(Error::from)
559 } else {
560 let local_var_entity: Option<CancelSelectionError> = crate::from_str_patched(&local_var_content).ok();
561 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
562 Err(Error::ResponseError(local_var_error))
563 }
564}
565
566pub async fn cancel_suspended_job_get(configuration: &configuration::Configuration, workspace: &str, id: &str, resume_id: i32, signature: &str, approver: Option<&str>) -> Result<String, Error<CancelSuspendedJobGetError>> {
567 let local_var_configuration = configuration;
568
569 let local_var_client = &local_var_configuration.client;
570
571 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/cancel/{id}/{resume_id}/{signature}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id), resume_id=resume_id, signature=crate::apis::urlencode(signature));
572 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
573
574 if let Some(ref local_var_str) = approver {
575 local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
576 }
577 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
578 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
579 }
580 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
581 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
582 };
583
584 let local_var_req = local_var_req_builder.build()?;
585 let local_var_resp = local_var_client.execute(local_var_req).await?;
586
587 let local_var_status = local_var_resp.status();
588 let local_var_content = local_var_resp.text().await?;
589
590 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
591 crate::from_str_patched(&local_var_content).map_err(Error::from)
592 } else {
593 let local_var_entity: Option<CancelSuspendedJobGetError> = crate::from_str_patched(&local_var_content).ok();
594 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
595 Err(Error::ResponseError(local_var_error))
596 }
597}
598
599pub async fn cancel_suspended_job_post(configuration: &configuration::Configuration, workspace: &str, id: &str, resume_id: i32, signature: &str, body: serde_json::Value, approver: Option<&str>) -> Result<String, Error<CancelSuspendedJobPostError>> {
600 let local_var_configuration = configuration;
601
602 let local_var_client = &local_var_configuration.client;
603
604 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/cancel/{id}/{resume_id}/{signature}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id), resume_id=resume_id, signature=crate::apis::urlencode(signature));
605 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
606
607 if let Some(ref local_var_str) = approver {
608 local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
609 }
610 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
611 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
612 }
613 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
614 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
615 };
616 local_var_req_builder = local_var_req_builder.json(&body);
617
618 let local_var_req = local_var_req_builder.build()?;
619 let local_var_resp = local_var_client.execute(local_var_req).await?;
620
621 let local_var_status = local_var_resp.status();
622 let local_var_content = local_var_resp.text().await?;
623
624 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
625 crate::from_str_patched(&local_var_content).map_err(Error::from)
626 } else {
627 let local_var_entity: Option<CancelSuspendedJobPostError> = crate::from_str_patched(&local_var_content).ok();
628 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
629 Err(Error::ResponseError(local_var_error))
630 }
631}
632
633pub async fn count_completed_jobs(configuration: &configuration::Configuration, workspace: &str, completed_after_s_ago: Option<i32>, success: Option<bool>, tags: Option<&str>, all_workspaces: Option<bool>) -> Result<i32, Error<CountCompletedJobsError>> {
634 let local_var_configuration = configuration;
635
636 let local_var_client = &local_var_configuration.client;
637
638 let local_var_uri_str = format!("{}/w/{workspace}/jobs/completed/count_jobs", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
639 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
640
641 if let Some(ref local_var_str) = completed_after_s_ago {
642 local_var_req_builder = local_var_req_builder.query(&[("completed_after_s_ago", &local_var_str.to_string())]);
643 }
644 if let Some(ref local_var_str) = success {
645 local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
646 }
647 if let Some(ref local_var_str) = tags {
648 local_var_req_builder = local_var_req_builder.query(&[("tags", &local_var_str.to_string())]);
649 }
650 if let Some(ref local_var_str) = all_workspaces {
651 local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
652 }
653 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
654 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
655 }
656 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
657 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
658 };
659
660 let local_var_req = local_var_req_builder.build()?;
661 let local_var_resp = local_var_client.execute(local_var_req).await?;
662
663 let local_var_status = local_var_resp.status();
664 let local_var_content = local_var_resp.text().await?;
665
666 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
667 crate::from_str_patched(&local_var_content).map_err(Error::from)
668 } else {
669 let local_var_entity: Option<CountCompletedJobsError> = crate::from_str_patched(&local_var_content).ok();
670 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
671 Err(Error::ResponseError(local_var_error))
672 }
673}
674
675pub async fn count_jobs_by_tag(configuration: &configuration::Configuration, horizon_secs: Option<i32>, workspace_id: Option<&str>) -> Result<Vec<models::CountJobsByTag200ResponseInner>, Error<CountJobsByTagError>> {
676 let local_var_configuration = configuration;
677
678 let local_var_client = &local_var_configuration.client;
679
680 let local_var_uri_str = format!("{}/jobs/completed/count_by_tag", local_var_configuration.base_path);
681 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
682
683 if let Some(ref local_var_str) = horizon_secs {
684 local_var_req_builder = local_var_req_builder.query(&[("horizon_secs", &local_var_str.to_string())]);
685 }
686 if let Some(ref local_var_str) = workspace_id {
687 local_var_req_builder = local_var_req_builder.query(&[("workspace_id", &local_var_str.to_string())]);
688 }
689 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
690 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
691 }
692 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
693 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
694 };
695
696 let local_var_req = local_var_req_builder.build()?;
697 let local_var_resp = local_var_client.execute(local_var_req).await?;
698
699 let local_var_status = local_var_resp.status();
700 let local_var_content = local_var_resp.text().await?;
701
702 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
703 crate::from_str_patched(&local_var_content).map_err(Error::from)
704 } else {
705 let local_var_entity: Option<CountJobsByTagError> = crate::from_str_patched(&local_var_content).ok();
706 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
707 Err(Error::ResponseError(local_var_error))
708 }
709}
710
711pub async fn create_job_signature(configuration: &configuration::Configuration, workspace: &str, id: &str, resume_id: i32, approver: Option<&str>) -> Result<String, Error<CreateJobSignatureError>> {
712 let local_var_configuration = configuration;
713
714 let local_var_client = &local_var_configuration.client;
715
716 let local_var_uri_str = format!("{}/w/{workspace}/jobs/job_signature/{id}/{resume_id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id), resume_id=resume_id);
717 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
718
719 if let Some(ref local_var_str) = approver {
720 local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
721 }
722 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
723 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
724 }
725 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
726 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
727 };
728
729 let local_var_req = local_var_req_builder.build()?;
730 let local_var_resp = local_var_client.execute(local_var_req).await?;
731
732 let local_var_status = local_var_resp.status();
733 let local_var_content = local_var_resp.text().await?;
734
735 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
736 crate::from_str_patched(&local_var_content).map_err(Error::from)
737 } else {
738 let local_var_entity: Option<CreateJobSignatureError> = crate::from_str_patched(&local_var_content).ok();
739 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
740 Err(Error::ResponseError(local_var_error))
741 }
742}
743
744pub async fn delete_completed_job(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<models::CompletedJob, Error<DeleteCompletedJobError>> {
745 let local_var_configuration = configuration;
746
747 let local_var_client = &local_var_configuration.client;
748
749 let local_var_uri_str = format!("{}/w/{workspace}/jobs/completed/delete/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
750 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
751
752 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
753 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
754 }
755 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
756 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
757 };
758
759 let local_var_req = local_var_req_builder.build()?;
760 let local_var_resp = local_var_client.execute(local_var_req).await?;
761
762 let local_var_status = local_var_resp.status();
763 let local_var_content = local_var_resp.text().await?;
764
765 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
766 crate::from_str_patched(&local_var_content).map_err(Error::from)
767 } else {
768 let local_var_entity: Option<DeleteCompletedJobError> = crate::from_str_patched(&local_var_content).ok();
769 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
770 Err(Error::ResponseError(local_var_error))
771 }
772}
773
774pub async fn force_cancel_queued_job(configuration: &configuration::Configuration, workspace: &str, id: &str, cancel_queued_job_request: models::CancelQueuedJobRequest) -> Result<String, Error<ForceCancelQueuedJobError>> {
775 let local_var_configuration = configuration;
776
777 let local_var_client = &local_var_configuration.client;
778
779 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/queue/force_cancel/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
780 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
781
782 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
783 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
784 }
785 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
786 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
787 };
788 local_var_req_builder = local_var_req_builder.json(&cancel_queued_job_request);
789
790 let local_var_req = local_var_req_builder.build()?;
791 let local_var_resp = local_var_client.execute(local_var_req).await?;
792
793 let local_var_status = local_var_resp.status();
794 let local_var_content = local_var_resp.text().await?;
795
796 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
797 crate::from_str_patched(&local_var_content).map_err(Error::from)
798 } else {
799 let local_var_entity: Option<ForceCancelQueuedJobError> = crate::from_str_patched(&local_var_content).ok();
800 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
801 Err(Error::ResponseError(local_var_error))
802 }
803}
804
805pub async fn get_completed_count(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetCompletedCount200Response, Error<GetCompletedCountError>> {
806 let local_var_configuration = configuration;
807
808 let local_var_client = &local_var_configuration.client;
809
810 let local_var_uri_str = format!("{}/w/{workspace}/jobs/completed/count", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
811 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
812
813 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
814 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
815 }
816 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
817 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
818 };
819
820 let local_var_req = local_var_req_builder.build()?;
821 let local_var_resp = local_var_client.execute(local_var_req).await?;
822
823 let local_var_status = local_var_resp.status();
824 let local_var_content = local_var_resp.text().await?;
825
826 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
827 crate::from_str_patched(&local_var_content).map_err(Error::from)
828 } else {
829 let local_var_entity: Option<GetCompletedCountError> = crate::from_str_patched(&local_var_content).ok();
830 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
831 Err(Error::ResponseError(local_var_error))
832 }
833}
834
835pub async fn get_completed_job(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<models::CompletedJob, Error<GetCompletedJobError>> {
836 let local_var_configuration = configuration;
837
838 let local_var_client = &local_var_configuration.client;
839
840 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/completed/get/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
841 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
842
843 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
844 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
845 }
846 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
847 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
848 };
849
850 let local_var_req = local_var_req_builder.build()?;
851 let local_var_resp = local_var_client.execute(local_var_req).await?;
852
853 let local_var_status = local_var_resp.status();
854 let local_var_content = local_var_resp.text().await?;
855
856 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
857 crate::from_str_patched(&local_var_content).map_err(Error::from)
858 } else {
859 let local_var_entity: Option<GetCompletedJobError> = crate::from_str_patched(&local_var_content).ok();
860 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
861 Err(Error::ResponseError(local_var_error))
862 }
863}
864
865pub async fn get_completed_job_logs_tail(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<String, Error<GetCompletedJobLogsTailError>> {
866 let local_var_configuration = configuration;
867
868 let local_var_client = &local_var_configuration.client;
869
870 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/get_completed_logs_tail/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
871 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
872
873 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
874 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
875 }
876 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
877 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
878 };
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(&local_var_content).map_err(Error::from)
888 } else {
889 let local_var_entity: Option<GetCompletedJobLogsTailError> = crate::from_str_patched(&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 get_completed_job_result(configuration: &configuration::Configuration, workspace: &str, id: &str, suspended_job: Option<&str>, resume_id: Option<i32>, secret: Option<&str>, approver: Option<&str>) -> Result<serde_json::Value, Error<GetCompletedJobResultError>> {
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}/jobs_u/completed/get_result/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
901 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
902
903 if let Some(ref local_var_str) = suspended_job {
904 local_var_req_builder = local_var_req_builder.query(&[("suspended_job", &local_var_str.to_string())]);
905 }
906 if let Some(ref local_var_str) = resume_id {
907 local_var_req_builder = local_var_req_builder.query(&[("resume_id", &local_var_str.to_string())]);
908 }
909 if let Some(ref local_var_str) = secret {
910 local_var_req_builder = local_var_req_builder.query(&[("secret", &local_var_str.to_string())]);
911 }
912 if let Some(ref local_var_str) = approver {
913 local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
914 }
915 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
916 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
917 }
918 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
919 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
920 };
921
922 let local_var_req = local_var_req_builder.build()?;
923 let local_var_resp = local_var_client.execute(local_var_req).await?;
924
925 let local_var_status = local_var_resp.status();
926 let local_var_content = local_var_resp.text().await?;
927
928 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
929 crate::from_str_patched(&local_var_content).map_err(Error::from)
930 } else {
931 let local_var_entity: Option<GetCompletedJobResultError> = crate::from_str_patched(&local_var_content).ok();
932 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
933 Err(Error::ResponseError(local_var_error))
934 }
935}
936
937pub async fn get_completed_job_result_maybe(configuration: &configuration::Configuration, workspace: &str, id: &str, get_started: Option<bool>) -> Result<models::GetCompletedJobResultMaybe200Response, Error<GetCompletedJobResultMaybeError>> {
938 let local_var_configuration = configuration;
939
940 let local_var_client = &local_var_configuration.client;
941
942 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/completed/get_result_maybe/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
943 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
944
945 if let Some(ref local_var_str) = get_started {
946 local_var_req_builder = local_var_req_builder.query(&[("get_started", &local_var_str.to_string())]);
947 }
948 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
949 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
950 }
951 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
952 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
953 };
954
955 let local_var_req = local_var_req_builder.build()?;
956 let local_var_resp = local_var_client.execute(local_var_req).await?;
957
958 let local_var_status = local_var_resp.status();
959 let local_var_content = local_var_resp.text().await?;
960
961 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
962 crate::from_str_patched(&local_var_content).map_err(Error::from)
963 } else {
964 let local_var_entity: Option<GetCompletedJobResultMaybeError> = crate::from_str_patched(&local_var_content).ok();
965 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
966 Err(Error::ResponseError(local_var_error))
967 }
968}
969
970pub async fn get_db_clock(configuration: &configuration::Configuration, ) -> Result<i32, Error<GetDbClockError>> {
971 let local_var_configuration = configuration;
972
973 let local_var_client = &local_var_configuration.client;
974
975 let local_var_uri_str = format!("{}/jobs/db_clock", local_var_configuration.base_path);
976 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
977
978 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
979 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
980 }
981 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
982 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
983 };
984
985 let local_var_req = local_var_req_builder.build()?;
986 let local_var_resp = local_var_client.execute(local_var_req).await?;
987
988 let local_var_status = local_var_resp.status();
989 let local_var_content = local_var_resp.text().await?;
990
991 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
992 crate::from_str_patched(&local_var_content).map_err(Error::from)
993 } else {
994 let local_var_entity: Option<GetDbClockError> = crate::from_str_patched(&local_var_content).ok();
995 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
996 Err(Error::ResponseError(local_var_error))
997 }
998}
999
1000pub async fn get_flow_debug_info(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<serde_json::Value, Error<GetFlowDebugInfoError>> {
1001 let local_var_configuration = configuration;
1002
1003 let local_var_client = &local_var_configuration.client;
1004
1005 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/get_flow_debug_info/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1006 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1007
1008 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1009 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1010 }
1011 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1012 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1013 };
1014
1015 let local_var_req = local_var_req_builder.build()?;
1016 let local_var_resp = local_var_client.execute(local_var_req).await?;
1017
1018 let local_var_status = local_var_resp.status();
1019 let local_var_content = local_var_resp.text().await?;
1020
1021 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1022 crate::from_str_patched(&local_var_content).map_err(Error::from)
1023 } else {
1024 let local_var_entity: Option<GetFlowDebugInfoError> = crate::from_str_patched(&local_var_content).ok();
1025 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1026 Err(Error::ResponseError(local_var_error))
1027 }
1028}
1029
1030pub async fn get_flow_user_state(configuration: &configuration::Configuration, workspace: &str, id: &str, key: &str) -> Result<serde_json::Value, Error<GetFlowUserStateError>> {
1031 let local_var_configuration = configuration;
1032
1033 let local_var_client = &local_var_configuration.client;
1034
1035 let local_var_uri_str = format!("{}/w/{workspace}/jobs/flow/user_states/{id}/{key}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id), key=crate::apis::urlencode(key));
1036 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1037
1038 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1039 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1040 }
1041 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1042 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1043 };
1044
1045 let local_var_req = local_var_req_builder.build()?;
1046 let local_var_resp = local_var_client.execute(local_var_req).await?;
1047
1048 let local_var_status = local_var_resp.status();
1049 let local_var_content = local_var_resp.text().await?;
1050
1051 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1052 crate::from_str_patched(&local_var_content).map_err(Error::from)
1053 } else {
1054 let local_var_entity: Option<GetFlowUserStateError> = crate::from_str_patched(&local_var_content).ok();
1055 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1056 Err(Error::ResponseError(local_var_error))
1057 }
1058}
1059
1060pub async fn get_job(configuration: &configuration::Configuration, workspace: &str, id: &str, no_logs: Option<bool>, no_code: Option<bool>) -> Result<models::Job, Error<GetJobError>> {
1061 let local_var_configuration = configuration;
1062
1063 let local_var_client = &local_var_configuration.client;
1064
1065 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/get/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1066 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1067
1068 if let Some(ref local_var_str) = no_logs {
1069 local_var_req_builder = local_var_req_builder.query(&[("no_logs", &local_var_str.to_string())]);
1070 }
1071 if let Some(ref local_var_str) = no_code {
1072 local_var_req_builder = local_var_req_builder.query(&[("no_code", &local_var_str.to_string())]);
1073 }
1074 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1075 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1076 }
1077 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1078 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1079 };
1080
1081 let local_var_req = local_var_req_builder.build()?;
1082 let local_var_resp = local_var_client.execute(local_var_req).await?;
1083
1084 let local_var_status = local_var_resp.status();
1085 let local_var_content = local_var_resp.text().await?;
1086
1087 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1088 crate::from_str_patched(&local_var_content).map_err(Error::from)
1089 } else {
1090 let local_var_entity: Option<GetJobError> = crate::from_str_patched(&local_var_content).ok();
1091 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1092 Err(Error::ResponseError(local_var_error))
1093 }
1094}
1095
1096pub async fn get_job_args(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<serde_json::Value, Error<GetJobArgsError>> {
1097 let local_var_configuration = configuration;
1098
1099 let local_var_client = &local_var_configuration.client;
1100
1101 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/get_args/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1102 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1103
1104 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1105 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1106 }
1107 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1108 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1109 };
1110
1111 let local_var_req = local_var_req_builder.build()?;
1112 let local_var_resp = local_var_client.execute(local_var_req).await?;
1113
1114 let local_var_status = local_var_resp.status();
1115 let local_var_content = local_var_resp.text().await?;
1116
1117 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1118 crate::from_str_patched(&local_var_content).map_err(Error::from)
1119 } else {
1120 let local_var_entity: Option<GetJobArgsError> = crate::from_str_patched(&local_var_content).ok();
1121 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1122 Err(Error::ResponseError(local_var_error))
1123 }
1124}
1125
1126pub async fn get_job_logs(configuration: &configuration::Configuration, workspace: &str, id: &str, remove_ansi_warnings: Option<bool>) -> Result<String, Error<GetJobLogsError>> {
1127 let local_var_configuration = configuration;
1128
1129 let local_var_client = &local_var_configuration.client;
1130
1131 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/get_logs/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1132 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1133
1134 if let Some(ref local_var_str) = remove_ansi_warnings {
1135 local_var_req_builder = local_var_req_builder.query(&[("remove_ansi_warnings", &local_var_str.to_string())]);
1136 }
1137 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1138 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1139 }
1140 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1141 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1142 };
1143
1144 let local_var_req = local_var_req_builder.build()?;
1145 let local_var_resp = local_var_client.execute(local_var_req).await?;
1146
1147 let local_var_status = local_var_resp.status();
1148 let local_var_content = local_var_resp.text().await?;
1149
1150 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1151 crate::from_str_patched(&local_var_content).map_err(Error::from)
1152 } else {
1153 let local_var_entity: Option<GetJobLogsError> = crate::from_str_patched(&local_var_content).ok();
1154 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1155 Err(Error::ResponseError(local_var_error))
1156 }
1157}
1158
1159pub async fn get_job_updates(configuration: &configuration::Configuration, workspace: &str, id: &str, running: Option<bool>, log_offset: Option<i32>, stream_offset: Option<i32>, get_progress: Option<bool>, no_logs: Option<bool>) -> Result<models::GetJobUpdates200Response, Error<GetJobUpdatesError>> {
1160 let local_var_configuration = configuration;
1161
1162 let local_var_client = &local_var_configuration.client;
1163
1164 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/getupdate/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1165 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1166
1167 if let Some(ref local_var_str) = running {
1168 local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
1169 }
1170 if let Some(ref local_var_str) = log_offset {
1171 local_var_req_builder = local_var_req_builder.query(&[("log_offset", &local_var_str.to_string())]);
1172 }
1173 if let Some(ref local_var_str) = stream_offset {
1174 local_var_req_builder = local_var_req_builder.query(&[("stream_offset", &local_var_str.to_string())]);
1175 }
1176 if let Some(ref local_var_str) = get_progress {
1177 local_var_req_builder = local_var_req_builder.query(&[("get_progress", &local_var_str.to_string())]);
1178 }
1179 if let Some(ref local_var_str) = no_logs {
1180 local_var_req_builder = local_var_req_builder.query(&[("no_logs", &local_var_str.to_string())]);
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
1189 let local_var_req = local_var_req_builder.build()?;
1190 let local_var_resp = local_var_client.execute(local_var_req).await?;
1191
1192 let local_var_status = local_var_resp.status();
1193 let local_var_content = local_var_resp.text().await?;
1194
1195 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1196 crate::from_str_patched(&local_var_content).map_err(Error::from)
1197 } else {
1198 let local_var_entity: Option<GetJobUpdatesError> = crate::from_str_patched(&local_var_content).ok();
1199 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1200 Err(Error::ResponseError(local_var_error))
1201 }
1202}
1203
1204pub async fn get_job_updates_sse(configuration: &configuration::Configuration, workspace: &str, id: &str, running: Option<bool>, log_offset: Option<i32>, stream_offset: Option<i32>, get_progress: Option<bool>, only_result: Option<bool>, no_logs: Option<bool>) -> Result<String, Error<GetJobUpdatesSseError>> {
1205 let local_var_configuration = configuration;
1206
1207 let local_var_client = &local_var_configuration.client;
1208
1209 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/getupdate_sse/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1210 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1211
1212 if let Some(ref local_var_str) = running {
1213 local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
1214 }
1215 if let Some(ref local_var_str) = log_offset {
1216 local_var_req_builder = local_var_req_builder.query(&[("log_offset", &local_var_str.to_string())]);
1217 }
1218 if let Some(ref local_var_str) = stream_offset {
1219 local_var_req_builder = local_var_req_builder.query(&[("stream_offset", &local_var_str.to_string())]);
1220 }
1221 if let Some(ref local_var_str) = get_progress {
1222 local_var_req_builder = local_var_req_builder.query(&[("get_progress", &local_var_str.to_string())]);
1223 }
1224 if let Some(ref local_var_str) = only_result {
1225 local_var_req_builder = local_var_req_builder.query(&[("only_result", &local_var_str.to_string())]);
1226 }
1227 if let Some(ref local_var_str) = no_logs {
1228 local_var_req_builder = local_var_req_builder.query(&[("no_logs", &local_var_str.to_string())]);
1229 }
1230 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1231 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1232 }
1233 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1234 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1235 };
1236
1237 let local_var_req = local_var_req_builder.build()?;
1238 let local_var_resp = local_var_client.execute(local_var_req).await?;
1239
1240 let local_var_status = local_var_resp.status();
1241 let local_var_content = local_var_resp.text().await?;
1242
1243 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1244 crate::from_str_patched(&local_var_content).map_err(Error::from)
1245 } else {
1246 let local_var_entity: Option<GetJobUpdatesSseError> = crate::from_str_patched(&local_var_content).ok();
1247 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1248 Err(Error::ResponseError(local_var_error))
1249 }
1250}
1251
1252pub async fn get_log_file_from_store(configuration: &configuration::Configuration, workspace: &str, path: &str) -> Result<String, Error<GetLogFileFromStoreError>> {
1253 let local_var_configuration = configuration;
1254
1255 let local_var_client = &local_var_configuration.client;
1256
1257 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/get_log_file/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
1258 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1259
1260 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1261 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1262 }
1263 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1264 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1265 };
1266
1267 let local_var_req = local_var_req_builder.build()?;
1268 let local_var_resp = local_var_client.execute(local_var_req).await?;
1269
1270 let local_var_status = local_var_resp.status();
1271 let local_var_content = local_var_resp.text().await?;
1272
1273 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1274 crate::from_str_patched(&local_var_content).map_err(Error::from)
1275 } else {
1276 let local_var_entity: Option<GetLogFileFromStoreError> = crate::from_str_patched(&local_var_content).ok();
1277 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1278 Err(Error::ResponseError(local_var_error))
1279 }
1280}
1281
1282pub async fn get_queue_count(configuration: &configuration::Configuration, workspace: &str, all_workspaces: Option<bool>) -> Result<models::GetQueueCount200Response, Error<GetQueueCountError>> {
1283 let local_var_configuration = configuration;
1284
1285 let local_var_client = &local_var_configuration.client;
1286
1287 let local_var_uri_str = format!("{}/w/{workspace}/jobs/queue/count", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1288 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1289
1290 if let Some(ref local_var_str) = all_workspaces {
1291 local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
1292 }
1293 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1294 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1295 }
1296 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1297 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1298 };
1299
1300 let local_var_req = local_var_req_builder.build()?;
1301 let local_var_resp = local_var_client.execute(local_var_req).await?;
1302
1303 let local_var_status = local_var_resp.status();
1304 let local_var_content = local_var_resp.text().await?;
1305
1306 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1307 crate::from_str_patched(&local_var_content).map_err(Error::from)
1308 } else {
1309 let local_var_entity: Option<GetQueueCountError> = crate::from_str_patched(&local_var_content).ok();
1310 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1311 Err(Error::ResponseError(local_var_error))
1312 }
1313}
1314
1315pub async fn get_queue_position(configuration: &configuration::Configuration, workspace: &str, scheduled_for: i32) -> Result<models::GetQueuePosition200Response, Error<GetQueuePositionError>> {
1316 let local_var_configuration = configuration;
1317
1318 let local_var_client = &local_var_configuration.client;
1319
1320 let local_var_uri_str = format!("{}/w/{workspace}/jobs/queue/position/{scheduled_for}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), scheduled_for=scheduled_for);
1321 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1322
1323 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1324 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1325 }
1326 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1327 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1328 };
1329
1330 let local_var_req = local_var_req_builder.build()?;
1331 let local_var_resp = local_var_client.execute(local_var_req).await?;
1332
1333 let local_var_status = local_var_resp.status();
1334 let local_var_content = local_var_resp.text().await?;
1335
1336 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1337 crate::from_str_patched(&local_var_content).map_err(Error::from)
1338 } else {
1339 let local_var_entity: Option<GetQueuePositionError> = crate::from_str_patched(&local_var_content).ok();
1340 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1341 Err(Error::ResponseError(local_var_error))
1342 }
1343}
1344
1345pub async fn get_resume_urls(configuration: &configuration::Configuration, workspace: &str, id: &str, resume_id: i32, approver: Option<&str>) -> Result<models::GetResumeUrls200Response, Error<GetResumeUrlsError>> {
1346 let local_var_configuration = configuration;
1347
1348 let local_var_client = &local_var_configuration.client;
1349
1350 let local_var_uri_str = format!("{}/w/{workspace}/jobs/resume_urls/{id}/{resume_id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id), resume_id=resume_id);
1351 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1352
1353 if let Some(ref local_var_str) = approver {
1354 local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
1355 }
1356 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1357 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1358 }
1359 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1360 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1361 };
1362
1363 let local_var_req = local_var_req_builder.build()?;
1364 let local_var_resp = local_var_client.execute(local_var_req).await?;
1365
1366 let local_var_status = local_var_resp.status();
1367 let local_var_content = local_var_resp.text().await?;
1368
1369 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1370 crate::from_str_patched(&local_var_content).map_err(Error::from)
1371 } else {
1372 let local_var_entity: Option<GetResumeUrlsError> = crate::from_str_patched(&local_var_content).ok();
1373 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1374 Err(Error::ResponseError(local_var_error))
1375 }
1376}
1377
1378pub async fn get_root_job_id(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<String, Error<GetRootJobIdError>> {
1379 let local_var_configuration = configuration;
1380
1381 let local_var_client = &local_var_configuration.client;
1382
1383 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/get_root_job_id/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1384 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1385
1386 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1387 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1388 }
1389 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1390 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1391 };
1392
1393 let local_var_req = local_var_req_builder.build()?;
1394 let local_var_resp = local_var_client.execute(local_var_req).await?;
1395
1396 let local_var_status = local_var_resp.status();
1397 let local_var_content = local_var_resp.text().await?;
1398
1399 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1400 crate::from_str_patched(&local_var_content).map_err(Error::from)
1401 } else {
1402 let local_var_entity: Option<GetRootJobIdError> = crate::from_str_patched(&local_var_content).ok();
1403 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1404 Err(Error::ResponseError(local_var_error))
1405 }
1406}
1407
1408pub async fn get_scheduled_for(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<i32, Error<GetScheduledForError>> {
1409 let local_var_configuration = configuration;
1410
1411 let local_var_client = &local_var_configuration.client;
1412
1413 let local_var_uri_str = format!("{}/w/{workspace}/jobs/queue/scheduled_for/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1414 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1415
1416 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1417 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1418 }
1419 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1420 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1421 };
1422
1423 let local_var_req = local_var_req_builder.build()?;
1424 let local_var_resp = local_var_client.execute(local_var_req).await?;
1425
1426 let local_var_status = local_var_resp.status();
1427 let local_var_content = local_var_resp.text().await?;
1428
1429 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1430 crate::from_str_patched(&local_var_content).map_err(Error::from)
1431 } else {
1432 let local_var_entity: Option<GetScheduledForError> = crate::from_str_patched(&local_var_content).ok();
1433 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1434 Err(Error::ResponseError(local_var_error))
1435 }
1436}
1437
1438pub async fn get_slack_approval_payload(configuration: &configuration::Configuration, workspace: &str, id: &str, slack_resource_path: &str, channel_id: &str, flow_step_id: &str, approver: Option<&str>, message: Option<&str>, default_args_json: Option<&str>, dynamic_enums_json: Option<&str>) -> Result<(), Error<GetSlackApprovalPayloadError>> {
1439 let local_var_configuration = configuration;
1440
1441 let local_var_client = &local_var_configuration.client;
1442
1443 let local_var_uri_str = format!("{}/w/{workspace}/jobs/slack_approval/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1444 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1445
1446 if let Some(ref local_var_str) = approver {
1447 local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
1448 }
1449 if let Some(ref local_var_str) = message {
1450 local_var_req_builder = local_var_req_builder.query(&[("message", &local_var_str.to_string())]);
1451 }
1452 local_var_req_builder = local_var_req_builder.query(&[("slack_resource_path", &slack_resource_path.to_string())]);
1453 local_var_req_builder = local_var_req_builder.query(&[("channel_id", &channel_id.to_string())]);
1454 local_var_req_builder = local_var_req_builder.query(&[("flow_step_id", &flow_step_id.to_string())]);
1455 if let Some(ref local_var_str) = default_args_json {
1456 local_var_req_builder = local_var_req_builder.query(&[("default_args_json", &local_var_str.to_string())]);
1457 }
1458 if let Some(ref local_var_str) = dynamic_enums_json {
1459 local_var_req_builder = local_var_req_builder.query(&[("dynamic_enums_json", &local_var_str.to_string())]);
1460 }
1461 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1462 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1463 }
1464 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1465 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1466 };
1467
1468 let local_var_req = local_var_req_builder.build()?;
1469 let local_var_resp = local_var_client.execute(local_var_req).await?;
1470
1471 let local_var_status = local_var_resp.status();
1472 let local_var_content = local_var_resp.text().await?;
1473
1474 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1475 Ok(())
1476 } else {
1477 let local_var_entity: Option<GetSlackApprovalPayloadError> = crate::from_str_patched(&local_var_content).ok();
1478 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1479 Err(Error::ResponseError(local_var_error))
1480 }
1481}
1482
1483pub async fn get_started_at_by_ids(configuration: &configuration::Configuration, workspace: &str, request_body: Vec<String>) -> Result<Vec<String>, Error<GetStartedAtByIdsError>> {
1484 let local_var_configuration = configuration;
1485
1486 let local_var_client = &local_var_configuration.client;
1487
1488 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/queue/get_started_at_by_ids", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1489 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1490
1491 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1492 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1493 }
1494 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1495 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1496 };
1497 local_var_req_builder = local_var_req_builder.json(&request_body);
1498
1499 let local_var_req = local_var_req_builder.build()?;
1500 let local_var_resp = local_var_client.execute(local_var_req).await?;
1501
1502 let local_var_status = local_var_resp.status();
1503 let local_var_content = local_var_resp.text().await?;
1504
1505 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1506 crate::from_str_patched(&local_var_content).map_err(Error::from)
1507 } else {
1508 let local_var_entity: Option<GetStartedAtByIdsError> = crate::from_str_patched(&local_var_content).ok();
1509 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1510 Err(Error::ResponseError(local_var_error))
1511 }
1512}
1513
1514pub async fn get_suspended_job_flow(configuration: &configuration::Configuration, workspace: &str, id: &str, resume_id: i32, signature: &str, approver: Option<&str>) -> Result<models::GetSuspendedJobFlow200Response, Error<GetSuspendedJobFlowError>> {
1515 let local_var_configuration = configuration;
1516
1517 let local_var_client = &local_var_configuration.client;
1518
1519 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/get_flow/{id}/{resume_id}/{signature}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id), resume_id=resume_id, signature=crate::apis::urlencode(signature));
1520 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1521
1522 if let Some(ref local_var_str) = approver {
1523 local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
1524 }
1525 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1526 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1527 }
1528 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1529 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1530 };
1531
1532 let local_var_req = local_var_req_builder.build()?;
1533 let local_var_resp = local_var_client.execute(local_var_req).await?;
1534
1535 let local_var_status = local_var_resp.status();
1536 let local_var_content = local_var_resp.text().await?;
1537
1538 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1539 crate::from_str_patched(&local_var_content).map_err(Error::from)
1540 } else {
1541 let local_var_entity: Option<GetSuspendedJobFlowError> = crate::from_str_patched(&local_var_content).ok();
1542 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1543 Err(Error::ResponseError(local_var_error))
1544 }
1545}
1546
1547pub async fn get_teams_approval_payload(configuration: &configuration::Configuration, workspace: &str, id: &str, team_name: &str, channel_name: &str, flow_step_id: &str, approver: Option<&str>, message: Option<&str>, default_args_json: Option<&str>, dynamic_enums_json: Option<&str>) -> Result<(), Error<GetTeamsApprovalPayloadError>> {
1548 let local_var_configuration = configuration;
1549
1550 let local_var_client = &local_var_configuration.client;
1551
1552 let local_var_uri_str = format!("{}/w/{workspace}/jobs/teams_approval/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1553 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1554
1555 if let Some(ref local_var_str) = approver {
1556 local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
1557 }
1558 if let Some(ref local_var_str) = message {
1559 local_var_req_builder = local_var_req_builder.query(&[("message", &local_var_str.to_string())]);
1560 }
1561 local_var_req_builder = local_var_req_builder.query(&[("team_name", &team_name.to_string())]);
1562 local_var_req_builder = local_var_req_builder.query(&[("channel_name", &channel_name.to_string())]);
1563 local_var_req_builder = local_var_req_builder.query(&[("flow_step_id", &flow_step_id.to_string())]);
1564 if let Some(ref local_var_str) = default_args_json {
1565 local_var_req_builder = local_var_req_builder.query(&[("default_args_json", &local_var_str.to_string())]);
1566 }
1567 if let Some(ref local_var_str) = dynamic_enums_json {
1568 local_var_req_builder = local_var_req_builder.query(&[("dynamic_enums_json", &local_var_str.to_string())]);
1569 }
1570 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1571 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1572 }
1573 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1574 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1575 };
1576
1577 let local_var_req = local_var_req_builder.build()?;
1578 let local_var_resp = local_var_client.execute(local_var_req).await?;
1579
1580 let local_var_status = local_var_resp.status();
1581 let local_var_content = local_var_resp.text().await?;
1582
1583 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1584 Ok(())
1585 } else {
1586 let local_var_entity: Option<GetTeamsApprovalPayloadError> = crate::from_str_patched(&local_var_content).ok();
1587 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1588 Err(Error::ResponseError(local_var_error))
1589 }
1590}
1591
1592pub async fn list_completed_jobs(configuration: &configuration::Configuration, workspace: &str, order_desc: Option<bool>, created_by: Option<&str>, label: Option<&str>, worker: Option<&str>, parent_job: Option<&str>, script_path_exact: Option<&str>, script_path_start: Option<&str>, schedule_path: Option<&str>, script_hash: Option<&str>, started_before: Option<String>, started_after: Option<String>, success: Option<bool>, job_kinds: Option<&str>, args: Option<&str>, result: Option<&str>, allow_wildcards: Option<bool>, tag: Option<&str>, page: Option<i32>, per_page: Option<i32>, is_skipped: Option<bool>, is_flow_step: Option<bool>, has_null_parent: Option<bool>, is_not_schedule: Option<bool>) -> Result<Vec<models::CompletedJob>, Error<ListCompletedJobsError>> {
1593 let local_var_configuration = configuration;
1594
1595 let local_var_client = &local_var_configuration.client;
1596
1597 let local_var_uri_str = format!("{}/w/{workspace}/jobs/completed/list", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1598 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1599
1600 if let Some(ref local_var_str) = order_desc {
1601 local_var_req_builder = local_var_req_builder.query(&[("order_desc", &local_var_str.to_string())]);
1602 }
1603 if let Some(ref local_var_str) = created_by {
1604 local_var_req_builder = local_var_req_builder.query(&[("created_by", &local_var_str.to_string())]);
1605 }
1606 if let Some(ref local_var_str) = label {
1607 local_var_req_builder = local_var_req_builder.query(&[("label", &local_var_str.to_string())]);
1608 }
1609 if let Some(ref local_var_str) = worker {
1610 local_var_req_builder = local_var_req_builder.query(&[("worker", &local_var_str.to_string())]);
1611 }
1612 if let Some(ref local_var_str) = parent_job {
1613 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
1614 }
1615 if let Some(ref local_var_str) = script_path_exact {
1616 local_var_req_builder = local_var_req_builder.query(&[("script_path_exact", &local_var_str.to_string())]);
1617 }
1618 if let Some(ref local_var_str) = script_path_start {
1619 local_var_req_builder = local_var_req_builder.query(&[("script_path_start", &local_var_str.to_string())]);
1620 }
1621 if let Some(ref local_var_str) = schedule_path {
1622 local_var_req_builder = local_var_req_builder.query(&[("schedule_path", &local_var_str.to_string())]);
1623 }
1624 if let Some(ref local_var_str) = script_hash {
1625 local_var_req_builder = local_var_req_builder.query(&[("script_hash", &local_var_str.to_string())]);
1626 }
1627 if let Some(ref local_var_str) = started_before {
1628 local_var_req_builder = local_var_req_builder.query(&[("started_before", &local_var_str.to_string())]);
1629 }
1630 if let Some(ref local_var_str) = started_after {
1631 local_var_req_builder = local_var_req_builder.query(&[("started_after", &local_var_str.to_string())]);
1632 }
1633 if let Some(ref local_var_str) = success {
1634 local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
1635 }
1636 if let Some(ref local_var_str) = job_kinds {
1637 local_var_req_builder = local_var_req_builder.query(&[("job_kinds", &local_var_str.to_string())]);
1638 }
1639 if let Some(ref local_var_str) = args {
1640 local_var_req_builder = local_var_req_builder.query(&[("args", &local_var_str.to_string())]);
1641 }
1642 if let Some(ref local_var_str) = result {
1643 local_var_req_builder = local_var_req_builder.query(&[("result", &local_var_str.to_string())]);
1644 }
1645 if let Some(ref local_var_str) = allow_wildcards {
1646 local_var_req_builder = local_var_req_builder.query(&[("allow_wildcards", &local_var_str.to_string())]);
1647 }
1648 if let Some(ref local_var_str) = tag {
1649 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
1650 }
1651 if let Some(ref local_var_str) = page {
1652 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
1653 }
1654 if let Some(ref local_var_str) = per_page {
1655 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
1656 }
1657 if let Some(ref local_var_str) = is_skipped {
1658 local_var_req_builder = local_var_req_builder.query(&[("is_skipped", &local_var_str.to_string())]);
1659 }
1660 if let Some(ref local_var_str) = is_flow_step {
1661 local_var_req_builder = local_var_req_builder.query(&[("is_flow_step", &local_var_str.to_string())]);
1662 }
1663 if let Some(ref local_var_str) = has_null_parent {
1664 local_var_req_builder = local_var_req_builder.query(&[("has_null_parent", &local_var_str.to_string())]);
1665 }
1666 if let Some(ref local_var_str) = is_not_schedule {
1667 local_var_req_builder = local_var_req_builder.query(&[("is_not_schedule", &local_var_str.to_string())]);
1668 }
1669 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1670 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1671 }
1672 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1673 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1674 };
1675
1676 let local_var_req = local_var_req_builder.build()?;
1677 let local_var_resp = local_var_client.execute(local_var_req).await?;
1678
1679 let local_var_status = local_var_resp.status();
1680 let local_var_content = local_var_resp.text().await?;
1681
1682 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1683 crate::from_str_patched(&local_var_content).map_err(Error::from)
1684 } else {
1685 let local_var_entity: Option<ListCompletedJobsError> = crate::from_str_patched(&local_var_content).ok();
1686 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1687 Err(Error::ResponseError(local_var_error))
1688 }
1689}
1690
1691pub async fn list_extended_jobs(configuration: &configuration::Configuration, workspace: &str, concurrency_key: Option<&str>, row_limit: Option<f64>, created_by: Option<&str>, label: Option<&str>, parent_job: Option<&str>, script_path_exact: Option<&str>, script_path_start: Option<&str>, schedule_path: Option<&str>, script_hash: Option<&str>, started_before: Option<String>, started_after: Option<String>, created_or_started_before: Option<String>, running: Option<bool>, scheduled_for_before_now: Option<bool>, created_or_started_after: Option<String>, created_or_started_after_completed_jobs: Option<String>, job_kinds: Option<&str>, args: Option<&str>, tag: Option<&str>, result: Option<&str>, allow_wildcards: Option<bool>, page: Option<i32>, per_page: Option<i32>, is_skipped: Option<bool>, is_flow_step: Option<bool>, has_null_parent: Option<bool>, success: Option<bool>, all_workspaces: Option<bool>, is_not_schedule: Option<bool>) -> Result<models::ExtendedJobs, Error<ListExtendedJobsError>> {
1692 let local_var_configuration = configuration;
1693
1694 let local_var_client = &local_var_configuration.client;
1695
1696 let local_var_uri_str = format!("{}/w/{workspace}/concurrency_groups/list_jobs", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1697 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1698
1699 if let Some(ref local_var_str) = concurrency_key {
1700 local_var_req_builder = local_var_req_builder.query(&[("concurrency_key", &local_var_str.to_string())]);
1701 }
1702 if let Some(ref local_var_str) = row_limit {
1703 local_var_req_builder = local_var_req_builder.query(&[("row_limit", &local_var_str.to_string())]);
1704 }
1705 if let Some(ref local_var_str) = created_by {
1706 local_var_req_builder = local_var_req_builder.query(&[("created_by", &local_var_str.to_string())]);
1707 }
1708 if let Some(ref local_var_str) = label {
1709 local_var_req_builder = local_var_req_builder.query(&[("label", &local_var_str.to_string())]);
1710 }
1711 if let Some(ref local_var_str) = parent_job {
1712 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
1713 }
1714 if let Some(ref local_var_str) = script_path_exact {
1715 local_var_req_builder = local_var_req_builder.query(&[("script_path_exact", &local_var_str.to_string())]);
1716 }
1717 if let Some(ref local_var_str) = script_path_start {
1718 local_var_req_builder = local_var_req_builder.query(&[("script_path_start", &local_var_str.to_string())]);
1719 }
1720 if let Some(ref local_var_str) = schedule_path {
1721 local_var_req_builder = local_var_req_builder.query(&[("schedule_path", &local_var_str.to_string())]);
1722 }
1723 if let Some(ref local_var_str) = script_hash {
1724 local_var_req_builder = local_var_req_builder.query(&[("script_hash", &local_var_str.to_string())]);
1725 }
1726 if let Some(ref local_var_str) = started_before {
1727 local_var_req_builder = local_var_req_builder.query(&[("started_before", &local_var_str.to_string())]);
1728 }
1729 if let Some(ref local_var_str) = started_after {
1730 local_var_req_builder = local_var_req_builder.query(&[("started_after", &local_var_str.to_string())]);
1731 }
1732 if let Some(ref local_var_str) = created_or_started_before {
1733 local_var_req_builder = local_var_req_builder.query(&[("created_or_started_before", &local_var_str.to_string())]);
1734 }
1735 if let Some(ref local_var_str) = running {
1736 local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
1737 }
1738 if let Some(ref local_var_str) = scheduled_for_before_now {
1739 local_var_req_builder = local_var_req_builder.query(&[("scheduled_for_before_now", &local_var_str.to_string())]);
1740 }
1741 if let Some(ref local_var_str) = created_or_started_after {
1742 local_var_req_builder = local_var_req_builder.query(&[("created_or_started_after", &local_var_str.to_string())]);
1743 }
1744 if let Some(ref local_var_str) = created_or_started_after_completed_jobs {
1745 local_var_req_builder = local_var_req_builder.query(&[("created_or_started_after_completed_jobs", &local_var_str.to_string())]);
1746 }
1747 if let Some(ref local_var_str) = job_kinds {
1748 local_var_req_builder = local_var_req_builder.query(&[("job_kinds", &local_var_str.to_string())]);
1749 }
1750 if let Some(ref local_var_str) = args {
1751 local_var_req_builder = local_var_req_builder.query(&[("args", &local_var_str.to_string())]);
1752 }
1753 if let Some(ref local_var_str) = tag {
1754 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
1755 }
1756 if let Some(ref local_var_str) = result {
1757 local_var_req_builder = local_var_req_builder.query(&[("result", &local_var_str.to_string())]);
1758 }
1759 if let Some(ref local_var_str) = allow_wildcards {
1760 local_var_req_builder = local_var_req_builder.query(&[("allow_wildcards", &local_var_str.to_string())]);
1761 }
1762 if let Some(ref local_var_str) = page {
1763 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
1764 }
1765 if let Some(ref local_var_str) = per_page {
1766 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
1767 }
1768 if let Some(ref local_var_str) = is_skipped {
1769 local_var_req_builder = local_var_req_builder.query(&[("is_skipped", &local_var_str.to_string())]);
1770 }
1771 if let Some(ref local_var_str) = is_flow_step {
1772 local_var_req_builder = local_var_req_builder.query(&[("is_flow_step", &local_var_str.to_string())]);
1773 }
1774 if let Some(ref local_var_str) = has_null_parent {
1775 local_var_req_builder = local_var_req_builder.query(&[("has_null_parent", &local_var_str.to_string())]);
1776 }
1777 if let Some(ref local_var_str) = success {
1778 local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
1779 }
1780 if let Some(ref local_var_str) = all_workspaces {
1781 local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
1782 }
1783 if let Some(ref local_var_str) = is_not_schedule {
1784 local_var_req_builder = local_var_req_builder.query(&[("is_not_schedule", &local_var_str.to_string())]);
1785 }
1786 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1787 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1788 }
1789 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1790 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1791 };
1792
1793 let local_var_req = local_var_req_builder.build()?;
1794 let local_var_resp = local_var_client.execute(local_var_req).await?;
1795
1796 let local_var_status = local_var_resp.status();
1797 let local_var_content = local_var_resp.text().await?;
1798
1799 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1800 crate::from_str_patched(&local_var_content).map_err(Error::from)
1801 } else {
1802 let local_var_entity: Option<ListExtendedJobsError> = crate::from_str_patched(&local_var_content).ok();
1803 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1804 Err(Error::ResponseError(local_var_error))
1805 }
1806}
1807
1808pub async fn list_filtered_jobs_uuids(configuration: &configuration::Configuration, workspace: &str, created_by: Option<&str>, label: Option<&str>, worker: Option<&str>, parent_job: Option<&str>, script_path_exact: Option<&str>, script_path_start: Option<&str>, schedule_path: Option<&str>, script_hash: Option<&str>, started_before: Option<String>, started_after: Option<String>, created_before: Option<String>, created_after: Option<String>, created_or_started_before: Option<String>, running: Option<bool>, scheduled_for_before_now: Option<bool>, created_or_started_after: Option<String>, created_or_started_after_completed_jobs: Option<String>, job_kinds: Option<&str>, suspended: Option<bool>, args: Option<&str>, tag: Option<&str>, result: Option<&str>, page: Option<i32>, per_page: Option<i32>, is_skipped: Option<bool>, is_flow_step: Option<bool>, has_null_parent: Option<bool>, success: Option<bool>, all_workspaces: Option<bool>, is_not_schedule: Option<bool>) -> Result<Vec<String>, Error<ListFilteredJobsUuidsError>> {
1809 let local_var_configuration = configuration;
1810
1811 let local_var_client = &local_var_configuration.client;
1812
1813 let local_var_uri_str = format!("{}/w/{workspace}/jobs/list_filtered_uuids", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1814 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1815
1816 if let Some(ref local_var_str) = created_by {
1817 local_var_req_builder = local_var_req_builder.query(&[("created_by", &local_var_str.to_string())]);
1818 }
1819 if let Some(ref local_var_str) = label {
1820 local_var_req_builder = local_var_req_builder.query(&[("label", &local_var_str.to_string())]);
1821 }
1822 if let Some(ref local_var_str) = worker {
1823 local_var_req_builder = local_var_req_builder.query(&[("worker", &local_var_str.to_string())]);
1824 }
1825 if let Some(ref local_var_str) = parent_job {
1826 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
1827 }
1828 if let Some(ref local_var_str) = script_path_exact {
1829 local_var_req_builder = local_var_req_builder.query(&[("script_path_exact", &local_var_str.to_string())]);
1830 }
1831 if let Some(ref local_var_str) = script_path_start {
1832 local_var_req_builder = local_var_req_builder.query(&[("script_path_start", &local_var_str.to_string())]);
1833 }
1834 if let Some(ref local_var_str) = schedule_path {
1835 local_var_req_builder = local_var_req_builder.query(&[("schedule_path", &local_var_str.to_string())]);
1836 }
1837 if let Some(ref local_var_str) = script_hash {
1838 local_var_req_builder = local_var_req_builder.query(&[("script_hash", &local_var_str.to_string())]);
1839 }
1840 if let Some(ref local_var_str) = started_before {
1841 local_var_req_builder = local_var_req_builder.query(&[("started_before", &local_var_str.to_string())]);
1842 }
1843 if let Some(ref local_var_str) = started_after {
1844 local_var_req_builder = local_var_req_builder.query(&[("started_after", &local_var_str.to_string())]);
1845 }
1846 if let Some(ref local_var_str) = created_before {
1847 local_var_req_builder = local_var_req_builder.query(&[("created_before", &local_var_str.to_string())]);
1848 }
1849 if let Some(ref local_var_str) = created_after {
1850 local_var_req_builder = local_var_req_builder.query(&[("created_after", &local_var_str.to_string())]);
1851 }
1852 if let Some(ref local_var_str) = created_or_started_before {
1853 local_var_req_builder = local_var_req_builder.query(&[("created_or_started_before", &local_var_str.to_string())]);
1854 }
1855 if let Some(ref local_var_str) = running {
1856 local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
1857 }
1858 if let Some(ref local_var_str) = scheduled_for_before_now {
1859 local_var_req_builder = local_var_req_builder.query(&[("scheduled_for_before_now", &local_var_str.to_string())]);
1860 }
1861 if let Some(ref local_var_str) = created_or_started_after {
1862 local_var_req_builder = local_var_req_builder.query(&[("created_or_started_after", &local_var_str.to_string())]);
1863 }
1864 if let Some(ref local_var_str) = created_or_started_after_completed_jobs {
1865 local_var_req_builder = local_var_req_builder.query(&[("created_or_started_after_completed_jobs", &local_var_str.to_string())]);
1866 }
1867 if let Some(ref local_var_str) = job_kinds {
1868 local_var_req_builder = local_var_req_builder.query(&[("job_kinds", &local_var_str.to_string())]);
1869 }
1870 if let Some(ref local_var_str) = suspended {
1871 local_var_req_builder = local_var_req_builder.query(&[("suspended", &local_var_str.to_string())]);
1872 }
1873 if let Some(ref local_var_str) = args {
1874 local_var_req_builder = local_var_req_builder.query(&[("args", &local_var_str.to_string())]);
1875 }
1876 if let Some(ref local_var_str) = tag {
1877 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
1878 }
1879 if let Some(ref local_var_str) = result {
1880 local_var_req_builder = local_var_req_builder.query(&[("result", &local_var_str.to_string())]);
1881 }
1882 if let Some(ref local_var_str) = page {
1883 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
1884 }
1885 if let Some(ref local_var_str) = per_page {
1886 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
1887 }
1888 if let Some(ref local_var_str) = is_skipped {
1889 local_var_req_builder = local_var_req_builder.query(&[("is_skipped", &local_var_str.to_string())]);
1890 }
1891 if let Some(ref local_var_str) = is_flow_step {
1892 local_var_req_builder = local_var_req_builder.query(&[("is_flow_step", &local_var_str.to_string())]);
1893 }
1894 if let Some(ref local_var_str) = has_null_parent {
1895 local_var_req_builder = local_var_req_builder.query(&[("has_null_parent", &local_var_str.to_string())]);
1896 }
1897 if let Some(ref local_var_str) = success {
1898 local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
1899 }
1900 if let Some(ref local_var_str) = all_workspaces {
1901 local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
1902 }
1903 if let Some(ref local_var_str) = is_not_schedule {
1904 local_var_req_builder = local_var_req_builder.query(&[("is_not_schedule", &local_var_str.to_string())]);
1905 }
1906 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1907 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1908 }
1909 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1910 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1911 };
1912
1913 let local_var_req = local_var_req_builder.build()?;
1914 let local_var_resp = local_var_client.execute(local_var_req).await?;
1915
1916 let local_var_status = local_var_resp.status();
1917 let local_var_content = local_var_resp.text().await?;
1918
1919 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1920 crate::from_str_patched(&local_var_content).map_err(Error::from)
1921 } else {
1922 let local_var_entity: Option<ListFilteredJobsUuidsError> = crate::from_str_patched(&local_var_content).ok();
1923 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1924 Err(Error::ResponseError(local_var_error))
1925 }
1926}
1927
1928pub async fn list_filtered_queue_uuids(configuration: &configuration::Configuration, workspace: &str, order_desc: Option<bool>, created_by: Option<&str>, parent_job: Option<&str>, script_path_exact: Option<&str>, script_path_start: Option<&str>, schedule_path: Option<&str>, script_hash: Option<&str>, started_before: Option<String>, started_after: Option<String>, success: Option<bool>, scheduled_for_before_now: Option<bool>, job_kinds: Option<&str>, suspended: Option<bool>, running: Option<bool>, args: Option<&str>, result: Option<&str>, allow_wildcards: Option<bool>, tag: Option<&str>, page: Option<i32>, per_page: Option<i32>, concurrency_key: Option<&str>, all_workspaces: Option<bool>, is_not_schedule: Option<bool>) -> Result<Vec<String>, Error<ListFilteredQueueUuidsError>> {
1929 let local_var_configuration = configuration;
1930
1931 let local_var_client = &local_var_configuration.client;
1932
1933 let local_var_uri_str = format!("{}/w/{workspace}/jobs/queue/list_filtered_uuids", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1934 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1935
1936 if let Some(ref local_var_str) = order_desc {
1937 local_var_req_builder = local_var_req_builder.query(&[("order_desc", &local_var_str.to_string())]);
1938 }
1939 if let Some(ref local_var_str) = created_by {
1940 local_var_req_builder = local_var_req_builder.query(&[("created_by", &local_var_str.to_string())]);
1941 }
1942 if let Some(ref local_var_str) = parent_job {
1943 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
1944 }
1945 if let Some(ref local_var_str) = script_path_exact {
1946 local_var_req_builder = local_var_req_builder.query(&[("script_path_exact", &local_var_str.to_string())]);
1947 }
1948 if let Some(ref local_var_str) = script_path_start {
1949 local_var_req_builder = local_var_req_builder.query(&[("script_path_start", &local_var_str.to_string())]);
1950 }
1951 if let Some(ref local_var_str) = schedule_path {
1952 local_var_req_builder = local_var_req_builder.query(&[("schedule_path", &local_var_str.to_string())]);
1953 }
1954 if let Some(ref local_var_str) = script_hash {
1955 local_var_req_builder = local_var_req_builder.query(&[("script_hash", &local_var_str.to_string())]);
1956 }
1957 if let Some(ref local_var_str) = started_before {
1958 local_var_req_builder = local_var_req_builder.query(&[("started_before", &local_var_str.to_string())]);
1959 }
1960 if let Some(ref local_var_str) = started_after {
1961 local_var_req_builder = local_var_req_builder.query(&[("started_after", &local_var_str.to_string())]);
1962 }
1963 if let Some(ref local_var_str) = success {
1964 local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
1965 }
1966 if let Some(ref local_var_str) = scheduled_for_before_now {
1967 local_var_req_builder = local_var_req_builder.query(&[("scheduled_for_before_now", &local_var_str.to_string())]);
1968 }
1969 if let Some(ref local_var_str) = job_kinds {
1970 local_var_req_builder = local_var_req_builder.query(&[("job_kinds", &local_var_str.to_string())]);
1971 }
1972 if let Some(ref local_var_str) = suspended {
1973 local_var_req_builder = local_var_req_builder.query(&[("suspended", &local_var_str.to_string())]);
1974 }
1975 if let Some(ref local_var_str) = running {
1976 local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
1977 }
1978 if let Some(ref local_var_str) = args {
1979 local_var_req_builder = local_var_req_builder.query(&[("args", &local_var_str.to_string())]);
1980 }
1981 if let Some(ref local_var_str) = result {
1982 local_var_req_builder = local_var_req_builder.query(&[("result", &local_var_str.to_string())]);
1983 }
1984 if let Some(ref local_var_str) = allow_wildcards {
1985 local_var_req_builder = local_var_req_builder.query(&[("allow_wildcards", &local_var_str.to_string())]);
1986 }
1987 if let Some(ref local_var_str) = tag {
1988 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
1989 }
1990 if let Some(ref local_var_str) = page {
1991 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
1992 }
1993 if let Some(ref local_var_str) = per_page {
1994 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
1995 }
1996 if let Some(ref local_var_str) = concurrency_key {
1997 local_var_req_builder = local_var_req_builder.query(&[("concurrency_key", &local_var_str.to_string())]);
1998 }
1999 if let Some(ref local_var_str) = all_workspaces {
2000 local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
2001 }
2002 if let Some(ref local_var_str) = is_not_schedule {
2003 local_var_req_builder = local_var_req_builder.query(&[("is_not_schedule", &local_var_str.to_string())]);
2004 }
2005 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2006 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2007 }
2008 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2009 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2010 };
2011
2012 let local_var_req = local_var_req_builder.build()?;
2013 let local_var_resp = local_var_client.execute(local_var_req).await?;
2014
2015 let local_var_status = local_var_resp.status();
2016 let local_var_content = local_var_resp.text().await?;
2017
2018 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2019 crate::from_str_patched(&local_var_content).map_err(Error::from)
2020 } else {
2021 let local_var_entity: Option<ListFilteredQueueUuidsError> = crate::from_str_patched(&local_var_content).ok();
2022 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2023 Err(Error::ResponseError(local_var_error))
2024 }
2025}
2026
2027pub async fn list_jobs(configuration: &configuration::Configuration, workspace: &str, created_by: Option<&str>, label: Option<&str>, worker: Option<&str>, parent_job: Option<&str>, script_path_exact: Option<&str>, script_path_start: Option<&str>, schedule_path: Option<&str>, script_hash: Option<&str>, started_before: Option<String>, started_after: Option<String>, created_before: Option<String>, created_after: Option<String>, created_or_started_before: Option<String>, running: Option<bool>, scheduled_for_before_now: Option<bool>, created_or_started_after: Option<String>, created_or_started_after_completed_jobs: Option<String>, job_kinds: Option<&str>, suspended: Option<bool>, args: Option<&str>, tag: Option<&str>, result: Option<&str>, allow_wildcards: Option<bool>, page: Option<i32>, per_page: Option<i32>, is_skipped: Option<bool>, is_flow_step: Option<bool>, has_null_parent: Option<bool>, success: Option<bool>, all_workspaces: Option<bool>, is_not_schedule: Option<bool>) -> Result<Vec<models::Job>, Error<ListJobsError>> {
2028 let local_var_configuration = configuration;
2029
2030 let local_var_client = &local_var_configuration.client;
2031
2032 let local_var_uri_str = format!("{}/w/{workspace}/jobs/list", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2033 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2034
2035 if let Some(ref local_var_str) = created_by {
2036 local_var_req_builder = local_var_req_builder.query(&[("created_by", &local_var_str.to_string())]);
2037 }
2038 if let Some(ref local_var_str) = label {
2039 local_var_req_builder = local_var_req_builder.query(&[("label", &local_var_str.to_string())]);
2040 }
2041 if let Some(ref local_var_str) = worker {
2042 local_var_req_builder = local_var_req_builder.query(&[("worker", &local_var_str.to_string())]);
2043 }
2044 if let Some(ref local_var_str) = parent_job {
2045 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
2046 }
2047 if let Some(ref local_var_str) = script_path_exact {
2048 local_var_req_builder = local_var_req_builder.query(&[("script_path_exact", &local_var_str.to_string())]);
2049 }
2050 if let Some(ref local_var_str) = script_path_start {
2051 local_var_req_builder = local_var_req_builder.query(&[("script_path_start", &local_var_str.to_string())]);
2052 }
2053 if let Some(ref local_var_str) = schedule_path {
2054 local_var_req_builder = local_var_req_builder.query(&[("schedule_path", &local_var_str.to_string())]);
2055 }
2056 if let Some(ref local_var_str) = script_hash {
2057 local_var_req_builder = local_var_req_builder.query(&[("script_hash", &local_var_str.to_string())]);
2058 }
2059 if let Some(ref local_var_str) = started_before {
2060 local_var_req_builder = local_var_req_builder.query(&[("started_before", &local_var_str.to_string())]);
2061 }
2062 if let Some(ref local_var_str) = started_after {
2063 local_var_req_builder = local_var_req_builder.query(&[("started_after", &local_var_str.to_string())]);
2064 }
2065 if let Some(ref local_var_str) = created_before {
2066 local_var_req_builder = local_var_req_builder.query(&[("created_before", &local_var_str.to_string())]);
2067 }
2068 if let Some(ref local_var_str) = created_after {
2069 local_var_req_builder = local_var_req_builder.query(&[("created_after", &local_var_str.to_string())]);
2070 }
2071 if let Some(ref local_var_str) = created_or_started_before {
2072 local_var_req_builder = local_var_req_builder.query(&[("created_or_started_before", &local_var_str.to_string())]);
2073 }
2074 if let Some(ref local_var_str) = running {
2075 local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
2076 }
2077 if let Some(ref local_var_str) = scheduled_for_before_now {
2078 local_var_req_builder = local_var_req_builder.query(&[("scheduled_for_before_now", &local_var_str.to_string())]);
2079 }
2080 if let Some(ref local_var_str) = created_or_started_after {
2081 local_var_req_builder = local_var_req_builder.query(&[("created_or_started_after", &local_var_str.to_string())]);
2082 }
2083 if let Some(ref local_var_str) = created_or_started_after_completed_jobs {
2084 local_var_req_builder = local_var_req_builder.query(&[("created_or_started_after_completed_jobs", &local_var_str.to_string())]);
2085 }
2086 if let Some(ref local_var_str) = job_kinds {
2087 local_var_req_builder = local_var_req_builder.query(&[("job_kinds", &local_var_str.to_string())]);
2088 }
2089 if let Some(ref local_var_str) = suspended {
2090 local_var_req_builder = local_var_req_builder.query(&[("suspended", &local_var_str.to_string())]);
2091 }
2092 if let Some(ref local_var_str) = args {
2093 local_var_req_builder = local_var_req_builder.query(&[("args", &local_var_str.to_string())]);
2094 }
2095 if let Some(ref local_var_str) = tag {
2096 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
2097 }
2098 if let Some(ref local_var_str) = result {
2099 local_var_req_builder = local_var_req_builder.query(&[("result", &local_var_str.to_string())]);
2100 }
2101 if let Some(ref local_var_str) = allow_wildcards {
2102 local_var_req_builder = local_var_req_builder.query(&[("allow_wildcards", &local_var_str.to_string())]);
2103 }
2104 if let Some(ref local_var_str) = page {
2105 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
2106 }
2107 if let Some(ref local_var_str) = per_page {
2108 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
2109 }
2110 if let Some(ref local_var_str) = is_skipped {
2111 local_var_req_builder = local_var_req_builder.query(&[("is_skipped", &local_var_str.to_string())]);
2112 }
2113 if let Some(ref local_var_str) = is_flow_step {
2114 local_var_req_builder = local_var_req_builder.query(&[("is_flow_step", &local_var_str.to_string())]);
2115 }
2116 if let Some(ref local_var_str) = has_null_parent {
2117 local_var_req_builder = local_var_req_builder.query(&[("has_null_parent", &local_var_str.to_string())]);
2118 }
2119 if let Some(ref local_var_str) = success {
2120 local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
2121 }
2122 if let Some(ref local_var_str) = all_workspaces {
2123 local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
2124 }
2125 if let Some(ref local_var_str) = is_not_schedule {
2126 local_var_req_builder = local_var_req_builder.query(&[("is_not_schedule", &local_var_str.to_string())]);
2127 }
2128 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2129 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2130 }
2131 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2132 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2133 };
2134
2135 let local_var_req = local_var_req_builder.build()?;
2136 let local_var_resp = local_var_client.execute(local_var_req).await?;
2137
2138 let local_var_status = local_var_resp.status();
2139 let local_var_content = local_var_resp.text().await?;
2140
2141 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2142 crate::from_str_patched(&local_var_content).map_err(Error::from)
2143 } else {
2144 let local_var_entity: Option<ListJobsError> = crate::from_str_patched(&local_var_content).ok();
2145 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2146 Err(Error::ResponseError(local_var_error))
2147 }
2148}
2149
2150pub async fn list_queue(configuration: &configuration::Configuration, workspace: &str, order_desc: Option<bool>, created_by: Option<&str>, parent_job: Option<&str>, worker: Option<&str>, script_path_exact: Option<&str>, script_path_start: Option<&str>, schedule_path: Option<&str>, script_hash: Option<&str>, started_before: Option<String>, started_after: Option<String>, success: Option<bool>, scheduled_for_before_now: Option<bool>, job_kinds: Option<&str>, suspended: Option<bool>, running: Option<bool>, args: Option<&str>, result: Option<&str>, allow_wildcards: Option<bool>, tag: Option<&str>, page: Option<i32>, per_page: Option<i32>, all_workspaces: Option<bool>, is_not_schedule: Option<bool>) -> Result<Vec<models::QueuedJob>, Error<ListQueueError>> {
2151 let local_var_configuration = configuration;
2152
2153 let local_var_client = &local_var_configuration.client;
2154
2155 let local_var_uri_str = format!("{}/w/{workspace}/jobs/queue/list", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2156 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2157
2158 if let Some(ref local_var_str) = order_desc {
2159 local_var_req_builder = local_var_req_builder.query(&[("order_desc", &local_var_str.to_string())]);
2160 }
2161 if let Some(ref local_var_str) = created_by {
2162 local_var_req_builder = local_var_req_builder.query(&[("created_by", &local_var_str.to_string())]);
2163 }
2164 if let Some(ref local_var_str) = parent_job {
2165 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
2166 }
2167 if let Some(ref local_var_str) = worker {
2168 local_var_req_builder = local_var_req_builder.query(&[("worker", &local_var_str.to_string())]);
2169 }
2170 if let Some(ref local_var_str) = script_path_exact {
2171 local_var_req_builder = local_var_req_builder.query(&[("script_path_exact", &local_var_str.to_string())]);
2172 }
2173 if let Some(ref local_var_str) = script_path_start {
2174 local_var_req_builder = local_var_req_builder.query(&[("script_path_start", &local_var_str.to_string())]);
2175 }
2176 if let Some(ref local_var_str) = schedule_path {
2177 local_var_req_builder = local_var_req_builder.query(&[("schedule_path", &local_var_str.to_string())]);
2178 }
2179 if let Some(ref local_var_str) = script_hash {
2180 local_var_req_builder = local_var_req_builder.query(&[("script_hash", &local_var_str.to_string())]);
2181 }
2182 if let Some(ref local_var_str) = started_before {
2183 local_var_req_builder = local_var_req_builder.query(&[("started_before", &local_var_str.to_string())]);
2184 }
2185 if let Some(ref local_var_str) = started_after {
2186 local_var_req_builder = local_var_req_builder.query(&[("started_after", &local_var_str.to_string())]);
2187 }
2188 if let Some(ref local_var_str) = success {
2189 local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
2190 }
2191 if let Some(ref local_var_str) = scheduled_for_before_now {
2192 local_var_req_builder = local_var_req_builder.query(&[("scheduled_for_before_now", &local_var_str.to_string())]);
2193 }
2194 if let Some(ref local_var_str) = job_kinds {
2195 local_var_req_builder = local_var_req_builder.query(&[("job_kinds", &local_var_str.to_string())]);
2196 }
2197 if let Some(ref local_var_str) = suspended {
2198 local_var_req_builder = local_var_req_builder.query(&[("suspended", &local_var_str.to_string())]);
2199 }
2200 if let Some(ref local_var_str) = running {
2201 local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
2202 }
2203 if let Some(ref local_var_str) = args {
2204 local_var_req_builder = local_var_req_builder.query(&[("args", &local_var_str.to_string())]);
2205 }
2206 if let Some(ref local_var_str) = result {
2207 local_var_req_builder = local_var_req_builder.query(&[("result", &local_var_str.to_string())]);
2208 }
2209 if let Some(ref local_var_str) = allow_wildcards {
2210 local_var_req_builder = local_var_req_builder.query(&[("allow_wildcards", &local_var_str.to_string())]);
2211 }
2212 if let Some(ref local_var_str) = tag {
2213 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
2214 }
2215 if let Some(ref local_var_str) = page {
2216 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
2217 }
2218 if let Some(ref local_var_str) = per_page {
2219 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
2220 }
2221 if let Some(ref local_var_str) = all_workspaces {
2222 local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
2223 }
2224 if let Some(ref local_var_str) = is_not_schedule {
2225 local_var_req_builder = local_var_req_builder.query(&[("is_not_schedule", &local_var_str.to_string())]);
2226 }
2227 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2228 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2229 }
2230 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2231 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2232 };
2233
2234 let local_var_req = local_var_req_builder.build()?;
2235 let local_var_resp = local_var_client.execute(local_var_req).await?;
2236
2237 let local_var_status = local_var_resp.status();
2238 let local_var_content = local_var_resp.text().await?;
2239
2240 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2241 crate::from_str_patched(&local_var_content).map_err(Error::from)
2242 } else {
2243 let local_var_entity: Option<ListQueueError> = crate::from_str_patched(&local_var_content).ok();
2244 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2245 Err(Error::ResponseError(local_var_error))
2246 }
2247}
2248
2249pub async fn list_selected_job_groups(configuration: &configuration::Configuration, workspace: &str, uuid_colon_colon_uuid: Vec<uuid::Uuid>) -> Result<Vec<models::ListSelectedJobGroups200ResponseInner>, Error<ListSelectedJobGroupsError>> {
2250 let local_var_configuration = configuration;
2251
2252 let local_var_client = &local_var_configuration.client;
2253
2254 let local_var_uri_str = format!("{}/w/{workspace}/jobs/list_selected_job_groups", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2255 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2256
2257 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2258 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2259 }
2260 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2261 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2262 };
2263 local_var_req_builder = local_var_req_builder.json(&uuid_colon_colon_uuid);
2264
2265 let local_var_req = local_var_req_builder.build()?;
2266 let local_var_resp = local_var_client.execute(local_var_req).await?;
2267
2268 let local_var_status = local_var_resp.status();
2269 let local_var_content = local_var_resp.text().await?;
2270
2271 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2272 crate::from_str_patched(&local_var_content).map_err(Error::from)
2273 } else {
2274 let local_var_entity: Option<ListSelectedJobGroupsError> = crate::from_str_patched(&local_var_content).ok();
2275 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2276 Err(Error::ResponseError(local_var_error))
2277 }
2278}
2279
2280pub async fn restart_flow_at_step(configuration: &configuration::Configuration, workspace: &str, id: &str, step_id: &str, branch_or_iteration_n: i32, request_body: std::collections::HashMap<String, serde_json::Value>, scheduled_for: Option<String>, scheduled_in_secs: Option<i32>, parent_job: Option<&str>, tag: Option<&str>, job_id: Option<&str>, include_header: Option<&str>, invisible_to_owner: Option<bool>) -> Result<uuid::Uuid, Error<RestartFlowAtStepError>> {
2281 let local_var_configuration = configuration;
2282
2283 let local_var_client = &local_var_configuration.client;
2284
2285 let local_var_uri_str = format!("{}/w/{workspace}/jobs/restart/f/{id}/from/{step_id}/{branch_or_iteration_n}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id), step_id=crate::apis::urlencode(step_id), branch_or_iteration_n=branch_or_iteration_n);
2286 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2287
2288 if let Some(ref local_var_str) = scheduled_for {
2289 local_var_req_builder = local_var_req_builder.query(&[("scheduled_for", &local_var_str.to_string())]);
2290 }
2291 if let Some(ref local_var_str) = scheduled_in_secs {
2292 local_var_req_builder = local_var_req_builder.query(&[("scheduled_in_secs", &local_var_str.to_string())]);
2293 }
2294 if let Some(ref local_var_str) = parent_job {
2295 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
2296 }
2297 if let Some(ref local_var_str) = tag {
2298 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
2299 }
2300 if let Some(ref local_var_str) = job_id {
2301 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
2302 }
2303 if let Some(ref local_var_str) = include_header {
2304 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
2305 }
2306 if let Some(ref local_var_str) = invisible_to_owner {
2307 local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
2308 }
2309 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2310 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2311 }
2312 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2313 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2314 };
2315 local_var_req_builder = local_var_req_builder.json(&request_body);
2316
2317 let local_var_req = local_var_req_builder.build()?;
2318 let local_var_resp = local_var_client.execute(local_var_req).await?;
2319
2320 let local_var_status = local_var_resp.status();
2321 let local_var_content = local_var_resp.text().await?;
2322
2323 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2324 crate::from_str_patched(&local_var_content).map_err(Error::from)
2325 } else {
2326 let local_var_entity: Option<RestartFlowAtStepError> = crate::from_str_patched(&local_var_content).ok();
2327 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2328 Err(Error::ResponseError(local_var_error))
2329 }
2330}
2331
2332pub async fn result_by_id(configuration: &configuration::Configuration, workspace: &str, flow_job_id: &str, node_id: &str) -> Result<serde_json::Value, Error<ResultByIdError>> {
2333 let local_var_configuration = configuration;
2334
2335 let local_var_client = &local_var_configuration.client;
2336
2337 let local_var_uri_str = format!("{}/w/{workspace}/jobs/result_by_id/{flow_job_id}/{node_id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), flow_job_id=crate::apis::urlencode(flow_job_id), node_id=crate::apis::urlencode(node_id));
2338 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2339
2340 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2341 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2342 }
2343 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2344 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2345 };
2346
2347 let local_var_req = local_var_req_builder.build()?;
2348 let local_var_resp = local_var_client.execute(local_var_req).await?;
2349
2350 let local_var_status = local_var_resp.status();
2351 let local_var_content = local_var_resp.text().await?;
2352
2353 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2354 crate::from_str_patched(&local_var_content).map_err(Error::from)
2355 } else {
2356 let local_var_entity: Option<ResultByIdError> = crate::from_str_patched(&local_var_content).ok();
2357 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2358 Err(Error::ResponseError(local_var_error))
2359 }
2360}
2361
2362pub async fn resume_suspended_flow_as_owner(configuration: &configuration::Configuration, workspace: &str, id: &str, body: serde_json::Value) -> Result<String, Error<ResumeSuspendedFlowAsOwnerError>> {
2363 let local_var_configuration = configuration;
2364
2365 let local_var_client = &local_var_configuration.client;
2366
2367 let local_var_uri_str = format!("{}/w/{workspace}/jobs/flow/resume/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
2368 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2369
2370 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2371 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2372 }
2373 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2374 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2375 };
2376 local_var_req_builder = local_var_req_builder.json(&body);
2377
2378 let local_var_req = local_var_req_builder.build()?;
2379 let local_var_resp = local_var_client.execute(local_var_req).await?;
2380
2381 let local_var_status = local_var_resp.status();
2382 let local_var_content = local_var_resp.text().await?;
2383
2384 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2385 crate::from_str_patched(&local_var_content).map_err(Error::from)
2386 } else {
2387 let local_var_entity: Option<ResumeSuspendedFlowAsOwnerError> = crate::from_str_patched(&local_var_content).ok();
2388 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2389 Err(Error::ResponseError(local_var_error))
2390 }
2391}
2392
2393pub async fn resume_suspended_job_get(configuration: &configuration::Configuration, workspace: &str, id: &str, resume_id: i32, signature: &str, payload: Option<&str>, approver: Option<&str>) -> Result<String, Error<ResumeSuspendedJobGetError>> {
2394 let local_var_configuration = configuration;
2395
2396 let local_var_client = &local_var_configuration.client;
2397
2398 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/resume/{id}/{resume_id}/{signature}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id), resume_id=resume_id, signature=crate::apis::urlencode(signature));
2399 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2400
2401 if let Some(ref local_var_str) = payload {
2402 local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
2403 }
2404 if let Some(ref local_var_str) = approver {
2405 local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
2406 }
2407 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2408 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2409 }
2410 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2411 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2412 };
2413
2414 let local_var_req = local_var_req_builder.build()?;
2415 let local_var_resp = local_var_client.execute(local_var_req).await?;
2416
2417 let local_var_status = local_var_resp.status();
2418 let local_var_content = local_var_resp.text().await?;
2419
2420 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2421 crate::from_str_patched(&local_var_content).map_err(Error::from)
2422 } else {
2423 let local_var_entity: Option<ResumeSuspendedJobGetError> = crate::from_str_patched(&local_var_content).ok();
2424 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2425 Err(Error::ResponseError(local_var_error))
2426 }
2427}
2428
2429pub async fn resume_suspended_job_post(configuration: &configuration::Configuration, workspace: &str, id: &str, resume_id: i32, signature: &str, body: serde_json::Value, approver: Option<&str>) -> Result<String, Error<ResumeSuspendedJobPostError>> {
2430 let local_var_configuration = configuration;
2431
2432 let local_var_client = &local_var_configuration.client;
2433
2434 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/resume/{id}/{resume_id}/{signature}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id), resume_id=resume_id, signature=crate::apis::urlencode(signature));
2435 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2436
2437 if let Some(ref local_var_str) = approver {
2438 local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
2439 }
2440 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2441 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2442 }
2443 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2444 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2445 };
2446 local_var_req_builder = local_var_req_builder.json(&body);
2447
2448 let local_var_req = local_var_req_builder.build()?;
2449 let local_var_resp = local_var_client.execute(local_var_req).await?;
2450
2451 let local_var_status = local_var_resp.status();
2452 let local_var_content = local_var_resp.text().await?;
2453
2454 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2455 crate::from_str_patched(&local_var_content).map_err(Error::from)
2456 } else {
2457 let local_var_entity: Option<ResumeSuspendedJobPostError> = crate::from_str_patched(&local_var_content).ok();
2458 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2459 Err(Error::ResponseError(local_var_error))
2460 }
2461}
2462
2463pub async fn run_code_workflow_task(configuration: &configuration::Configuration, workspace: &str, job_id: &str, entrypoint: &str, workflow_task: models::WorkflowTask) -> Result<uuid::Uuid, Error<RunCodeWorkflowTaskError>> {
2464 let local_var_configuration = configuration;
2465
2466 let local_var_client = &local_var_configuration.client;
2467
2468 let local_var_uri_str = format!("{}/w/{workspace}/jobs/workflow_as_code/{job_id}/{entrypoint}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), job_id=crate::apis::urlencode(job_id), entrypoint=crate::apis::urlencode(entrypoint));
2469 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2470
2471 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2472 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2473 }
2474 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2475 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2476 };
2477 local_var_req_builder = local_var_req_builder.json(&workflow_task);
2478
2479 let local_var_req = local_var_req_builder.build()?;
2480 let local_var_resp = local_var_client.execute(local_var_req).await?;
2481
2482 let local_var_status = local_var_resp.status();
2483 let local_var_content = local_var_resp.text().await?;
2484
2485 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2486 crate::from_str_patched(&local_var_content).map_err(Error::from)
2487 } else {
2488 let local_var_entity: Option<RunCodeWorkflowTaskError> = crate::from_str_patched(&local_var_content).ok();
2489 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2490 Err(Error::ResponseError(local_var_error))
2491 }
2492}
2493
2494pub async fn run_dynamic_select(configuration: &configuration::Configuration, workspace: &str, dynamic_input_data: models::DynamicInputData) -> Result<uuid::Uuid, Error<RunDynamicSelectError>> {
2495 let local_var_configuration = configuration;
2496
2497 let local_var_client = &local_var_configuration.client;
2498
2499 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/dynamic_select", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2500 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2501
2502 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2503 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2504 }
2505 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2506 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2507 };
2508 local_var_req_builder = local_var_req_builder.json(&dynamic_input_data);
2509
2510 let local_var_req = local_var_req_builder.build()?;
2511 let local_var_resp = local_var_client.execute(local_var_req).await?;
2512
2513 let local_var_status = local_var_resp.status();
2514 let local_var_content = local_var_resp.text().await?;
2515
2516 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2517 crate::from_str_patched(&local_var_content).map_err(Error::from)
2518 } else {
2519 let local_var_entity: Option<RunDynamicSelectError> = crate::from_str_patched(&local_var_content).ok();
2520 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2521 Err(Error::ResponseError(local_var_error))
2522 }
2523}
2524
2525pub async fn run_flow_by_path(configuration: &configuration::Configuration, workspace: &str, path: &str, request_body: std::collections::HashMap<String, serde_json::Value>, scheduled_for: Option<String>, scheduled_in_secs: Option<i32>, skip_preprocessor: Option<bool>, parent_job: Option<&str>, tag: Option<&str>, job_id: Option<&str>, include_header: Option<&str>, invisible_to_owner: Option<bool>) -> Result<uuid::Uuid, Error<RunFlowByPathError>> {
2526 let local_var_configuration = configuration;
2527
2528 let local_var_client = &local_var_configuration.client;
2529
2530 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/f/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
2531 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2532
2533 if let Some(ref local_var_str) = scheduled_for {
2534 local_var_req_builder = local_var_req_builder.query(&[("scheduled_for", &local_var_str.to_string())]);
2535 }
2536 if let Some(ref local_var_str) = scheduled_in_secs {
2537 local_var_req_builder = local_var_req_builder.query(&[("scheduled_in_secs", &local_var_str.to_string())]);
2538 }
2539 if let Some(ref local_var_str) = skip_preprocessor {
2540 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
2541 }
2542 if let Some(ref local_var_str) = parent_job {
2543 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
2544 }
2545 if let Some(ref local_var_str) = tag {
2546 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
2547 }
2548 if let Some(ref local_var_str) = job_id {
2549 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
2550 }
2551 if let Some(ref local_var_str) = include_header {
2552 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
2553 }
2554 if let Some(ref local_var_str) = invisible_to_owner {
2555 local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
2556 }
2557 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2558 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2559 }
2560 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2561 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2562 };
2563 local_var_req_builder = local_var_req_builder.json(&request_body);
2564
2565 let local_var_req = local_var_req_builder.build()?;
2566 let local_var_resp = local_var_client.execute(local_var_req).await?;
2567
2568 let local_var_status = local_var_resp.status();
2569 let local_var_content = local_var_resp.text().await?;
2570
2571 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2572 crate::from_str_patched(&local_var_content).map_err(Error::from)
2573 } else {
2574 let local_var_entity: Option<RunFlowByPathError> = crate::from_str_patched(&local_var_content).ok();
2575 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2576 Err(Error::ResponseError(local_var_error))
2577 }
2578}
2579
2580pub async fn run_flow_preview(configuration: &configuration::Configuration, workspace: &str, flow_preview: models::FlowPreview, include_header: Option<&str>, invisible_to_owner: Option<bool>, job_id: Option<&str>) -> Result<uuid::Uuid, Error<RunFlowPreviewError>> {
2581 let local_var_configuration = configuration;
2582
2583 let local_var_client = &local_var_configuration.client;
2584
2585 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/preview_flow", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2586 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2587
2588 if let Some(ref local_var_str) = include_header {
2589 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
2590 }
2591 if let Some(ref local_var_str) = invisible_to_owner {
2592 local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
2593 }
2594 if let Some(ref local_var_str) = job_id {
2595 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
2596 }
2597 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2598 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2599 }
2600 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2601 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2602 };
2603 local_var_req_builder = local_var_req_builder.json(&flow_preview);
2604
2605 let local_var_req = local_var_req_builder.build()?;
2606 let local_var_resp = local_var_client.execute(local_var_req).await?;
2607
2608 let local_var_status = local_var_resp.status();
2609 let local_var_content = local_var_resp.text().await?;
2610
2611 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2612 crate::from_str_patched(&local_var_content).map_err(Error::from)
2613 } else {
2614 let local_var_entity: Option<RunFlowPreviewError> = crate::from_str_patched(&local_var_content).ok();
2615 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2616 Err(Error::ResponseError(local_var_error))
2617 }
2618}
2619
2620pub async fn run_flow_preview_and_wait_result(configuration: &configuration::Configuration, workspace: &str, flow_preview: models::FlowPreview) -> Result<serde_json::Value, Error<RunFlowPreviewAndWaitResultError>> {
2621 let local_var_configuration = configuration;
2622
2623 let local_var_client = &local_var_configuration.client;
2624
2625 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_wait_result/preview_flow", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2626 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2627
2628 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2629 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2630 }
2631 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2632 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2633 };
2634 local_var_req_builder = local_var_req_builder.json(&flow_preview);
2635
2636 let local_var_req = local_var_req_builder.build()?;
2637 let local_var_resp = local_var_client.execute(local_var_req).await?;
2638
2639 let local_var_status = local_var_resp.status();
2640 let local_var_content = local_var_resp.text().await?;
2641
2642 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2643 crate::from_str_patched(&local_var_content).map_err(Error::from)
2644 } else {
2645 let local_var_entity: Option<RunFlowPreviewAndWaitResultError> = crate::from_str_patched(&local_var_content).ok();
2646 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2647 Err(Error::ResponseError(local_var_error))
2648 }
2649}
2650
2651pub async fn run_raw_script_dependencies(configuration: &configuration::Configuration, workspace: &str, run_raw_script_dependencies_request: models::RunRawScriptDependenciesRequest) -> Result<models::RunRawScriptDependencies201Response, Error<RunRawScriptDependenciesError>> {
2652 let local_var_configuration = configuration;
2653
2654 let local_var_client = &local_var_configuration.client;
2655
2656 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/dependencies", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2657 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2658
2659 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2660 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2661 }
2662 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2663 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2664 };
2665 local_var_req_builder = local_var_req_builder.json(&run_raw_script_dependencies_request);
2666
2667 let local_var_req = local_var_req_builder.build()?;
2668 let local_var_resp = local_var_client.execute(local_var_req).await?;
2669
2670 let local_var_status = local_var_resp.status();
2671 let local_var_content = local_var_resp.text().await?;
2672
2673 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2674 crate::from_str_patched(&local_var_content).map_err(Error::from)
2675 } else {
2676 let local_var_entity: Option<RunRawScriptDependenciesError> = crate::from_str_patched(&local_var_content).ok();
2677 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2678 Err(Error::ResponseError(local_var_error))
2679 }
2680}
2681
2682pub async fn run_script_by_hash(configuration: &configuration::Configuration, workspace: &str, hash: &str, body: serde_json::Value, scheduled_for: Option<String>, scheduled_in_secs: Option<i32>, skip_preprocessor: Option<bool>, parent_job: Option<&str>, tag: Option<&str>, cache_ttl: Option<&str>, job_id: Option<&str>, include_header: Option<&str>, invisible_to_owner: Option<bool>) -> Result<uuid::Uuid, Error<RunScriptByHashError>> {
2683 let local_var_configuration = configuration;
2684
2685 let local_var_client = &local_var_configuration.client;
2686
2687 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/h/{hash}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), hash=crate::apis::urlencode(hash));
2688 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2689
2690 if let Some(ref local_var_str) = scheduled_for {
2691 local_var_req_builder = local_var_req_builder.query(&[("scheduled_for", &local_var_str.to_string())]);
2692 }
2693 if let Some(ref local_var_str) = scheduled_in_secs {
2694 local_var_req_builder = local_var_req_builder.query(&[("scheduled_in_secs", &local_var_str.to_string())]);
2695 }
2696 if let Some(ref local_var_str) = skip_preprocessor {
2697 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
2698 }
2699 if let Some(ref local_var_str) = parent_job {
2700 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
2701 }
2702 if let Some(ref local_var_str) = tag {
2703 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
2704 }
2705 if let Some(ref local_var_str) = cache_ttl {
2706 local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
2707 }
2708 if let Some(ref local_var_str) = job_id {
2709 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
2710 }
2711 if let Some(ref local_var_str) = include_header {
2712 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
2713 }
2714 if let Some(ref local_var_str) = invisible_to_owner {
2715 local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
2716 }
2717 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2718 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2719 }
2720 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2721 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2722 };
2723 local_var_req_builder = local_var_req_builder.json(&body);
2724
2725 let local_var_req = local_var_req_builder.build()?;
2726 let local_var_resp = local_var_client.execute(local_var_req).await?;
2727
2728 let local_var_status = local_var_resp.status();
2729 let local_var_content = local_var_resp.text().await?;
2730
2731 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2732 crate::from_str_patched(&local_var_content).map_err(Error::from)
2733 } else {
2734 let local_var_entity: Option<RunScriptByHashError> = crate::from_str_patched(&local_var_content).ok();
2735 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2736 Err(Error::ResponseError(local_var_error))
2737 }
2738}
2739
2740pub async fn run_script_by_path(configuration: &configuration::Configuration, workspace: &str, path: &str, request_body: std::collections::HashMap<String, serde_json::Value>, scheduled_for: Option<String>, scheduled_in_secs: Option<i32>, skip_preprocessor: Option<bool>, parent_job: Option<&str>, tag: Option<&str>, cache_ttl: Option<&str>, job_id: Option<&str>, invisible_to_owner: Option<bool>) -> Result<uuid::Uuid, Error<RunScriptByPathError>> {
2741 let local_var_configuration = configuration;
2742
2743 let local_var_client = &local_var_configuration.client;
2744
2745 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/p/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
2746 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2747
2748 if let Some(ref local_var_str) = scheduled_for {
2749 local_var_req_builder = local_var_req_builder.query(&[("scheduled_for", &local_var_str.to_string())]);
2750 }
2751 if let Some(ref local_var_str) = scheduled_in_secs {
2752 local_var_req_builder = local_var_req_builder.query(&[("scheduled_in_secs", &local_var_str.to_string())]);
2753 }
2754 if let Some(ref local_var_str) = skip_preprocessor {
2755 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
2756 }
2757 if let Some(ref local_var_str) = parent_job {
2758 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
2759 }
2760 if let Some(ref local_var_str) = tag {
2761 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
2762 }
2763 if let Some(ref local_var_str) = cache_ttl {
2764 local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
2765 }
2766 if let Some(ref local_var_str) = job_id {
2767 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
2768 }
2769 if let Some(ref local_var_str) = invisible_to_owner {
2770 local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
2771 }
2772 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2773 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2774 }
2775 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2776 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2777 };
2778 local_var_req_builder = local_var_req_builder.json(&request_body);
2779
2780 let local_var_req = local_var_req_builder.build()?;
2781 let local_var_resp = local_var_client.execute(local_var_req).await?;
2782
2783 let local_var_status = local_var_resp.status();
2784 let local_var_content = local_var_resp.text().await?;
2785
2786 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2787 crate::from_str_patched(&local_var_content).map_err(Error::from)
2788 } else {
2789 let local_var_entity: Option<RunScriptByPathError> = crate::from_str_patched(&local_var_content).ok();
2790 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2791 Err(Error::ResponseError(local_var_error))
2792 }
2793}
2794
2795pub async fn run_script_preview(configuration: &configuration::Configuration, workspace: &str, preview: models::Preview, include_header: Option<&str>, invisible_to_owner: Option<bool>, job_id: Option<&str>) -> Result<uuid::Uuid, Error<RunScriptPreviewError>> {
2796 let local_var_configuration = configuration;
2797
2798 let local_var_client = &local_var_configuration.client;
2799
2800 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/preview", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2801 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2802
2803 if let Some(ref local_var_str) = include_header {
2804 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
2805 }
2806 if let Some(ref local_var_str) = invisible_to_owner {
2807 local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
2808 }
2809 if let Some(ref local_var_str) = job_id {
2810 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
2811 }
2812 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2813 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2814 }
2815 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2816 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2817 };
2818 local_var_req_builder = local_var_req_builder.json(&preview);
2819
2820 let local_var_req = local_var_req_builder.build()?;
2821 let local_var_resp = local_var_client.execute(local_var_req).await?;
2822
2823 let local_var_status = local_var_resp.status();
2824 let local_var_content = local_var_resp.text().await?;
2825
2826 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2827 crate::from_str_patched(&local_var_content).map_err(Error::from)
2828 } else {
2829 let local_var_entity: Option<RunScriptPreviewError> = crate::from_str_patched(&local_var_content).ok();
2830 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2831 Err(Error::ResponseError(local_var_error))
2832 }
2833}
2834
2835pub async fn run_script_preview_and_wait_result(configuration: &configuration::Configuration, workspace: &str, preview: models::Preview) -> Result<serde_json::Value, Error<RunScriptPreviewAndWaitResultError>> {
2836 let local_var_configuration = configuration;
2837
2838 let local_var_client = &local_var_configuration.client;
2839
2840 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_wait_result/preview", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2841 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2842
2843 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2844 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2845 }
2846 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2847 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2848 };
2849 local_var_req_builder = local_var_req_builder.json(&preview);
2850
2851 let local_var_req = local_var_req_builder.build()?;
2852 let local_var_resp = local_var_client.execute(local_var_req).await?;
2853
2854 let local_var_status = local_var_resp.status();
2855 let local_var_content = local_var_resp.text().await?;
2856
2857 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2858 crate::from_str_patched(&local_var_content).map_err(Error::from)
2859 } else {
2860 let local_var_entity: Option<RunScriptPreviewAndWaitResultError> = crate::from_str_patched(&local_var_content).ok();
2861 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2862 Err(Error::ResponseError(local_var_error))
2863 }
2864}
2865
2866pub async fn run_wait_result_flow_by_path(configuration: &configuration::Configuration, workspace: &str, path: &str, request_body: std::collections::HashMap<String, serde_json::Value>, include_header: Option<&str>, queue_limit: Option<&str>, job_id: Option<&str>, skip_preprocessor: Option<bool>) -> Result<serde_json::Value, Error<RunWaitResultFlowByPathError>> {
2867 let local_var_configuration = configuration;
2868
2869 let local_var_client = &local_var_configuration.client;
2870
2871 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_wait_result/f/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
2872 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2873
2874 if let Some(ref local_var_str) = include_header {
2875 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
2876 }
2877 if let Some(ref local_var_str) = queue_limit {
2878 local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
2879 }
2880 if let Some(ref local_var_str) = job_id {
2881 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
2882 }
2883 if let Some(ref local_var_str) = skip_preprocessor {
2884 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
2885 }
2886 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2887 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2888 }
2889 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2890 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2891 };
2892 local_var_req_builder = local_var_req_builder.json(&request_body);
2893
2894 let local_var_req = local_var_req_builder.build()?;
2895 let local_var_resp = local_var_client.execute(local_var_req).await?;
2896
2897 let local_var_status = local_var_resp.status();
2898 let local_var_content = local_var_resp.text().await?;
2899
2900 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2901 crate::from_str_patched(&local_var_content).map_err(Error::from)
2902 } else {
2903 let local_var_entity: Option<RunWaitResultFlowByPathError> = crate::from_str_patched(&local_var_content).ok();
2904 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2905 Err(Error::ResponseError(local_var_error))
2906 }
2907}
2908
2909pub async fn run_wait_result_script_by_path(configuration: &configuration::Configuration, workspace: &str, path: &str, request_body: std::collections::HashMap<String, serde_json::Value>, parent_job: Option<&str>, tag: Option<&str>, cache_ttl: Option<&str>, job_id: Option<&str>, include_header: Option<&str>, queue_limit: Option<&str>, skip_preprocessor: Option<bool>) -> Result<serde_json::Value, Error<RunWaitResultScriptByPathError>> {
2910 let local_var_configuration = configuration;
2911
2912 let local_var_client = &local_var_configuration.client;
2913
2914 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_wait_result/p/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
2915 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2916
2917 if let Some(ref local_var_str) = parent_job {
2918 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
2919 }
2920 if let Some(ref local_var_str) = tag {
2921 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
2922 }
2923 if let Some(ref local_var_str) = cache_ttl {
2924 local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
2925 }
2926 if let Some(ref local_var_str) = job_id {
2927 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
2928 }
2929 if let Some(ref local_var_str) = include_header {
2930 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
2931 }
2932 if let Some(ref local_var_str) = queue_limit {
2933 local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
2934 }
2935 if let Some(ref local_var_str) = skip_preprocessor {
2936 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
2937 }
2938 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2939 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2940 }
2941 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2942 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2943 };
2944 local_var_req_builder = local_var_req_builder.json(&request_body);
2945
2946 let local_var_req = local_var_req_builder.build()?;
2947 let local_var_resp = local_var_client.execute(local_var_req).await?;
2948
2949 let local_var_status = local_var_resp.status();
2950 let local_var_content = local_var_resp.text().await?;
2951
2952 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2953 crate::from_str_patched(&local_var_content).map_err(Error::from)
2954 } else {
2955 let local_var_entity: Option<RunWaitResultScriptByPathError> = crate::from_str_patched(&local_var_content).ok();
2956 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2957 Err(Error::ResponseError(local_var_error))
2958 }
2959}
2960
2961pub async fn run_wait_result_script_by_path_get(configuration: &configuration::Configuration, workspace: &str, path: &str, parent_job: Option<&str>, tag: Option<&str>, cache_ttl: Option<&str>, job_id: Option<&str>, include_header: Option<&str>, queue_limit: Option<&str>, payload: Option<&str>, skip_preprocessor: Option<bool>) -> Result<serde_json::Value, Error<RunWaitResultScriptByPathGetError>> {
2962 let local_var_configuration = configuration;
2963
2964 let local_var_client = &local_var_configuration.client;
2965
2966 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_wait_result/p/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
2967 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2968
2969 if let Some(ref local_var_str) = parent_job {
2970 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
2971 }
2972 if let Some(ref local_var_str) = tag {
2973 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
2974 }
2975 if let Some(ref local_var_str) = cache_ttl {
2976 local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
2977 }
2978 if let Some(ref local_var_str) = job_id {
2979 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
2980 }
2981 if let Some(ref local_var_str) = include_header {
2982 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
2983 }
2984 if let Some(ref local_var_str) = queue_limit {
2985 local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
2986 }
2987 if let Some(ref local_var_str) = payload {
2988 local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
2989 }
2990 if let Some(ref local_var_str) = skip_preprocessor {
2991 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
2992 }
2993 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2994 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2995 }
2996 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2997 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2998 };
2999
3000 let local_var_req = local_var_req_builder.build()?;
3001 let local_var_resp = local_var_client.execute(local_var_req).await?;
3002
3003 let local_var_status = local_var_resp.status();
3004 let local_var_content = local_var_resp.text().await?;
3005
3006 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3007 crate::from_str_patched(&local_var_content).map_err(Error::from)
3008 } else {
3009 let local_var_entity: Option<RunWaitResultScriptByPathGetError> = crate::from_str_patched(&local_var_content).ok();
3010 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3011 Err(Error::ResponseError(local_var_error))
3012 }
3013}
3014
3015pub async fn set_flow_user_state(configuration: &configuration::Configuration, workspace: &str, id: &str, key: &str, body: Option<serde_json::Value>) -> Result<String, Error<SetFlowUserStateError>> {
3016 let local_var_configuration = configuration;
3017
3018 let local_var_client = &local_var_configuration.client;
3019
3020 let local_var_uri_str = format!("{}/w/{workspace}/jobs/flow/user_states/{id}/{key}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id), key=crate::apis::urlencode(key));
3021 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3022
3023 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3024 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3025 }
3026 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3027 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3028 };
3029 local_var_req_builder = local_var_req_builder.json(&body);
3030
3031 let local_var_req = local_var_req_builder.build()?;
3032 let local_var_resp = local_var_client.execute(local_var_req).await?;
3033
3034 let local_var_status = local_var_resp.status();
3035 let local_var_content = local_var_resp.text().await?;
3036
3037 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3038 crate::from_str_patched(&local_var_content).map_err(Error::from)
3039 } else {
3040 let local_var_entity: Option<SetFlowUserStateError> = crate::from_str_patched(&local_var_content).ok();
3041 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3042 Err(Error::ResponseError(local_var_error))
3043 }
3044}
3045