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