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