Skip to main content

windmill_api/apis/
job_api.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.884.1
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12use reqwest;
13use serde::{Deserialize, Serialize};
14use crate::{apis::ResponseContent, models};
15use super::{Error, configuration};
16
17
18/// struct for typed errors of method [`batch_re_run_jobs`]
19#[derive(Debug, Clone, Serialize, Deserialize)]
20#[serde(untagged)]
21pub enum BatchReRunJobsError {
22    UnknownValue(serde_json::Value),
23}
24
25/// struct for typed errors of method [`cancel_persistent_queued_jobs`]
26#[derive(Debug, Clone, Serialize, Deserialize)]
27#[serde(untagged)]
28pub enum CancelPersistentQueuedJobsError {
29    UnknownValue(serde_json::Value),
30}
31
32/// struct for typed errors of method [`cancel_queued_job`]
33#[derive(Debug, Clone, Serialize, Deserialize)]
34#[serde(untagged)]
35pub enum CancelQueuedJobError {
36    UnknownValue(serde_json::Value),
37}
38
39/// struct for typed errors of method [`cancel_selection`]
40#[derive(Debug, Clone, Serialize, Deserialize)]
41#[serde(untagged)]
42pub enum CancelSelectionError {
43    UnknownValue(serde_json::Value),
44}
45
46/// struct for typed errors of method [`cancel_suspended_job_get`]
47#[derive(Debug, Clone, Serialize, Deserialize)]
48#[serde(untagged)]
49pub enum CancelSuspendedJobGetError {
50    UnknownValue(serde_json::Value),
51}
52
53/// struct for typed errors of method [`cancel_suspended_job_post`]
54#[derive(Debug, Clone, Serialize, Deserialize)]
55#[serde(untagged)]
56pub enum CancelSuspendedJobPostError {
57    UnknownValue(serde_json::Value),
58}
59
60/// struct for typed errors of method [`count_completed_jobs`]
61#[derive(Debug, Clone, Serialize, Deserialize)]
62#[serde(untagged)]
63pub enum CountCompletedJobsError {
64    UnknownValue(serde_json::Value),
65}
66
67/// struct for typed errors of method [`count_jobs_by_tag`]
68#[derive(Debug, Clone, Serialize, Deserialize)]
69#[serde(untagged)]
70pub enum CountJobsByTagError {
71    UnknownValue(serde_json::Value),
72}
73
74/// struct for typed errors of method [`create_job_signature`]
75#[derive(Debug, Clone, Serialize, Deserialize)]
76#[serde(untagged)]
77pub enum CreateJobSignatureError {
78    UnknownValue(serde_json::Value),
79}
80
81/// struct for typed errors of method [`delete_completed_job`]
82#[derive(Debug, Clone, Serialize, Deserialize)]
83#[serde(untagged)]
84pub enum DeleteCompletedJobError {
85    UnknownValue(serde_json::Value),
86}
87
88/// struct for typed errors of method [`delete_jobs`]
89#[derive(Debug, Clone, Serialize, Deserialize)]
90#[serde(untagged)]
91pub enum DeleteJobsError {
92    UnknownValue(serde_json::Value),
93}
94
95/// struct for typed errors of method [`export_completed_jobs`]
96#[derive(Debug, Clone, Serialize, Deserialize)]
97#[serde(untagged)]
98pub enum ExportCompletedJobsError {
99    UnknownValue(serde_json::Value),
100}
101
102/// struct for typed errors of method [`export_queued_jobs`]
103#[derive(Debug, Clone, Serialize, Deserialize)]
104#[serde(untagged)]
105pub enum ExportQueuedJobsError {
106    UnknownValue(serde_json::Value),
107}
108
109/// struct for typed errors of method [`force_cancel_queued_job`]
110#[derive(Debug, Clone, Serialize, Deserialize)]
111#[serde(untagged)]
112pub enum ForceCancelQueuedJobError {
113    UnknownValue(serde_json::Value),
114}
115
116/// struct for typed errors of method [`get_approval_info`]
117#[derive(Debug, Clone, Serialize, Deserialize)]
118#[serde(untagged)]
119pub enum GetApprovalInfoError {
120    UnknownValue(serde_json::Value),
121}
122
123/// struct for typed errors of method [`get_approval_step_detail`]
124#[derive(Debug, Clone, Serialize, Deserialize)]
125#[serde(untagged)]
126pub enum GetApprovalStepDetailError {
127    UnknownValue(serde_json::Value),
128}
129
130/// struct for typed errors of method [`get_completed_count`]
131#[derive(Debug, Clone, Serialize, Deserialize)]
132#[serde(untagged)]
133pub enum GetCompletedCountError {
134    UnknownValue(serde_json::Value),
135}
136
137/// struct for typed errors of method [`get_completed_job`]
138#[derive(Debug, Clone, Serialize, Deserialize)]
139#[serde(untagged)]
140pub enum GetCompletedJobError {
141    UnknownValue(serde_json::Value),
142}
143
144/// struct for typed errors of method [`get_completed_job_logs_tail`]
145#[derive(Debug, Clone, Serialize, Deserialize)]
146#[serde(untagged)]
147pub enum GetCompletedJobLogsTailError {
148    UnknownValue(serde_json::Value),
149}
150
151/// struct for typed errors of method [`get_completed_job_result`]
152#[derive(Debug, Clone, Serialize, Deserialize)]
153#[serde(untagged)]
154pub enum GetCompletedJobResultError {
155    UnknownValue(serde_json::Value),
156}
157
158/// struct for typed errors of method [`get_completed_job_result_maybe`]
159#[derive(Debug, Clone, Serialize, Deserialize)]
160#[serde(untagged)]
161pub enum GetCompletedJobResultMaybeError {
162    UnknownValue(serde_json::Value),
163}
164
165/// struct for typed errors of method [`get_completed_job_timing`]
166#[derive(Debug, Clone, Serialize, Deserialize)]
167#[serde(untagged)]
168pub enum GetCompletedJobTimingError {
169    UnknownValue(serde_json::Value),
170}
171
172/// struct for typed errors of method [`get_db_clock`]
173#[derive(Debug, Clone, Serialize, Deserialize)]
174#[serde(untagged)]
175pub enum GetDbClockError {
176    UnknownValue(serde_json::Value),
177}
178
179/// struct for typed errors of method [`get_dbt_resumable`]
180#[derive(Debug, Clone, Serialize, Deserialize)]
181#[serde(untagged)]
182pub enum GetDbtResumableError {
183    UnknownValue(serde_json::Value),
184}
185
186/// struct for typed errors of method [`get_dbt_resumable_for_script`]
187#[derive(Debug, Clone, Serialize, Deserialize)]
188#[serde(untagged)]
189pub enum GetDbtResumableForScriptError {
190    UnknownValue(serde_json::Value),
191}
192
193/// struct for typed errors of method [`get_dbt_run_column_lineage`]
194#[derive(Debug, Clone, Serialize, Deserialize)]
195#[serde(untagged)]
196pub enum GetDbtRunColumnLineageError {
197    UnknownValue(serde_json::Value),
198}
199
200/// struct for typed errors of method [`get_dbt_run_graph`]
201#[derive(Debug, Clone, Serialize, Deserialize)]
202#[serde(untagged)]
203pub enum GetDbtRunGraphError {
204    UnknownValue(serde_json::Value),
205}
206
207/// struct for typed errors of method [`get_flow_all_logs`]
208#[derive(Debug, Clone, Serialize, Deserialize)]
209#[serde(untagged)]
210pub enum GetFlowAllLogsError {
211    UnknownValue(serde_json::Value),
212}
213
214/// struct for typed errors of method [`get_flow_all_logs_structured`]
215#[derive(Debug, Clone, Serialize, Deserialize)]
216#[serde(untagged)]
217pub enum GetFlowAllLogsStructuredError {
218    UnknownValue(serde_json::Value),
219}
220
221/// struct for typed errors of method [`get_flow_all_results`]
222#[derive(Debug, Clone, Serialize, Deserialize)]
223#[serde(untagged)]
224pub enum GetFlowAllResultsError {
225    UnknownValue(serde_json::Value),
226}
227
228/// struct for typed errors of method [`get_flow_debug_info`]
229#[derive(Debug, Clone, Serialize, Deserialize)]
230#[serde(untagged)]
231pub enum GetFlowDebugInfoError {
232    UnknownValue(serde_json::Value),
233}
234
235/// struct for typed errors of method [`get_flow_user_state`]
236#[derive(Debug, Clone, Serialize, Deserialize)]
237#[serde(untagged)]
238pub enum GetFlowUserStateError {
239    UnknownValue(serde_json::Value),
240}
241
242/// struct for typed errors of method [`get_job`]
243#[derive(Debug, Clone, Serialize, Deserialize)]
244#[serde(untagged)]
245pub enum GetJobError {
246    UnknownValue(serde_json::Value),
247}
248
249/// struct for typed errors of method [`get_job_args`]
250#[derive(Debug, Clone, Serialize, Deserialize)]
251#[serde(untagged)]
252pub enum GetJobArgsError {
253    UnknownValue(serde_json::Value),
254}
255
256/// struct for typed errors of method [`get_job_logs`]
257#[derive(Debug, Clone, Serialize, Deserialize)]
258#[serde(untagged)]
259pub enum GetJobLogsError {
260    UnknownValue(serde_json::Value),
261}
262
263/// struct for typed errors of method [`get_job_otel_traces`]
264#[derive(Debug, Clone, Serialize, Deserialize)]
265#[serde(untagged)]
266pub enum GetJobOtelTracesError {
267    UnknownValue(serde_json::Value),
268}
269
270/// struct for typed errors of method [`get_job_public_view_token`]
271#[derive(Debug, Clone, Serialize, Deserialize)]
272#[serde(untagged)]
273pub enum GetJobPublicViewTokenError {
274    UnknownValue(serde_json::Value),
275}
276
277/// struct for typed errors of method [`get_job_updates`]
278#[derive(Debug, Clone, Serialize, Deserialize)]
279#[serde(untagged)]
280pub enum GetJobUpdatesError {
281    UnknownValue(serde_json::Value),
282}
283
284/// struct for typed errors of method [`get_job_updates_sse`]
285#[derive(Debug, Clone, Serialize, Deserialize)]
286#[serde(untagged)]
287pub enum GetJobUpdatesSseError {
288    UnknownValue(serde_json::Value),
289}
290
291/// struct for typed errors of method [`get_job_view_token`]
292#[derive(Debug, Clone, Serialize, Deserialize)]
293#[serde(untagged)]
294pub enum GetJobViewTokenError {
295    UnknownValue(serde_json::Value),
296}
297
298/// struct for typed errors of method [`get_log_file_from_store`]
299#[derive(Debug, Clone, Serialize, Deserialize)]
300#[serde(untagged)]
301pub enum GetLogFileFromStoreError {
302    UnknownValue(serde_json::Value),
303}
304
305/// struct for typed errors of method [`get_oldest_job`]
306#[derive(Debug, Clone, Serialize, Deserialize)]
307#[serde(untagged)]
308pub enum GetOldestJobError {
309    UnknownValue(serde_json::Value),
310}
311
312/// struct for typed errors of method [`get_queue_count`]
313#[derive(Debug, Clone, Serialize, Deserialize)]
314#[serde(untagged)]
315pub enum GetQueueCountError {
316    UnknownValue(serde_json::Value),
317}
318
319/// struct for typed errors of method [`get_queue_position`]
320#[derive(Debug, Clone, Serialize, Deserialize)]
321#[serde(untagged)]
322pub enum GetQueuePositionError {
323    UnknownValue(serde_json::Value),
324}
325
326/// struct for typed errors of method [`get_resume_urls`]
327#[derive(Debug, Clone, Serialize, Deserialize)]
328#[serde(untagged)]
329pub enum GetResumeUrlsError {
330    UnknownValue(serde_json::Value),
331}
332
333/// struct for typed errors of method [`get_root_job_id`]
334#[derive(Debug, Clone, Serialize, Deserialize)]
335#[serde(untagged)]
336pub enum GetRootJobIdError {
337    UnknownValue(serde_json::Value),
338}
339
340/// struct for typed errors of method [`get_run_progress`]
341#[derive(Debug, Clone, Serialize, Deserialize)]
342#[serde(untagged)]
343pub enum GetRunProgressError {
344    UnknownValue(serde_json::Value),
345}
346
347/// struct for typed errors of method [`get_scheduled_for`]
348#[derive(Debug, Clone, Serialize, Deserialize)]
349#[serde(untagged)]
350pub enum GetScheduledForError {
351    UnknownValue(serde_json::Value),
352}
353
354/// struct for typed errors of method [`get_slack_approval_payload`]
355#[derive(Debug, Clone, Serialize, Deserialize)]
356#[serde(untagged)]
357pub enum GetSlackApprovalPayloadError {
358    UnknownValue(serde_json::Value),
359}
360
361/// struct for typed errors of method [`get_started_at_by_ids`]
362#[derive(Debug, Clone, Serialize, Deserialize)]
363#[serde(untagged)]
364pub enum GetStartedAtByIdsError {
365    UnknownValue(serde_json::Value),
366}
367
368/// struct for typed errors of method [`get_suspended_job_flow`]
369#[derive(Debug, Clone, Serialize, Deserialize)]
370#[serde(untagged)]
371pub enum GetSuspendedJobFlowError {
372    UnknownValue(serde_json::Value),
373}
374
375/// struct for typed errors of method [`get_teams_approval_payload`]
376#[derive(Debug, Clone, Serialize, Deserialize)]
377#[serde(untagged)]
378pub enum GetTeamsApprovalPayloadError {
379    UnknownValue(serde_json::Value),
380}
381
382/// struct for typed errors of method [`get_wac_approval_urls`]
383#[derive(Debug, Clone, Serialize, Deserialize)]
384#[serde(untagged)]
385pub enum GetWacApprovalUrlsError {
386    UnknownValue(serde_json::Value),
387}
388
389/// struct for typed errors of method [`hide_recent_run_items`]
390#[derive(Debug, Clone, Serialize, Deserialize)]
391#[serde(untagged)]
392pub enum HideRecentRunItemsError {
393    UnknownValue(serde_json::Value),
394}
395
396/// struct for typed errors of method [`import_completed_jobs`]
397#[derive(Debug, Clone, Serialize, Deserialize)]
398#[serde(untagged)]
399pub enum ImportCompletedJobsError {
400    UnknownValue(serde_json::Value),
401}
402
403/// struct for typed errors of method [`import_queued_jobs`]
404#[derive(Debug, Clone, Serialize, Deserialize)]
405#[serde(untagged)]
406pub enum ImportQueuedJobsError {
407    UnknownValue(serde_json::Value),
408}
409
410/// struct for typed errors of method [`list_asset_dispatch_edges`]
411#[derive(Debug, Clone, Serialize, Deserialize)]
412#[serde(untagged)]
413pub enum ListAssetDispatchEdgesError {
414    UnknownValue(serde_json::Value),
415}
416
417/// struct for typed errors of method [`list_completed_jobs`]
418#[derive(Debug, Clone, Serialize, Deserialize)]
419#[serde(untagged)]
420pub enum ListCompletedJobsError {
421    UnknownValue(serde_json::Value),
422}
423
424/// struct for typed errors of method [`list_dispatch_events`]
425#[derive(Debug, Clone, Serialize, Deserialize)]
426#[serde(untagged)]
427pub enum ListDispatchEventsError {
428    UnknownValue(serde_json::Value),
429}
430
431/// struct for typed errors of method [`list_extended_jobs`]
432#[derive(Debug, Clone, Serialize, Deserialize)]
433#[serde(untagged)]
434pub enum ListExtendedJobsError {
435    UnknownValue(serde_json::Value),
436}
437
438/// struct for typed errors of method [`list_filtered_jobs_uuids`]
439#[derive(Debug, Clone, Serialize, Deserialize)]
440#[serde(untagged)]
441pub enum ListFilteredJobsUuidsError {
442    UnknownValue(serde_json::Value),
443}
444
445/// struct for typed errors of method [`list_filtered_queue_uuids`]
446#[derive(Debug, Clone, Serialize, Deserialize)]
447#[serde(untagged)]
448pub enum ListFilteredQueueUuidsError {
449    UnknownValue(serde_json::Value),
450}
451
452/// struct for typed errors of method [`list_jobs`]
453#[derive(Debug, Clone, Serialize, Deserialize)]
454#[serde(untagged)]
455pub enum ListJobsError {
456    UnknownValue(serde_json::Value),
457}
458
459/// struct for typed errors of method [`list_queue`]
460#[derive(Debug, Clone, Serialize, Deserialize)]
461#[serde(untagged)]
462pub enum ListQueueError {
463    UnknownValue(serde_json::Value),
464}
465
466/// struct for typed errors of method [`list_recent_runs`]
467#[derive(Debug, Clone, Serialize, Deserialize)]
468#[serde(untagged)]
469pub enum ListRecentRunsError {
470    UnknownValue(serde_json::Value),
471}
472
473/// struct for typed errors of method [`list_run_assets`]
474#[derive(Debug, Clone, Serialize, Deserialize)]
475#[serde(untagged)]
476pub enum ListRunAssetsError {
477    UnknownValue(serde_json::Value),
478}
479
480/// struct for typed errors of method [`list_selected_job_groups`]
481#[derive(Debug, Clone, Serialize, Deserialize)]
482#[serde(untagged)]
483pub enum ListSelectedJobGroupsError {
484    UnknownValue(serde_json::Value),
485}
486
487/// struct for typed errors of method [`resolve_completed_jobs`]
488#[derive(Debug, Clone, Serialize, Deserialize)]
489#[serde(untagged)]
490pub enum ResolveCompletedJobsError {
491    UnknownValue(serde_json::Value),
492}
493
494/// struct for typed errors of method [`restart_flow_at_step`]
495#[derive(Debug, Clone, Serialize, Deserialize)]
496#[serde(untagged)]
497pub enum RestartFlowAtStepError {
498    UnknownValue(serde_json::Value),
499}
500
501/// struct for typed errors of method [`result_by_id`]
502#[derive(Debug, Clone, Serialize, Deserialize)]
503#[serde(untagged)]
504pub enum ResultByIdError {
505    UnknownValue(serde_json::Value),
506}
507
508/// struct for typed errors of method [`resume_suspended`]
509#[derive(Debug, Clone, Serialize, Deserialize)]
510#[serde(untagged)]
511pub enum ResumeSuspendedError {
512    UnknownValue(serde_json::Value),
513}
514
515/// struct for typed errors of method [`resume_suspended_flow_as_owner`]
516#[derive(Debug, Clone, Serialize, Deserialize)]
517#[serde(untagged)]
518pub enum ResumeSuspendedFlowAsOwnerError {
519    UnknownValue(serde_json::Value),
520}
521
522/// struct for typed errors of method [`resume_suspended_job_get`]
523#[derive(Debug, Clone, Serialize, Deserialize)]
524#[serde(untagged)]
525pub enum ResumeSuspendedJobGetError {
526    UnknownValue(serde_json::Value),
527}
528
529/// struct for typed errors of method [`resume_suspended_job_post`]
530#[derive(Debug, Clone, Serialize, Deserialize)]
531#[serde(untagged)]
532pub enum ResumeSuspendedJobPostError {
533    UnknownValue(serde_json::Value),
534}
535
536/// struct for typed errors of method [`run_agent`]
537#[derive(Debug, Clone, Serialize, Deserialize)]
538#[serde(untagged)]
539pub enum RunAgentError {
540    UnknownValue(serde_json::Value),
541}
542
543/// struct for typed errors of method [`run_and_stream_flow_by_path`]
544#[derive(Debug, Clone, Serialize, Deserialize)]
545#[serde(untagged)]
546pub enum RunAndStreamFlowByPathError {
547    Status409(),
548    UnknownValue(serde_json::Value),
549}
550
551/// struct for typed errors of method [`run_and_stream_flow_by_path_get`]
552#[derive(Debug, Clone, Serialize, Deserialize)]
553#[serde(untagged)]
554pub enum RunAndStreamFlowByPathGetError {
555    Status409(),
556    UnknownValue(serde_json::Value),
557}
558
559/// struct for typed errors of method [`run_and_stream_flow_by_version`]
560#[derive(Debug, Clone, Serialize, Deserialize)]
561#[serde(untagged)]
562pub enum RunAndStreamFlowByVersionError {
563    Status409(),
564    UnknownValue(serde_json::Value),
565}
566
567/// struct for typed errors of method [`run_and_stream_flow_by_version_get`]
568#[derive(Debug, Clone, Serialize, Deserialize)]
569#[serde(untagged)]
570pub enum RunAndStreamFlowByVersionGetError {
571    Status409(),
572    UnknownValue(serde_json::Value),
573}
574
575/// struct for typed errors of method [`run_and_stream_script_by_hash`]
576#[derive(Debug, Clone, Serialize, Deserialize)]
577#[serde(untagged)]
578pub enum RunAndStreamScriptByHashError {
579    UnknownValue(serde_json::Value),
580}
581
582/// struct for typed errors of method [`run_and_stream_script_by_hash_get`]
583#[derive(Debug, Clone, Serialize, Deserialize)]
584#[serde(untagged)]
585pub enum RunAndStreamScriptByHashGetError {
586    UnknownValue(serde_json::Value),
587}
588
589/// struct for typed errors of method [`run_and_stream_script_by_path`]
590#[derive(Debug, Clone, Serialize, Deserialize)]
591#[serde(untagged)]
592pub enum RunAndStreamScriptByPathError {
593    UnknownValue(serde_json::Value),
594}
595
596/// struct for typed errors of method [`run_and_stream_script_by_path_get`]
597#[derive(Debug, Clone, Serialize, Deserialize)]
598#[serde(untagged)]
599pub enum RunAndStreamScriptByPathGetError {
600    UnknownValue(serde_json::Value),
601}
602
603/// struct for typed errors of method [`run_code_workflow_task`]
604#[derive(Debug, Clone, Serialize, Deserialize)]
605#[serde(untagged)]
606pub enum RunCodeWorkflowTaskError {
607    UnknownValue(serde_json::Value),
608}
609
610/// struct for typed errors of method [`run_dynamic_select`]
611#[derive(Debug, Clone, Serialize, Deserialize)]
612#[serde(untagged)]
613pub enum RunDynamicSelectError {
614    UnknownValue(serde_json::Value),
615}
616
617/// struct for typed errors of method [`run_flow_by_path`]
618#[derive(Debug, Clone, Serialize, Deserialize)]
619#[serde(untagged)]
620pub enum RunFlowByPathError {
621    Status409(),
622    UnknownValue(serde_json::Value),
623}
624
625/// struct for typed errors of method [`run_flow_by_version`]
626#[derive(Debug, Clone, Serialize, Deserialize)]
627#[serde(untagged)]
628pub enum RunFlowByVersionError {
629    Status409(),
630    UnknownValue(serde_json::Value),
631}
632
633/// struct for typed errors of method [`run_flow_dependencies_async`]
634#[derive(Debug, Clone, Serialize, Deserialize)]
635#[serde(untagged)]
636pub enum RunFlowDependenciesAsyncError {
637    UnknownValue(serde_json::Value),
638}
639
640/// struct for typed errors of method [`run_flow_preview`]
641#[derive(Debug, Clone, Serialize, Deserialize)]
642#[serde(untagged)]
643pub enum RunFlowPreviewError {
644    Status409(),
645    UnknownValue(serde_json::Value),
646}
647
648/// struct for typed errors of method [`run_flow_preview_and_wait_result`]
649#[derive(Debug, Clone, Serialize, Deserialize)]
650#[serde(untagged)]
651pub enum RunFlowPreviewAndWaitResultError {
652    Status409(),
653    UnknownValue(serde_json::Value),
654}
655
656/// struct for typed errors of method [`run_flow_test`]
657#[derive(Debug, Clone, Serialize, Deserialize)]
658#[serde(untagged)]
659pub enum RunFlowTestError {
660    UnknownValue(serde_json::Value),
661}
662
663/// struct for typed errors of method [`run_queued_job_now`]
664#[derive(Debug, Clone, Serialize, Deserialize)]
665#[serde(untagged)]
666pub enum RunQueuedJobNowError {
667    UnknownValue(serde_json::Value),
668}
669
670/// struct for typed errors of method [`run_raw_script_dependencies`]
671#[derive(Debug, Clone, Serialize, Deserialize)]
672#[serde(untagged)]
673pub enum RunRawScriptDependenciesError {
674    UnknownValue(serde_json::Value),
675}
676
677/// struct for typed errors of method [`run_raw_script_dependencies_async`]
678#[derive(Debug, Clone, Serialize, Deserialize)]
679#[serde(untagged)]
680pub enum RunRawScriptDependenciesAsyncError {
681    UnknownValue(serde_json::Value),
682}
683
684/// struct for typed errors of method [`run_script_by_hash`]
685#[derive(Debug, Clone, Serialize, Deserialize)]
686#[serde(untagged)]
687pub enum RunScriptByHashError {
688    UnknownValue(serde_json::Value),
689}
690
691/// struct for typed errors of method [`run_script_by_hash_inline`]
692#[derive(Debug, Clone, Serialize, Deserialize)]
693#[serde(untagged)]
694pub enum RunScriptByHashInlineError {
695    UnknownValue(serde_json::Value),
696}
697
698/// struct for typed errors of method [`run_script_by_path`]
699#[derive(Debug, Clone, Serialize, Deserialize)]
700#[serde(untagged)]
701pub enum RunScriptByPathError {
702    UnknownValue(serde_json::Value),
703}
704
705/// struct for typed errors of method [`run_script_by_path_inline`]
706#[derive(Debug, Clone, Serialize, Deserialize)]
707#[serde(untagged)]
708pub enum RunScriptByPathInlineError {
709    UnknownValue(serde_json::Value),
710}
711
712/// struct for typed errors of method [`run_script_preview`]
713#[derive(Debug, Clone, Serialize, Deserialize)]
714#[serde(untagged)]
715pub enum RunScriptPreviewError {
716    UnknownValue(serde_json::Value),
717}
718
719/// struct for typed errors of method [`run_script_preview_and_wait_result`]
720#[derive(Debug, Clone, Serialize, Deserialize)]
721#[serde(untagged)]
722pub enum RunScriptPreviewAndWaitResultError {
723    UnknownValue(serde_json::Value),
724}
725
726/// struct for typed errors of method [`run_script_preview_inline`]
727#[derive(Debug, Clone, Serialize, Deserialize)]
728#[serde(untagged)]
729pub enum RunScriptPreviewInlineError {
730    UnknownValue(serde_json::Value),
731}
732
733/// struct for typed errors of method [`run_wait_result_flow_by_path`]
734#[derive(Debug, Clone, Serialize, Deserialize)]
735#[serde(untagged)]
736pub enum RunWaitResultFlowByPathError {
737    Status409(),
738    UnknownValue(serde_json::Value),
739}
740
741/// struct for typed errors of method [`run_wait_result_flow_by_version`]
742#[derive(Debug, Clone, Serialize, Deserialize)]
743#[serde(untagged)]
744pub enum RunWaitResultFlowByVersionError {
745    Status409(),
746    UnknownValue(serde_json::Value),
747}
748
749/// struct for typed errors of method [`run_wait_result_flow_by_version_get`]
750#[derive(Debug, Clone, Serialize, Deserialize)]
751#[serde(untagged)]
752pub enum RunWaitResultFlowByVersionGetError {
753    Status409(),
754    UnknownValue(serde_json::Value),
755}
756
757/// struct for typed errors of method [`run_wait_result_script_by_path`]
758#[derive(Debug, Clone, Serialize, Deserialize)]
759#[serde(untagged)]
760pub enum RunWaitResultScriptByPathError {
761    UnknownValue(serde_json::Value),
762}
763
764/// struct for typed errors of method [`run_wait_result_script_by_path_get`]
765#[derive(Debug, Clone, Serialize, Deserialize)]
766#[serde(untagged)]
767pub enum RunWaitResultScriptByPathGetError {
768    UnknownValue(serde_json::Value),
769}
770
771/// struct for typed errors of method [`set_flow_user_state`]
772#[derive(Debug, Clone, Serialize, Deserialize)]
773#[serde(untagged)]
774pub enum SetFlowUserStateError {
775    UnknownValue(serde_json::Value),
776}
777
778/// struct for typed errors of method [`unhide_recent_run_items`]
779#[derive(Debug, Clone, Serialize, Deserialize)]
780#[serde(untagged)]
781pub enum UnhideRecentRunItemsError {
782    UnknownValue(serde_json::Value),
783}
784
785/// struct for typed errors of method [`unresolve_completed_jobs`]
786#[derive(Debug, Clone, Serialize, Deserialize)]
787#[serde(untagged)]
788pub enum UnresolveCompletedJobsError {
789    UnknownValue(serde_json::Value),
790}
791
792/// struct for typed errors of method [`worker_is_draining`]
793#[derive(Debug, Clone, Serialize, Deserialize)]
794#[serde(untagged)]
795pub enum WorkerIsDrainingError {
796    UnknownValue(serde_json::Value),
797}
798
799
800/// Re-runs each job and marks every failed or canceled original that was re-run as resolved, with the new job's id in its note. Operators re-run without resolving.
801pub async fn batch_re_run_jobs(configuration: &configuration::Configuration, workspace: &str, batch_re_run_jobs_request: models::BatchReRunJobsRequest) -> Result<String, Error<BatchReRunJobsError>> {
802    let local_var_configuration = configuration;
803
804    let local_var_client = &local_var_configuration.client;
805
806    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/batch_rerun_jobs", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
807    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
808
809    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
810        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
811    }
812    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
813        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
814    };
815    local_var_req_builder = local_var_req_builder.json(&batch_re_run_jobs_request);
816
817    let local_var_req = local_var_req_builder.build()?;
818    let local_var_resp = local_var_client.execute(local_var_req).await?;
819
820    let local_var_status = local_var_resp.status();
821    let local_var_content = local_var_resp.text().await?;
822
823    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
824        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
825    } else {
826        let local_var_entity: Option<BatchReRunJobsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
827        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
828        Err(Error::ResponseError(local_var_error))
829    }
830}
831
832pub async fn cancel_persistent_queued_jobs(configuration: &configuration::Configuration, workspace: &str, path: &str, cancel_queued_job_request: models::CancelQueuedJobRequest) -> Result<String, Error<CancelPersistentQueuedJobsError>> {
833    let local_var_configuration = configuration;
834
835    let local_var_client = &local_var_configuration.client;
836
837    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));
838    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
839
840    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
841        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
842    }
843    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
844        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
845    };
846    local_var_req_builder = local_var_req_builder.json(&cancel_queued_job_request);
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/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
856    } else {
857        let local_var_entity: Option<CancelPersistentQueuedJobsError> = crate::from_str_patched/* Externally injected from /build.nu */(&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 cancel_queued_job(configuration: &configuration::Configuration, workspace: &str, id: &str, cancel_queued_job_request: models::CancelQueuedJobRequest) -> Result<String, Error<CancelQueuedJobError>> {
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_u/queue/cancel/{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    local_var_req_builder = local_var_req_builder.json(&cancel_queued_job_request);
878
879    let local_var_req = local_var_req_builder.build()?;
880    let local_var_resp = local_var_client.execute(local_var_req).await?;
881
882    let local_var_status = local_var_resp.status();
883    let local_var_content = local_var_resp.text().await?;
884
885    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
886        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
887    } else {
888        let local_var_entity: Option<CancelQueuedJobError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
889        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
890        Err(Error::ResponseError(local_var_error))
891    }
892}
893
894pub async fn cancel_selection(configuration: &configuration::Configuration, workspace: &str, request_body: Vec<String>, force_cancel: Option<bool>, all_workspaces: Option<bool>) -> Result<Vec<String>, Error<CancelSelectionError>> {
895    let local_var_configuration = configuration;
896
897    let local_var_client = &local_var_configuration.client;
898
899    let local_var_uri_str = format!("{}/w/{workspace}/jobs/queue/cancel_selection", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
900    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
901
902    if let Some(ref local_var_str) = force_cancel {
903        local_var_req_builder = local_var_req_builder.query(&[("force_cancel", &local_var_str.to_string())]);
904    }
905    if let Some(ref local_var_str) = all_workspaces {
906        local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
907    }
908    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
909        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
910    }
911    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
912        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
913    };
914    local_var_req_builder = local_var_req_builder.json(&request_body);
915
916    let local_var_req = local_var_req_builder.build()?;
917    let local_var_resp = local_var_client.execute(local_var_req).await?;
918
919    let local_var_status = local_var_resp.status();
920    let local_var_content = local_var_resp.text().await?;
921
922    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
923        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
924    } else {
925        let local_var_entity: Option<CancelSelectionError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
926        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
927        Err(Error::ResponseError(local_var_error))
928    }
929}
930
931pub 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>> {
932    let local_var_configuration = configuration;
933
934    let local_var_client = &local_var_configuration.client;
935
936    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));
937    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
938
939    if let Some(ref local_var_str) = approver {
940        local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
941    }
942    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
943        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
944    }
945    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
946        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
947    };
948
949    let local_var_req = local_var_req_builder.build()?;
950    let local_var_resp = local_var_client.execute(local_var_req).await?;
951
952    let local_var_status = local_var_resp.status();
953    let local_var_content = local_var_resp.text().await?;
954
955    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
956        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
957    } else {
958        let local_var_entity: Option<CancelSuspendedJobGetError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
959        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
960        Err(Error::ResponseError(local_var_error))
961    }
962}
963
964pub 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>> {
965    let local_var_configuration = configuration;
966
967    let local_var_client = &local_var_configuration.client;
968
969    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));
970    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
971
972    if let Some(ref local_var_str) = approver {
973        local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
974    }
975    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
976        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
977    }
978    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
979        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
980    };
981    local_var_req_builder = local_var_req_builder.json(&body);
982
983    let local_var_req = local_var_req_builder.build()?;
984    let local_var_resp = local_var_client.execute(local_var_req).await?;
985
986    let local_var_status = local_var_resp.status();
987    let local_var_content = local_var_resp.text().await?;
988
989    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
990        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
991    } else {
992        let local_var_entity: Option<CancelSuspendedJobPostError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
993        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
994        Err(Error::ResponseError(local_var_error))
995    }
996}
997
998pub 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>> {
999    let local_var_configuration = configuration;
1000
1001    let local_var_client = &local_var_configuration.client;
1002
1003    let local_var_uri_str = format!("{}/w/{workspace}/jobs/completed/count_jobs", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1004    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1005
1006    if let Some(ref local_var_str) = completed_after_s_ago {
1007        local_var_req_builder = local_var_req_builder.query(&[("completed_after_s_ago", &local_var_str.to_string())]);
1008    }
1009    if let Some(ref local_var_str) = success {
1010        local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
1011    }
1012    if let Some(ref local_var_str) = tags {
1013        local_var_req_builder = local_var_req_builder.query(&[("tags", &local_var_str.to_string())]);
1014    }
1015    if let Some(ref local_var_str) = all_workspaces {
1016        local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
1017    }
1018    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1019        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1020    }
1021    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1022        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1023    };
1024
1025    let local_var_req = local_var_req_builder.build()?;
1026    let local_var_resp = local_var_client.execute(local_var_req).await?;
1027
1028    let local_var_status = local_var_resp.status();
1029    let local_var_content = local_var_resp.text().await?;
1030
1031    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1032        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1033    } else {
1034        let local_var_entity: Option<CountCompletedJobsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1035        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1036        Err(Error::ResponseError(local_var_error))
1037    }
1038}
1039
1040pub async fn count_jobs_by_tag(configuration: &configuration::Configuration, horizon_secs: Option<i32>, workspace_id: Option<&str>) -> Result<Vec<models::CountJobsByTag200ResponseInner>, Error<CountJobsByTagError>> {
1041    let local_var_configuration = configuration;
1042
1043    let local_var_client = &local_var_configuration.client;
1044
1045    let local_var_uri_str = format!("{}/jobs/completed/count_by_tag", local_var_configuration.base_path);
1046    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1047
1048    if let Some(ref local_var_str) = horizon_secs {
1049        local_var_req_builder = local_var_req_builder.query(&[("horizon_secs", &local_var_str.to_string())]);
1050    }
1051    if let Some(ref local_var_str) = workspace_id {
1052        local_var_req_builder = local_var_req_builder.query(&[("workspace_id", &local_var_str.to_string())]);
1053    }
1054    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1055        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1056    }
1057    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1058        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1059    };
1060
1061    let local_var_req = local_var_req_builder.build()?;
1062    let local_var_resp = local_var_client.execute(local_var_req).await?;
1063
1064    let local_var_status = local_var_resp.status();
1065    let local_var_content = local_var_resp.text().await?;
1066
1067    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1068        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1069    } else {
1070        let local_var_entity: Option<CountJobsByTagError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1071        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1072        Err(Error::ResponseError(local_var_error))
1073    }
1074}
1075
1076pub async fn create_job_signature(configuration: &configuration::Configuration, workspace: &str, id: &str, resume_id: i32, approver: Option<&str>) -> Result<String, Error<CreateJobSignatureError>> {
1077    let local_var_configuration = configuration;
1078
1079    let local_var_client = &local_var_configuration.client;
1080
1081    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);
1082    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1083
1084    if let Some(ref local_var_str) = approver {
1085        local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
1086    }
1087    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1088        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1089    }
1090    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1091        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1092    };
1093
1094    let local_var_req = local_var_req_builder.build()?;
1095    let local_var_resp = local_var_client.execute(local_var_req).await?;
1096
1097    let local_var_status = local_var_resp.status();
1098    let local_var_content = local_var_resp.text().await?;
1099
1100    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1101        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1102    } else {
1103        let local_var_entity: Option<CreateJobSignatureError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1104        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1105        Err(Error::ResponseError(local_var_error))
1106    }
1107}
1108
1109pub async fn delete_completed_job(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<models::CompletedJob, Error<DeleteCompletedJobError>> {
1110    let local_var_configuration = configuration;
1111
1112    let local_var_client = &local_var_configuration.client;
1113
1114    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));
1115    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1116
1117    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1118        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1119    }
1120    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1121        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1122    };
1123
1124    let local_var_req = local_var_req_builder.build()?;
1125    let local_var_resp = local_var_client.execute(local_var_req).await?;
1126
1127    let local_var_status = local_var_resp.status();
1128    let local_var_content = local_var_resp.text().await?;
1129
1130    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1131        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1132    } else {
1133        let local_var_entity: Option<DeleteCompletedJobError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1134        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1135        Err(Error::ResponseError(local_var_error))
1136    }
1137}
1138
1139pub async fn delete_jobs(configuration: &configuration::Configuration, workspace: &str, uuid_colon_colon_uuid: Vec<uuid::Uuid>) -> Result<String, Error<DeleteJobsError>> {
1140    let local_var_configuration = configuration;
1141
1142    let local_var_client = &local_var_configuration.client;
1143
1144    let local_var_uri_str = format!("{}/w/{workspace}/jobs/delete", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1145    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1146
1147    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1148        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1149    }
1150    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1151        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1152    };
1153    local_var_req_builder = local_var_req_builder.json(&uuid_colon_colon_uuid);
1154
1155    let local_var_req = local_var_req_builder.build()?;
1156    let local_var_resp = local_var_client.execute(local_var_req).await?;
1157
1158    let local_var_status = local_var_resp.status();
1159    let local_var_content = local_var_resp.text().await?;
1160
1161    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1162        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1163    } else {
1164        let local_var_entity: Option<DeleteJobsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1165        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1166        Err(Error::ResponseError(local_var_error))
1167    }
1168}
1169
1170pub async fn export_completed_jobs(configuration: &configuration::Configuration, workspace: &str, page: Option<i32>, per_page: Option<i32>) -> Result<Vec<models::ExportableCompletedJob>, Error<ExportCompletedJobsError>> {
1171    let local_var_configuration = configuration;
1172
1173    let local_var_client = &local_var_configuration.client;
1174
1175    let local_var_uri_str = format!("{}/w/{workspace}/jobs/completed/export", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1176    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1177
1178    if let Some(ref local_var_str) = page {
1179        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
1180    }
1181    if let Some(ref local_var_str) = per_page {
1182        local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
1183    }
1184    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1185        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1186    }
1187    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1188        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1189    };
1190
1191    let local_var_req = local_var_req_builder.build()?;
1192    let local_var_resp = local_var_client.execute(local_var_req).await?;
1193
1194    let local_var_status = local_var_resp.status();
1195    let local_var_content = local_var_resp.text().await?;
1196
1197    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1198        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1199    } else {
1200        let local_var_entity: Option<ExportCompletedJobsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1201        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1202        Err(Error::ResponseError(local_var_error))
1203    }
1204}
1205
1206pub async fn export_queued_jobs(configuration: &configuration::Configuration, workspace: &str, page: Option<i32>, per_page: Option<i32>) -> Result<Vec<models::ExportableQueuedJob>, Error<ExportQueuedJobsError>> {
1207    let local_var_configuration = configuration;
1208
1209    let local_var_client = &local_var_configuration.client;
1210
1211    let local_var_uri_str = format!("{}/w/{workspace}/jobs/queue/export", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1212    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1213
1214    if let Some(ref local_var_str) = page {
1215        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
1216    }
1217    if let Some(ref local_var_str) = per_page {
1218        local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
1219    }
1220    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1221        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1222    }
1223    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1224        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1225    };
1226
1227    let local_var_req = local_var_req_builder.build()?;
1228    let local_var_resp = local_var_client.execute(local_var_req).await?;
1229
1230    let local_var_status = local_var_resp.status();
1231    let local_var_content = local_var_resp.text().await?;
1232
1233    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1234        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1235    } else {
1236        let local_var_entity: Option<ExportQueuedJobsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1237        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1238        Err(Error::ResponseError(local_var_error))
1239    }
1240}
1241
1242pub async fn force_cancel_queued_job(configuration: &configuration::Configuration, workspace: &str, id: &str, cancel_queued_job_request: models::CancelQueuedJobRequest) -> Result<String, Error<ForceCancelQueuedJobError>> {
1243    let local_var_configuration = configuration;
1244
1245    let local_var_client = &local_var_configuration.client;
1246
1247    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));
1248    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
1249
1250    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1251        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1252    }
1253    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1254        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1255    };
1256    local_var_req_builder = local_var_req_builder.json(&cancel_queued_job_request);
1257
1258    let local_var_req = local_var_req_builder.build()?;
1259    let local_var_resp = local_var_client.execute(local_var_req).await?;
1260
1261    let local_var_status = local_var_resp.status();
1262    let local_var_content = local_var_resp.text().await?;
1263
1264    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1265        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1266    } else {
1267        let local_var_entity: Option<ForceCancelQueuedJobError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1268        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1269        Err(Error::ResponseError(local_var_error))
1270    }
1271}
1272
1273/// Get approval info for a suspended flow/WAC job. Returns form schema, approval rules, and whether the current user can approve. Either a valid token query parameter or an authenticated session is required. 
1274pub async fn get_approval_info(configuration: &configuration::Configuration, workspace: &str, job_id: &str, token: Option<&str>) -> Result<models::GetApprovalInfo200Response, Error<GetApprovalInfoError>> {
1275    let local_var_configuration = configuration;
1276
1277    let local_var_client = &local_var_configuration.client;
1278
1279    let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/flow/approval_info/{job_id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), job_id=crate::apis::urlencode(job_id));
1280    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1281
1282    if let Some(ref local_var_str) = token {
1283        local_var_req_builder = local_var_req_builder.query(&[("token", &local_var_str.to_string())]);
1284    }
1285    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1286        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1287    }
1288    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1289        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1290    };
1291
1292    let local_var_req = local_var_req_builder.build()?;
1293    let local_var_resp = local_var_client.execute(local_var_req).await?;
1294
1295    let local_var_status = local_var_resp.status();
1296    let local_var_content = local_var_resp.text().await?;
1297
1298    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1299        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1300    } else {
1301        let local_var_entity: Option<GetApprovalInfoError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1302        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1303        Err(Error::ResponseError(local_var_error))
1304    }
1305}
1306
1307/// Get the approval state of an approval (suspend) step of a flow run, by the flow run id and the step id, in a single query: where the step stands, its approval settings, the approvals received and, while it waits, whether the caller can approve. Only the run's own steps are searched: for a step inside a branch or loop, pass the id of the branch's or iteration's run. 
1308pub async fn get_approval_step_detail(configuration: &configuration::Configuration, workspace: &str, job_id: &str, step_id: &str) -> Result<models::GetApprovalStepDetail200Response, Error<GetApprovalStepDetailError>> {
1309    let local_var_configuration = configuration;
1310
1311    let local_var_client = &local_var_configuration.client;
1312
1313    let local_var_uri_str = format!("{}/w/{workspace}/jobs/flow/approval_step_detail/{job_id}/{step_id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), job_id=crate::apis::urlencode(job_id), step_id=crate::apis::urlencode(step_id));
1314    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1315
1316    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1317        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1318    }
1319    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1320        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1321    };
1322
1323    let local_var_req = local_var_req_builder.build()?;
1324    let local_var_resp = local_var_client.execute(local_var_req).await?;
1325
1326    let local_var_status = local_var_resp.status();
1327    let local_var_content = local_var_resp.text().await?;
1328
1329    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1330        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1331    } else {
1332        let local_var_entity: Option<GetApprovalStepDetailError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1333        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1334        Err(Error::ResponseError(local_var_error))
1335    }
1336}
1337
1338pub async fn get_completed_count(configuration: &configuration::Configuration, workspace: &str) -> Result<models::GetCompletedCount200Response, Error<GetCompletedCountError>> {
1339    let local_var_configuration = configuration;
1340
1341    let local_var_client = &local_var_configuration.client;
1342
1343    let local_var_uri_str = format!("{}/w/{workspace}/jobs/completed/count", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
1344    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1345
1346    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1347        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1348    }
1349    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1350        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1351    };
1352
1353    let local_var_req = local_var_req_builder.build()?;
1354    let local_var_resp = local_var_client.execute(local_var_req).await?;
1355
1356    let local_var_status = local_var_resp.status();
1357    let local_var_content = local_var_resp.text().await?;
1358
1359    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1360        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1361    } else {
1362        let local_var_entity: Option<GetCompletedCountError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1363        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1364        Err(Error::ResponseError(local_var_error))
1365    }
1366}
1367
1368pub async fn get_completed_job(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<models::CompletedJob, Error<GetCompletedJobError>> {
1369    let local_var_configuration = configuration;
1370
1371    let local_var_client = &local_var_configuration.client;
1372
1373    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));
1374    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1375
1376    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1377        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1378    }
1379    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1380        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1381    };
1382
1383    let local_var_req = local_var_req_builder.build()?;
1384    let local_var_resp = local_var_client.execute(local_var_req).await?;
1385
1386    let local_var_status = local_var_resp.status();
1387    let local_var_content = local_var_resp.text().await?;
1388
1389    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1390        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1391    } else {
1392        let local_var_entity: Option<GetCompletedJobError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1393        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1394        Err(Error::ResponseError(local_var_error))
1395    }
1396}
1397
1398pub async fn get_completed_job_logs_tail(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<String, Error<GetCompletedJobLogsTailError>> {
1399    let local_var_configuration = configuration;
1400
1401    let local_var_client = &local_var_configuration.client;
1402
1403    let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/get_completed_logs_tail/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1404    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1405
1406    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1407        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1408    }
1409    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1410        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1411    };
1412
1413    let local_var_req = local_var_req_builder.build()?;
1414    let local_var_resp = local_var_client.execute(local_var_req).await?;
1415
1416    let local_var_status = local_var_resp.status();
1417    let local_var_content = local_var_resp.text().await?;
1418
1419    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1420        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1421    } else {
1422        let local_var_entity: Option<GetCompletedJobLogsTailError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1423        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1424        Err(Error::ResponseError(local_var_error))
1425    }
1426}
1427
1428pub 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>> {
1429    let local_var_configuration = configuration;
1430
1431    let local_var_client = &local_var_configuration.client;
1432
1433    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));
1434    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1435
1436    if let Some(ref local_var_str) = suspended_job {
1437        local_var_req_builder = local_var_req_builder.query(&[("suspended_job", &local_var_str.to_string())]);
1438    }
1439    if let Some(ref local_var_str) = resume_id {
1440        local_var_req_builder = local_var_req_builder.query(&[("resume_id", &local_var_str.to_string())]);
1441    }
1442    if let Some(ref local_var_str) = secret {
1443        local_var_req_builder = local_var_req_builder.query(&[("secret", &local_var_str.to_string())]);
1444    }
1445    if let Some(ref local_var_str) = approver {
1446        local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
1447    }
1448    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1449        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1450    }
1451    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1452        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1453    };
1454
1455    let local_var_req = local_var_req_builder.build()?;
1456    let local_var_resp = local_var_client.execute(local_var_req).await?;
1457
1458    let local_var_status = local_var_resp.status();
1459    let local_var_content = local_var_resp.text().await?;
1460
1461    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1462        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1463    } else {
1464        let local_var_entity: Option<GetCompletedJobResultError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1465        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1466        Err(Error::ResponseError(local_var_error))
1467    }
1468}
1469
1470pub async fn get_completed_job_result_maybe(configuration: &configuration::Configuration, workspace: &str, id: &str, get_started: Option<bool>, wait_for_child: Option<bool>) -> Result<models::GetCompletedJobResultMaybe200Response, Error<GetCompletedJobResultMaybeError>> {
1471    let local_var_configuration = configuration;
1472
1473    let local_var_client = &local_var_configuration.client;
1474
1475    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));
1476    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1477
1478    if let Some(ref local_var_str) = get_started {
1479        local_var_req_builder = local_var_req_builder.query(&[("get_started", &local_var_str.to_string())]);
1480    }
1481    if let Some(ref local_var_str) = wait_for_child {
1482        local_var_req_builder = local_var_req_builder.query(&[("wait_for_child", &local_var_str.to_string())]);
1483    }
1484    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1485        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1486    }
1487    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1488        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1489    };
1490
1491    let local_var_req = local_var_req_builder.build()?;
1492    let local_var_resp = local_var_client.execute(local_var_req).await?;
1493
1494    let local_var_status = local_var_resp.status();
1495    let local_var_content = local_var_resp.text().await?;
1496
1497    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1498        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1499    } else {
1500        let local_var_entity: Option<GetCompletedJobResultMaybeError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1501        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1502        Err(Error::ResponseError(local_var_error))
1503    }
1504}
1505
1506pub async fn get_completed_job_timing(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<models::GetCompletedJobTiming200Response, Error<GetCompletedJobTimingError>> {
1507    let local_var_configuration = configuration;
1508
1509    let local_var_client = &local_var_configuration.client;
1510
1511    let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/completed/get_timing/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1512    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1513
1514    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1515        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1516    }
1517    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1518        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1519    };
1520
1521    let local_var_req = local_var_req_builder.build()?;
1522    let local_var_resp = local_var_client.execute(local_var_req).await?;
1523
1524    let local_var_status = local_var_resp.status();
1525    let local_var_content = local_var_resp.text().await?;
1526
1527    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1528        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1529    } else {
1530        let local_var_entity: Option<GetCompletedJobTimingError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1531        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1532        Err(Error::ResponseError(local_var_error))
1533    }
1534}
1535
1536pub async fn get_db_clock(configuration: &configuration::Configuration, ) -> Result<i32, Error<GetDbClockError>> {
1537    let local_var_configuration = configuration;
1538
1539    let local_var_client = &local_var_configuration.client;
1540
1541    let local_var_uri_str = format!("{}/jobs/db_clock", local_var_configuration.base_path);
1542    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1543
1544    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1545        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1546    }
1547    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1548        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1549    };
1550
1551    let local_var_req = local_var_req_builder.build()?;
1552    let local_var_resp = local_var_client.execute(local_var_req).await?;
1553
1554    let local_var_status = local_var_resp.status();
1555    let local_var_content = local_var_resp.text().await?;
1556
1557    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1558        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1559    } else {
1560        let local_var_entity: Option<GetDbClockError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1561        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1562        Err(Error::ResponseError(local_var_error))
1563    }
1564}
1565
1566/// One failed run is saved per script per execution principal, so a `retry` resumes that one — not necessarily the run being looked at. Answers about THIS run alone: its own id when a retry submitted by this caller would resume it, null otherwise (a later run holds the state, the run left nothing to rebuild, or the caller's runs execute as another principal). Authorized through the job, like `run_progress`. 
1567pub async fn get_dbt_resumable(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<uuid::Uuid, Error<GetDbtResumableError>> {
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/dbt_resumable/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(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_user_agent) = local_var_configuration.user_agent {
1576        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1577    }
1578    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1579        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1580    };
1581
1582    let local_var_req = local_var_req_builder.build()?;
1583    let local_var_resp = local_var_client.execute(local_var_req).await?;
1584
1585    let local_var_status = local_var_resp.status();
1586    let local_var_content = local_var_resp.text().await?;
1587
1588    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1589        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1590    } else {
1591        let local_var_entity: Option<GetDbtResumableError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1592        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1593        Err(Error::ResponseError(local_var_error))
1594    }
1595}
1596
1597/// A `retry` requires `dbt_retry_job`, and the run form has no job id to hand. Returns the one the caller's own retry would land on — the saved failure for the principal the run would execute as, which is the script's author for an `on_behalf_of` script and the caller otherwise — and only when that run is one the caller may read. Null when there is nothing to resume, or nothing this caller may be told about. 
1598pub async fn get_dbt_resumable_for_script(configuration: &configuration::Configuration, workspace: &str, path: &str) -> Result<uuid::Uuid, Error<GetDbtResumableForScriptError>> {
1599    let local_var_configuration = configuration;
1600
1601    let local_var_client = &local_var_configuration.client;
1602
1603    let local_var_uri_str = format!("{}/w/{workspace}/jobs/dbt_resumable_script/p/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
1604    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1605
1606    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1607        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1608    }
1609    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1610        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1611    };
1612
1613    let local_var_req = local_var_req_builder.build()?;
1614    let local_var_resp = local_var_client.execute(local_var_req).await?;
1615
1616    let local_var_status = local_var_resp.status();
1617    let local_var_content = local_var_resp.text().await?;
1618
1619    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1620        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1621    } else {
1622        let local_var_entity: Option<GetDbtResumableForScriptError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1623        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1624        Err(Error::ResponseError(local_var_error))
1625    }
1626}
1627
1628/// The same answer as `assets/column_lineage`, for the project version a single job ran — including the dbt editor's parse of its own buffer, whose graph belongs to that job and is reachable no other way. One project answers here, the one the run is of, since the graph this annotates is that project's too. Authorized through the job, the same gate as `dbt_graph`. Reaching the run is not on its own enough to read the project: a caller with no access to the script gets its relations and `ref()` edges from `dbt_graph` and an empty answer here, exactly as that endpoint redacts the model's SQL. 
1629pub async fn get_dbt_run_column_lineage(configuration: &configuration::Configuration, workspace: &str, id: &str, asset_path: Vec<String>) -> Result<models::DbtColumnLineage, Error<GetDbtRunColumnLineageError>> {
1630    let local_var_configuration = configuration;
1631
1632    let local_var_client = &local_var_configuration.client;
1633
1634    let local_var_uri_str = format!("{}/w/{workspace}/jobs/dbt_column_lineage/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1635    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1636
1637    local_var_req_builder = match "multi" {
1638        "multi" => local_var_req_builder.query(&asset_path.into_iter().map(|p| ("asset_path".to_owned(), p.to_string())).collect::<Vec<(std::string::String, std::string::String)>>()),
1639        _ => local_var_req_builder.query(&[("asset_path", &asset_path.into_iter().map(|p| p.to_string()).collect::<Vec<String>>().join(",").to_string())]),
1640    };
1641    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1642        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1643    }
1644    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1645        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1646    };
1647
1648    let local_var_req = local_var_req_builder.build()?;
1649    let local_var_resp = local_var_client.execute(local_var_req).await?;
1650
1651    let local_var_status = local_var_resp.status();
1652    let local_var_content = local_var_resp.text().await?;
1653
1654    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1655        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1656    } else {
1657        let local_var_entity: Option<GetDbtRunColumnLineageError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1658        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1659        Err(Error::ResponseError(local_var_error))
1660    }
1661}
1662
1663/// The workspace asset graph with its dbt half pinned to what a single run built. Only a dynamic descriptor (a `{{ }}` placeholder in `vars`) leaves a per-run snapshot; without one for this job the pinned version's own graph answers, so a run page may use this route unconditionally. Authorized through the job, the same gate as `run_progress` — pinning to a run is job-scoped, which is why `assets/graph` cannot do it. 
1664pub async fn get_dbt_run_graph(configuration: &configuration::Configuration, workspace: &str, id: &str, asset_kinds: Option<&str>, folder: Option<&str>, dbt_script_hash: Option<&str>) -> Result<models::AssetGraph, Error<GetDbtRunGraphError>> {
1665    let local_var_configuration = configuration;
1666
1667    let local_var_client = &local_var_configuration.client;
1668
1669    let local_var_uri_str = format!("{}/w/{workspace}/jobs/dbt_graph/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1670    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1671
1672    if let Some(ref local_var_str) = asset_kinds {
1673        local_var_req_builder = local_var_req_builder.query(&[("asset_kinds", &local_var_str.to_string())]);
1674    }
1675    if let Some(ref local_var_str) = folder {
1676        local_var_req_builder = local_var_req_builder.query(&[("folder", &local_var_str.to_string())]);
1677    }
1678    if let Some(ref local_var_str) = dbt_script_hash {
1679        local_var_req_builder = local_var_req_builder.query(&[("dbt_script_hash", &local_var_str.to_string())]);
1680    }
1681    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1682        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1683    }
1684    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1685        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1686    };
1687
1688    let local_var_req = local_var_req_builder.build()?;
1689    let local_var_resp = local_var_client.execute(local_var_req).await?;
1690
1691    let local_var_status = local_var_resp.status();
1692    let local_var_content = local_var_resp.text().await?;
1693
1694    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1695        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1696    } else {
1697        let local_var_entity: Option<GetDbtRunGraphError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1698        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1699        Err(Error::ResponseError(local_var_error))
1700    }
1701}
1702
1703pub async fn get_flow_all_logs(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<String, Error<GetFlowAllLogsError>> {
1704    let local_var_configuration = configuration;
1705
1706    let local_var_client = &local_var_configuration.client;
1707
1708    let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/get_flow_all_logs/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1709    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1710
1711    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1712        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1713    }
1714    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1715        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1716    };
1717
1718    let local_var_req = local_var_req_builder.build()?;
1719    let local_var_resp = local_var_client.execute(local_var_req).await?;
1720
1721    let local_var_status = local_var_resp.status();
1722    let local_var_content = local_var_resp.text().await?;
1723
1724    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1725        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1726    } else {
1727        let local_var_entity: Option<GetFlowAllLogsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1728        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1729        Err(Error::ResponseError(local_var_error))
1730    }
1731}
1732
1733pub async fn get_flow_all_logs_structured(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<Vec<models::GetFlowAllLogsStructured200ResponseInner>, Error<GetFlowAllLogsStructuredError>> {
1734    let local_var_configuration = configuration;
1735
1736    let local_var_client = &local_var_configuration.client;
1737
1738    let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/get_flow_all_logs_structured/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1739    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1740
1741    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1742        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1743    }
1744    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1745        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1746    };
1747
1748    let local_var_req = local_var_req_builder.build()?;
1749    let local_var_resp = local_var_client.execute(local_var_req).await?;
1750
1751    let local_var_status = local_var_resp.status();
1752    let local_var_content = local_var_resp.text().await?;
1753
1754    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1755        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1756    } else {
1757        let local_var_entity: Option<GetFlowAllLogsStructuredError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1758        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1759        Err(Error::ResponseError(local_var_error))
1760    }
1761}
1762
1763pub async fn get_flow_all_results(configuration: &configuration::Configuration, workspace: &str, id: &str, max_result_len: Option<i32>, step: Option<&str>) -> Result<models::GetFlowAllResults200Response, Error<GetFlowAllResultsError>> {
1764    let local_var_configuration = configuration;
1765
1766    let local_var_client = &local_var_configuration.client;
1767
1768    let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/get_flow_all_results/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1769    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1770
1771    if let Some(ref local_var_str) = max_result_len {
1772        local_var_req_builder = local_var_req_builder.query(&[("max_result_len", &local_var_str.to_string())]);
1773    }
1774    if let Some(ref local_var_str) = step {
1775        local_var_req_builder = local_var_req_builder.query(&[("step", &local_var_str.to_string())]);
1776    }
1777    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1778        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1779    }
1780    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1781        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1782    };
1783
1784    let local_var_req = local_var_req_builder.build()?;
1785    let local_var_resp = local_var_client.execute(local_var_req).await?;
1786
1787    let local_var_status = local_var_resp.status();
1788    let local_var_content = local_var_resp.text().await?;
1789
1790    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1791        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1792    } else {
1793        let local_var_entity: Option<GetFlowAllResultsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1794        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1795        Err(Error::ResponseError(local_var_error))
1796    }
1797}
1798
1799pub async fn get_flow_debug_info(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<serde_json::Value, Error<GetFlowDebugInfoError>> {
1800    let local_var_configuration = configuration;
1801
1802    let local_var_client = &local_var_configuration.client;
1803
1804    let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/get_flow_debug_info/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1805    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1806
1807    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1808        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1809    }
1810    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1811        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1812    };
1813
1814    let local_var_req = local_var_req_builder.build()?;
1815    let local_var_resp = local_var_client.execute(local_var_req).await?;
1816
1817    let local_var_status = local_var_resp.status();
1818    let local_var_content = local_var_resp.text().await?;
1819
1820    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1821        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1822    } else {
1823        let local_var_entity: Option<GetFlowDebugInfoError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1824        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1825        Err(Error::ResponseError(local_var_error))
1826    }
1827}
1828
1829pub async fn get_flow_user_state(configuration: &configuration::Configuration, workspace: &str, id: &str, key: &str) -> Result<serde_json::Value, Error<GetFlowUserStateError>> {
1830    let local_var_configuration = configuration;
1831
1832    let local_var_client = &local_var_configuration.client;
1833
1834    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));
1835    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1836
1837    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1838        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1839    }
1840    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1841        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1842    };
1843
1844    let local_var_req = local_var_req_builder.build()?;
1845    let local_var_resp = local_var_client.execute(local_var_req).await?;
1846
1847    let local_var_status = local_var_resp.status();
1848    let local_var_content = local_var_resp.text().await?;
1849
1850    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1851        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1852    } else {
1853        let local_var_entity: Option<GetFlowUserStateError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1854        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1855        Err(Error::ResponseError(local_var_error))
1856    }
1857}
1858
1859pub async fn get_job(configuration: &configuration::Configuration, workspace: &str, id: &str, no_logs: Option<bool>, no_code: Option<bool>, approval_token: Option<&str>) -> Result<models::Job, Error<GetJobError>> {
1860    let local_var_configuration = configuration;
1861
1862    let local_var_client = &local_var_configuration.client;
1863
1864    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));
1865    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1866
1867    if let Some(ref local_var_str) = no_logs {
1868        local_var_req_builder = local_var_req_builder.query(&[("no_logs", &local_var_str.to_string())]);
1869    }
1870    if let Some(ref local_var_str) = no_code {
1871        local_var_req_builder = local_var_req_builder.query(&[("no_code", &local_var_str.to_string())]);
1872    }
1873    if let Some(ref local_var_str) = approval_token {
1874        local_var_req_builder = local_var_req_builder.query(&[("approval_token", &local_var_str.to_string())]);
1875    }
1876    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1877        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1878    }
1879    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1880        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1881    };
1882
1883    let local_var_req = local_var_req_builder.build()?;
1884    let local_var_resp = local_var_client.execute(local_var_req).await?;
1885
1886    let local_var_status = local_var_resp.status();
1887    let local_var_content = local_var_resp.text().await?;
1888
1889    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1890        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1891    } else {
1892        let local_var_entity: Option<GetJobError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1893        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1894        Err(Error::ResponseError(local_var_error))
1895    }
1896}
1897
1898pub async fn get_job_args(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<serde_json::Value, Error<GetJobArgsError>> {
1899    let local_var_configuration = configuration;
1900
1901    let local_var_client = &local_var_configuration.client;
1902
1903    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));
1904    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1905
1906    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1907        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1908    }
1909    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1910        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1911    };
1912
1913    let local_var_req = local_var_req_builder.build()?;
1914    let local_var_resp = local_var_client.execute(local_var_req).await?;
1915
1916    let local_var_status = local_var_resp.status();
1917    let local_var_content = local_var_resp.text().await?;
1918
1919    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1920        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1921    } else {
1922        let local_var_entity: Option<GetJobArgsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1923        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1924        Err(Error::ResponseError(local_var_error))
1925    }
1926}
1927
1928pub async fn get_job_logs(configuration: &configuration::Configuration, workspace: &str, id: &str, remove_ansi_warnings: Option<bool>) -> Result<String, Error<GetJobLogsError>> {
1929    let local_var_configuration = configuration;
1930
1931    let local_var_client = &local_var_configuration.client;
1932
1933    let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/get_logs/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1934    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1935
1936    if let Some(ref local_var_str) = remove_ansi_warnings {
1937        local_var_req_builder = local_var_req_builder.query(&[("remove_ansi_warnings", &local_var_str.to_string())]);
1938    }
1939    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1940        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1941    }
1942    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1943        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1944    };
1945
1946    let local_var_req = local_var_req_builder.build()?;
1947    let local_var_resp = local_var_client.execute(local_var_req).await?;
1948
1949    let local_var_status = local_var_resp.status();
1950    let local_var_content = local_var_resp.text().await?;
1951
1952    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1953        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1954    } else {
1955        let local_var_entity: Option<GetJobLogsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1956        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1957        Err(Error::ResponseError(local_var_error))
1958    }
1959}
1960
1961pub async fn get_job_otel_traces(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<Vec<serde_json::Value>, Error<GetJobOtelTracesError>> {
1962    let local_var_configuration = configuration;
1963
1964    let local_var_client = &local_var_configuration.client;
1965
1966    let local_var_uri_str = format!("{}/w/{workspace}/jobs/get_otel_traces/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1967    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1968
1969    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
1970        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1971    }
1972    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
1973        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
1974    };
1975
1976    let local_var_req = local_var_req_builder.build()?;
1977    let local_var_resp = local_var_client.execute(local_var_req).await?;
1978
1979    let local_var_status = local_var_resp.status();
1980    let local_var_content = local_var_resp.text().await?;
1981
1982    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1983        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
1984    } else {
1985        let local_var_entity: Option<GetJobOtelTracesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
1986        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1987        Err(Error::ResponseError(local_var_error))
1988    }
1989}
1990
1991/// Returns a stateless `{job_id}.{hmac}` token that grants anyone holding it — including logged-out visitors, who land on the minimal public run page — read access to this job (and its flow subtree) via a `view_token` query param or `X-View-Token` header. Only callable by a user who can already read the job. 
1992pub async fn get_job_public_view_token(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<String, Error<GetJobPublicViewTokenError>> {
1993    let local_var_configuration = configuration;
1994
1995    let local_var_client = &local_var_configuration.client;
1996
1997    let local_var_uri_str = format!("{}/w/{workspace}/jobs/job_public_view_token/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
1998    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
1999
2000    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2001        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2002    }
2003    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2004        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2005    };
2006
2007    let local_var_req = local_var_req_builder.build()?;
2008    let local_var_resp = local_var_client.execute(local_var_req).await?;
2009
2010    let local_var_status = local_var_resp.status();
2011    let local_var_content = local_var_resp.text().await?;
2012
2013    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2014        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2015    } else {
2016        let local_var_entity: Option<GetJobPublicViewTokenError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2017        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2018        Err(Error::ResponseError(local_var_error))
2019    }
2020}
2021
2022pub 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>> {
2023    let local_var_configuration = configuration;
2024
2025    let local_var_client = &local_var_configuration.client;
2026
2027    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));
2028    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2029
2030    if let Some(ref local_var_str) = running {
2031        local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
2032    }
2033    if let Some(ref local_var_str) = log_offset {
2034        local_var_req_builder = local_var_req_builder.query(&[("log_offset", &local_var_str.to_string())]);
2035    }
2036    if let Some(ref local_var_str) = stream_offset {
2037        local_var_req_builder = local_var_req_builder.query(&[("stream_offset", &local_var_str.to_string())]);
2038    }
2039    if let Some(ref local_var_str) = get_progress {
2040        local_var_req_builder = local_var_req_builder.query(&[("get_progress", &local_var_str.to_string())]);
2041    }
2042    if let Some(ref local_var_str) = no_logs {
2043        local_var_req_builder = local_var_req_builder.query(&[("no_logs", &local_var_str.to_string())]);
2044    }
2045    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2046        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2047    }
2048    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2049        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2050    };
2051
2052    let local_var_req = local_var_req_builder.build()?;
2053    let local_var_resp = local_var_client.execute(local_var_req).await?;
2054
2055    let local_var_status = local_var_resp.status();
2056    let local_var_content = local_var_resp.text().await?;
2057
2058    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2059        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2060    } else {
2061        let local_var_entity: Option<GetJobUpdatesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2062        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2063        Err(Error::ResponseError(local_var_error))
2064    }
2065}
2066
2067pub 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>, fast: Option<bool>) -> Result<String, Error<GetJobUpdatesSseError>> {
2068    let local_var_configuration = configuration;
2069
2070    let local_var_client = &local_var_configuration.client;
2071
2072    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));
2073    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2074
2075    if let Some(ref local_var_str) = running {
2076        local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
2077    }
2078    if let Some(ref local_var_str) = log_offset {
2079        local_var_req_builder = local_var_req_builder.query(&[("log_offset", &local_var_str.to_string())]);
2080    }
2081    if let Some(ref local_var_str) = stream_offset {
2082        local_var_req_builder = local_var_req_builder.query(&[("stream_offset", &local_var_str.to_string())]);
2083    }
2084    if let Some(ref local_var_str) = get_progress {
2085        local_var_req_builder = local_var_req_builder.query(&[("get_progress", &local_var_str.to_string())]);
2086    }
2087    if let Some(ref local_var_str) = only_result {
2088        local_var_req_builder = local_var_req_builder.query(&[("only_result", &local_var_str.to_string())]);
2089    }
2090    if let Some(ref local_var_str) = no_logs {
2091        local_var_req_builder = local_var_req_builder.query(&[("no_logs", &local_var_str.to_string())]);
2092    }
2093    if let Some(ref local_var_str) = fast {
2094        local_var_req_builder = local_var_req_builder.query(&[("fast", &local_var_str.to_string())]);
2095    }
2096    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2097        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2098    }
2099    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2100        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2101    };
2102
2103    let local_var_req = local_var_req_builder.build()?;
2104    let local_var_resp = local_var_client.execute(local_var_req).await?;
2105
2106    let local_var_status = local_var_resp.status();
2107    let local_var_content = local_var_resp.text().await?;
2108
2109    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2110        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2111    } else {
2112        let local_var_entity: Option<GetJobUpdatesSseError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2113        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2114        Err(Error::ResponseError(local_var_error))
2115    }
2116}
2117
2118/// Returns a stateless `{job_id}.{hmac}` token that grants an authenticated workspace member read access to this job (and its flow subtree) via a `view_token` query param or `X-View-Token` header. Only callable by a user who can already read the job. 
2119pub async fn get_job_view_token(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<String, Error<GetJobViewTokenError>> {
2120    let local_var_configuration = configuration;
2121
2122    let local_var_client = &local_var_configuration.client;
2123
2124    let local_var_uri_str = format!("{}/w/{workspace}/jobs/job_view_token/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
2125    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2126
2127    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2128        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2129    }
2130    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2131        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2132    };
2133
2134    let local_var_req = local_var_req_builder.build()?;
2135    let local_var_resp = local_var_client.execute(local_var_req).await?;
2136
2137    let local_var_status = local_var_resp.status();
2138    let local_var_content = local_var_resp.text().await?;
2139
2140    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2141        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2142    } else {
2143        let local_var_entity: Option<GetJobViewTokenError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2144        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2145        Err(Error::ResponseError(local_var_error))
2146    }
2147}
2148
2149pub async fn get_log_file_from_store(configuration: &configuration::Configuration, workspace: &str, path: &str) -> Result<String, Error<GetLogFileFromStoreError>> {
2150    let local_var_configuration = configuration;
2151
2152    let local_var_client = &local_var_configuration.client;
2153
2154    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));
2155    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2156
2157    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2158        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2159    }
2160    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2161        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2162    };
2163
2164    let local_var_req = local_var_req_builder.build()?;
2165    let local_var_resp = local_var_client.execute(local_var_req).await?;
2166
2167    let local_var_status = local_var_resp.status();
2168    let local_var_content = local_var_resp.text().await?;
2169
2170    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2171        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2172    } else {
2173        let local_var_entity: Option<GetLogFileFromStoreError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2174        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2175        Err(Error::ResponseError(local_var_error))
2176    }
2177}
2178
2179pub async fn get_oldest_job(configuration: &configuration::Configuration, workspace: &str, all_workspaces: Option<bool>) -> Result<models::GetOldestJob200Response, Error<GetOldestJobError>> {
2180    let local_var_configuration = configuration;
2181
2182    let local_var_client = &local_var_configuration.client;
2183
2184    let local_var_uri_str = format!("{}/w/{workspace}/jobs/oldest", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2185    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2186
2187    if let Some(ref local_var_str) = all_workspaces {
2188        local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
2189    }
2190    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2191        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2192    }
2193    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2194        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2195    };
2196
2197    let local_var_req = local_var_req_builder.build()?;
2198    let local_var_resp = local_var_client.execute(local_var_req).await?;
2199
2200    let local_var_status = local_var_resp.status();
2201    let local_var_content = local_var_resp.text().await?;
2202
2203    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2204        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2205    } else {
2206        let local_var_entity: Option<GetOldestJobError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2207        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2208        Err(Error::ResponseError(local_var_error))
2209    }
2210}
2211
2212pub async fn get_queue_count(configuration: &configuration::Configuration, workspace: &str, all_workspaces: Option<bool>) -> Result<models::GetQueueCount200Response, Error<GetQueueCountError>> {
2213    let local_var_configuration = configuration;
2214
2215    let local_var_client = &local_var_configuration.client;
2216
2217    let local_var_uri_str = format!("{}/w/{workspace}/jobs/queue/count", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2218    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2219
2220    if let Some(ref local_var_str) = all_workspaces {
2221        local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
2222    }
2223    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2224        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2225    }
2226    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2227        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2228    };
2229
2230    let local_var_req = local_var_req_builder.build()?;
2231    let local_var_resp = local_var_client.execute(local_var_req).await?;
2232
2233    let local_var_status = local_var_resp.status();
2234    let local_var_content = local_var_resp.text().await?;
2235
2236    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2237        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2238    } else {
2239        let local_var_entity: Option<GetQueueCountError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2240        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2241        Err(Error::ResponseError(local_var_error))
2242    }
2243}
2244
2245pub async fn get_queue_position(configuration: &configuration::Configuration, workspace: &str, scheduled_for: i32) -> Result<models::GetQueuePosition200Response, Error<GetQueuePositionError>> {
2246    let local_var_configuration = configuration;
2247
2248    let local_var_client = &local_var_configuration.client;
2249
2250    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);
2251    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2252
2253    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2254        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2255    }
2256    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2257        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2258    };
2259
2260    let local_var_req = local_var_req_builder.build()?;
2261    let local_var_resp = local_var_client.execute(local_var_req).await?;
2262
2263    let local_var_status = local_var_resp.status();
2264    let local_var_content = local_var_resp.text().await?;
2265
2266    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2267        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2268    } else {
2269        let local_var_entity: Option<GetQueuePositionError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2270        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2271        Err(Error::ResponseError(local_var_error))
2272    }
2273}
2274
2275pub async fn get_resume_urls(configuration: &configuration::Configuration, workspace: &str, id: &str, resume_id: i32, approver: Option<&str>, flow_level: Option<bool>) -> Result<models::GetResumeUrls200Response, Error<GetResumeUrlsError>> {
2276    let local_var_configuration = configuration;
2277
2278    let local_var_client = &local_var_configuration.client;
2279
2280    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);
2281    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2282
2283    if let Some(ref local_var_str) = approver {
2284        local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
2285    }
2286    if let Some(ref local_var_str) = flow_level {
2287        local_var_req_builder = local_var_req_builder.query(&[("flow_level", &local_var_str.to_string())]);
2288    }
2289    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2290        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2291    }
2292    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2293        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2294    };
2295
2296    let local_var_req = local_var_req_builder.build()?;
2297    let local_var_resp = local_var_client.execute(local_var_req).await?;
2298
2299    let local_var_status = local_var_resp.status();
2300    let local_var_content = local_var_resp.text().await?;
2301
2302    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2303        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2304    } else {
2305        let local_var_entity: Option<GetResumeUrlsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2306        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2307        Err(Error::ResponseError(local_var_error))
2308    }
2309}
2310
2311pub async fn get_root_job_id(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<String, Error<GetRootJobIdError>> {
2312    let local_var_configuration = configuration;
2313
2314    let local_var_client = &local_var_configuration.client;
2315
2316    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));
2317    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2318
2319    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2320        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2321    }
2322    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2323        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2324    };
2325
2326    let local_var_req = local_var_req_builder.build()?;
2327    let local_var_resp = local_var_client.execute(local_var_req).await?;
2328
2329    let local_var_status = local_var_resp.status();
2330    let local_var_content = local_var_resp.text().await?;
2331
2332    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2333        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2334    } else {
2335        let local_var_entity: Option<GetRootJobIdError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2336        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2337        Err(Error::ResponseError(local_var_error))
2338    }
2339}
2340
2341/// Live materialization state for the relations a single job writes, keyed by relation. Polled while a run is in flight so a graph can move a node as its model completes. Authorized through the job, so a caller who may not read it is refused rather than told the run has no progress. An empty list means the job exists and has recorded nothing yet, or is unknown to this workspace. 
2342pub async fn get_run_progress(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<Vec<models::AssetProgress>, Error<GetRunProgressError>> {
2343    let local_var_configuration = configuration;
2344
2345    let local_var_client = &local_var_configuration.client;
2346
2347    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_progress/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
2348    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2349
2350    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2351        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2352    }
2353    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2354        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2355    };
2356
2357    let local_var_req = local_var_req_builder.build()?;
2358    let local_var_resp = local_var_client.execute(local_var_req).await?;
2359
2360    let local_var_status = local_var_resp.status();
2361    let local_var_content = local_var_resp.text().await?;
2362
2363    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2364        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2365    } else {
2366        let local_var_entity: Option<GetRunProgressError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2367        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2368        Err(Error::ResponseError(local_var_error))
2369    }
2370}
2371
2372pub async fn get_scheduled_for(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<i32, Error<GetScheduledForError>> {
2373    let local_var_configuration = configuration;
2374
2375    let local_var_client = &local_var_configuration.client;
2376
2377    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));
2378    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2379
2380    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2381        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2382    }
2383    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2384        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2385    };
2386
2387    let local_var_req = local_var_req_builder.build()?;
2388    let local_var_resp = local_var_client.execute(local_var_req).await?;
2389
2390    let local_var_status = local_var_resp.status();
2391    let local_var_content = local_var_resp.text().await?;
2392
2393    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2394        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2395    } else {
2396        let local_var_entity: Option<GetScheduledForError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2397        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2398        Err(Error::ResponseError(local_var_error))
2399    }
2400}
2401
2402pub 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>, resume_button_text: Option<&str>, cancel_button_text: Option<&str>) -> Result<(), Error<GetSlackApprovalPayloadError>> {
2403    let local_var_configuration = configuration;
2404
2405    let local_var_client = &local_var_configuration.client;
2406
2407    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));
2408    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2409
2410    if let Some(ref local_var_str) = approver {
2411        local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
2412    }
2413    if let Some(ref local_var_str) = message {
2414        local_var_req_builder = local_var_req_builder.query(&[("message", &local_var_str.to_string())]);
2415    }
2416    local_var_req_builder = local_var_req_builder.query(&[("slack_resource_path", &slack_resource_path.to_string())]);
2417    local_var_req_builder = local_var_req_builder.query(&[("channel_id", &channel_id.to_string())]);
2418    local_var_req_builder = local_var_req_builder.query(&[("flow_step_id", &flow_step_id.to_string())]);
2419    if let Some(ref local_var_str) = default_args_json {
2420        local_var_req_builder = local_var_req_builder.query(&[("default_args_json", &local_var_str.to_string())]);
2421    }
2422    if let Some(ref local_var_str) = dynamic_enums_json {
2423        local_var_req_builder = local_var_req_builder.query(&[("dynamic_enums_json", &local_var_str.to_string())]);
2424    }
2425    if let Some(ref local_var_str) = resume_button_text {
2426        local_var_req_builder = local_var_req_builder.query(&[("resume_button_text", &local_var_str.to_string())]);
2427    }
2428    if let Some(ref local_var_str) = cancel_button_text {
2429        local_var_req_builder = local_var_req_builder.query(&[("cancel_button_text", &local_var_str.to_string())]);
2430    }
2431    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2432        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2433    }
2434    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2435        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2436    };
2437
2438    let local_var_req = local_var_req_builder.build()?;
2439    let local_var_resp = local_var_client.execute(local_var_req).await?;
2440
2441    let local_var_status = local_var_resp.status();
2442    let local_var_content = local_var_resp.text().await?;
2443
2444    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2445        Ok(())
2446    } else {
2447        let local_var_entity: Option<GetSlackApprovalPayloadError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2448        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2449        Err(Error::ResponseError(local_var_error))
2450    }
2451}
2452
2453pub async fn get_started_at_by_ids(configuration: &configuration::Configuration, workspace: &str, request_body: Vec<String>) -> Result<Vec<String>, Error<GetStartedAtByIdsError>> {
2454    let local_var_configuration = configuration;
2455
2456    let local_var_client = &local_var_configuration.client;
2457
2458    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));
2459    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2460
2461    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2462        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2463    }
2464    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2465        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2466    };
2467    local_var_req_builder = local_var_req_builder.json(&request_body);
2468
2469    let local_var_req = local_var_req_builder.build()?;
2470    let local_var_resp = local_var_client.execute(local_var_req).await?;
2471
2472    let local_var_status = local_var_resp.status();
2473    let local_var_content = local_var_resp.text().await?;
2474
2475    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2476        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2477    } else {
2478        let local_var_entity: Option<GetStartedAtByIdsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2479        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2480        Err(Error::ResponseError(local_var_error))
2481    }
2482}
2483
2484pub 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>> {
2485    let local_var_configuration = configuration;
2486
2487    let local_var_client = &local_var_configuration.client;
2488
2489    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));
2490    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2491
2492    if let Some(ref local_var_str) = approver {
2493        local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
2494    }
2495    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2496        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2497    }
2498    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2499        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2500    };
2501
2502    let local_var_req = local_var_req_builder.build()?;
2503    let local_var_resp = local_var_client.execute(local_var_req).await?;
2504
2505    let local_var_status = local_var_resp.status();
2506    let local_var_content = local_var_resp.text().await?;
2507
2508    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2509        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2510    } else {
2511        let local_var_entity: Option<GetSuspendedJobFlowError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2512        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2513        Err(Error::ResponseError(local_var_error))
2514    }
2515}
2516
2517pub 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>, resume_button_text: Option<&str>, cancel_button_text: Option<&str>) -> Result<(), Error<GetTeamsApprovalPayloadError>> {
2518    let local_var_configuration = configuration;
2519
2520    let local_var_client = &local_var_configuration.client;
2521
2522    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));
2523    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2524
2525    if let Some(ref local_var_str) = approver {
2526        local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
2527    }
2528    if let Some(ref local_var_str) = message {
2529        local_var_req_builder = local_var_req_builder.query(&[("message", &local_var_str.to_string())]);
2530    }
2531    local_var_req_builder = local_var_req_builder.query(&[("team_name", &team_name.to_string())]);
2532    local_var_req_builder = local_var_req_builder.query(&[("channel_name", &channel_name.to_string())]);
2533    local_var_req_builder = local_var_req_builder.query(&[("flow_step_id", &flow_step_id.to_string())]);
2534    if let Some(ref local_var_str) = default_args_json {
2535        local_var_req_builder = local_var_req_builder.query(&[("default_args_json", &local_var_str.to_string())]);
2536    }
2537    if let Some(ref local_var_str) = dynamic_enums_json {
2538        local_var_req_builder = local_var_req_builder.query(&[("dynamic_enums_json", &local_var_str.to_string())]);
2539    }
2540    if let Some(ref local_var_str) = resume_button_text {
2541        local_var_req_builder = local_var_req_builder.query(&[("resume_button_text", &local_var_str.to_string())]);
2542    }
2543    if let Some(ref local_var_str) = cancel_button_text {
2544        local_var_req_builder = local_var_req_builder.query(&[("cancel_button_text", &local_var_str.to_string())]);
2545    }
2546    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2547        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2548    }
2549    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2550        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2551    };
2552
2553    let local_var_req = local_var_req_builder.build()?;
2554    let local_var_resp = local_var_client.execute(local_var_req).await?;
2555
2556    let local_var_status = local_var_resp.status();
2557    let local_var_content = local_var_resp.text().await?;
2558
2559    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2560        Ok(())
2561    } else {
2562        let local_var_entity: Option<GetTeamsApprovalPayloadError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2563        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2564        Err(Error::ResponseError(local_var_error))
2565    }
2566}
2567
2568pub async fn get_wac_approval_urls(configuration: &configuration::Configuration, workspace: &str, id: &str, step_key: &str, approver: Option<&str>) -> Result<models::GetResumeUrls200Response, Error<GetWacApprovalUrlsError>> {
2569    let local_var_configuration = configuration;
2570
2571    let local_var_client = &local_var_configuration.client;
2572
2573    let local_var_uri_str = format!("{}/w/{workspace}/jobs/wac_approval_urls/{id}/{step_key}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id), step_key=crate::apis::urlencode(step_key));
2574    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2575
2576    if let Some(ref local_var_str) = approver {
2577        local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
2578    }
2579    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2580        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2581    }
2582    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2583        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2584    };
2585
2586    let local_var_req = local_var_req_builder.build()?;
2587    let local_var_resp = local_var_client.execute(local_var_req).await?;
2588
2589    let local_var_status = local_var_resp.status();
2590    let local_var_content = local_var_resp.text().await?;
2591
2592    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2593        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2594    } else {
2595        let local_var_entity: Option<GetWacApprovalUrlsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2596        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2597        Err(Error::ResponseError(local_var_error))
2598    }
2599}
2600
2601pub async fn hide_recent_run_items(configuration: &configuration::Configuration, workspace: &str, recent_run_item_refs: models::RecentRunItemRefs) -> Result<String, Error<HideRecentRunItemsError>> {
2602    let local_var_configuration = configuration;
2603
2604    let local_var_client = &local_var_configuration.client;
2605
2606    let local_var_uri_str = format!("{}/w/{workspace}/jobs/recent_runs/hide", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2607    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2608
2609    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2610        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2611    }
2612    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2613        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2614    };
2615    local_var_req_builder = local_var_req_builder.json(&recent_run_item_refs);
2616
2617    let local_var_req = local_var_req_builder.build()?;
2618    let local_var_resp = local_var_client.execute(local_var_req).await?;
2619
2620    let local_var_status = local_var_resp.status();
2621    let local_var_content = local_var_resp.text().await?;
2622
2623    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2624        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2625    } else {
2626        let local_var_entity: Option<HideRecentRunItemsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2627        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2628        Err(Error::ResponseError(local_var_error))
2629    }
2630}
2631
2632pub async fn import_completed_jobs(configuration: &configuration::Configuration, workspace: &str, exportable_completed_job: Vec<models::ExportableCompletedJob>) -> Result<String, Error<ImportCompletedJobsError>> {
2633    let local_var_configuration = configuration;
2634
2635    let local_var_client = &local_var_configuration.client;
2636
2637    let local_var_uri_str = format!("{}/w/{workspace}/jobs/completed/import", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2638    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2639
2640    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2641        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2642    }
2643    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2644        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2645    };
2646    local_var_req_builder = local_var_req_builder.json(&exportable_completed_job);
2647
2648    let local_var_req = local_var_req_builder.build()?;
2649    let local_var_resp = local_var_client.execute(local_var_req).await?;
2650
2651    let local_var_status = local_var_resp.status();
2652    let local_var_content = local_var_resp.text().await?;
2653
2654    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2655        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2656    } else {
2657        let local_var_entity: Option<ImportCompletedJobsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2658        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2659        Err(Error::ResponseError(local_var_error))
2660    }
2661}
2662
2663pub async fn import_queued_jobs(configuration: &configuration::Configuration, workspace: &str, exportable_queued_job: Vec<models::ExportableQueuedJob>) -> Result<String, Error<ImportQueuedJobsError>> {
2664    let local_var_configuration = configuration;
2665
2666    let local_var_client = &local_var_configuration.client;
2667
2668    let local_var_uri_str = format!("{}/w/{workspace}/jobs/queue/import", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2669    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
2670
2671    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2672        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2673    }
2674    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2675        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2676    };
2677    local_var_req_builder = local_var_req_builder.json(&exportable_queued_job);
2678
2679    let local_var_req = local_var_req_builder.build()?;
2680    let local_var_resp = local_var_client.execute(local_var_req).await?;
2681
2682    let local_var_status = local_var_resp.status();
2683    let local_var_content = local_var_resp.text().await?;
2684
2685    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2686        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2687    } else {
2688        let local_var_entity: Option<ImportQueuedJobsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2689        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2690        Err(Error::ResponseError(local_var_error))
2691    }
2692}
2693
2694/// Returns the `dispatched` asset-trigger edges (producer job → child job) whose subscriber lives under `path_start`. Lets a pipeline view reconstruct the cascade tree of a folder by job id and group connected runs. Visibility follows the producer job's RLS. 
2695pub async fn list_asset_dispatch_edges(configuration: &configuration::Configuration, workspace: &str, path_start: &str, created_after: Option<String>) -> Result<Vec<models::ListAssetDispatchEdges200ResponseInner>, Error<ListAssetDispatchEdgesError>> {
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/asset_dispatch_edges", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2701    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2702
2703    local_var_req_builder = local_var_req_builder.query(&[("path_start", &path_start.to_string())]);
2704    if let Some(ref local_var_str) = created_after {
2705        local_var_req_builder = local_var_req_builder.query(&[("created_after", &local_var_str.to_string())]);
2706    }
2707    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2708        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2709    }
2710    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2711        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2712    };
2713
2714    let local_var_req = local_var_req_builder.build()?;
2715    let local_var_resp = local_var_client.execute(local_var_req).await?;
2716
2717    let local_var_status = local_var_resp.status();
2718    let local_var_content = local_var_resp.text().await?;
2719
2720    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2721        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2722    } else {
2723        let local_var_entity: Option<ListAssetDispatchEdgesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2724        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2725        Err(Error::ResponseError(local_var_error))
2726    }
2727}
2728
2729pub 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>, status: Option<&str>, 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>, resolved: Option<bool>, is_flow_step: Option<bool>, has_null_parent: Option<bool>, is_not_schedule: Option<bool>) -> Result<Vec<models::CompletedJob>, Error<ListCompletedJobsError>> {
2730    let local_var_configuration = configuration;
2731
2732    let local_var_client = &local_var_configuration.client;
2733
2734    let local_var_uri_str = format!("{}/w/{workspace}/jobs/completed/list", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2735    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2736
2737    if let Some(ref local_var_str) = order_desc {
2738        local_var_req_builder = local_var_req_builder.query(&[("order_desc", &local_var_str.to_string())]);
2739    }
2740    if let Some(ref local_var_str) = created_by {
2741        local_var_req_builder = local_var_req_builder.query(&[("created_by", &local_var_str.to_string())]);
2742    }
2743    if let Some(ref local_var_str) = label {
2744        local_var_req_builder = local_var_req_builder.query(&[("label", &local_var_str.to_string())]);
2745    }
2746    if let Some(ref local_var_str) = worker {
2747        local_var_req_builder = local_var_req_builder.query(&[("worker", &local_var_str.to_string())]);
2748    }
2749    if let Some(ref local_var_str) = parent_job {
2750        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
2751    }
2752    if let Some(ref local_var_str) = script_path_exact {
2753        local_var_req_builder = local_var_req_builder.query(&[("script_path_exact", &local_var_str.to_string())]);
2754    }
2755    if let Some(ref local_var_str) = script_path_start {
2756        local_var_req_builder = local_var_req_builder.query(&[("script_path_start", &local_var_str.to_string())]);
2757    }
2758    if let Some(ref local_var_str) = schedule_path {
2759        local_var_req_builder = local_var_req_builder.query(&[("schedule_path", &local_var_str.to_string())]);
2760    }
2761    if let Some(ref local_var_str) = script_hash {
2762        local_var_req_builder = local_var_req_builder.query(&[("script_hash", &local_var_str.to_string())]);
2763    }
2764    if let Some(ref local_var_str) = started_before {
2765        local_var_req_builder = local_var_req_builder.query(&[("started_before", &local_var_str.to_string())]);
2766    }
2767    if let Some(ref local_var_str) = started_after {
2768        local_var_req_builder = local_var_req_builder.query(&[("started_after", &local_var_str.to_string())]);
2769    }
2770    if let Some(ref local_var_str) = success {
2771        local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
2772    }
2773    if let Some(ref local_var_str) = status {
2774        local_var_req_builder = local_var_req_builder.query(&[("status", &local_var_str.to_string())]);
2775    }
2776    if let Some(ref local_var_str) = job_kinds {
2777        local_var_req_builder = local_var_req_builder.query(&[("job_kinds", &local_var_str.to_string())]);
2778    }
2779    if let Some(ref local_var_str) = args {
2780        local_var_req_builder = local_var_req_builder.query(&[("args", &local_var_str.to_string())]);
2781    }
2782    if let Some(ref local_var_str) = result {
2783        local_var_req_builder = local_var_req_builder.query(&[("result", &local_var_str.to_string())]);
2784    }
2785    if let Some(ref local_var_str) = allow_wildcards {
2786        local_var_req_builder = local_var_req_builder.query(&[("allow_wildcards", &local_var_str.to_string())]);
2787    }
2788    if let Some(ref local_var_str) = tag {
2789        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
2790    }
2791    if let Some(ref local_var_str) = page {
2792        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
2793    }
2794    if let Some(ref local_var_str) = per_page {
2795        local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
2796    }
2797    if let Some(ref local_var_str) = is_skipped {
2798        local_var_req_builder = local_var_req_builder.query(&[("is_skipped", &local_var_str.to_string())]);
2799    }
2800    if let Some(ref local_var_str) = resolved {
2801        local_var_req_builder = local_var_req_builder.query(&[("resolved", &local_var_str.to_string())]);
2802    }
2803    if let Some(ref local_var_str) = is_flow_step {
2804        local_var_req_builder = local_var_req_builder.query(&[("is_flow_step", &local_var_str.to_string())]);
2805    }
2806    if let Some(ref local_var_str) = has_null_parent {
2807        local_var_req_builder = local_var_req_builder.query(&[("has_null_parent", &local_var_str.to_string())]);
2808    }
2809    if let Some(ref local_var_str) = is_not_schedule {
2810        local_var_req_builder = local_var_req_builder.query(&[("is_not_schedule", &local_var_str.to_string())]);
2811    }
2812    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2813        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2814    }
2815    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2816        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2817    };
2818
2819    let local_var_req = local_var_req_builder.build()?;
2820    let local_var_resp = local_var_client.execute(local_var_req).await?;
2821
2822    let local_var_status = local_var_resp.status();
2823    let local_var_content = local_var_resp.text().await?;
2824
2825    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2826        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2827    } else {
2828        let local_var_entity: Option<ListCompletedJobsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2829        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2830        Err(Error::ResponseError(local_var_error))
2831    }
2832}
2833
2834/// Returns the chronological log of decisions the asset-trigger dispatcher made after this producer job completed. Each row is one (subscriber, asset write) decision: `dispatched` (with `child_job_id`), `join_pending` (with `received_inputs` / `required_inputs` / `partition`), or `skipped` (with `reason`). Rows are reaped automatically when the producer's `v2_job` row is deleted by the retention sweep. 
2835pub async fn list_dispatch_events(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<Vec<models::ListDispatchEvents200ResponseInner>, Error<ListDispatchEventsError>> {
2836    let local_var_configuration = configuration;
2837
2838    let local_var_client = &local_var_configuration.client;
2839
2840    let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/dispatch_events/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
2841    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2842
2843    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2844        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2845    }
2846    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2847        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2848    };
2849
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/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2858    } else {
2859        let local_var_entity: Option<ListDispatchEventsError> = crate::from_str_patched/* Externally injected from /build.nu */(&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 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<&str>, is_skipped: Option<bool>, resolved: Option<bool>, is_flow_step: Option<bool>, has_null_parent: Option<bool>, success: Option<bool>, status: Option<&str>, all_workspaces: Option<bool>, is_not_schedule: Option<bool>) -> Result<models::ExtendedJobs, Error<ListExtendedJobsError>> {
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}/concurrency_groups/list_jobs", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
2871    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
2872
2873    if let Some(ref local_var_str) = concurrency_key {
2874        local_var_req_builder = local_var_req_builder.query(&[("concurrency_key", &local_var_str.to_string())]);
2875    }
2876    if let Some(ref local_var_str) = row_limit {
2877        local_var_req_builder = local_var_req_builder.query(&[("row_limit", &local_var_str.to_string())]);
2878    }
2879    if let Some(ref local_var_str) = created_by {
2880        local_var_req_builder = local_var_req_builder.query(&[("created_by", &local_var_str.to_string())]);
2881    }
2882    if let Some(ref local_var_str) = label {
2883        local_var_req_builder = local_var_req_builder.query(&[("label", &local_var_str.to_string())]);
2884    }
2885    if let Some(ref local_var_str) = parent_job {
2886        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
2887    }
2888    if let Some(ref local_var_str) = script_path_exact {
2889        local_var_req_builder = local_var_req_builder.query(&[("script_path_exact", &local_var_str.to_string())]);
2890    }
2891    if let Some(ref local_var_str) = script_path_start {
2892        local_var_req_builder = local_var_req_builder.query(&[("script_path_start", &local_var_str.to_string())]);
2893    }
2894    if let Some(ref local_var_str) = schedule_path {
2895        local_var_req_builder = local_var_req_builder.query(&[("schedule_path", &local_var_str.to_string())]);
2896    }
2897    if let Some(ref local_var_str) = script_hash {
2898        local_var_req_builder = local_var_req_builder.query(&[("script_hash", &local_var_str.to_string())]);
2899    }
2900    if let Some(ref local_var_str) = started_before {
2901        local_var_req_builder = local_var_req_builder.query(&[("started_before", &local_var_str.to_string())]);
2902    }
2903    if let Some(ref local_var_str) = started_after {
2904        local_var_req_builder = local_var_req_builder.query(&[("started_after", &local_var_str.to_string())]);
2905    }
2906    if let Some(ref local_var_str) = running {
2907        local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
2908    }
2909    if let Some(ref local_var_str) = scheduled_for_before_now {
2910        local_var_req_builder = local_var_req_builder.query(&[("scheduled_for_before_now", &local_var_str.to_string())]);
2911    }
2912    if let Some(ref local_var_str) = completed_before {
2913        local_var_req_builder = local_var_req_builder.query(&[("completed_before", &local_var_str.to_string())]);
2914    }
2915    if let Some(ref local_var_str) = completed_after {
2916        local_var_req_builder = local_var_req_builder.query(&[("completed_after", &local_var_str.to_string())]);
2917    }
2918    if let Some(ref local_var_str) = created_before_queue {
2919        local_var_req_builder = local_var_req_builder.query(&[("created_before_queue", &local_var_str.to_string())]);
2920    }
2921    if let Some(ref local_var_str) = created_after_queue {
2922        local_var_req_builder = local_var_req_builder.query(&[("created_after_queue", &local_var_str.to_string())]);
2923    }
2924    if let Some(ref local_var_str) = job_kinds {
2925        local_var_req_builder = local_var_req_builder.query(&[("job_kinds", &local_var_str.to_string())]);
2926    }
2927    if let Some(ref local_var_str) = args {
2928        local_var_req_builder = local_var_req_builder.query(&[("args", &local_var_str.to_string())]);
2929    }
2930    if let Some(ref local_var_str) = tag {
2931        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
2932    }
2933    if let Some(ref local_var_str) = result {
2934        local_var_req_builder = local_var_req_builder.query(&[("result", &local_var_str.to_string())]);
2935    }
2936    if let Some(ref local_var_str) = allow_wildcards {
2937        local_var_req_builder = local_var_req_builder.query(&[("allow_wildcards", &local_var_str.to_string())]);
2938    }
2939    if let Some(ref local_var_str) = page {
2940        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
2941    }
2942    if let Some(ref local_var_str) = per_page {
2943        local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
2944    }
2945    if let Some(ref local_var_str) = trigger_kind {
2946        local_var_req_builder = local_var_req_builder.query(&[("trigger_kind", &local_var_str.to_string())]);
2947    }
2948    if let Some(ref local_var_str) = is_skipped {
2949        local_var_req_builder = local_var_req_builder.query(&[("is_skipped", &local_var_str.to_string())]);
2950    }
2951    if let Some(ref local_var_str) = resolved {
2952        local_var_req_builder = local_var_req_builder.query(&[("resolved", &local_var_str.to_string())]);
2953    }
2954    if let Some(ref local_var_str) = is_flow_step {
2955        local_var_req_builder = local_var_req_builder.query(&[("is_flow_step", &local_var_str.to_string())]);
2956    }
2957    if let Some(ref local_var_str) = has_null_parent {
2958        local_var_req_builder = local_var_req_builder.query(&[("has_null_parent", &local_var_str.to_string())]);
2959    }
2960    if let Some(ref local_var_str) = success {
2961        local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
2962    }
2963    if let Some(ref local_var_str) = status {
2964        local_var_req_builder = local_var_req_builder.query(&[("status", &local_var_str.to_string())]);
2965    }
2966    if let Some(ref local_var_str) = all_workspaces {
2967        local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
2968    }
2969    if let Some(ref local_var_str) = is_not_schedule {
2970        local_var_req_builder = local_var_req_builder.query(&[("is_not_schedule", &local_var_str.to_string())]);
2971    }
2972    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
2973        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
2974    }
2975    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
2976        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
2977    };
2978
2979    let local_var_req = local_var_req_builder.build()?;
2980    let local_var_resp = local_var_client.execute(local_var_req).await?;
2981
2982    let local_var_status = local_var_resp.status();
2983    let local_var_content = local_var_resp.text().await?;
2984
2985    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
2986        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
2987    } else {
2988        let local_var_entity: Option<ListExtendedJobsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
2989        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
2990        Err(Error::ResponseError(local_var_error))
2991    }
2992}
2993
2994pub async fn list_filtered_jobs_uuids(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>, 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>, resolved: Option<bool>, is_flow_step: Option<bool>, has_null_parent: Option<bool>, success: Option<bool>, status: Option<&str>, all_workspaces: Option<bool>, is_not_schedule: Option<bool>) -> Result<Vec<String>, Error<ListFilteredJobsUuidsError>> {
2995    let local_var_configuration = configuration;
2996
2997    let local_var_client = &local_var_configuration.client;
2998
2999    let local_var_uri_str = format!("{}/w/{workspace}/jobs/list_filtered_uuids", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3000    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3001
3002    if let Some(ref local_var_str) = order_desc {
3003        local_var_req_builder = local_var_req_builder.query(&[("order_desc", &local_var_str.to_string())]);
3004    }
3005    if let Some(ref local_var_str) = created_by {
3006        local_var_req_builder = local_var_req_builder.query(&[("created_by", &local_var_str.to_string())]);
3007    }
3008    if let Some(ref local_var_str) = label {
3009        local_var_req_builder = local_var_req_builder.query(&[("label", &local_var_str.to_string())]);
3010    }
3011    if let Some(ref local_var_str) = worker {
3012        local_var_req_builder = local_var_req_builder.query(&[("worker", &local_var_str.to_string())]);
3013    }
3014    if let Some(ref local_var_str) = parent_job {
3015        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
3016    }
3017    if let Some(ref local_var_str) = script_path_exact {
3018        local_var_req_builder = local_var_req_builder.query(&[("script_path_exact", &local_var_str.to_string())]);
3019    }
3020    if let Some(ref local_var_str) = script_path_start {
3021        local_var_req_builder = local_var_req_builder.query(&[("script_path_start", &local_var_str.to_string())]);
3022    }
3023    if let Some(ref local_var_str) = schedule_path {
3024        local_var_req_builder = local_var_req_builder.query(&[("schedule_path", &local_var_str.to_string())]);
3025    }
3026    if let Some(ref local_var_str) = script_hash {
3027        local_var_req_builder = local_var_req_builder.query(&[("script_hash", &local_var_str.to_string())]);
3028    }
3029    if let Some(ref local_var_str) = started_before {
3030        local_var_req_builder = local_var_req_builder.query(&[("started_before", &local_var_str.to_string())]);
3031    }
3032    if let Some(ref local_var_str) = started_after {
3033        local_var_req_builder = local_var_req_builder.query(&[("started_after", &local_var_str.to_string())]);
3034    }
3035    if let Some(ref local_var_str) = created_before {
3036        local_var_req_builder = local_var_req_builder.query(&[("created_before", &local_var_str.to_string())]);
3037    }
3038    if let Some(ref local_var_str) = created_after {
3039        local_var_req_builder = local_var_req_builder.query(&[("created_after", &local_var_str.to_string())]);
3040    }
3041    if let Some(ref local_var_str) = completed_before {
3042        local_var_req_builder = local_var_req_builder.query(&[("completed_before", &local_var_str.to_string())]);
3043    }
3044    if let Some(ref local_var_str) = completed_after {
3045        local_var_req_builder = local_var_req_builder.query(&[("completed_after", &local_var_str.to_string())]);
3046    }
3047    if let Some(ref local_var_str) = created_before_queue {
3048        local_var_req_builder = local_var_req_builder.query(&[("created_before_queue", &local_var_str.to_string())]);
3049    }
3050    if let Some(ref local_var_str) = created_after_queue {
3051        local_var_req_builder = local_var_req_builder.query(&[("created_after_queue", &local_var_str.to_string())]);
3052    }
3053    if let Some(ref local_var_str) = running {
3054        local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
3055    }
3056    if let Some(ref local_var_str) = scheduled_for_before_now {
3057        local_var_req_builder = local_var_req_builder.query(&[("scheduled_for_before_now", &local_var_str.to_string())]);
3058    }
3059    if let Some(ref local_var_str) = job_kinds {
3060        local_var_req_builder = local_var_req_builder.query(&[("job_kinds", &local_var_str.to_string())]);
3061    }
3062    if let Some(ref local_var_str) = suspended {
3063        local_var_req_builder = local_var_req_builder.query(&[("suspended", &local_var_str.to_string())]);
3064    }
3065    if let Some(ref local_var_str) = args {
3066        local_var_req_builder = local_var_req_builder.query(&[("args", &local_var_str.to_string())]);
3067    }
3068    if let Some(ref local_var_str) = tag {
3069        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
3070    }
3071    if let Some(ref local_var_str) = result {
3072        local_var_req_builder = local_var_req_builder.query(&[("result", &local_var_str.to_string())]);
3073    }
3074    if let Some(ref local_var_str) = page {
3075        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3076    }
3077    if let Some(ref local_var_str) = per_page {
3078        local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3079    }
3080    if let Some(ref local_var_str) = is_skipped {
3081        local_var_req_builder = local_var_req_builder.query(&[("is_skipped", &local_var_str.to_string())]);
3082    }
3083    if let Some(ref local_var_str) = resolved {
3084        local_var_req_builder = local_var_req_builder.query(&[("resolved", &local_var_str.to_string())]);
3085    }
3086    if let Some(ref local_var_str) = is_flow_step {
3087        local_var_req_builder = local_var_req_builder.query(&[("is_flow_step", &local_var_str.to_string())]);
3088    }
3089    if let Some(ref local_var_str) = has_null_parent {
3090        local_var_req_builder = local_var_req_builder.query(&[("has_null_parent", &local_var_str.to_string())]);
3091    }
3092    if let Some(ref local_var_str) = success {
3093        local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
3094    }
3095    if let Some(ref local_var_str) = status {
3096        local_var_req_builder = local_var_req_builder.query(&[("status", &local_var_str.to_string())]);
3097    }
3098    if let Some(ref local_var_str) = all_workspaces {
3099        local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
3100    }
3101    if let Some(ref local_var_str) = is_not_schedule {
3102        local_var_req_builder = local_var_req_builder.query(&[("is_not_schedule", &local_var_str.to_string())]);
3103    }
3104    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3105        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3106    }
3107    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3108        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3109    };
3110
3111    let local_var_req = local_var_req_builder.build()?;
3112    let local_var_resp = local_var_client.execute(local_var_req).await?;
3113
3114    let local_var_status = local_var_resp.status();
3115    let local_var_content = local_var_resp.text().await?;
3116
3117    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3118        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3119    } else {
3120        let local_var_entity: Option<ListFilteredJobsUuidsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3121        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3122        Err(Error::ResponseError(local_var_error))
3123    }
3124}
3125
3126pub 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>, has_null_parent: Option<bool>, all_workspaces: Option<bool>, is_not_schedule: Option<bool>) -> Result<Vec<String>, Error<ListFilteredQueueUuidsError>> {
3127    let local_var_configuration = configuration;
3128
3129    let local_var_client = &local_var_configuration.client;
3130
3131    let local_var_uri_str = format!("{}/w/{workspace}/jobs/queue/list_filtered_uuids", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3132    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3133
3134    if let Some(ref local_var_str) = order_desc {
3135        local_var_req_builder = local_var_req_builder.query(&[("order_desc", &local_var_str.to_string())]);
3136    }
3137    if let Some(ref local_var_str) = created_by {
3138        local_var_req_builder = local_var_req_builder.query(&[("created_by", &local_var_str.to_string())]);
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) = script_path_exact {
3144        local_var_req_builder = local_var_req_builder.query(&[("script_path_exact", &local_var_str.to_string())]);
3145    }
3146    if let Some(ref local_var_str) = script_path_start {
3147        local_var_req_builder = local_var_req_builder.query(&[("script_path_start", &local_var_str.to_string())]);
3148    }
3149    if let Some(ref local_var_str) = schedule_path {
3150        local_var_req_builder = local_var_req_builder.query(&[("schedule_path", &local_var_str.to_string())]);
3151    }
3152    if let Some(ref local_var_str) = script_hash {
3153        local_var_req_builder = local_var_req_builder.query(&[("script_hash", &local_var_str.to_string())]);
3154    }
3155    if let Some(ref local_var_str) = started_before {
3156        local_var_req_builder = local_var_req_builder.query(&[("started_before", &local_var_str.to_string())]);
3157    }
3158    if let Some(ref local_var_str) = started_after {
3159        local_var_req_builder = local_var_req_builder.query(&[("started_after", &local_var_str.to_string())]);
3160    }
3161    if let Some(ref local_var_str) = success {
3162        local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
3163    }
3164    if let Some(ref local_var_str) = scheduled_for_before_now {
3165        local_var_req_builder = local_var_req_builder.query(&[("scheduled_for_before_now", &local_var_str.to_string())]);
3166    }
3167    if let Some(ref local_var_str) = job_kinds {
3168        local_var_req_builder = local_var_req_builder.query(&[("job_kinds", &local_var_str.to_string())]);
3169    }
3170    if let Some(ref local_var_str) = suspended {
3171        local_var_req_builder = local_var_req_builder.query(&[("suspended", &local_var_str.to_string())]);
3172    }
3173    if let Some(ref local_var_str) = running {
3174        local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
3175    }
3176    if let Some(ref local_var_str) = args {
3177        local_var_req_builder = local_var_req_builder.query(&[("args", &local_var_str.to_string())]);
3178    }
3179    if let Some(ref local_var_str) = result {
3180        local_var_req_builder = local_var_req_builder.query(&[("result", &local_var_str.to_string())]);
3181    }
3182    if let Some(ref local_var_str) = allow_wildcards {
3183        local_var_req_builder = local_var_req_builder.query(&[("allow_wildcards", &local_var_str.to_string())]);
3184    }
3185    if let Some(ref local_var_str) = tag {
3186        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
3187    }
3188    if let Some(ref local_var_str) = page {
3189        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3190    }
3191    if let Some(ref local_var_str) = per_page {
3192        local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3193    }
3194    if let Some(ref local_var_str) = concurrency_key {
3195        local_var_req_builder = local_var_req_builder.query(&[("concurrency_key", &local_var_str.to_string())]);
3196    }
3197    if let Some(ref local_var_str) = has_null_parent {
3198        local_var_req_builder = local_var_req_builder.query(&[("has_null_parent", &local_var_str.to_string())]);
3199    }
3200    if let Some(ref local_var_str) = all_workspaces {
3201        local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
3202    }
3203    if let Some(ref local_var_str) = is_not_schedule {
3204        local_var_req_builder = local_var_req_builder.query(&[("is_not_schedule", &local_var_str.to_string())]);
3205    }
3206    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3207        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3208    }
3209    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3210        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3211    };
3212
3213    let local_var_req = local_var_req_builder.build()?;
3214    let local_var_resp = local_var_client.execute(local_var_req).await?;
3215
3216    let local_var_status = local_var_resp.status();
3217    let local_var_content = local_var_resp.text().await?;
3218
3219    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3220        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3221    } else {
3222        let local_var_entity: Option<ListFilteredQueueUuidsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3223        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3224        Err(Error::ResponseError(local_var_error))
3225    }
3226}
3227
3228pub 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<&str>, is_skipped: Option<bool>, resolved: Option<bool>, is_flow_step: Option<bool>, has_null_parent: Option<bool>, success: Option<bool>, status: Option<&str>, all_workspaces: Option<bool>, is_not_schedule: Option<bool>, excludes_entrypoint_override: Option<bool>, broad_filter: Option<&str>) -> Result<Vec<models::Job>, Error<ListJobsError>> {
3229    let local_var_configuration = configuration;
3230
3231    let local_var_client = &local_var_configuration.client;
3232
3233    let local_var_uri_str = format!("{}/w/{workspace}/jobs/list", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3234    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3235
3236    if let Some(ref local_var_str) = created_by {
3237        local_var_req_builder = local_var_req_builder.query(&[("created_by", &local_var_str.to_string())]);
3238    }
3239    if let Some(ref local_var_str) = label {
3240        local_var_req_builder = local_var_req_builder.query(&[("label", &local_var_str.to_string())]);
3241    }
3242    if let Some(ref local_var_str) = worker {
3243        local_var_req_builder = local_var_req_builder.query(&[("worker", &local_var_str.to_string())]);
3244    }
3245    if let Some(ref local_var_str) = parent_job {
3246        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
3247    }
3248    if let Some(ref local_var_str) = script_path_exact {
3249        local_var_req_builder = local_var_req_builder.query(&[("script_path_exact", &local_var_str.to_string())]);
3250    }
3251    if let Some(ref local_var_str) = script_path_start {
3252        local_var_req_builder = local_var_req_builder.query(&[("script_path_start", &local_var_str.to_string())]);
3253    }
3254    if let Some(ref local_var_str) = schedule_path {
3255        local_var_req_builder = local_var_req_builder.query(&[("schedule_path", &local_var_str.to_string())]);
3256    }
3257    if let Some(ref local_var_str) = script_hash {
3258        local_var_req_builder = local_var_req_builder.query(&[("script_hash", &local_var_str.to_string())]);
3259    }
3260    if let Some(ref local_var_str) = started_before {
3261        local_var_req_builder = local_var_req_builder.query(&[("started_before", &local_var_str.to_string())]);
3262    }
3263    if let Some(ref local_var_str) = started_after {
3264        local_var_req_builder = local_var_req_builder.query(&[("started_after", &local_var_str.to_string())]);
3265    }
3266    if let Some(ref local_var_str) = created_before {
3267        local_var_req_builder = local_var_req_builder.query(&[("created_before", &local_var_str.to_string())]);
3268    }
3269    if let Some(ref local_var_str) = created_after {
3270        local_var_req_builder = local_var_req_builder.query(&[("created_after", &local_var_str.to_string())]);
3271    }
3272    if let Some(ref local_var_str) = completed_before {
3273        local_var_req_builder = local_var_req_builder.query(&[("completed_before", &local_var_str.to_string())]);
3274    }
3275    if let Some(ref local_var_str) = completed_after {
3276        local_var_req_builder = local_var_req_builder.query(&[("completed_after", &local_var_str.to_string())]);
3277    }
3278    if let Some(ref local_var_str) = created_before_queue {
3279        local_var_req_builder = local_var_req_builder.query(&[("created_before_queue", &local_var_str.to_string())]);
3280    }
3281    if let Some(ref local_var_str) = created_after_queue {
3282        local_var_req_builder = local_var_req_builder.query(&[("created_after_queue", &local_var_str.to_string())]);
3283    }
3284    if let Some(ref local_var_str) = running {
3285        local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
3286    }
3287    if let Some(ref local_var_str) = scheduled_for_before_now {
3288        local_var_req_builder = local_var_req_builder.query(&[("scheduled_for_before_now", &local_var_str.to_string())]);
3289    }
3290    if let Some(ref local_var_str) = job_kinds {
3291        local_var_req_builder = local_var_req_builder.query(&[("job_kinds", &local_var_str.to_string())]);
3292    }
3293    if let Some(ref local_var_str) = suspended {
3294        local_var_req_builder = local_var_req_builder.query(&[("suspended", &local_var_str.to_string())]);
3295    }
3296    if let Some(ref local_var_str) = args {
3297        local_var_req_builder = local_var_req_builder.query(&[("args", &local_var_str.to_string())]);
3298    }
3299    if let Some(ref local_var_str) = tag {
3300        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
3301    }
3302    if let Some(ref local_var_str) = result {
3303        local_var_req_builder = local_var_req_builder.query(&[("result", &local_var_str.to_string())]);
3304    }
3305    if let Some(ref local_var_str) = allow_wildcards {
3306        local_var_req_builder = local_var_req_builder.query(&[("allow_wildcards", &local_var_str.to_string())]);
3307    }
3308    if let Some(ref local_var_str) = per_page {
3309        local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3310    }
3311    if let Some(ref local_var_str) = trigger_kind {
3312        local_var_req_builder = local_var_req_builder.query(&[("trigger_kind", &local_var_str.to_string())]);
3313    }
3314    if let Some(ref local_var_str) = is_skipped {
3315        local_var_req_builder = local_var_req_builder.query(&[("is_skipped", &local_var_str.to_string())]);
3316    }
3317    if let Some(ref local_var_str) = resolved {
3318        local_var_req_builder = local_var_req_builder.query(&[("resolved", &local_var_str.to_string())]);
3319    }
3320    if let Some(ref local_var_str) = is_flow_step {
3321        local_var_req_builder = local_var_req_builder.query(&[("is_flow_step", &local_var_str.to_string())]);
3322    }
3323    if let Some(ref local_var_str) = has_null_parent {
3324        local_var_req_builder = local_var_req_builder.query(&[("has_null_parent", &local_var_str.to_string())]);
3325    }
3326    if let Some(ref local_var_str) = success {
3327        local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
3328    }
3329    if let Some(ref local_var_str) = status {
3330        local_var_req_builder = local_var_req_builder.query(&[("status", &local_var_str.to_string())]);
3331    }
3332    if let Some(ref local_var_str) = all_workspaces {
3333        local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
3334    }
3335    if let Some(ref local_var_str) = is_not_schedule {
3336        local_var_req_builder = local_var_req_builder.query(&[("is_not_schedule", &local_var_str.to_string())]);
3337    }
3338    if let Some(ref local_var_str) = excludes_entrypoint_override {
3339        local_var_req_builder = local_var_req_builder.query(&[("excludes_entrypoint_override", &local_var_str.to_string())]);
3340    }
3341    if let Some(ref local_var_str) = broad_filter {
3342        local_var_req_builder = local_var_req_builder.query(&[("broad_filter", &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
3351    let local_var_req = local_var_req_builder.build()?;
3352    let local_var_resp = local_var_client.execute(local_var_req).await?;
3353
3354    let local_var_status = local_var_resp.status();
3355    let local_var_content = local_var_resp.text().await?;
3356
3357    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3358        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3359    } else {
3360        let local_var_entity: Option<ListJobsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3361        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3362        Err(Error::ResponseError(local_var_error))
3363    }
3364}
3365
3366pub 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<&str>, script_hash: Option<&str>, started_before: Option<String>, started_after: Option<String>, success: Option<bool>, scheduled_for_before_now: Option<bool>, job_kinds: Option<&str>, suspended: Option<bool>, running: Option<bool>, args: Option<&str>, result: Option<&str>, allow_wildcards: Option<bool>, tag: Option<&str>, page: Option<i32>, per_page: Option<i32>, all_workspaces: Option<bool>, is_not_schedule: Option<bool>) -> Result<Vec<models::QueuedJob>, Error<ListQueueError>> {
3367    let local_var_configuration = configuration;
3368
3369    let local_var_client = &local_var_configuration.client;
3370
3371    let local_var_uri_str = format!("{}/w/{workspace}/jobs/queue/list", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3372    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3373
3374    if let Some(ref local_var_str) = order_desc {
3375        local_var_req_builder = local_var_req_builder.query(&[("order_desc", &local_var_str.to_string())]);
3376    }
3377    if let Some(ref local_var_str) = created_by {
3378        local_var_req_builder = local_var_req_builder.query(&[("created_by", &local_var_str.to_string())]);
3379    }
3380    if let Some(ref local_var_str) = parent_job {
3381        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
3382    }
3383    if let Some(ref local_var_str) = worker {
3384        local_var_req_builder = local_var_req_builder.query(&[("worker", &local_var_str.to_string())]);
3385    }
3386    if let Some(ref local_var_str) = script_path_exact {
3387        local_var_req_builder = local_var_req_builder.query(&[("script_path_exact", &local_var_str.to_string())]);
3388    }
3389    if let Some(ref local_var_str) = script_path_start {
3390        local_var_req_builder = local_var_req_builder.query(&[("script_path_start", &local_var_str.to_string())]);
3391    }
3392    if let Some(ref local_var_str) = schedule_path {
3393        local_var_req_builder = local_var_req_builder.query(&[("schedule_path", &local_var_str.to_string())]);
3394    }
3395    if let Some(ref local_var_str) = trigger_path {
3396        local_var_req_builder = local_var_req_builder.query(&[("trigger_path", &local_var_str.to_string())]);
3397    }
3398    if let Some(ref local_var_str) = trigger_kind {
3399        local_var_req_builder = local_var_req_builder.query(&[("trigger_kind", &local_var_str.to_string())]);
3400    }
3401    if let Some(ref local_var_str) = script_hash {
3402        local_var_req_builder = local_var_req_builder.query(&[("script_hash", &local_var_str.to_string())]);
3403    }
3404    if let Some(ref local_var_str) = started_before {
3405        local_var_req_builder = local_var_req_builder.query(&[("started_before", &local_var_str.to_string())]);
3406    }
3407    if let Some(ref local_var_str) = started_after {
3408        local_var_req_builder = local_var_req_builder.query(&[("started_after", &local_var_str.to_string())]);
3409    }
3410    if let Some(ref local_var_str) = success {
3411        local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
3412    }
3413    if let Some(ref local_var_str) = scheduled_for_before_now {
3414        local_var_req_builder = local_var_req_builder.query(&[("scheduled_for_before_now", &local_var_str.to_string())]);
3415    }
3416    if let Some(ref local_var_str) = job_kinds {
3417        local_var_req_builder = local_var_req_builder.query(&[("job_kinds", &local_var_str.to_string())]);
3418    }
3419    if let Some(ref local_var_str) = suspended {
3420        local_var_req_builder = local_var_req_builder.query(&[("suspended", &local_var_str.to_string())]);
3421    }
3422    if let Some(ref local_var_str) = running {
3423        local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
3424    }
3425    if let Some(ref local_var_str) = args {
3426        local_var_req_builder = local_var_req_builder.query(&[("args", &local_var_str.to_string())]);
3427    }
3428    if let Some(ref local_var_str) = result {
3429        local_var_req_builder = local_var_req_builder.query(&[("result", &local_var_str.to_string())]);
3430    }
3431    if let Some(ref local_var_str) = allow_wildcards {
3432        local_var_req_builder = local_var_req_builder.query(&[("allow_wildcards", &local_var_str.to_string())]);
3433    }
3434    if let Some(ref local_var_str) = tag {
3435        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
3436    }
3437    if let Some(ref local_var_str) = page {
3438        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3439    }
3440    if let Some(ref local_var_str) = per_page {
3441        local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3442    }
3443    if let Some(ref local_var_str) = all_workspaces {
3444        local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
3445    }
3446    if let Some(ref local_var_str) = is_not_schedule {
3447        local_var_req_builder = local_var_req_builder.query(&[("is_not_schedule", &local_var_str.to_string())]);
3448    }
3449    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3450        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3451    }
3452    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3453        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3454    };
3455
3456    let local_var_req = local_var_req_builder.build()?;
3457    let local_var_resp = local_var_client.execute(local_var_req).await?;
3458
3459    let local_var_status = local_var_resp.status();
3460    let local_var_content = local_var_resp.text().await?;
3461
3462    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3463        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3464    } else {
3465        let local_var_entity: Option<ListQueueError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3466        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3467        Err(Error::ResponseError(local_var_error))
3468    }
3469}
3470
3471pub async fn list_recent_runs(configuration: &configuration::Configuration, workspace: &str, folder: Option<&str>, failed_ids_kind: Option<&str>, failed_ids_path: Option<&str>) -> Result<models::ListRecentRuns200Response, Error<ListRecentRunsError>> {
3472    let local_var_configuration = configuration;
3473
3474    let local_var_client = &local_var_configuration.client;
3475
3476    let local_var_uri_str = format!("{}/w/{workspace}/jobs/recent_runs", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3477    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3478
3479    if let Some(ref local_var_str) = folder {
3480        local_var_req_builder = local_var_req_builder.query(&[("folder", &local_var_str.to_string())]);
3481    }
3482    if let Some(ref local_var_str) = failed_ids_kind {
3483        local_var_req_builder = local_var_req_builder.query(&[("failed_ids_kind", &local_var_str.to_string())]);
3484    }
3485    if let Some(ref local_var_str) = failed_ids_path {
3486        local_var_req_builder = local_var_req_builder.query(&[("failed_ids_path", &local_var_str.to_string())]);
3487    }
3488    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3489        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3490    }
3491    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3492        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3493    };
3494
3495    let local_var_req = local_var_req_builder.build()?;
3496    let local_var_resp = local_var_client.execute(local_var_req).await?;
3497
3498    let local_var_status = local_var_resp.status();
3499    let local_var_content = local_var_resp.text().await?;
3500
3501    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3502        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3503    } else {
3504        let local_var_entity: Option<ListRecentRunsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3505        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3506        Err(Error::ResponseError(local_var_error))
3507    }
3508}
3509
3510/// Assets detected while the run executed (SDK S3 calls, resources passed as arguments), aggregated over the job and all of its child jobs so a flow or workflow-as-code run reports what its steps and tasks touched. Authorized through the job, the same gate as `run_progress`. Recording is asynchronous, so an asset can take a few minutes after the run to appear, and only the most recent runs that touched an asset keep that record. A run that fans out can touch more assets than one response should carry, so the list is capped and `truncated` says when it was cut. 
3511pub async fn list_run_assets(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<models::ListRunAssets200Response, Error<ListRunAssetsError>> {
3512    let local_var_configuration = configuration;
3513
3514    let local_var_client = &local_var_configuration.client;
3515
3516    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_assets/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
3517    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3518
3519    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3520        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3521    }
3522    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3523        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3524    };
3525
3526    let local_var_req = local_var_req_builder.build()?;
3527    let local_var_resp = local_var_client.execute(local_var_req).await?;
3528
3529    let local_var_status = local_var_resp.status();
3530    let local_var_content = local_var_resp.text().await?;
3531
3532    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3533        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3534    } else {
3535        let local_var_entity: Option<ListRunAssetsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3536        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3537        Err(Error::ResponseError(local_var_error))
3538    }
3539}
3540
3541pub async fn list_selected_job_groups(configuration: &configuration::Configuration, workspace: &str, uuid_colon_colon_uuid: Vec<uuid::Uuid>) -> Result<Vec<models::ListSelectedJobGroups200ResponseInner>, Error<ListSelectedJobGroupsError>> {
3542    let local_var_configuration = configuration;
3543
3544    let local_var_client = &local_var_configuration.client;
3545
3546    let local_var_uri_str = format!("{}/w/{workspace}/jobs/list_selected_job_groups", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3547    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3548
3549    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3550        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3551    }
3552    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3553        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3554    };
3555    local_var_req_builder = local_var_req_builder.json(&uuid_colon_colon_uuid);
3556
3557    let local_var_req = local_var_req_builder.build()?;
3558    let local_var_resp = local_var_client.execute(local_var_req).await?;
3559
3560    let local_var_status = local_var_resp.status();
3561    let local_var_content = local_var_resp.text().await?;
3562
3563    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3564        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3565    } else {
3566        let local_var_entity: Option<ListSelectedJobGroupsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3567        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3568        Err(Error::ResponseError(local_var_error))
3569    }
3570}
3571
3572/// Marks failed or canceled jobs as handled so triage surfaces stop showing them as unhandled. The job status itself is unchanged. Returns the ids actually resolved: ids that are not visible to the caller or neither failed nor were canceled are silently skipped.
3573pub async fn resolve_completed_jobs(configuration: &configuration::Configuration, workspace: &str, resolve_completed_jobs_request: models::ResolveCompletedJobsRequest) -> Result<Vec<uuid::Uuid>, Error<ResolveCompletedJobsError>> {
3574    let local_var_configuration = configuration;
3575
3576    let local_var_client = &local_var_configuration.client;
3577
3578    let local_var_uri_str = format!("{}/w/{workspace}/jobs/completed/resolve", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3579    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3580
3581    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3582        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3583    }
3584    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3585        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3586    };
3587    local_var_req_builder = local_var_req_builder.json(&resolve_completed_jobs_request);
3588
3589    let local_var_req = local_var_req_builder.build()?;
3590    let local_var_resp = local_var_client.execute(local_var_req).await?;
3591
3592    let local_var_status = local_var_resp.status();
3593    let local_var_content = local_var_resp.text().await?;
3594
3595    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3596        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3597    } else {
3598        let local_var_entity: Option<ResolveCompletedJobsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3599        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3600        Err(Error::ResponseError(local_var_error))
3601    }
3602}
3603
3604pub async fn restart_flow_at_step(configuration: &configuration::Configuration, workspace: &str, id: &str, restart_flow_at_step_request: models::RestartFlowAtStepRequest, 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>> {
3605    let local_var_configuration = configuration;
3606
3607    let local_var_client = &local_var_configuration.client;
3608
3609    let local_var_uri_str = format!("{}/w/{workspace}/jobs/restart/f/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
3610    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3611
3612    if let Some(ref local_var_str) = scheduled_for {
3613        local_var_req_builder = local_var_req_builder.query(&[("scheduled_for", &local_var_str.to_string())]);
3614    }
3615    if let Some(ref local_var_str) = scheduled_in_secs {
3616        local_var_req_builder = local_var_req_builder.query(&[("scheduled_in_secs", &local_var_str.to_string())]);
3617    }
3618    if let Some(ref local_var_str) = parent_job {
3619        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
3620    }
3621    if let Some(ref local_var_str) = tag {
3622        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
3623    }
3624    if let Some(ref local_var_str) = job_id {
3625        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3626    }
3627    if let Some(ref local_var_str) = include_header {
3628        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3629    }
3630    if let Some(ref local_var_str) = invisible_to_owner {
3631        local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
3632    }
3633    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3634        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3635    }
3636    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3637        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3638    };
3639    local_var_req_builder = local_var_req_builder.json(&restart_flow_at_step_request);
3640
3641    let local_var_req = local_var_req_builder.build()?;
3642    let local_var_resp = local_var_client.execute(local_var_req).await?;
3643
3644    let local_var_status = local_var_resp.status();
3645    let local_var_content = local_var_resp.text().await?;
3646
3647    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3648        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3649    } else {
3650        let local_var_entity: Option<RestartFlowAtStepError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3651        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3652        Err(Error::ResponseError(local_var_error))
3653    }
3654}
3655
3656pub async fn result_by_id(configuration: &configuration::Configuration, workspace: &str, flow_job_id: &str, node_id: &str) -> Result<serde_json::Value, Error<ResultByIdError>> {
3657    let local_var_configuration = configuration;
3658
3659    let local_var_client = &local_var_configuration.client;
3660
3661    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));
3662    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3663
3664    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3665        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3666    }
3667    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3668        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3669    };
3670
3671    let local_var_req = local_var_req_builder.build()?;
3672    let local_var_resp = local_var_client.execute(local_var_req).await?;
3673
3674    let local_var_status = local_var_resp.status();
3675    let local_var_content = local_var_resp.text().await?;
3676
3677    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3678        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3679    } else {
3680        let local_var_entity: Option<ResultByIdError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3681        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3682        Err(Error::ResponseError(local_var_error))
3683    }
3684}
3685
3686/// Resume or cancel a suspended flow/WAC job. Uses approval rules to determine authorization. Either a valid approval_token or an authenticated session is required. 
3687pub async fn resume_suspended(configuration: &configuration::Configuration, workspace: &str, job_id: &str, resume_suspended_request: models::ResumeSuspendedRequest) -> Result<String, Error<ResumeSuspendedError>> {
3688    let local_var_configuration = configuration;
3689
3690    let local_var_client = &local_var_configuration.client;
3691
3692    let local_var_uri_str = format!("{}/w/{workspace}/jobs_u/flow/resume_suspended/{job_id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), job_id=crate::apis::urlencode(job_id));
3693    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3694
3695    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3696        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3697    }
3698    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3699        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3700    };
3701    local_var_req_builder = local_var_req_builder.json(&resume_suspended_request);
3702
3703    let local_var_req = local_var_req_builder.build()?;
3704    let local_var_resp = local_var_client.execute(local_var_req).await?;
3705
3706    let local_var_status = local_var_resp.status();
3707    let local_var_content = local_var_resp.text().await?;
3708
3709    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3710        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3711    } else {
3712        let local_var_entity: Option<ResumeSuspendedError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3713        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3714        Err(Error::ResponseError(local_var_error))
3715    }
3716}
3717
3718pub async fn resume_suspended_flow_as_owner(configuration: &configuration::Configuration, workspace: &str, id: &str, body: serde_json::Value) -> Result<String, Error<ResumeSuspendedFlowAsOwnerError>> {
3719    let local_var_configuration = configuration;
3720
3721    let local_var_client = &local_var_configuration.client;
3722
3723    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));
3724    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3725
3726    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3727        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3728    }
3729    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3730        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3731    };
3732    local_var_req_builder = local_var_req_builder.json(&body);
3733
3734    let local_var_req = local_var_req_builder.build()?;
3735    let local_var_resp = local_var_client.execute(local_var_req).await?;
3736
3737    let local_var_status = local_var_resp.status();
3738    let local_var_content = local_var_resp.text().await?;
3739
3740    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3741        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3742    } else {
3743        let local_var_entity: Option<ResumeSuspendedFlowAsOwnerError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3744        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3745        Err(Error::ResponseError(local_var_error))
3746    }
3747}
3748
3749pub 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>> {
3750    let local_var_configuration = configuration;
3751
3752    let local_var_client = &local_var_configuration.client;
3753
3754    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));
3755    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3756
3757    if let Some(ref local_var_str) = payload {
3758        local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
3759    }
3760    if let Some(ref local_var_str) = approver {
3761        local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
3762    }
3763    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3764        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3765    }
3766    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3767        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3768    };
3769
3770    let local_var_req = local_var_req_builder.build()?;
3771    let local_var_resp = local_var_client.execute(local_var_req).await?;
3772
3773    let local_var_status = local_var_resp.status();
3774    let local_var_content = local_var_resp.text().await?;
3775
3776    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3777        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3778    } else {
3779        let local_var_entity: Option<ResumeSuspendedJobGetError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3780        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3781        Err(Error::ResponseError(local_var_error))
3782    }
3783}
3784
3785pub 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>> {
3786    let local_var_configuration = configuration;
3787
3788    let local_var_client = &local_var_configuration.client;
3789
3790    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));
3791    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3792
3793    if let Some(ref local_var_str) = approver {
3794        local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
3795    }
3796    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3797        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3798    }
3799    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3800        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3801    };
3802    local_var_req_builder = local_var_req_builder.json(&body);
3803
3804    let local_var_req = local_var_req_builder.build()?;
3805    let local_var_resp = local_var_client.execute(local_var_req).await?;
3806
3807    let local_var_status = local_var_resp.status();
3808    let local_var_content = local_var_resp.text().await?;
3809
3810    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3811        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3812    } else {
3813        let local_var_entity: Option<ResumeSuspendedJobPostError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3814        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3815        Err(Error::ResponseError(local_var_error))
3816    }
3817}
3818
3819/// Runs the `ai_agent` resource at `path` as stored, for any caller who can read it (operators included). The run is the caller's, or the agent's `on_behalf_of` when its `run_on_behalf_of` is set; the caller's inputs may then not reference variables or resources. With `memory_id`, the run is a turn of the caller's conversation with the agent; without, a single run. 
3820pub async fn run_agent(configuration: &configuration::Configuration, workspace: &str, path: &str, run_agent_request: models::RunAgentRequest, memory_id: Option<&str>, take_over: Option<bool>) -> Result<uuid::Uuid, Error<RunAgentError>> {
3821    let local_var_configuration = configuration;
3822
3823    let local_var_client = &local_var_configuration.client;
3824
3825    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/agent/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
3826    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3827
3828    if let Some(ref local_var_str) = memory_id {
3829        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
3830    }
3831    if let Some(ref local_var_str) = take_over {
3832        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
3833    }
3834    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3835        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3836    }
3837    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3838        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3839    };
3840    local_var_req_builder = local_var_req_builder.json(&run_agent_request);
3841
3842    let local_var_req = local_var_req_builder.build()?;
3843    let local_var_resp = local_var_client.execute(local_var_req).await?;
3844
3845    let local_var_status = local_var_resp.status();
3846    let local_var_content = local_var_resp.text().await?;
3847
3848    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3849        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3850    } else {
3851        let local_var_entity: Option<RunAgentError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3852        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3853        Err(Error::ResponseError(local_var_error))
3854    }
3855}
3856
3857pub async fn 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>, take_over: Option<bool>, poll_delay_ms: Option<i64>) -> Result<String, Error<RunAndStreamFlowByPathError>> {
3858    let local_var_configuration = configuration;
3859
3860    let local_var_client = &local_var_configuration.client;
3861
3862    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_and_stream/f/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
3863    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3864
3865    if let Some(ref local_var_str) = include_header {
3866        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3867    }
3868    if let Some(ref local_var_str) = queue_limit {
3869        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
3870    }
3871    if let Some(ref local_var_str) = job_id {
3872        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3873    }
3874    if let Some(ref local_var_str) = skip_preprocessor {
3875        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
3876    }
3877    if let Some(ref local_var_str) = memory_id {
3878        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
3879    }
3880    if let Some(ref local_var_str) = take_over {
3881        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
3882    }
3883    if let Some(ref local_var_str) = poll_delay_ms {
3884        local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
3885    }
3886    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3887        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3888    }
3889    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3890        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3891    };
3892    local_var_req_builder = local_var_req_builder.json(&request_body);
3893
3894    let local_var_req = local_var_req_builder.build()?;
3895    let local_var_resp = local_var_client.execute(local_var_req).await?;
3896
3897    let local_var_status = local_var_resp.status();
3898    let local_var_content = local_var_resp.text().await?;
3899
3900    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3901        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3902    } else {
3903        let local_var_entity: Option<RunAndStreamFlowByPathError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3904        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3905        Err(Error::ResponseError(local_var_error))
3906    }
3907}
3908
3909pub 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>, take_over: Option<bool>, poll_delay_ms: Option<i64>) -> Result<String, Error<RunAndStreamFlowByPathGetError>> {
3910    let local_var_configuration = configuration;
3911
3912    let local_var_client = &local_var_configuration.client;
3913
3914    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));
3915    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3916
3917    if let Some(ref local_var_str) = include_header {
3918        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3919    }
3920    if let Some(ref local_var_str) = queue_limit {
3921        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
3922    }
3923    if let Some(ref local_var_str) = payload {
3924        local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
3925    }
3926    if let Some(ref local_var_str) = job_id {
3927        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3928    }
3929    if let Some(ref local_var_str) = skip_preprocessor {
3930        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
3931    }
3932    if let Some(ref local_var_str) = memory_id {
3933        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
3934    }
3935    if let Some(ref local_var_str) = take_over {
3936        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
3937    }
3938    if let Some(ref local_var_str) = poll_delay_ms {
3939        local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
3940    }
3941    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3942        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3943    }
3944    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3945        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3946    };
3947
3948    let local_var_req = local_var_req_builder.build()?;
3949    let local_var_resp = local_var_client.execute(local_var_req).await?;
3950
3951    let local_var_status = local_var_resp.status();
3952    let local_var_content = local_var_resp.text().await?;
3953
3954    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3955        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3956    } else {
3957        let local_var_entity: Option<RunAndStreamFlowByPathGetError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3958        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3959        Err(Error::ResponseError(local_var_error))
3960    }
3961}
3962
3963pub 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>, take_over: Option<bool>, poll_delay_ms: Option<i64>) -> Result<String, Error<RunAndStreamFlowByVersionError>> {
3964    let local_var_configuration = configuration;
3965
3966    let local_var_client = &local_var_configuration.client;
3967
3968    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);
3969    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3970
3971    if let Some(ref local_var_str) = include_header {
3972        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3973    }
3974    if let Some(ref local_var_str) = queue_limit {
3975        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
3976    }
3977    if let Some(ref local_var_str) = job_id {
3978        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3979    }
3980    if let Some(ref local_var_str) = skip_preprocessor {
3981        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
3982    }
3983    if let Some(ref local_var_str) = memory_id {
3984        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
3985    }
3986    if let Some(ref local_var_str) = take_over {
3987        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
3988    }
3989    if let Some(ref local_var_str) = poll_delay_ms {
3990        local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
3991    }
3992    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3993        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3994    }
3995    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3996        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3997    };
3998    local_var_req_builder = local_var_req_builder.json(&request_body);
3999
4000    let local_var_req = local_var_req_builder.build()?;
4001    let local_var_resp = local_var_client.execute(local_var_req).await?;
4002
4003    let local_var_status = local_var_resp.status();
4004    let local_var_content = local_var_resp.text().await?;
4005
4006    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4007        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4008    } else {
4009        let local_var_entity: Option<RunAndStreamFlowByVersionError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4010        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4011        Err(Error::ResponseError(local_var_error))
4012    }
4013}
4014
4015pub 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>, take_over: Option<bool>, poll_delay_ms: Option<i64>) -> Result<String, Error<RunAndStreamFlowByVersionGetError>> {
4016    let local_var_configuration = configuration;
4017
4018    let local_var_client = &local_var_configuration.client;
4019
4020    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);
4021    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4022
4023    if let Some(ref local_var_str) = include_header {
4024        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
4025    }
4026    if let Some(ref local_var_str) = queue_limit {
4027        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
4028    }
4029    if let Some(ref local_var_str) = payload {
4030        local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
4031    }
4032    if let Some(ref local_var_str) = job_id {
4033        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4034    }
4035    if let Some(ref local_var_str) = skip_preprocessor {
4036        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
4037    }
4038    if let Some(ref local_var_str) = memory_id {
4039        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
4040    }
4041    if let Some(ref local_var_str) = take_over {
4042        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
4043    }
4044    if let Some(ref local_var_str) = poll_delay_ms {
4045        local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
4046    }
4047    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4048        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4049    }
4050    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4051        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4052    };
4053
4054    let local_var_req = local_var_req_builder.build()?;
4055    let local_var_resp = local_var_client.execute(local_var_req).await?;
4056
4057    let local_var_status = local_var_resp.status();
4058    let local_var_content = local_var_resp.text().await?;
4059
4060    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4061        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4062    } else {
4063        let local_var_entity: Option<RunAndStreamFlowByVersionGetError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4064        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4065        Err(Error::ResponseError(local_var_error))
4066    }
4067}
4068
4069pub 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>> {
4070    let local_var_configuration = configuration;
4071
4072    let local_var_client = &local_var_configuration.client;
4073
4074    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));
4075    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4076
4077    if let Some(ref local_var_str) = parent_job {
4078        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
4079    }
4080    if let Some(ref local_var_str) = tag {
4081        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
4082    }
4083    if let Some(ref local_var_str) = cache_ttl {
4084        local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
4085    }
4086    if let Some(ref local_var_str) = job_id {
4087        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4088    }
4089    if let Some(ref local_var_str) = include_header {
4090        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
4091    }
4092    if let Some(ref local_var_str) = queue_limit {
4093        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
4094    }
4095    if let Some(ref local_var_str) = skip_preprocessor {
4096        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
4097    }
4098    if let Some(ref local_var_str) = poll_delay_ms {
4099        local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
4100    }
4101    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4102        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4103    }
4104    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4105        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4106    };
4107    local_var_req_builder = local_var_req_builder.json(&request_body);
4108
4109    let local_var_req = local_var_req_builder.build()?;
4110    let local_var_resp = local_var_client.execute(local_var_req).await?;
4111
4112    let local_var_status = local_var_resp.status();
4113    let local_var_content = local_var_resp.text().await?;
4114
4115    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4116        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4117    } else {
4118        let local_var_entity: Option<RunAndStreamScriptByHashError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4119        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4120        Err(Error::ResponseError(local_var_error))
4121    }
4122}
4123
4124pub 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>> {
4125    let local_var_configuration = configuration;
4126
4127    let local_var_client = &local_var_configuration.client;
4128
4129    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));
4130    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4131
4132    if let Some(ref local_var_str) = parent_job {
4133        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
4134    }
4135    if let Some(ref local_var_str) = tag {
4136        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
4137    }
4138    if let Some(ref local_var_str) = cache_ttl {
4139        local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
4140    }
4141    if let Some(ref local_var_str) = job_id {
4142        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4143    }
4144    if let Some(ref local_var_str) = include_header {
4145        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
4146    }
4147    if let Some(ref local_var_str) = queue_limit {
4148        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
4149    }
4150    if let Some(ref local_var_str) = payload {
4151        local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
4152    }
4153    if let Some(ref local_var_str) = skip_preprocessor {
4154        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
4155    }
4156    if let Some(ref local_var_str) = poll_delay_ms {
4157        local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
4158    }
4159    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4160        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4161    }
4162    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4163        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4164    };
4165
4166    let local_var_req = local_var_req_builder.build()?;
4167    let local_var_resp = local_var_client.execute(local_var_req).await?;
4168
4169    let local_var_status = local_var_resp.status();
4170    let local_var_content = local_var_resp.text().await?;
4171
4172    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4173        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4174    } else {
4175        let local_var_entity: Option<RunAndStreamScriptByHashGetError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4176        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4177        Err(Error::ResponseError(local_var_error))
4178    }
4179}
4180
4181pub 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>> {
4182    let local_var_configuration = configuration;
4183
4184    let local_var_client = &local_var_configuration.client;
4185
4186    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));
4187    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4188
4189    if let Some(ref local_var_str) = parent_job {
4190        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
4191    }
4192    if let Some(ref local_var_str) = tag {
4193        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
4194    }
4195    if let Some(ref local_var_str) = cache_ttl {
4196        local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
4197    }
4198    if let Some(ref local_var_str) = job_id {
4199        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4200    }
4201    if let Some(ref local_var_str) = include_header {
4202        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
4203    }
4204    if let Some(ref local_var_str) = queue_limit {
4205        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
4206    }
4207    if let Some(ref local_var_str) = skip_preprocessor {
4208        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
4209    }
4210    if let Some(ref local_var_str) = poll_delay_ms {
4211        local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
4212    }
4213    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4214        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4215    }
4216    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4217        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4218    };
4219    local_var_req_builder = local_var_req_builder.json(&request_body);
4220
4221    let local_var_req = local_var_req_builder.build()?;
4222    let local_var_resp = local_var_client.execute(local_var_req).await?;
4223
4224    let local_var_status = local_var_resp.status();
4225    let local_var_content = local_var_resp.text().await?;
4226
4227    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4228        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4229    } else {
4230        let local_var_entity: Option<RunAndStreamScriptByPathError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4231        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4232        Err(Error::ResponseError(local_var_error))
4233    }
4234}
4235
4236pub 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>> {
4237    let local_var_configuration = configuration;
4238
4239    let local_var_client = &local_var_configuration.client;
4240
4241    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));
4242    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4243
4244    if let Some(ref local_var_str) = parent_job {
4245        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
4246    }
4247    if let Some(ref local_var_str) = tag {
4248        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
4249    }
4250    if let Some(ref local_var_str) = cache_ttl {
4251        local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
4252    }
4253    if let Some(ref local_var_str) = job_id {
4254        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4255    }
4256    if let Some(ref local_var_str) = include_header {
4257        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
4258    }
4259    if let Some(ref local_var_str) = queue_limit {
4260        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
4261    }
4262    if let Some(ref local_var_str) = payload {
4263        local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
4264    }
4265    if let Some(ref local_var_str) = skip_preprocessor {
4266        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
4267    }
4268    if let Some(ref local_var_str) = poll_delay_ms {
4269        local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
4270    }
4271    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4272        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4273    }
4274    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4275        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4276    };
4277
4278    let local_var_req = local_var_req_builder.build()?;
4279    let local_var_resp = local_var_client.execute(local_var_req).await?;
4280
4281    let local_var_status = local_var_resp.status();
4282    let local_var_content = local_var_resp.text().await?;
4283
4284    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4285        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4286    } else {
4287        let local_var_entity: Option<RunAndStreamScriptByPathGetError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4288        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4289        Err(Error::ResponseError(local_var_error))
4290    }
4291}
4292
4293pub 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>> {
4294    let local_var_configuration = configuration;
4295
4296    let local_var_client = &local_var_configuration.client;
4297
4298    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));
4299    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4300
4301    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4302        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4303    }
4304    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4305        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4306    };
4307    local_var_req_builder = local_var_req_builder.json(&workflow_task);
4308
4309    let local_var_req = local_var_req_builder.build()?;
4310    let local_var_resp = local_var_client.execute(local_var_req).await?;
4311
4312    let local_var_status = local_var_resp.status();
4313    let local_var_content = local_var_resp.text().await?;
4314
4315    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4316        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4317    } else {
4318        let local_var_entity: Option<RunCodeWorkflowTaskError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4319        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4320        Err(Error::ResponseError(local_var_error))
4321    }
4322}
4323
4324pub async fn run_dynamic_select(configuration: &configuration::Configuration, workspace: &str, dynamic_input_data: models::DynamicInputData) -> Result<uuid::Uuid, Error<RunDynamicSelectError>> {
4325    let local_var_configuration = configuration;
4326
4327    let local_var_client = &local_var_configuration.client;
4328
4329    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/dynamic_select", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4330    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4331
4332    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4333        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4334    }
4335    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4336        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4337    };
4338    local_var_req_builder = local_var_req_builder.json(&dynamic_input_data);
4339
4340    let local_var_req = local_var_req_builder.build()?;
4341    let local_var_resp = local_var_client.execute(local_var_req).await?;
4342
4343    let local_var_status = local_var_resp.status();
4344    let local_var_content = local_var_resp.text().await?;
4345
4346    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4347        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4348    } else {
4349        let local_var_entity: Option<RunDynamicSelectError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4350        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4351        Err(Error::ResponseError(local_var_error))
4352    }
4353}
4354
4355pub 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>, take_over: Option<bool>) -> Result<uuid::Uuid, Error<RunFlowByPathError>> {
4356    let local_var_configuration = configuration;
4357
4358    let local_var_client = &local_var_configuration.client;
4359
4360    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));
4361    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4362
4363    if let Some(ref local_var_str) = scheduled_for {
4364        local_var_req_builder = local_var_req_builder.query(&[("scheduled_for", &local_var_str.to_string())]);
4365    }
4366    if let Some(ref local_var_str) = scheduled_in_secs {
4367        local_var_req_builder = local_var_req_builder.query(&[("scheduled_in_secs", &local_var_str.to_string())]);
4368    }
4369    if let Some(ref local_var_str) = skip_preprocessor {
4370        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
4371    }
4372    if let Some(ref local_var_str) = parent_job {
4373        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
4374    }
4375    if let Some(ref local_var_str) = tag {
4376        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
4377    }
4378    if let Some(ref local_var_str) = job_id {
4379        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4380    }
4381    if let Some(ref local_var_str) = include_header {
4382        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
4383    }
4384    if let Some(ref local_var_str) = invisible_to_owner {
4385        local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
4386    }
4387    if let Some(ref local_var_str) = memory_id {
4388        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
4389    }
4390    if let Some(ref local_var_str) = take_over {
4391        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
4392    }
4393    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4394        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4395    }
4396    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4397        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4398    };
4399    local_var_req_builder = local_var_req_builder.json(&request_body);
4400
4401    let local_var_req = local_var_req_builder.build()?;
4402    let local_var_resp = local_var_client.execute(local_var_req).await?;
4403
4404    let local_var_status = local_var_resp.status();
4405    let local_var_content = local_var_resp.text().await?;
4406
4407    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4408        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4409    } else {
4410        let local_var_entity: Option<RunFlowByPathError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4411        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4412        Err(Error::ResponseError(local_var_error))
4413    }
4414}
4415
4416pub 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>, take_over: Option<bool>) -> Result<uuid::Uuid, Error<RunFlowByVersionError>> {
4417    let local_var_configuration = configuration;
4418
4419    let local_var_client = &local_var_configuration.client;
4420
4421    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/fv/{version}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), version=version);
4422    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4423
4424    if let Some(ref local_var_str) = scheduled_for {
4425        local_var_req_builder = local_var_req_builder.query(&[("scheduled_for", &local_var_str.to_string())]);
4426    }
4427    if let Some(ref local_var_str) = scheduled_in_secs {
4428        local_var_req_builder = local_var_req_builder.query(&[("scheduled_in_secs", &local_var_str.to_string())]);
4429    }
4430    if let Some(ref local_var_str) = skip_preprocessor {
4431        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
4432    }
4433    if let Some(ref local_var_str) = parent_job {
4434        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
4435    }
4436    if let Some(ref local_var_str) = tag {
4437        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
4438    }
4439    if let Some(ref local_var_str) = job_id {
4440        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4441    }
4442    if let Some(ref local_var_str) = include_header {
4443        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
4444    }
4445    if let Some(ref local_var_str) = invisible_to_owner {
4446        local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
4447    }
4448    if let Some(ref local_var_str) = memory_id {
4449        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
4450    }
4451    if let Some(ref local_var_str) = take_over {
4452        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
4453    }
4454    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4455        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4456    }
4457    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4458        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4459    };
4460    local_var_req_builder = local_var_req_builder.json(&request_body);
4461
4462    let local_var_req = local_var_req_builder.build()?;
4463    let local_var_resp = local_var_client.execute(local_var_req).await?;
4464
4465    let local_var_status = local_var_resp.status();
4466    let local_var_content = local_var_resp.text().await?;
4467
4468    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4469        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4470    } else {
4471        let local_var_entity: Option<RunFlowByVersionError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4472        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4473        Err(Error::ResponseError(local_var_error))
4474    }
4475}
4476
4477pub async fn run_flow_dependencies_async(configuration: &configuration::Configuration, workspace: &str, run_flow_dependencies_async_request: models::RunFlowDependenciesAsyncRequest) -> Result<uuid::Uuid, Error<RunFlowDependenciesAsyncError>> {
4478    let local_var_configuration = configuration;
4479
4480    let local_var_client = &local_var_configuration.client;
4481
4482    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/flow_dependencies_async", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4483    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4484
4485    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4486        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4487    }
4488    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4489        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4490    };
4491    local_var_req_builder = local_var_req_builder.json(&run_flow_dependencies_async_request);
4492
4493    let local_var_req = local_var_req_builder.build()?;
4494    let local_var_resp = local_var_client.execute(local_var_req).await?;
4495
4496    let local_var_status = local_var_resp.status();
4497    let local_var_content = local_var_resp.text().await?;
4498
4499    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4500        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4501    } else {
4502        let local_var_entity: Option<RunFlowDependenciesAsyncError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4503        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4504        Err(Error::ResponseError(local_var_error))
4505    }
4506}
4507
4508pub 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>, take_over: Option<bool>) -> Result<uuid::Uuid, Error<RunFlowPreviewError>> {
4509    let local_var_configuration = configuration;
4510
4511    let local_var_client = &local_var_configuration.client;
4512
4513    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/preview_flow", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4514    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4515
4516    if let Some(ref local_var_str) = include_header {
4517        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
4518    }
4519    if let Some(ref local_var_str) = invisible_to_owner {
4520        local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
4521    }
4522    if let Some(ref local_var_str) = job_id {
4523        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4524    }
4525    if let Some(ref local_var_str) = memory_id {
4526        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
4527    }
4528    if let Some(ref local_var_str) = take_over {
4529        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
4530    }
4531    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4532        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4533    }
4534    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4535        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4536    };
4537    local_var_req_builder = local_var_req_builder.json(&flow_preview);
4538
4539    let local_var_req = local_var_req_builder.build()?;
4540    let local_var_resp = local_var_client.execute(local_var_req).await?;
4541
4542    let local_var_status = local_var_resp.status();
4543    let local_var_content = local_var_resp.text().await?;
4544
4545    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4546        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4547    } else {
4548        let local_var_entity: Option<RunFlowPreviewError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4549        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4550        Err(Error::ResponseError(local_var_error))
4551    }
4552}
4553
4554pub async fn run_flow_preview_and_wait_result(configuration: &configuration::Configuration, workspace: &str, flow_preview: models::FlowPreview, memory_id: Option<&str>, take_over: Option<bool>) -> Result<serde_json::Value, Error<RunFlowPreviewAndWaitResultError>> {
4555    let local_var_configuration = configuration;
4556
4557    let local_var_client = &local_var_configuration.client;
4558
4559    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_wait_result/preview_flow", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4560    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4561
4562    if let Some(ref local_var_str) = memory_id {
4563        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
4564    }
4565    if let Some(ref local_var_str) = take_over {
4566        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
4567    }
4568    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4569        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4570    }
4571    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4572        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4573    };
4574    local_var_req_builder = local_var_req_builder.json(&flow_preview);
4575
4576    let local_var_req = local_var_req_builder.build()?;
4577    let local_var_resp = local_var_client.execute(local_var_req).await?;
4578
4579    let local_var_status = local_var_resp.status();
4580    let local_var_content = local_var_resp.text().await?;
4581
4582    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4583        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4584    } else {
4585        let local_var_entity: Option<RunFlowPreviewAndWaitResultError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4586        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4587        Err(Error::ResponseError(local_var_error))
4588    }
4589}
4590
4591/// Runs the latest deployed version of the flow as a flow preview, with each step named in `steps` either mocked (`{\"return_value\": ...}`) or replaced by a function of the code of `caller_job_id` (`{\"function\": \"<name>\"}`), called with the step's inputs. Needs the same rights as a flow preview.
4592pub async fn run_flow_test(configuration: &configuration::Configuration, workspace: &str, path: &str, run_flow_test_request: models::RunFlowTestRequest, job_id: Option<&str>) -> Result<uuid::Uuid, Error<RunFlowTestError>> {
4593    let local_var_configuration = configuration;
4594
4595    let local_var_client = &local_var_configuration.client;
4596
4597    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/flow_test/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
4598    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4599
4600    if let Some(ref local_var_str) = job_id {
4601        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4602    }
4603    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4604        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4605    }
4606    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4607        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4608    };
4609    local_var_req_builder = local_var_req_builder.json(&run_flow_test_request);
4610
4611    let local_var_req = local_var_req_builder.build()?;
4612    let local_var_resp = local_var_client.execute(local_var_req).await?;
4613
4614    let local_var_status = local_var_resp.status();
4615    let local_var_content = local_var_resp.text().await?;
4616
4617    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4618        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4619    } else {
4620        let local_var_entity: Option<RunFlowTestError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4621        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4622        Err(Error::ResponseError(local_var_error))
4623    }
4624}
4625
4626/// Moves the start of a queued job that is waiting for a future time (scheduled, debounced, re-scheduled by a concurrency limit, or a flow step waiting on a sleep or a retry delay) to now, keeping the same job id. A job with a concurrency limit is still checked against its limit when it is pulled. A schedule's upcoming tick is refused, since the schedule would queue that tick again. 
4627pub async fn run_queued_job_now(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<String, Error<RunQueuedJobNowError>> {
4628    let local_var_configuration = configuration;
4629
4630    let local_var_client = &local_var_configuration.client;
4631
4632    let local_var_uri_str = format!("{}/w/{workspace}/jobs/queue/run_now/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
4633    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4634
4635    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4636        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4637    }
4638    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4639        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4640    };
4641
4642    let local_var_req = local_var_req_builder.build()?;
4643    let local_var_resp = local_var_client.execute(local_var_req).await?;
4644
4645    let local_var_status = local_var_resp.status();
4646    let local_var_content = local_var_resp.text().await?;
4647
4648    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4649        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4650    } else {
4651        let local_var_entity: Option<RunQueuedJobNowError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4652        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4653        Err(Error::ResponseError(local_var_error))
4654    }
4655}
4656
4657pub async fn run_raw_script_dependencies(configuration: &configuration::Configuration, workspace: &str, run_raw_script_dependencies_request: models::RunRawScriptDependenciesRequest) -> Result<models::RunRawScriptDependencies201Response, Error<RunRawScriptDependenciesError>> {
4658    let local_var_configuration = configuration;
4659
4660    let local_var_client = &local_var_configuration.client;
4661
4662    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/dependencies", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4663    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4664
4665    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4666        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4667    }
4668    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4669        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4670    };
4671    local_var_req_builder = local_var_req_builder.json(&run_raw_script_dependencies_request);
4672
4673    let local_var_req = local_var_req_builder.build()?;
4674    let local_var_resp = local_var_client.execute(local_var_req).await?;
4675
4676    let local_var_status = local_var_resp.status();
4677    let local_var_content = local_var_resp.text().await?;
4678
4679    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4680        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4681    } else {
4682        let local_var_entity: Option<RunRawScriptDependenciesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4683        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4684        Err(Error::ResponseError(local_var_error))
4685    }
4686}
4687
4688pub async fn run_raw_script_dependencies_async(configuration: &configuration::Configuration, workspace: &str, run_raw_script_dependencies_request: models::RunRawScriptDependenciesRequest) -> Result<uuid::Uuid, Error<RunRawScriptDependenciesAsyncError>> {
4689    let local_var_configuration = configuration;
4690
4691    let local_var_client = &local_var_configuration.client;
4692
4693    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/dependencies_async", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4694    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4695
4696    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4697        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4698    }
4699    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4700        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4701    };
4702    local_var_req_builder = local_var_req_builder.json(&run_raw_script_dependencies_request);
4703
4704    let local_var_req = local_var_req_builder.build()?;
4705    let local_var_resp = local_var_client.execute(local_var_req).await?;
4706
4707    let local_var_status = local_var_resp.status();
4708    let local_var_content = local_var_resp.text().await?;
4709
4710    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4711        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4712    } else {
4713        let local_var_entity: Option<RunRawScriptDependenciesAsyncError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4714        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4715        Err(Error::ResponseError(local_var_error))
4716    }
4717}
4718
4719pub 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>, retry: Option<&str>, include_header: Option<&str>, invisible_to_owner: Option<bool>) -> Result<uuid::Uuid, Error<RunScriptByHashError>> {
4720    let local_var_configuration = configuration;
4721
4722    let local_var_client = &local_var_configuration.client;
4723
4724    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));
4725    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4726
4727    if let Some(ref local_var_str) = scheduled_for {
4728        local_var_req_builder = local_var_req_builder.query(&[("scheduled_for", &local_var_str.to_string())]);
4729    }
4730    if let Some(ref local_var_str) = scheduled_in_secs {
4731        local_var_req_builder = local_var_req_builder.query(&[("scheduled_in_secs", &local_var_str.to_string())]);
4732    }
4733    if let Some(ref local_var_str) = skip_preprocessor {
4734        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
4735    }
4736    if let Some(ref local_var_str) = parent_job {
4737        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
4738    }
4739    if let Some(ref local_var_str) = tag {
4740        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
4741    }
4742    if let Some(ref local_var_str) = cache_ttl {
4743        local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
4744    }
4745    if let Some(ref local_var_str) = job_id {
4746        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4747    }
4748    if let Some(ref local_var_str) = retry {
4749        local_var_req_builder = local_var_req_builder.query(&[("retry", &local_var_str.to_string())]);
4750    }
4751    if let Some(ref local_var_str) = include_header {
4752        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
4753    }
4754    if let Some(ref local_var_str) = invisible_to_owner {
4755        local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
4756    }
4757    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4758        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4759    }
4760    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4761        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4762    };
4763    local_var_req_builder = local_var_req_builder.json(&body);
4764
4765    let local_var_req = local_var_req_builder.build()?;
4766    let local_var_resp = local_var_client.execute(local_var_req).await?;
4767
4768    let local_var_status = local_var_resp.status();
4769    let local_var_content = local_var_resp.text().await?;
4770
4771    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4772        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4773    } else {
4774        let local_var_entity: Option<RunScriptByHashError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4775        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4776        Err(Error::ResponseError(local_var_error))
4777    }
4778}
4779
4780pub async fn run_script_by_hash_inline(configuration: &configuration::Configuration, workspace: &str, hash: &str, inline_script_args: models::InlineScriptArgs) -> Result<serde_json::Value, Error<RunScriptByHashInlineError>> {
4781    let local_var_configuration = configuration;
4782
4783    let local_var_client = &local_var_configuration.client;
4784
4785    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_inline/h/{hash}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), hash=crate::apis::urlencode(hash));
4786    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4787
4788    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4789        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4790    }
4791    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4792        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4793    };
4794    local_var_req_builder = local_var_req_builder.json(&inline_script_args);
4795
4796    let local_var_req = local_var_req_builder.build()?;
4797    let local_var_resp = local_var_client.execute(local_var_req).await?;
4798
4799    let local_var_status = local_var_resp.status();
4800    let local_var_content = local_var_resp.text().await?;
4801
4802    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4803        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4804    } else {
4805        let local_var_entity: Option<RunScriptByHashInlineError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4806        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4807        Err(Error::ResponseError(local_var_error))
4808    }
4809}
4810
4811pub 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>, retry: Option<&str>, invisible_to_owner: Option<bool>) -> Result<uuid::Uuid, Error<RunScriptByPathError>> {
4812    let local_var_configuration = configuration;
4813
4814    let local_var_client = &local_var_configuration.client;
4815
4816    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));
4817    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4818
4819    if let Some(ref local_var_str) = scheduled_for {
4820        local_var_req_builder = local_var_req_builder.query(&[("scheduled_for", &local_var_str.to_string())]);
4821    }
4822    if let Some(ref local_var_str) = scheduled_in_secs {
4823        local_var_req_builder = local_var_req_builder.query(&[("scheduled_in_secs", &local_var_str.to_string())]);
4824    }
4825    if let Some(ref local_var_str) = skip_preprocessor {
4826        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
4827    }
4828    if let Some(ref local_var_str) = parent_job {
4829        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
4830    }
4831    if let Some(ref local_var_str) = tag {
4832        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
4833    }
4834    if let Some(ref local_var_str) = cache_ttl {
4835        local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
4836    }
4837    if let Some(ref local_var_str) = job_id {
4838        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4839    }
4840    if let Some(ref local_var_str) = retry {
4841        local_var_req_builder = local_var_req_builder.query(&[("retry", &local_var_str.to_string())]);
4842    }
4843    if let Some(ref local_var_str) = invisible_to_owner {
4844        local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
4845    }
4846    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4847        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4848    }
4849    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4850        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4851    };
4852    local_var_req_builder = local_var_req_builder.json(&request_body);
4853
4854    let local_var_req = local_var_req_builder.build()?;
4855    let local_var_resp = local_var_client.execute(local_var_req).await?;
4856
4857    let local_var_status = local_var_resp.status();
4858    let local_var_content = local_var_resp.text().await?;
4859
4860    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4861        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4862    } else {
4863        let local_var_entity: Option<RunScriptByPathError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4864        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4865        Err(Error::ResponseError(local_var_error))
4866    }
4867}
4868
4869pub async fn run_script_by_path_inline(configuration: &configuration::Configuration, workspace: &str, path: &str, inline_script_args: models::InlineScriptArgs) -> Result<serde_json::Value, Error<RunScriptByPathInlineError>> {
4870    let local_var_configuration = configuration;
4871
4872    let local_var_client = &local_var_configuration.client;
4873
4874    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_inline/p/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
4875    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4876
4877    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4878        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4879    }
4880    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4881        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4882    };
4883    local_var_req_builder = local_var_req_builder.json(&inline_script_args);
4884
4885    let local_var_req = local_var_req_builder.build()?;
4886    let local_var_resp = local_var_client.execute(local_var_req).await?;
4887
4888    let local_var_status = local_var_resp.status();
4889    let local_var_content = local_var_resp.text().await?;
4890
4891    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4892        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4893    } else {
4894        let local_var_entity: Option<RunScriptByPathInlineError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4895        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4896        Err(Error::ResponseError(local_var_error))
4897    }
4898}
4899
4900pub async fn run_script_preview(configuration: &configuration::Configuration, workspace: &str, preview: models::Preview, include_header: Option<&str>, invisible_to_owner: Option<bool>, timeout: Option<i32>, job_id: Option<&str>) -> Result<uuid::Uuid, Error<RunScriptPreviewError>> {
4901    let local_var_configuration = configuration;
4902
4903    let local_var_client = &local_var_configuration.client;
4904
4905    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/preview", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4906    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4907
4908    if let Some(ref local_var_str) = include_header {
4909        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
4910    }
4911    if let Some(ref local_var_str) = invisible_to_owner {
4912        local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
4913    }
4914    if let Some(ref local_var_str) = timeout {
4915        local_var_req_builder = local_var_req_builder.query(&[("timeout", &local_var_str.to_string())]);
4916    }
4917    if let Some(ref local_var_str) = job_id {
4918        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4919    }
4920    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4921        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4922    }
4923    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4924        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4925    };
4926    local_var_req_builder = local_var_req_builder.json(&preview);
4927
4928    let local_var_req = local_var_req_builder.build()?;
4929    let local_var_resp = local_var_client.execute(local_var_req).await?;
4930
4931    let local_var_status = local_var_resp.status();
4932    let local_var_content = local_var_resp.text().await?;
4933
4934    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4935        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4936    } else {
4937        let local_var_entity: Option<RunScriptPreviewError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4938        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4939        Err(Error::ResponseError(local_var_error))
4940    }
4941}
4942
4943pub async fn run_script_preview_and_wait_result(configuration: &configuration::Configuration, workspace: &str, preview: models::Preview) -> Result<serde_json::Value, Error<RunScriptPreviewAndWaitResultError>> {
4944    let local_var_configuration = configuration;
4945
4946    let local_var_client = &local_var_configuration.client;
4947
4948    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_wait_result/preview", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4949    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4950
4951    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4952        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4953    }
4954    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4955        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4956    };
4957    local_var_req_builder = local_var_req_builder.json(&preview);
4958
4959    let local_var_req = local_var_req_builder.build()?;
4960    let local_var_resp = local_var_client.execute(local_var_req).await?;
4961
4962    let local_var_status = local_var_resp.status();
4963    let local_var_content = local_var_resp.text().await?;
4964
4965    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4966        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4967    } else {
4968        let local_var_entity: Option<RunScriptPreviewAndWaitResultError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4969        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4970        Err(Error::ResponseError(local_var_error))
4971    }
4972}
4973
4974pub async fn run_script_preview_inline(configuration: &configuration::Configuration, workspace: &str, preview_inline: models::PreviewInline) -> Result<serde_json::Value, Error<RunScriptPreviewInlineError>> {
4975    let local_var_configuration = configuration;
4976
4977    let local_var_client = &local_var_configuration.client;
4978
4979    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_inline/preview", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4980    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4981
4982    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4983        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4984    }
4985    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4986        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4987    };
4988    local_var_req_builder = local_var_req_builder.json(&preview_inline);
4989
4990    let local_var_req = local_var_req_builder.build()?;
4991    let local_var_resp = local_var_client.execute(local_var_req).await?;
4992
4993    let local_var_status = local_var_resp.status();
4994    let local_var_content = local_var_resp.text().await?;
4995
4996    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4997        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4998    } else {
4999        let local_var_entity: Option<RunScriptPreviewInlineError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
5000        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5001        Err(Error::ResponseError(local_var_error))
5002    }
5003}
5004
5005pub async fn 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>, take_over: Option<bool>) -> Result<serde_json::Value, Error<RunWaitResultFlowByPathError>> {
5006    let local_var_configuration = configuration;
5007
5008    let local_var_client = &local_var_configuration.client;
5009
5010    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_wait_result/f/{path}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), path=crate::apis::urlencode(path));
5011    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
5012
5013    if let Some(ref local_var_str) = include_header {
5014        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
5015    }
5016    if let Some(ref local_var_str) = queue_limit {
5017        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
5018    }
5019    if let Some(ref local_var_str) = job_id {
5020        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
5021    }
5022    if let Some(ref local_var_str) = skip_preprocessor {
5023        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
5024    }
5025    if let Some(ref local_var_str) = memory_id {
5026        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
5027    }
5028    if let Some(ref local_var_str) = take_over {
5029        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
5030    }
5031    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5032        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5033    }
5034    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
5035        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
5036    };
5037    local_var_req_builder = local_var_req_builder.json(&request_body);
5038
5039    let local_var_req = local_var_req_builder.build()?;
5040    let local_var_resp = local_var_client.execute(local_var_req).await?;
5041
5042    let local_var_status = local_var_resp.status();
5043    let local_var_content = local_var_resp.text().await?;
5044
5045    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5046        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
5047    } else {
5048        let local_var_entity: Option<RunWaitResultFlowByPathError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
5049        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5050        Err(Error::ResponseError(local_var_error))
5051    }
5052}
5053
5054pub 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>, take_over: Option<bool>) -> Result<serde_json::Value, Error<RunWaitResultFlowByVersionError>> {
5055    let local_var_configuration = configuration;
5056
5057    let local_var_client = &local_var_configuration.client;
5058
5059    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);
5060    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
5061
5062    if let Some(ref local_var_str) = include_header {
5063        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
5064    }
5065    if let Some(ref local_var_str) = queue_limit {
5066        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
5067    }
5068    if let Some(ref local_var_str) = job_id {
5069        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
5070    }
5071    if let Some(ref local_var_str) = skip_preprocessor {
5072        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
5073    }
5074    if let Some(ref local_var_str) = memory_id {
5075        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
5076    }
5077    if let Some(ref local_var_str) = take_over {
5078        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
5079    }
5080    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5081        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5082    }
5083    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
5084        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
5085    };
5086    local_var_req_builder = local_var_req_builder.json(&request_body);
5087
5088    let local_var_req = local_var_req_builder.build()?;
5089    let local_var_resp = local_var_client.execute(local_var_req).await?;
5090
5091    let local_var_status = local_var_resp.status();
5092    let local_var_content = local_var_resp.text().await?;
5093
5094    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5095        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
5096    } else {
5097        let local_var_entity: Option<RunWaitResultFlowByVersionError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
5098        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5099        Err(Error::ResponseError(local_var_error))
5100    }
5101}
5102
5103pub 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>, take_over: Option<bool>) -> Result<serde_json::Value, Error<RunWaitResultFlowByVersionGetError>> {
5104    let local_var_configuration = configuration;
5105
5106    let local_var_client = &local_var_configuration.client;
5107
5108    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);
5109    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
5110
5111    if let Some(ref local_var_str) = include_header {
5112        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
5113    }
5114    if let Some(ref local_var_str) = queue_limit {
5115        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
5116    }
5117    if let Some(ref local_var_str) = payload {
5118        local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
5119    }
5120    if let Some(ref local_var_str) = job_id {
5121        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
5122    }
5123    if let Some(ref local_var_str) = skip_preprocessor {
5124        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
5125    }
5126    if let Some(ref local_var_str) = memory_id {
5127        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
5128    }
5129    if let Some(ref local_var_str) = take_over {
5130        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
5131    }
5132    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5133        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5134    }
5135    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
5136        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
5137    };
5138
5139    let local_var_req = local_var_req_builder.build()?;
5140    let local_var_resp = local_var_client.execute(local_var_req).await?;
5141
5142    let local_var_status = local_var_resp.status();
5143    let local_var_content = local_var_resp.text().await?;
5144
5145    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5146        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
5147    } else {
5148        let local_var_entity: Option<RunWaitResultFlowByVersionGetError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
5149        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5150        Err(Error::ResponseError(local_var_error))
5151    }
5152}
5153
5154pub 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>> {
5155    let local_var_configuration = configuration;
5156
5157    let local_var_client = &local_var_configuration.client;
5158
5159    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));
5160    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
5161
5162    if let Some(ref local_var_str) = parent_job {
5163        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
5164    }
5165    if let Some(ref local_var_str) = tag {
5166        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
5167    }
5168    if let Some(ref local_var_str) = cache_ttl {
5169        local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
5170    }
5171    if let Some(ref local_var_str) = job_id {
5172        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
5173    }
5174    if let Some(ref local_var_str) = include_header {
5175        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
5176    }
5177    if let Some(ref local_var_str) = queue_limit {
5178        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
5179    }
5180    if let Some(ref local_var_str) = skip_preprocessor {
5181        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
5182    }
5183    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5184        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5185    }
5186    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
5187        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
5188    };
5189    local_var_req_builder = local_var_req_builder.json(&request_body);
5190
5191    let local_var_req = local_var_req_builder.build()?;
5192    let local_var_resp = local_var_client.execute(local_var_req).await?;
5193
5194    let local_var_status = local_var_resp.status();
5195    let local_var_content = local_var_resp.text().await?;
5196
5197    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5198        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
5199    } else {
5200        let local_var_entity: Option<RunWaitResultScriptByPathError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
5201        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5202        Err(Error::ResponseError(local_var_error))
5203    }
5204}
5205
5206pub 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>> {
5207    let local_var_configuration = configuration;
5208
5209    let local_var_client = &local_var_configuration.client;
5210
5211    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));
5212    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
5213
5214    if let Some(ref local_var_str) = parent_job {
5215        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
5216    }
5217    if let Some(ref local_var_str) = tag {
5218        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
5219    }
5220    if let Some(ref local_var_str) = cache_ttl {
5221        local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
5222    }
5223    if let Some(ref local_var_str) = job_id {
5224        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
5225    }
5226    if let Some(ref local_var_str) = include_header {
5227        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
5228    }
5229    if let Some(ref local_var_str) = queue_limit {
5230        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
5231    }
5232    if let Some(ref local_var_str) = payload {
5233        local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
5234    }
5235    if let Some(ref local_var_str) = skip_preprocessor {
5236        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
5237    }
5238    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5239        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5240    }
5241    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
5242        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
5243    };
5244
5245    let local_var_req = local_var_req_builder.build()?;
5246    let local_var_resp = local_var_client.execute(local_var_req).await?;
5247
5248    let local_var_status = local_var_resp.status();
5249    let local_var_content = local_var_resp.text().await?;
5250
5251    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5252        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
5253    } else {
5254        let local_var_entity: Option<RunWaitResultScriptByPathGetError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
5255        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5256        Err(Error::ResponseError(local_var_error))
5257    }
5258}
5259
5260pub async fn set_flow_user_state(configuration: &configuration::Configuration, workspace: &str, id: &str, key: &str, body: Option<serde_json::Value>) -> Result<String, Error<SetFlowUserStateError>> {
5261    let local_var_configuration = configuration;
5262
5263    let local_var_client = &local_var_configuration.client;
5264
5265    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));
5266    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
5267
5268    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5269        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5270    }
5271    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
5272        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
5273    };
5274    local_var_req_builder = local_var_req_builder.json(&body);
5275
5276    let local_var_req = local_var_req_builder.build()?;
5277    let local_var_resp = local_var_client.execute(local_var_req).await?;
5278
5279    let local_var_status = local_var_resp.status();
5280    let local_var_content = local_var_resp.text().await?;
5281
5282    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5283        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
5284    } else {
5285        let local_var_entity: Option<SetFlowUserStateError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
5286        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5287        Err(Error::ResponseError(local_var_error))
5288    }
5289}
5290
5291pub async fn unhide_recent_run_items(configuration: &configuration::Configuration, workspace: &str, recent_run_item_refs: models::RecentRunItemRefs) -> Result<String, Error<UnhideRecentRunItemsError>> {
5292    let local_var_configuration = configuration;
5293
5294    let local_var_client = &local_var_configuration.client;
5295
5296    let local_var_uri_str = format!("{}/w/{workspace}/jobs/recent_runs/unhide", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
5297    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
5298
5299    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5300        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5301    }
5302    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
5303        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
5304    };
5305    local_var_req_builder = local_var_req_builder.json(&recent_run_item_refs);
5306
5307    let local_var_req = local_var_req_builder.build()?;
5308    let local_var_resp = local_var_client.execute(local_var_req).await?;
5309
5310    let local_var_status = local_var_resp.status();
5311    let local_var_content = local_var_resp.text().await?;
5312
5313    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5314        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
5315    } else {
5316        let local_var_entity: Option<UnhideRecentRunItemsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
5317        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5318        Err(Error::ResponseError(local_var_error))
5319    }
5320}
5321
5322pub async fn unresolve_completed_jobs(configuration: &configuration::Configuration, workspace: &str, unresolve_completed_jobs_request: models::UnresolveCompletedJobsRequest) -> Result<Vec<uuid::Uuid>, Error<UnresolveCompletedJobsError>> {
5323    let local_var_configuration = configuration;
5324
5325    let local_var_client = &local_var_configuration.client;
5326
5327    let local_var_uri_str = format!("{}/w/{workspace}/jobs/completed/unresolve", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
5328    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
5329
5330    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5331        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5332    }
5333    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
5334        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
5335    };
5336    local_var_req_builder = local_var_req_builder.json(&unresolve_completed_jobs_request);
5337
5338    let local_var_req = local_var_req_builder.build()?;
5339    let local_var_resp = local_var_client.execute(local_var_req).await?;
5340
5341    let local_var_status = local_var_resp.status();
5342    let local_var_content = local_var_resp.text().await?;
5343
5344    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5345        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
5346    } else {
5347        let local_var_entity: Option<UnresolveCompletedJobsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
5348        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5349        Err(Error::ResponseError(local_var_error))
5350    }
5351}
5352
5353/// True once the worker running the job has received its shutdown signal. The worker still waits for the job to finish, so a long-running job can poll this to exit early. False when the job is not currently running on a worker. 
5354pub async fn worker_is_draining(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<bool, Error<WorkerIsDrainingError>> {
5355    let local_var_configuration = configuration;
5356
5357    let local_var_client = &local_var_configuration.client;
5358
5359    let local_var_uri_str = format!("{}/w/{workspace}/jobs/worker_is_draining/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
5360    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
5361
5362    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5363        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5364    }
5365    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
5366        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
5367    };
5368
5369    let local_var_req = local_var_req_builder.build()?;
5370    let local_var_resp = local_var_client.execute(local_var_req).await?;
5371
5372    let local_var_status = local_var_resp.status();
5373    let local_var_content = local_var_resp.text().await?;
5374
5375    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5376        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
5377    } else {
5378        let local_var_entity: Option<WorkerIsDrainingError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
5379        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5380        Err(Error::ResponseError(local_var_error))
5381    }
5382}
5383