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