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 DeleteJobsError {
92 UnknownValue(serde_json::Value),
93}
94
95#[derive(Debug, Clone, Serialize, Deserialize)]
97#[serde(untagged)]
98pub enum ExportCompletedJobsError {
99 UnknownValue(serde_json::Value),
100}
101
102#[derive(Debug, Clone, Serialize, Deserialize)]
104#[serde(untagged)]
105pub enum ExportQueuedJobsError {
106 UnknownValue(serde_json::Value),
107}
108
109#[derive(Debug, Clone, Serialize, Deserialize)]
111#[serde(untagged)]
112pub enum ForceCancelQueuedJobError {
113 UnknownValue(serde_json::Value),
114}
115
116#[derive(Debug, Clone, Serialize, Deserialize)]
118#[serde(untagged)]
119pub enum GetCompletedCountError {
120 UnknownValue(serde_json::Value),
121}
122
123#[derive(Debug, Clone, Serialize, Deserialize)]
125#[serde(untagged)]
126pub enum GetCompletedJobError {
127 UnknownValue(serde_json::Value),
128}
129
130#[derive(Debug, Clone, Serialize, Deserialize)]
132#[serde(untagged)]
133pub enum GetCompletedJobLogsTailError {
134 UnknownValue(serde_json::Value),
135}
136
137#[derive(Debug, Clone, Serialize, Deserialize)]
139#[serde(untagged)]
140pub enum GetCompletedJobResultError {
141 UnknownValue(serde_json::Value),
142}
143
144#[derive(Debug, Clone, Serialize, Deserialize)]
146#[serde(untagged)]
147pub enum GetCompletedJobResultMaybeError {
148 UnknownValue(serde_json::Value),
149}
150
151#[derive(Debug, Clone, Serialize, Deserialize)]
153#[serde(untagged)]
154pub enum GetDbClockError {
155 UnknownValue(serde_json::Value),
156}
157
158#[derive(Debug, Clone, Serialize, Deserialize)]
160#[serde(untagged)]
161pub enum GetFlowDebugInfoError {
162 UnknownValue(serde_json::Value),
163}
164
165#[derive(Debug, Clone, Serialize, Deserialize)]
167#[serde(untagged)]
168pub enum GetFlowUserStateError {
169 UnknownValue(serde_json::Value),
170}
171
172#[derive(Debug, Clone, Serialize, Deserialize)]
174#[serde(untagged)]
175pub enum GetJobError {
176 UnknownValue(serde_json::Value),
177}
178
179#[derive(Debug, Clone, Serialize, Deserialize)]
181#[serde(untagged)]
182pub enum GetJobArgsError {
183 UnknownValue(serde_json::Value),
184}
185
186#[derive(Debug, Clone, Serialize, Deserialize)]
188#[serde(untagged)]
189pub enum GetJobLogsError {
190 UnknownValue(serde_json::Value),
191}
192
193#[derive(Debug, Clone, Serialize, Deserialize)]
195#[serde(untagged)]
196pub enum GetJobUpdatesError {
197 UnknownValue(serde_json::Value),
198}
199
200#[derive(Debug, Clone, Serialize, Deserialize)]
202#[serde(untagged)]
203pub enum GetJobUpdatesSseError {
204 UnknownValue(serde_json::Value),
205}
206
207#[derive(Debug, Clone, Serialize, Deserialize)]
209#[serde(untagged)]
210pub enum GetLogFileFromStoreError {
211 UnknownValue(serde_json::Value),
212}
213
214#[derive(Debug, Clone, Serialize, Deserialize)]
216#[serde(untagged)]
217pub enum GetQueueCountError {
218 UnknownValue(serde_json::Value),
219}
220
221#[derive(Debug, Clone, Serialize, Deserialize)]
223#[serde(untagged)]
224pub enum GetQueuePositionError {
225 UnknownValue(serde_json::Value),
226}
227
228#[derive(Debug, Clone, Serialize, Deserialize)]
230#[serde(untagged)]
231pub enum GetResumeUrlsError {
232 UnknownValue(serde_json::Value),
233}
234
235#[derive(Debug, Clone, Serialize, Deserialize)]
237#[serde(untagged)]
238pub enum GetRootJobIdError {
239 UnknownValue(serde_json::Value),
240}
241
242#[derive(Debug, Clone, Serialize, Deserialize)]
244#[serde(untagged)]
245pub enum GetScheduledForError {
246 UnknownValue(serde_json::Value),
247}
248
249#[derive(Debug, Clone, Serialize, Deserialize)]
251#[serde(untagged)]
252pub enum GetSlackApprovalPayloadError {
253 UnknownValue(serde_json::Value),
254}
255
256#[derive(Debug, Clone, Serialize, Deserialize)]
258#[serde(untagged)]
259pub enum GetStartedAtByIdsError {
260 UnknownValue(serde_json::Value),
261}
262
263#[derive(Debug, Clone, Serialize, Deserialize)]
265#[serde(untagged)]
266pub enum GetSuspendedJobFlowError {
267 UnknownValue(serde_json::Value),
268}
269
270#[derive(Debug, Clone, Serialize, Deserialize)]
272#[serde(untagged)]
273pub enum GetTeamsApprovalPayloadError {
274 UnknownValue(serde_json::Value),
275}
276
277#[derive(Debug, Clone, Serialize, Deserialize)]
279#[serde(untagged)]
280pub enum ImportCompletedJobsError {
281 UnknownValue(serde_json::Value),
282}
283
284#[derive(Debug, Clone, Serialize, Deserialize)]
286#[serde(untagged)]
287pub enum ImportQueuedJobsError {
288 UnknownValue(serde_json::Value),
289}
290
291#[derive(Debug, Clone, Serialize, Deserialize)]
293#[serde(untagged)]
294pub enum ListCompletedJobsError {
295 UnknownValue(serde_json::Value),
296}
297
298#[derive(Debug, Clone, Serialize, Deserialize)]
300#[serde(untagged)]
301pub enum ListExtendedJobsError {
302 UnknownValue(serde_json::Value),
303}
304
305#[derive(Debug, Clone, Serialize, Deserialize)]
307#[serde(untagged)]
308pub enum ListFilteredJobsUuidsError {
309 UnknownValue(serde_json::Value),
310}
311
312#[derive(Debug, Clone, Serialize, Deserialize)]
314#[serde(untagged)]
315pub enum ListFilteredQueueUuidsError {
316 UnknownValue(serde_json::Value),
317}
318
319#[derive(Debug, Clone, Serialize, Deserialize)]
321#[serde(untagged)]
322pub enum ListJobsError {
323 UnknownValue(serde_json::Value),
324}
325
326#[derive(Debug, Clone, Serialize, Deserialize)]
328#[serde(untagged)]
329pub enum ListQueueError {
330 UnknownValue(serde_json::Value),
331}
332
333#[derive(Debug, Clone, Serialize, Deserialize)]
335#[serde(untagged)]
336pub enum ListSelectedJobGroupsError {
337 UnknownValue(serde_json::Value),
338}
339
340#[derive(Debug, Clone, Serialize, Deserialize)]
342#[serde(untagged)]
343pub enum RestartFlowAtStepError {
344 UnknownValue(serde_json::Value),
345}
346
347#[derive(Debug, Clone, Serialize, Deserialize)]
349#[serde(untagged)]
350pub enum ResultByIdError {
351 UnknownValue(serde_json::Value),
352}
353
354#[derive(Debug, Clone, Serialize, Deserialize)]
356#[serde(untagged)]
357pub enum ResumeSuspendedFlowAsOwnerError {
358 UnknownValue(serde_json::Value),
359}
360
361#[derive(Debug, Clone, Serialize, Deserialize)]
363#[serde(untagged)]
364pub enum ResumeSuspendedJobGetError {
365 UnknownValue(serde_json::Value),
366}
367
368#[derive(Debug, Clone, Serialize, Deserialize)]
370#[serde(untagged)]
371pub enum ResumeSuspendedJobPostError {
372 UnknownValue(serde_json::Value),
373}
374
375#[derive(Debug, Clone, Serialize, Deserialize)]
377#[serde(untagged)]
378pub enum RunAndStreamFlowByPathError {
379 UnknownValue(serde_json::Value),
380}
381
382#[derive(Debug, Clone, Serialize, Deserialize)]
384#[serde(untagged)]
385pub enum RunAndStreamFlowByPathGetError {
386 UnknownValue(serde_json::Value),
387}
388
389#[derive(Debug, Clone, Serialize, Deserialize)]
391#[serde(untagged)]
392pub enum RunAndStreamFlowByVersionError {
393 UnknownValue(serde_json::Value),
394}
395
396#[derive(Debug, Clone, Serialize, Deserialize)]
398#[serde(untagged)]
399pub enum RunAndStreamFlowByVersionGetError {
400 UnknownValue(serde_json::Value),
401}
402
403#[derive(Debug, Clone, Serialize, Deserialize)]
405#[serde(untagged)]
406pub enum RunAndStreamScriptByHashError {
407 UnknownValue(serde_json::Value),
408}
409
410#[derive(Debug, Clone, Serialize, Deserialize)]
412#[serde(untagged)]
413pub enum RunAndStreamScriptByHashGetError {
414 UnknownValue(serde_json::Value),
415}
416
417#[derive(Debug, Clone, Serialize, Deserialize)]
419#[serde(untagged)]
420pub enum RunAndStreamScriptByPathError {
421 UnknownValue(serde_json::Value),
422}
423
424#[derive(Debug, Clone, Serialize, Deserialize)]
426#[serde(untagged)]
427pub enum RunAndStreamScriptByPathGetError {
428 UnknownValue(serde_json::Value),
429}
430
431#[derive(Debug, Clone, Serialize, Deserialize)]
433#[serde(untagged)]
434pub enum RunCodeWorkflowTaskError {
435 UnknownValue(serde_json::Value),
436}
437
438#[derive(Debug, Clone, Serialize, Deserialize)]
440#[serde(untagged)]
441pub enum RunDynamicSelectError {
442 UnknownValue(serde_json::Value),
443}
444
445#[derive(Debug, Clone, Serialize, Deserialize)]
447#[serde(untagged)]
448pub enum RunFlowByPathError {
449 UnknownValue(serde_json::Value),
450}
451
452#[derive(Debug, Clone, Serialize, Deserialize)]
454#[serde(untagged)]
455pub enum RunFlowByVersionError {
456 UnknownValue(serde_json::Value),
457}
458
459#[derive(Debug, Clone, Serialize, Deserialize)]
461#[serde(untagged)]
462pub enum RunFlowPreviewError {
463 UnknownValue(serde_json::Value),
464}
465
466#[derive(Debug, Clone, Serialize, Deserialize)]
468#[serde(untagged)]
469pub enum RunFlowPreviewAndWaitResultError {
470 UnknownValue(serde_json::Value),
471}
472
473#[derive(Debug, Clone, Serialize, Deserialize)]
475#[serde(untagged)]
476pub enum RunRawScriptDependenciesError {
477 UnknownValue(serde_json::Value),
478}
479
480#[derive(Debug, Clone, Serialize, Deserialize)]
482#[serde(untagged)]
483pub enum RunScriptByHashError {
484 UnknownValue(serde_json::Value),
485}
486
487#[derive(Debug, Clone, Serialize, Deserialize)]
489#[serde(untagged)]
490pub enum RunScriptByPathError {
491 UnknownValue(serde_json::Value),
492}
493
494#[derive(Debug, Clone, Serialize, Deserialize)]
496#[serde(untagged)]
497pub enum RunScriptPreviewError {
498 UnknownValue(serde_json::Value),
499}
500
501#[derive(Debug, Clone, Serialize, Deserialize)]
503#[serde(untagged)]
504pub enum RunScriptPreviewAndWaitResultError {
505 UnknownValue(serde_json::Value),
506}
507
508#[derive(Debug, Clone, Serialize, Deserialize)]
510#[serde(untagged)]
511pub enum RunScriptPreviewInlineError {
512 UnknownValue(serde_json::Value),
513}
514
515#[derive(Debug, Clone, Serialize, Deserialize)]
517#[serde(untagged)]
518pub enum RunWaitResultFlowByPathError {
519 UnknownValue(serde_json::Value),
520}
521
522#[derive(Debug, Clone, Serialize, Deserialize)]
524#[serde(untagged)]
525pub enum RunWaitResultFlowByVersionError {
526 UnknownValue(serde_json::Value),
527}
528
529#[derive(Debug, Clone, Serialize, Deserialize)]
531#[serde(untagged)]
532pub enum RunWaitResultFlowByVersionGetError {
533 UnknownValue(serde_json::Value),
534}
535
536#[derive(Debug, Clone, Serialize, Deserialize)]
538#[serde(untagged)]
539pub enum RunWaitResultScriptByPathError {
540 UnknownValue(serde_json::Value),
541}
542
543#[derive(Debug, Clone, Serialize, Deserialize)]
545#[serde(untagged)]
546pub enum RunWaitResultScriptByPathGetError {
547 UnknownValue(serde_json::Value),
548}
549
550#[derive(Debug, Clone, Serialize, Deserialize)]
552#[serde(untagged)]
553pub enum SetFlowUserStateError {
554 UnknownValue(serde_json::Value),
555}
556
557
558pub async fn batch_re_run_jobs(configuration: &configuration::Configuration, workspace: &str, batch_re_run_jobs_request: models::BatchReRunJobsRequest) -> Result<String, Error<BatchReRunJobsError>> {
559 let local_var_configuration = configuration;
560
561 let local_var_client = &local_var_configuration.client;
562
563 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/batch_rerun_jobs", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
564 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
565
566 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
567 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
568 }
569 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
570 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
571 };
572 local_var_req_builder = local_var_req_builder.json(&batch_re_run_jobs_request);
573
574 let local_var_req = local_var_req_builder.build()?;
575 let local_var_resp = local_var_client.execute(local_var_req).await?;
576
577 let local_var_status = local_var_resp.status();
578 let local_var_content = local_var_resp.text().await?;
579
580 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
581 crate::from_str_patched(&local_var_content).map_err(Error::from)
582 } else {
583 let local_var_entity: Option<BatchReRunJobsError> = crate::from_str_patched(&local_var_content).ok();
584 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
585 Err(Error::ResponseError(local_var_error))
586 }
587}
588
589pub async fn cancel_persistent_queued_jobs(configuration: &configuration::Configuration, workspace: &str, path: &str, cancel_queued_job_request: models::CancelQueuedJobRequest) -> Result<String, Error<CancelPersistentQueuedJobsError>> {
590 let local_var_configuration = configuration;
591
592 let local_var_client = &local_var_configuration.client;
593
594 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));
595 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
596
597 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
598 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
599 }
600 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
601 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
602 };
603 local_var_req_builder = local_var_req_builder.json(&cancel_queued_job_request);
604
605 let local_var_req = local_var_req_builder.build()?;
606 let local_var_resp = local_var_client.execute(local_var_req).await?;
607
608 let local_var_status = local_var_resp.status();
609 let local_var_content = local_var_resp.text().await?;
610
611 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
612 crate::from_str_patched(&local_var_content).map_err(Error::from)
613 } else {
614 let local_var_entity: Option<CancelPersistentQueuedJobsError> = crate::from_str_patched(&local_var_content).ok();
615 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
616 Err(Error::ResponseError(local_var_error))
617 }
618}
619
620pub async fn cancel_queued_job(configuration: &configuration::Configuration, workspace: &str, id: &str, cancel_queued_job_request: models::CancelQueuedJobRequest) -> Result<String, Error<CancelQueuedJobError>> {
621 let local_var_configuration = configuration;
622
623 let local_var_client = &local_var_configuration.client;
624
625 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));
626 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
627
628 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
629 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
630 }
631 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
632 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
633 };
634 local_var_req_builder = local_var_req_builder.json(&cancel_queued_job_request);
635
636 let local_var_req = local_var_req_builder.build()?;
637 let local_var_resp = local_var_client.execute(local_var_req).await?;
638
639 let local_var_status = local_var_resp.status();
640 let local_var_content = local_var_resp.text().await?;
641
642 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
643 crate::from_str_patched(&local_var_content).map_err(Error::from)
644 } else {
645 let local_var_entity: Option<CancelQueuedJobError> = crate::from_str_patched(&local_var_content).ok();
646 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
647 Err(Error::ResponseError(local_var_error))
648 }
649}
650
651pub async fn cancel_selection(configuration: &configuration::Configuration, workspace: &str, request_body: Vec<String>, force_cancel: Option<bool>) -> Result<Vec<String>, Error<CancelSelectionError>> {
652 let local_var_configuration = configuration;
653
654 let local_var_client = &local_var_configuration.client;
655
656 let local_var_uri_str = format!("{}/w/{workspace}/jobs/queue/cancel_selection", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
657 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
658
659 if let Some(ref local_var_str) = force_cancel {
660 local_var_req_builder = local_var_req_builder.query(&[("force_cancel", &local_var_str.to_string())]);
661 }
662 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
663 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
664 }
665 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
666 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
667 };
668 local_var_req_builder = local_var_req_builder.json(&request_body);
669
670 let local_var_req = local_var_req_builder.build()?;
671 let local_var_resp = local_var_client.execute(local_var_req).await?;
672
673 let local_var_status = local_var_resp.status();
674 let local_var_content = local_var_resp.text().await?;
675
676 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
677 crate::from_str_patched(&local_var_content).map_err(Error::from)
678 } else {
679 let local_var_entity: Option<CancelSelectionError> = crate::from_str_patched(&local_var_content).ok();
680 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
681 Err(Error::ResponseError(local_var_error))
682 }
683}
684
685pub 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>> {
686 let local_var_configuration = configuration;
687
688 let local_var_client = &local_var_configuration.client;
689
690 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));
691 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
692
693 if let Some(ref local_var_str) = approver {
694 local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
695 }
696 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
697 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
698 }
699 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
700 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
701 };
702
703 let local_var_req = local_var_req_builder.build()?;
704 let local_var_resp = local_var_client.execute(local_var_req).await?;
705
706 let local_var_status = local_var_resp.status();
707 let local_var_content = local_var_resp.text().await?;
708
709 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
710 crate::from_str_patched(&local_var_content).map_err(Error::from)
711 } else {
712 let local_var_entity: Option<CancelSuspendedJobGetError> = crate::from_str_patched(&local_var_content).ok();
713 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
714 Err(Error::ResponseError(local_var_error))
715 }
716}
717
718pub 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>> {
719 let local_var_configuration = configuration;
720
721 let local_var_client = &local_var_configuration.client;
722
723 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));
724 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
725
726 if let Some(ref local_var_str) = approver {
727 local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
728 }
729 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
730 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
731 }
732 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
733 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
734 };
735 local_var_req_builder = local_var_req_builder.json(&body);
736
737 let local_var_req = local_var_req_builder.build()?;
738 let local_var_resp = local_var_client.execute(local_var_req).await?;
739
740 let local_var_status = local_var_resp.status();
741 let local_var_content = local_var_resp.text().await?;
742
743 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
744 crate::from_str_patched(&local_var_content).map_err(Error::from)
745 } else {
746 let local_var_entity: Option<CancelSuspendedJobPostError> = crate::from_str_patched(&local_var_content).ok();
747 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
748 Err(Error::ResponseError(local_var_error))
749 }
750}
751
752pub 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>> {
753 let local_var_configuration = configuration;
754
755 let local_var_client = &local_var_configuration.client;
756
757 let local_var_uri_str = format!("{}/w/{workspace}/jobs/completed/count_jobs", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
758 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
759
760 if let Some(ref local_var_str) = completed_after_s_ago {
761 local_var_req_builder = local_var_req_builder.query(&[("completed_after_s_ago", &local_var_str.to_string())]);
762 }
763 if let Some(ref local_var_str) = success {
764 local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
765 }
766 if let Some(ref local_var_str) = tags {
767 local_var_req_builder = local_var_req_builder.query(&[("tags", &local_var_str.to_string())]);
768 }
769 if let Some(ref local_var_str) = all_workspaces {
770 local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
771 }
772 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
773 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
774 }
775 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
776 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
777 };
778
779 let local_var_req = local_var_req_builder.build()?;
780 let local_var_resp = local_var_client.execute(local_var_req).await?;
781
782 let local_var_status = local_var_resp.status();
783 let local_var_content = local_var_resp.text().await?;
784
785 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
786 crate::from_str_patched(&local_var_content).map_err(Error::from)
787 } else {
788 let local_var_entity: Option<CountCompletedJobsError> = crate::from_str_patched(&local_var_content).ok();
789 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
790 Err(Error::ResponseError(local_var_error))
791 }
792}
793
794pub async fn count_jobs_by_tag(configuration: &configuration::Configuration, horizon_secs: Option<i32>, workspace_id: Option<&str>) -> Result<Vec<models::CountJobsByTag200ResponseInner>, Error<CountJobsByTagError>> {
795 let local_var_configuration = configuration;
796
797 let local_var_client = &local_var_configuration.client;
798
799 let local_var_uri_str = format!("{}/jobs/completed/count_by_tag", local_var_configuration.base_path);
800 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
801
802 if let Some(ref local_var_str) = horizon_secs {
803 local_var_req_builder = local_var_req_builder.query(&[("horizon_secs", &local_var_str.to_string())]);
804 }
805 if let Some(ref local_var_str) = workspace_id {
806 local_var_req_builder = local_var_req_builder.query(&[("workspace_id", &local_var_str.to_string())]);
807 }
808 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
809 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
810 }
811 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
812 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
813 };
814
815 let local_var_req = local_var_req_builder.build()?;
816 let local_var_resp = local_var_client.execute(local_var_req).await?;
817
818 let local_var_status = local_var_resp.status();
819 let local_var_content = local_var_resp.text().await?;
820
821 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
822 crate::from_str_patched(&local_var_content).map_err(Error::from)
823 } else {
824 let local_var_entity: Option<CountJobsByTagError> = crate::from_str_patched(&local_var_content).ok();
825 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
826 Err(Error::ResponseError(local_var_error))
827 }
828}
829
830pub async fn create_job_signature(configuration: &configuration::Configuration, workspace: &str, id: &str, resume_id: i32, approver: Option<&str>) -> Result<String, Error<CreateJobSignatureError>> {
831 let local_var_configuration = configuration;
832
833 let local_var_client = &local_var_configuration.client;
834
835 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);
836 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
837
838 if let Some(ref local_var_str) = approver {
839 local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
840 }
841 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
842 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
843 }
844 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
845 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
846 };
847
848 let local_var_req = local_var_req_builder.build()?;
849 let local_var_resp = local_var_client.execute(local_var_req).await?;
850
851 let local_var_status = local_var_resp.status();
852 let local_var_content = local_var_resp.text().await?;
853
854 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
855 crate::from_str_patched(&local_var_content).map_err(Error::from)
856 } else {
857 let local_var_entity: Option<CreateJobSignatureError> = crate::from_str_patched(&local_var_content).ok();
858 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
859 Err(Error::ResponseError(local_var_error))
860 }
861}
862
863pub async fn delete_completed_job(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<models::CompletedJob, Error<DeleteCompletedJobError>> {
864 let local_var_configuration = configuration;
865
866 let local_var_client = &local_var_configuration.client;
867
868 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));
869 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
870
871 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
872 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
873 }
874 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
875 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
876 };
877
878 let local_var_req = local_var_req_builder.build()?;
879 let local_var_resp = local_var_client.execute(local_var_req).await?;
880
881 let local_var_status = local_var_resp.status();
882 let local_var_content = local_var_resp.text().await?;
883
884 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
885 crate::from_str_patched(&local_var_content).map_err(Error::from)
886 } else {
887 let local_var_entity: Option<DeleteCompletedJobError> = crate::from_str_patched(&local_var_content).ok();
888 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
889 Err(Error::ResponseError(local_var_error))
890 }
891}
892
893pub async fn delete_jobs(configuration: &configuration::Configuration, workspace: &str, uuid_colon_colon_uuid: Vec<uuid::Uuid>) -> Result<String, Error<DeleteJobsError>> {
894 let local_var_configuration = configuration;
895
896 let local_var_client = &local_var_configuration.client;
897
898 let local_var_uri_str = format!("{}/w/{workspace}/jobs/delete", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
899 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
900
901 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
902 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
903 }
904 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
905 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
906 };
907 local_var_req_builder = local_var_req_builder.json(&uuid_colon_colon_uuid);
908
909 let local_var_req = local_var_req_builder.build()?;
910 let local_var_resp = local_var_client.execute(local_var_req).await?;
911
912 let local_var_status = local_var_resp.status();
913 let local_var_content = local_var_resp.text().await?;
914
915 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
916 crate::from_str_patched(&local_var_content).map_err(Error::from)
917 } else {
918 let local_var_entity: Option<DeleteJobsError> = crate::from_str_patched(&local_var_content).ok();
919 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
920 Err(Error::ResponseError(local_var_error))
921 }
922}
923
924pub async fn export_completed_jobs(configuration: &configuration::Configuration, workspace: &str, page: Option<i32>, per_page: Option<i32>) -> Result<Vec<models::ExportableCompletedJob>, Error<ExportCompletedJobsError>> {
925 let local_var_configuration = configuration;
926
927 let local_var_client = &local_var_configuration.client;
928
929 let local_var_uri_str = format!("{}/w/{workspace}/jobs/completed/export", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
930 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
931
932 if let Some(ref local_var_str) = page {
933 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
934 }
935 if let Some(ref local_var_str) = per_page {
936 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
937 }
938 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
939 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
940 }
941 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
942 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
943 };
944
945 let local_var_req = local_var_req_builder.build()?;
946 let local_var_resp = local_var_client.execute(local_var_req).await?;
947
948 let local_var_status = local_var_resp.status();
949 let local_var_content = local_var_resp.text().await?;
950
951 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
952 crate::from_str_patched(&local_var_content).map_err(Error::from)
953 } else {
954 let local_var_entity: Option<ExportCompletedJobsError> = crate::from_str_patched(&local_var_content).ok();
955 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
956 Err(Error::ResponseError(local_var_error))
957 }
958}
959
960pub async fn export_queued_jobs(configuration: &configuration::Configuration, workspace: &str, page: Option<i32>, per_page: Option<i32>) -> Result<Vec<models::ExportableQueuedJob>, Error<ExportQueuedJobsError>> {
961 let local_var_configuration = configuration;
962
963 let local_var_client = &local_var_configuration.client;
964
965 let local_var_uri_str = format!("{}/w/{workspace}/jobs/queue/export", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
966 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
967
968 if let Some(ref local_var_str) = page {
969 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
970 }
971 if let Some(ref local_var_str) = per_page {
972 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
973 }
974 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
975 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
976 }
977 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
978 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
979 };
980
981 let local_var_req = local_var_req_builder.build()?;
982 let local_var_resp = local_var_client.execute(local_var_req).await?;
983
984 let local_var_status = local_var_resp.status();
985 let local_var_content = local_var_resp.text().await?;
986
987 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
988 crate::from_str_patched(&local_var_content).map_err(Error::from)
989 } else {
990 let local_var_entity: Option<ExportQueuedJobsError> = crate::from_str_patched(&local_var_content).ok();
991 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
992 Err(Error::ResponseError(local_var_error))
993 }
994}
995
996pub async fn force_cancel_queued_job(configuration: &configuration::Configuration, workspace: &str, id: &str, cancel_queued_job_request: models::CancelQueuedJobRequest) -> Result<String, Error<ForceCancelQueuedJobError>> {
997 let local_var_configuration = configuration;
998
999 let local_var_client = &local_var_configuration.client;
1000
1001 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/queue/force_cancel/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1002 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1003
1004 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1005 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1006 }
1007 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1008 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1009 };
1010 local_var_req_builder = local_var_req_builder.json(&cancel_queued_job_request);
1011
1012 let local_var_req = local_var_req_builder.build()?;
1013 let local_var_resp = local_var_client.execute(local_var_req).await?;
1014
1015 let local_var_status = local_var_resp.status();
1016 let local_var_content = local_var_resp.text().await?;
1017
1018 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1019 crate::from_str_patched(&local_var_content).map_err(Error::from)
1020 } else {
1021 let local_var_entity: Option<ForceCancelQueuedJobError> = crate::from_str_patched(&local_var_content).ok();
1022 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1023 Err(Error::ResponseError(local_var_error))
1024 }
1025}
1026
1027pub async fn get_completed_count(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetCompletedCount200Response, Error<GetCompletedCountError>> {
1028 let local_var_configuration = configuration;
1029
1030 let local_var_client = &local_var_configuration.client;
1031
1032 let local_var_uri_str = format!("{}/w/{workspace}/jobs/completed/count", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1033 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1034
1035 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1036 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1037 }
1038 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1039 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1040 };
1041
1042 let local_var_req = local_var_req_builder.build()?;
1043 let local_var_resp = local_var_client.execute(local_var_req).await?;
1044
1045 let local_var_status = local_var_resp.status();
1046 let local_var_content = local_var_resp.text().await?;
1047
1048 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1049 crate::from_str_patched(&local_var_content).map_err(Error::from)
1050 } else {
1051 let local_var_entity: Option<GetCompletedCountError> = crate::from_str_patched(&local_var_content).ok();
1052 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1053 Err(Error::ResponseError(local_var_error))
1054 }
1055}
1056
1057pub async fn get_completed_job(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<models::CompletedJob, Error<GetCompletedJobError>> {
1058 let local_var_configuration = configuration;
1059
1060 let local_var_client = &local_var_configuration.client;
1061
1062 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/completed/get/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1063 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1064
1065 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1066 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1067 }
1068 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1069 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1070 };
1071
1072 let local_var_req = local_var_req_builder.build()?;
1073 let local_var_resp = local_var_client.execute(local_var_req).await?;
1074
1075 let local_var_status = local_var_resp.status();
1076 let local_var_content = local_var_resp.text().await?;
1077
1078 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1079 crate::from_str_patched(&local_var_content).map_err(Error::from)
1080 } else {
1081 let local_var_entity: Option<GetCompletedJobError> = crate::from_str_patched(&local_var_content).ok();
1082 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1083 Err(Error::ResponseError(local_var_error))
1084 }
1085}
1086
1087pub async fn get_completed_job_logs_tail(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<String, Error<GetCompletedJobLogsTailError>> {
1088 let local_var_configuration = configuration;
1089
1090 let local_var_client = &local_var_configuration.client;
1091
1092 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));
1093 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1094
1095 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1096 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1097 }
1098 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1099 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1100 };
1101
1102 let local_var_req = local_var_req_builder.build()?;
1103 let local_var_resp = local_var_client.execute(local_var_req).await?;
1104
1105 let local_var_status = local_var_resp.status();
1106 let local_var_content = local_var_resp.text().await?;
1107
1108 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1109 crate::from_str_patched(&local_var_content).map_err(Error::from)
1110 } else {
1111 let local_var_entity: Option<GetCompletedJobLogsTailError> = crate::from_str_patched(&local_var_content).ok();
1112 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1113 Err(Error::ResponseError(local_var_error))
1114 }
1115}
1116
1117pub 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>> {
1118 let local_var_configuration = configuration;
1119
1120 let local_var_client = &local_var_configuration.client;
1121
1122 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));
1123 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1124
1125 if let Some(ref local_var_str) = suspended_job {
1126 local_var_req_builder = local_var_req_builder.query(&[("suspended_job", &local_var_str.to_string())]);
1127 }
1128 if let Some(ref local_var_str) = resume_id {
1129 local_var_req_builder = local_var_req_builder.query(&[("resume_id", &local_var_str.to_string())]);
1130 }
1131 if let Some(ref local_var_str) = secret {
1132 local_var_req_builder = local_var_req_builder.query(&[("secret", &local_var_str.to_string())]);
1133 }
1134 if let Some(ref local_var_str) = approver {
1135 local_var_req_builder = local_var_req_builder.query(&[("approver", &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<GetCompletedJobResultError> = 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_completed_job_result_maybe(configuration: &configuration::Configuration, workspace: &str, id: &str, get_started: Option<bool>) -> Result<models::GetCompletedJobResultMaybe200Response, Error<GetCompletedJobResultMaybeError>> {
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/completed/get_result_maybe/{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) = get_started {
1168 local_var_req_builder = local_var_req_builder.query(&[("get_started", &local_var_str.to_string())]);
1169 }
1170 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1171 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1172 }
1173 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1174 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1175 };
1176
1177 let local_var_req = local_var_req_builder.build()?;
1178 let local_var_resp = local_var_client.execute(local_var_req).await?;
1179
1180 let local_var_status = local_var_resp.status();
1181 let local_var_content = local_var_resp.text().await?;
1182
1183 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1184 crate::from_str_patched(&local_var_content).map_err(Error::from)
1185 } else {
1186 let local_var_entity: Option<GetCompletedJobResultMaybeError> = crate::from_str_patched(&local_var_content).ok();
1187 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1188 Err(Error::ResponseError(local_var_error))
1189 }
1190}
1191
1192pub async fn get_db_clock(configuration: &configuration::Configuration, ) -> Result<i32, Error<GetDbClockError>> {
1193 let local_var_configuration = configuration;
1194
1195 let local_var_client = &local_var_configuration.client;
1196
1197 let local_var_uri_str = format!("{}/jobs/db_clock", local_var_configuration.base_path);
1198 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1199
1200 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1201 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1202 }
1203 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1204 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1205 };
1206
1207 let local_var_req = local_var_req_builder.build()?;
1208 let local_var_resp = local_var_client.execute(local_var_req).await?;
1209
1210 let local_var_status = local_var_resp.status();
1211 let local_var_content = local_var_resp.text().await?;
1212
1213 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1214 crate::from_str_patched(&local_var_content).map_err(Error::from)
1215 } else {
1216 let local_var_entity: Option<GetDbClockError> = crate::from_str_patched(&local_var_content).ok();
1217 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1218 Err(Error::ResponseError(local_var_error))
1219 }
1220}
1221
1222pub async fn get_flow_debug_info(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<serde_json::Value, Error<GetFlowDebugInfoError>> {
1223 let local_var_configuration = configuration;
1224
1225 let local_var_client = &local_var_configuration.client;
1226
1227 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));
1228 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
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<GetFlowDebugInfoError> = 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_flow_user_state(configuration: &configuration::Configuration, workspace: &str, id: &str, key: &str) -> Result<serde_json::Value, Error<GetFlowUserStateError>> {
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/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));
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<GetFlowUserStateError> = 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_job(configuration: &configuration::Configuration, workspace: &str, id: &str, no_logs: Option<bool>, no_code: Option<bool>) -> Result<models::Job, Error<GetJobError>> {
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_u/get/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
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) = no_logs {
1291 local_var_req_builder = local_var_req_builder.query(&[("no_logs", &local_var_str.to_string())]);
1292 }
1293 if let Some(ref local_var_str) = no_code {
1294 local_var_req_builder = local_var_req_builder.query(&[("no_code", &local_var_str.to_string())]);
1295 }
1296 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1297 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1298 }
1299 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1300 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1301 };
1302
1303 let local_var_req = local_var_req_builder.build()?;
1304 let local_var_resp = local_var_client.execute(local_var_req).await?;
1305
1306 let local_var_status = local_var_resp.status();
1307 let local_var_content = local_var_resp.text().await?;
1308
1309 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1310 crate::from_str_patched(&local_var_content).map_err(Error::from)
1311 } else {
1312 let local_var_entity: Option<GetJobError> = crate::from_str_patched(&local_var_content).ok();
1313 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1314 Err(Error::ResponseError(local_var_error))
1315 }
1316}
1317
1318pub async fn get_job_args(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<serde_json::Value, Error<GetJobArgsError>> {
1319 let local_var_configuration = configuration;
1320
1321 let local_var_client = &local_var_configuration.client;
1322
1323 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));
1324 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1325
1326 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1327 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1328 }
1329 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1330 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1331 };
1332
1333 let local_var_req = local_var_req_builder.build()?;
1334 let local_var_resp = local_var_client.execute(local_var_req).await?;
1335
1336 let local_var_status = local_var_resp.status();
1337 let local_var_content = local_var_resp.text().await?;
1338
1339 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1340 crate::from_str_patched(&local_var_content).map_err(Error::from)
1341 } else {
1342 let local_var_entity: Option<GetJobArgsError> = crate::from_str_patched(&local_var_content).ok();
1343 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1344 Err(Error::ResponseError(local_var_error))
1345 }
1346}
1347
1348pub async fn get_job_logs(configuration: &configuration::Configuration, workspace: &str, id: &str, remove_ansi_warnings: Option<bool>) -> Result<String, Error<GetJobLogsError>> {
1349 let local_var_configuration = configuration;
1350
1351 let local_var_client = &local_var_configuration.client;
1352
1353 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));
1354 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1355
1356 if let Some(ref local_var_str) = remove_ansi_warnings {
1357 local_var_req_builder = local_var_req_builder.query(&[("remove_ansi_warnings", &local_var_str.to_string())]);
1358 }
1359 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1360 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1361 }
1362 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1363 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1364 };
1365
1366 let local_var_req = local_var_req_builder.build()?;
1367 let local_var_resp = local_var_client.execute(local_var_req).await?;
1368
1369 let local_var_status = local_var_resp.status();
1370 let local_var_content = local_var_resp.text().await?;
1371
1372 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1373 crate::from_str_patched(&local_var_content).map_err(Error::from)
1374 } else {
1375 let local_var_entity: Option<GetJobLogsError> = crate::from_str_patched(&local_var_content).ok();
1376 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1377 Err(Error::ResponseError(local_var_error))
1378 }
1379}
1380
1381pub 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>> {
1382 let local_var_configuration = configuration;
1383
1384 let local_var_client = &local_var_configuration.client;
1385
1386 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));
1387 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1388
1389 if let Some(ref local_var_str) = running {
1390 local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
1391 }
1392 if let Some(ref local_var_str) = log_offset {
1393 local_var_req_builder = local_var_req_builder.query(&[("log_offset", &local_var_str.to_string())]);
1394 }
1395 if let Some(ref local_var_str) = stream_offset {
1396 local_var_req_builder = local_var_req_builder.query(&[("stream_offset", &local_var_str.to_string())]);
1397 }
1398 if let Some(ref local_var_str) = get_progress {
1399 local_var_req_builder = local_var_req_builder.query(&[("get_progress", &local_var_str.to_string())]);
1400 }
1401 if let Some(ref local_var_str) = no_logs {
1402 local_var_req_builder = local_var_req_builder.query(&[("no_logs", &local_var_str.to_string())]);
1403 }
1404 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1405 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1406 }
1407 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1408 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1409 };
1410
1411 let local_var_req = local_var_req_builder.build()?;
1412 let local_var_resp = local_var_client.execute(local_var_req).await?;
1413
1414 let local_var_status = local_var_resp.status();
1415 let local_var_content = local_var_resp.text().await?;
1416
1417 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1418 crate::from_str_patched(&local_var_content).map_err(Error::from)
1419 } else {
1420 let local_var_entity: Option<GetJobUpdatesError> = crate::from_str_patched(&local_var_content).ok();
1421 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1422 Err(Error::ResponseError(local_var_error))
1423 }
1424}
1425
1426pub async fn 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>> {
1427 let local_var_configuration = configuration;
1428
1429 let local_var_client = &local_var_configuration.client;
1430
1431 let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/getupdate_sse/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1432 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1433
1434 if let Some(ref local_var_str) = running {
1435 local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
1436 }
1437 if let Some(ref local_var_str) = log_offset {
1438 local_var_req_builder = local_var_req_builder.query(&[("log_offset", &local_var_str.to_string())]);
1439 }
1440 if let Some(ref local_var_str) = stream_offset {
1441 local_var_req_builder = local_var_req_builder.query(&[("stream_offset", &local_var_str.to_string())]);
1442 }
1443 if let Some(ref local_var_str) = get_progress {
1444 local_var_req_builder = local_var_req_builder.query(&[("get_progress", &local_var_str.to_string())]);
1445 }
1446 if let Some(ref local_var_str) = only_result {
1447 local_var_req_builder = local_var_req_builder.query(&[("only_result", &local_var_str.to_string())]);
1448 }
1449 if let Some(ref local_var_str) = no_logs {
1450 local_var_req_builder = local_var_req_builder.query(&[("no_logs", &local_var_str.to_string())]);
1451 }
1452 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1453 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1454 }
1455 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1456 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1457 };
1458
1459 let local_var_req = local_var_req_builder.build()?;
1460 let local_var_resp = local_var_client.execute(local_var_req).await?;
1461
1462 let local_var_status = local_var_resp.status();
1463 let local_var_content = local_var_resp.text().await?;
1464
1465 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1466 crate::from_str_patched(&local_var_content).map_err(Error::from)
1467 } else {
1468 let local_var_entity: Option<GetJobUpdatesSseError> = crate::from_str_patched(&local_var_content).ok();
1469 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1470 Err(Error::ResponseError(local_var_error))
1471 }
1472}
1473
1474pub async fn get_log_file_from_store(configuration: &configuration::Configuration, workspace: &str, path: &str) -> Result<String, Error<GetLogFileFromStoreError>> {
1475 let local_var_configuration = configuration;
1476
1477 let local_var_client = &local_var_configuration.client;
1478
1479 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));
1480 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1481
1482 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1483 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1484 }
1485 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1486 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1487 };
1488
1489 let local_var_req = local_var_req_builder.build()?;
1490 let local_var_resp = local_var_client.execute(local_var_req).await?;
1491
1492 let local_var_status = local_var_resp.status();
1493 let local_var_content = local_var_resp.text().await?;
1494
1495 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1496 crate::from_str_patched(&local_var_content).map_err(Error::from)
1497 } else {
1498 let local_var_entity: Option<GetLogFileFromStoreError> = crate::from_str_patched(&local_var_content).ok();
1499 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1500 Err(Error::ResponseError(local_var_error))
1501 }
1502}
1503
1504pub async fn get_queue_count(configuration: &configuration::Configuration, workspace: &str, all_workspaces: Option<bool>) -> Result<models::GetQueueCount200Response, Error<GetQueueCountError>> {
1505 let local_var_configuration = configuration;
1506
1507 let local_var_client = &local_var_configuration.client;
1508
1509 let local_var_uri_str = format!("{}/w/{workspace}/jobs/queue/count", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1510 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1511
1512 if let Some(ref local_var_str) = all_workspaces {
1513 local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
1514 }
1515 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1516 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1517 }
1518 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1519 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1520 };
1521
1522 let local_var_req = local_var_req_builder.build()?;
1523 let local_var_resp = local_var_client.execute(local_var_req).await?;
1524
1525 let local_var_status = local_var_resp.status();
1526 let local_var_content = local_var_resp.text().await?;
1527
1528 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1529 crate::from_str_patched(&local_var_content).map_err(Error::from)
1530 } else {
1531 let local_var_entity: Option<GetQueueCountError> = crate::from_str_patched(&local_var_content).ok();
1532 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1533 Err(Error::ResponseError(local_var_error))
1534 }
1535}
1536
1537pub async fn get_queue_position(configuration: &configuration::Configuration, workspace: &str, scheduled_for: i32) -> Result<models::GetQueuePosition200Response, Error<GetQueuePositionError>> {
1538 let local_var_configuration = configuration;
1539
1540 let local_var_client = &local_var_configuration.client;
1541
1542 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);
1543 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1544
1545 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1546 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1547 }
1548 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1549 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1550 };
1551
1552 let local_var_req = local_var_req_builder.build()?;
1553 let local_var_resp = local_var_client.execute(local_var_req).await?;
1554
1555 let local_var_status = local_var_resp.status();
1556 let local_var_content = local_var_resp.text().await?;
1557
1558 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1559 crate::from_str_patched(&local_var_content).map_err(Error::from)
1560 } else {
1561 let local_var_entity: Option<GetQueuePositionError> = crate::from_str_patched(&local_var_content).ok();
1562 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1563 Err(Error::ResponseError(local_var_error))
1564 }
1565}
1566
1567pub async fn get_resume_urls(configuration: &configuration::Configuration, workspace: &str, id: &str, resume_id: i32, approver: Option<&str>) -> Result<models::GetResumeUrls200Response, Error<GetResumeUrlsError>> {
1568 let local_var_configuration = configuration;
1569
1570 let local_var_client = &local_var_configuration.client;
1571
1572 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);
1573 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1574
1575 if let Some(ref local_var_str) = approver {
1576 local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
1577 }
1578 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1579 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1580 }
1581 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1582 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1583 };
1584
1585 let local_var_req = local_var_req_builder.build()?;
1586 let local_var_resp = local_var_client.execute(local_var_req).await?;
1587
1588 let local_var_status = local_var_resp.status();
1589 let local_var_content = local_var_resp.text().await?;
1590
1591 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1592 crate::from_str_patched(&local_var_content).map_err(Error::from)
1593 } else {
1594 let local_var_entity: Option<GetResumeUrlsError> = crate::from_str_patched(&local_var_content).ok();
1595 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1596 Err(Error::ResponseError(local_var_error))
1597 }
1598}
1599
1600pub async fn get_root_job_id(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<String, Error<GetRootJobIdError>> {
1601 let local_var_configuration = configuration;
1602
1603 let local_var_client = &local_var_configuration.client;
1604
1605 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));
1606 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1607
1608 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1609 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1610 }
1611 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1612 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1613 };
1614
1615 let local_var_req = local_var_req_builder.build()?;
1616 let local_var_resp = local_var_client.execute(local_var_req).await?;
1617
1618 let local_var_status = local_var_resp.status();
1619 let local_var_content = local_var_resp.text().await?;
1620
1621 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1622 crate::from_str_patched(&local_var_content).map_err(Error::from)
1623 } else {
1624 let local_var_entity: Option<GetRootJobIdError> = crate::from_str_patched(&local_var_content).ok();
1625 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1626 Err(Error::ResponseError(local_var_error))
1627 }
1628}
1629
1630pub async fn get_scheduled_for(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<i32, Error<GetScheduledForError>> {
1631 let local_var_configuration = configuration;
1632
1633 let local_var_client = &local_var_configuration.client;
1634
1635 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));
1636 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1637
1638 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1639 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1640 }
1641 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1642 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1643 };
1644
1645 let local_var_req = local_var_req_builder.build()?;
1646 let local_var_resp = local_var_client.execute(local_var_req).await?;
1647
1648 let local_var_status = local_var_resp.status();
1649 let local_var_content = local_var_resp.text().await?;
1650
1651 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1652 crate::from_str_patched(&local_var_content).map_err(Error::from)
1653 } else {
1654 let local_var_entity: Option<GetScheduledForError> = crate::from_str_patched(&local_var_content).ok();
1655 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1656 Err(Error::ResponseError(local_var_error))
1657 }
1658}
1659
1660pub 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>> {
1661 let local_var_configuration = configuration;
1662
1663 let local_var_client = &local_var_configuration.client;
1664
1665 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));
1666 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1667
1668 if let Some(ref local_var_str) = approver {
1669 local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
1670 }
1671 if let Some(ref local_var_str) = message {
1672 local_var_req_builder = local_var_req_builder.query(&[("message", &local_var_str.to_string())]);
1673 }
1674 local_var_req_builder = local_var_req_builder.query(&[("slack_resource_path", &slack_resource_path.to_string())]);
1675 local_var_req_builder = local_var_req_builder.query(&[("channel_id", &channel_id.to_string())]);
1676 local_var_req_builder = local_var_req_builder.query(&[("flow_step_id", &flow_step_id.to_string())]);
1677 if let Some(ref local_var_str) = default_args_json {
1678 local_var_req_builder = local_var_req_builder.query(&[("default_args_json", &local_var_str.to_string())]);
1679 }
1680 if let Some(ref local_var_str) = dynamic_enums_json {
1681 local_var_req_builder = local_var_req_builder.query(&[("dynamic_enums_json", &local_var_str.to_string())]);
1682 }
1683 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1684 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1685 }
1686 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1687 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1688 };
1689
1690 let local_var_req = local_var_req_builder.build()?;
1691 let local_var_resp = local_var_client.execute(local_var_req).await?;
1692
1693 let local_var_status = local_var_resp.status();
1694 let local_var_content = local_var_resp.text().await?;
1695
1696 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1697 Ok(())
1698 } else {
1699 let local_var_entity: Option<GetSlackApprovalPayloadError> = crate::from_str_patched(&local_var_content).ok();
1700 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1701 Err(Error::ResponseError(local_var_error))
1702 }
1703}
1704
1705pub async fn get_started_at_by_ids(configuration: &configuration::Configuration, workspace: &str, request_body: Vec<String>) -> Result<Vec<String>, Error<GetStartedAtByIdsError>> {
1706 let local_var_configuration = configuration;
1707
1708 let local_var_client = &local_var_configuration.client;
1709
1710 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));
1711 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1712
1713 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1714 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1715 }
1716 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1717 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1718 };
1719 local_var_req_builder = local_var_req_builder.json(&request_body);
1720
1721 let local_var_req = local_var_req_builder.build()?;
1722 let local_var_resp = local_var_client.execute(local_var_req).await?;
1723
1724 let local_var_status = local_var_resp.status();
1725 let local_var_content = local_var_resp.text().await?;
1726
1727 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1728 crate::from_str_patched(&local_var_content).map_err(Error::from)
1729 } else {
1730 let local_var_entity: Option<GetStartedAtByIdsError> = crate::from_str_patched(&local_var_content).ok();
1731 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1732 Err(Error::ResponseError(local_var_error))
1733 }
1734}
1735
1736pub async fn get_suspended_job_flow(configuration: &configuration::Configuration, workspace: &str, id: &str, resume_id: i32, signature: &str, approver: Option<&str>) -> Result<models::GetSuspendedJobFlow200Response, Error<GetSuspendedJobFlowError>> {
1737 let local_var_configuration = configuration;
1738
1739 let local_var_client = &local_var_configuration.client;
1740
1741 let local_var_uri_str = format!("{}/w/{workspace}/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));
1742 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1743
1744 if let Some(ref local_var_str) = approver {
1745 local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
1746 }
1747 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1748 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1749 }
1750 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1751 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1752 };
1753
1754 let local_var_req = local_var_req_builder.build()?;
1755 let local_var_resp = local_var_client.execute(local_var_req).await?;
1756
1757 let local_var_status = local_var_resp.status();
1758 let local_var_content = local_var_resp.text().await?;
1759
1760 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1761 crate::from_str_patched(&local_var_content).map_err(Error::from)
1762 } else {
1763 let local_var_entity: Option<GetSuspendedJobFlowError> = crate::from_str_patched(&local_var_content).ok();
1764 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1765 Err(Error::ResponseError(local_var_error))
1766 }
1767}
1768
1769pub async fn 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>> {
1770 let local_var_configuration = configuration;
1771
1772 let local_var_client = &local_var_configuration.client;
1773
1774 let local_var_uri_str = format!("{}/w/{workspace}/jobs/teams_approval/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1775 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1776
1777 if let Some(ref local_var_str) = approver {
1778 local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
1779 }
1780 if let Some(ref local_var_str) = message {
1781 local_var_req_builder = local_var_req_builder.query(&[("message", &local_var_str.to_string())]);
1782 }
1783 local_var_req_builder = local_var_req_builder.query(&[("team_name", &team_name.to_string())]);
1784 local_var_req_builder = local_var_req_builder.query(&[("channel_name", &channel_name.to_string())]);
1785 local_var_req_builder = local_var_req_builder.query(&[("flow_step_id", &flow_step_id.to_string())]);
1786 if let Some(ref local_var_str) = default_args_json {
1787 local_var_req_builder = local_var_req_builder.query(&[("default_args_json", &local_var_str.to_string())]);
1788 }
1789 if let Some(ref local_var_str) = dynamic_enums_json {
1790 local_var_req_builder = local_var_req_builder.query(&[("dynamic_enums_json", &local_var_str.to_string())]);
1791 }
1792 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1793 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1794 }
1795 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1796 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1797 };
1798
1799 let local_var_req = local_var_req_builder.build()?;
1800 let local_var_resp = local_var_client.execute(local_var_req).await?;
1801
1802 let local_var_status = local_var_resp.status();
1803 let local_var_content = local_var_resp.text().await?;
1804
1805 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1806 Ok(())
1807 } else {
1808 let local_var_entity: Option<GetTeamsApprovalPayloadError> = crate::from_str_patched(&local_var_content).ok();
1809 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1810 Err(Error::ResponseError(local_var_error))
1811 }
1812}
1813
1814pub async fn import_completed_jobs(configuration: &configuration::Configuration, workspace: &str, exportable_completed_job: Vec<models::ExportableCompletedJob>) -> Result<String, Error<ImportCompletedJobsError>> {
1815 let local_var_configuration = configuration;
1816
1817 let local_var_client = &local_var_configuration.client;
1818
1819 let local_var_uri_str = format!("{}/w/{workspace}/jobs/completed/import", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1820 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1821
1822 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1823 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1824 }
1825 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1826 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1827 };
1828 local_var_req_builder = local_var_req_builder.json(&exportable_completed_job);
1829
1830 let local_var_req = local_var_req_builder.build()?;
1831 let local_var_resp = local_var_client.execute(local_var_req).await?;
1832
1833 let local_var_status = local_var_resp.status();
1834 let local_var_content = local_var_resp.text().await?;
1835
1836 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1837 crate::from_str_patched(&local_var_content).map_err(Error::from)
1838 } else {
1839 let local_var_entity: Option<ImportCompletedJobsError> = crate::from_str_patched(&local_var_content).ok();
1840 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1841 Err(Error::ResponseError(local_var_error))
1842 }
1843}
1844
1845pub async fn import_queued_jobs(configuration: &configuration::Configuration, workspace: &str, exportable_queued_job: Vec<models::ExportableQueuedJob>) -> Result<String, Error<ImportQueuedJobsError>> {
1846 let local_var_configuration = configuration;
1847
1848 let local_var_client = &local_var_configuration.client;
1849
1850 let local_var_uri_str = format!("{}/w/{workspace}/jobs/queue/import", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1851 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1852
1853 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1854 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1855 }
1856 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1857 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1858 };
1859 local_var_req_builder = local_var_req_builder.json(&exportable_queued_job);
1860
1861 let local_var_req = local_var_req_builder.build()?;
1862 let local_var_resp = local_var_client.execute(local_var_req).await?;
1863
1864 let local_var_status = local_var_resp.status();
1865 let local_var_content = local_var_resp.text().await?;
1866
1867 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1868 crate::from_str_patched(&local_var_content).map_err(Error::from)
1869 } else {
1870 let local_var_entity: Option<ImportQueuedJobsError> = crate::from_str_patched(&local_var_content).ok();
1871 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1872 Err(Error::ResponseError(local_var_error))
1873 }
1874}
1875
1876pub 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>> {
1877 let local_var_configuration = configuration;
1878
1879 let local_var_client = &local_var_configuration.client;
1880
1881 let local_var_uri_str = format!("{}/w/{workspace}/jobs/completed/list", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1882 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1883
1884 if let Some(ref local_var_str) = order_desc {
1885 local_var_req_builder = local_var_req_builder.query(&[("order_desc", &local_var_str.to_string())]);
1886 }
1887 if let Some(ref local_var_str) = created_by {
1888 local_var_req_builder = local_var_req_builder.query(&[("created_by", &local_var_str.to_string())]);
1889 }
1890 if let Some(ref local_var_str) = label {
1891 local_var_req_builder = local_var_req_builder.query(&[("label", &local_var_str.to_string())]);
1892 }
1893 if let Some(ref local_var_str) = worker {
1894 local_var_req_builder = local_var_req_builder.query(&[("worker", &local_var_str.to_string())]);
1895 }
1896 if let Some(ref local_var_str) = parent_job {
1897 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
1898 }
1899 if let Some(ref local_var_str) = script_path_exact {
1900 local_var_req_builder = local_var_req_builder.query(&[("script_path_exact", &local_var_str.to_string())]);
1901 }
1902 if let Some(ref local_var_str) = script_path_start {
1903 local_var_req_builder = local_var_req_builder.query(&[("script_path_start", &local_var_str.to_string())]);
1904 }
1905 if let Some(ref local_var_str) = schedule_path {
1906 local_var_req_builder = local_var_req_builder.query(&[("schedule_path", &local_var_str.to_string())]);
1907 }
1908 if let Some(ref local_var_str) = script_hash {
1909 local_var_req_builder = local_var_req_builder.query(&[("script_hash", &local_var_str.to_string())]);
1910 }
1911 if let Some(ref local_var_str) = started_before {
1912 local_var_req_builder = local_var_req_builder.query(&[("started_before", &local_var_str.to_string())]);
1913 }
1914 if let Some(ref local_var_str) = started_after {
1915 local_var_req_builder = local_var_req_builder.query(&[("started_after", &local_var_str.to_string())]);
1916 }
1917 if let Some(ref local_var_str) = success {
1918 local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
1919 }
1920 if let Some(ref local_var_str) = job_kinds {
1921 local_var_req_builder = local_var_req_builder.query(&[("job_kinds", &local_var_str.to_string())]);
1922 }
1923 if let Some(ref local_var_str) = args {
1924 local_var_req_builder = local_var_req_builder.query(&[("args", &local_var_str.to_string())]);
1925 }
1926 if let Some(ref local_var_str) = result {
1927 local_var_req_builder = local_var_req_builder.query(&[("result", &local_var_str.to_string())]);
1928 }
1929 if let Some(ref local_var_str) = allow_wildcards {
1930 local_var_req_builder = local_var_req_builder.query(&[("allow_wildcards", &local_var_str.to_string())]);
1931 }
1932 if let Some(ref local_var_str) = tag {
1933 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
1934 }
1935 if let Some(ref local_var_str) = page {
1936 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
1937 }
1938 if let Some(ref local_var_str) = per_page {
1939 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
1940 }
1941 if let Some(ref local_var_str) = is_skipped {
1942 local_var_req_builder = local_var_req_builder.query(&[("is_skipped", &local_var_str.to_string())]);
1943 }
1944 if let Some(ref local_var_str) = is_flow_step {
1945 local_var_req_builder = local_var_req_builder.query(&[("is_flow_step", &local_var_str.to_string())]);
1946 }
1947 if let Some(ref local_var_str) = has_null_parent {
1948 local_var_req_builder = local_var_req_builder.query(&[("has_null_parent", &local_var_str.to_string())]);
1949 }
1950 if let Some(ref local_var_str) = is_not_schedule {
1951 local_var_req_builder = local_var_req_builder.query(&[("is_not_schedule", &local_var_str.to_string())]);
1952 }
1953 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1954 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1955 }
1956 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1957 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1958 };
1959
1960 let local_var_req = local_var_req_builder.build()?;
1961 let local_var_resp = local_var_client.execute(local_var_req).await?;
1962
1963 let local_var_status = local_var_resp.status();
1964 let local_var_content = local_var_resp.text().await?;
1965
1966 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1967 crate::from_str_patched(&local_var_content).map_err(Error::from)
1968 } else {
1969 let local_var_entity: Option<ListCompletedJobsError> = crate::from_str_patched(&local_var_content).ok();
1970 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1971 Err(Error::ResponseError(local_var_error))
1972 }
1973}
1974
1975pub 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>, running: Option<bool>, scheduled_for_before_now: Option<bool>, completed_before: Option<String>, completed_after: Option<String>, created_before_queue: Option<String>, created_after_queue: 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>, trigger_kind: Option<models::JobTriggerKind>, 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>> {
1976 let local_var_configuration = configuration;
1977
1978 let local_var_client = &local_var_configuration.client;
1979
1980 let local_var_uri_str = format!("{}/w/{workspace}/concurrency_groups/list_jobs", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1981 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1982
1983 if let Some(ref local_var_str) = concurrency_key {
1984 local_var_req_builder = local_var_req_builder.query(&[("concurrency_key", &local_var_str.to_string())]);
1985 }
1986 if let Some(ref local_var_str) = row_limit {
1987 local_var_req_builder = local_var_req_builder.query(&[("row_limit", &local_var_str.to_string())]);
1988 }
1989 if let Some(ref local_var_str) = created_by {
1990 local_var_req_builder = local_var_req_builder.query(&[("created_by", &local_var_str.to_string())]);
1991 }
1992 if let Some(ref local_var_str) = label {
1993 local_var_req_builder = local_var_req_builder.query(&[("label", &local_var_str.to_string())]);
1994 }
1995 if let Some(ref local_var_str) = parent_job {
1996 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
1997 }
1998 if let Some(ref local_var_str) = script_path_exact {
1999 local_var_req_builder = local_var_req_builder.query(&[("script_path_exact", &local_var_str.to_string())]);
2000 }
2001 if let Some(ref local_var_str) = script_path_start {
2002 local_var_req_builder = local_var_req_builder.query(&[("script_path_start", &local_var_str.to_string())]);
2003 }
2004 if let Some(ref local_var_str) = schedule_path {
2005 local_var_req_builder = local_var_req_builder.query(&[("schedule_path", &local_var_str.to_string())]);
2006 }
2007 if let Some(ref local_var_str) = script_hash {
2008 local_var_req_builder = local_var_req_builder.query(&[("script_hash", &local_var_str.to_string())]);
2009 }
2010 if let Some(ref local_var_str) = started_before {
2011 local_var_req_builder = local_var_req_builder.query(&[("started_before", &local_var_str.to_string())]);
2012 }
2013 if let Some(ref local_var_str) = started_after {
2014 local_var_req_builder = local_var_req_builder.query(&[("started_after", &local_var_str.to_string())]);
2015 }
2016 if let Some(ref local_var_str) = running {
2017 local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
2018 }
2019 if let Some(ref local_var_str) = scheduled_for_before_now {
2020 local_var_req_builder = local_var_req_builder.query(&[("scheduled_for_before_now", &local_var_str.to_string())]);
2021 }
2022 if let Some(ref local_var_str) = completed_before {
2023 local_var_req_builder = local_var_req_builder.query(&[("completed_before", &local_var_str.to_string())]);
2024 }
2025 if let Some(ref local_var_str) = completed_after {
2026 local_var_req_builder = local_var_req_builder.query(&[("completed_after", &local_var_str.to_string())]);
2027 }
2028 if let Some(ref local_var_str) = created_before_queue {
2029 local_var_req_builder = local_var_req_builder.query(&[("created_before_queue", &local_var_str.to_string())]);
2030 }
2031 if let Some(ref local_var_str) = created_after_queue {
2032 local_var_req_builder = local_var_req_builder.query(&[("created_after_queue", &local_var_str.to_string())]);
2033 }
2034 if let Some(ref local_var_str) = job_kinds {
2035 local_var_req_builder = local_var_req_builder.query(&[("job_kinds", &local_var_str.to_string())]);
2036 }
2037 if let Some(ref local_var_str) = args {
2038 local_var_req_builder = local_var_req_builder.query(&[("args", &local_var_str.to_string())]);
2039 }
2040 if let Some(ref local_var_str) = tag {
2041 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
2042 }
2043 if let Some(ref local_var_str) = result {
2044 local_var_req_builder = local_var_req_builder.query(&[("result", &local_var_str.to_string())]);
2045 }
2046 if let Some(ref local_var_str) = allow_wildcards {
2047 local_var_req_builder = local_var_req_builder.query(&[("allow_wildcards", &local_var_str.to_string())]);
2048 }
2049 if let Some(ref local_var_str) = page {
2050 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
2051 }
2052 if let Some(ref local_var_str) = per_page {
2053 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
2054 }
2055 if let Some(ref local_var_str) = trigger_kind {
2056 local_var_req_builder = local_var_req_builder.query(&[("trigger_kind", &local_var_str.to_string())]);
2057 }
2058 if let Some(ref local_var_str) = is_skipped {
2059 local_var_req_builder = local_var_req_builder.query(&[("is_skipped", &local_var_str.to_string())]);
2060 }
2061 if let Some(ref local_var_str) = is_flow_step {
2062 local_var_req_builder = local_var_req_builder.query(&[("is_flow_step", &local_var_str.to_string())]);
2063 }
2064 if let Some(ref local_var_str) = has_null_parent {
2065 local_var_req_builder = local_var_req_builder.query(&[("has_null_parent", &local_var_str.to_string())]);
2066 }
2067 if let Some(ref local_var_str) = success {
2068 local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
2069 }
2070 if let Some(ref local_var_str) = all_workspaces {
2071 local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
2072 }
2073 if let Some(ref local_var_str) = is_not_schedule {
2074 local_var_req_builder = local_var_req_builder.query(&[("is_not_schedule", &local_var_str.to_string())]);
2075 }
2076 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2077 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2078 }
2079 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2080 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2081 };
2082
2083 let local_var_req = local_var_req_builder.build()?;
2084 let local_var_resp = local_var_client.execute(local_var_req).await?;
2085
2086 let local_var_status = local_var_resp.status();
2087 let local_var_content = local_var_resp.text().await?;
2088
2089 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2090 crate::from_str_patched(&local_var_content).map_err(Error::from)
2091 } else {
2092 let local_var_entity: Option<ListExtendedJobsError> = crate::from_str_patched(&local_var_content).ok();
2093 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2094 Err(Error::ResponseError(local_var_error))
2095 }
2096}
2097
2098pub 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>, completed_before: Option<String>, completed_after: Option<String>, created_before_queue: Option<String>, created_after_queue: Option<String>, running: Option<bool>, scheduled_for_before_now: Option<bool>, 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>> {
2099 let local_var_configuration = configuration;
2100
2101 let local_var_client = &local_var_configuration.client;
2102
2103 let local_var_uri_str = format!("{}/w/{workspace}/jobs/list_filtered_uuids", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2104 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2105
2106 if let Some(ref local_var_str) = created_by {
2107 local_var_req_builder = local_var_req_builder.query(&[("created_by", &local_var_str.to_string())]);
2108 }
2109 if let Some(ref local_var_str) = label {
2110 local_var_req_builder = local_var_req_builder.query(&[("label", &local_var_str.to_string())]);
2111 }
2112 if let Some(ref local_var_str) = worker {
2113 local_var_req_builder = local_var_req_builder.query(&[("worker", &local_var_str.to_string())]);
2114 }
2115 if let Some(ref local_var_str) = parent_job {
2116 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
2117 }
2118 if let Some(ref local_var_str) = script_path_exact {
2119 local_var_req_builder = local_var_req_builder.query(&[("script_path_exact", &local_var_str.to_string())]);
2120 }
2121 if let Some(ref local_var_str) = script_path_start {
2122 local_var_req_builder = local_var_req_builder.query(&[("script_path_start", &local_var_str.to_string())]);
2123 }
2124 if let Some(ref local_var_str) = schedule_path {
2125 local_var_req_builder = local_var_req_builder.query(&[("schedule_path", &local_var_str.to_string())]);
2126 }
2127 if let Some(ref local_var_str) = script_hash {
2128 local_var_req_builder = local_var_req_builder.query(&[("script_hash", &local_var_str.to_string())]);
2129 }
2130 if let Some(ref local_var_str) = started_before {
2131 local_var_req_builder = local_var_req_builder.query(&[("started_before", &local_var_str.to_string())]);
2132 }
2133 if let Some(ref local_var_str) = started_after {
2134 local_var_req_builder = local_var_req_builder.query(&[("started_after", &local_var_str.to_string())]);
2135 }
2136 if let Some(ref local_var_str) = created_before {
2137 local_var_req_builder = local_var_req_builder.query(&[("created_before", &local_var_str.to_string())]);
2138 }
2139 if let Some(ref local_var_str) = created_after {
2140 local_var_req_builder = local_var_req_builder.query(&[("created_after", &local_var_str.to_string())]);
2141 }
2142 if let Some(ref local_var_str) = completed_before {
2143 local_var_req_builder = local_var_req_builder.query(&[("completed_before", &local_var_str.to_string())]);
2144 }
2145 if let Some(ref local_var_str) = completed_after {
2146 local_var_req_builder = local_var_req_builder.query(&[("completed_after", &local_var_str.to_string())]);
2147 }
2148 if let Some(ref local_var_str) = created_before_queue {
2149 local_var_req_builder = local_var_req_builder.query(&[("created_before_queue", &local_var_str.to_string())]);
2150 }
2151 if let Some(ref local_var_str) = created_after_queue {
2152 local_var_req_builder = local_var_req_builder.query(&[("created_after_queue", &local_var_str.to_string())]);
2153 }
2154 if let Some(ref local_var_str) = running {
2155 local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
2156 }
2157 if let Some(ref local_var_str) = scheduled_for_before_now {
2158 local_var_req_builder = local_var_req_builder.query(&[("scheduled_for_before_now", &local_var_str.to_string())]);
2159 }
2160 if let Some(ref local_var_str) = job_kinds {
2161 local_var_req_builder = local_var_req_builder.query(&[("job_kinds", &local_var_str.to_string())]);
2162 }
2163 if let Some(ref local_var_str) = suspended {
2164 local_var_req_builder = local_var_req_builder.query(&[("suspended", &local_var_str.to_string())]);
2165 }
2166 if let Some(ref local_var_str) = args {
2167 local_var_req_builder = local_var_req_builder.query(&[("args", &local_var_str.to_string())]);
2168 }
2169 if let Some(ref local_var_str) = tag {
2170 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
2171 }
2172 if let Some(ref local_var_str) = result {
2173 local_var_req_builder = local_var_req_builder.query(&[("result", &local_var_str.to_string())]);
2174 }
2175 if let Some(ref local_var_str) = page {
2176 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
2177 }
2178 if let Some(ref local_var_str) = per_page {
2179 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
2180 }
2181 if let Some(ref local_var_str) = is_skipped {
2182 local_var_req_builder = local_var_req_builder.query(&[("is_skipped", &local_var_str.to_string())]);
2183 }
2184 if let Some(ref local_var_str) = is_flow_step {
2185 local_var_req_builder = local_var_req_builder.query(&[("is_flow_step", &local_var_str.to_string())]);
2186 }
2187 if let Some(ref local_var_str) = has_null_parent {
2188 local_var_req_builder = local_var_req_builder.query(&[("has_null_parent", &local_var_str.to_string())]);
2189 }
2190 if let Some(ref local_var_str) = success {
2191 local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
2192 }
2193 if let Some(ref local_var_str) = all_workspaces {
2194 local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
2195 }
2196 if let Some(ref local_var_str) = is_not_schedule {
2197 local_var_req_builder = local_var_req_builder.query(&[("is_not_schedule", &local_var_str.to_string())]);
2198 }
2199 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2200 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2201 }
2202 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2203 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2204 };
2205
2206 let local_var_req = local_var_req_builder.build()?;
2207 let local_var_resp = local_var_client.execute(local_var_req).await?;
2208
2209 let local_var_status = local_var_resp.status();
2210 let local_var_content = local_var_resp.text().await?;
2211
2212 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2213 crate::from_str_patched(&local_var_content).map_err(Error::from)
2214 } else {
2215 let local_var_entity: Option<ListFilteredJobsUuidsError> = crate::from_str_patched(&local_var_content).ok();
2216 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2217 Err(Error::ResponseError(local_var_error))
2218 }
2219}
2220
2221pub 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>> {
2222 let local_var_configuration = configuration;
2223
2224 let local_var_client = &local_var_configuration.client;
2225
2226 let local_var_uri_str = format!("{}/w/{workspace}/jobs/queue/list_filtered_uuids", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2227 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2228
2229 if let Some(ref local_var_str) = order_desc {
2230 local_var_req_builder = local_var_req_builder.query(&[("order_desc", &local_var_str.to_string())]);
2231 }
2232 if let Some(ref local_var_str) = created_by {
2233 local_var_req_builder = local_var_req_builder.query(&[("created_by", &local_var_str.to_string())]);
2234 }
2235 if let Some(ref local_var_str) = parent_job {
2236 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
2237 }
2238 if let Some(ref local_var_str) = script_path_exact {
2239 local_var_req_builder = local_var_req_builder.query(&[("script_path_exact", &local_var_str.to_string())]);
2240 }
2241 if let Some(ref local_var_str) = script_path_start {
2242 local_var_req_builder = local_var_req_builder.query(&[("script_path_start", &local_var_str.to_string())]);
2243 }
2244 if let Some(ref local_var_str) = schedule_path {
2245 local_var_req_builder = local_var_req_builder.query(&[("schedule_path", &local_var_str.to_string())]);
2246 }
2247 if let Some(ref local_var_str) = script_hash {
2248 local_var_req_builder = local_var_req_builder.query(&[("script_hash", &local_var_str.to_string())]);
2249 }
2250 if let Some(ref local_var_str) = started_before {
2251 local_var_req_builder = local_var_req_builder.query(&[("started_before", &local_var_str.to_string())]);
2252 }
2253 if let Some(ref local_var_str) = started_after {
2254 local_var_req_builder = local_var_req_builder.query(&[("started_after", &local_var_str.to_string())]);
2255 }
2256 if let Some(ref local_var_str) = success {
2257 local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
2258 }
2259 if let Some(ref local_var_str) = scheduled_for_before_now {
2260 local_var_req_builder = local_var_req_builder.query(&[("scheduled_for_before_now", &local_var_str.to_string())]);
2261 }
2262 if let Some(ref local_var_str) = job_kinds {
2263 local_var_req_builder = local_var_req_builder.query(&[("job_kinds", &local_var_str.to_string())]);
2264 }
2265 if let Some(ref local_var_str) = suspended {
2266 local_var_req_builder = local_var_req_builder.query(&[("suspended", &local_var_str.to_string())]);
2267 }
2268 if let Some(ref local_var_str) = running {
2269 local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
2270 }
2271 if let Some(ref local_var_str) = args {
2272 local_var_req_builder = local_var_req_builder.query(&[("args", &local_var_str.to_string())]);
2273 }
2274 if let Some(ref local_var_str) = result {
2275 local_var_req_builder = local_var_req_builder.query(&[("result", &local_var_str.to_string())]);
2276 }
2277 if let Some(ref local_var_str) = allow_wildcards {
2278 local_var_req_builder = local_var_req_builder.query(&[("allow_wildcards", &local_var_str.to_string())]);
2279 }
2280 if let Some(ref local_var_str) = tag {
2281 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
2282 }
2283 if let Some(ref local_var_str) = page {
2284 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
2285 }
2286 if let Some(ref local_var_str) = per_page {
2287 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
2288 }
2289 if let Some(ref local_var_str) = concurrency_key {
2290 local_var_req_builder = local_var_req_builder.query(&[("concurrency_key", &local_var_str.to_string())]);
2291 }
2292 if let Some(ref local_var_str) = all_workspaces {
2293 local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
2294 }
2295 if let Some(ref local_var_str) = is_not_schedule {
2296 local_var_req_builder = local_var_req_builder.query(&[("is_not_schedule", &local_var_str.to_string())]);
2297 }
2298 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2299 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2300 }
2301 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2302 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2303 };
2304
2305 let local_var_req = local_var_req_builder.build()?;
2306 let local_var_resp = local_var_client.execute(local_var_req).await?;
2307
2308 let local_var_status = local_var_resp.status();
2309 let local_var_content = local_var_resp.text().await?;
2310
2311 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2312 crate::from_str_patched(&local_var_content).map_err(Error::from)
2313 } else {
2314 let local_var_entity: Option<ListFilteredQueueUuidsError> = crate::from_str_patched(&local_var_content).ok();
2315 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2316 Err(Error::ResponseError(local_var_error))
2317 }
2318}
2319
2320pub 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>, completed_before: Option<String>, completed_after: Option<String>, created_before_queue: Option<String>, created_after_queue: Option<String>, running: Option<bool>, scheduled_for_before_now: Option<bool>, job_kinds: Option<&str>, suspended: Option<bool>, args: Option<&str>, tag: Option<&str>, result: Option<&str>, allow_wildcards: Option<bool>, per_page: Option<i32>, trigger_kind: Option<models::JobTriggerKind>, 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>> {
2321 let local_var_configuration = configuration;
2322
2323 let local_var_client = &local_var_configuration.client;
2324
2325 let local_var_uri_str = format!("{}/w/{workspace}/jobs/list", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2326 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2327
2328 if let Some(ref local_var_str) = created_by {
2329 local_var_req_builder = local_var_req_builder.query(&[("created_by", &local_var_str.to_string())]);
2330 }
2331 if let Some(ref local_var_str) = label {
2332 local_var_req_builder = local_var_req_builder.query(&[("label", &local_var_str.to_string())]);
2333 }
2334 if let Some(ref local_var_str) = worker {
2335 local_var_req_builder = local_var_req_builder.query(&[("worker", &local_var_str.to_string())]);
2336 }
2337 if let Some(ref local_var_str) = parent_job {
2338 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
2339 }
2340 if let Some(ref local_var_str) = script_path_exact {
2341 local_var_req_builder = local_var_req_builder.query(&[("script_path_exact", &local_var_str.to_string())]);
2342 }
2343 if let Some(ref local_var_str) = script_path_start {
2344 local_var_req_builder = local_var_req_builder.query(&[("script_path_start", &local_var_str.to_string())]);
2345 }
2346 if let Some(ref local_var_str) = schedule_path {
2347 local_var_req_builder = local_var_req_builder.query(&[("schedule_path", &local_var_str.to_string())]);
2348 }
2349 if let Some(ref local_var_str) = script_hash {
2350 local_var_req_builder = local_var_req_builder.query(&[("script_hash", &local_var_str.to_string())]);
2351 }
2352 if let Some(ref local_var_str) = started_before {
2353 local_var_req_builder = local_var_req_builder.query(&[("started_before", &local_var_str.to_string())]);
2354 }
2355 if let Some(ref local_var_str) = started_after {
2356 local_var_req_builder = local_var_req_builder.query(&[("started_after", &local_var_str.to_string())]);
2357 }
2358 if let Some(ref local_var_str) = created_before {
2359 local_var_req_builder = local_var_req_builder.query(&[("created_before", &local_var_str.to_string())]);
2360 }
2361 if let Some(ref local_var_str) = created_after {
2362 local_var_req_builder = local_var_req_builder.query(&[("created_after", &local_var_str.to_string())]);
2363 }
2364 if let Some(ref local_var_str) = completed_before {
2365 local_var_req_builder = local_var_req_builder.query(&[("completed_before", &local_var_str.to_string())]);
2366 }
2367 if let Some(ref local_var_str) = completed_after {
2368 local_var_req_builder = local_var_req_builder.query(&[("completed_after", &local_var_str.to_string())]);
2369 }
2370 if let Some(ref local_var_str) = created_before_queue {
2371 local_var_req_builder = local_var_req_builder.query(&[("created_before_queue", &local_var_str.to_string())]);
2372 }
2373 if let Some(ref local_var_str) = created_after_queue {
2374 local_var_req_builder = local_var_req_builder.query(&[("created_after_queue", &local_var_str.to_string())]);
2375 }
2376 if let Some(ref local_var_str) = running {
2377 local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
2378 }
2379 if let Some(ref local_var_str) = scheduled_for_before_now {
2380 local_var_req_builder = local_var_req_builder.query(&[("scheduled_for_before_now", &local_var_str.to_string())]);
2381 }
2382 if let Some(ref local_var_str) = job_kinds {
2383 local_var_req_builder = local_var_req_builder.query(&[("job_kinds", &local_var_str.to_string())]);
2384 }
2385 if let Some(ref local_var_str) = suspended {
2386 local_var_req_builder = local_var_req_builder.query(&[("suspended", &local_var_str.to_string())]);
2387 }
2388 if let Some(ref local_var_str) = args {
2389 local_var_req_builder = local_var_req_builder.query(&[("args", &local_var_str.to_string())]);
2390 }
2391 if let Some(ref local_var_str) = tag {
2392 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
2393 }
2394 if let Some(ref local_var_str) = result {
2395 local_var_req_builder = local_var_req_builder.query(&[("result", &local_var_str.to_string())]);
2396 }
2397 if let Some(ref local_var_str) = allow_wildcards {
2398 local_var_req_builder = local_var_req_builder.query(&[("allow_wildcards", &local_var_str.to_string())]);
2399 }
2400 if let Some(ref local_var_str) = per_page {
2401 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
2402 }
2403 if let Some(ref local_var_str) = trigger_kind {
2404 local_var_req_builder = local_var_req_builder.query(&[("trigger_kind", &local_var_str.to_string())]);
2405 }
2406 if let Some(ref local_var_str) = is_skipped {
2407 local_var_req_builder = local_var_req_builder.query(&[("is_skipped", &local_var_str.to_string())]);
2408 }
2409 if let Some(ref local_var_str) = is_flow_step {
2410 local_var_req_builder = local_var_req_builder.query(&[("is_flow_step", &local_var_str.to_string())]);
2411 }
2412 if let Some(ref local_var_str) = has_null_parent {
2413 local_var_req_builder = local_var_req_builder.query(&[("has_null_parent", &local_var_str.to_string())]);
2414 }
2415 if let Some(ref local_var_str) = success {
2416 local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
2417 }
2418 if let Some(ref local_var_str) = all_workspaces {
2419 local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
2420 }
2421 if let Some(ref local_var_str) = is_not_schedule {
2422 local_var_req_builder = local_var_req_builder.query(&[("is_not_schedule", &local_var_str.to_string())]);
2423 }
2424 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2425 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2426 }
2427 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2428 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2429 };
2430
2431 let local_var_req = local_var_req_builder.build()?;
2432 let local_var_resp = local_var_client.execute(local_var_req).await?;
2433
2434 let local_var_status = local_var_resp.status();
2435 let local_var_content = local_var_resp.text().await?;
2436
2437 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2438 crate::from_str_patched(&local_var_content).map_err(Error::from)
2439 } else {
2440 let local_var_entity: Option<ListJobsError> = crate::from_str_patched(&local_var_content).ok();
2441 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2442 Err(Error::ResponseError(local_var_error))
2443 }
2444}
2445
2446pub 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>, trigger_path: Option<&str>, trigger_kind: Option<models::JobTriggerKind>, 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>> {
2447 let local_var_configuration = configuration;
2448
2449 let local_var_client = &local_var_configuration.client;
2450
2451 let local_var_uri_str = format!("{}/w/{workspace}/jobs/queue/list", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2452 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2453
2454 if let Some(ref local_var_str) = order_desc {
2455 local_var_req_builder = local_var_req_builder.query(&[("order_desc", &local_var_str.to_string())]);
2456 }
2457 if let Some(ref local_var_str) = created_by {
2458 local_var_req_builder = local_var_req_builder.query(&[("created_by", &local_var_str.to_string())]);
2459 }
2460 if let Some(ref local_var_str) = parent_job {
2461 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
2462 }
2463 if let Some(ref local_var_str) = worker {
2464 local_var_req_builder = local_var_req_builder.query(&[("worker", &local_var_str.to_string())]);
2465 }
2466 if let Some(ref local_var_str) = script_path_exact {
2467 local_var_req_builder = local_var_req_builder.query(&[("script_path_exact", &local_var_str.to_string())]);
2468 }
2469 if let Some(ref local_var_str) = script_path_start {
2470 local_var_req_builder = local_var_req_builder.query(&[("script_path_start", &local_var_str.to_string())]);
2471 }
2472 if let Some(ref local_var_str) = schedule_path {
2473 local_var_req_builder = local_var_req_builder.query(&[("schedule_path", &local_var_str.to_string())]);
2474 }
2475 if let Some(ref local_var_str) = trigger_path {
2476 local_var_req_builder = local_var_req_builder.query(&[("trigger_path", &local_var_str.to_string())]);
2477 }
2478 if let Some(ref local_var_str) = trigger_kind {
2479 local_var_req_builder = local_var_req_builder.query(&[("trigger_kind", &local_var_str.to_string())]);
2480 }
2481 if let Some(ref local_var_str) = script_hash {
2482 local_var_req_builder = local_var_req_builder.query(&[("script_hash", &local_var_str.to_string())]);
2483 }
2484 if let Some(ref local_var_str) = started_before {
2485 local_var_req_builder = local_var_req_builder.query(&[("started_before", &local_var_str.to_string())]);
2486 }
2487 if let Some(ref local_var_str) = started_after {
2488 local_var_req_builder = local_var_req_builder.query(&[("started_after", &local_var_str.to_string())]);
2489 }
2490 if let Some(ref local_var_str) = success {
2491 local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
2492 }
2493 if let Some(ref local_var_str) = scheduled_for_before_now {
2494 local_var_req_builder = local_var_req_builder.query(&[("scheduled_for_before_now", &local_var_str.to_string())]);
2495 }
2496 if let Some(ref local_var_str) = job_kinds {
2497 local_var_req_builder = local_var_req_builder.query(&[("job_kinds", &local_var_str.to_string())]);
2498 }
2499 if let Some(ref local_var_str) = suspended {
2500 local_var_req_builder = local_var_req_builder.query(&[("suspended", &local_var_str.to_string())]);
2501 }
2502 if let Some(ref local_var_str) = running {
2503 local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
2504 }
2505 if let Some(ref local_var_str) = args {
2506 local_var_req_builder = local_var_req_builder.query(&[("args", &local_var_str.to_string())]);
2507 }
2508 if let Some(ref local_var_str) = result {
2509 local_var_req_builder = local_var_req_builder.query(&[("result", &local_var_str.to_string())]);
2510 }
2511 if let Some(ref local_var_str) = allow_wildcards {
2512 local_var_req_builder = local_var_req_builder.query(&[("allow_wildcards", &local_var_str.to_string())]);
2513 }
2514 if let Some(ref local_var_str) = tag {
2515 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
2516 }
2517 if let Some(ref local_var_str) = page {
2518 local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
2519 }
2520 if let Some(ref local_var_str) = per_page {
2521 local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
2522 }
2523 if let Some(ref local_var_str) = all_workspaces {
2524 local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
2525 }
2526 if let Some(ref local_var_str) = is_not_schedule {
2527 local_var_req_builder = local_var_req_builder.query(&[("is_not_schedule", &local_var_str.to_string())]);
2528 }
2529 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2530 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2531 }
2532 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2533 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2534 };
2535
2536 let local_var_req = local_var_req_builder.build()?;
2537 let local_var_resp = local_var_client.execute(local_var_req).await?;
2538
2539 let local_var_status = local_var_resp.status();
2540 let local_var_content = local_var_resp.text().await?;
2541
2542 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2543 crate::from_str_patched(&local_var_content).map_err(Error::from)
2544 } else {
2545 let local_var_entity: Option<ListQueueError> = crate::from_str_patched(&local_var_content).ok();
2546 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2547 Err(Error::ResponseError(local_var_error))
2548 }
2549}
2550
2551pub async fn list_selected_job_groups(configuration: &configuration::Configuration, workspace: &str, uuid_colon_colon_uuid: Vec<uuid::Uuid>) -> Result<Vec<models::ListSelectedJobGroups200ResponseInner>, Error<ListSelectedJobGroupsError>> {
2552 let local_var_configuration = configuration;
2553
2554 let local_var_client = &local_var_configuration.client;
2555
2556 let local_var_uri_str = format!("{}/w/{workspace}/jobs/list_selected_job_groups", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2557 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2558
2559 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2560 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2561 }
2562 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2563 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2564 };
2565 local_var_req_builder = local_var_req_builder.json(&uuid_colon_colon_uuid);
2566
2567 let local_var_req = local_var_req_builder.build()?;
2568 let local_var_resp = local_var_client.execute(local_var_req).await?;
2569
2570 let local_var_status = local_var_resp.status();
2571 let local_var_content = local_var_resp.text().await?;
2572
2573 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2574 crate::from_str_patched(&local_var_content).map_err(Error::from)
2575 } else {
2576 let local_var_entity: Option<ListSelectedJobGroupsError> = crate::from_str_patched(&local_var_content).ok();
2577 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2578 Err(Error::ResponseError(local_var_error))
2579 }
2580}
2581
2582pub 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>> {
2583 let local_var_configuration = configuration;
2584
2585 let local_var_client = &local_var_configuration.client;
2586
2587 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);
2588 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2589
2590 if let Some(ref local_var_str) = scheduled_for {
2591 local_var_req_builder = local_var_req_builder.query(&[("scheduled_for", &local_var_str.to_string())]);
2592 }
2593 if let Some(ref local_var_str) = scheduled_in_secs {
2594 local_var_req_builder = local_var_req_builder.query(&[("scheduled_in_secs", &local_var_str.to_string())]);
2595 }
2596 if let Some(ref local_var_str) = parent_job {
2597 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
2598 }
2599 if let Some(ref local_var_str) = tag {
2600 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
2601 }
2602 if let Some(ref local_var_str) = job_id {
2603 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
2604 }
2605 if let Some(ref local_var_str) = include_header {
2606 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
2607 }
2608 if let Some(ref local_var_str) = invisible_to_owner {
2609 local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
2610 }
2611 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2612 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2613 }
2614 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2615 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2616 };
2617 local_var_req_builder = local_var_req_builder.json(&request_body);
2618
2619 let local_var_req = local_var_req_builder.build()?;
2620 let local_var_resp = local_var_client.execute(local_var_req).await?;
2621
2622 let local_var_status = local_var_resp.status();
2623 let local_var_content = local_var_resp.text().await?;
2624
2625 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2626 crate::from_str_patched(&local_var_content).map_err(Error::from)
2627 } else {
2628 let local_var_entity: Option<RestartFlowAtStepError> = crate::from_str_patched(&local_var_content).ok();
2629 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2630 Err(Error::ResponseError(local_var_error))
2631 }
2632}
2633
2634pub async fn result_by_id(configuration: &configuration::Configuration, workspace: &str, flow_job_id: &str, node_id: &str) -> Result<serde_json::Value, Error<ResultByIdError>> {
2635 let local_var_configuration = configuration;
2636
2637 let local_var_client = &local_var_configuration.client;
2638
2639 let local_var_uri_str = format!("{}/w/{workspace}/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));
2640 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2641
2642 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2643 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2644 }
2645 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2646 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2647 };
2648
2649 let local_var_req = local_var_req_builder.build()?;
2650 let local_var_resp = local_var_client.execute(local_var_req).await?;
2651
2652 let local_var_status = local_var_resp.status();
2653 let local_var_content = local_var_resp.text().await?;
2654
2655 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2656 crate::from_str_patched(&local_var_content).map_err(Error::from)
2657 } else {
2658 let local_var_entity: Option<ResultByIdError> = crate::from_str_patched(&local_var_content).ok();
2659 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2660 Err(Error::ResponseError(local_var_error))
2661 }
2662}
2663
2664pub async fn resume_suspended_flow_as_owner(configuration: &configuration::Configuration, workspace: &str, id: &str, body: serde_json::Value) -> Result<String, Error<ResumeSuspendedFlowAsOwnerError>> {
2665 let local_var_configuration = configuration;
2666
2667 let local_var_client = &local_var_configuration.client;
2668
2669 let local_var_uri_str = format!("{}/w/{workspace}/jobs/flow/resume/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
2670 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2671
2672 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2673 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2674 }
2675 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2676 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2677 };
2678 local_var_req_builder = local_var_req_builder.json(&body);
2679
2680 let local_var_req = local_var_req_builder.build()?;
2681 let local_var_resp = local_var_client.execute(local_var_req).await?;
2682
2683 let local_var_status = local_var_resp.status();
2684 let local_var_content = local_var_resp.text().await?;
2685
2686 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2687 crate::from_str_patched(&local_var_content).map_err(Error::from)
2688 } else {
2689 let local_var_entity: Option<ResumeSuspendedFlowAsOwnerError> = crate::from_str_patched(&local_var_content).ok();
2690 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2691 Err(Error::ResponseError(local_var_error))
2692 }
2693}
2694
2695pub 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>> {
2696 let local_var_configuration = configuration;
2697
2698 let local_var_client = &local_var_configuration.client;
2699
2700 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));
2701 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2702
2703 if let Some(ref local_var_str) = payload {
2704 local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
2705 }
2706 if let Some(ref local_var_str) = approver {
2707 local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
2708 }
2709 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2710 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2711 }
2712 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2713 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2714 };
2715
2716 let local_var_req = local_var_req_builder.build()?;
2717 let local_var_resp = local_var_client.execute(local_var_req).await?;
2718
2719 let local_var_status = local_var_resp.status();
2720 let local_var_content = local_var_resp.text().await?;
2721
2722 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2723 crate::from_str_patched(&local_var_content).map_err(Error::from)
2724 } else {
2725 let local_var_entity: Option<ResumeSuspendedJobGetError> = crate::from_str_patched(&local_var_content).ok();
2726 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2727 Err(Error::ResponseError(local_var_error))
2728 }
2729}
2730
2731pub 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>> {
2732 let local_var_configuration = configuration;
2733
2734 let local_var_client = &local_var_configuration.client;
2735
2736 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));
2737 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2738
2739 if let Some(ref local_var_str) = approver {
2740 local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
2741 }
2742 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2743 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2744 }
2745 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2746 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2747 };
2748 local_var_req_builder = local_var_req_builder.json(&body);
2749
2750 let local_var_req = local_var_req_builder.build()?;
2751 let local_var_resp = local_var_client.execute(local_var_req).await?;
2752
2753 let local_var_status = local_var_resp.status();
2754 let local_var_content = local_var_resp.text().await?;
2755
2756 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2757 crate::from_str_patched(&local_var_content).map_err(Error::from)
2758 } else {
2759 let local_var_entity: Option<ResumeSuspendedJobPostError> = crate::from_str_patched(&local_var_content).ok();
2760 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2761 Err(Error::ResponseError(local_var_error))
2762 }
2763}
2764
2765pub async fn run_and_stream_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>, memory_id: Option<&str>, poll_delay_ms: Option<i64>) -> Result<String, Error<RunAndStreamFlowByPathError>> {
2766 let local_var_configuration = configuration;
2767
2768 let local_var_client = &local_var_configuration.client;
2769
2770 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_and_stream/f/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
2771 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2772
2773 if let Some(ref local_var_str) = include_header {
2774 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
2775 }
2776 if let Some(ref local_var_str) = queue_limit {
2777 local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
2778 }
2779 if let Some(ref local_var_str) = job_id {
2780 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
2781 }
2782 if let Some(ref local_var_str) = skip_preprocessor {
2783 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
2784 }
2785 if let Some(ref local_var_str) = memory_id {
2786 local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
2787 }
2788 if let Some(ref local_var_str) = poll_delay_ms {
2789 local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
2790 }
2791 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2792 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2793 }
2794 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2795 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2796 };
2797 local_var_req_builder = local_var_req_builder.json(&request_body);
2798
2799 let local_var_req = local_var_req_builder.build()?;
2800 let local_var_resp = local_var_client.execute(local_var_req).await?;
2801
2802 let local_var_status = local_var_resp.status();
2803 let local_var_content = local_var_resp.text().await?;
2804
2805 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2806 crate::from_str_patched(&local_var_content).map_err(Error::from)
2807 } else {
2808 let local_var_entity: Option<RunAndStreamFlowByPathError> = crate::from_str_patched(&local_var_content).ok();
2809 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2810 Err(Error::ResponseError(local_var_error))
2811 }
2812}
2813
2814pub async fn run_and_stream_flow_by_path_get(configuration: &configuration::Configuration, workspace: &str, path: &str, include_header: Option<&str>, queue_limit: Option<&str>, payload: Option<&str>, job_id: Option<&str>, skip_preprocessor: Option<bool>, memory_id: Option<&str>, poll_delay_ms: Option<i64>) -> Result<String, Error<RunAndStreamFlowByPathGetError>> {
2815 let local_var_configuration = configuration;
2816
2817 let local_var_client = &local_var_configuration.client;
2818
2819 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_and_stream/f/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
2820 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2821
2822 if let Some(ref local_var_str) = include_header {
2823 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
2824 }
2825 if let Some(ref local_var_str) = queue_limit {
2826 local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
2827 }
2828 if let Some(ref local_var_str) = payload {
2829 local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
2830 }
2831 if let Some(ref local_var_str) = job_id {
2832 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
2833 }
2834 if let Some(ref local_var_str) = skip_preprocessor {
2835 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
2836 }
2837 if let Some(ref local_var_str) = memory_id {
2838 local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
2839 }
2840 if let Some(ref local_var_str) = poll_delay_ms {
2841 local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
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
2850 let local_var_req = local_var_req_builder.build()?;
2851 let local_var_resp = local_var_client.execute(local_var_req).await?;
2852
2853 let local_var_status = local_var_resp.status();
2854 let local_var_content = local_var_resp.text().await?;
2855
2856 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2857 crate::from_str_patched(&local_var_content).map_err(Error::from)
2858 } else {
2859 let local_var_entity: Option<RunAndStreamFlowByPathGetError> = crate::from_str_patched(&local_var_content).ok();
2860 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2861 Err(Error::ResponseError(local_var_error))
2862 }
2863}
2864
2865pub async fn run_and_stream_flow_by_version(configuration: &configuration::Configuration, workspace: &str, version: i64, 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>, memory_id: Option<&str>, poll_delay_ms: Option<i64>) -> Result<String, Error<RunAndStreamFlowByVersionError>> {
2866 let local_var_configuration = configuration;
2867
2868 let local_var_client = &local_var_configuration.client;
2869
2870 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_and_stream/fv/{version}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), version=version);
2871 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2872
2873 if let Some(ref local_var_str) = include_header {
2874 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
2875 }
2876 if let Some(ref local_var_str) = queue_limit {
2877 local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
2878 }
2879 if let Some(ref local_var_str) = job_id {
2880 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
2881 }
2882 if let Some(ref local_var_str) = skip_preprocessor {
2883 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
2884 }
2885 if let Some(ref local_var_str) = memory_id {
2886 local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
2887 }
2888 if let Some(ref local_var_str) = poll_delay_ms {
2889 local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
2890 }
2891 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2892 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2893 }
2894 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2895 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2896 };
2897 local_var_req_builder = local_var_req_builder.json(&request_body);
2898
2899 let local_var_req = local_var_req_builder.build()?;
2900 let local_var_resp = local_var_client.execute(local_var_req).await?;
2901
2902 let local_var_status = local_var_resp.status();
2903 let local_var_content = local_var_resp.text().await?;
2904
2905 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2906 crate::from_str_patched(&local_var_content).map_err(Error::from)
2907 } else {
2908 let local_var_entity: Option<RunAndStreamFlowByVersionError> = crate::from_str_patched(&local_var_content).ok();
2909 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2910 Err(Error::ResponseError(local_var_error))
2911 }
2912}
2913
2914pub async fn run_and_stream_flow_by_version_get(configuration: &configuration::Configuration, workspace: &str, version: i64, include_header: Option<&str>, queue_limit: Option<&str>, payload: Option<&str>, job_id: Option<&str>, skip_preprocessor: Option<bool>, memory_id: Option<&str>, poll_delay_ms: Option<i64>) -> Result<String, Error<RunAndStreamFlowByVersionGetError>> {
2915 let local_var_configuration = configuration;
2916
2917 let local_var_client = &local_var_configuration.client;
2918
2919 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_and_stream/fv/{version}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), version=version);
2920 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2921
2922 if let Some(ref local_var_str) = include_header {
2923 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
2924 }
2925 if let Some(ref local_var_str) = queue_limit {
2926 local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
2927 }
2928 if let Some(ref local_var_str) = payload {
2929 local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
2930 }
2931 if let Some(ref local_var_str) = job_id {
2932 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
2933 }
2934 if let Some(ref local_var_str) = skip_preprocessor {
2935 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
2936 }
2937 if let Some(ref local_var_str) = memory_id {
2938 local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
2939 }
2940 if let Some(ref local_var_str) = poll_delay_ms {
2941 local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
2942 }
2943 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2944 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2945 }
2946 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2947 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2948 };
2949
2950 let local_var_req = local_var_req_builder.build()?;
2951 let local_var_resp = local_var_client.execute(local_var_req).await?;
2952
2953 let local_var_status = local_var_resp.status();
2954 let local_var_content = local_var_resp.text().await?;
2955
2956 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2957 crate::from_str_patched(&local_var_content).map_err(Error::from)
2958 } else {
2959 let local_var_entity: Option<RunAndStreamFlowByVersionGetError> = crate::from_str_patched(&local_var_content).ok();
2960 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2961 Err(Error::ResponseError(local_var_error))
2962 }
2963}
2964
2965pub async fn run_and_stream_script_by_hash(configuration: &configuration::Configuration, workspace: &str, hash: &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>, poll_delay_ms: Option<i64>) -> Result<String, Error<RunAndStreamScriptByHashError>> {
2966 let local_var_configuration = configuration;
2967
2968 let local_var_client = &local_var_configuration.client;
2969
2970 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_and_stream/h/{hash}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), hash=crate::apis::urlencode(hash));
2971 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2972
2973 if let Some(ref local_var_str) = parent_job {
2974 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
2975 }
2976 if let Some(ref local_var_str) = tag {
2977 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
2978 }
2979 if let Some(ref local_var_str) = cache_ttl {
2980 local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
2981 }
2982 if let Some(ref local_var_str) = job_id {
2983 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
2984 }
2985 if let Some(ref local_var_str) = include_header {
2986 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
2987 }
2988 if let Some(ref local_var_str) = queue_limit {
2989 local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
2990 }
2991 if let Some(ref local_var_str) = skip_preprocessor {
2992 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
2993 }
2994 if let Some(ref local_var_str) = poll_delay_ms {
2995 local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
2996 }
2997 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2998 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2999 }
3000 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3001 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3002 };
3003 local_var_req_builder = local_var_req_builder.json(&request_body);
3004
3005 let local_var_req = local_var_req_builder.build()?;
3006 let local_var_resp = local_var_client.execute(local_var_req).await?;
3007
3008 let local_var_status = local_var_resp.status();
3009 let local_var_content = local_var_resp.text().await?;
3010
3011 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3012 crate::from_str_patched(&local_var_content).map_err(Error::from)
3013 } else {
3014 let local_var_entity: Option<RunAndStreamScriptByHashError> = crate::from_str_patched(&local_var_content).ok();
3015 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3016 Err(Error::ResponseError(local_var_error))
3017 }
3018}
3019
3020pub async fn run_and_stream_script_by_hash_get(configuration: &configuration::Configuration, workspace: &str, hash: &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>, poll_delay_ms: Option<i64>) -> Result<String, Error<RunAndStreamScriptByHashGetError>> {
3021 let local_var_configuration = configuration;
3022
3023 let local_var_client = &local_var_configuration.client;
3024
3025 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_and_stream/h/{hash}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), hash=crate::apis::urlencode(hash));
3026 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3027
3028 if let Some(ref local_var_str) = parent_job {
3029 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
3030 }
3031 if let Some(ref local_var_str) = tag {
3032 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
3033 }
3034 if let Some(ref local_var_str) = cache_ttl {
3035 local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
3036 }
3037 if let Some(ref local_var_str) = job_id {
3038 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3039 }
3040 if let Some(ref local_var_str) = include_header {
3041 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3042 }
3043 if let Some(ref local_var_str) = queue_limit {
3044 local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
3045 }
3046 if let Some(ref local_var_str) = payload {
3047 local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
3048 }
3049 if let Some(ref local_var_str) = skip_preprocessor {
3050 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
3051 }
3052 if let Some(ref local_var_str) = poll_delay_ms {
3053 local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
3054 }
3055 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3056 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3057 }
3058 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3059 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3060 };
3061
3062 let local_var_req = local_var_req_builder.build()?;
3063 let local_var_resp = local_var_client.execute(local_var_req).await?;
3064
3065 let local_var_status = local_var_resp.status();
3066 let local_var_content = local_var_resp.text().await?;
3067
3068 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3069 crate::from_str_patched(&local_var_content).map_err(Error::from)
3070 } else {
3071 let local_var_entity: Option<RunAndStreamScriptByHashGetError> = crate::from_str_patched(&local_var_content).ok();
3072 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3073 Err(Error::ResponseError(local_var_error))
3074 }
3075}
3076
3077pub async fn run_and_stream_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>, poll_delay_ms: Option<i64>) -> Result<String, Error<RunAndStreamScriptByPathError>> {
3078 let local_var_configuration = configuration;
3079
3080 let local_var_client = &local_var_configuration.client;
3081
3082 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_and_stream/p/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
3083 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3084
3085 if let Some(ref local_var_str) = parent_job {
3086 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
3087 }
3088 if let Some(ref local_var_str) = tag {
3089 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
3090 }
3091 if let Some(ref local_var_str) = cache_ttl {
3092 local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
3093 }
3094 if let Some(ref local_var_str) = job_id {
3095 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3096 }
3097 if let Some(ref local_var_str) = include_header {
3098 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3099 }
3100 if let Some(ref local_var_str) = queue_limit {
3101 local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
3102 }
3103 if let Some(ref local_var_str) = skip_preprocessor {
3104 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
3105 }
3106 if let Some(ref local_var_str) = poll_delay_ms {
3107 local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
3108 }
3109 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3110 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3111 }
3112 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3113 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3114 };
3115 local_var_req_builder = local_var_req_builder.json(&request_body);
3116
3117 let local_var_req = local_var_req_builder.build()?;
3118 let local_var_resp = local_var_client.execute(local_var_req).await?;
3119
3120 let local_var_status = local_var_resp.status();
3121 let local_var_content = local_var_resp.text().await?;
3122
3123 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3124 crate::from_str_patched(&local_var_content).map_err(Error::from)
3125 } else {
3126 let local_var_entity: Option<RunAndStreamScriptByPathError> = crate::from_str_patched(&local_var_content).ok();
3127 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3128 Err(Error::ResponseError(local_var_error))
3129 }
3130}
3131
3132pub async fn run_and_stream_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>, poll_delay_ms: Option<i64>) -> Result<String, Error<RunAndStreamScriptByPathGetError>> {
3133 let local_var_configuration = configuration;
3134
3135 let local_var_client = &local_var_configuration.client;
3136
3137 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_and_stream/p/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
3138 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3139
3140 if let Some(ref local_var_str) = parent_job {
3141 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
3142 }
3143 if let Some(ref local_var_str) = tag {
3144 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
3145 }
3146 if let Some(ref local_var_str) = cache_ttl {
3147 local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
3148 }
3149 if let Some(ref local_var_str) = job_id {
3150 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3151 }
3152 if let Some(ref local_var_str) = include_header {
3153 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3154 }
3155 if let Some(ref local_var_str) = queue_limit {
3156 local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
3157 }
3158 if let Some(ref local_var_str) = payload {
3159 local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
3160 }
3161 if let Some(ref local_var_str) = skip_preprocessor {
3162 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
3163 }
3164 if let Some(ref local_var_str) = poll_delay_ms {
3165 local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
3166 }
3167 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3168 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3169 }
3170 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3171 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3172 };
3173
3174 let local_var_req = local_var_req_builder.build()?;
3175 let local_var_resp = local_var_client.execute(local_var_req).await?;
3176
3177 let local_var_status = local_var_resp.status();
3178 let local_var_content = local_var_resp.text().await?;
3179
3180 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3181 crate::from_str_patched(&local_var_content).map_err(Error::from)
3182 } else {
3183 let local_var_entity: Option<RunAndStreamScriptByPathGetError> = crate::from_str_patched(&local_var_content).ok();
3184 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3185 Err(Error::ResponseError(local_var_error))
3186 }
3187}
3188
3189pub 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>> {
3190 let local_var_configuration = configuration;
3191
3192 let local_var_client = &local_var_configuration.client;
3193
3194 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));
3195 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3196
3197 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3198 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3199 }
3200 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3201 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3202 };
3203 local_var_req_builder = local_var_req_builder.json(&workflow_task);
3204
3205 let local_var_req = local_var_req_builder.build()?;
3206 let local_var_resp = local_var_client.execute(local_var_req).await?;
3207
3208 let local_var_status = local_var_resp.status();
3209 let local_var_content = local_var_resp.text().await?;
3210
3211 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3212 crate::from_str_patched(&local_var_content).map_err(Error::from)
3213 } else {
3214 let local_var_entity: Option<RunCodeWorkflowTaskError> = crate::from_str_patched(&local_var_content).ok();
3215 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3216 Err(Error::ResponseError(local_var_error))
3217 }
3218}
3219
3220pub async fn run_dynamic_select(configuration: &configuration::Configuration, workspace: &str, dynamic_input_data: models::DynamicInputData) -> Result<uuid::Uuid, Error<RunDynamicSelectError>> {
3221 let local_var_configuration = configuration;
3222
3223 let local_var_client = &local_var_configuration.client;
3224
3225 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/dynamic_select", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3226 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3227
3228 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3229 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3230 }
3231 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3232 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3233 };
3234 local_var_req_builder = local_var_req_builder.json(&dynamic_input_data);
3235
3236 let local_var_req = local_var_req_builder.build()?;
3237 let local_var_resp = local_var_client.execute(local_var_req).await?;
3238
3239 let local_var_status = local_var_resp.status();
3240 let local_var_content = local_var_resp.text().await?;
3241
3242 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3243 crate::from_str_patched(&local_var_content).map_err(Error::from)
3244 } else {
3245 let local_var_entity: Option<RunDynamicSelectError> = crate::from_str_patched(&local_var_content).ok();
3246 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3247 Err(Error::ResponseError(local_var_error))
3248 }
3249}
3250
3251pub 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>, memory_id: Option<&str>) -> Result<uuid::Uuid, Error<RunFlowByPathError>> {
3252 let local_var_configuration = configuration;
3253
3254 let local_var_client = &local_var_configuration.client;
3255
3256 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));
3257 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3258
3259 if let Some(ref local_var_str) = scheduled_for {
3260 local_var_req_builder = local_var_req_builder.query(&[("scheduled_for", &local_var_str.to_string())]);
3261 }
3262 if let Some(ref local_var_str) = scheduled_in_secs {
3263 local_var_req_builder = local_var_req_builder.query(&[("scheduled_in_secs", &local_var_str.to_string())]);
3264 }
3265 if let Some(ref local_var_str) = skip_preprocessor {
3266 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
3267 }
3268 if let Some(ref local_var_str) = parent_job {
3269 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
3270 }
3271 if let Some(ref local_var_str) = tag {
3272 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
3273 }
3274 if let Some(ref local_var_str) = job_id {
3275 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3276 }
3277 if let Some(ref local_var_str) = include_header {
3278 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3279 }
3280 if let Some(ref local_var_str) = invisible_to_owner {
3281 local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
3282 }
3283 if let Some(ref local_var_str) = memory_id {
3284 local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
3285 }
3286 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3287 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3288 }
3289 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3290 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3291 };
3292 local_var_req_builder = local_var_req_builder.json(&request_body);
3293
3294 let local_var_req = local_var_req_builder.build()?;
3295 let local_var_resp = local_var_client.execute(local_var_req).await?;
3296
3297 let local_var_status = local_var_resp.status();
3298 let local_var_content = local_var_resp.text().await?;
3299
3300 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3301 crate::from_str_patched(&local_var_content).map_err(Error::from)
3302 } else {
3303 let local_var_entity: Option<RunFlowByPathError> = crate::from_str_patched(&local_var_content).ok();
3304 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3305 Err(Error::ResponseError(local_var_error))
3306 }
3307}
3308
3309pub async fn run_flow_by_version(configuration: &configuration::Configuration, workspace: &str, version: i64, 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>, memory_id: Option<&str>) -> Result<uuid::Uuid, Error<RunFlowByVersionError>> {
3310 let local_var_configuration = configuration;
3311
3312 let local_var_client = &local_var_configuration.client;
3313
3314 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/fv/{version}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), version=version);
3315 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3316
3317 if let Some(ref local_var_str) = scheduled_for {
3318 local_var_req_builder = local_var_req_builder.query(&[("scheduled_for", &local_var_str.to_string())]);
3319 }
3320 if let Some(ref local_var_str) = scheduled_in_secs {
3321 local_var_req_builder = local_var_req_builder.query(&[("scheduled_in_secs", &local_var_str.to_string())]);
3322 }
3323 if let Some(ref local_var_str) = skip_preprocessor {
3324 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
3325 }
3326 if let Some(ref local_var_str) = parent_job {
3327 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
3328 }
3329 if let Some(ref local_var_str) = tag {
3330 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
3331 }
3332 if let Some(ref local_var_str) = job_id {
3333 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3334 }
3335 if let Some(ref local_var_str) = include_header {
3336 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3337 }
3338 if let Some(ref local_var_str) = invisible_to_owner {
3339 local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
3340 }
3341 if let Some(ref local_var_str) = memory_id {
3342 local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
3343 }
3344 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3345 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3346 }
3347 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3348 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3349 };
3350 local_var_req_builder = local_var_req_builder.json(&request_body);
3351
3352 let local_var_req = local_var_req_builder.build()?;
3353 let local_var_resp = local_var_client.execute(local_var_req).await?;
3354
3355 let local_var_status = local_var_resp.status();
3356 let local_var_content = local_var_resp.text().await?;
3357
3358 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3359 crate::from_str_patched(&local_var_content).map_err(Error::from)
3360 } else {
3361 let local_var_entity: Option<RunFlowByVersionError> = crate::from_str_patched(&local_var_content).ok();
3362 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3363 Err(Error::ResponseError(local_var_error))
3364 }
3365}
3366
3367pub 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>, memory_id: Option<&str>) -> Result<uuid::Uuid, Error<RunFlowPreviewError>> {
3368 let local_var_configuration = configuration;
3369
3370 let local_var_client = &local_var_configuration.client;
3371
3372 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/preview_flow", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3373 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3374
3375 if let Some(ref local_var_str) = include_header {
3376 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3377 }
3378 if let Some(ref local_var_str) = invisible_to_owner {
3379 local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
3380 }
3381 if let Some(ref local_var_str) = job_id {
3382 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3383 }
3384 if let Some(ref local_var_str) = memory_id {
3385 local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
3386 }
3387 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3388 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3389 }
3390 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3391 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3392 };
3393 local_var_req_builder = local_var_req_builder.json(&flow_preview);
3394
3395 let local_var_req = local_var_req_builder.build()?;
3396 let local_var_resp = local_var_client.execute(local_var_req).await?;
3397
3398 let local_var_status = local_var_resp.status();
3399 let local_var_content = local_var_resp.text().await?;
3400
3401 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3402 crate::from_str_patched(&local_var_content).map_err(Error::from)
3403 } else {
3404 let local_var_entity: Option<RunFlowPreviewError> = crate::from_str_patched(&local_var_content).ok();
3405 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3406 Err(Error::ResponseError(local_var_error))
3407 }
3408}
3409
3410pub async fn run_flow_preview_and_wait_result(configuration: &configuration::Configuration, workspace: &str, flow_preview: models::FlowPreview, memory_id: Option<&str>) -> Result<serde_json::Value, Error<RunFlowPreviewAndWaitResultError>> {
3411 let local_var_configuration = configuration;
3412
3413 let local_var_client = &local_var_configuration.client;
3414
3415 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_wait_result/preview_flow", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3416 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3417
3418 if let Some(ref local_var_str) = memory_id {
3419 local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
3420 }
3421 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3422 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3423 }
3424 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3425 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3426 };
3427 local_var_req_builder = local_var_req_builder.json(&flow_preview);
3428
3429 let local_var_req = local_var_req_builder.build()?;
3430 let local_var_resp = local_var_client.execute(local_var_req).await?;
3431
3432 let local_var_status = local_var_resp.status();
3433 let local_var_content = local_var_resp.text().await?;
3434
3435 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3436 crate::from_str_patched(&local_var_content).map_err(Error::from)
3437 } else {
3438 let local_var_entity: Option<RunFlowPreviewAndWaitResultError> = crate::from_str_patched(&local_var_content).ok();
3439 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3440 Err(Error::ResponseError(local_var_error))
3441 }
3442}
3443
3444pub async fn run_raw_script_dependencies(configuration: &configuration::Configuration, workspace: &str, run_raw_script_dependencies_request: models::RunRawScriptDependenciesRequest) -> Result<models::RunRawScriptDependencies201Response, Error<RunRawScriptDependenciesError>> {
3445 let local_var_configuration = configuration;
3446
3447 let local_var_client = &local_var_configuration.client;
3448
3449 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/dependencies", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3450 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3451
3452 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3453 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3454 }
3455 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3456 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3457 };
3458 local_var_req_builder = local_var_req_builder.json(&run_raw_script_dependencies_request);
3459
3460 let local_var_req = local_var_req_builder.build()?;
3461 let local_var_resp = local_var_client.execute(local_var_req).await?;
3462
3463 let local_var_status = local_var_resp.status();
3464 let local_var_content = local_var_resp.text().await?;
3465
3466 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3467 crate::from_str_patched(&local_var_content).map_err(Error::from)
3468 } else {
3469 let local_var_entity: Option<RunRawScriptDependenciesError> = crate::from_str_patched(&local_var_content).ok();
3470 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3471 Err(Error::ResponseError(local_var_error))
3472 }
3473}
3474
3475pub 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>> {
3476 let local_var_configuration = configuration;
3477
3478 let local_var_client = &local_var_configuration.client;
3479
3480 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));
3481 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3482
3483 if let Some(ref local_var_str) = scheduled_for {
3484 local_var_req_builder = local_var_req_builder.query(&[("scheduled_for", &local_var_str.to_string())]);
3485 }
3486 if let Some(ref local_var_str) = scheduled_in_secs {
3487 local_var_req_builder = local_var_req_builder.query(&[("scheduled_in_secs", &local_var_str.to_string())]);
3488 }
3489 if let Some(ref local_var_str) = skip_preprocessor {
3490 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
3491 }
3492 if let Some(ref local_var_str) = parent_job {
3493 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
3494 }
3495 if let Some(ref local_var_str) = tag {
3496 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
3497 }
3498 if let Some(ref local_var_str) = cache_ttl {
3499 local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
3500 }
3501 if let Some(ref local_var_str) = job_id {
3502 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3503 }
3504 if let Some(ref local_var_str) = include_header {
3505 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3506 }
3507 if let Some(ref local_var_str) = invisible_to_owner {
3508 local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
3509 }
3510 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3511 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3512 }
3513 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3514 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3515 };
3516 local_var_req_builder = local_var_req_builder.json(&body);
3517
3518 let local_var_req = local_var_req_builder.build()?;
3519 let local_var_resp = local_var_client.execute(local_var_req).await?;
3520
3521 let local_var_status = local_var_resp.status();
3522 let local_var_content = local_var_resp.text().await?;
3523
3524 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3525 crate::from_str_patched(&local_var_content).map_err(Error::from)
3526 } else {
3527 let local_var_entity: Option<RunScriptByHashError> = crate::from_str_patched(&local_var_content).ok();
3528 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3529 Err(Error::ResponseError(local_var_error))
3530 }
3531}
3532
3533pub 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>> {
3534 let local_var_configuration = configuration;
3535
3536 let local_var_client = &local_var_configuration.client;
3537
3538 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));
3539 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3540
3541 if let Some(ref local_var_str) = scheduled_for {
3542 local_var_req_builder = local_var_req_builder.query(&[("scheduled_for", &local_var_str.to_string())]);
3543 }
3544 if let Some(ref local_var_str) = scheduled_in_secs {
3545 local_var_req_builder = local_var_req_builder.query(&[("scheduled_in_secs", &local_var_str.to_string())]);
3546 }
3547 if let Some(ref local_var_str) = skip_preprocessor {
3548 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
3549 }
3550 if let Some(ref local_var_str) = parent_job {
3551 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
3552 }
3553 if let Some(ref local_var_str) = tag {
3554 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
3555 }
3556 if let Some(ref local_var_str) = cache_ttl {
3557 local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
3558 }
3559 if let Some(ref local_var_str) = job_id {
3560 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3561 }
3562 if let Some(ref local_var_str) = invisible_to_owner {
3563 local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
3564 }
3565 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3566 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3567 }
3568 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3569 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3570 };
3571 local_var_req_builder = local_var_req_builder.json(&request_body);
3572
3573 let local_var_req = local_var_req_builder.build()?;
3574 let local_var_resp = local_var_client.execute(local_var_req).await?;
3575
3576 let local_var_status = local_var_resp.status();
3577 let local_var_content = local_var_resp.text().await?;
3578
3579 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3580 crate::from_str_patched(&local_var_content).map_err(Error::from)
3581 } else {
3582 let local_var_entity: Option<RunScriptByPathError> = crate::from_str_patched(&local_var_content).ok();
3583 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3584 Err(Error::ResponseError(local_var_error))
3585 }
3586}
3587
3588pub 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>> {
3589 let local_var_configuration = configuration;
3590
3591 let local_var_client = &local_var_configuration.client;
3592
3593 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/preview", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3594 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3595
3596 if let Some(ref local_var_str) = include_header {
3597 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3598 }
3599 if let Some(ref local_var_str) = invisible_to_owner {
3600 local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
3601 }
3602 if let Some(ref local_var_str) = job_id {
3603 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3604 }
3605 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3606 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3607 }
3608 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3609 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3610 };
3611 local_var_req_builder = local_var_req_builder.json(&preview);
3612
3613 let local_var_req = local_var_req_builder.build()?;
3614 let local_var_resp = local_var_client.execute(local_var_req).await?;
3615
3616 let local_var_status = local_var_resp.status();
3617 let local_var_content = local_var_resp.text().await?;
3618
3619 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3620 crate::from_str_patched(&local_var_content).map_err(Error::from)
3621 } else {
3622 let local_var_entity: Option<RunScriptPreviewError> = crate::from_str_patched(&local_var_content).ok();
3623 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3624 Err(Error::ResponseError(local_var_error))
3625 }
3626}
3627
3628pub async fn run_script_preview_and_wait_result(configuration: &configuration::Configuration, workspace: &str, preview: models::Preview) -> Result<serde_json::Value, Error<RunScriptPreviewAndWaitResultError>> {
3629 let local_var_configuration = configuration;
3630
3631 let local_var_client = &local_var_configuration.client;
3632
3633 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_wait_result/preview", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3634 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3635
3636 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3637 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3638 }
3639 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3640 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3641 };
3642 local_var_req_builder = local_var_req_builder.json(&preview);
3643
3644 let local_var_req = local_var_req_builder.build()?;
3645 let local_var_resp = local_var_client.execute(local_var_req).await?;
3646
3647 let local_var_status = local_var_resp.status();
3648 let local_var_content = local_var_resp.text().await?;
3649
3650 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3651 crate::from_str_patched(&local_var_content).map_err(Error::from)
3652 } else {
3653 let local_var_entity: Option<RunScriptPreviewAndWaitResultError> = crate::from_str_patched(&local_var_content).ok();
3654 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3655 Err(Error::ResponseError(local_var_error))
3656 }
3657}
3658
3659pub async fn run_script_preview_inline(configuration: &configuration::Configuration, workspace: &str, preview_inline: models::PreviewInline) -> Result<serde_json::Value, Error<RunScriptPreviewInlineError>> {
3660 let local_var_configuration = configuration;
3661
3662 let local_var_client = &local_var_configuration.client;
3663
3664 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_inline/preview", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3665 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3666
3667 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3668 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3669 }
3670 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3671 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3672 };
3673 local_var_req_builder = local_var_req_builder.json(&preview_inline);
3674
3675 let local_var_req = local_var_req_builder.build()?;
3676 let local_var_resp = local_var_client.execute(local_var_req).await?;
3677
3678 let local_var_status = local_var_resp.status();
3679 let local_var_content = local_var_resp.text().await?;
3680
3681 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3682 crate::from_str_patched(&local_var_content).map_err(Error::from)
3683 } else {
3684 let local_var_entity: Option<RunScriptPreviewInlineError> = crate::from_str_patched(&local_var_content).ok();
3685 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3686 Err(Error::ResponseError(local_var_error))
3687 }
3688}
3689
3690pub 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>, memory_id: Option<&str>) -> Result<serde_json::Value, Error<RunWaitResultFlowByPathError>> {
3691 let local_var_configuration = configuration;
3692
3693 let local_var_client = &local_var_configuration.client;
3694
3695 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));
3696 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3697
3698 if let Some(ref local_var_str) = include_header {
3699 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3700 }
3701 if let Some(ref local_var_str) = queue_limit {
3702 local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
3703 }
3704 if let Some(ref local_var_str) = job_id {
3705 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3706 }
3707 if let Some(ref local_var_str) = skip_preprocessor {
3708 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
3709 }
3710 if let Some(ref local_var_str) = memory_id {
3711 local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
3712 }
3713 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3714 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3715 }
3716 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3717 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3718 };
3719 local_var_req_builder = local_var_req_builder.json(&request_body);
3720
3721 let local_var_req = local_var_req_builder.build()?;
3722 let local_var_resp = local_var_client.execute(local_var_req).await?;
3723
3724 let local_var_status = local_var_resp.status();
3725 let local_var_content = local_var_resp.text().await?;
3726
3727 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3728 crate::from_str_patched(&local_var_content).map_err(Error::from)
3729 } else {
3730 let local_var_entity: Option<RunWaitResultFlowByPathError> = crate::from_str_patched(&local_var_content).ok();
3731 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3732 Err(Error::ResponseError(local_var_error))
3733 }
3734}
3735
3736pub async fn run_wait_result_flow_by_version(configuration: &configuration::Configuration, workspace: &str, version: i64, 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>, memory_id: Option<&str>) -> Result<serde_json::Value, Error<RunWaitResultFlowByVersionError>> {
3737 let local_var_configuration = configuration;
3738
3739 let local_var_client = &local_var_configuration.client;
3740
3741 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_wait_result/fv/{version}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), version=version);
3742 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3743
3744 if let Some(ref local_var_str) = include_header {
3745 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3746 }
3747 if let Some(ref local_var_str) = queue_limit {
3748 local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
3749 }
3750 if let Some(ref local_var_str) = job_id {
3751 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3752 }
3753 if let Some(ref local_var_str) = skip_preprocessor {
3754 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
3755 }
3756 if let Some(ref local_var_str) = memory_id {
3757 local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
3758 }
3759 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3760 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3761 }
3762 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3763 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3764 };
3765 local_var_req_builder = local_var_req_builder.json(&request_body);
3766
3767 let local_var_req = local_var_req_builder.build()?;
3768 let local_var_resp = local_var_client.execute(local_var_req).await?;
3769
3770 let local_var_status = local_var_resp.status();
3771 let local_var_content = local_var_resp.text().await?;
3772
3773 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3774 crate::from_str_patched(&local_var_content).map_err(Error::from)
3775 } else {
3776 let local_var_entity: Option<RunWaitResultFlowByVersionError> = crate::from_str_patched(&local_var_content).ok();
3777 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3778 Err(Error::ResponseError(local_var_error))
3779 }
3780}
3781
3782pub async fn run_wait_result_flow_by_version_get(configuration: &configuration::Configuration, workspace: &str, version: i64, include_header: Option<&str>, queue_limit: Option<&str>, payload: Option<&str>, job_id: Option<&str>, skip_preprocessor: Option<bool>, memory_id: Option<&str>) -> Result<serde_json::Value, Error<RunWaitResultFlowByVersionGetError>> {
3783 let local_var_configuration = configuration;
3784
3785 let local_var_client = &local_var_configuration.client;
3786
3787 let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_wait_result/fv/{version}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), version=version);
3788 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3789
3790 if let Some(ref local_var_str) = include_header {
3791 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3792 }
3793 if let Some(ref local_var_str) = queue_limit {
3794 local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
3795 }
3796 if let Some(ref local_var_str) = payload {
3797 local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
3798 }
3799 if let Some(ref local_var_str) = job_id {
3800 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3801 }
3802 if let Some(ref local_var_str) = skip_preprocessor {
3803 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
3804 }
3805 if let Some(ref local_var_str) = memory_id {
3806 local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
3807 }
3808 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3809 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3810 }
3811 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3812 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3813 };
3814
3815 let local_var_req = local_var_req_builder.build()?;
3816 let local_var_resp = local_var_client.execute(local_var_req).await?;
3817
3818 let local_var_status = local_var_resp.status();
3819 let local_var_content = local_var_resp.text().await?;
3820
3821 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3822 crate::from_str_patched(&local_var_content).map_err(Error::from)
3823 } else {
3824 let local_var_entity: Option<RunWaitResultFlowByVersionGetError> = crate::from_str_patched(&local_var_content).ok();
3825 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3826 Err(Error::ResponseError(local_var_error))
3827 }
3828}
3829
3830pub 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>> {
3831 let local_var_configuration = configuration;
3832
3833 let local_var_client = &local_var_configuration.client;
3834
3835 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));
3836 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3837
3838 if let Some(ref local_var_str) = parent_job {
3839 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
3840 }
3841 if let Some(ref local_var_str) = tag {
3842 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
3843 }
3844 if let Some(ref local_var_str) = cache_ttl {
3845 local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
3846 }
3847 if let Some(ref local_var_str) = job_id {
3848 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3849 }
3850 if let Some(ref local_var_str) = include_header {
3851 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3852 }
3853 if let Some(ref local_var_str) = queue_limit {
3854 local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
3855 }
3856 if let Some(ref local_var_str) = skip_preprocessor {
3857 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
3858 }
3859 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3860 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3861 }
3862 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3863 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3864 };
3865 local_var_req_builder = local_var_req_builder.json(&request_body);
3866
3867 let local_var_req = local_var_req_builder.build()?;
3868 let local_var_resp = local_var_client.execute(local_var_req).await?;
3869
3870 let local_var_status = local_var_resp.status();
3871 let local_var_content = local_var_resp.text().await?;
3872
3873 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3874 crate::from_str_patched(&local_var_content).map_err(Error::from)
3875 } else {
3876 let local_var_entity: Option<RunWaitResultScriptByPathError> = crate::from_str_patched(&local_var_content).ok();
3877 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3878 Err(Error::ResponseError(local_var_error))
3879 }
3880}
3881
3882pub 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>> {
3883 let local_var_configuration = configuration;
3884
3885 let local_var_client = &local_var_configuration.client;
3886
3887 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));
3888 let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3889
3890 if let Some(ref local_var_str) = parent_job {
3891 local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
3892 }
3893 if let Some(ref local_var_str) = tag {
3894 local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
3895 }
3896 if let Some(ref local_var_str) = cache_ttl {
3897 local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
3898 }
3899 if let Some(ref local_var_str) = job_id {
3900 local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3901 }
3902 if let Some(ref local_var_str) = include_header {
3903 local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3904 }
3905 if let Some(ref local_var_str) = queue_limit {
3906 local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
3907 }
3908 if let Some(ref local_var_str) = payload {
3909 local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
3910 }
3911 if let Some(ref local_var_str) = skip_preprocessor {
3912 local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
3913 }
3914 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3915 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3916 }
3917 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3918 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3919 };
3920
3921 let local_var_req = local_var_req_builder.build()?;
3922 let local_var_resp = local_var_client.execute(local_var_req).await?;
3923
3924 let local_var_status = local_var_resp.status();
3925 let local_var_content = local_var_resp.text().await?;
3926
3927 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3928 crate::from_str_patched(&local_var_content).map_err(Error::from)
3929 } else {
3930 let local_var_entity: Option<RunWaitResultScriptByPathGetError> = crate::from_str_patched(&local_var_content).ok();
3931 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3932 Err(Error::ResponseError(local_var_error))
3933 }
3934}
3935
3936pub async fn set_flow_user_state(configuration: &configuration::Configuration, workspace: &str, id: &str, key: &str, body: Option<serde_json::Value>) -> Result<String, Error<SetFlowUserStateError>> {
3937 let local_var_configuration = configuration;
3938
3939 let local_var_client = &local_var_configuration.client;
3940
3941 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));
3942 let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3943
3944 if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3945 local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3946 }
3947 if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3948 local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3949 };
3950 local_var_req_builder = local_var_req_builder.json(&body);
3951
3952 let local_var_req = local_var_req_builder.build()?;
3953 let local_var_resp = local_var_client.execute(local_var_req).await?;
3954
3955 let local_var_status = local_var_resp.status();
3956 let local_var_content = local_var_resp.text().await?;
3957
3958 if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3959 crate::from_str_patched(&local_var_content).map_err(Error::from)
3960 } else {
3961 let local_var_entity: Option<SetFlowUserStateError> = crate::from_str_patched(&local_var_content).ok();
3962 let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3963 Err(Error::ResponseError(local_var_error))
3964 }
3965}
3966