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