1 /**
2  * CWL v1.2 parser generated with schema-salad-tool
3  * 
4  * This module was generated using schema-salad code generator.
5  * 
6  * The embedded document is subject to the license of the original schema.
7  * 
8  * License: Apache-2.0
9  * Date: 2024-09-26
10  */
11 module cwl.v1_2;
12 
13 import salad.meta.impl : genBody_;
14 import salad.meta.parser : import_ = importFromURI;
15 import salad.meta.uda : defaultValue, documentRoot, id, idMap, link, LinkResolver, secondaryFilesDSL, typeDSL;
16 import salad.primitives : EnumSchemaBase, MapSchemaBase, RecordSchemaBase, UnionSchemaBase;
17 import salad.type : None, Union;
18 
19 /// parser information
20 enum parserInfo = "CWL v1.2 parser generated with schema-salad-tool";
21 
22 // Modified until the following pull request is merged
23 // See_Also: https://github.com/common-workflow-language/schema_salad/pull/861
24 enum saladVersion = "v1.3";
25 
26 mixin template genBody()
27 {
28     mixin genBody_!saladVersion;
29 }
30 
31 /**
32  * Names of salad data types (based on Avro schema declarations).
33  * 
34  * Refer to the [Avro schema declaration documentation](https://avro.apache.org/docs/current/spec.html#schemas) for
35  * detailed information.
36  * 
37  * null: no value
38  * boolean: a binary value
39  * int: 32-bit signed integer
40  * long: 64-bit signed integer
41  * float: single precision (32-bit) IEEE 754 floating-point number
42  * double: double precision (64-bit) IEEE 754 floating-point number
43  * string: Unicode character sequence
44  */
45 class PrimitiveType : EnumSchemaBase
46 {
47     ///
48     enum Symbol
49     {
50         s0 = "null", ///
51         s1 = "boolean", ///
52         s2 = "int", ///
53         s3 = "long", ///
54         s4 = "float", ///
55         s5 = "double", ///
56         s6 = "string", ///
57     }
58 
59     Symbol value;
60 
61     mixin genBody;
62 }
63 
64 ///
65 public import salad.primitives : Any;
66 
67 /**
68  * A field of a record.
69  */
70 class RecordField : RecordSchemaBase
71 {
72     /**
73      * A documentation string for this object, or an array of strings which should be concatenated.
74      */
75     Union!(None, string, string[]) doc_;
76     /**
77      * The name of the field
78      */
79     @id string name_;
80     /**
81      * The field type. If it is an array, it indicates
82      * that the field type is a union type of its elements.
83      * Its elements may be duplicated.
84      */
85     @typeDSL Union!(PrimitiveType, RecordSchema, EnumSchema, ArraySchema, MapSchema, UnionSchema, string, Union!(PrimitiveType, RecordSchema, EnumSchema, ArraySchema, MapSchema, UnionSchema, string)[]) type_;
86 
87     mixin genBody;
88 }
89 
90 ///
91 class RecordSchema : RecordSchemaBase
92 {
93     /**
94      * Defines the fields of the record.
95      */
96     @idMap("name", "type") Union!(None, RecordField[]) fields_;
97     /**
98      * Must be `record`
99      */
100     static immutable type_ = "record";
101 
102     mixin genBody;
103 }
104 
105 /**
106  * Define an enumerated type.
107  */
108 class EnumSchema : RecordSchemaBase
109 {
110     ///
111     @id Union!(None, string) name_;
112     /**
113      * Defines the set of valid symbols.
114      */
115     @link(LinkResolver.id) string[] symbols_;
116     /**
117      * Must be `enum`
118      */
119     static immutable type_ = "enum";
120 
121     mixin genBody;
122 }
123 
124 ///
125 class ArraySchema : RecordSchemaBase
126 {
127     /**
128      * Defines the type of the array elements.
129      */
130     Union!(PrimitiveType, RecordSchema, EnumSchema, ArraySchema, MapSchema, UnionSchema, string, Union!(PrimitiveType, RecordSchema, EnumSchema, ArraySchema, MapSchema, UnionSchema, string)[]) items_;
131     /**
132      * Must be `array`
133      */
134     static immutable type_ = "array";
135 
136     mixin genBody;
137 }
138 
139 ///
140 class MapSchema : RecordSchemaBase
141 {
142     /**
143      * Must be `map`
144      */
145     static immutable type_ = "map";
146     /**
147      * Defines the type of the map elements.
148      */
149     Union!(PrimitiveType, RecordSchema, EnumSchema, ArraySchema, MapSchema, UnionSchema, string, Union!(PrimitiveType, RecordSchema, EnumSchema, ArraySchema, MapSchema, UnionSchema, string)[]) values_;
150 
151     mixin genBody;
152 }
153 
154 ///
155 class UnionSchema : RecordSchemaBase
156 {
157     /**
158      * Defines the type of the union elements.
159      */
160     Union!(PrimitiveType, RecordSchema, EnumSchema, ArraySchema, MapSchema, UnionSchema, string, Union!(PrimitiveType, RecordSchema, EnumSchema, ArraySchema, MapSchema, UnionSchema, string)[]) names_;
161     /**
162      * Must be `union`
163      */
164     static immutable type_ = "union";
165 
166     mixin genBody;
167 }
168 
169 /**
170  * Extends primitive types with the concept of a file and directory as a builtin type.
171  * File: A File object
172  * Directory: A Directory object
173  */
174 class CWLType : EnumSchemaBase
175 {
176     ///
177     enum Symbol
178     {
179         s0 = "null", ///
180         s1 = "boolean", ///
181         s2 = "int", ///
182         s3 = "long", ///
183         s4 = "float", ///
184         s5 = "double", ///
185         s6 = "string", ///
186         s7 = "File", ///
187         s8 = "Directory", ///
188     }
189 
190     Symbol value;
191 
192     mixin genBody;
193 }
194 
195 ///
196 class CWLArraySchema : RecordSchemaBase
197 {
198     /**
199      * Defines the type of the array elements.
200      */
201     Union!(PrimitiveType, CWLRecordSchema, EnumSchema, CWLArraySchema, string, Union!(PrimitiveType, CWLRecordSchema, EnumSchema, CWLArraySchema, string)[]) items_;
202     /**
203      * Must be `array`
204      */
205     static immutable type_ = "array";
206 
207     mixin genBody;
208 }
209 
210 ///
211 class CWLRecordField : RecordSchemaBase
212 {
213     /**
214      * A documentation string for this object, or an array of strings which should be concatenated.
215      */
216     Union!(None, string, string[]) doc_;
217     /**
218      * The name of the field
219      */
220     @id string name_;
221     /**
222      * The field type
223      */
224     @typeDSL Union!(PrimitiveType, CWLRecordSchema, EnumSchema, CWLArraySchema, string, Union!(PrimitiveType, CWLRecordSchema, EnumSchema, CWLArraySchema, string)[]) type_;
225 
226     mixin genBody;
227 }
228 
229 ///
230 class CWLRecordSchema : RecordSchemaBase
231 {
232     /**
233      * Defines the fields of the record.
234      */
235     @idMap("name", "type") Union!(None, CWLRecordField[]) fields_;
236     /**
237      * Must be `record`
238      */
239     static immutable type_ = "record";
240 
241     mixin genBody;
242 }
243 
244 /**
245  * Represents a file (or group of files when `secondaryFiles` is provided) that
246  * will be accessible by tools using standard POSIX file system call API such as
247  * open(2) and read(2).
248  * 
249  * Files are represented as objects with `class` of `File`.  File objects have
250  * a number of properties that provide metadata about the file.
251  * 
252  * The `location` property of a File is a IRI that uniquely identifies the
253  * file.  Implementations must support the `file://` IRI scheme and may support
254  * other schemes such as `http://` and `https://`.  The value of `location` may also be a
255  * relative reference, in which case it must be resolved relative to the IRI
256  * of the document it appears in.  Alternately to `location`, implementations
257  * must also accept the `path` property on File, which must be a filesystem
258  * path available on the same host as the CWL runner (for inputs) or the
259  * runtime environment of a command line tool execution (for command line tool
260  * outputs).
261  * 
262  * If no `location` or `path` is specified, a file object must specify
263  * `contents` with the UTF-8 text content of the file.  This is a "file
264  * literal".  File literals do not correspond to external resources, but are
265  * created on disk with `contents` with when needed for executing a tool.
266  * Where appropriate, expressions can return file literals to define new files
267  * on a runtime.  The maximum size of `contents` is 64 kilobytes.
268  * 
269  * The `basename` property defines the filename on disk where the file is
270  * staged.  This may differ from the resource name.  If not provided,
271  * `basename` must be computed from the last path part of `location` and made
272  * available to expressions.
273  * 
274  * The `secondaryFiles` property is a list of File or Directory objects that
275  * must be staged in the same directory as the primary file.  It is an error
276  * for file names to be duplicated in `secondaryFiles`.
277  * 
278  * The `size` property is the size in bytes of the File.  It must be computed
279  * from the resource and made available to expressions.  The `checksum` field
280  * contains a cryptographic hash of the file content for use it verifying file
281  * contents.  Implementations may, at user option, enable or disable
282  * computation of the `checksum` field for performance or other reasons.
283  * However, the ability to compute output checksums is required to pass the
284  * CWL conformance test suite.
285  * 
286  * When executing a CommandLineTool, the files and secondary files may be
287  * staged to an arbitrary directory, but must use the value of `basename` for
288  * the filename.  The `path` property must be file path in the context of the
289  * tool execution runtime (local to the compute node, or within the executing
290  * container).  All computed properties should be available to expressions.
291  * File literals also must be staged and `path` must be set.
292  * 
293  * When collecting CommandLineTool outputs, `glob` matching returns file paths
294  * (with the `path` property) and the derived properties. This can all be
295  * modified by `outputEval`.  Alternately, if the file `cwl.output.json` is
296  * present in the output, `outputBinding` is ignored.
297  * 
298  * File objects in the output must provide either a `location` IRI or a `path`
299  * property in the context of the tool execution runtime (local to the compute
300  * node, or within the executing container).
301  * 
302  * When evaluating an ExpressionTool, file objects must be referenced via
303  * `location` (the expression tool does not have access to files on disk so
304  * `path` is meaningless) or as file literals.  It is legal to return a file
305  * object with an existing `location` but a different `basename`.  The
306  * `loadContents` field of ExpressionTool inputs behaves the same as on
307  * CommandLineTool inputs, however it is not meaningful on the outputs.
308  * 
309  * An ExpressionTool may forward file references from input to output by using
310  * the same value for `location`.
311  */
312 class File : RecordSchemaBase
313 {
314     /**
315      * Must be `File` to indicate this object describes a file.
316      */
317     static immutable class_ = "File";
318     /**
319      * An IRI that identifies the file resource.  This may be a relative
320      * reference, in which case it must be resolved using the base IRI of the
321      * document.  The location may refer to a local or remote resource; the
322      * implementation must use the IRI to retrieve file content.  If an
323      * implementation is unable to retrieve the file content stored at a
324      * remote resource (due to unsupported protocol, access denied, or other
325      * issue) it must signal an error.
326      * 
327      * If the `location` field is not provided, the `contents` field must be
328      * provided.  The implementation must assign a unique identifier for
329      * the `location` field.
330      * 
331      * If the `path` field is provided but the `location` field is not, an
332      * implementation may assign the value of the `path` field to `location`,
333      * then follow the rules above.
334      */
335     @link() Union!(None, string) location_;
336     /**
337      * The local host path where the File is available when a CommandLineTool is
338      * executed.  This field must be set by the implementation.  The final
339      * path component must match the value of `basename`.  This field
340      * must not be used in any other context.  The command line tool being
341      * executed must be able to access the file at `path` using the POSIX
342      * `open(2)` syscall.
343      * 
344      * As a special case, if the `path` field is provided but the `location`
345      * field is not, an implementation may assign the value of the `path`
346      * field to `location`, and remove the `path` field.
347      * 
348      * If the `path` contains [POSIX shell metacharacters](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02)
349      * (`|`,`&`, `;`, `<`, `>`, `$(LPAREN)`,`$(RPAREN)`, `$`,`` ` ``, `\`, `"`, `'`,
350      * `<space>`, `<tab>`, and `<newline>`) or characters
351      * [not allowed](http://www.iana.org/assignments/idna-tables-6.3.0/idna-tables-6.3.0.xhtml)
352      * for [Internationalized Domain Names for Applications](https://tools.ietf.org/html/rfc6452)
353      * then implementations may terminate the process with a
354      * `permanentFailure`.
355      */
356     @link() Union!(None, string) path_;
357     /**
358      * The base name of the file, that is, the name of the file without any
359      * leading directory path.  The base name must not contain a slash `/`.
360      * 
361      * If not provided, the implementation must set this field based on the
362      * `location` field by taking the final path component after parsing
363      * `location` as an IRI.  If `basename` is provided, it is not required to
364      * match the value from `location`.
365      * 
366      * When this file is made available to a CommandLineTool, it must be named
367      * with `basename`, i.e. the final component of the `path` field must match
368      * `basename`.
369      */
370     Union!(None, string) basename_;
371     /**
372      * The name of the directory containing file, that is, the path leading up
373      * to the final slash in the path such that `dirname + '/' + basename ==
374      * path`.
375      * 
376      * The implementation must set this field based on the value of `path`
377      * prior to evaluating parameter references or expressions in a
378      * CommandLineTool document.  This field must not be used in any other
379      * context.
380      */
381     Union!(None, string) dirname_;
382     /**
383      * The basename root such that `nameroot + nameext == basename`, and
384      * `nameext` is empty or begins with a period and contains at most one
385      * period.  For the purposes of path splitting leading periods on the
386      * basename are ignored; a basename of `.cshrc` will have a nameroot of
387      * `.cshrc`.
388      * 
389      * The implementation must set this field automatically based on the value
390      * of `basename` prior to evaluating parameter references or expressions.
391      */
392     Union!(None, string) nameroot_;
393     /**
394      * The basename extension such that `nameroot + nameext == basename`, and
395      * `nameext` is empty or begins with a period and contains at most one
396      * period.  Leading periods on the basename are ignored; a basename of
397      * `.cshrc` will have an empty `nameext`.
398      * 
399      * The implementation must set this field automatically based on the value
400      * of `basename` prior to evaluating parameter references or expressions.
401      */
402     Union!(None, string) nameext_;
403     /**
404      * Optional hash code for validating file integrity.  Currently, must be in the form
405      * "sha1$ + hexadecimal string" using the SHA-1 algorithm.
406      */
407     Union!(None, string) checksum_;
408     /**
409      * Optional file size (in bytes)
410      */
411     Union!(None, int, long) size_;
412     /**
413      * A list of additional files or directories that are associated with the
414      * primary file and must be transferred alongside the primary file.
415      * Examples include indexes of the primary file, or external references
416      * which must be included when loading primary document.  A file object
417      * listed in `secondaryFiles` may itself include `secondaryFiles` for
418      * which the same rules apply.
419      */
420     @secondaryFilesDSL Union!(None, Union!(File, Directory)[]) secondaryFiles_;
421     /**
422      * The format of the file: this must be an IRI of a concept node that
423      * represents the file format, preferably defined within an ontology.
424      * If no ontology is available, file formats may be tested by exact match.
425      * 
426      * Reasoning about format compatibility must be done by checking that an
427      * input file format is the same, `owl:equivalentClass` or
428      * `rdfs:subClassOf` the format required by the input parameter.
429      * `owl:equivalentClass` is transitive with `rdfs:subClassOf`, e.g. if
430      * `<B> owl:equivalentClass <C>` and `<B> owl:subclassOf <A>` then infer
431      * `<C> owl:subclassOf <A>`.
432      * 
433      * File format ontologies may be provided in the "$schemas" metadata at the
434      * root of the document.  If no ontologies are specified in `$schemas`, the
435      * runtime may perform exact file format matches.
436      */
437     @link(LinkResolver.id) Union!(None, string) format_;
438     /**
439      * File contents literal.
440      * 
441      * If neither `location` nor `path` is provided, `contents` must be
442      * non-null.  The implementation must assign a unique identifier for the
443      * `location` field.  When the file is staged as input to CommandLineTool,
444      * the value of `contents` must be written to a file.
445      * 
446      * If `contents` is set as a result of a Javascript expression,
447      * an `entry` in `InitialWorkDirRequirement`, or read in from
448      * `cwl.output.json`, there is no specified upper limit on the
449      * size of `contents`.  Implementations may have practical limits
450      * on the size of `contents` based on memory and storage
451      * available to the workflow runner or other factors.
452      * 
453      * If the `loadContents` field of an `InputParameter` or
454      * `OutputParameter` is true, and the input or output File object
455      * `location` is valid, the file must be a UTF-8 text file 64 KiB
456      * or smaller, and the implementation must read the entire
457      * contents of the file and place it in the `contents` field.  If
458      * the size of the file is greater than 64 KiB, the
459      * implementation must raise a fatal error.
460      */
461     Union!(None, string) contents_;
462 
463     mixin genBody;
464 }
465 
466 /**
467  * Represents a directory to present to a command line tool.
468  * 
469  * Directories are represented as objects with `class` of `Directory`.  Directory objects have
470  * a number of properties that provide metadata about the directory.
471  * 
472  * The `location` property of a Directory is a IRI that uniquely identifies
473  * the directory.  Implementations must support the file:// IRI scheme and may
474  * support other schemes such as http://.  Alternately to `location`,
475  * implementations must also accept the `path` property on Directory, which
476  * must be a filesystem path available on the same host as the CWL runner (for
477  * inputs) or the runtime environment of a command line tool execution (for
478  * command line tool outputs).
479  * 
480  * A Directory object may have a `listing` field.  This is a list of File and
481  * Directory objects that are contained in the Directory.  For each entry in
482  * `listing`, the `basename` property defines the name of the File or
483  * Subdirectory when staged to disk.  If `listing` is not provided, the
484  * implementation must have some way of fetching the Directory listing at
485  * runtime based on the `location` field.
486  * 
487  * If a Directory does not have `location`, it is a Directory literal.  A
488  * Directory literal must provide `listing`.  Directory literals must be
489  * created on disk at runtime as needed.
490  * 
491  * The resources in a Directory literal do not need to have any implied
492  * relationship in their `location`.  For example, a Directory listing may
493  * contain two files located on different hosts.  It is the responsibility of
494  * the runtime to ensure that those files are staged to disk appropriately.
495  * Secondary files associated with files in `listing` must also be staged to
496  * the same Directory.
497  * 
498  * When executing a CommandLineTool, Directories must be recursively staged
499  * first and have local values of `path` assigned.
500  * 
501  * Directory objects in CommandLineTool output must provide either a
502  * `location` IRI or a `path` property in the context of the tool execution
503  * runtime (local to the compute node, or within the executing container).
504  * 
505  * An ExpressionTool may forward file references from input to output by using
506  * the same value for `location`.
507  * 
508  * Name conflicts (the same `basename` appearing multiple times in `listing`
509  * or in any entry in `secondaryFiles` in the listing) is a fatal error.
510  */
511 class Directory : RecordSchemaBase
512 {
513     /**
514      * Must be `Directory` to indicate this object describes a Directory.
515      */
516     static immutable class_ = "Directory";
517     /**
518      * An IRI that identifies the directory resource.  This may be a relative
519      * reference, in which case it must be resolved using the base IRI of the
520      * document.  The location may refer to a local or remote resource.  If
521      * the `listing` field is not set, the implementation must use the
522      * location IRI to retrieve directory listing.  If an implementation is
523      * unable to retrieve the directory listing stored at a remote resource (due to
524      * unsupported protocol, access denied, or other issue) it must signal an
525      * error.
526      * 
527      * If the `location` field is not provided, the `listing` field must be
528      * provided.  The implementation must assign a unique identifier for
529      * the `location` field.
530      * 
531      * If the `path` field is provided but the `location` field is not, an
532      * implementation may assign the value of the `path` field to `location`,
533      * then follow the rules above.
534      */
535     @link() Union!(None, string) location_;
536     /**
537      * The local path where the Directory is made available prior to executing a
538      * CommandLineTool.  This must be set by the implementation.  This field
539      * must not be used in any other context.  The command line tool being
540      * executed must be able to access the directory at `path` using the POSIX
541      * `opendir(2)` syscall.
542      * 
543      * If the `path` contains [POSIX shell metacharacters](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02)
544      * (`|`,`&`, `;`, `<`, `>`, `$(LPAREN)`,`$(RPAREN)`, `$`,`` ` ``, `\`, `"`, `'`,
545      * `<space>`, `<tab>`, and `<newline>`) or characters
546      * [not allowed](http://www.iana.org/assignments/idna-tables-6.3.0/idna-tables-6.3.0.xhtml)
547      * for [Internationalized Domain Names for Applications](https://tools.ietf.org/html/rfc6452)
548      * then implementations may terminate the process with a
549      * `permanentFailure`.
550      */
551     @link() Union!(None, string) path_;
552     /**
553      * The base name of the directory, that is, the name of the file without any
554      * leading directory path.  The base name must not contain a slash `/`.
555      * 
556      * If not provided, the implementation must set this field based on the
557      * `location` field by taking the final path component after parsing
558      * `location` as an IRI.  If `basename` is provided, it is not required to
559      * match the value from `location`.
560      * 
561      * When this file is made available to a CommandLineTool, it must be named
562      * with `basename`, i.e. the final component of the `path` field must match
563      * `basename`.
564      */
565     Union!(None, string) basename_;
566     /**
567      * List of files or subdirectories contained in this directory.  The name
568      * of each file or subdirectory is determined by the `basename` field of
569      * each `File` or `Directory` object.  It is an error if a `File` shares a
570      * `basename` with any other entry in `listing`.  If two or more
571      * `Directory` object share the same `basename`, this must be treated as
572      * equivalent to a single subdirectory with the listings recursively
573      * merged.
574      */
575     Union!(None, Union!(File, Directory)[]) listing_;
576 
577     mixin genBody;
578 }
579 
580 /**
581  * Generic type representing a valid CWL object. It is used to represent
582  * `default` values passed to CWL `InputParameter` and `WorkflowStepInput`
583  * record fields.
584  */
585 class CWLObjectType : UnionSchemaBase
586 {
587     Union!(bool, int, long, float, double, string, File, Directory, Union!(None, CWLObjectType)[], CWLObjectType[string]) payload;
588 
589     mixin genBody;
590 }
591 
592 /**
593  * Type representing a valid CWL input file as a `map<string, union<array<ProcessRequirement>, CWLObjectType>>`.
594  */
595 class CWLInputFile : MapSchemaBase
596 {
597     Union!(Union!(InlineJavascriptRequirement, SchemaDefRequirement, LoadListingRequirement, DockerRequirement, SoftwareRequirement, InitialWorkDirRequirement, EnvVarRequirement, ShellCommandRequirement, ResourceRequirement, WorkReuse, NetworkAccess, InplaceUpdateRequirement, ToolTimeLimit, SubworkflowFeatureRequirement, ScatterFeatureRequirement, MultipleInputFeatureRequirement, StepInputExpressionRequirement)[], CWLObjectType)[string] payload;
598 
599     mixin genBody;
600 }
601 
602 /**
603  * Version symbols for published CWL document versions.
604  */
605 class CWLVersion : EnumSchemaBase
606 {
607     ///
608     enum Symbol
609     {
610         s0 = "draft-2", ///
611         s1 = "draft-3.dev1", ///
612         s2 = "draft-3.dev2", ///
613         s3 = "draft-3.dev3", ///
614         s4 = "draft-3.dev4", ///
615         s5 = "draft-3.dev5", ///
616         s6 = "draft-3", ///
617         s7 = "draft-4.dev1", ///
618         s8 = "draft-4.dev2", ///
619         s9 = "draft-4.dev3", ///
620         s10 = "v1.0.dev4", ///
621         s11 = "v1.0", ///
622         s12 = "v1.1.0-dev1", ///
623         s13 = "v1.1", ///
624         s14 = "v1.2.0-dev1", ///
625         s15 = "v1.2.0-dev2", ///
626         s16 = "v1.2.0-dev3", ///
627         s17 = "v1.2.0-dev4", ///
628         s18 = "v1.2.0-dev5", ///
629         s19 = "v1.2", ///
630     }
631 
632     Symbol value;
633 
634     mixin genBody;
635 }
636 
637 /**
638  * Specify the desired behavior for loading the `listing` field of
639  * a Directory object for use by expressions.
640  * 
641  * no_listing: Do not load the directory listing.
642  * shallow_listing: Only load the top level listing, do not recurse into subdirectories.
643  * deep_listing: Load the directory listing and recursively load all subdirectories as well.
644  */
645 class LoadListingEnum : EnumSchemaBase
646 {
647     ///
648     enum Symbol
649     {
650         s0 = "no_listing", ///
651         s1 = "shallow_listing", ///
652         s2 = "deep_listing", ///
653     }
654 
655     Symbol value;
656 
657     mixin genBody;
658 }
659 
660 ///
661 public import salad.primitives : Expression;
662 
663 ///
664 class InputBinding : RecordSchemaBase
665 {
666     /**
667      * Use of `loadContents` in `InputBinding` is deprecated.
668      * Preserved for v1.0 backwards compatibility.  Will be removed in
669      * CWL v2.0.  Use `InputParameter.loadContents` instead.
670      */
671     Union!(None, bool) loadContents_;
672 
673     mixin genBody;
674 }
675 
676 ///
677 class InputRecordField : RecordSchemaBase
678 {
679     /**
680      * A documentation string for this object, or an array of strings which should be concatenated.
681      */
682     Union!(None, string, string[]) doc_;
683     /**
684      * The name of the field
685      */
686     @id string name_;
687     /**
688      * The field type
689      */
690     @typeDSL Union!(CWLType, InputRecordSchema, InputEnumSchema, InputArraySchema, string, Union!(CWLType, InputRecordSchema, InputEnumSchema, InputArraySchema, string)[]) type_;
691     /**
692      * A short, human-readable label of this object.
693      */
694     Union!(None, string) label_;
695     /**
696      * Only valid when `type: File` or is an array of `items: File`.
697      * 
698      * Provides a pattern or expression specifying files or
699      * directories that should be included alongside the primary
700      * file.  Secondary files may be required or optional.  When not
701      * explicitly specified, secondary files specified for `inputs`
702      * are required and `outputs` are optional.  An implementation
703      * must include matching Files and Directories in the
704      * `secondaryFiles` property of the primary file.  These Files
705      * and Directories must be transferred and staged alongside the
706      * primary file.  An implementation may fail workflow execution
707      * if a required secondary file does not exist.
708      * 
709      * If the value is an expression, the value of `self` in the expression
710      * must be the primary input or output File object to which this binding
711      * applies.  The `basename`, `nameroot` and `nameext` fields must be
712      * present in `self`.  For `CommandLineTool` outputs the `path` field must
713      * also be present.  The expression must return a filename string relative
714      * to the path to the primary File, a File or Directory object with either
715      * `path` or `location` and `basename` fields set, or an array consisting
716      * of strings or File or Directory objects.  It is legal to reference an
717      * unchanged File or Directory object taken from input as a secondaryFile.
718      * The expression may return "null" in which case there is no secondaryFile
719      * from that expression.
720      * 
721      * To work on non-filename-preserving storage systems, portable tool
722      * descriptions should avoid constructing new values from `location`, but
723      * should construct relative references using `basename` or `nameroot`
724      * instead.
725      * 
726      * If a value in `secondaryFiles` is a string that is not an expression,
727      * it specifies that the following pattern should be applied to the path
728      * of the primary file to yield a filename relative to the primary File:
729      * 
730      *   1. If string ends with `?` character, remove the last `?` and mark
731      *     the resulting secondary file as optional.
732      *   2. If string begins with one or more caret `^` characters, for each
733      *     caret, remove the last file extension from the path (the last
734      *     period `.` and all following characters).  If there are no file
735      *     extensions, the path is unchanged.
736      *   3. Append the remainder of the string to the end of the file path.
737      */
738     @secondaryFilesDSL Union!(None, SecondaryFileSchema, SecondaryFileSchema[]) secondaryFiles_;
739     /**
740      * Only valid when `type: File` or is an array of `items: File`.
741      * 
742      * A value of `true` indicates that the file is read or written
743      * sequentially without seeking.  An implementation may use this flag to
744      * indicate whether it is valid to stream file contents using a named
745      * pipe.  Default: `false`.
746      */
747     @defaultValue(q"<false>") bool streamable_;
748     /**
749      * Only valid when `type: File` or is an array of `items: File`.
750      * 
751      * This must be one or more IRIs of concept nodes
752      * that represents file formats which are allowed as input to this
753      * parameter, preferably defined within an ontology.  If no ontology is
754      * available, file formats may be tested by exact match.
755      */
756     @link(LinkResolver.id) Union!(None, string, string[], Expression) format_;
757     /**
758      * Only valid when `type: File` or is an array of `items: File`.
759      * 
760      * If true, the file (or each file in the array) must be a UTF-8
761      * text file 64 KiB or smaller, and the implementation must read
762      * the entire contents of the file (or file array) and place it
763      * in the `contents` field of the File object for use by
764      * expressions.  If the size of the file is greater than 64 KiB,
765      * the implementation must raise a fatal error.
766      */
767     Union!(None, bool) loadContents_;
768     /**
769      * Only valid when `type: Directory` or is an array of `items: Directory`.
770      * 
771      * Specify the desired behavior for loading the `listing` field of
772      * a Directory object for use by expressions.
773      * 
774      * The order of precedence for loadListing is:
775      * 
776      *   1. `loadListing` on an individual parameter
777      *   2. Inherited from `LoadListingRequirement`
778      *   3. By default: `no_listing`
779      */
780     Union!(None, LoadListingEnum) loadListing_;
781 
782     mixin genBody;
783 }
784 
785 ///
786 class InputRecordSchema : RecordSchemaBase
787 {
788     /**
789      * Defines the fields of the record.
790      */
791     @idMap("name", "type") Union!(None, InputRecordField[]) fields_;
792     /**
793      * Must be `record`
794      */
795     static immutable type_ = "record";
796     /**
797      * A short, human-readable label of this object.
798      */
799     Union!(None, string) label_;
800     /**
801      * A documentation string for this object, or an array of strings which should be concatenated.
802      */
803     Union!(None, string, string[]) doc_;
804     /**
805      * The identifier for this type
806      */
807     @id Union!(None, string) name_;
808 
809     mixin genBody;
810 }
811 
812 ///
813 class InputEnumSchema : RecordSchemaBase
814 {
815     /**
816      * The identifier for this type
817      */
818     @id Union!(None, string) name_;
819     /**
820      * Defines the set of valid symbols.
821      */
822     @link(LinkResolver.id) string[] symbols_;
823     /**
824      * Must be `enum`
825      */
826     static immutable type_ = "enum";
827     /**
828      * A short, human-readable label of this object.
829      */
830     Union!(None, string) label_;
831     /**
832      * A documentation string for this object, or an array of strings which should be concatenated.
833      */
834     Union!(None, string, string[]) doc_;
835 
836     mixin genBody;
837 }
838 
839 ///
840 class InputArraySchema : RecordSchemaBase
841 {
842     /**
843      * Defines the type of the array elements.
844      */
845     Union!(CWLType, InputRecordSchema, InputEnumSchema, InputArraySchema, string, Union!(CWLType, InputRecordSchema, InputEnumSchema, InputArraySchema, string)[]) items_;
846     /**
847      * Must be `array`
848      */
849     static immutable type_ = "array";
850     /**
851      * A short, human-readable label of this object.
852      */
853     Union!(None, string) label_;
854     /**
855      * A documentation string for this object, or an array of strings which should be concatenated.
856      */
857     Union!(None, string, string[]) doc_;
858     /**
859      * The identifier for this type
860      */
861     @id Union!(None, string) name_;
862 
863     mixin genBody;
864 }
865 
866 ///
867 class OutputRecordField : RecordSchemaBase
868 {
869     /**
870      * A documentation string for this object, or an array of strings which should be concatenated.
871      */
872     Union!(None, string, string[]) doc_;
873     /**
874      * The name of the field
875      */
876     @id string name_;
877     /**
878      * The field type
879      */
880     @typeDSL Union!(CWLType, OutputRecordSchema, OutputEnumSchema, OutputArraySchema, string, Union!(CWLType, OutputRecordSchema, OutputEnumSchema, OutputArraySchema, string)[]) type_;
881     /**
882      * A short, human-readable label of this object.
883      */
884     Union!(None, string) label_;
885     /**
886      * Only valid when `type: File` or is an array of `items: File`.
887      * 
888      * Provides a pattern or expression specifying files or
889      * directories that should be included alongside the primary
890      * file.  Secondary files may be required or optional.  When not
891      * explicitly specified, secondary files specified for `inputs`
892      * are required and `outputs` are optional.  An implementation
893      * must include matching Files and Directories in the
894      * `secondaryFiles` property of the primary file.  These Files
895      * and Directories must be transferred and staged alongside the
896      * primary file.  An implementation may fail workflow execution
897      * if a required secondary file does not exist.
898      * 
899      * If the value is an expression, the value of `self` in the expression
900      * must be the primary input or output File object to which this binding
901      * applies.  The `basename`, `nameroot` and `nameext` fields must be
902      * present in `self`.  For `CommandLineTool` outputs the `path` field must
903      * also be present.  The expression must return a filename string relative
904      * to the path to the primary File, a File or Directory object with either
905      * `path` or `location` and `basename` fields set, or an array consisting
906      * of strings or File or Directory objects.  It is legal to reference an
907      * unchanged File or Directory object taken from input as a secondaryFile.
908      * The expression may return "null" in which case there is no secondaryFile
909      * from that expression.
910      * 
911      * To work on non-filename-preserving storage systems, portable tool
912      * descriptions should avoid constructing new values from `location`, but
913      * should construct relative references using `basename` or `nameroot`
914      * instead.
915      * 
916      * If a value in `secondaryFiles` is a string that is not an expression,
917      * it specifies that the following pattern should be applied to the path
918      * of the primary file to yield a filename relative to the primary File:
919      * 
920      *   1. If string ends with `?` character, remove the last `?` and mark
921      *     the resulting secondary file as optional.
922      *   2. If string begins with one or more caret `^` characters, for each
923      *     caret, remove the last file extension from the path (the last
924      *     period `.` and all following characters).  If there are no file
925      *     extensions, the path is unchanged.
926      *   3. Append the remainder of the string to the end of the file path.
927      */
928     @secondaryFilesDSL Union!(None, SecondaryFileSchema, SecondaryFileSchema[]) secondaryFiles_;
929     /**
930      * Only valid when `type: File` or is an array of `items: File`.
931      * 
932      * A value of `true` indicates that the file is read or written
933      * sequentially without seeking.  An implementation may use this flag to
934      * indicate whether it is valid to stream file contents using a named
935      * pipe.  Default: `false`.
936      */
937     @defaultValue(q"<false>") bool streamable_;
938     /**
939      * Only valid when `type: File` or is an array of `items: File`.
940      * 
941      * This is the file format that will be assigned to the output
942      * File object.
943      */
944     @link(LinkResolver.id) Union!(None, string, Expression) format_;
945 
946     mixin genBody;
947 }
948 
949 ///
950 class OutputRecordSchema : RecordSchemaBase
951 {
952     /**
953      * Defines the fields of the record.
954      */
955     @idMap("name", "type") Union!(None, OutputRecordField[]) fields_;
956     /**
957      * Must be `record`
958      */
959     static immutable type_ = "record";
960     /**
961      * A short, human-readable label of this object.
962      */
963     Union!(None, string) label_;
964     /**
965      * A documentation string for this object, or an array of strings which should be concatenated.
966      */
967     Union!(None, string, string[]) doc_;
968     /**
969      * The identifier for this type
970      */
971     @id Union!(None, string) name_;
972 
973     mixin genBody;
974 }
975 
976 ///
977 class OutputEnumSchema : RecordSchemaBase
978 {
979     /**
980      * The identifier for this type
981      */
982     @id Union!(None, string) name_;
983     /**
984      * Defines the set of valid symbols.
985      */
986     @link(LinkResolver.id) string[] symbols_;
987     /**
988      * Must be `enum`
989      */
990     static immutable type_ = "enum";
991     /**
992      * A short, human-readable label of this object.
993      */
994     Union!(None, string) label_;
995     /**
996      * A documentation string for this object, or an array of strings which should be concatenated.
997      */
998     Union!(None, string, string[]) doc_;
999 
1000     mixin genBody;
1001 }
1002 
1003 ///
1004 class OutputArraySchema : RecordSchemaBase
1005 {
1006     /**
1007      * Defines the type of the array elements.
1008      */
1009     Union!(CWLType, OutputRecordSchema, OutputEnumSchema, OutputArraySchema, string, Union!(CWLType, OutputRecordSchema, OutputEnumSchema, OutputArraySchema, string)[]) items_;
1010     /**
1011      * Must be `array`
1012      */
1013     static immutable type_ = "array";
1014     /**
1015      * A short, human-readable label of this object.
1016      */
1017     Union!(None, string) label_;
1018     /**
1019      * A documentation string for this object, or an array of strings which should be concatenated.
1020      */
1021     Union!(None, string, string[]) doc_;
1022     /**
1023      * The identifier for this type
1024      */
1025     @id Union!(None, string) name_;
1026 
1027     mixin genBody;
1028 }
1029 
1030 /**
1031  * Indicates that the workflow platform must support inline Javascript expressions.
1032  * If this requirement is not present, the workflow platform must not perform expression
1033  * interpolation.
1034  */
1035 class InlineJavascriptRequirement : RecordSchemaBase
1036 {
1037     /**
1038      * Always 'InlineJavascriptRequirement'
1039      */
1040     static immutable class_ = "InlineJavascriptRequirement";
1041     /**
1042      * Additional code fragments that will also be inserted
1043      * before executing the expression code.  Allows for function definitions that may
1044      * be called from CWL expressions.
1045      */
1046     Union!(None, string[]) expressionLib_;
1047 
1048     mixin genBody;
1049 }
1050 
1051 /**
1052  * This field consists of an array of type definitions which must be used when
1053  * interpreting the `inputs` and `outputs` fields.  When a `type` field
1054  * contains a IRI, the implementation must check if the type is defined in
1055  * `schemaDefs` and use that definition.  If the type is not found in
1056  * `schemaDefs`, it is an error.  The entries in `schemaDefs` must be
1057  * processed in the order listed such that later schema definitions may refer
1058  * to earlier schema definitions.
1059  * 
1060  * - **Type definitions are allowed for `enum` and `record` types only.**
1061  * - Type definitions may be shared by defining them in a file and then
1062  *   `$include`-ing them in the `types` field.
1063  * - A file can contain a list of type definitions
1064  */
1065 class SchemaDefRequirement : RecordSchemaBase
1066 {
1067     /**
1068      * Always 'SchemaDefRequirement'
1069      */
1070     static immutable class_ = "SchemaDefRequirement";
1071     /**
1072      * The list of type definitions.
1073      */
1074     Union!(CommandInputRecordSchema, CommandInputEnumSchema, CommandInputArraySchema)[] types_;
1075 
1076     mixin genBody;
1077 }
1078 
1079 /**
1080  * Secondary files are specified using the following micro-DSL for secondary files:
1081  * 
1082  * * If the value is a string, it is transformed to an object with two fields
1083  *   `pattern` and `required`
1084  * * By default, the value of `required` is `null`
1085  *   (this indicates default behavior, which may be based on the context)
1086  * * If the value ends with a question mark `?` the question mark is
1087  *   stripped off and the value of the field `required` is set to `False`
1088  * * The remaining value is assigned to the field `pattern`
1089  * 
1090  * For implementation details and examples, please see
1091  * [this section](SchemaSalad.html#Domain_Specific_Language_for_secondary_files)
1092  * in the Schema Salad specification.
1093  */
1094 class SecondaryFileSchema : RecordSchemaBase
1095 {
1096     /**
1097      * Provides a pattern or expression specifying files or directories that
1098      * should be included alongside the primary file.
1099      * 
1100      * If the value is an expression, the value of `self` in the
1101      * expression must be the primary input or output File object to
1102      * which this binding applies.  The `basename`, `nameroot` and
1103      * `nameext` fields must be present in `self`.  For
1104      * `CommandLineTool` inputs the `location` field must also be
1105      * present.  For `CommandLineTool` outputs the `path` field must
1106      * also be present.  If secondary files were included on an input
1107      * File object as part of the Process invocation, they must also
1108      * be present in `secondaryFiles` on `self`.
1109      * 
1110      * The expression must return either: a filename string relative
1111      * to the path to the primary File, a File or Directory object
1112      * (`class: File` or `class: Directory`) with either `location`
1113      * (for inputs) or `path` (for outputs) and `basename` fields
1114      * set, or an array consisting of strings or File or Directory
1115      * objects as previously described.
1116      * 
1117      * It is legal to use `location` from a File or Directory object
1118      * passed in as input, including `location` from secondary files
1119      * on `self`.  If an expression returns a File object with the
1120      * same `location` but a different `basename` as a secondary file
1121      * that was passed in, the expression result takes precedence.
1122      * Setting the basename with an expression this way affects the
1123      * `path` where the secondary file will be staged to in the
1124      * CommandLineTool.
1125      * 
1126      * The expression may return "null" in which case there is no
1127      * secondary file from that expression.
1128      * 
1129      * To work on non-filename-preserving storage systems, portable
1130      * tool descriptions should treat `location` as an
1131      * [opaque identifier](#opaque-strings) and avoid constructing new
1132      * values from `location`, but should construct relative references
1133      * using `basename` or `nameroot` instead, or propagate `location`
1134      * from defined inputs.
1135      * 
1136      * If a value in `secondaryFiles` is a string that is not an expression,
1137      * it specifies that the following pattern should be applied to the path
1138      * of the primary file to yield a filename relative to the primary File:
1139      * 
1140      *   1. If string ends with `?` character, remove the last `?` and mark
1141      *     the resulting secondary file as optional.
1142      *   2. If string begins with one or more caret `^` characters, for each
1143      *     caret, remove the last file extension from the path (the last
1144      *     period `.` and all following characters).  If there are no file
1145      *     extensions, the path is unchanged.
1146      *   3. Append the remainder of the string to the end of the file path.
1147      */
1148     Union!(string, Expression) pattern_;
1149     /**
1150      * An implementation must not fail workflow execution if `required` is
1151      * set to `false` and the expected secondary file does not exist.
1152      * Default value for `required` field is `true` for secondary files on
1153      * input and `false` for secondary files on output.
1154      */
1155     Union!(None, bool, Expression) required_;
1156 
1157     mixin genBody;
1158 }
1159 
1160 /**
1161  * Specify the desired behavior for loading the `listing` field of
1162  * a Directory object for use by expressions.
1163  */
1164 class LoadListingRequirement : RecordSchemaBase
1165 {
1166     /**
1167      * Always 'LoadListingRequirement'
1168      */
1169     static immutable class_ = "LoadListingRequirement";
1170     ///
1171     Union!(None, LoadListingEnum) loadListing_;
1172 
1173     mixin genBody;
1174 }
1175 
1176 /**
1177  * Define an environment variable that will be set in the runtime environment
1178  * by the workflow platform when executing the command line tool.  May be the
1179  * result of executing an expression, such as getting a parameter from input.
1180  */
1181 class EnvironmentDef : RecordSchemaBase
1182 {
1183     /**
1184      * The environment variable name
1185      */
1186     string envName_;
1187     /**
1188      * The environment variable value
1189      */
1190     Union!(string, Expression) envValue_;
1191 
1192     mixin genBody;
1193 }
1194 
1195 /**
1196  * 
1197  * When listed under `inputBinding` in the input schema, the term
1198  * "value" refers to the corresponding value in the input object.  For
1199  * binding objects listed in `CommandLineTool.arguments`, the term "value"
1200  * refers to the effective value after evaluating `valueFrom`.
1201  * 
1202  * The binding behavior when building the command line depends on the data
1203  * type of the value.  If there is a mismatch between the type described by
1204  * the input schema and the effective value, such as resulting from an
1205  * expression evaluation, an implementation must use the data type of the
1206  * effective value.
1207  * 
1208  *   - **string**: Add `prefix` and the string to the command line.
1209  * 
1210  *   - **number**: Add `prefix` and decimal representation to command line.
1211  * 
1212  *   - **boolean**: If true, add `prefix` to the command line.  If false, add
1213  *       nothing.
1214  * 
1215  *   - **File**: Add `prefix` and the value of
1216  *     [`File.path`](#File) to the command line.
1217  * 
1218  *   - **Directory**: Add `prefix` and the value of
1219  *     [`Directory.path`](#Directory) to the command line.
1220  * 
1221  *   - **array**: If `itemSeparator` is specified, add `prefix` and the join
1222  *       the array into a single string with `itemSeparator` separating the
1223  *       items.  Otherwise, first add `prefix`, then recursively process
1224  *       individual elements.
1225  *       If the array is empty, it does not add anything to command line.
1226  * 
1227  *   - **object**: Add `prefix` only, and recursively add object fields for
1228  *       which `inputBinding` is specified.
1229  * 
1230  *   - **null**: Add nothing.
1231  */
1232 class CommandLineBinding : RecordSchemaBase
1233 {
1234     /**
1235      * Use of `loadContents` in `InputBinding` is deprecated.
1236      * Preserved for v1.0 backwards compatibility.  Will be removed in
1237      * CWL v2.0.  Use `InputParameter.loadContents` instead.
1238      */
1239     Union!(None, bool) loadContents_;
1240     /**
1241      * The sorting key.  Default position is 0. If a [CWL Parameter Reference](#Parameter_references)
1242      * or [CWL Expression](#Expressions_(Optional)) is used and if the
1243      * inputBinding is associated with an input parameter, then the value of
1244      * `self` will be the value of the input parameter.  Input parameter
1245      * defaults (as specified by the `InputParameter.default` field) must be
1246      * applied before evaluating the expression. Expressions must return a
1247      * single value of type int or a null.
1248      */
1249     @defaultValue(q"<0>") Union!(int, Expression) position_;
1250     /**
1251      * Command line prefix to add before the value.
1252      */
1253     Union!(None, string) prefix_;
1254     /**
1255      * If true (default), then the prefix and value must be added as separate
1256      * command line arguments; if false, prefix and value must be concatenated
1257      * into a single command line argument.
1258      */
1259     @defaultValue(q"<true>") bool separate_;
1260     /**
1261      * Join the array elements into a single string with the elements
1262      * separated by `itemSeparator`.
1263      */
1264     Union!(None, string) itemSeparator_;
1265     /**
1266      * If `valueFrom` is a constant string value, use this as the value and
1267      * apply the binding rules above.
1268      * 
1269      * If `valueFrom` is an expression, evaluate the expression to yield the
1270      * actual value to use to build the command line and apply the binding
1271      * rules above.  If the inputBinding is associated with an input
1272      * parameter, the value of `self` in the expression will be the value of
1273      * the input parameter.  Input parameter defaults (as specified by the
1274      * `InputParameter.default` field) must be applied before evaluating the
1275      * expression.
1276      * 
1277      * If the value of the associated input parameter is `null`, `valueFrom` is
1278      * not evaluated and nothing is added to the command line.
1279      * 
1280      * When a binding is part of the `CommandLineTool.arguments` field,
1281      * the `valueFrom` field is required.
1282      */
1283     Union!(None, string, Expression) valueFrom_;
1284     /**
1285      * If `ShellCommandRequirement` is in the requirements for the current command,
1286      * this controls whether the value is quoted on the command line (default is true).
1287      * Use `shellQuote: false` to inject metacharacters for operations such as pipes.
1288      * 
1289      * If `shellQuote` is true or not provided, the implementation must not
1290      * permit interpretation of any shell metacharacters or directives.
1291      */
1292     @defaultValue(q"<true>") bool shellQuote_;
1293 
1294     mixin genBody;
1295 }
1296 
1297 /**
1298  * Describes how to generate an output parameter based on the files produced
1299  * by a CommandLineTool.
1300  * 
1301  * The output parameter value is generated by applying these operations in the
1302  * following order:
1303  * 
1304  *   - glob
1305  *   - loadContents
1306  *   - outputEval
1307  *   - secondaryFiles
1308  */
1309 class CommandOutputBinding : RecordSchemaBase
1310 {
1311     /**
1312      * Only valid when `type: File` or is an array of `items: File`.
1313      * 
1314      * If true, the file (or each file in the array) must be a UTF-8
1315      * text file 64 KiB or smaller, and the implementation must read
1316      * the entire contents of the file (or file array) and place it
1317      * in the `contents` field of the File object for use by
1318      * expressions.  If the size of the file is greater than 64 KiB,
1319      * the implementation must raise a fatal error.
1320      */
1321     Union!(None, bool) loadContents_;
1322     /**
1323      * Only valid when `type: Directory` or is an array of `items: Directory`.
1324      * 
1325      * Specify the desired behavior for loading the `listing` field of
1326      * a Directory object for use by expressions.
1327      * 
1328      * The order of precedence for loadListing is:
1329      * 
1330      *   1. `loadListing` on an individual parameter
1331      *   2. Inherited from `LoadListingRequirement`
1332      *   3. By default: `no_listing`
1333      */
1334     Union!(None, LoadListingEnum) loadListing_;
1335     /**
1336      * Find files or directories relative to the output directory, using POSIX
1337      * glob(3) pathname matching.  If an array is provided, find files or
1338      * directories that match any pattern in the array.  If an expression is
1339      * provided, the expression must return a string or an array of strings,
1340      * which will then be evaluated as one or more glob patterns.  Must only
1341      * match and return files/directories which actually exist.
1342      * 
1343      * If the value of glob is a relative path pattern (does not
1344      * begin with a slash '/') then it is resolved relative to the
1345      * output directory.  If the value of the glob is an absolute
1346      * path pattern (it does begin with a slash '/') then it must
1347      * refer to a path within the output directory.  It is an error
1348      * if any glob resolves to a path outside the output directory.
1349      * Specifically this means globs that resolve to paths outside the output
1350      * directory are illegal.
1351      * 
1352      * A glob may match a path within the output directory which is
1353      * actually a symlink to another file.  In this case, the
1354      * expected behavior is for the resulting File/Directory object to take the
1355      * `basename` (and corresponding `nameroot` and `nameext`) of the
1356      * symlink.  The `location` of the File/Directory is implementation
1357      * dependent, but logically the File/Directory should have the same content
1358      * as the symlink target.  Platforms may stage output files/directories to
1359      * cloud storage that lack the concept of a symlink.  In
1360      * this case file content and directories may be duplicated, or (to avoid
1361      * duplication) the File/Directory `location` may refer to the symlink
1362      * target.
1363      * 
1364      * It is an error if a symlink in the output directory (or any
1365      * symlink in a chain of links) refers to any file or directory
1366      * that is not under an input or output directory.
1367      * 
1368      * Implementations may shut down a container before globbing
1369      * output, so globs and expressions must not assume access to the
1370      * container filesystem except for declared input and output.
1371      */
1372     Union!(None, string, Expression, string[]) glob_;
1373     /**
1374      * Evaluate an expression to generate the output value.  If
1375      * `glob` was specified, the value of `self` must be an array
1376      * containing file objects that were matched.  If no files were
1377      * matched, `self` must be a zero length array; if a single file
1378      * was matched, the value of `self` is an array of a single
1379      * element.  The exit code of the process is
1380      * available in the expression as `runtime.exitCode`.
1381      * 
1382      * Additionally, if `loadContents` is true, the file must be a
1383      * UTF-8 text file 64 KiB or smaller, and the implementation must
1384      * read the entire contents of the file (or file array) and place
1385      * it in the `contents` field of the File object for use in
1386      * `outputEval`.  If the size of the file is greater than 64 KiB,
1387      * the implementation must raise a fatal error.
1388      * 
1389      * If a tool needs to return a large amount of structured data to
1390      * the workflow, loading the output object from `cwl.output.json`
1391      * bypasses `outputEval` and is not subject to the 64 KiB
1392      * `loadContents` limit.
1393      */
1394     Union!(None, Expression) outputEval_;
1395 
1396     mixin genBody;
1397 }
1398 
1399 ///
1400 class CommandLineBindable : RecordSchemaBase
1401 {
1402     /**
1403      * Describes how to turn this object into command line arguments.
1404      */
1405     Union!(None, CommandLineBinding) inputBinding_;
1406 
1407     mixin genBody;
1408 }
1409 
1410 ///
1411 class CommandInputRecordField : RecordSchemaBase
1412 {
1413     /**
1414      * A documentation string for this object, or an array of strings which should be concatenated.
1415      */
1416     Union!(None, string, string[]) doc_;
1417     /**
1418      * The name of the field
1419      */
1420     @id string name_;
1421     /**
1422      * The field type
1423      */
1424     @typeDSL Union!(CWLType, CommandInputRecordSchema, CommandInputEnumSchema, CommandInputArraySchema, string, Union!(CWLType, CommandInputRecordSchema, CommandInputEnumSchema, CommandInputArraySchema, string)[]) type_;
1425     /**
1426      * A short, human-readable label of this object.
1427      */
1428     Union!(None, string) label_;
1429     /**
1430      * Only valid when `type: File` or is an array of `items: File`.
1431      * 
1432      * Provides a pattern or expression specifying files or
1433      * directories that should be included alongside the primary
1434      * file.  Secondary files may be required or optional.  When not
1435      * explicitly specified, secondary files specified for `inputs`
1436      * are required and `outputs` are optional.  An implementation
1437      * must include matching Files and Directories in the
1438      * `secondaryFiles` property of the primary file.  These Files
1439      * and Directories must be transferred and staged alongside the
1440      * primary file.  An implementation may fail workflow execution
1441      * if a required secondary file does not exist.
1442      * 
1443      * If the value is an expression, the value of `self` in the expression
1444      * must be the primary input or output File object to which this binding
1445      * applies.  The `basename`, `nameroot` and `nameext` fields must be
1446      * present in `self`.  For `CommandLineTool` outputs the `path` field must
1447      * also be present.  The expression must return a filename string relative
1448      * to the path to the primary File, a File or Directory object with either
1449      * `path` or `location` and `basename` fields set, or an array consisting
1450      * of strings or File or Directory objects.  It is legal to reference an
1451      * unchanged File or Directory object taken from input as a secondaryFile.
1452      * The expression may return "null" in which case there is no secondaryFile
1453      * from that expression.
1454      * 
1455      * To work on non-filename-preserving storage systems, portable tool
1456      * descriptions should avoid constructing new values from `location`, but
1457      * should construct relative references using `basename` or `nameroot`
1458      * instead.
1459      * 
1460      * If a value in `secondaryFiles` is a string that is not an expression,
1461      * it specifies that the following pattern should be applied to the path
1462      * of the primary file to yield a filename relative to the primary File:
1463      * 
1464      *   1. If string ends with `?` character, remove the last `?` and mark
1465      *     the resulting secondary file as optional.
1466      *   2. If string begins with one or more caret `^` characters, for each
1467      *     caret, remove the last file extension from the path (the last
1468      *     period `.` and all following characters).  If there are no file
1469      *     extensions, the path is unchanged.
1470      *   3. Append the remainder of the string to the end of the file path.
1471      */
1472     @secondaryFilesDSL Union!(None, SecondaryFileSchema, SecondaryFileSchema[]) secondaryFiles_;
1473     /**
1474      * Only valid when `type: File` or is an array of `items: File`.
1475      * 
1476      * A value of `true` indicates that the file is read or written
1477      * sequentially without seeking.  An implementation may use this flag to
1478      * indicate whether it is valid to stream file contents using a named
1479      * pipe.  Default: `false`.
1480      */
1481     @defaultValue(q"<false>") bool streamable_;
1482     /**
1483      * Only valid when `type: File` or is an array of `items: File`.
1484      * 
1485      * This must be one or more IRIs of concept nodes
1486      * that represents file formats which are allowed as input to this
1487      * parameter, preferably defined within an ontology.  If no ontology is
1488      * available, file formats may be tested by exact match.
1489      */
1490     @link(LinkResolver.id) Union!(None, string, string[], Expression) format_;
1491     /**
1492      * Only valid when `type: File` or is an array of `items: File`.
1493      * 
1494      * If true, the file (or each file in the array) must be a UTF-8
1495      * text file 64 KiB or smaller, and the implementation must read
1496      * the entire contents of the file (or file array) and place it
1497      * in the `contents` field of the File object for use by
1498      * expressions.  If the size of the file is greater than 64 KiB,
1499      * the implementation must raise a fatal error.
1500      */
1501     Union!(None, bool) loadContents_;
1502     /**
1503      * Only valid when `type: Directory` or is an array of `items: Directory`.
1504      * 
1505      * Specify the desired behavior for loading the `listing` field of
1506      * a Directory object for use by expressions.
1507      * 
1508      * The order of precedence for loadListing is:
1509      * 
1510      *   1. `loadListing` on an individual parameter
1511      *   2. Inherited from `LoadListingRequirement`
1512      *   3. By default: `no_listing`
1513      */
1514     Union!(None, LoadListingEnum) loadListing_;
1515     /**
1516      * Describes how to turn this object into command line arguments.
1517      */
1518     Union!(None, CommandLineBinding) inputBinding_;
1519 
1520     mixin genBody;
1521 }
1522 
1523 ///
1524 class CommandInputRecordSchema : RecordSchemaBase
1525 {
1526     /**
1527      * Defines the fields of the record.
1528      */
1529     @idMap("name", "type") Union!(None, CommandInputRecordField[]) fields_;
1530     /**
1531      * Must be `record`
1532      */
1533     static immutable type_ = "record";
1534     /**
1535      * A short, human-readable label of this object.
1536      */
1537     Union!(None, string) label_;
1538     /**
1539      * A documentation string for this object, or an array of strings which should be concatenated.
1540      */
1541     Union!(None, string, string[]) doc_;
1542     /**
1543      * The identifier for this type
1544      */
1545     @id Union!(None, string) name_;
1546     /**
1547      * Describes how to turn this object into command line arguments.
1548      */
1549     Union!(None, CommandLineBinding) inputBinding_;
1550 
1551     mixin genBody;
1552 }
1553 
1554 ///
1555 class CommandInputEnumSchema : RecordSchemaBase
1556 {
1557     /**
1558      * The identifier for this type
1559      */
1560     @id Union!(None, string) name_;
1561     /**
1562      * Defines the set of valid symbols.
1563      */
1564     @link(LinkResolver.id) string[] symbols_;
1565     /**
1566      * Must be `enum`
1567      */
1568     static immutable type_ = "enum";
1569     /**
1570      * A short, human-readable label of this object.
1571      */
1572     Union!(None, string) label_;
1573     /**
1574      * A documentation string for this object, or an array of strings which should be concatenated.
1575      */
1576     Union!(None, string, string[]) doc_;
1577     /**
1578      * Describes how to turn this object into command line arguments.
1579      */
1580     Union!(None, CommandLineBinding) inputBinding_;
1581 
1582     mixin genBody;
1583 }
1584 
1585 ///
1586 class CommandInputArraySchema : RecordSchemaBase
1587 {
1588     /**
1589      * Defines the type of the array elements.
1590      */
1591     Union!(CWLType, CommandInputRecordSchema, CommandInputEnumSchema, CommandInputArraySchema, string, Union!(CWLType, CommandInputRecordSchema, CommandInputEnumSchema, CommandInputArraySchema, string)[]) items_;
1592     /**
1593      * Must be `array`
1594      */
1595     static immutable type_ = "array";
1596     /**
1597      * A short, human-readable label of this object.
1598      */
1599     Union!(None, string) label_;
1600     /**
1601      * A documentation string for this object, or an array of strings which should be concatenated.
1602      */
1603     Union!(None, string, string[]) doc_;
1604     /**
1605      * The identifier for this type
1606      */
1607     @id Union!(None, string) name_;
1608     /**
1609      * Describes how to turn this object into command line arguments.
1610      */
1611     Union!(None, CommandLineBinding) inputBinding_;
1612 
1613     mixin genBody;
1614 }
1615 
1616 ///
1617 class CommandOutputRecordField : RecordSchemaBase
1618 {
1619     /**
1620      * A documentation string for this object, or an array of strings which should be concatenated.
1621      */
1622     Union!(None, string, string[]) doc_;
1623     /**
1624      * The name of the field
1625      */
1626     @id string name_;
1627     /**
1628      * The field type
1629      */
1630     @typeDSL Union!(CWLType, CommandOutputRecordSchema, CommandOutputEnumSchema, CommandOutputArraySchema, string, Union!(CWLType, CommandOutputRecordSchema, CommandOutputEnumSchema, CommandOutputArraySchema, string)[]) type_;
1631     /**
1632      * A short, human-readable label of this object.
1633      */
1634     Union!(None, string) label_;
1635     /**
1636      * Only valid when `type: File` or is an array of `items: File`.
1637      * 
1638      * Provides a pattern or expression specifying files or
1639      * directories that should be included alongside the primary
1640      * file.  Secondary files may be required or optional.  When not
1641      * explicitly specified, secondary files specified for `inputs`
1642      * are required and `outputs` are optional.  An implementation
1643      * must include matching Files and Directories in the
1644      * `secondaryFiles` property of the primary file.  These Files
1645      * and Directories must be transferred and staged alongside the
1646      * primary file.  An implementation may fail workflow execution
1647      * if a required secondary file does not exist.
1648      * 
1649      * If the value is an expression, the value of `self` in the expression
1650      * must be the primary input or output File object to which this binding
1651      * applies.  The `basename`, `nameroot` and `nameext` fields must be
1652      * present in `self`.  For `CommandLineTool` outputs the `path` field must
1653      * also be present.  The expression must return a filename string relative
1654      * to the path to the primary File, a File or Directory object with either
1655      * `path` or `location` and `basename` fields set, or an array consisting
1656      * of strings or File or Directory objects.  It is legal to reference an
1657      * unchanged File or Directory object taken from input as a secondaryFile.
1658      * The expression may return "null" in which case there is no secondaryFile
1659      * from that expression.
1660      * 
1661      * To work on non-filename-preserving storage systems, portable tool
1662      * descriptions should avoid constructing new values from `location`, but
1663      * should construct relative references using `basename` or `nameroot`
1664      * instead.
1665      * 
1666      * If a value in `secondaryFiles` is a string that is not an expression,
1667      * it specifies that the following pattern should be applied to the path
1668      * of the primary file to yield a filename relative to the primary File:
1669      * 
1670      *   1. If string ends with `?` character, remove the last `?` and mark
1671      *     the resulting secondary file as optional.
1672      *   2. If string begins with one or more caret `^` characters, for each
1673      *     caret, remove the last file extension from the path (the last
1674      *     period `.` and all following characters).  If there are no file
1675      *     extensions, the path is unchanged.
1676      *   3. Append the remainder of the string to the end of the file path.
1677      */
1678     @secondaryFilesDSL Union!(None, SecondaryFileSchema, SecondaryFileSchema[]) secondaryFiles_;
1679     /**
1680      * Only valid when `type: File` or is an array of `items: File`.
1681      * 
1682      * A value of `true` indicates that the file is read or written
1683      * sequentially without seeking.  An implementation may use this flag to
1684      * indicate whether it is valid to stream file contents using a named
1685      * pipe.  Default: `false`.
1686      */
1687     @defaultValue(q"<false>") bool streamable_;
1688     /**
1689      * Only valid when `type: File` or is an array of `items: File`.
1690      * 
1691      * This is the file format that will be assigned to the output
1692      * File object.
1693      */
1694     @link(LinkResolver.id) Union!(None, string, Expression) format_;
1695     /**
1696      * Describes how to generate this output object based on the files
1697      * produced by a CommandLineTool
1698      */
1699     Union!(None, CommandOutputBinding) outputBinding_;
1700 
1701     mixin genBody;
1702 }
1703 
1704 ///
1705 class CommandOutputRecordSchema : RecordSchemaBase
1706 {
1707     /**
1708      * Defines the fields of the record.
1709      */
1710     @idMap("name", "type") Union!(None, CommandOutputRecordField[]) fields_;
1711     /**
1712      * Must be `record`
1713      */
1714     static immutable type_ = "record";
1715     /**
1716      * A short, human-readable label of this object.
1717      */
1718     Union!(None, string) label_;
1719     /**
1720      * A documentation string for this object, or an array of strings which should be concatenated.
1721      */
1722     Union!(None, string, string[]) doc_;
1723     /**
1724      * The identifier for this type
1725      */
1726     @id Union!(None, string) name_;
1727 
1728     mixin genBody;
1729 }
1730 
1731 ///
1732 class CommandOutputEnumSchema : RecordSchemaBase
1733 {
1734     /**
1735      * The identifier for this type
1736      */
1737     @id Union!(None, string) name_;
1738     /**
1739      * Defines the set of valid symbols.
1740      */
1741     @link(LinkResolver.id) string[] symbols_;
1742     /**
1743      * Must be `enum`
1744      */
1745     static immutable type_ = "enum";
1746     /**
1747      * A short, human-readable label of this object.
1748      */
1749     Union!(None, string) label_;
1750     /**
1751      * A documentation string for this object, or an array of strings which should be concatenated.
1752      */
1753     Union!(None, string, string[]) doc_;
1754 
1755     mixin genBody;
1756 }
1757 
1758 ///
1759 class CommandOutputArraySchema : RecordSchemaBase
1760 {
1761     /**
1762      * Defines the type of the array elements.
1763      */
1764     Union!(CWLType, CommandOutputRecordSchema, CommandOutputEnumSchema, CommandOutputArraySchema, string, Union!(CWLType, CommandOutputRecordSchema, CommandOutputEnumSchema, CommandOutputArraySchema, string)[]) items_;
1765     /**
1766      * Must be `array`
1767      */
1768     static immutable type_ = "array";
1769     /**
1770      * A short, human-readable label of this object.
1771      */
1772     Union!(None, string) label_;
1773     /**
1774      * A documentation string for this object, or an array of strings which should be concatenated.
1775      */
1776     Union!(None, string, string[]) doc_;
1777     /**
1778      * The identifier for this type
1779      */
1780     @id Union!(None, string) name_;
1781 
1782     mixin genBody;
1783 }
1784 
1785 /**
1786  * An input parameter for a CommandLineTool.
1787  */
1788 class CommandInputParameter : RecordSchemaBase
1789 {
1790     /**
1791      * A short, human-readable label of this object.
1792      */
1793     Union!(None, string) label_;
1794     /**
1795      * Only valid when `type: File` or is an array of `items: File`.
1796      * 
1797      * Provides a pattern or expression specifying files or
1798      * directories that should be included alongside the primary
1799      * file.  Secondary files may be required or optional.  When not
1800      * explicitly specified, secondary files specified for `inputs`
1801      * are required and `outputs` are optional.  An implementation
1802      * must include matching Files and Directories in the
1803      * `secondaryFiles` property of the primary file.  These Files
1804      * and Directories must be transferred and staged alongside the
1805      * primary file.  An implementation may fail workflow execution
1806      * if a required secondary file does not exist.
1807      * 
1808      * If the value is an expression, the value of `self` in the expression
1809      * must be the primary input or output File object to which this binding
1810      * applies.  The `basename`, `nameroot` and `nameext` fields must be
1811      * present in `self`.  For `CommandLineTool` outputs the `path` field must
1812      * also be present.  The expression must return a filename string relative
1813      * to the path to the primary File, a File or Directory object with either
1814      * `path` or `location` and `basename` fields set, or an array consisting
1815      * of strings or File or Directory objects.  It is legal to reference an
1816      * unchanged File or Directory object taken from input as a secondaryFile.
1817      * The expression may return "null" in which case there is no secondaryFile
1818      * from that expression.
1819      * 
1820      * To work on non-filename-preserving storage systems, portable tool
1821      * descriptions should avoid constructing new values from `location`, but
1822      * should construct relative references using `basename` or `nameroot`
1823      * instead.
1824      * 
1825      * If a value in `secondaryFiles` is a string that is not an expression,
1826      * it specifies that the following pattern should be applied to the path
1827      * of the primary file to yield a filename relative to the primary File:
1828      * 
1829      *   1. If string ends with `?` character, remove the last `?` and mark
1830      *     the resulting secondary file as optional.
1831      *   2. If string begins with one or more caret `^` characters, for each
1832      *     caret, remove the last file extension from the path (the last
1833      *     period `.` and all following characters).  If there are no file
1834      *     extensions, the path is unchanged.
1835      *   3. Append the remainder of the string to the end of the file path.
1836      */
1837     @secondaryFilesDSL Union!(None, SecondaryFileSchema, SecondaryFileSchema[]) secondaryFiles_;
1838     /**
1839      * Only valid when `type: File` or is an array of `items: File`.
1840      * 
1841      * A value of `true` indicates that the file is read or written
1842      * sequentially without seeking.  An implementation may use this flag to
1843      * indicate whether it is valid to stream file contents using a named
1844      * pipe.  Default: `false`.
1845      */
1846     @defaultValue(q"<false>") bool streamable_;
1847     /**
1848      * A documentation string for this object, or an array of strings which should be concatenated.
1849      */
1850     Union!(None, string, string[]) doc_;
1851     /**
1852      * The unique identifier for this object.
1853      */
1854     @id Union!(None, string) id_;
1855     /**
1856      * Only valid when `type: File` or is an array of `items: File`.
1857      * 
1858      * This must be one or more IRIs of concept nodes
1859      * that represents file formats which are allowed as input to this
1860      * parameter, preferably defined within an ontology.  If no ontology is
1861      * available, file formats may be tested by exact match.
1862      */
1863     @link(LinkResolver.id) Union!(None, string, string[], Expression) format_;
1864     /**
1865      * Only valid when `type: File` or is an array of `items: File`.
1866      * 
1867      * If true, the file (or each file in the array) must be a UTF-8
1868      * text file 64 KiB or smaller, and the implementation must read
1869      * the entire contents of the file (or file array) and place it
1870      * in the `contents` field of the File object for use by
1871      * expressions.  If the size of the file is greater than 64 KiB,
1872      * the implementation must raise a fatal error.
1873      */
1874     Union!(None, bool) loadContents_;
1875     /**
1876      * Only valid when `type: Directory` or is an array of `items: Directory`.
1877      * 
1878      * Specify the desired behavior for loading the `listing` field of
1879      * a Directory object for use by expressions.
1880      * 
1881      * The order of precedence for loadListing is:
1882      * 
1883      *   1. `loadListing` on an individual parameter
1884      *   2. Inherited from `LoadListingRequirement`
1885      *   3. By default: `no_listing`
1886      */
1887     Union!(None, LoadListingEnum) loadListing_;
1888     /**
1889      * The default value to use for this parameter if the parameter is missing
1890      * from the input object, or if the value of the parameter in the input
1891      * object is `null`.  Default values are applied before evaluating expressions
1892      * (e.g. dependent `valueFrom` fields).
1893      */
1894     Union!(None, CWLObjectType) default_;
1895     /**
1896      * Specify valid types of data that may be assigned to this parameter.
1897      */
1898     @typeDSL Union!(CWLType, stdin, CommandInputRecordSchema, CommandInputEnumSchema, CommandInputArraySchema, string, Union!(CWLType, CommandInputRecordSchema, CommandInputEnumSchema, CommandInputArraySchema, string)[]) type_;
1899     /**
1900      * Describes how to turn the input parameters of a process into
1901      * command line arguments.
1902      */
1903     Union!(None, CommandLineBinding) inputBinding_;
1904 
1905     mixin genBody;
1906 }
1907 
1908 /**
1909  * An output parameter for a CommandLineTool.
1910  */
1911 class CommandOutputParameter : RecordSchemaBase
1912 {
1913     /**
1914      * A short, human-readable label of this object.
1915      */
1916     Union!(None, string) label_;
1917     /**
1918      * Only valid when `type: File` or is an array of `items: File`.
1919      * 
1920      * Provides a pattern or expression specifying files or
1921      * directories that should be included alongside the primary
1922      * file.  Secondary files may be required or optional.  When not
1923      * explicitly specified, secondary files specified for `inputs`
1924      * are required and `outputs` are optional.  An implementation
1925      * must include matching Files and Directories in the
1926      * `secondaryFiles` property of the primary file.  These Files
1927      * and Directories must be transferred and staged alongside the
1928      * primary file.  An implementation may fail workflow execution
1929      * if a required secondary file does not exist.
1930      * 
1931      * If the value is an expression, the value of `self` in the expression
1932      * must be the primary input or output File object to which this binding
1933      * applies.  The `basename`, `nameroot` and `nameext` fields must be
1934      * present in `self`.  For `CommandLineTool` outputs the `path` field must
1935      * also be present.  The expression must return a filename string relative
1936      * to the path to the primary File, a File or Directory object with either
1937      * `path` or `location` and `basename` fields set, or an array consisting
1938      * of strings or File or Directory objects.  It is legal to reference an
1939      * unchanged File or Directory object taken from input as a secondaryFile.
1940      * The expression may return "null" in which case there is no secondaryFile
1941      * from that expression.
1942      * 
1943      * To work on non-filename-preserving storage systems, portable tool
1944      * descriptions should avoid constructing new values from `location`, but
1945      * should construct relative references using `basename` or `nameroot`
1946      * instead.
1947      * 
1948      * If a value in `secondaryFiles` is a string that is not an expression,
1949      * it specifies that the following pattern should be applied to the path
1950      * of the primary file to yield a filename relative to the primary File:
1951      * 
1952      *   1. If string ends with `?` character, remove the last `?` and mark
1953      *     the resulting secondary file as optional.
1954      *   2. If string begins with one or more caret `^` characters, for each
1955      *     caret, remove the last file extension from the path (the last
1956      *     period `.` and all following characters).  If there are no file
1957      *     extensions, the path is unchanged.
1958      *   3. Append the remainder of the string to the end of the file path.
1959      */
1960     @secondaryFilesDSL Union!(None, SecondaryFileSchema, SecondaryFileSchema[]) secondaryFiles_;
1961     /**
1962      * Only valid when `type: File` or is an array of `items: File`.
1963      * 
1964      * A value of `true` indicates that the file is read or written
1965      * sequentially without seeking.  An implementation may use this flag to
1966      * indicate whether it is valid to stream file contents using a named
1967      * pipe.  Default: `false`.
1968      */
1969     @defaultValue(q"<false>") bool streamable_;
1970     /**
1971      * A documentation string for this object, or an array of strings which should be concatenated.
1972      */
1973     Union!(None, string, string[]) doc_;
1974     /**
1975      * The unique identifier for this object.
1976      */
1977     @id Union!(None, string) id_;
1978     /**
1979      * Only valid when `type: File` or is an array of `items: File`.
1980      * 
1981      * This is the file format that will be assigned to the output
1982      * File object.
1983      */
1984     @link(LinkResolver.id) Union!(None, string, Expression) format_;
1985     /**
1986      * Specify valid types of data that may be assigned to this parameter.
1987      */
1988     @typeDSL Union!(CWLType, stdout, stderr, CommandOutputRecordSchema, CommandOutputEnumSchema, CommandOutputArraySchema, string, Union!(CWLType, CommandOutputRecordSchema, CommandOutputEnumSchema, CommandOutputArraySchema, string)[]) type_;
1989     /**
1990      * Describes how to generate this output object based on the files produced by a CommandLineTool
1991      */
1992     Union!(None, CommandOutputBinding) outputBinding_;
1993 
1994     mixin genBody;
1995 }
1996 
1997 /**
1998  * Only valid as a `type` for a `CommandLineTool` input with no
1999  * `inputBinding` set. `stdin` must not be specified at the `CommandLineTool`
2000  * level.
2001  * 
2002  * The following
2003  * ```
2004  * inputs:
2005  *    an_input_name:
2006  *    type: stdin
2007  * ```
2008  * is equivalent to
2009  * ```
2010  * inputs:
2011  *   an_input_name:
2012  *     type: File
2013  *     streamable: true
2014  * 
2015  * stdin: $(inputs.an_input_name.path)
2016  * ```
2017  */
2018 class stdin : EnumSchemaBase
2019 {
2020     ///
2021     enum Symbol
2022     {
2023         s0 = "stdin", ///
2024     }
2025 
2026     Symbol value;
2027 
2028     mixin genBody;
2029 }
2030 
2031 /**
2032  * Only valid as a `type` for a `CommandLineTool` output with no
2033  * `outputBinding` set.
2034  * 
2035  * The following
2036  * ```
2037  * outputs:
2038  *   an_output_name:
2039  *     type: stdout
2040  * 
2041  * stdout: a_stdout_file
2042  * ```
2043  * is equivalent to
2044  * ```
2045  * outputs:
2046  *   an_output_name:
2047  *     type: File
2048  *     streamable: true
2049  *     outputBinding:
2050  *       glob: a_stdout_file
2051  * 
2052  * stdout: a_stdout_file
2053  * ```
2054  * 
2055  * If there is no `stdout` name provided, a random filename will be created.
2056  * For example, the following
2057  * ```
2058  * outputs:
2059  *   an_output_name:
2060  *     type: stdout
2061  * ```
2062  * is equivalent to
2063  * ```
2064  * outputs:
2065  *   an_output_name:
2066  *     type: File
2067  *     streamable: true
2068  *     outputBinding:
2069  *       glob: random_stdout_filenameABCDEFG
2070  * 
2071  * stdout: random_stdout_filenameABCDEFG
2072  * ```
2073  * 
2074  * If the `CommandLineTool` contains logically chained commands
2075  * (e.g. `echo a && echo b`) `stdout` must include the output of
2076  * every command.
2077  */
2078 class stdout : EnumSchemaBase
2079 {
2080     ///
2081     enum Symbol
2082     {
2083         s0 = "stdout", ///
2084     }
2085 
2086     Symbol value;
2087 
2088     mixin genBody;
2089 }
2090 
2091 /**
2092  * Only valid as a `type` for a `CommandLineTool` output with no
2093  * `outputBinding` set.
2094  * 
2095  * The following
2096  * ```
2097  * outputs:
2098  *   an_output_name:
2099  *   type: stderr
2100  * 
2101  * stderr: a_stderr_file
2102  * ```
2103  * is equivalent to
2104  * ```
2105  * outputs:
2106  *   an_output_name:
2107  *     type: File
2108  *     streamable: true
2109  *     outputBinding:
2110  *       glob: a_stderr_file
2111  * 
2112  * stderr: a_stderr_file
2113  * ```
2114  * 
2115  * If there is no `stderr` name provided, a random filename will be created.
2116  * For example, the following
2117  * ```
2118  * outputs:
2119  *   an_output_name:
2120  *     type: stderr
2121  * ```
2122  * is equivalent to
2123  * ```
2124  * outputs:
2125  *   an_output_name:
2126  *     type: File
2127  *     streamable: true
2128  *     outputBinding:
2129  *       glob: random_stderr_filenameABCDEFG
2130  * 
2131  * stderr: random_stderr_filenameABCDEFG
2132  * ```
2133  */
2134 class stderr : EnumSchemaBase
2135 {
2136     ///
2137     enum Symbol
2138     {
2139         s0 = "stderr", ///
2140     }
2141 
2142     Symbol value;
2143 
2144     mixin genBody;
2145 }
2146 
2147 /**
2148  * This defines the schema of the CWL Command Line Tool Description document.
2149  */
2150 @documentRoot class CommandLineTool : RecordSchemaBase
2151 {
2152     /**
2153      * The unique identifier for this object.
2154      * 
2155      * Only useful for `$graph` at `Process` level. Should not be exposed
2156      * to users in graphical or terminal user interfaces.
2157      */
2158     @id Union!(None, string) id_;
2159     /**
2160      * A short, human-readable label of this object.
2161      */
2162     Union!(None, string) label_;
2163     /**
2164      * A documentation string for this object, or an array of strings which should be concatenated.
2165      */
2166     Union!(None, string, string[]) doc_;
2167     /**
2168      * Defines the input parameters of the process.  The process is ready to
2169      * run when all required input parameters are associated with concrete
2170      * values.  Input parameters include a schema for each parameter which is
2171      * used to validate the input object.  It may also be used to build a user
2172      * interface for constructing the input object.
2173      * 
2174      * When accepting an input object, all input parameters must have a value.
2175      * If an input parameter is missing from the input object, it must be
2176      * assigned a value of `null` (or the value of `default` for that
2177      * parameter, if provided) for the purposes of validation and evaluation
2178      * of expressions.
2179      */
2180     @idMap("id", "type") CommandInputParameter[] inputs_;
2181     /**
2182      * Defines the parameters representing the output of the process.  May be
2183      * used to generate and/or validate the output object.
2184      */
2185     @idMap("id", "type") CommandOutputParameter[] outputs_;
2186     /**
2187      * Declares requirements that apply to either the runtime environment or the
2188      * workflow engine that must be met in order to execute this process.  If
2189      * an implementation cannot satisfy all requirements, or a requirement is
2190      * listed which is not recognized by the implementation, it is a fatal
2191      * error and the implementation must not attempt to run the process,
2192      * unless overridden at user option.
2193      */
2194     @idMap("class") Union!(None, Union!(InlineJavascriptRequirement, SchemaDefRequirement, LoadListingRequirement, DockerRequirement, SoftwareRequirement, InitialWorkDirRequirement, EnvVarRequirement, ShellCommandRequirement, ResourceRequirement, WorkReuse, NetworkAccess, InplaceUpdateRequirement, ToolTimeLimit, SubworkflowFeatureRequirement, ScatterFeatureRequirement, MultipleInputFeatureRequirement, StepInputExpressionRequirement, Any)[]) requirements_;
2195     /**
2196      * Declares hints applying to either the runtime environment or the
2197      * workflow engine that may be helpful in executing this process.  It is
2198      * not an error if an implementation cannot satisfy all hints, however
2199      * the implementation may report a warning.
2200      */
2201     @idMap("class") Union!(None, Union!(InlineJavascriptRequirement, SchemaDefRequirement, LoadListingRequirement, DockerRequirement, SoftwareRequirement, InitialWorkDirRequirement, EnvVarRequirement, ShellCommandRequirement, ResourceRequirement, WorkReuse, NetworkAccess, InplaceUpdateRequirement, ToolTimeLimit, SubworkflowFeatureRequirement, ScatterFeatureRequirement, MultipleInputFeatureRequirement, StepInputExpressionRequirement, Any)[]) hints_;
2202     /**
2203      * CWL document version. Always required at the document root. Not
2204      * required for a Process embedded inside another Process.
2205      */
2206     Union!(None, CWLVersion) cwlVersion_;
2207     /**
2208      * An identifier for the type of computational operation, of this Process.
2209      * Especially useful for [`Operation`](Workflow.html#Operation), but can also be used for
2210      * [`CommandLineTool`](CommandLineTool.html#CommandLineTool),
2211      * [`Workflow`](Workflow.html#Workflow), or [ExpressionTool](Workflow.html#ExpressionTool).
2212      * 
2213      * If provided, then this must be an IRI of a concept node that
2214      * represents the type of operation, preferably defined within an ontology.
2215      * 
2216      * For example, in the domain of bioinformatics, one can use an IRI from
2217      * the EDAM Ontology's [Operation concept nodes](http://edamontology.org/operation_0004),
2218      * like [Alignment](http://edamontology.org/operation_2928),
2219      * or [Clustering](http://edamontology.org/operation_3432); or a more
2220      * specific Operation concept like
2221      * [Split read mapping](http://edamontology.org/operation_3199).
2222      */
2223     @link(LinkResolver.id) Union!(None, string[]) intent_;
2224     ///
2225     static immutable class_ = "CommandLineTool";
2226     /**
2227      * Specifies the program to execute.  If an array, the first element of
2228      * the array is the command to execute, and subsequent elements are
2229      * mandatory command line arguments.  The elements in `baseCommand` must
2230      * appear before any command line bindings from `inputBinding` or
2231      * `arguments`.
2232      * 
2233      * If `baseCommand` is not provided or is an empty array, the first
2234      * element of the command line produced after processing `inputBinding` or
2235      * `arguments` must be used as the program to execute.
2236      * 
2237      * If the program includes a path separator character it must
2238      * be an absolute path, otherwise it is an error.  If the program does not
2239      * include a path separator, search the `$PATH` variable in the runtime
2240      * environment of the workflow runner find the absolute path of the
2241      * executable.
2242      */
2243     Union!(None, string, string[]) baseCommand_;
2244     /**
2245      * Command line bindings which are not directly associated with input
2246      * parameters. If the value is a string, it is used as a string literal
2247      * argument. If it is an Expression, the result of the evaluation is used
2248      * as an argument.
2249      */
2250     Union!(None, Union!(string, Expression, CommandLineBinding)[]) arguments_;
2251     /**
2252      * A path to a file whose contents must be piped into the command's
2253      * standard input stream.
2254      */
2255     Union!(None, string, Expression) stdin_;
2256     /**
2257      * Capture the command's standard error stream to a file written to
2258      * the designated output directory.
2259      * 
2260      * If `stderr` is a string, it specifies the file name to use.
2261      * 
2262      * If `stderr` is an expression, the expression is evaluated and must
2263      * return a string with the file name to use to capture stderr.  If the
2264      * return value is not a string, or the resulting path contains illegal
2265      * characters (such as the path separator `/`) it is an error.
2266      */
2267     Union!(None, string, Expression) stderr_;
2268     /**
2269      * Capture the command's standard output stream to a file written to
2270      * the designated output directory.
2271      * 
2272      * If the `CommandLineTool` contains logically chained commands
2273      * (e.g. `echo a && echo b`) `stdout` must include the output of
2274      * every command.
2275      * 
2276      * If `stdout` is a string, it specifies the file name to use.
2277      * 
2278      * If `stdout` is an expression, the expression is evaluated and must
2279      * return a string with the file name to use to capture stdout.  If the
2280      * return value is not a string, or the resulting path contains illegal
2281      * characters (such as the path separator `/`) it is an error.
2282      */
2283     Union!(None, string, Expression) stdout_;
2284     /**
2285      * Exit codes that indicate the process completed successfully.
2286      * 
2287      * If not specified, only exit code 0 is considered success.
2288      */
2289     Union!(None, int[]) successCodes_;
2290     /**
2291      * Exit codes that indicate the process failed due to a possibly
2292      * temporary condition, where executing the process with the same
2293      * runtime environment and inputs may produce different results.
2294      * 
2295      * If not specified, no exit codes are considered temporary failure.
2296      */
2297     Union!(None, int[]) temporaryFailCodes_;
2298     /**
2299      * Exit codes that indicate the process failed due to a permanent logic error, where executing the process with the same runtime environment and same inputs is expected to always fail.
2300      * If not specified, all exit codes except 0 are considered permanent failure.
2301      */
2302     Union!(None, int[]) permanentFailCodes_;
2303 
2304     mixin genBody;
2305 }
2306 
2307 /**
2308  * Indicates that a workflow component should be run in a
2309  * [Docker](https://docker.com) or Docker-compatible (such as
2310  * [Singularity](https://www.sylabs.io/) and [udocker](https://github.com/indigo-dc/udocker)) container environment and
2311  * specifies how to fetch or build the image.
2312  * 
2313  * If a CommandLineTool lists `DockerRequirement` under
2314  * `hints` (or `requirements`), it may (or must) be run in the specified Docker
2315  * container.
2316  * 
2317  * The platform must first acquire or install the correct Docker image as
2318  * specified by `dockerPull`, `dockerImport`, `dockerLoad` or `dockerFile`.
2319  * 
2320  * The platform must execute the tool in the container using `docker run` with
2321  * the appropriate Docker image and tool command line.
2322  * 
2323  * The workflow platform may provide input files and the designated output
2324  * directory through the use of volume bind mounts.  The platform should rewrite
2325  * file paths in the input object to correspond to the Docker bind mounted
2326  * locations. That is, the platform should rewrite values in the parameter context
2327  * such as `runtime.outdir`, `runtime.tmpdir` and others to be valid paths
2328  * within the container. The platform must ensure that `runtime.outdir` and
2329  * `runtime.tmpdir` are distinct directories.
2330  * 
2331  * When running a tool contained in Docker, the workflow platform must not
2332  * assume anything about the contents of the Docker container, such as the
2333  * presence or absence of specific software, except to assume that the
2334  * generated command line represents a valid command within the runtime
2335  * environment of the container.
2336  * 
2337  * A container image may specify an
2338  * [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint)
2339  * and/or
2340  * [CMD](https://docs.docker.com/engine/reference/builder/#cmd).
2341  * Command line arguments will be appended after all elements of
2342  * ENTRYPOINT, and will override all elements specified using CMD (in
2343  * other words, CMD is only used when the CommandLineTool definition
2344  * produces an empty command line).
2345  * 
2346  * Use of implicit ENTRYPOINT or CMD are discouraged due to reproducibility
2347  * concerns of the implicit hidden execution point (For further discussion, see
2348  * [https://doi.org/10.12688/f1000research.15140.1](https://doi.org/10.12688/f1000research.15140.1)). Portable
2349  * CommandLineTool wrappers in which use of a container is optional must not rely on ENTRYPOINT or CMD.
2350  * CommandLineTools which do rely on ENTRYPOINT or CMD must list `DockerRequirement` in the
2351  * `requirements` section.
2352  * 
2353  * ## Interaction with other requirements
2354  * 
2355  * If [EnvVarRequirement](#EnvVarRequirement) is specified alongside a
2356  * DockerRequirement, the environment variables must be provided to Docker
2357  * using `--env` or `--env-file` and interact with the container's preexisting
2358  * environment as defined by Docker.
2359  */
2360 class DockerRequirement : RecordSchemaBase
2361 {
2362     /**
2363      * Always 'DockerRequirement'
2364      */
2365     static immutable class_ = "DockerRequirement";
2366     /**
2367      * Specify a Docker image to retrieve using `docker pull`. Can contain the
2368      * immutable digest to ensure an exact container is used:
2369      * `dockerPull: ubuntu@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2`
2370      */
2371     Union!(None, string) dockerPull_;
2372     /**
2373      * Specify an HTTP URL from which to download a Docker image using `docker load`.
2374      */
2375     Union!(None, string) dockerLoad_;
2376     /**
2377      * Supply the contents of a Dockerfile which will be built using `docker build`.
2378      */
2379     Union!(None, string) dockerFile_;
2380     /**
2381      * Provide HTTP URL to download and gunzip a Docker images using `docker import.
2382      */
2383     Union!(None, string) dockerImport_;
2384     /**
2385      * The image id that will be used for `docker run`.  May be a
2386      * human-readable image name or the image identifier hash.  May be skipped
2387      * if `dockerPull` is specified, in which case the `dockerPull` image id
2388      * must be used.
2389      */
2390     Union!(None, string) dockerImageId_;
2391     /**
2392      * Set the designated output directory to a specific location inside the
2393      * Docker container.
2394      */
2395     Union!(None, string) dockerOutputDirectory_;
2396 
2397     mixin genBody;
2398 }
2399 
2400 /**
2401  * A list of software packages that should be configured in the environment of
2402  * the defined process.
2403  */
2404 class SoftwareRequirement : RecordSchemaBase
2405 {
2406     /**
2407      * Always 'SoftwareRequirement'
2408      */
2409     static immutable class_ = "SoftwareRequirement";
2410     /**
2411      * The list of software to be configured.
2412      */
2413     @idMap("package", "specs") SoftwarePackage[] packages_;
2414 
2415     mixin genBody;
2416 }
2417 
2418 ///
2419 class SoftwarePackage : RecordSchemaBase
2420 {
2421     /**
2422      * The name of the software to be made available. If the name is
2423      * common, inconsistent, or otherwise ambiguous it should be combined with
2424      * one or more identifiers in the `specs` field.
2425      */
2426     string package_;
2427     /**
2428      * The (optional) versions of the software that are known to be
2429      * compatible.
2430      */
2431     Union!(None, string[]) version_;
2432     /**
2433      * One or more [IRI](https://en.wikipedia.org/wiki/Internationalized_Resource_Identifier)s
2434      * identifying resources for installing or enabling the software named in
2435      * the `package` field. Implementations may provide resolvers which map
2436      * these software identifier IRIs to some configuration action; or they can
2437      * use only the name from the `package` field on a best effort basis.
2438      * 
2439      * For example, the IRI https://packages.debian.org/bowtie could
2440      * be resolved with `apt-get install bowtie`. The IRI
2441      * https://anaconda.org/bioconda/bowtie could be resolved with `conda
2442      * install -c bioconda bowtie`.
2443      * 
2444      * IRIs can also be system independent and used to map to a specific
2445      * software installation or selection mechanism.
2446      * Using [RRID](https://www.identifiers.org/rrid/) as an example:
2447      * https://identifiers.org/rrid/RRID:SCR_005476
2448      * could be fulfilled using the above-mentioned Debian or bioconda
2449      * package, a local installation managed by [Environment Modules](https://modules.sourceforge.net/),
2450      * or any other mechanism the platform chooses. IRIs can also be from
2451      * identifier sources that are discipline specific yet still system
2452      * independent. As an example, the equivalent [ELIXIR Tools and Data
2453      * Service Registry](https://bio.tools) IRI to the previous RRID example is
2454      * https://bio.tools/tool/bowtie2/version/2.2.8.
2455      * If supported by a given registry, implementations are encouraged to
2456      * query these system independent software identifier IRIs directly for
2457      * links to packaging systems.
2458      * 
2459      * A site specific IRI can be listed as well. For example, an academic
2460      * computing cluster using Environment Modules could list the IRI
2461      * `https://hpc.example.edu/modules/bowtie-tbb/1.22` to indicate that
2462      * `module load bowtie-tbb/1.1.2` should be executed to make available
2463      * `bowtie` version 1.1.2 compiled with the TBB library prior to running
2464      * the accompanying Workflow or CommandLineTool. Note that the example IRI
2465      * is specific to a particular institution and computing environment as
2466      * the Environment Modules system does not have a common namespace or
2467      * standardized naming convention.
2468      * 
2469      * This last example is the least portable and should only be used if
2470      * mechanisms based off of the `package` field or more generic IRIs are
2471      * unavailable or unsuitable. While harmless to other sites, site specific
2472      * software IRIs should be left out of shared CWL descriptions to avoid
2473      * clutter.
2474      */
2475     @link() Union!(None, string[]) specs_;
2476 
2477     mixin genBody;
2478 }
2479 
2480 /**
2481  * Define a file or subdirectory that must be staged to a particular
2482  * place prior to executing the command line tool.  May be the result
2483  * of executing an expression, such as building a configuration file
2484  * from a template.
2485  * 
2486  * Usually files are staged within the [designated output directory](#Runtime_environment).
2487  * However, under certain circumstances, files may be staged at
2488  * arbitrary locations, see discussion for `entryname`.
2489  */
2490 class Dirent : RecordSchemaBase
2491 {
2492     /**
2493      * The "target" name of the file or subdirectory.  If `entry` is
2494      * a File or Directory, the `entryname` field overrides the value
2495      * of `basename` of the File or Directory object.
2496      * 
2497      * * Required when `entry` evaluates to file contents only
2498      * * Optional when `entry` evaluates to a File or Directory object with a `basename`
2499      * * Invalid when `entry` evaluates to an array of File or Directory objects.
2500      * 
2501      * If `entryname` is a relative path, it specifies a name within
2502      * the designated output directory.  A relative path starting
2503      * with `../` or that resolves to location above the designated output directory is an error.
2504      * 
2505      * If `entryname` is an absolute path (starts with a slash `/`)
2506      * it is an error unless the following conditions are met:
2507      * 
2508      *   * `DockerRequirement` is present in `requirements`
2509      *   * The program is will run inside a software container
2510      *   where, from the perspective of the program, the root
2511      *   filesystem is not shared with any other user or
2512      *   running program.
2513      * 
2514      * In this case, and the above conditions are met, then
2515      * `entryname` may specify the absolute path within the container
2516      * where the file or directory must be placed.
2517      */
2518     Union!(None, string, Expression) entryname_;
2519     /**
2520      * If the value is a string literal or an expression which evaluates to a
2521      * string, a new text file must be created with the string as the file contents.
2522      * 
2523      * If the value is an expression that evaluates to a `File` or
2524      * `Directory` object, or an array of `File` or `Directory`
2525      * objects, this indicates the referenced file or directory
2526      * should be added to the designated output directory prior to
2527      * executing the tool.
2528      * 
2529      * If the value is an expression that evaluates to `null`,
2530      * nothing is added to the designated output directory, the entry
2531      * has no effect.
2532      * 
2533      * If the value is an expression that evaluates to some other
2534      * array, number, or object not consisting of `File` or
2535      * `Directory` objects, a new file must be created with the value
2536      * serialized to JSON text as the file contents.  The JSON
2537      * serialization behavior should match the behavior of string
2538      * interpolation of [Parameter
2539      * references](#Parameter_references).
2540      */
2541     Union!(string, Expression) entry_;
2542     /**
2543      * If true, the File or Directory (or array of Files or
2544      * Directories) declared in `entry` must be writable by the tool.
2545      * 
2546      * Changes to the file or directory must be isolated and not
2547      * visible by any other CommandLineTool process.  This may be
2548      * implemented by making a copy of the original file or
2549      * directory.
2550      * 
2551      * Disruptive changes to the referenced file or directory must not
2552      * be allowed unless `InplaceUpdateRequirement.inplaceUpdate` is true.
2553      * 
2554      * Default false (files and directories read-only by default).
2555      * 
2556      * A directory marked as `writable: true` implies that all files and
2557      * subdirectories are recursively writable as well.
2558      * 
2559      * If `writable` is false, the file may be made available using a
2560      * bind mount or file system link to avoid unnecessary copying of
2561      * the input file.  Command line tools may receive an error on
2562      * attempting to rename or delete files or directories that are
2563      * not explicitly marked as writable.
2564      */
2565     @defaultValue(q"<false>") bool writable_;
2566 
2567     mixin genBody;
2568 }
2569 
2570 /**
2571  * Define a list of files and subdirectories that must be staged by the workflow platform prior to executing the command line tool.
2572  * Normally files are staged within the designated output directory. However, when running inside containers, files may be staged at arbitrary locations, see discussion for [`Dirent.entryname`](#Dirent). Together with `DockerRequirement.dockerOutputDirectory` it is possible to control the locations of both input and output files when running in containers.
2573  */
2574 class InitialWorkDirRequirement : RecordSchemaBase
2575 {
2576     /**
2577      * InitialWorkDirRequirement
2578      */
2579     static immutable class_ = "InitialWorkDirRequirement";
2580     /**
2581      * The list of files or subdirectories that must be staged prior
2582      * to executing the command line tool.
2583      * 
2584      * Return type of each expression must validate as `["null",
2585      * File, Directory, Dirent, {type: array, items: [File,
2586      * Directory]}]`.
2587      * 
2588      * Each `File` or `Directory` that is returned by an Expression
2589      * must be added to the designated output directory prior to
2590      * executing the tool.
2591      * 
2592      * Each `Dirent` record that is listed or returned by an
2593      * expression specifies a file to be created or staged in the
2594      * designated output directory prior to executing the tool.
2595      * 
2596      * Expressions may return null, in which case they have no effect.
2597      * 
2598      * Files or Directories which are listed in the input parameters
2599      * and appear in the `InitialWorkDirRequirement` listing must
2600      * have their `path` set to their staged location.  If the same
2601      * File or Directory appears more than once in the
2602      * `InitialWorkDirRequirement` listing, the implementation must
2603      * choose exactly one value for `path`; how this value is chosen
2604      * is undefined.
2605      */
2606     Union!(Expression, Union!(None, Dirent, Expression, File, Directory, Union!(File, Directory)[])[]) listing_;
2607 
2608     mixin genBody;
2609 }
2610 
2611 /**
2612  * Define a list of environment variables which will be set in the
2613  * execution environment of the tool.  See `EnvironmentDef` for details.
2614  */
2615 class EnvVarRequirement : RecordSchemaBase
2616 {
2617     /**
2618      * Always 'EnvVarRequirement'
2619      */
2620     static immutable class_ = "EnvVarRequirement";
2621     /**
2622      * The list of environment variables.
2623      */
2624     @idMap("envName", "envValue") EnvironmentDef[] envDef_;
2625 
2626     mixin genBody;
2627 }
2628 
2629 /**
2630  * Modify the behavior of CommandLineTool to generate a single string
2631  * containing a shell command line.  Each item in the `arguments` list must
2632  * be joined into a string separated by single spaces and quoted to prevent
2633  * interpretation by the shell, unless `CommandLineBinding` for that argument
2634  * contains `shellQuote: false`.  If `shellQuote: false` is specified, the
2635  * argument is joined into the command string without quoting, which allows
2636  * the use of shell metacharacters such as `|` for pipes.
2637  */
2638 class ShellCommandRequirement : RecordSchemaBase
2639 {
2640     /**
2641      * Always 'ShellCommandRequirement'
2642      */
2643     static immutable class_ = "ShellCommandRequirement";
2644 
2645     mixin genBody;
2646 }
2647 
2648 /**
2649  * Specify basic hardware resource requirements.
2650  * 
2651  * "min" is the minimum amount of a resource that must be reserved to
2652  * schedule a job. If "min" cannot be satisfied, the job should not
2653  * be run.
2654  * 
2655  * "max" is the maximum amount of a resource that the job shall be
2656  * allocated. If a node has sufficient resources, multiple jobs may
2657  * be scheduled on a single node provided each job's "max" resource
2658  * requirements are met. If a job attempts to exceed its resource
2659  * allocation, an implementation may deny additional resources, which
2660  * may result in job failure.
2661  * 
2662  * If both "min" and "max" are specified, an implementation may
2663  * choose to allocate any amount between "min" and "max", with the
2664  * actual allocation provided in the `runtime` object.
2665  * 
2666  * If "min" is specified but "max" is not, then "max" == "min"
2667  * If "max" is specified by "min" is not, then "min" == "max".
2668  * 
2669  * It is an error if max < min.
2670  * 
2671  * It is an error if the value of any of these fields is negative.
2672  * 
2673  * If neither "min" nor "max" is specified for a resource, use the default values below.
2674  */
2675 class ResourceRequirement : RecordSchemaBase
2676 {
2677     /**
2678      * Always 'ResourceRequirement'
2679      */
2680     static immutable class_ = "ResourceRequirement";
2681     /**
2682      * Minimum reserved number of CPU cores (default is 1).
2683      * 
2684      * May be a fractional value to indicate to a scheduling
2685      * algorithm that one core can be allocated to multiple
2686      * jobs. For example, a value of 0.25 indicates that up to 4
2687      * jobs may run in parallel on 1 core.  A value of 1.25 means
2688      * that up to 3 jobs can run on a 4 core system (4/1.25 ≈ 3).
2689      * 
2690      * Processes can only share a core allocation if the sum of each
2691      * of their `ramMax`, `tmpdirMax`, and `outdirMax` requests also
2692      * do not exceed the capacity of the node.
2693      * 
2694      * Processes sharing a core must have the same level of isolation
2695      * (typically a container or VM) that they would normally have.
2696      * 
2697      * The reported number of CPU cores reserved for the process,
2698      * which is available to expressions on the CommandLineTool as
2699      * `runtime.cores`, must be a non-zero integer, and may be
2700      * calculated by rounding up the cores request to the next whole
2701      * number.
2702      * 
2703      * Scheduling systems may allocate fractional CPU resources by
2704      * setting quotas or scheduling weights.  Scheduling systems that
2705      * do not support fractional CPUs may round up the request to the
2706      * next whole number.
2707      */
2708     Union!(None, int, long, float, Expression) coresMin_;
2709     /**
2710      * Maximum reserved number of CPU cores.
2711      * 
2712      * See `coresMin` for discussion about fractional CPU requests.
2713      */
2714     Union!(None, int, long, float, Expression) coresMax_;
2715     /**
2716      * Minimum reserved RAM in mebibytes (2**20) (default is 256)
2717      * 
2718      * May be a fractional value.  If so, the actual RAM request must
2719      * be rounded up to the next whole number.  The reported amount of
2720      * RAM reserved for the process, which is available to
2721      * expressions on the CommandLineTool as `runtime.ram`, must be a
2722      * non-zero integer.
2723      */
2724     Union!(None, int, long, float, Expression) ramMin_;
2725     /**
2726      * Maximum reserved RAM in mebibytes (2**20)
2727      * 
2728      * See `ramMin` for discussion about fractional RAM requests.
2729      */
2730     Union!(None, int, long, float, Expression) ramMax_;
2731     /**
2732      * Minimum reserved filesystem based storage for the designated temporary directory, in mebibytes (2**20) (default is 1024)
2733      * 
2734      * May be a fractional value.  If so, the actual storage request
2735      * must be rounded up to the next whole number.  The reported
2736      * amount of storage reserved for the process, which is available
2737      * to expressions on the CommandLineTool as `runtime.tmpdirSize`,
2738      * must be a non-zero integer.
2739      */
2740     Union!(None, int, long, float, Expression) tmpdirMin_;
2741     /**
2742      * Maximum reserved filesystem based storage for the designated temporary directory, in mebibytes (2**20)
2743      * 
2744      * See `tmpdirMin` for discussion about fractional storage requests.
2745      */
2746     Union!(None, int, long, float, Expression) tmpdirMax_;
2747     /**
2748      * Minimum reserved filesystem based storage for the designated output directory, in mebibytes (2**20) (default is 1024)
2749      * 
2750      * May be a fractional value.  If so, the actual storage request
2751      * must be rounded up to the next whole number.  The reported
2752      * amount of storage reserved for the process, which is available
2753      * to expressions on the CommandLineTool as `runtime.outdirSize`,
2754      * must be a non-zero integer.
2755      */
2756     Union!(None, int, long, float, Expression) outdirMin_;
2757     /**
2758      * Maximum reserved filesystem based storage for the designated output directory, in mebibytes (2**20)
2759      * 
2760      * See `outdirMin` for discussion about fractional storage requests.
2761      */
2762     Union!(None, int, long, float, Expression) outdirMax_;
2763 
2764     mixin genBody;
2765 }
2766 
2767 /**
2768  * For implementations that support reusing output from past work (on
2769  * the assumption that same code and same input produce same
2770  * results), control whether to enable or disable the reuse behavior
2771  * for a particular tool or step (to accommodate situations where that
2772  * assumption is incorrect).  A reused step is not executed but
2773  * instead returns the same output as the original execution.
2774  * 
2775  * If `WorkReuse` is not specified, correct tools should assume it
2776  * is enabled by default.
2777  */
2778 class WorkReuse : RecordSchemaBase
2779 {
2780     /**
2781      * Always 'WorkReuse'
2782      */
2783     static immutable class_ = "WorkReuse";
2784     ///
2785     @defaultValue(q"<true>") Union!(bool, Expression) enableReuse_;
2786 
2787     mixin genBody;
2788 }
2789 
2790 /**
2791  * Indicate whether a process requires outgoing IPv4/IPv6 network
2792  * access.  Choice of IPv4 or IPv6 is implementation and site
2793  * specific, correct tools must support both.
2794  * 
2795  * If `networkAccess` is false or not specified, tools must not
2796  * assume network access, except for localhost (the loopback device).
2797  * 
2798  * If `networkAccess` is true, the tool must be able to make outgoing
2799  * connections to network resources.  Resources may be on a private
2800  * subnet or the public Internet.  However, implementations and sites
2801  * may apply their own security policies to restrict what is
2802  * accessible by the tool.
2803  * 
2804  * Enabling network access does not imply a publicly routable IP
2805  * address or the ability to accept inbound connections.
2806  */
2807 class NetworkAccess : RecordSchemaBase
2808 {
2809     /**
2810      * Always 'NetworkAccess'
2811      */
2812     static immutable class_ = "NetworkAccess";
2813     ///
2814     Union!(bool, Expression) networkAccess_;
2815 
2816     mixin genBody;
2817 }
2818 
2819 /**
2820  * 
2821  * If `inplaceUpdate` is true, then an implementation supporting this
2822  * feature may permit tools to directly update files with `writable:
2823  * true` in InitialWorkDirRequirement.  That is, as an optimization,
2824  * files may be destructively modified in place as opposed to copied
2825  * and updated.
2826  * 
2827  * An implementation must ensure that only one workflow step may
2828  * access a writable file at a time.  It is an error if a file which
2829  * is writable by one workflow step file is accessed (for reading or
2830  * writing) by any other workflow step running independently.
2831  * However, a file which has been updated in a previous completed
2832  * step may be used as input to multiple steps, provided it is
2833  * read-only in every step.
2834  * 
2835  * Workflow steps which modify a file must produce the modified file
2836  * as output.  Downstream steps which further process the file must
2837  * use the output of previous steps, and not refer to a common input
2838  * (this is necessary for both ordering and correctness).
2839  * 
2840  * Workflow authors should provide this in the `hints` section.  The
2841  * intent of this feature is that workflows produce the same results
2842  * whether or not InplaceUpdateRequirement is supported by the
2843  * implementation, and this feature is primarily available as an
2844  * optimization for particular environments.
2845  * 
2846  * Users and implementers should be aware that workflows that
2847  * destructively modify inputs may not be repeatable or reproducible.
2848  * In particular, enabling this feature implies that WorkReuse should
2849  * not be enabled.
2850  */
2851 class InplaceUpdateRequirement : RecordSchemaBase
2852 {
2853     /**
2854      * Always 'InplaceUpdateRequirement'
2855      */
2856     static immutable class_ = "InplaceUpdateRequirement";
2857     ///
2858     bool inplaceUpdate_;
2859 
2860     mixin genBody;
2861 }
2862 
2863 /**
2864  * Set an upper limit on the execution time of a CommandLineTool.
2865  * A CommandLineTool whose execution duration exceeds the time
2866  * limit may be preemptively terminated and considered failed.
2867  * May also be used by batch systems to make scheduling decisions.
2868  * The execution duration excludes external operations, such as
2869  * staging of files, pulling a docker image etc, and only counts
2870  * wall-time for the execution of the command line itself.
2871  */
2872 class ToolTimeLimit : RecordSchemaBase
2873 {
2874     /**
2875      * Always 'ToolTimeLimit'
2876      */
2877     static immutable class_ = "ToolTimeLimit";
2878     /**
2879      * The time limit, in seconds.  A time limit of zero means no
2880      * time limit.  Negative time limits are an error.
2881      */
2882     Union!(int, long, Expression) timelimit_;
2883 
2884     mixin genBody;
2885 }
2886 
2887 ///
2888 class ExpressionToolOutputParameter : RecordSchemaBase
2889 {
2890     /**
2891      * A short, human-readable label of this object.
2892      */
2893     Union!(None, string) label_;
2894     /**
2895      * Only valid when `type: File` or is an array of `items: File`.
2896      * 
2897      * Provides a pattern or expression specifying files or
2898      * directories that should be included alongside the primary
2899      * file.  Secondary files may be required or optional.  When not
2900      * explicitly specified, secondary files specified for `inputs`
2901      * are required and `outputs` are optional.  An implementation
2902      * must include matching Files and Directories in the
2903      * `secondaryFiles` property of the primary file.  These Files
2904      * and Directories must be transferred and staged alongside the
2905      * primary file.  An implementation may fail workflow execution
2906      * if a required secondary file does not exist.
2907      * 
2908      * If the value is an expression, the value of `self` in the expression
2909      * must be the primary input or output File object to which this binding
2910      * applies.  The `basename`, `nameroot` and `nameext` fields must be
2911      * present in `self`.  For `CommandLineTool` outputs the `path` field must
2912      * also be present.  The expression must return a filename string relative
2913      * to the path to the primary File, a File or Directory object with either
2914      * `path` or `location` and `basename` fields set, or an array consisting
2915      * of strings or File or Directory objects.  It is legal to reference an
2916      * unchanged File or Directory object taken from input as a secondaryFile.
2917      * The expression may return "null" in which case there is no secondaryFile
2918      * from that expression.
2919      * 
2920      * To work on non-filename-preserving storage systems, portable tool
2921      * descriptions should avoid constructing new values from `location`, but
2922      * should construct relative references using `basename` or `nameroot`
2923      * instead.
2924      * 
2925      * If a value in `secondaryFiles` is a string that is not an expression,
2926      * it specifies that the following pattern should be applied to the path
2927      * of the primary file to yield a filename relative to the primary File:
2928      * 
2929      *   1. If string ends with `?` character, remove the last `?` and mark
2930      *     the resulting secondary file as optional.
2931      *   2. If string begins with one or more caret `^` characters, for each
2932      *     caret, remove the last file extension from the path (the last
2933      *     period `.` and all following characters).  If there are no file
2934      *     extensions, the path is unchanged.
2935      *   3. Append the remainder of the string to the end of the file path.
2936      */
2937     @secondaryFilesDSL Union!(None, SecondaryFileSchema, SecondaryFileSchema[]) secondaryFiles_;
2938     /**
2939      * Only valid when `type: File` or is an array of `items: File`.
2940      * 
2941      * A value of `true` indicates that the file is read or written
2942      * sequentially without seeking.  An implementation may use this flag to
2943      * indicate whether it is valid to stream file contents using a named
2944      * pipe.  Default: `false`.
2945      */
2946     @defaultValue(q"<false>") bool streamable_;
2947     /**
2948      * A documentation string for this object, or an array of strings which should be concatenated.
2949      */
2950     Union!(None, string, string[]) doc_;
2951     /**
2952      * The unique identifier for this object.
2953      */
2954     @id Union!(None, string) id_;
2955     /**
2956      * Only valid when `type: File` or is an array of `items: File`.
2957      * 
2958      * This is the file format that will be assigned to the output
2959      * File object.
2960      */
2961     @link(LinkResolver.id) Union!(None, string, Expression) format_;
2962     /**
2963      * Specify valid types of data that may be assigned to this parameter.
2964      * Note that this field just acts as a hint, as the outputs of an
2965      * ExpressionTool process are always considered valid.
2966      */
2967     @typeDSL Union!(CWLType, OutputRecordSchema, OutputEnumSchema, OutputArraySchema, string, Union!(CWLType, OutputRecordSchema, OutputEnumSchema, OutputArraySchema, string)[]) type_;
2968 
2969     mixin genBody;
2970 }
2971 
2972 ///
2973 class WorkflowInputParameter : RecordSchemaBase
2974 {
2975     /**
2976      * A short, human-readable label of this object.
2977      */
2978     Union!(None, string) label_;
2979     /**
2980      * Only valid when `type: File` or is an array of `items: File`.
2981      * 
2982      * Provides a pattern or expression specifying files or
2983      * directories that should be included alongside the primary
2984      * file.  Secondary files may be required or optional.  When not
2985      * explicitly specified, secondary files specified for `inputs`
2986      * are required and `outputs` are optional.  An implementation
2987      * must include matching Files and Directories in the
2988      * `secondaryFiles` property of the primary file.  These Files
2989      * and Directories must be transferred and staged alongside the
2990      * primary file.  An implementation may fail workflow execution
2991      * if a required secondary file does not exist.
2992      * 
2993      * If the value is an expression, the value of `self` in the expression
2994      * must be the primary input or output File object to which this binding
2995      * applies.  The `basename`, `nameroot` and `nameext` fields must be
2996      * present in `self`.  For `CommandLineTool` outputs the `path` field must
2997      * also be present.  The expression must return a filename string relative
2998      * to the path to the primary File, a File or Directory object with either
2999      * `path` or `location` and `basename` fields set, or an array consisting
3000      * of strings or File or Directory objects.  It is legal to reference an
3001      * unchanged File or Directory object taken from input as a secondaryFile.
3002      * The expression may return "null" in which case there is no secondaryFile
3003      * from that expression.
3004      * 
3005      * To work on non-filename-preserving storage systems, portable tool
3006      * descriptions should avoid constructing new values from `location`, but
3007      * should construct relative references using `basename` or `nameroot`
3008      * instead.
3009      * 
3010      * If a value in `secondaryFiles` is a string that is not an expression,
3011      * it specifies that the following pattern should be applied to the path
3012      * of the primary file to yield a filename relative to the primary File:
3013      * 
3014      *   1. If string ends with `?` character, remove the last `?` and mark
3015      *     the resulting secondary file as optional.
3016      *   2. If string begins with one or more caret `^` characters, for each
3017      *     caret, remove the last file extension from the path (the last
3018      *     period `.` and all following characters).  If there are no file
3019      *     extensions, the path is unchanged.
3020      *   3. Append the remainder of the string to the end of the file path.
3021      */
3022     @secondaryFilesDSL Union!(None, SecondaryFileSchema, SecondaryFileSchema[]) secondaryFiles_;
3023     /**
3024      * Only valid when `type: File` or is an array of `items: File`.
3025      * 
3026      * A value of `true` indicates that the file is read or written
3027      * sequentially without seeking.  An implementation may use this flag to
3028      * indicate whether it is valid to stream file contents using a named
3029      * pipe.  Default: `false`.
3030      */
3031     @defaultValue(q"<false>") bool streamable_;
3032     /**
3033      * A documentation string for this object, or an array of strings which should be concatenated.
3034      */
3035     Union!(None, string, string[]) doc_;
3036     /**
3037      * The unique identifier for this object.
3038      */
3039     @id Union!(None, string) id_;
3040     /**
3041      * Only valid when `type: File` or is an array of `items: File`.
3042      * 
3043      * This must be one or more IRIs of concept nodes
3044      * that represents file formats which are allowed as input to this
3045      * parameter, preferably defined within an ontology.  If no ontology is
3046      * available, file formats may be tested by exact match.
3047      */
3048     @link(LinkResolver.id) Union!(None, string, string[], Expression) format_;
3049     /**
3050      * Only valid when `type: File` or is an array of `items: File`.
3051      * 
3052      * If true, the file (or each file in the array) must be a UTF-8
3053      * text file 64 KiB or smaller, and the implementation must read
3054      * the entire contents of the file (or file array) and place it
3055      * in the `contents` field of the File object for use by
3056      * expressions.  If the size of the file is greater than 64 KiB,
3057      * the implementation must raise a fatal error.
3058      */
3059     Union!(None, bool) loadContents_;
3060     /**
3061      * Only valid when `type: Directory` or is an array of `items: Directory`.
3062      * 
3063      * Specify the desired behavior for loading the `listing` field of
3064      * a Directory object for use by expressions.
3065      * 
3066      * The order of precedence for loadListing is:
3067      * 
3068      *   1. `loadListing` on an individual parameter
3069      *   2. Inherited from `LoadListingRequirement`
3070      *   3. By default: `no_listing`
3071      */
3072     Union!(None, LoadListingEnum) loadListing_;
3073     /**
3074      * The default value to use for this parameter if the parameter is missing
3075      * from the input object, or if the value of the parameter in the input
3076      * object is `null`.  Default values are applied before evaluating expressions
3077      * (e.g. dependent `valueFrom` fields).
3078      */
3079     Union!(None, CWLObjectType) default_;
3080     /**
3081      * Specify valid types of data that may be assigned to this parameter.
3082      */
3083     @typeDSL Union!(CWLType, InputRecordSchema, InputEnumSchema, InputArraySchema, string, Union!(CWLType, InputRecordSchema, InputEnumSchema, InputArraySchema, string)[]) type_;
3084     /**
3085      * Deprecated.  Preserved for v1.0 backwards compatibility.  Will be removed in
3086      * CWL v2.0.  Use `WorkflowInputParameter.loadContents` instead.
3087      */
3088     Union!(None, InputBinding) inputBinding_;
3089 
3090     mixin genBody;
3091 }
3092 
3093 /**
3094  * An ExpressionTool is a type of Process object that can be run by itself
3095  * or as a Workflow step. It executes a pure Javascript expression that has
3096  * access to the same input parameters as a workflow. It is meant to be used
3097  * sparingly as a way to isolate complex Javascript expressions that need to
3098  * operate on input data and produce some result; perhaps just a
3099  * rearrangement of the inputs. No Docker software container is required
3100  * or allowed.
3101  */
3102 @documentRoot class ExpressionTool : RecordSchemaBase
3103 {
3104     /**
3105      * The unique identifier for this object.
3106      * 
3107      * Only useful for `$graph` at `Process` level. Should not be exposed
3108      * to users in graphical or terminal user interfaces.
3109      */
3110     @id Union!(None, string) id_;
3111     /**
3112      * A short, human-readable label of this object.
3113      */
3114     Union!(None, string) label_;
3115     /**
3116      * A documentation string for this object, or an array of strings which should be concatenated.
3117      */
3118     Union!(None, string, string[]) doc_;
3119     /**
3120      * Defines the input parameters of the process.  The process is ready to
3121      * run when all required input parameters are associated with concrete
3122      * values.  Input parameters include a schema for each parameter which is
3123      * used to validate the input object.  It may also be used to build a user
3124      * interface for constructing the input object.
3125      * 
3126      * When accepting an input object, all input parameters must have a value.
3127      * If an input parameter is missing from the input object, it must be
3128      * assigned a value of `null` (or the value of `default` for that
3129      * parameter, if provided) for the purposes of validation and evaluation
3130      * of expressions.
3131      */
3132     @idMap("id", "type") WorkflowInputParameter[] inputs_;
3133     /**
3134      * Defines the parameters representing the output of the process.  May be
3135      * used to generate and/or validate the output object.
3136      */
3137     @idMap("id", "type") ExpressionToolOutputParameter[] outputs_;
3138     /**
3139      * Declares requirements that apply to either the runtime environment or the
3140      * workflow engine that must be met in order to execute this process.  If
3141      * an implementation cannot satisfy all requirements, or a requirement is
3142      * listed which is not recognized by the implementation, it is a fatal
3143      * error and the implementation must not attempt to run the process,
3144      * unless overridden at user option.
3145      */
3146     @idMap("class") Union!(None, Union!(InlineJavascriptRequirement, SchemaDefRequirement, LoadListingRequirement, DockerRequirement, SoftwareRequirement, InitialWorkDirRequirement, EnvVarRequirement, ShellCommandRequirement, ResourceRequirement, WorkReuse, NetworkAccess, InplaceUpdateRequirement, ToolTimeLimit, SubworkflowFeatureRequirement, ScatterFeatureRequirement, MultipleInputFeatureRequirement, StepInputExpressionRequirement, Any)[]) requirements_;
3147     /**
3148      * Declares hints applying to either the runtime environment or the
3149      * workflow engine that may be helpful in executing this process.  It is
3150      * not an error if an implementation cannot satisfy all hints, however
3151      * the implementation may report a warning.
3152      */
3153     @idMap("class") Union!(None, Union!(InlineJavascriptRequirement, SchemaDefRequirement, LoadListingRequirement, DockerRequirement, SoftwareRequirement, InitialWorkDirRequirement, EnvVarRequirement, ShellCommandRequirement, ResourceRequirement, WorkReuse, NetworkAccess, InplaceUpdateRequirement, ToolTimeLimit, SubworkflowFeatureRequirement, ScatterFeatureRequirement, MultipleInputFeatureRequirement, StepInputExpressionRequirement, Any)[]) hints_;
3154     /**
3155      * CWL document version. Always required at the document root. Not
3156      * required for a Process embedded inside another Process.
3157      */
3158     Union!(None, CWLVersion) cwlVersion_;
3159     /**
3160      * An identifier for the type of computational operation, of this Process.
3161      * Especially useful for [`Operation`](Workflow.html#Operation), but can also be used for
3162      * [`CommandLineTool`](CommandLineTool.html#CommandLineTool),
3163      * [`Workflow`](Workflow.html#Workflow), or [ExpressionTool](Workflow.html#ExpressionTool).
3164      * 
3165      * If provided, then this must be an IRI of a concept node that
3166      * represents the type of operation, preferably defined within an ontology.
3167      * 
3168      * For example, in the domain of bioinformatics, one can use an IRI from
3169      * the EDAM Ontology's [Operation concept nodes](http://edamontology.org/operation_0004),
3170      * like [Alignment](http://edamontology.org/operation_2928),
3171      * or [Clustering](http://edamontology.org/operation_3432); or a more
3172      * specific Operation concept like
3173      * [Split read mapping](http://edamontology.org/operation_3199).
3174      */
3175     @link(LinkResolver.id) Union!(None, string[]) intent_;
3176     ///
3177     static immutable class_ = "ExpressionTool";
3178     /**
3179      * The expression to execute.  The expression must return a plain
3180      * Javascript object which matches the output parameters of the
3181      * ExpressionTool.
3182      */
3183     Expression expression_;
3184 
3185     mixin genBody;
3186 }
3187 
3188 /**
3189  * The input link merge method, described in [WorkflowStepInput](#WorkflowStepInput).
3190  */
3191 class LinkMergeMethod : EnumSchemaBase
3192 {
3193     ///
3194     enum Symbol
3195     {
3196         s0 = "merge_nested", ///
3197         s1 = "merge_flattened", ///
3198     }
3199 
3200     Symbol value;
3201 
3202     mixin genBody;
3203 }
3204 
3205 /**
3206  * Picking non-null values among inbound data links, described in [WorkflowStepInput](#WorkflowStepInput).
3207  */
3208 class PickValueMethod : EnumSchemaBase
3209 {
3210     ///
3211     enum Symbol
3212     {
3213         s0 = "first_non_null", ///
3214         s1 = "the_only_non_null", ///
3215         s2 = "all_non_null", ///
3216     }
3217 
3218     Symbol value;
3219 
3220     mixin genBody;
3221 }
3222 
3223 /**
3224  * Describe an output parameter of a workflow.  The parameter must be
3225  * connected to one or more parameters defined in the workflow that
3226  * will provide the value of the output parameter. It is legal to
3227  * connect a WorkflowInputParameter to a WorkflowOutputParameter.
3228  * 
3229  * See [WorkflowStepInput](#WorkflowStepInput) for discussion of
3230  * `linkMerge` and `pickValue`.
3231  */
3232 class WorkflowOutputParameter : RecordSchemaBase
3233 {
3234     /**
3235      * A short, human-readable label of this object.
3236      */
3237     Union!(None, string) label_;
3238     /**
3239      * Only valid when `type: File` or is an array of `items: File`.
3240      * 
3241      * Provides a pattern or expression specifying files or
3242      * directories that should be included alongside the primary
3243      * file.  Secondary files may be required or optional.  When not
3244      * explicitly specified, secondary files specified for `inputs`
3245      * are required and `outputs` are optional.  An implementation
3246      * must include matching Files and Directories in the
3247      * `secondaryFiles` property of the primary file.  These Files
3248      * and Directories must be transferred and staged alongside the
3249      * primary file.  An implementation may fail workflow execution
3250      * if a required secondary file does not exist.
3251      * 
3252      * If the value is an expression, the value of `self` in the expression
3253      * must be the primary input or output File object to which this binding
3254      * applies.  The `basename`, `nameroot` and `nameext` fields must be
3255      * present in `self`.  For `CommandLineTool` outputs the `path` field must
3256      * also be present.  The expression must return a filename string relative
3257      * to the path to the primary File, a File or Directory object with either
3258      * `path` or `location` and `basename` fields set, or an array consisting
3259      * of strings or File or Directory objects.  It is legal to reference an
3260      * unchanged File or Directory object taken from input as a secondaryFile.
3261      * The expression may return "null" in which case there is no secondaryFile
3262      * from that expression.
3263      * 
3264      * To work on non-filename-preserving storage systems, portable tool
3265      * descriptions should avoid constructing new values from `location`, but
3266      * should construct relative references using `basename` or `nameroot`
3267      * instead.
3268      * 
3269      * If a value in `secondaryFiles` is a string that is not an expression,
3270      * it specifies that the following pattern should be applied to the path
3271      * of the primary file to yield a filename relative to the primary File:
3272      * 
3273      *   1. If string ends with `?` character, remove the last `?` and mark
3274      *     the resulting secondary file as optional.
3275      *   2. If string begins with one or more caret `^` characters, for each
3276      *     caret, remove the last file extension from the path (the last
3277      *     period `.` and all following characters).  If there are no file
3278      *     extensions, the path is unchanged.
3279      *   3. Append the remainder of the string to the end of the file path.
3280      */
3281     @secondaryFilesDSL Union!(None, SecondaryFileSchema, SecondaryFileSchema[]) secondaryFiles_;
3282     /**
3283      * Only valid when `type: File` or is an array of `items: File`.
3284      * 
3285      * A value of `true` indicates that the file is read or written
3286      * sequentially without seeking.  An implementation may use this flag to
3287      * indicate whether it is valid to stream file contents using a named
3288      * pipe.  Default: `false`.
3289      */
3290     @defaultValue(q"<false>") bool streamable_;
3291     /**
3292      * A documentation string for this object, or an array of strings which should be concatenated.
3293      */
3294     Union!(None, string, string[]) doc_;
3295     /**
3296      * The unique identifier for this object.
3297      */
3298     @id Union!(None, string) id_;
3299     /**
3300      * Only valid when `type: File` or is an array of `items: File`.
3301      * 
3302      * This is the file format that will be assigned to the output
3303      * File object.
3304      */
3305     @link(LinkResolver.id) Union!(None, string, Expression) format_;
3306     /**
3307      * Specifies one or more names of an output from a workflow step (in the form
3308      * `step_name/output_name` with a `/` separator`), or a workflow input name,
3309      * that supply their value(s) to the output parameter.
3310      * the output parameter.  It is valid to reference workflow level inputs
3311      * here.
3312      */
3313     @link() Union!(None, string, string[]) outputSource_;
3314     /**
3315      * The method to use to merge multiple sources into a single array.
3316      * If not specified, the default method is "merge_nested".
3317      */
3318     @defaultValue(q"<"merge_nested">") LinkMergeMethod linkMerge_;
3319     /**
3320      * The method to use to choose non-null elements among multiple sources.
3321      */
3322     Union!(None, PickValueMethod) pickValue_;
3323     /**
3324      * Specify valid types of data that may be assigned to this parameter.
3325      */
3326     @typeDSL Union!(CWLType, OutputRecordSchema, OutputEnumSchema, OutputArraySchema, string, Union!(CWLType, OutputRecordSchema, OutputEnumSchema, OutputArraySchema, string)[]) type_;
3327 
3328     mixin genBody;
3329 }
3330 
3331 /**
3332  * The input of a workflow step connects an upstream parameter (from the
3333  * workflow inputs, or the outputs of other workflows steps) with the input
3334  * parameters of the process specified by the `run` field. Only input parameters
3335  * declared by the target process will be passed through at runtime to the process
3336  * though additional parameters may be specified (for use within `valueFrom`
3337  * expressions for instance) - unconnected or unused parameters do not represent an
3338  * error condition.
3339  * 
3340  * # Input object
3341  * 
3342  * A WorkflowStepInput object must contain an `id` field in the form
3343  * `#fieldname` or `#prefix/fieldname`.  When the `id` field contains a slash
3344  * `/` the field name consists of the characters following the final slash
3345  * (the prefix portion may contain one or more slashes to indicate scope).
3346  * This defines a field of the workflow step input object with the value of
3347  * the `source` parameter(s).
3348  * 
3349  * # Merging multiple inbound data links
3350  * 
3351  * To merge multiple inbound data links,
3352  * [MultipleInputFeatureRequirement](#MultipleInputFeatureRequirement) must be specified
3353  * in the workflow or workflow step requirements.
3354  * 
3355  * If the sink parameter is an array, or named in a [workflow
3356  * scatter](#WorkflowStep) operation, there may be multiple inbound
3357  * data links listed in the `source` field.  The values from the
3358  * input links are merged depending on the method specified in the
3359  * `linkMerge` field.  If both `linkMerge` and `pickValue` are null
3360  * or not specified, and there is more than one element in the
3361  * `source` array, the default method is "merge_nested".
3362  * 
3363  * If both `linkMerge` and `pickValue` are null or not specified, and
3364  * there is only a single element in the `source`, then the input
3365  * parameter takes the scalar value from the single input link (it is
3366  * *not* wrapped in a single-list).
3367  * 
3368  * * **merge_nested**
3369  * 
3370  *   The input must be an array consisting of exactly one entry for each
3371  *   input link.  If "merge_nested" is specified with a single link, the value
3372  *   from the link must be wrapped in a single-item list.
3373  * 
3374  * * **merge_flattened**
3375  * 
3376  *   1. The source and sink parameters must be compatible types, or the source
3377  *      type must be compatible with single element from the "items" type of
3378  *      the destination array parameter.
3379  *   2. Source parameters which are arrays are concatenated.
3380  *      Source parameters which are single element types are appended as
3381  *      single elements.
3382  * 
3383  * # Picking non-null values among inbound data links
3384  * 
3385  * If present, `pickValue` specifies how to pick non-null values among inbound data links.
3386  * 
3387  * `pickValue` is evaluated
3388  *   1. Once all source values from upstream step or parameters are available.
3389  *   2. After `linkMerge`.
3390  *   3. Before `scatter` or `valueFrom`.
3391  * 
3392  * This is specifically intended to be useful in combination with
3393  * [conditional execution](#WorkflowStep), where several upstream
3394  * steps may be connected to a single input (`source` is a list), and
3395  * skipped steps produce null values.
3396  * 
3397  * Static type checkers should check for type consistency after inferring what the type
3398  * will be after `pickValue` is applied, just as they do currently for `linkMerge`.
3399  * 
3400  * * **first_non_null**
3401  * 
3402  *   For the first level of a list input, pick the first non-null element.  The result is a scalar.
3403  *   It is an error if there is no non-null element.  Examples:
3404  *   * `[null, x, null, y] -> x`
3405  *   * `[null, [null], null, y] -> [null]`
3406  *   * `[null, null, null] -> Runtime Error`
3407  * 
3408  *   *Intended use case*: If-else pattern where the
3409  *   value comes either from a conditional step or from a default or
3410  *   fallback value. The conditional step(s) should be placed first in
3411  *   the list.
3412  * 
3413  * * **the_only_non_null**
3414  * 
3415  *   For the first level of a list input, pick the single non-null element.  The result is a scalar.
3416  *   It is an error if there is more than one non-null element.  Examples:
3417  * 
3418  *   * `[null, x, null] -> x`
3419  *   * `[null, x, null, y] -> Runtime Error`
3420  *   * `[null, [null], null] -> [null]`
3421  *   * `[null, null, null] -> Runtime Error`
3422  * 
3423  *   *Intended use case*: Switch type patterns where developer considers
3424  *   more than one active code path as a workflow error
3425  *   (possibly indicating an error in writing `when` condition expressions).
3426  * 
3427  * * **all_non_null**
3428  * 
3429  *   For the first level of a list input, pick all non-null values.
3430  *   The result is a list, which may be empty.  Examples:
3431  * 
3432  *   * `[null, x, null] -> [x]`
3433  *   * `[x, null, y] -> [x, y]`
3434  *   * `[null, [x], [null]] -> [[x], [null]]`
3435  *   * `[null, null, null] -> []`
3436  * 
3437  *   *Intended use case*: It is valid to have more than one source, but
3438  *    sources are conditional, so null sources (from skipped steps)
3439  *    should be filtered out.
3440  */
3441 class WorkflowStepInput : RecordSchemaBase
3442 {
3443     /**
3444      * The unique identifier for this object.
3445      */
3446     @id Union!(None, string) id_;
3447     /**
3448      * Specifies one or more workflow parameters that will provide input to
3449      * the underlying step parameter.
3450      */
3451     @link() Union!(None, string, string[]) source_;
3452     /**
3453      * The method to use to merge multiple inbound links into a single array.
3454      * If not specified, the default method is "merge_nested".
3455      */
3456     @defaultValue(q"<"merge_nested">") LinkMergeMethod linkMerge_;
3457     /**
3458      * The method to use to choose non-null elements among multiple sources.
3459      */
3460     Union!(None, PickValueMethod) pickValue_;
3461     /**
3462      * Only valid when `type: File` or is an array of `items: File`.
3463      * 
3464      * If true, the file (or each file in the array) must be a UTF-8
3465      * text file 64 KiB or smaller, and the implementation must read
3466      * the entire contents of the file (or file array) and place it
3467      * in the `contents` field of the File object for use by
3468      * expressions.  If the size of the file is greater than 64 KiB,
3469      * the implementation must raise a fatal error.
3470      */
3471     Union!(None, bool) loadContents_;
3472     /**
3473      * Only valid when `type: Directory` or is an array of `items: Directory`.
3474      * 
3475      * Specify the desired behavior for loading the `listing` field of
3476      * a Directory object for use by expressions.
3477      * 
3478      * The order of precedence for loadListing is:
3479      * 
3480      *   1. `loadListing` on an individual parameter
3481      *   2. Inherited from `LoadListingRequirement`
3482      *   3. By default: `no_listing`
3483      */
3484     Union!(None, LoadListingEnum) loadListing_;
3485     /**
3486      * A short, human-readable label of this object.
3487      */
3488     Union!(None, string) label_;
3489     /**
3490      * The default value for this parameter to use if either there is no
3491      * `source` field, or the value produced by the `source` is `null`.  The
3492      * default must be applied prior to scattering or evaluating `valueFrom`.
3493      */
3494     Union!(None, CWLObjectType) default_;
3495     /**
3496      * To use valueFrom, [StepInputExpressionRequirement](#StepInputExpressionRequirement) must
3497      * be specified in the workflow or workflow step requirements.
3498      * 
3499      * If `valueFrom` is a constant string value, use this as the value for
3500      * this input parameter.
3501      * 
3502      * If `valueFrom` is a parameter reference or expression, it must be
3503      * evaluated to yield the actual value to be assigned to the input field.
3504      * 
3505      * The `self` value in the parameter reference or expression must be
3506      * 1. `null` if there is no `source` field
3507      * 2. the value of the parameter(s) specified in the `source` field when this
3508      * workflow input parameter **is not** specified in this workflow step's `scatter` field.
3509      * 3. an element of the parameter specified in the `source` field when this workflow input
3510      * parameter **is** specified in this workflow step's `scatter` field.
3511      * 
3512      * The value of `inputs` in the parameter reference or expression must be
3513      * the input object to the workflow step after assigning the `source`
3514      * values, applying `default`, and then scattering.  The order of
3515      * evaluating `valueFrom` among step input parameters is undefined and the
3516      * result of evaluating `valueFrom` on a parameter must not be visible to
3517      * evaluation of `valueFrom` on other parameters.
3518      */
3519     Union!(None, string, Expression) valueFrom_;
3520 
3521     mixin genBody;
3522 }
3523 
3524 /**
3525  * Associate an output parameter of the underlying process with a workflow
3526  * parameter.  The workflow parameter (given in the `id` field) be may be used
3527  * as a `source` to connect with input parameters of other workflow steps, or
3528  * with an output parameter of the process.
3529  * 
3530  * A unique identifier for this workflow output parameter.  This is
3531  * the identifier to use in the `source` field of `WorkflowStepInput`
3532  * to connect the output value to downstream parameters.
3533  */
3534 class WorkflowStepOutput : RecordSchemaBase
3535 {
3536     /**
3537      * The unique identifier for this object.
3538      */
3539     @id Union!(None, string) id_;
3540 
3541     mixin genBody;
3542 }
3543 
3544 /**
3545  * The scatter method, as described in [workflow step scatter](#WorkflowStep).
3546  */
3547 class ScatterMethod : EnumSchemaBase
3548 {
3549     ///
3550     enum Symbol
3551     {
3552         s0 = "dotproduct", ///
3553         s1 = "nested_crossproduct", ///
3554         s2 = "flat_crossproduct", ///
3555     }
3556 
3557     Symbol value;
3558 
3559     mixin genBody;
3560 }
3561 
3562 /**
3563  * A workflow step is an executable element of a workflow.  It specifies the
3564  * underlying process implementation (such as `CommandLineTool` or another
3565  * `Workflow`) in the `run` field and connects the input and output parameters
3566  * of the underlying process to workflow parameters.
3567  * 
3568  * # Scatter/gather
3569  * 
3570  * To use scatter/gather,
3571  * [ScatterFeatureRequirement](#ScatterFeatureRequirement) must be specified
3572  * in the workflow or workflow step requirements.
3573  * 
3574  * A "scatter" operation specifies that the associated workflow step or
3575  * subworkflow should execute separately over a list of input elements.  Each
3576  * job making up a scatter operation is independent and may be executed
3577  * concurrently.
3578  * 
3579  * The `scatter` field specifies one or more input parameters which will be
3580  * scattered.  An input parameter may be listed more than once.  The declared
3581  * type of each input parameter implicitly becomes an array of items of the
3582  * input parameter type.  If a parameter is listed more than once, it becomes
3583  * a nested array.  As a result, upstream parameters which are connected to
3584  * scattered parameters must be arrays.
3585  * 
3586  * All output parameter types are also implicitly wrapped in arrays.  Each job
3587  * in the scatter results in an entry in the output array.
3588  * 
3589  * If any scattered parameter runtime value is an empty array, all outputs are
3590  * set to empty arrays and no work is done for the step, according to
3591  * applicable scattering rules.
3592  * 
3593  * If `scatter` declares more than one input parameter, `scatterMethod`
3594  * describes how to decompose the input into a discrete set of jobs.
3595  * 
3596  *   * **dotproduct** specifies that each of the input arrays are aligned and one
3597  *       element taken from each array to construct each job.  It is an error
3598  *       if all input arrays are not the same length.
3599  * 
3600  *   * **nested_crossproduct** specifies the Cartesian product of the inputs,
3601  *       producing a job for every combination of the scattered inputs.  The
3602  *       output must be nested arrays for each level of scattering, in the
3603  *       order that the input arrays are listed in the `scatter` field.
3604  * 
3605  *   * **flat_crossproduct** specifies the Cartesian product of the inputs,
3606  *       producing a job for every combination of the scattered inputs.  The
3607  *       output arrays must be flattened to a single level, but otherwise listed in the
3608  *       order that the input arrays are listed in the `scatter` field.
3609  * 
3610  * # Conditional execution (Optional)
3611  * 
3612  * Conditional execution makes execution of a step conditional on an
3613  * expression.  A step that is not executed is "skipped".  A skipped
3614  * step produces `null` for all output parameters.
3615  * 
3616  * The condition is evaluated after `scatter`, using the input object
3617  * of each individual scatter job.  This means over a set of scatter
3618  * jobs, some may be executed and some may be skipped.  When the
3619  * results are gathered, skipped steps must be `null` in the output
3620  * arrays.
3621  * 
3622  * The `when` field controls conditional execution.  This is an
3623  * expression that must be evaluated with `inputs` bound to the step
3624  * input object (or individual scatter job), and returns a boolean
3625  * value.  It is an error if this expression returns a value other
3626  * than `true` or `false`.
3627  * 
3628  * Conditionals in CWL are an optional feature and are not required
3629  * to be implemented by all consumers of CWL documents.  An
3630  * implementation that does not support conditionals must return a
3631  * fatal error when attempting to execute a workflow that uses
3632  * conditional constructs the implementation does not support.
3633  * 
3634  * # Subworkflows
3635  * 
3636  * To specify a nested workflow as part of a workflow step,
3637  * [SubworkflowFeatureRequirement](#SubworkflowFeatureRequirement) must be
3638  * specified in the workflow or workflow step requirements.
3639  * 
3640  * It is a fatal error if a workflow directly or indirectly invokes itself as
3641  * a subworkflow (recursive workflows are not allowed).
3642  */
3643 class WorkflowStep : RecordSchemaBase
3644 {
3645     /**
3646      * The unique identifier for this object.
3647      */
3648     @id Union!(None, string) id_;
3649     /**
3650      * A short, human-readable label of this object.
3651      */
3652     Union!(None, string) label_;
3653     /**
3654      * A documentation string for this object, or an array of strings which should be concatenated.
3655      */
3656     Union!(None, string, string[]) doc_;
3657     /**
3658      * Defines the input parameters of the workflow step.  The process is ready to
3659      * run when all required input parameters are associated with concrete
3660      * values.  Input parameters include a schema for each parameter which is
3661      * used to validate the input object.  It may also be used build a user
3662      * interface for constructing the input object.
3663      */
3664     @idMap("id", "source") WorkflowStepInput[] in_;
3665     /**
3666      * Defines the parameters representing the output of the process.  May be
3667      * used to generate and/or validate the output object.
3668      */
3669     @link(LinkResolver.id) Union!(string, WorkflowStepOutput)[] out_;
3670     /**
3671      * Declares requirements that apply to either the runtime environment or the
3672      * workflow engine that must be met in order to execute this workflow step.  If
3673      * an implementation cannot satisfy all requirements, or a requirement is
3674      * listed which is not recognized by the implementation, it is a fatal
3675      * error and the implementation must not attempt to run the process,
3676      * unless overridden at user option.
3677      */
3678     @idMap("class") Union!(None, Union!(InlineJavascriptRequirement, SchemaDefRequirement, LoadListingRequirement, DockerRequirement, SoftwareRequirement, InitialWorkDirRequirement, EnvVarRequirement, ShellCommandRequirement, ResourceRequirement, WorkReuse, NetworkAccess, InplaceUpdateRequirement, ToolTimeLimit, SubworkflowFeatureRequirement, ScatterFeatureRequirement, MultipleInputFeatureRequirement, StepInputExpressionRequirement, Any)[]) requirements_;
3679     /**
3680      * Declares hints applying to either the runtime environment or the
3681      * workflow engine that may be helpful in executing this workflow step.  It is
3682      * not an error if an implementation cannot satisfy all hints, however
3683      * the implementation may report a warning.
3684      */
3685     @idMap("class") Union!(None, Any[]) hints_;
3686     /**
3687      * Specifies the process to run.  If `run` is a string, it must be an absolute IRI
3688      * or a relative path from the primary document.
3689      */
3690     @link() Union!(string, CommandLineTool, ExpressionTool, Workflow, Operation) run_;
3691     /**
3692      * If defined, only run the step when the expression evaluates to
3693      * `true`.  If `false` the step is skipped.  A skipped step
3694      * produces a `null` on each output.
3695      */
3696     Union!(None, Expression) when_;
3697     ///
3698     @link() Union!(None, string, string[]) scatter_;
3699     /**
3700      * Required if `scatter` is an array of more than one element.
3701      */
3702     Union!(None, ScatterMethod) scatterMethod_;
3703 
3704     mixin genBody;
3705 }
3706 
3707 /**
3708  * A workflow describes a set of **steps** and the **dependencies** between
3709  * those steps.  When a step produces output that will be consumed by a
3710  * second step, the first step is a dependency of the second step.
3711  * 
3712  * When there is a dependency, the workflow engine must execute the preceding
3713  * step and wait for it to successfully produce output before executing the
3714  * dependent step.  If two steps are defined in the workflow graph that
3715  * are not directly or indirectly dependent, these steps are **independent**,
3716  * and may execute in any order or execute concurrently.  A workflow is
3717  * complete when all steps have been executed.
3718  * 
3719  * Dependencies between parameters are expressed using the `source`
3720  * field on [workflow step input parameters](#WorkflowStepInput) and
3721  * `outputSource` field on [workflow output
3722  * parameters](#WorkflowOutputParameter).
3723  * 
3724  * The `source` field on each workflow step input parameter expresses
3725  * the data links that contribute to the value of the step input
3726  * parameter (the "sink").  A workflow step can only begin execution
3727  * when every data link connected to a step has been fulfilled.
3728  * 
3729  * The `outputSource` field on each workflow step input parameter
3730  * expresses the data links that contribute to the value of the
3731  * workflow output parameter (the "sink").  Workflow execution cannot
3732  * complete successfully until every data link connected to an output
3733  * parameter has been fulfilled.
3734  * 
3735  * ## Workflow success and failure
3736  * 
3737  * A completed step must result in one of `success`, `temporaryFailure` or
3738  * `permanentFailure` states.  An implementation may choose to retry a step
3739  * execution which resulted in `temporaryFailure`.  An implementation may
3740  * choose to either continue running other steps of a workflow, or terminate
3741  * immediately upon `permanentFailure`.
3742  * 
3743  * * If any step of a workflow execution results in `permanentFailure`, then
3744  * the workflow status is `permanentFailure`.
3745  * 
3746  * * If one or more steps result in `temporaryFailure` and all other steps
3747  * complete `success` or are not executed, then the workflow status is
3748  * `temporaryFailure`.
3749  * 
3750  * * If all workflow steps are executed and complete with `success`, then the
3751  * workflow status is `success`.
3752  * 
3753  * # Extensions
3754  * 
3755  * [ScatterFeatureRequirement](#ScatterFeatureRequirement) and
3756  * [SubworkflowFeatureRequirement](#SubworkflowFeatureRequirement) are
3757  * available as standard [extensions](#Extensions_and_Metadata) to core
3758  * workflow semantics.
3759  */
3760 @documentRoot class Workflow : RecordSchemaBase
3761 {
3762     /**
3763      * The unique identifier for this object.
3764      * 
3765      * Only useful for `$graph` at `Process` level. Should not be exposed
3766      * to users in graphical or terminal user interfaces.
3767      */
3768     @id Union!(None, string) id_;
3769     /**
3770      * A short, human-readable label of this object.
3771      */
3772     Union!(None, string) label_;
3773     /**
3774      * A documentation string for this object, or an array of strings which should be concatenated.
3775      */
3776     Union!(None, string, string[]) doc_;
3777     /**
3778      * Defines the input parameters of the process.  The process is ready to
3779      * run when all required input parameters are associated with concrete
3780      * values.  Input parameters include a schema for each parameter which is
3781      * used to validate the input object.  It may also be used to build a user
3782      * interface for constructing the input object.
3783      * 
3784      * When accepting an input object, all input parameters must have a value.
3785      * If an input parameter is missing from the input object, it must be
3786      * assigned a value of `null` (or the value of `default` for that
3787      * parameter, if provided) for the purposes of validation and evaluation
3788      * of expressions.
3789      */
3790     @idMap("id", "type") WorkflowInputParameter[] inputs_;
3791     /**
3792      * Defines the parameters representing the output of the process.  May be
3793      * used to generate and/or validate the output object.
3794      */
3795     @idMap("id", "type") WorkflowOutputParameter[] outputs_;
3796     /**
3797      * Declares requirements that apply to either the runtime environment or the
3798      * workflow engine that must be met in order to execute this process.  If
3799      * an implementation cannot satisfy all requirements, or a requirement is
3800      * listed which is not recognized by the implementation, it is a fatal
3801      * error and the implementation must not attempt to run the process,
3802      * unless overridden at user option.
3803      */
3804     @idMap("class") Union!(None, Union!(InlineJavascriptRequirement, SchemaDefRequirement, LoadListingRequirement, DockerRequirement, SoftwareRequirement, InitialWorkDirRequirement, EnvVarRequirement, ShellCommandRequirement, ResourceRequirement, WorkReuse, NetworkAccess, InplaceUpdateRequirement, ToolTimeLimit, SubworkflowFeatureRequirement, ScatterFeatureRequirement, MultipleInputFeatureRequirement, StepInputExpressionRequirement, Any)[]) requirements_;
3805     /**
3806      * Declares hints applying to either the runtime environment or the
3807      * workflow engine that may be helpful in executing this process.  It is
3808      * not an error if an implementation cannot satisfy all hints, however
3809      * the implementation may report a warning.
3810      */
3811     @idMap("class") Union!(None, Union!(InlineJavascriptRequirement, SchemaDefRequirement, LoadListingRequirement, DockerRequirement, SoftwareRequirement, InitialWorkDirRequirement, EnvVarRequirement, ShellCommandRequirement, ResourceRequirement, WorkReuse, NetworkAccess, InplaceUpdateRequirement, ToolTimeLimit, SubworkflowFeatureRequirement, ScatterFeatureRequirement, MultipleInputFeatureRequirement, StepInputExpressionRequirement, Any)[]) hints_;
3812     /**
3813      * CWL document version. Always required at the document root. Not
3814      * required for a Process embedded inside another Process.
3815      */
3816     Union!(None, CWLVersion) cwlVersion_;
3817     /**
3818      * An identifier for the type of computational operation, of this Process.
3819      * Especially useful for [`Operation`](Workflow.html#Operation), but can also be used for
3820      * [`CommandLineTool`](CommandLineTool.html#CommandLineTool),
3821      * [`Workflow`](Workflow.html#Workflow), or [ExpressionTool](Workflow.html#ExpressionTool).
3822      * 
3823      * If provided, then this must be an IRI of a concept node that
3824      * represents the type of operation, preferably defined within an ontology.
3825      * 
3826      * For example, in the domain of bioinformatics, one can use an IRI from
3827      * the EDAM Ontology's [Operation concept nodes](http://edamontology.org/operation_0004),
3828      * like [Alignment](http://edamontology.org/operation_2928),
3829      * or [Clustering](http://edamontology.org/operation_3432); or a more
3830      * specific Operation concept like
3831      * [Split read mapping](http://edamontology.org/operation_3199).
3832      */
3833     @link(LinkResolver.id) Union!(None, string[]) intent_;
3834     ///
3835     static immutable class_ = "Workflow";
3836     /**
3837      * The individual steps that make up the workflow.  Each step is executed when all of its
3838      * input data links are fulfilled.  An implementation may choose to execute
3839      * the steps in a different order than listed and/or execute steps
3840      * concurrently, provided that dependencies between steps are met.
3841      */
3842     @idMap("id") WorkflowStep[] steps_;
3843 
3844     mixin genBody;
3845 }
3846 
3847 /**
3848  * Indicates that the workflow platform must support nested workflows in
3849  * the `run` field of [WorkflowStep](#WorkflowStep).
3850  */
3851 class SubworkflowFeatureRequirement : RecordSchemaBase
3852 {
3853     /**
3854      * Always 'SubworkflowFeatureRequirement'
3855      */
3856     static immutable class_ = "SubworkflowFeatureRequirement";
3857 
3858     mixin genBody;
3859 }
3860 
3861 /**
3862  * Indicates that the workflow platform must support the `scatter` and
3863  * `scatterMethod` fields of [WorkflowStep](#WorkflowStep).
3864  */
3865 class ScatterFeatureRequirement : RecordSchemaBase
3866 {
3867     /**
3868      * Always 'ScatterFeatureRequirement'
3869      */
3870     static immutable class_ = "ScatterFeatureRequirement";
3871 
3872     mixin genBody;
3873 }
3874 
3875 /**
3876  * Indicates that the workflow platform must support multiple inbound data links
3877  * listed in the `source` field of [WorkflowStepInput](#WorkflowStepInput).
3878  */
3879 class MultipleInputFeatureRequirement : RecordSchemaBase
3880 {
3881     /**
3882      * Always 'MultipleInputFeatureRequirement'
3883      */
3884     static immutable class_ = "MultipleInputFeatureRequirement";
3885 
3886     mixin genBody;
3887 }
3888 
3889 /**
3890  * Indicate that the workflow platform must support the `valueFrom` field
3891  * of [WorkflowStepInput](#WorkflowStepInput).
3892  */
3893 class StepInputExpressionRequirement : RecordSchemaBase
3894 {
3895     /**
3896      * Always 'StepInputExpressionRequirement'
3897      */
3898     static immutable class_ = "StepInputExpressionRequirement";
3899 
3900     mixin genBody;
3901 }
3902 
3903 /**
3904  * Describe an input parameter of an operation.
3905  */
3906 class OperationInputParameter : RecordSchemaBase
3907 {
3908     /**
3909      * A short, human-readable label of this object.
3910      */
3911     Union!(None, string) label_;
3912     /**
3913      * Only valid when `type: File` or is an array of `items: File`.
3914      * 
3915      * Provides a pattern or expression specifying files or
3916      * directories that should be included alongside the primary
3917      * file.  Secondary files may be required or optional.  When not
3918      * explicitly specified, secondary files specified for `inputs`
3919      * are required and `outputs` are optional.  An implementation
3920      * must include matching Files and Directories in the
3921      * `secondaryFiles` property of the primary file.  These Files
3922      * and Directories must be transferred and staged alongside the
3923      * primary file.  An implementation may fail workflow execution
3924      * if a required secondary file does not exist.
3925      * 
3926      * If the value is an expression, the value of `self` in the expression
3927      * must be the primary input or output File object to which this binding
3928      * applies.  The `basename`, `nameroot` and `nameext` fields must be
3929      * present in `self`.  For `CommandLineTool` outputs the `path` field must
3930      * also be present.  The expression must return a filename string relative
3931      * to the path to the primary File, a File or Directory object with either
3932      * `path` or `location` and `basename` fields set, or an array consisting
3933      * of strings or File or Directory objects.  It is legal to reference an
3934      * unchanged File or Directory object taken from input as a secondaryFile.
3935      * The expression may return "null" in which case there is no secondaryFile
3936      * from that expression.
3937      * 
3938      * To work on non-filename-preserving storage systems, portable tool
3939      * descriptions should avoid constructing new values from `location`, but
3940      * should construct relative references using `basename` or `nameroot`
3941      * instead.
3942      * 
3943      * If a value in `secondaryFiles` is a string that is not an expression,
3944      * it specifies that the following pattern should be applied to the path
3945      * of the primary file to yield a filename relative to the primary File:
3946      * 
3947      *   1. If string ends with `?` character, remove the last `?` and mark
3948      *     the resulting secondary file as optional.
3949      *   2. If string begins with one or more caret `^` characters, for each
3950      *     caret, remove the last file extension from the path (the last
3951      *     period `.` and all following characters).  If there are no file
3952      *     extensions, the path is unchanged.
3953      *   3. Append the remainder of the string to the end of the file path.
3954      */
3955     @secondaryFilesDSL Union!(None, SecondaryFileSchema, SecondaryFileSchema[]) secondaryFiles_;
3956     /**
3957      * Only valid when `type: File` or is an array of `items: File`.
3958      * 
3959      * A value of `true` indicates that the file is read or written
3960      * sequentially without seeking.  An implementation may use this flag to
3961      * indicate whether it is valid to stream file contents using a named
3962      * pipe.  Default: `false`.
3963      */
3964     @defaultValue(q"<false>") bool streamable_;
3965     /**
3966      * A documentation string for this object, or an array of strings which should be concatenated.
3967      */
3968     Union!(None, string, string[]) doc_;
3969     /**
3970      * The unique identifier for this object.
3971      */
3972     @id Union!(None, string) id_;
3973     /**
3974      * Only valid when `type: File` or is an array of `items: File`.
3975      * 
3976      * This must be one or more IRIs of concept nodes
3977      * that represents file formats which are allowed as input to this
3978      * parameter, preferably defined within an ontology.  If no ontology is
3979      * available, file formats may be tested by exact match.
3980      */
3981     @link(LinkResolver.id) Union!(None, string, string[], Expression) format_;
3982     /**
3983      * Only valid when `type: File` or is an array of `items: File`.
3984      * 
3985      * If true, the file (or each file in the array) must be a UTF-8
3986      * text file 64 KiB or smaller, and the implementation must read
3987      * the entire contents of the file (or file array) and place it
3988      * in the `contents` field of the File object for use by
3989      * expressions.  If the size of the file is greater than 64 KiB,
3990      * the implementation must raise a fatal error.
3991      */
3992     Union!(None, bool) loadContents_;
3993     /**
3994      * Only valid when `type: Directory` or is an array of `items: Directory`.
3995      * 
3996      * Specify the desired behavior for loading the `listing` field of
3997      * a Directory object for use by expressions.
3998      * 
3999      * The order of precedence for loadListing is:
4000      * 
4001      *   1. `loadListing` on an individual parameter
4002      *   2. Inherited from `LoadListingRequirement`
4003      *   3. By default: `no_listing`
4004      */
4005     Union!(None, LoadListingEnum) loadListing_;
4006     /**
4007      * The default value to use for this parameter if the parameter is missing
4008      * from the input object, or if the value of the parameter in the input
4009      * object is `null`.  Default values are applied before evaluating expressions
4010      * (e.g. dependent `valueFrom` fields).
4011      */
4012     Union!(None, CWLObjectType) default_;
4013     /**
4014      * Specify valid types of data that may be assigned to this parameter.
4015      */
4016     @typeDSL Union!(CWLType, InputRecordSchema, InputEnumSchema, InputArraySchema, string, Union!(CWLType, InputRecordSchema, InputEnumSchema, InputArraySchema, string)[]) type_;
4017 
4018     mixin genBody;
4019 }
4020 
4021 /**
4022  * Describe an output parameter of an operation.
4023  */
4024 class OperationOutputParameter : RecordSchemaBase
4025 {
4026     /**
4027      * A short, human-readable label of this object.
4028      */
4029     Union!(None, string) label_;
4030     /**
4031      * Only valid when `type: File` or is an array of `items: File`.
4032      * 
4033      * Provides a pattern or expression specifying files or
4034      * directories that should be included alongside the primary
4035      * file.  Secondary files may be required or optional.  When not
4036      * explicitly specified, secondary files specified for `inputs`
4037      * are required and `outputs` are optional.  An implementation
4038      * must include matching Files and Directories in the
4039      * `secondaryFiles` property of the primary file.  These Files
4040      * and Directories must be transferred and staged alongside the
4041      * primary file.  An implementation may fail workflow execution
4042      * if a required secondary file does not exist.
4043      * 
4044      * If the value is an expression, the value of `self` in the expression
4045      * must be the primary input or output File object to which this binding
4046      * applies.  The `basename`, `nameroot` and `nameext` fields must be
4047      * present in `self`.  For `CommandLineTool` outputs the `path` field must
4048      * also be present.  The expression must return a filename string relative
4049      * to the path to the primary File, a File or Directory object with either
4050      * `path` or `location` and `basename` fields set, or an array consisting
4051      * of strings or File or Directory objects.  It is legal to reference an
4052      * unchanged File or Directory object taken from input as a secondaryFile.
4053      * The expression may return "null" in which case there is no secondaryFile
4054      * from that expression.
4055      * 
4056      * To work on non-filename-preserving storage systems, portable tool
4057      * descriptions should avoid constructing new values from `location`, but
4058      * should construct relative references using `basename` or `nameroot`
4059      * instead.
4060      * 
4061      * If a value in `secondaryFiles` is a string that is not an expression,
4062      * it specifies that the following pattern should be applied to the path
4063      * of the primary file to yield a filename relative to the primary File:
4064      * 
4065      *   1. If string ends with `?` character, remove the last `?` and mark
4066      *     the resulting secondary file as optional.
4067      *   2. If string begins with one or more caret `^` characters, for each
4068      *     caret, remove the last file extension from the path (the last
4069      *     period `.` and all following characters).  If there are no file
4070      *     extensions, the path is unchanged.
4071      *   3. Append the remainder of the string to the end of the file path.
4072      */
4073     @secondaryFilesDSL Union!(None, SecondaryFileSchema, SecondaryFileSchema[]) secondaryFiles_;
4074     /**
4075      * Only valid when `type: File` or is an array of `items: File`.
4076      * 
4077      * A value of `true` indicates that the file is read or written
4078      * sequentially without seeking.  An implementation may use this flag to
4079      * indicate whether it is valid to stream file contents using a named
4080      * pipe.  Default: `false`.
4081      */
4082     @defaultValue(q"<false>") bool streamable_;
4083     /**
4084      * A documentation string for this object, or an array of strings which should be concatenated.
4085      */
4086     Union!(None, string, string[]) doc_;
4087     /**
4088      * The unique identifier for this object.
4089      */
4090     @id Union!(None, string) id_;
4091     /**
4092      * Only valid when `type: File` or is an array of `items: File`.
4093      * 
4094      * This is the file format that will be assigned to the output
4095      * File object.
4096      */
4097     @link(LinkResolver.id) Union!(None, string, Expression) format_;
4098     /**
4099      * Specify valid types of data that may be assigned to this parameter.
4100      */
4101     @typeDSL Union!(CWLType, OutputRecordSchema, OutputEnumSchema, OutputArraySchema, string, Union!(CWLType, OutputRecordSchema, OutputEnumSchema, OutputArraySchema, string)[]) type_;
4102 
4103     mixin genBody;
4104 }
4105 
4106 /**
4107  * This record describes an abstract operation.  It is a potential
4108  * step of a workflow that has not yet been bound to a concrete
4109  * implementation.  It specifies an input and output signature, but
4110  * does not provide enough information to be executed.  An
4111  * implementation (or other tooling) may provide a means of binding
4112  * an Operation to a concrete process (such as Workflow,
4113  * CommandLineTool, or ExpressionTool) with a compatible signature.
4114  */
4115 @documentRoot class Operation : RecordSchemaBase
4116 {
4117     /**
4118      * The unique identifier for this object.
4119      * 
4120      * Only useful for `$graph` at `Process` level. Should not be exposed
4121      * to users in graphical or terminal user interfaces.
4122      */
4123     @id Union!(None, string) id_;
4124     /**
4125      * A short, human-readable label of this object.
4126      */
4127     Union!(None, string) label_;
4128     /**
4129      * A documentation string for this object, or an array of strings which should be concatenated.
4130      */
4131     Union!(None, string, string[]) doc_;
4132     /**
4133      * Defines the input parameters of the process.  The process is ready to
4134      * run when all required input parameters are associated with concrete
4135      * values.  Input parameters include a schema for each parameter which is
4136      * used to validate the input object.  It may also be used to build a user
4137      * interface for constructing the input object.
4138      * 
4139      * When accepting an input object, all input parameters must have a value.
4140      * If an input parameter is missing from the input object, it must be
4141      * assigned a value of `null` (or the value of `default` for that
4142      * parameter, if provided) for the purposes of validation and evaluation
4143      * of expressions.
4144      */
4145     @idMap("id", "type") OperationInputParameter[] inputs_;
4146     /**
4147      * Defines the parameters representing the output of the process.  May be
4148      * used to generate and/or validate the output object.
4149      */
4150     @idMap("id", "type") OperationOutputParameter[] outputs_;
4151     /**
4152      * Declares requirements that apply to either the runtime environment or the
4153      * workflow engine that must be met in order to execute this process.  If
4154      * an implementation cannot satisfy all requirements, or a requirement is
4155      * listed which is not recognized by the implementation, it is a fatal
4156      * error and the implementation must not attempt to run the process,
4157      * unless overridden at user option.
4158      */
4159     @idMap("class") Union!(None, Union!(InlineJavascriptRequirement, SchemaDefRequirement, LoadListingRequirement, DockerRequirement, SoftwareRequirement, InitialWorkDirRequirement, EnvVarRequirement, ShellCommandRequirement, ResourceRequirement, WorkReuse, NetworkAccess, InplaceUpdateRequirement, ToolTimeLimit, SubworkflowFeatureRequirement, ScatterFeatureRequirement, MultipleInputFeatureRequirement, StepInputExpressionRequirement, Any)[]) requirements_;
4160     /**
4161      * Declares hints applying to either the runtime environment or the
4162      * workflow engine that may be helpful in executing this process.  It is
4163      * not an error if an implementation cannot satisfy all hints, however
4164      * the implementation may report a warning.
4165      */
4166     @idMap("class") Union!(None, Union!(InlineJavascriptRequirement, SchemaDefRequirement, LoadListingRequirement, DockerRequirement, SoftwareRequirement, InitialWorkDirRequirement, EnvVarRequirement, ShellCommandRequirement, ResourceRequirement, WorkReuse, NetworkAccess, InplaceUpdateRequirement, ToolTimeLimit, SubworkflowFeatureRequirement, ScatterFeatureRequirement, MultipleInputFeatureRequirement, StepInputExpressionRequirement, Any)[]) hints_;
4167     /**
4168      * CWL document version. Always required at the document root. Not
4169      * required for a Process embedded inside another Process.
4170      */
4171     Union!(None, CWLVersion) cwlVersion_;
4172     /**
4173      * An identifier for the type of computational operation, of this Process.
4174      * Especially useful for [`Operation`](Workflow.html#Operation), but can also be used for
4175      * [`CommandLineTool`](CommandLineTool.html#CommandLineTool),
4176      * [`Workflow`](Workflow.html#Workflow), or [ExpressionTool](Workflow.html#ExpressionTool).
4177      * 
4178      * If provided, then this must be an IRI of a concept node that
4179      * represents the type of operation, preferably defined within an ontology.
4180      * 
4181      * For example, in the domain of bioinformatics, one can use an IRI from
4182      * the EDAM Ontology's [Operation concept nodes](http://edamontology.org/operation_0004),
4183      * like [Alignment](http://edamontology.org/operation_2928),
4184      * or [Clustering](http://edamontology.org/operation_3432); or a more
4185      * specific Operation concept like
4186      * [Split read mapping](http://edamontology.org/operation_3199).
4187      */
4188     @link(LinkResolver.id) Union!(None, string[]) intent_;
4189     ///
4190     static immutable class_ = "Operation";
4191 
4192     mixin genBody;
4193 }
4194 
4195 ///
4196 alias DocumentRootType = Union!(CommandLineTool, ExpressionTool, Workflow, Operation);
4197 
4198 ///
4199 alias importFromURI = import_!DocumentRootType;
4200 
4201 @("Test for generated parser")
4202 unittest
4203 {
4204     import std : dirEntries, SpanMode, stdThreadLocalLog, NullLogger;
4205 
4206     auto currentLogger = stdThreadLocalLog;
4207     stdThreadLocalLog = new NullLogger;
4208     scope(exit) stdThreadLocalLog = currentLogger;
4209 
4210     auto resourceDir = "resources/cwl-v1.2";
4211     foreach (file; dirEntries(resourceDir, SpanMode.depth))
4212     {
4213         import std : assertNotThrown, baseName, format, startsWith;
4214         import salad.resolver : absoluteURI;
4215 
4216         if (!file.baseName.startsWith("valid"))
4217         {
4218             continue;
4219         }
4220         importFromURI(file.absoluteURI).assertNotThrown(format!"Failed to load %s"(file));
4221     }
4222 }