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.876.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>, has_null_parent: Option<bool>, 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) = has_null_parent {
3105        local_var_req_builder = local_var_req_builder.query(&[("has_null_parent", &local_var_str.to_string())]);
3106    }
3107    if let Some(ref local_var_str) = all_workspaces {
3108        local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
3109    }
3110    if let Some(ref local_var_str) = is_not_schedule {
3111        local_var_req_builder = local_var_req_builder.query(&[("is_not_schedule", &local_var_str.to_string())]);
3112    }
3113    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3114        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3115    }
3116    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3117        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3118    };
3119
3120    let local_var_req = local_var_req_builder.build()?;
3121    let local_var_resp = local_var_client.execute(local_var_req).await?;
3122
3123    let local_var_status = local_var_resp.status();
3124    let local_var_content = local_var_resp.text().await?;
3125
3126    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3127        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3128    } else {
3129        let local_var_entity: Option<ListFilteredQueueUuidsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3130        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3131        Err(Error::ResponseError(local_var_error))
3132    }
3133}
3134
3135pub 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>> {
3136    let local_var_configuration = configuration;
3137
3138    let local_var_client = &local_var_configuration.client;
3139
3140    let local_var_uri_str = format!("{}/w/{workspace}/jobs/list", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3141    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3142
3143    if let Some(ref local_var_str) = created_by {
3144        local_var_req_builder = local_var_req_builder.query(&[("created_by", &local_var_str.to_string())]);
3145    }
3146    if let Some(ref local_var_str) = label {
3147        local_var_req_builder = local_var_req_builder.query(&[("label", &local_var_str.to_string())]);
3148    }
3149    if let Some(ref local_var_str) = worker {
3150        local_var_req_builder = local_var_req_builder.query(&[("worker", &local_var_str.to_string())]);
3151    }
3152    if let Some(ref local_var_str) = parent_job {
3153        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
3154    }
3155    if let Some(ref local_var_str) = script_path_exact {
3156        local_var_req_builder = local_var_req_builder.query(&[("script_path_exact", &local_var_str.to_string())]);
3157    }
3158    if let Some(ref local_var_str) = script_path_start {
3159        local_var_req_builder = local_var_req_builder.query(&[("script_path_start", &local_var_str.to_string())]);
3160    }
3161    if let Some(ref local_var_str) = schedule_path {
3162        local_var_req_builder = local_var_req_builder.query(&[("schedule_path", &local_var_str.to_string())]);
3163    }
3164    if let Some(ref local_var_str) = script_hash {
3165        local_var_req_builder = local_var_req_builder.query(&[("script_hash", &local_var_str.to_string())]);
3166    }
3167    if let Some(ref local_var_str) = started_before {
3168        local_var_req_builder = local_var_req_builder.query(&[("started_before", &local_var_str.to_string())]);
3169    }
3170    if let Some(ref local_var_str) = started_after {
3171        local_var_req_builder = local_var_req_builder.query(&[("started_after", &local_var_str.to_string())]);
3172    }
3173    if let Some(ref local_var_str) = created_before {
3174        local_var_req_builder = local_var_req_builder.query(&[("created_before", &local_var_str.to_string())]);
3175    }
3176    if let Some(ref local_var_str) = created_after {
3177        local_var_req_builder = local_var_req_builder.query(&[("created_after", &local_var_str.to_string())]);
3178    }
3179    if let Some(ref local_var_str) = completed_before {
3180        local_var_req_builder = local_var_req_builder.query(&[("completed_before", &local_var_str.to_string())]);
3181    }
3182    if let Some(ref local_var_str) = completed_after {
3183        local_var_req_builder = local_var_req_builder.query(&[("completed_after", &local_var_str.to_string())]);
3184    }
3185    if let Some(ref local_var_str) = created_before_queue {
3186        local_var_req_builder = local_var_req_builder.query(&[("created_before_queue", &local_var_str.to_string())]);
3187    }
3188    if let Some(ref local_var_str) = created_after_queue {
3189        local_var_req_builder = local_var_req_builder.query(&[("created_after_queue", &local_var_str.to_string())]);
3190    }
3191    if let Some(ref local_var_str) = running {
3192        local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
3193    }
3194    if let Some(ref local_var_str) = scheduled_for_before_now {
3195        local_var_req_builder = local_var_req_builder.query(&[("scheduled_for_before_now", &local_var_str.to_string())]);
3196    }
3197    if let Some(ref local_var_str) = job_kinds {
3198        local_var_req_builder = local_var_req_builder.query(&[("job_kinds", &local_var_str.to_string())]);
3199    }
3200    if let Some(ref local_var_str) = suspended {
3201        local_var_req_builder = local_var_req_builder.query(&[("suspended", &local_var_str.to_string())]);
3202    }
3203    if let Some(ref local_var_str) = args {
3204        local_var_req_builder = local_var_req_builder.query(&[("args", &local_var_str.to_string())]);
3205    }
3206    if let Some(ref local_var_str) = tag {
3207        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
3208    }
3209    if let Some(ref local_var_str) = result {
3210        local_var_req_builder = local_var_req_builder.query(&[("result", &local_var_str.to_string())]);
3211    }
3212    if let Some(ref local_var_str) = allow_wildcards {
3213        local_var_req_builder = local_var_req_builder.query(&[("allow_wildcards", &local_var_str.to_string())]);
3214    }
3215    if let Some(ref local_var_str) = per_page {
3216        local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3217    }
3218    if let Some(ref local_var_str) = trigger_kind {
3219        local_var_req_builder = local_var_req_builder.query(&[("trigger_kind", &local_var_str.to_string())]);
3220    }
3221    if let Some(ref local_var_str) = is_skipped {
3222        local_var_req_builder = local_var_req_builder.query(&[("is_skipped", &local_var_str.to_string())]);
3223    }
3224    if let Some(ref local_var_str) = resolved {
3225        local_var_req_builder = local_var_req_builder.query(&[("resolved", &local_var_str.to_string())]);
3226    }
3227    if let Some(ref local_var_str) = is_flow_step {
3228        local_var_req_builder = local_var_req_builder.query(&[("is_flow_step", &local_var_str.to_string())]);
3229    }
3230    if let Some(ref local_var_str) = has_null_parent {
3231        local_var_req_builder = local_var_req_builder.query(&[("has_null_parent", &local_var_str.to_string())]);
3232    }
3233    if let Some(ref local_var_str) = success {
3234        local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
3235    }
3236    if let Some(ref local_var_str) = status {
3237        local_var_req_builder = local_var_req_builder.query(&[("status", &local_var_str.to_string())]);
3238    }
3239    if let Some(ref local_var_str) = all_workspaces {
3240        local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
3241    }
3242    if let Some(ref local_var_str) = is_not_schedule {
3243        local_var_req_builder = local_var_req_builder.query(&[("is_not_schedule", &local_var_str.to_string())]);
3244    }
3245    if let Some(ref local_var_str) = excludes_entrypoint_override {
3246        local_var_req_builder = local_var_req_builder.query(&[("excludes_entrypoint_override", &local_var_str.to_string())]);
3247    }
3248    if let Some(ref local_var_str) = broad_filter {
3249        local_var_req_builder = local_var_req_builder.query(&[("broad_filter", &local_var_str.to_string())]);
3250    }
3251    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3252        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3253    }
3254    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3255        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3256    };
3257
3258    let local_var_req = local_var_req_builder.build()?;
3259    let local_var_resp = local_var_client.execute(local_var_req).await?;
3260
3261    let local_var_status = local_var_resp.status();
3262    let local_var_content = local_var_resp.text().await?;
3263
3264    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3265        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3266    } else {
3267        let local_var_entity: Option<ListJobsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3268        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3269        Err(Error::ResponseError(local_var_error))
3270    }
3271}
3272
3273pub 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>> {
3274    let local_var_configuration = configuration;
3275
3276    let local_var_client = &local_var_configuration.client;
3277
3278    let local_var_uri_str = format!("{}/w/{workspace}/jobs/queue/list", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3279    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3280
3281    if let Some(ref local_var_str) = order_desc {
3282        local_var_req_builder = local_var_req_builder.query(&[("order_desc", &local_var_str.to_string())]);
3283    }
3284    if let Some(ref local_var_str) = created_by {
3285        local_var_req_builder = local_var_req_builder.query(&[("created_by", &local_var_str.to_string())]);
3286    }
3287    if let Some(ref local_var_str) = parent_job {
3288        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
3289    }
3290    if let Some(ref local_var_str) = worker {
3291        local_var_req_builder = local_var_req_builder.query(&[("worker", &local_var_str.to_string())]);
3292    }
3293    if let Some(ref local_var_str) = script_path_exact {
3294        local_var_req_builder = local_var_req_builder.query(&[("script_path_exact", &local_var_str.to_string())]);
3295    }
3296    if let Some(ref local_var_str) = script_path_start {
3297        local_var_req_builder = local_var_req_builder.query(&[("script_path_start", &local_var_str.to_string())]);
3298    }
3299    if let Some(ref local_var_str) = schedule_path {
3300        local_var_req_builder = local_var_req_builder.query(&[("schedule_path", &local_var_str.to_string())]);
3301    }
3302    if let Some(ref local_var_str) = trigger_path {
3303        local_var_req_builder = local_var_req_builder.query(&[("trigger_path", &local_var_str.to_string())]);
3304    }
3305    if let Some(ref local_var_str) = trigger_kind {
3306        local_var_req_builder = local_var_req_builder.query(&[("trigger_kind", &local_var_str.to_string())]);
3307    }
3308    if let Some(ref local_var_str) = script_hash {
3309        local_var_req_builder = local_var_req_builder.query(&[("script_hash", &local_var_str.to_string())]);
3310    }
3311    if let Some(ref local_var_str) = started_before {
3312        local_var_req_builder = local_var_req_builder.query(&[("started_before", &local_var_str.to_string())]);
3313    }
3314    if let Some(ref local_var_str) = started_after {
3315        local_var_req_builder = local_var_req_builder.query(&[("started_after", &local_var_str.to_string())]);
3316    }
3317    if let Some(ref local_var_str) = success {
3318        local_var_req_builder = local_var_req_builder.query(&[("success", &local_var_str.to_string())]);
3319    }
3320    if let Some(ref local_var_str) = scheduled_for_before_now {
3321        local_var_req_builder = local_var_req_builder.query(&[("scheduled_for_before_now", &local_var_str.to_string())]);
3322    }
3323    if let Some(ref local_var_str) = job_kinds {
3324        local_var_req_builder = local_var_req_builder.query(&[("job_kinds", &local_var_str.to_string())]);
3325    }
3326    if let Some(ref local_var_str) = suspended {
3327        local_var_req_builder = local_var_req_builder.query(&[("suspended", &local_var_str.to_string())]);
3328    }
3329    if let Some(ref local_var_str) = running {
3330        local_var_req_builder = local_var_req_builder.query(&[("running", &local_var_str.to_string())]);
3331    }
3332    if let Some(ref local_var_str) = args {
3333        local_var_req_builder = local_var_req_builder.query(&[("args", &local_var_str.to_string())]);
3334    }
3335    if let Some(ref local_var_str) = result {
3336        local_var_req_builder = local_var_req_builder.query(&[("result", &local_var_str.to_string())]);
3337    }
3338    if let Some(ref local_var_str) = allow_wildcards {
3339        local_var_req_builder = local_var_req_builder.query(&[("allow_wildcards", &local_var_str.to_string())]);
3340    }
3341    if let Some(ref local_var_str) = tag {
3342        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
3343    }
3344    if let Some(ref local_var_str) = page {
3345        local_var_req_builder = local_var_req_builder.query(&[("page", &local_var_str.to_string())]);
3346    }
3347    if let Some(ref local_var_str) = per_page {
3348        local_var_req_builder = local_var_req_builder.query(&[("per_page", &local_var_str.to_string())]);
3349    }
3350    if let Some(ref local_var_str) = all_workspaces {
3351        local_var_req_builder = local_var_req_builder.query(&[("all_workspaces", &local_var_str.to_string())]);
3352    }
3353    if let Some(ref local_var_str) = is_not_schedule {
3354        local_var_req_builder = local_var_req_builder.query(&[("is_not_schedule", &local_var_str.to_string())]);
3355    }
3356    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3357        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3358    }
3359    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3360        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3361    };
3362
3363    let local_var_req = local_var_req_builder.build()?;
3364    let local_var_resp = local_var_client.execute(local_var_req).await?;
3365
3366    let local_var_status = local_var_resp.status();
3367    let local_var_content = local_var_resp.text().await?;
3368
3369    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3370        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3371    } else {
3372        let local_var_entity: Option<ListQueueError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3373        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3374        Err(Error::ResponseError(local_var_error))
3375    }
3376}
3377
3378pub async fn list_recent_runs(configuration: &configuration::Configuration, workspace: &str, folder: Option<&str>, failed_ids_kind: Option<&str>, failed_ids_path: Option<&str>) -> Result<models::ListRecentRuns200Response, Error<ListRecentRunsError>> {
3379    let local_var_configuration = configuration;
3380
3381    let local_var_client = &local_var_configuration.client;
3382
3383    let local_var_uri_str = format!("{}/w/{workspace}/jobs/recent_runs", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3384    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3385
3386    if let Some(ref local_var_str) = folder {
3387        local_var_req_builder = local_var_req_builder.query(&[("folder", &local_var_str.to_string())]);
3388    }
3389    if let Some(ref local_var_str) = failed_ids_kind {
3390        local_var_req_builder = local_var_req_builder.query(&[("failed_ids_kind", &local_var_str.to_string())]);
3391    }
3392    if let Some(ref local_var_str) = failed_ids_path {
3393        local_var_req_builder = local_var_req_builder.query(&[("failed_ids_path", &local_var_str.to_string())]);
3394    }
3395    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3396        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3397    }
3398    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3399        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3400    };
3401
3402    let local_var_req = local_var_req_builder.build()?;
3403    let local_var_resp = local_var_client.execute(local_var_req).await?;
3404
3405    let local_var_status = local_var_resp.status();
3406    let local_var_content = local_var_resp.text().await?;
3407
3408    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3409        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3410    } else {
3411        let local_var_entity: Option<ListRecentRunsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3412        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3413        Err(Error::ResponseError(local_var_error))
3414    }
3415}
3416
3417/// 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. 
3418pub async fn list_run_assets(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<models::ListRunAssets200Response, Error<ListRunAssetsError>> {
3419    let local_var_configuration = configuration;
3420
3421    let local_var_client = &local_var_configuration.client;
3422
3423    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));
3424    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3425
3426    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3427        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3428    }
3429    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3430        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3431    };
3432
3433    let local_var_req = local_var_req_builder.build()?;
3434    let local_var_resp = local_var_client.execute(local_var_req).await?;
3435
3436    let local_var_status = local_var_resp.status();
3437    let local_var_content = local_var_resp.text().await?;
3438
3439    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3440        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3441    } else {
3442        let local_var_entity: Option<ListRunAssetsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3443        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3444        Err(Error::ResponseError(local_var_error))
3445    }
3446}
3447
3448pub async fn list_selected_job_groups(configuration: &configuration::Configuration, workspace: &str, uuid_colon_colon_uuid: Vec<uuid::Uuid>) -> Result<Vec<models::ListSelectedJobGroups200ResponseInner>, Error<ListSelectedJobGroupsError>> {
3449    let local_var_configuration = configuration;
3450
3451    let local_var_client = &local_var_configuration.client;
3452
3453    let local_var_uri_str = format!("{}/w/{workspace}/jobs/list_selected_job_groups", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3454    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3455
3456    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3457        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3458    }
3459    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3460        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3461    };
3462    local_var_req_builder = local_var_req_builder.json(&uuid_colon_colon_uuid);
3463
3464    let local_var_req = local_var_req_builder.build()?;
3465    let local_var_resp = local_var_client.execute(local_var_req).await?;
3466
3467    let local_var_status = local_var_resp.status();
3468    let local_var_content = local_var_resp.text().await?;
3469
3470    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3471        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3472    } else {
3473        let local_var_entity: Option<ListSelectedJobGroupsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3474        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3475        Err(Error::ResponseError(local_var_error))
3476    }
3477}
3478
3479/// 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.
3480pub async fn resolve_completed_jobs(configuration: &configuration::Configuration, workspace: &str, resolve_completed_jobs_request: models::ResolveCompletedJobsRequest) -> Result<Vec<uuid::Uuid>, Error<ResolveCompletedJobsError>> {
3481    let local_var_configuration = configuration;
3482
3483    let local_var_client = &local_var_configuration.client;
3484
3485    let local_var_uri_str = format!("{}/w/{workspace}/jobs/completed/resolve", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
3486    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3487
3488    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3489        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3490    }
3491    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3492        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3493    };
3494    local_var_req_builder = local_var_req_builder.json(&resolve_completed_jobs_request);
3495
3496    let local_var_req = local_var_req_builder.build()?;
3497    let local_var_resp = local_var_client.execute(local_var_req).await?;
3498
3499    let local_var_status = local_var_resp.status();
3500    let local_var_content = local_var_resp.text().await?;
3501
3502    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3503        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3504    } else {
3505        let local_var_entity: Option<ResolveCompletedJobsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3506        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3507        Err(Error::ResponseError(local_var_error))
3508    }
3509}
3510
3511pub 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>> {
3512    let local_var_configuration = configuration;
3513
3514    let local_var_client = &local_var_configuration.client;
3515
3516    let local_var_uri_str = format!("{}/w/{workspace}/jobs/restart/f/{id}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), id=crate::apis::urlencode(id));
3517    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3518
3519    if let Some(ref local_var_str) = scheduled_for {
3520        local_var_req_builder = local_var_req_builder.query(&[("scheduled_for", &local_var_str.to_string())]);
3521    }
3522    if let Some(ref local_var_str) = scheduled_in_secs {
3523        local_var_req_builder = local_var_req_builder.query(&[("scheduled_in_secs", &local_var_str.to_string())]);
3524    }
3525    if let Some(ref local_var_str) = parent_job {
3526        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
3527    }
3528    if let Some(ref local_var_str) = tag {
3529        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
3530    }
3531    if let Some(ref local_var_str) = job_id {
3532        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3533    }
3534    if let Some(ref local_var_str) = include_header {
3535        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3536    }
3537    if let Some(ref local_var_str) = invisible_to_owner {
3538        local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
3539    }
3540    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3541        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3542    }
3543    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3544        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3545    };
3546    local_var_req_builder = local_var_req_builder.json(&restart_flow_at_step_request);
3547
3548    let local_var_req = local_var_req_builder.build()?;
3549    let local_var_resp = local_var_client.execute(local_var_req).await?;
3550
3551    let local_var_status = local_var_resp.status();
3552    let local_var_content = local_var_resp.text().await?;
3553
3554    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3555        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3556    } else {
3557        let local_var_entity: Option<RestartFlowAtStepError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3558        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3559        Err(Error::ResponseError(local_var_error))
3560    }
3561}
3562
3563pub async fn result_by_id(configuration: &configuration::Configuration, workspace: &str, flow_job_id: &str, node_id: &str) -> Result<serde_json::Value, Error<ResultByIdError>> {
3564    let local_var_configuration = configuration;
3565
3566    let local_var_client = &local_var_configuration.client;
3567
3568    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));
3569    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3570
3571    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3572        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3573    }
3574    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3575        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3576    };
3577
3578    let local_var_req = local_var_req_builder.build()?;
3579    let local_var_resp = local_var_client.execute(local_var_req).await?;
3580
3581    let local_var_status = local_var_resp.status();
3582    let local_var_content = local_var_resp.text().await?;
3583
3584    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3585        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3586    } else {
3587        let local_var_entity: Option<ResultByIdError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3588        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3589        Err(Error::ResponseError(local_var_error))
3590    }
3591}
3592
3593/// 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. 
3594pub async fn resume_suspended(configuration: &configuration::Configuration, workspace: &str, job_id: &str, resume_suspended_request: models::ResumeSuspendedRequest) -> Result<String, Error<ResumeSuspendedError>> {
3595    let local_var_configuration = configuration;
3596
3597    let local_var_client = &local_var_configuration.client;
3598
3599    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));
3600    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3601
3602    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3603        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3604    }
3605    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3606        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3607    };
3608    local_var_req_builder = local_var_req_builder.json(&resume_suspended_request);
3609
3610    let local_var_req = local_var_req_builder.build()?;
3611    let local_var_resp = local_var_client.execute(local_var_req).await?;
3612
3613    let local_var_status = local_var_resp.status();
3614    let local_var_content = local_var_resp.text().await?;
3615
3616    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3617        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3618    } else {
3619        let local_var_entity: Option<ResumeSuspendedError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3620        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3621        Err(Error::ResponseError(local_var_error))
3622    }
3623}
3624
3625pub async fn resume_suspended_flow_as_owner(configuration: &configuration::Configuration, workspace: &str, id: &str, body: serde_json::Value) -> Result<String, Error<ResumeSuspendedFlowAsOwnerError>> {
3626    let local_var_configuration = configuration;
3627
3628    let local_var_client = &local_var_configuration.client;
3629
3630    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));
3631    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3632
3633    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3634        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3635    }
3636    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3637        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3638    };
3639    local_var_req_builder = local_var_req_builder.json(&body);
3640
3641    let local_var_req = local_var_req_builder.build()?;
3642    let local_var_resp = local_var_client.execute(local_var_req).await?;
3643
3644    let local_var_status = local_var_resp.status();
3645    let local_var_content = local_var_resp.text().await?;
3646
3647    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3648        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3649    } else {
3650        let local_var_entity: Option<ResumeSuspendedFlowAsOwnerError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3651        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3652        Err(Error::ResponseError(local_var_error))
3653    }
3654}
3655
3656pub async fn 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>> {
3657    let local_var_configuration = configuration;
3658
3659    let local_var_client = &local_var_configuration.client;
3660
3661    let local_var_uri_str = format!("{}/w/{workspace}/jobs_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));
3662    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3663
3664    if let Some(ref local_var_str) = payload {
3665        local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
3666    }
3667    if let Some(ref local_var_str) = approver {
3668        local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
3669    }
3670    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3671        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3672    }
3673    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3674        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3675    };
3676
3677    let local_var_req = local_var_req_builder.build()?;
3678    let local_var_resp = local_var_client.execute(local_var_req).await?;
3679
3680    let local_var_status = local_var_resp.status();
3681    let local_var_content = local_var_resp.text().await?;
3682
3683    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3684        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3685    } else {
3686        let local_var_entity: Option<ResumeSuspendedJobGetError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3687        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3688        Err(Error::ResponseError(local_var_error))
3689    }
3690}
3691
3692pub 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>> {
3693    let local_var_configuration = configuration;
3694
3695    let local_var_client = &local_var_configuration.client;
3696
3697    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));
3698    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3699
3700    if let Some(ref local_var_str) = approver {
3701        local_var_req_builder = local_var_req_builder.query(&[("approver", &local_var_str.to_string())]);
3702    }
3703    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3704        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3705    }
3706    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3707        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3708    };
3709    local_var_req_builder = local_var_req_builder.json(&body);
3710
3711    let local_var_req = local_var_req_builder.build()?;
3712    let local_var_resp = local_var_client.execute(local_var_req).await?;
3713
3714    let local_var_status = local_var_resp.status();
3715    let local_var_content = local_var_resp.text().await?;
3716
3717    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3718        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3719    } else {
3720        let local_var_entity: Option<ResumeSuspendedJobPostError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3721        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3722        Err(Error::ResponseError(local_var_error))
3723    }
3724}
3725
3726/// 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. 
3727pub async fn run_agent(configuration: &configuration::Configuration, workspace: &str, path: &str, run_agent_request: models::RunAgentRequest, memory_id: Option<&str>, take_over: Option<bool>) -> Result<uuid::Uuid, Error<RunAgentError>> {
3728    let local_var_configuration = configuration;
3729
3730    let local_var_client = &local_var_configuration.client;
3731
3732    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));
3733    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3734
3735    if let Some(ref local_var_str) = memory_id {
3736        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
3737    }
3738    if let Some(ref local_var_str) = take_over {
3739        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
3740    }
3741    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3742        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3743    }
3744    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3745        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3746    };
3747    local_var_req_builder = local_var_req_builder.json(&run_agent_request);
3748
3749    let local_var_req = local_var_req_builder.build()?;
3750    let local_var_resp = local_var_client.execute(local_var_req).await?;
3751
3752    let local_var_status = local_var_resp.status();
3753    let local_var_content = local_var_resp.text().await?;
3754
3755    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3756        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3757    } else {
3758        let local_var_entity: Option<RunAgentError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3759        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3760        Err(Error::ResponseError(local_var_error))
3761    }
3762}
3763
3764pub async fn run_and_stream_flow_by_path(configuration: &configuration::Configuration, workspace: &str, path: &str, request_body: std::collections::HashMap<String, serde_json::Value>, include_header: Option<&str>, queue_limit: Option<&str>, job_id: Option<&str>, skip_preprocessor: Option<bool>, memory_id: Option<&str>, take_over: Option<bool>, poll_delay_ms: Option<i64>) -> Result<String, Error<RunAndStreamFlowByPathError>> {
3765    let local_var_configuration = configuration;
3766
3767    let local_var_client = &local_var_configuration.client;
3768
3769    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));
3770    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3771
3772    if let Some(ref local_var_str) = include_header {
3773        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3774    }
3775    if let Some(ref local_var_str) = queue_limit {
3776        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
3777    }
3778    if let Some(ref local_var_str) = job_id {
3779        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3780    }
3781    if let Some(ref local_var_str) = skip_preprocessor {
3782        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
3783    }
3784    if let Some(ref local_var_str) = memory_id {
3785        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
3786    }
3787    if let Some(ref local_var_str) = take_over {
3788        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
3789    }
3790    if let Some(ref local_var_str) = poll_delay_ms {
3791        local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
3792    }
3793    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3794        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3795    }
3796    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3797        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3798    };
3799    local_var_req_builder = local_var_req_builder.json(&request_body);
3800
3801    let local_var_req = local_var_req_builder.build()?;
3802    let local_var_resp = local_var_client.execute(local_var_req).await?;
3803
3804    let local_var_status = local_var_resp.status();
3805    let local_var_content = local_var_resp.text().await?;
3806
3807    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3808        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3809    } else {
3810        let local_var_entity: Option<RunAndStreamFlowByPathError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3811        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3812        Err(Error::ResponseError(local_var_error))
3813    }
3814}
3815
3816pub async fn run_and_stream_flow_by_path_get(configuration: &configuration::Configuration, workspace: &str, path: &str, include_header: Option<&str>, queue_limit: Option<&str>, payload: Option<&str>, job_id: Option<&str>, skip_preprocessor: Option<bool>, memory_id: Option<&str>, take_over: Option<bool>, poll_delay_ms: Option<i64>) -> Result<String, Error<RunAndStreamFlowByPathGetError>> {
3817    let local_var_configuration = configuration;
3818
3819    let local_var_client = &local_var_configuration.client;
3820
3821    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));
3822    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3823
3824    if let Some(ref local_var_str) = include_header {
3825        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3826    }
3827    if let Some(ref local_var_str) = queue_limit {
3828        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
3829    }
3830    if let Some(ref local_var_str) = payload {
3831        local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
3832    }
3833    if let Some(ref local_var_str) = job_id {
3834        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3835    }
3836    if let Some(ref local_var_str) = skip_preprocessor {
3837        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
3838    }
3839    if let Some(ref local_var_str) = memory_id {
3840        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
3841    }
3842    if let Some(ref local_var_str) = take_over {
3843        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
3844    }
3845    if let Some(ref local_var_str) = poll_delay_ms {
3846        local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
3847    }
3848    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3849        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3850    }
3851    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3852        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3853    };
3854
3855    let local_var_req = local_var_req_builder.build()?;
3856    let local_var_resp = local_var_client.execute(local_var_req).await?;
3857
3858    let local_var_status = local_var_resp.status();
3859    let local_var_content = local_var_resp.text().await?;
3860
3861    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3862        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3863    } else {
3864        let local_var_entity: Option<RunAndStreamFlowByPathGetError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3865        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3866        Err(Error::ResponseError(local_var_error))
3867    }
3868}
3869
3870pub async fn run_and_stream_flow_by_version(configuration: &configuration::Configuration, workspace: &str, version: i64, request_body: std::collections::HashMap<String, serde_json::Value>, include_header: Option<&str>, queue_limit: Option<&str>, job_id: Option<&str>, skip_preprocessor: Option<bool>, memory_id: Option<&str>, take_over: Option<bool>, poll_delay_ms: Option<i64>) -> Result<String, Error<RunAndStreamFlowByVersionError>> {
3871    let local_var_configuration = configuration;
3872
3873    let local_var_client = &local_var_configuration.client;
3874
3875    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);
3876    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3877
3878    if let Some(ref local_var_str) = include_header {
3879        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3880    }
3881    if let Some(ref local_var_str) = queue_limit {
3882        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
3883    }
3884    if let Some(ref local_var_str) = job_id {
3885        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3886    }
3887    if let Some(ref local_var_str) = skip_preprocessor {
3888        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
3889    }
3890    if let Some(ref local_var_str) = memory_id {
3891        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
3892    }
3893    if let Some(ref local_var_str) = take_over {
3894        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
3895    }
3896    if let Some(ref local_var_str) = poll_delay_ms {
3897        local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
3898    }
3899    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3900        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3901    }
3902    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3903        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3904    };
3905    local_var_req_builder = local_var_req_builder.json(&request_body);
3906
3907    let local_var_req = local_var_req_builder.build()?;
3908    let local_var_resp = local_var_client.execute(local_var_req).await?;
3909
3910    let local_var_status = local_var_resp.status();
3911    let local_var_content = local_var_resp.text().await?;
3912
3913    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3914        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3915    } else {
3916        let local_var_entity: Option<RunAndStreamFlowByVersionError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3917        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3918        Err(Error::ResponseError(local_var_error))
3919    }
3920}
3921
3922pub async fn run_and_stream_flow_by_version_get(configuration: &configuration::Configuration, workspace: &str, version: i64, include_header: Option<&str>, queue_limit: Option<&str>, payload: Option<&str>, job_id: Option<&str>, skip_preprocessor: Option<bool>, memory_id: Option<&str>, take_over: Option<bool>, poll_delay_ms: Option<i64>) -> Result<String, Error<RunAndStreamFlowByVersionGetError>> {
3923    let local_var_configuration = configuration;
3924
3925    let local_var_client = &local_var_configuration.client;
3926
3927    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);
3928    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
3929
3930    if let Some(ref local_var_str) = include_header {
3931        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3932    }
3933    if let Some(ref local_var_str) = queue_limit {
3934        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
3935    }
3936    if let Some(ref local_var_str) = payload {
3937        local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
3938    }
3939    if let Some(ref local_var_str) = job_id {
3940        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3941    }
3942    if let Some(ref local_var_str) = skip_preprocessor {
3943        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
3944    }
3945    if let Some(ref local_var_str) = memory_id {
3946        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
3947    }
3948    if let Some(ref local_var_str) = take_over {
3949        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
3950    }
3951    if let Some(ref local_var_str) = poll_delay_ms {
3952        local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
3953    }
3954    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
3955        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
3956    }
3957    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
3958        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
3959    };
3960
3961    let local_var_req = local_var_req_builder.build()?;
3962    let local_var_resp = local_var_client.execute(local_var_req).await?;
3963
3964    let local_var_status = local_var_resp.status();
3965    let local_var_content = local_var_resp.text().await?;
3966
3967    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
3968        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
3969    } else {
3970        let local_var_entity: Option<RunAndStreamFlowByVersionGetError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
3971        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
3972        Err(Error::ResponseError(local_var_error))
3973    }
3974}
3975
3976pub 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>> {
3977    let local_var_configuration = configuration;
3978
3979    let local_var_client = &local_var_configuration.client;
3980
3981    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));
3982    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
3983
3984    if let Some(ref local_var_str) = parent_job {
3985        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
3986    }
3987    if let Some(ref local_var_str) = tag {
3988        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
3989    }
3990    if let Some(ref local_var_str) = cache_ttl {
3991        local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
3992    }
3993    if let Some(ref local_var_str) = job_id {
3994        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
3995    }
3996    if let Some(ref local_var_str) = include_header {
3997        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
3998    }
3999    if let Some(ref local_var_str) = queue_limit {
4000        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
4001    }
4002    if let Some(ref local_var_str) = skip_preprocessor {
4003        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
4004    }
4005    if let Some(ref local_var_str) = poll_delay_ms {
4006        local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
4007    }
4008    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4009        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4010    }
4011    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4012        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4013    };
4014    local_var_req_builder = local_var_req_builder.json(&request_body);
4015
4016    let local_var_req = local_var_req_builder.build()?;
4017    let local_var_resp = local_var_client.execute(local_var_req).await?;
4018
4019    let local_var_status = local_var_resp.status();
4020    let local_var_content = local_var_resp.text().await?;
4021
4022    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4023        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4024    } else {
4025        let local_var_entity: Option<RunAndStreamScriptByHashError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4026        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4027        Err(Error::ResponseError(local_var_error))
4028    }
4029}
4030
4031pub 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>> {
4032    let local_var_configuration = configuration;
4033
4034    let local_var_client = &local_var_configuration.client;
4035
4036    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));
4037    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4038
4039    if let Some(ref local_var_str) = parent_job {
4040        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
4041    }
4042    if let Some(ref local_var_str) = tag {
4043        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
4044    }
4045    if let Some(ref local_var_str) = cache_ttl {
4046        local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
4047    }
4048    if let Some(ref local_var_str) = job_id {
4049        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4050    }
4051    if let Some(ref local_var_str) = include_header {
4052        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
4053    }
4054    if let Some(ref local_var_str) = queue_limit {
4055        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
4056    }
4057    if let Some(ref local_var_str) = payload {
4058        local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
4059    }
4060    if let Some(ref local_var_str) = skip_preprocessor {
4061        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
4062    }
4063    if let Some(ref local_var_str) = poll_delay_ms {
4064        local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
4065    }
4066    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4067        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4068    }
4069    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4070        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4071    };
4072
4073    let local_var_req = local_var_req_builder.build()?;
4074    let local_var_resp = local_var_client.execute(local_var_req).await?;
4075
4076    let local_var_status = local_var_resp.status();
4077    let local_var_content = local_var_resp.text().await?;
4078
4079    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4080        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4081    } else {
4082        let local_var_entity: Option<RunAndStreamScriptByHashGetError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4083        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4084        Err(Error::ResponseError(local_var_error))
4085    }
4086}
4087
4088pub 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>> {
4089    let local_var_configuration = configuration;
4090
4091    let local_var_client = &local_var_configuration.client;
4092
4093    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));
4094    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4095
4096    if let Some(ref local_var_str) = parent_job {
4097        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
4098    }
4099    if let Some(ref local_var_str) = tag {
4100        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
4101    }
4102    if let Some(ref local_var_str) = cache_ttl {
4103        local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
4104    }
4105    if let Some(ref local_var_str) = job_id {
4106        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4107    }
4108    if let Some(ref local_var_str) = include_header {
4109        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
4110    }
4111    if let Some(ref local_var_str) = queue_limit {
4112        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
4113    }
4114    if let Some(ref local_var_str) = skip_preprocessor {
4115        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
4116    }
4117    if let Some(ref local_var_str) = poll_delay_ms {
4118        local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
4119    }
4120    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4121        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4122    }
4123    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4124        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4125    };
4126    local_var_req_builder = local_var_req_builder.json(&request_body);
4127
4128    let local_var_req = local_var_req_builder.build()?;
4129    let local_var_resp = local_var_client.execute(local_var_req).await?;
4130
4131    let local_var_status = local_var_resp.status();
4132    let local_var_content = local_var_resp.text().await?;
4133
4134    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4135        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4136    } else {
4137        let local_var_entity: Option<RunAndStreamScriptByPathError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4138        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4139        Err(Error::ResponseError(local_var_error))
4140    }
4141}
4142
4143pub 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>> {
4144    let local_var_configuration = configuration;
4145
4146    let local_var_client = &local_var_configuration.client;
4147
4148    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));
4149    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4150
4151    if let Some(ref local_var_str) = parent_job {
4152        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
4153    }
4154    if let Some(ref local_var_str) = tag {
4155        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
4156    }
4157    if let Some(ref local_var_str) = cache_ttl {
4158        local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
4159    }
4160    if let Some(ref local_var_str) = job_id {
4161        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4162    }
4163    if let Some(ref local_var_str) = include_header {
4164        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
4165    }
4166    if let Some(ref local_var_str) = queue_limit {
4167        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
4168    }
4169    if let Some(ref local_var_str) = payload {
4170        local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
4171    }
4172    if let Some(ref local_var_str) = skip_preprocessor {
4173        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
4174    }
4175    if let Some(ref local_var_str) = poll_delay_ms {
4176        local_var_req_builder = local_var_req_builder.query(&[("poll_delay_ms", &local_var_str.to_string())]);
4177    }
4178    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4179        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4180    }
4181    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4182        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4183    };
4184
4185    let local_var_req = local_var_req_builder.build()?;
4186    let local_var_resp = local_var_client.execute(local_var_req).await?;
4187
4188    let local_var_status = local_var_resp.status();
4189    let local_var_content = local_var_resp.text().await?;
4190
4191    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4192        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4193    } else {
4194        let local_var_entity: Option<RunAndStreamScriptByPathGetError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4195        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4196        Err(Error::ResponseError(local_var_error))
4197    }
4198}
4199
4200pub 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>> {
4201    let local_var_configuration = configuration;
4202
4203    let local_var_client = &local_var_configuration.client;
4204
4205    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));
4206    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4207
4208    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4209        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4210    }
4211    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4212        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4213    };
4214    local_var_req_builder = local_var_req_builder.json(&workflow_task);
4215
4216    let local_var_req = local_var_req_builder.build()?;
4217    let local_var_resp = local_var_client.execute(local_var_req).await?;
4218
4219    let local_var_status = local_var_resp.status();
4220    let local_var_content = local_var_resp.text().await?;
4221
4222    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4223        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4224    } else {
4225        let local_var_entity: Option<RunCodeWorkflowTaskError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4226        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4227        Err(Error::ResponseError(local_var_error))
4228    }
4229}
4230
4231pub async fn run_dynamic_select(configuration: &configuration::Configuration, workspace: &str, dynamic_input_data: models::DynamicInputData) -> Result<uuid::Uuid, Error<RunDynamicSelectError>> {
4232    let local_var_configuration = configuration;
4233
4234    let local_var_client = &local_var_configuration.client;
4235
4236    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/dynamic_select", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4237    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4238
4239    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4240        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4241    }
4242    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4243        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4244    };
4245    local_var_req_builder = local_var_req_builder.json(&dynamic_input_data);
4246
4247    let local_var_req = local_var_req_builder.build()?;
4248    let local_var_resp = local_var_client.execute(local_var_req).await?;
4249
4250    let local_var_status = local_var_resp.status();
4251    let local_var_content = local_var_resp.text().await?;
4252
4253    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4254        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4255    } else {
4256        let local_var_entity: Option<RunDynamicSelectError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4257        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4258        Err(Error::ResponseError(local_var_error))
4259    }
4260}
4261
4262pub async fn run_flow_by_path(configuration: &configuration::Configuration, workspace: &str, path: &str, request_body: std::collections::HashMap<String, serde_json::Value>, scheduled_for: Option<String>, scheduled_in_secs: Option<i32>, skip_preprocessor: Option<bool>, parent_job: Option<&str>, tag: Option<&str>, job_id: Option<&str>, include_header: Option<&str>, invisible_to_owner: Option<bool>, memory_id: Option<&str>, take_over: Option<bool>) -> Result<uuid::Uuid, Error<RunFlowByPathError>> {
4263    let local_var_configuration = configuration;
4264
4265    let local_var_client = &local_var_configuration.client;
4266
4267    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));
4268    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4269
4270    if let Some(ref local_var_str) = scheduled_for {
4271        local_var_req_builder = local_var_req_builder.query(&[("scheduled_for", &local_var_str.to_string())]);
4272    }
4273    if let Some(ref local_var_str) = scheduled_in_secs {
4274        local_var_req_builder = local_var_req_builder.query(&[("scheduled_in_secs", &local_var_str.to_string())]);
4275    }
4276    if let Some(ref local_var_str) = skip_preprocessor {
4277        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
4278    }
4279    if let Some(ref local_var_str) = parent_job {
4280        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
4281    }
4282    if let Some(ref local_var_str) = tag {
4283        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
4284    }
4285    if let Some(ref local_var_str) = job_id {
4286        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4287    }
4288    if let Some(ref local_var_str) = include_header {
4289        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
4290    }
4291    if let Some(ref local_var_str) = invisible_to_owner {
4292        local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
4293    }
4294    if let Some(ref local_var_str) = memory_id {
4295        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
4296    }
4297    if let Some(ref local_var_str) = take_over {
4298        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
4299    }
4300    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4301        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4302    }
4303    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4304        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4305    };
4306    local_var_req_builder = local_var_req_builder.json(&request_body);
4307
4308    let local_var_req = local_var_req_builder.build()?;
4309    let local_var_resp = local_var_client.execute(local_var_req).await?;
4310
4311    let local_var_status = local_var_resp.status();
4312    let local_var_content = local_var_resp.text().await?;
4313
4314    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4315        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4316    } else {
4317        let local_var_entity: Option<RunFlowByPathError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4318        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4319        Err(Error::ResponseError(local_var_error))
4320    }
4321}
4322
4323pub async fn run_flow_by_version(configuration: &configuration::Configuration, workspace: &str, version: i64, request_body: std::collections::HashMap<String, serde_json::Value>, scheduled_for: Option<String>, scheduled_in_secs: Option<i32>, skip_preprocessor: Option<bool>, parent_job: Option<&str>, tag: Option<&str>, job_id: Option<&str>, include_header: Option<&str>, invisible_to_owner: Option<bool>, memory_id: Option<&str>, take_over: Option<bool>) -> Result<uuid::Uuid, Error<RunFlowByVersionError>> {
4324    let local_var_configuration = configuration;
4325
4326    let local_var_client = &local_var_configuration.client;
4327
4328    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/fv/{version}", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace), version=version);
4329    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4330
4331    if let Some(ref local_var_str) = scheduled_for {
4332        local_var_req_builder = local_var_req_builder.query(&[("scheduled_for", &local_var_str.to_string())]);
4333    }
4334    if let Some(ref local_var_str) = scheduled_in_secs {
4335        local_var_req_builder = local_var_req_builder.query(&[("scheduled_in_secs", &local_var_str.to_string())]);
4336    }
4337    if let Some(ref local_var_str) = skip_preprocessor {
4338        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
4339    }
4340    if let Some(ref local_var_str) = parent_job {
4341        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
4342    }
4343    if let Some(ref local_var_str) = tag {
4344        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
4345    }
4346    if let Some(ref local_var_str) = job_id {
4347        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4348    }
4349    if let Some(ref local_var_str) = include_header {
4350        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
4351    }
4352    if let Some(ref local_var_str) = invisible_to_owner {
4353        local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
4354    }
4355    if let Some(ref local_var_str) = memory_id {
4356        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
4357    }
4358    if let Some(ref local_var_str) = take_over {
4359        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
4360    }
4361    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4362        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4363    }
4364    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4365        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4366    };
4367    local_var_req_builder = local_var_req_builder.json(&request_body);
4368
4369    let local_var_req = local_var_req_builder.build()?;
4370    let local_var_resp = local_var_client.execute(local_var_req).await?;
4371
4372    let local_var_status = local_var_resp.status();
4373    let local_var_content = local_var_resp.text().await?;
4374
4375    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4376        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4377    } else {
4378        let local_var_entity: Option<RunFlowByVersionError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4379        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4380        Err(Error::ResponseError(local_var_error))
4381    }
4382}
4383
4384pub async fn run_flow_dependencies_async(configuration: &configuration::Configuration, workspace: &str, run_flow_dependencies_async_request: models::RunFlowDependenciesAsyncRequest) -> Result<uuid::Uuid, Error<RunFlowDependenciesAsyncError>> {
4385    let local_var_configuration = configuration;
4386
4387    let local_var_client = &local_var_configuration.client;
4388
4389    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/flow_dependencies_async", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4390    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4391
4392    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4393        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4394    }
4395    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4396        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4397    };
4398    local_var_req_builder = local_var_req_builder.json(&run_flow_dependencies_async_request);
4399
4400    let local_var_req = local_var_req_builder.build()?;
4401    let local_var_resp = local_var_client.execute(local_var_req).await?;
4402
4403    let local_var_status = local_var_resp.status();
4404    let local_var_content = local_var_resp.text().await?;
4405
4406    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4407        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4408    } else {
4409        let local_var_entity: Option<RunFlowDependenciesAsyncError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4410        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4411        Err(Error::ResponseError(local_var_error))
4412    }
4413}
4414
4415pub async fn run_flow_preview(configuration: &configuration::Configuration, workspace: &str, flow_preview: models::FlowPreview, include_header: Option<&str>, invisible_to_owner: Option<bool>, job_id: Option<&str>, memory_id: Option<&str>, take_over: Option<bool>) -> Result<uuid::Uuid, Error<RunFlowPreviewError>> {
4416    let local_var_configuration = configuration;
4417
4418    let local_var_client = &local_var_configuration.client;
4419
4420    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/preview_flow", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4421    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4422
4423    if let Some(ref local_var_str) = include_header {
4424        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
4425    }
4426    if let Some(ref local_var_str) = invisible_to_owner {
4427        local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
4428    }
4429    if let Some(ref local_var_str) = job_id {
4430        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4431    }
4432    if let Some(ref local_var_str) = memory_id {
4433        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
4434    }
4435    if let Some(ref local_var_str) = take_over {
4436        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
4437    }
4438    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4439        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4440    }
4441    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4442        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4443    };
4444    local_var_req_builder = local_var_req_builder.json(&flow_preview);
4445
4446    let local_var_req = local_var_req_builder.build()?;
4447    let local_var_resp = local_var_client.execute(local_var_req).await?;
4448
4449    let local_var_status = local_var_resp.status();
4450    let local_var_content = local_var_resp.text().await?;
4451
4452    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4453        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4454    } else {
4455        let local_var_entity: Option<RunFlowPreviewError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4456        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4457        Err(Error::ResponseError(local_var_error))
4458    }
4459}
4460
4461pub async fn run_flow_preview_and_wait_result(configuration: &configuration::Configuration, workspace: &str, flow_preview: models::FlowPreview, memory_id: Option<&str>, take_over: Option<bool>) -> Result<serde_json::Value, Error<RunFlowPreviewAndWaitResultError>> {
4462    let local_var_configuration = configuration;
4463
4464    let local_var_client = &local_var_configuration.client;
4465
4466    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_wait_result/preview_flow", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4467    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4468
4469    if let Some(ref local_var_str) = memory_id {
4470        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
4471    }
4472    if let Some(ref local_var_str) = take_over {
4473        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
4474    }
4475    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4476        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4477    }
4478    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4479        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4480    };
4481    local_var_req_builder = local_var_req_builder.json(&flow_preview);
4482
4483    let local_var_req = local_var_req_builder.build()?;
4484    let local_var_resp = local_var_client.execute(local_var_req).await?;
4485
4486    let local_var_status = local_var_resp.status();
4487    let local_var_content = local_var_resp.text().await?;
4488
4489    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4490        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4491    } else {
4492        let local_var_entity: Option<RunFlowPreviewAndWaitResultError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4493        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4494        Err(Error::ResponseError(local_var_error))
4495    }
4496}
4497
4498/// 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. 
4499pub async fn run_queued_job_now(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<String, Error<RunQueuedJobNowError>> {
4500    let local_var_configuration = configuration;
4501
4502    let local_var_client = &local_var_configuration.client;
4503
4504    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));
4505    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4506
4507    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4508        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4509    }
4510    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4511        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4512    };
4513
4514    let local_var_req = local_var_req_builder.build()?;
4515    let local_var_resp = local_var_client.execute(local_var_req).await?;
4516
4517    let local_var_status = local_var_resp.status();
4518    let local_var_content = local_var_resp.text().await?;
4519
4520    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4521        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4522    } else {
4523        let local_var_entity: Option<RunQueuedJobNowError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4524        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4525        Err(Error::ResponseError(local_var_error))
4526    }
4527}
4528
4529pub async fn run_raw_script_dependencies(configuration: &configuration::Configuration, workspace: &str, run_raw_script_dependencies_request: models::RunRawScriptDependenciesRequest) -> Result<models::RunRawScriptDependencies201Response, Error<RunRawScriptDependenciesError>> {
4530    let local_var_configuration = configuration;
4531
4532    let local_var_client = &local_var_configuration.client;
4533
4534    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/dependencies", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4535    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4536
4537    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4538        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4539    }
4540    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4541        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4542    };
4543    local_var_req_builder = local_var_req_builder.json(&run_raw_script_dependencies_request);
4544
4545    let local_var_req = local_var_req_builder.build()?;
4546    let local_var_resp = local_var_client.execute(local_var_req).await?;
4547
4548    let local_var_status = local_var_resp.status();
4549    let local_var_content = local_var_resp.text().await?;
4550
4551    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4552        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4553    } else {
4554        let local_var_entity: Option<RunRawScriptDependenciesError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4555        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4556        Err(Error::ResponseError(local_var_error))
4557    }
4558}
4559
4560pub async fn run_raw_script_dependencies_async(configuration: &configuration::Configuration, workspace: &str, run_raw_script_dependencies_request: models::RunRawScriptDependenciesRequest) -> Result<uuid::Uuid, Error<RunRawScriptDependenciesAsyncError>> {
4561    let local_var_configuration = configuration;
4562
4563    let local_var_client = &local_var_configuration.client;
4564
4565    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/dependencies_async", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4566    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4567
4568    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4569        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4570    }
4571    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4572        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4573    };
4574    local_var_req_builder = local_var_req_builder.json(&run_raw_script_dependencies_request);
4575
4576    let local_var_req = local_var_req_builder.build()?;
4577    let local_var_resp = local_var_client.execute(local_var_req).await?;
4578
4579    let local_var_status = local_var_resp.status();
4580    let local_var_content = local_var_resp.text().await?;
4581
4582    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4583        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4584    } else {
4585        let local_var_entity: Option<RunRawScriptDependenciesAsyncError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4586        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4587        Err(Error::ResponseError(local_var_error))
4588    }
4589}
4590
4591pub 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>> {
4592    let local_var_configuration = configuration;
4593
4594    let local_var_client = &local_var_configuration.client;
4595
4596    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));
4597    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4598
4599    if let Some(ref local_var_str) = scheduled_for {
4600        local_var_req_builder = local_var_req_builder.query(&[("scheduled_for", &local_var_str.to_string())]);
4601    }
4602    if let Some(ref local_var_str) = scheduled_in_secs {
4603        local_var_req_builder = local_var_req_builder.query(&[("scheduled_in_secs", &local_var_str.to_string())]);
4604    }
4605    if let Some(ref local_var_str) = skip_preprocessor {
4606        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
4607    }
4608    if let Some(ref local_var_str) = parent_job {
4609        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
4610    }
4611    if let Some(ref local_var_str) = tag {
4612        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
4613    }
4614    if let Some(ref local_var_str) = cache_ttl {
4615        local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
4616    }
4617    if let Some(ref local_var_str) = job_id {
4618        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4619    }
4620    if let Some(ref local_var_str) = retry {
4621        local_var_req_builder = local_var_req_builder.query(&[("retry", &local_var_str.to_string())]);
4622    }
4623    if let Some(ref local_var_str) = include_header {
4624        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
4625    }
4626    if let Some(ref local_var_str) = invisible_to_owner {
4627        local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
4628    }
4629    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4630        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4631    }
4632    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4633        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4634    };
4635    local_var_req_builder = local_var_req_builder.json(&body);
4636
4637    let local_var_req = local_var_req_builder.build()?;
4638    let local_var_resp = local_var_client.execute(local_var_req).await?;
4639
4640    let local_var_status = local_var_resp.status();
4641    let local_var_content = local_var_resp.text().await?;
4642
4643    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4644        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4645    } else {
4646        let local_var_entity: Option<RunScriptByHashError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4647        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4648        Err(Error::ResponseError(local_var_error))
4649    }
4650}
4651
4652pub 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>> {
4653    let local_var_configuration = configuration;
4654
4655    let local_var_client = &local_var_configuration.client;
4656
4657    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));
4658    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4659
4660    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4661        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4662    }
4663    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4664        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4665    };
4666    local_var_req_builder = local_var_req_builder.json(&inline_script_args);
4667
4668    let local_var_req = local_var_req_builder.build()?;
4669    let local_var_resp = local_var_client.execute(local_var_req).await?;
4670
4671    let local_var_status = local_var_resp.status();
4672    let local_var_content = local_var_resp.text().await?;
4673
4674    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4675        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4676    } else {
4677        let local_var_entity: Option<RunScriptByHashInlineError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4678        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4679        Err(Error::ResponseError(local_var_error))
4680    }
4681}
4682
4683pub 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>> {
4684    let local_var_configuration = configuration;
4685
4686    let local_var_client = &local_var_configuration.client;
4687
4688    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));
4689    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4690
4691    if let Some(ref local_var_str) = scheduled_for {
4692        local_var_req_builder = local_var_req_builder.query(&[("scheduled_for", &local_var_str.to_string())]);
4693    }
4694    if let Some(ref local_var_str) = scheduled_in_secs {
4695        local_var_req_builder = local_var_req_builder.query(&[("scheduled_in_secs", &local_var_str.to_string())]);
4696    }
4697    if let Some(ref local_var_str) = skip_preprocessor {
4698        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
4699    }
4700    if let Some(ref local_var_str) = parent_job {
4701        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
4702    }
4703    if let Some(ref local_var_str) = tag {
4704        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
4705    }
4706    if let Some(ref local_var_str) = cache_ttl {
4707        local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
4708    }
4709    if let Some(ref local_var_str) = job_id {
4710        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4711    }
4712    if let Some(ref local_var_str) = retry {
4713        local_var_req_builder = local_var_req_builder.query(&[("retry", &local_var_str.to_string())]);
4714    }
4715    if let Some(ref local_var_str) = invisible_to_owner {
4716        local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
4717    }
4718    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4719        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4720    }
4721    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4722        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4723    };
4724    local_var_req_builder = local_var_req_builder.json(&request_body);
4725
4726    let local_var_req = local_var_req_builder.build()?;
4727    let local_var_resp = local_var_client.execute(local_var_req).await?;
4728
4729    let local_var_status = local_var_resp.status();
4730    let local_var_content = local_var_resp.text().await?;
4731
4732    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4733        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4734    } else {
4735        let local_var_entity: Option<RunScriptByPathError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4736        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4737        Err(Error::ResponseError(local_var_error))
4738    }
4739}
4740
4741pub 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>> {
4742    let local_var_configuration = configuration;
4743
4744    let local_var_client = &local_var_configuration.client;
4745
4746    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));
4747    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4748
4749    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4750        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4751    }
4752    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4753        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4754    };
4755    local_var_req_builder = local_var_req_builder.json(&inline_script_args);
4756
4757    let local_var_req = local_var_req_builder.build()?;
4758    let local_var_resp = local_var_client.execute(local_var_req).await?;
4759
4760    let local_var_status = local_var_resp.status();
4761    let local_var_content = local_var_resp.text().await?;
4762
4763    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4764        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4765    } else {
4766        let local_var_entity: Option<RunScriptByPathInlineError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4767        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4768        Err(Error::ResponseError(local_var_error))
4769    }
4770}
4771
4772pub 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>> {
4773    let local_var_configuration = configuration;
4774
4775    let local_var_client = &local_var_configuration.client;
4776
4777    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run/preview", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4778    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4779
4780    if let Some(ref local_var_str) = include_header {
4781        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
4782    }
4783    if let Some(ref local_var_str) = invisible_to_owner {
4784        local_var_req_builder = local_var_req_builder.query(&[("invisible_to_owner", &local_var_str.to_string())]);
4785    }
4786    if let Some(ref local_var_str) = timeout {
4787        local_var_req_builder = local_var_req_builder.query(&[("timeout", &local_var_str.to_string())]);
4788    }
4789    if let Some(ref local_var_str) = job_id {
4790        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4791    }
4792    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4793        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4794    }
4795    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4796        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4797    };
4798    local_var_req_builder = local_var_req_builder.json(&preview);
4799
4800    let local_var_req = local_var_req_builder.build()?;
4801    let local_var_resp = local_var_client.execute(local_var_req).await?;
4802
4803    let local_var_status = local_var_resp.status();
4804    let local_var_content = local_var_resp.text().await?;
4805
4806    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4807        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4808    } else {
4809        let local_var_entity: Option<RunScriptPreviewError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4810        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4811        Err(Error::ResponseError(local_var_error))
4812    }
4813}
4814
4815pub async fn run_script_preview_and_wait_result(configuration: &configuration::Configuration, workspace: &str, preview: models::Preview) -> Result<serde_json::Value, Error<RunScriptPreviewAndWaitResultError>> {
4816    let local_var_configuration = configuration;
4817
4818    let local_var_client = &local_var_configuration.client;
4819
4820    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_wait_result/preview", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4821    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4822
4823    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4824        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4825    }
4826    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4827        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4828    };
4829    local_var_req_builder = local_var_req_builder.json(&preview);
4830
4831    let local_var_req = local_var_req_builder.build()?;
4832    let local_var_resp = local_var_client.execute(local_var_req).await?;
4833
4834    let local_var_status = local_var_resp.status();
4835    let local_var_content = local_var_resp.text().await?;
4836
4837    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4838        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4839    } else {
4840        let local_var_entity: Option<RunScriptPreviewAndWaitResultError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4841        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4842        Err(Error::ResponseError(local_var_error))
4843    }
4844}
4845
4846pub async fn run_script_preview_inline(configuration: &configuration::Configuration, workspace: &str, preview_inline: models::PreviewInline) -> Result<serde_json::Value, Error<RunScriptPreviewInlineError>> {
4847    let local_var_configuration = configuration;
4848
4849    let local_var_client = &local_var_configuration.client;
4850
4851    let local_var_uri_str = format!("{}/w/{workspace}/jobs/run_inline/preview", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
4852    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4853
4854    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4855        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4856    }
4857    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4858        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4859    };
4860    local_var_req_builder = local_var_req_builder.json(&preview_inline);
4861
4862    let local_var_req = local_var_req_builder.build()?;
4863    let local_var_resp = local_var_client.execute(local_var_req).await?;
4864
4865    let local_var_status = local_var_resp.status();
4866    let local_var_content = local_var_resp.text().await?;
4867
4868    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4869        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4870    } else {
4871        let local_var_entity: Option<RunScriptPreviewInlineError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4872        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4873        Err(Error::ResponseError(local_var_error))
4874    }
4875}
4876
4877pub async fn run_wait_result_flow_by_path(configuration: &configuration::Configuration, workspace: &str, path: &str, request_body: std::collections::HashMap<String, serde_json::Value>, include_header: Option<&str>, queue_limit: Option<&str>, job_id: Option<&str>, skip_preprocessor: Option<bool>, memory_id: Option<&str>, take_over: Option<bool>) -> Result<serde_json::Value, Error<RunWaitResultFlowByPathError>> {
4878    let local_var_configuration = configuration;
4879
4880    let local_var_client = &local_var_configuration.client;
4881
4882    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));
4883    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4884
4885    if let Some(ref local_var_str) = include_header {
4886        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
4887    }
4888    if let Some(ref local_var_str) = queue_limit {
4889        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
4890    }
4891    if let Some(ref local_var_str) = job_id {
4892        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4893    }
4894    if let Some(ref local_var_str) = skip_preprocessor {
4895        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
4896    }
4897    if let Some(ref local_var_str) = memory_id {
4898        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
4899    }
4900    if let Some(ref local_var_str) = take_over {
4901        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
4902    }
4903    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4904        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4905    }
4906    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4907        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4908    };
4909    local_var_req_builder = local_var_req_builder.json(&request_body);
4910
4911    let local_var_req = local_var_req_builder.build()?;
4912    let local_var_resp = local_var_client.execute(local_var_req).await?;
4913
4914    let local_var_status = local_var_resp.status();
4915    let local_var_content = local_var_resp.text().await?;
4916
4917    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4918        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4919    } else {
4920        let local_var_entity: Option<RunWaitResultFlowByPathError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4921        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4922        Err(Error::ResponseError(local_var_error))
4923    }
4924}
4925
4926pub async fn run_wait_result_flow_by_version(configuration: &configuration::Configuration, workspace: &str, version: i64, request_body: std::collections::HashMap<String, serde_json::Value>, include_header: Option<&str>, queue_limit: Option<&str>, job_id: Option<&str>, skip_preprocessor: Option<bool>, memory_id: Option<&str>, take_over: Option<bool>) -> Result<serde_json::Value, Error<RunWaitResultFlowByVersionError>> {
4927    let local_var_configuration = configuration;
4928
4929    let local_var_client = &local_var_configuration.client;
4930
4931    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);
4932    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
4933
4934    if let Some(ref local_var_str) = include_header {
4935        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
4936    }
4937    if let Some(ref local_var_str) = queue_limit {
4938        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
4939    }
4940    if let Some(ref local_var_str) = job_id {
4941        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4942    }
4943    if let Some(ref local_var_str) = skip_preprocessor {
4944        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
4945    }
4946    if let Some(ref local_var_str) = memory_id {
4947        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
4948    }
4949    if let Some(ref local_var_str) = take_over {
4950        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
4951    }
4952    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
4953        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
4954    }
4955    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
4956        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
4957    };
4958    local_var_req_builder = local_var_req_builder.json(&request_body);
4959
4960    let local_var_req = local_var_req_builder.build()?;
4961    let local_var_resp = local_var_client.execute(local_var_req).await?;
4962
4963    let local_var_status = local_var_resp.status();
4964    let local_var_content = local_var_resp.text().await?;
4965
4966    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
4967        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
4968    } else {
4969        let local_var_entity: Option<RunWaitResultFlowByVersionError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
4970        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
4971        Err(Error::ResponseError(local_var_error))
4972    }
4973}
4974
4975pub async fn run_wait_result_flow_by_version_get(configuration: &configuration::Configuration, workspace: &str, version: i64, include_header: Option<&str>, queue_limit: Option<&str>, payload: Option<&str>, job_id: Option<&str>, skip_preprocessor: Option<bool>, memory_id: Option<&str>, take_over: Option<bool>) -> Result<serde_json::Value, Error<RunWaitResultFlowByVersionGetError>> {
4976    let local_var_configuration = configuration;
4977
4978    let local_var_client = &local_var_configuration.client;
4979
4980    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);
4981    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
4982
4983    if let Some(ref local_var_str) = include_header {
4984        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
4985    }
4986    if let Some(ref local_var_str) = queue_limit {
4987        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
4988    }
4989    if let Some(ref local_var_str) = payload {
4990        local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
4991    }
4992    if let Some(ref local_var_str) = job_id {
4993        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
4994    }
4995    if let Some(ref local_var_str) = skip_preprocessor {
4996        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
4997    }
4998    if let Some(ref local_var_str) = memory_id {
4999        local_var_req_builder = local_var_req_builder.query(&[("memory_id", &local_var_str.to_string())]);
5000    }
5001    if let Some(ref local_var_str) = take_over {
5002        local_var_req_builder = local_var_req_builder.query(&[("take_over", &local_var_str.to_string())]);
5003    }
5004    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5005        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5006    }
5007    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
5008        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
5009    };
5010
5011    let local_var_req = local_var_req_builder.build()?;
5012    let local_var_resp = local_var_client.execute(local_var_req).await?;
5013
5014    let local_var_status = local_var_resp.status();
5015    let local_var_content = local_var_resp.text().await?;
5016
5017    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5018        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
5019    } else {
5020        let local_var_entity: Option<RunWaitResultFlowByVersionGetError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
5021        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5022        Err(Error::ResponseError(local_var_error))
5023    }
5024}
5025
5026pub 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>> {
5027    let local_var_configuration = configuration;
5028
5029    let local_var_client = &local_var_configuration.client;
5030
5031    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));
5032    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
5033
5034    if let Some(ref local_var_str) = parent_job {
5035        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
5036    }
5037    if let Some(ref local_var_str) = tag {
5038        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
5039    }
5040    if let Some(ref local_var_str) = cache_ttl {
5041        local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
5042    }
5043    if let Some(ref local_var_str) = job_id {
5044        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
5045    }
5046    if let Some(ref local_var_str) = include_header {
5047        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
5048    }
5049    if let Some(ref local_var_str) = queue_limit {
5050        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
5051    }
5052    if let Some(ref local_var_str) = skip_preprocessor {
5053        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
5054    }
5055    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5056        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5057    }
5058    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
5059        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
5060    };
5061    local_var_req_builder = local_var_req_builder.json(&request_body);
5062
5063    let local_var_req = local_var_req_builder.build()?;
5064    let local_var_resp = local_var_client.execute(local_var_req).await?;
5065
5066    let local_var_status = local_var_resp.status();
5067    let local_var_content = local_var_resp.text().await?;
5068
5069    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5070        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
5071    } else {
5072        let local_var_entity: Option<RunWaitResultScriptByPathError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
5073        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5074        Err(Error::ResponseError(local_var_error))
5075    }
5076}
5077
5078pub 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>> {
5079    let local_var_configuration = configuration;
5080
5081    let local_var_client = &local_var_configuration.client;
5082
5083    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));
5084    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
5085
5086    if let Some(ref local_var_str) = parent_job {
5087        local_var_req_builder = local_var_req_builder.query(&[("parent_job", &local_var_str.to_string())]);
5088    }
5089    if let Some(ref local_var_str) = tag {
5090        local_var_req_builder = local_var_req_builder.query(&[("tag", &local_var_str.to_string())]);
5091    }
5092    if let Some(ref local_var_str) = cache_ttl {
5093        local_var_req_builder = local_var_req_builder.query(&[("cache_ttl", &local_var_str.to_string())]);
5094    }
5095    if let Some(ref local_var_str) = job_id {
5096        local_var_req_builder = local_var_req_builder.query(&[("job_id", &local_var_str.to_string())]);
5097    }
5098    if let Some(ref local_var_str) = include_header {
5099        local_var_req_builder = local_var_req_builder.query(&[("include_header", &local_var_str.to_string())]);
5100    }
5101    if let Some(ref local_var_str) = queue_limit {
5102        local_var_req_builder = local_var_req_builder.query(&[("queue_limit", &local_var_str.to_string())]);
5103    }
5104    if let Some(ref local_var_str) = payload {
5105        local_var_req_builder = local_var_req_builder.query(&[("payload", &local_var_str.to_string())]);
5106    }
5107    if let Some(ref local_var_str) = skip_preprocessor {
5108        local_var_req_builder = local_var_req_builder.query(&[("skip_preprocessor", &local_var_str.to_string())]);
5109    }
5110    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5111        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5112    }
5113    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
5114        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
5115    };
5116
5117    let local_var_req = local_var_req_builder.build()?;
5118    let local_var_resp = local_var_client.execute(local_var_req).await?;
5119
5120    let local_var_status = local_var_resp.status();
5121    let local_var_content = local_var_resp.text().await?;
5122
5123    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5124        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
5125    } else {
5126        let local_var_entity: Option<RunWaitResultScriptByPathGetError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
5127        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5128        Err(Error::ResponseError(local_var_error))
5129    }
5130}
5131
5132pub async fn set_flow_user_state(configuration: &configuration::Configuration, workspace: &str, id: &str, key: &str, body: Option<serde_json::Value>) -> Result<String, Error<SetFlowUserStateError>> {
5133    let local_var_configuration = configuration;
5134
5135    let local_var_client = &local_var_configuration.client;
5136
5137    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));
5138    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
5139
5140    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5141        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5142    }
5143    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
5144        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
5145    };
5146    local_var_req_builder = local_var_req_builder.json(&body);
5147
5148    let local_var_req = local_var_req_builder.build()?;
5149    let local_var_resp = local_var_client.execute(local_var_req).await?;
5150
5151    let local_var_status = local_var_resp.status();
5152    let local_var_content = local_var_resp.text().await?;
5153
5154    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5155        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
5156    } else {
5157        let local_var_entity: Option<SetFlowUserStateError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
5158        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5159        Err(Error::ResponseError(local_var_error))
5160    }
5161}
5162
5163pub async fn unresolve_completed_jobs(configuration: &configuration::Configuration, workspace: &str, unresolve_completed_jobs_request: models::UnresolveCompletedJobsRequest) -> Result<Vec<uuid::Uuid>, Error<UnresolveCompletedJobsError>> {
5164    let local_var_configuration = configuration;
5165
5166    let local_var_client = &local_var_configuration.client;
5167
5168    let local_var_uri_str = format!("{}/w/{workspace}/jobs/completed/unresolve", local_var_configuration.base_path, workspace=crate::apis::urlencode(workspace));
5169    let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str());
5170
5171    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5172        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5173    }
5174    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
5175        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
5176    };
5177    local_var_req_builder = local_var_req_builder.json(&unresolve_completed_jobs_request);
5178
5179    let local_var_req = local_var_req_builder.build()?;
5180    let local_var_resp = local_var_client.execute(local_var_req).await?;
5181
5182    let local_var_status = local_var_resp.status();
5183    let local_var_content = local_var_resp.text().await?;
5184
5185    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5186        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
5187    } else {
5188        let local_var_entity: Option<UnresolveCompletedJobsError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
5189        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5190        Err(Error::ResponseError(local_var_error))
5191    }
5192}
5193
5194/// 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. 
5195pub async fn worker_is_draining(configuration: &configuration::Configuration, workspace: &str, id: &str) -> Result<bool, Error<WorkerIsDrainingError>> {
5196    let local_var_configuration = configuration;
5197
5198    let local_var_client = &local_var_configuration.client;
5199
5200    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));
5201    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
5202
5203    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
5204        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
5205    }
5206    if let Some(ref local_var_token) = local_var_configuration.bearer_access_token {
5207        local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned());
5208    };
5209
5210    let local_var_req = local_var_req_builder.build()?;
5211    let local_var_resp = local_var_client.execute(local_var_req).await?;
5212
5213    let local_var_status = local_var_resp.status();
5214    let local_var_content = local_var_resp.text().await?;
5215
5216    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
5217        crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).map_err(Error::from)
5218    } else {
5219        let local_var_entity: Option<WorkerIsDrainingError> = crate::from_str_patched/* Externally injected from /build.nu */(&local_var_content).ok();
5220        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
5221        Err(Error::ResponseError(local_var_error))
5222    }
5223}
5224