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