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