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