001package org.hl7.fhir.r4.model;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1
033import java.util.ArrayList;
034import java.util.Date;
035import java.util.List;
036
037import org.hl7.fhir.exceptions.FHIRException;
038import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
039import org.hl7.fhir.r4.model.Enumerations.PublicationStatus;
040import org.hl7.fhir.r4.model.Enumerations.PublicationStatusEnumFactory;
041import org.hl7.fhir.utilities.Utilities;
042
043import ca.uhn.fhir.model.api.annotation.Block;
044import ca.uhn.fhir.model.api.annotation.Child;
045import ca.uhn.fhir.model.api.annotation.ChildOrder;
046import ca.uhn.fhir.model.api.annotation.Description;
047import ca.uhn.fhir.model.api.annotation.ResourceDef;
048import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
049
050/**
051 * A structured set of tests against a FHIR server or client implementation to
052 * determine compliance against the FHIR specification.
053 */
054@ResourceDef(name = "TestScript", profile = "http://hl7.org/fhir/StructureDefinition/TestScript")
055@ChildOrder(names = { "url", "identifier", "version", "name", "title", "status", "experimental", "date", "publisher",
056    "contact", "description", "useContext", "jurisdiction", "purpose", "copyright", "origin", "destination", "metadata",
057    "fixture", "profile", "variable", "setup", "test", "teardown" })
058public class TestScript extends MetadataResource {
059
060  public enum TestScriptRequestMethodCode {
061    /**
062     * HTTP DELETE operation.
063     */
064    DELETE,
065    /**
066     * HTTP GET operation.
067     */
068    GET,
069    /**
070     * HTTP OPTIONS operation.
071     */
072    OPTIONS,
073    /**
074     * HTTP PATCH operation.
075     */
076    PATCH,
077    /**
078     * HTTP POST operation.
079     */
080    POST,
081    /**
082     * HTTP PUT operation.
083     */
084    PUT,
085    /**
086     * HTTP HEAD operation.
087     */
088    HEAD,
089    /**
090     * added to help the parsers with the generic types
091     */
092    NULL;
093
094    public static TestScriptRequestMethodCode fromCode(String codeString) throws FHIRException {
095      if (codeString == null || "".equals(codeString))
096        return null;
097      if ("delete".equals(codeString))
098        return DELETE;
099      if ("get".equals(codeString))
100        return GET;
101      if ("options".equals(codeString))
102        return OPTIONS;
103      if ("patch".equals(codeString))
104        return PATCH;
105      if ("post".equals(codeString))
106        return POST;
107      if ("put".equals(codeString))
108        return PUT;
109      if ("head".equals(codeString))
110        return HEAD;
111      if (Configuration.isAcceptInvalidEnums())
112        return null;
113      else
114        throw new FHIRException("Unknown TestScriptRequestMethodCode code '" + codeString + "'");
115    }
116
117    public String toCode() {
118      switch (this) {
119      case DELETE:
120        return "delete";
121      case GET:
122        return "get";
123      case OPTIONS:
124        return "options";
125      case PATCH:
126        return "patch";
127      case POST:
128        return "post";
129      case PUT:
130        return "put";
131      case HEAD:
132        return "head";
133      case NULL:
134        return null;
135      default:
136        return "?";
137      }
138    }
139
140    public String getSystem() {
141      switch (this) {
142      case DELETE:
143        return "http://hl7.org/fhir/http-operations";
144      case GET:
145        return "http://hl7.org/fhir/http-operations";
146      case OPTIONS:
147        return "http://hl7.org/fhir/http-operations";
148      case PATCH:
149        return "http://hl7.org/fhir/http-operations";
150      case POST:
151        return "http://hl7.org/fhir/http-operations";
152      case PUT:
153        return "http://hl7.org/fhir/http-operations";
154      case HEAD:
155        return "http://hl7.org/fhir/http-operations";
156      case NULL:
157        return null;
158      default:
159        return "?";
160      }
161    }
162
163    public String getDefinition() {
164      switch (this) {
165      case DELETE:
166        return "HTTP DELETE operation.";
167      case GET:
168        return "HTTP GET operation.";
169      case OPTIONS:
170        return "HTTP OPTIONS operation.";
171      case PATCH:
172        return "HTTP PATCH operation.";
173      case POST:
174        return "HTTP POST operation.";
175      case PUT:
176        return "HTTP PUT operation.";
177      case HEAD:
178        return "HTTP HEAD operation.";
179      case NULL:
180        return null;
181      default:
182        return "?";
183      }
184    }
185
186    public String getDisplay() {
187      switch (this) {
188      case DELETE:
189        return "DELETE";
190      case GET:
191        return "GET";
192      case OPTIONS:
193        return "OPTIONS";
194      case PATCH:
195        return "PATCH";
196      case POST:
197        return "POST";
198      case PUT:
199        return "PUT";
200      case HEAD:
201        return "HEAD";
202      case NULL:
203        return null;
204      default:
205        return "?";
206      }
207    }
208  }
209
210  public static class TestScriptRequestMethodCodeEnumFactory implements EnumFactory<TestScriptRequestMethodCode> {
211    public TestScriptRequestMethodCode fromCode(String codeString) throws IllegalArgumentException {
212      if (codeString == null || "".equals(codeString))
213        if (codeString == null || "".equals(codeString))
214          return null;
215      if ("delete".equals(codeString))
216        return TestScriptRequestMethodCode.DELETE;
217      if ("get".equals(codeString))
218        return TestScriptRequestMethodCode.GET;
219      if ("options".equals(codeString))
220        return TestScriptRequestMethodCode.OPTIONS;
221      if ("patch".equals(codeString))
222        return TestScriptRequestMethodCode.PATCH;
223      if ("post".equals(codeString))
224        return TestScriptRequestMethodCode.POST;
225      if ("put".equals(codeString))
226        return TestScriptRequestMethodCode.PUT;
227      if ("head".equals(codeString))
228        return TestScriptRequestMethodCode.HEAD;
229      throw new IllegalArgumentException("Unknown TestScriptRequestMethodCode code '" + codeString + "'");
230    }
231
232    public Enumeration<TestScriptRequestMethodCode> fromType(PrimitiveType<?> code) throws FHIRException {
233      if (code == null)
234        return null;
235      if (code.isEmpty())
236        return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.NULL, code);
237      String codeString = code.asStringValue();
238      if (codeString == null || "".equals(codeString))
239        return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.NULL, code);
240      if ("delete".equals(codeString))
241        return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.DELETE, code);
242      if ("get".equals(codeString))
243        return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.GET, code);
244      if ("options".equals(codeString))
245        return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.OPTIONS, code);
246      if ("patch".equals(codeString))
247        return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.PATCH, code);
248      if ("post".equals(codeString))
249        return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.POST, code);
250      if ("put".equals(codeString))
251        return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.PUT, code);
252      if ("head".equals(codeString))
253        return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.HEAD, code);
254      throw new FHIRException("Unknown TestScriptRequestMethodCode code '" + codeString + "'");
255    }
256
257    public String toCode(TestScriptRequestMethodCode code) {
258      if (code == TestScriptRequestMethodCode.DELETE)
259        return "delete";
260      if (code == TestScriptRequestMethodCode.GET)
261        return "get";
262      if (code == TestScriptRequestMethodCode.OPTIONS)
263        return "options";
264      if (code == TestScriptRequestMethodCode.PATCH)
265        return "patch";
266      if (code == TestScriptRequestMethodCode.POST)
267        return "post";
268      if (code == TestScriptRequestMethodCode.PUT)
269        return "put";
270      if (code == TestScriptRequestMethodCode.HEAD)
271        return "head";
272      return "?";
273    }
274
275    public String toSystem(TestScriptRequestMethodCode code) {
276      return code.getSystem();
277    }
278  }
279
280  public enum AssertionDirectionType {
281    /**
282     * The assertion is evaluated on the response. This is the default value.
283     */
284    RESPONSE,
285    /**
286     * The assertion is evaluated on the request.
287     */
288    REQUEST,
289    /**
290     * added to help the parsers with the generic types
291     */
292    NULL;
293
294    public static AssertionDirectionType fromCode(String codeString) throws FHIRException {
295      if (codeString == null || "".equals(codeString))
296        return null;
297      if ("response".equals(codeString))
298        return RESPONSE;
299      if ("request".equals(codeString))
300        return REQUEST;
301      if (Configuration.isAcceptInvalidEnums())
302        return null;
303      else
304        throw new FHIRException("Unknown AssertionDirectionType code '" + codeString + "'");
305    }
306
307    public String toCode() {
308      switch (this) {
309      case RESPONSE:
310        return "response";
311      case REQUEST:
312        return "request";
313      case NULL:
314        return null;
315      default:
316        return "?";
317      }
318    }
319
320    public String getSystem() {
321      switch (this) {
322      case RESPONSE:
323        return "http://hl7.org/fhir/assert-direction-codes";
324      case REQUEST:
325        return "http://hl7.org/fhir/assert-direction-codes";
326      case NULL:
327        return null;
328      default:
329        return "?";
330      }
331    }
332
333    public String getDefinition() {
334      switch (this) {
335      case RESPONSE:
336        return "The assertion is evaluated on the response. This is the default value.";
337      case REQUEST:
338        return "The assertion is evaluated on the request.";
339      case NULL:
340        return null;
341      default:
342        return "?";
343      }
344    }
345
346    public String getDisplay() {
347      switch (this) {
348      case RESPONSE:
349        return "response";
350      case REQUEST:
351        return "request";
352      case NULL:
353        return null;
354      default:
355        return "?";
356      }
357    }
358  }
359
360  public static class AssertionDirectionTypeEnumFactory implements EnumFactory<AssertionDirectionType> {
361    public AssertionDirectionType fromCode(String codeString) throws IllegalArgumentException {
362      if (codeString == null || "".equals(codeString))
363        if (codeString == null || "".equals(codeString))
364          return null;
365      if ("response".equals(codeString))
366        return AssertionDirectionType.RESPONSE;
367      if ("request".equals(codeString))
368        return AssertionDirectionType.REQUEST;
369      throw new IllegalArgumentException("Unknown AssertionDirectionType code '" + codeString + "'");
370    }
371
372    public Enumeration<AssertionDirectionType> fromType(PrimitiveType<?> code) throws FHIRException {
373      if (code == null)
374        return null;
375      if (code.isEmpty())
376        return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.NULL, code);
377      String codeString = code.asStringValue();
378      if (codeString == null || "".equals(codeString))
379        return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.NULL, code);
380      if ("response".equals(codeString))
381        return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.RESPONSE, code);
382      if ("request".equals(codeString))
383        return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.REQUEST, code);
384      throw new FHIRException("Unknown AssertionDirectionType code '" + codeString + "'");
385    }
386
387    public String toCode(AssertionDirectionType code) {
388      if (code == AssertionDirectionType.RESPONSE)
389        return "response";
390      if (code == AssertionDirectionType.REQUEST)
391        return "request";
392      return "?";
393    }
394
395    public String toSystem(AssertionDirectionType code) {
396      return code.getSystem();
397    }
398  }
399
400  public enum AssertionOperatorType {
401    /**
402     * Default value. Equals comparison.
403     */
404    EQUALS,
405    /**
406     * Not equals comparison.
407     */
408    NOTEQUALS,
409    /**
410     * Compare value within a known set of values.
411     */
412    IN,
413    /**
414     * Compare value not within a known set of values.
415     */
416    NOTIN,
417    /**
418     * Compare value to be greater than a known value.
419     */
420    GREATERTHAN,
421    /**
422     * Compare value to be less than a known value.
423     */
424    LESSTHAN,
425    /**
426     * Compare value is empty.
427     */
428    EMPTY,
429    /**
430     * Compare value is not empty.
431     */
432    NOTEMPTY,
433    /**
434     * Compare value string contains a known value.
435     */
436    CONTAINS,
437    /**
438     * Compare value string does not contain a known value.
439     */
440    NOTCONTAINS,
441    /**
442     * Evaluate the FHIRPath expression as a boolean condition.
443     */
444    EVAL,
445    /**
446     * added to help the parsers with the generic types
447     */
448    NULL;
449
450    public static AssertionOperatorType fromCode(String codeString) throws FHIRException {
451      if (codeString == null || "".equals(codeString))
452        return null;
453      if ("equals".equals(codeString))
454        return EQUALS;
455      if ("notEquals".equals(codeString))
456        return NOTEQUALS;
457      if ("in".equals(codeString))
458        return IN;
459      if ("notIn".equals(codeString))
460        return NOTIN;
461      if ("greaterThan".equals(codeString))
462        return GREATERTHAN;
463      if ("lessThan".equals(codeString))
464        return LESSTHAN;
465      if ("empty".equals(codeString))
466        return EMPTY;
467      if ("notEmpty".equals(codeString))
468        return NOTEMPTY;
469      if ("contains".equals(codeString))
470        return CONTAINS;
471      if ("notContains".equals(codeString))
472        return NOTCONTAINS;
473      if ("eval".equals(codeString))
474        return EVAL;
475      if (Configuration.isAcceptInvalidEnums())
476        return null;
477      else
478        throw new FHIRException("Unknown AssertionOperatorType code '" + codeString + "'");
479    }
480
481    public String toCode() {
482      switch (this) {
483      case EQUALS:
484        return "equals";
485      case NOTEQUALS:
486        return "notEquals";
487      case IN:
488        return "in";
489      case NOTIN:
490        return "notIn";
491      case GREATERTHAN:
492        return "greaterThan";
493      case LESSTHAN:
494        return "lessThan";
495      case EMPTY:
496        return "empty";
497      case NOTEMPTY:
498        return "notEmpty";
499      case CONTAINS:
500        return "contains";
501      case NOTCONTAINS:
502        return "notContains";
503      case EVAL:
504        return "eval";
505      case NULL:
506        return null;
507      default:
508        return "?";
509      }
510    }
511
512    public String getSystem() {
513      switch (this) {
514      case EQUALS:
515        return "http://hl7.org/fhir/assert-operator-codes";
516      case NOTEQUALS:
517        return "http://hl7.org/fhir/assert-operator-codes";
518      case IN:
519        return "http://hl7.org/fhir/assert-operator-codes";
520      case NOTIN:
521        return "http://hl7.org/fhir/assert-operator-codes";
522      case GREATERTHAN:
523        return "http://hl7.org/fhir/assert-operator-codes";
524      case LESSTHAN:
525        return "http://hl7.org/fhir/assert-operator-codes";
526      case EMPTY:
527        return "http://hl7.org/fhir/assert-operator-codes";
528      case NOTEMPTY:
529        return "http://hl7.org/fhir/assert-operator-codes";
530      case CONTAINS:
531        return "http://hl7.org/fhir/assert-operator-codes";
532      case NOTCONTAINS:
533        return "http://hl7.org/fhir/assert-operator-codes";
534      case EVAL:
535        return "http://hl7.org/fhir/assert-operator-codes";
536      case NULL:
537        return null;
538      default:
539        return "?";
540      }
541    }
542
543    public String getDefinition() {
544      switch (this) {
545      case EQUALS:
546        return "Default value. Equals comparison.";
547      case NOTEQUALS:
548        return "Not equals comparison.";
549      case IN:
550        return "Compare value within a known set of values.";
551      case NOTIN:
552        return "Compare value not within a known set of values.";
553      case GREATERTHAN:
554        return "Compare value to be greater than a known value.";
555      case LESSTHAN:
556        return "Compare value to be less than a known value.";
557      case EMPTY:
558        return "Compare value is empty.";
559      case NOTEMPTY:
560        return "Compare value is not empty.";
561      case CONTAINS:
562        return "Compare value string contains a known value.";
563      case NOTCONTAINS:
564        return "Compare value string does not contain a known value.";
565      case EVAL:
566        return "Evaluate the FHIRPath expression as a boolean condition.";
567      case NULL:
568        return null;
569      default:
570        return "?";
571      }
572    }
573
574    public String getDisplay() {
575      switch (this) {
576      case EQUALS:
577        return "equals";
578      case NOTEQUALS:
579        return "notEquals";
580      case IN:
581        return "in";
582      case NOTIN:
583        return "notIn";
584      case GREATERTHAN:
585        return "greaterThan";
586      case LESSTHAN:
587        return "lessThan";
588      case EMPTY:
589        return "empty";
590      case NOTEMPTY:
591        return "notEmpty";
592      case CONTAINS:
593        return "contains";
594      case NOTCONTAINS:
595        return "notContains";
596      case EVAL:
597        return "evaluate";
598      case NULL:
599        return null;
600      default:
601        return "?";
602      }
603    }
604  }
605
606  public static class AssertionOperatorTypeEnumFactory implements EnumFactory<AssertionOperatorType> {
607    public AssertionOperatorType fromCode(String codeString) throws IllegalArgumentException {
608      if (codeString == null || "".equals(codeString))
609        if (codeString == null || "".equals(codeString))
610          return null;
611      if ("equals".equals(codeString))
612        return AssertionOperatorType.EQUALS;
613      if ("notEquals".equals(codeString))
614        return AssertionOperatorType.NOTEQUALS;
615      if ("in".equals(codeString))
616        return AssertionOperatorType.IN;
617      if ("notIn".equals(codeString))
618        return AssertionOperatorType.NOTIN;
619      if ("greaterThan".equals(codeString))
620        return AssertionOperatorType.GREATERTHAN;
621      if ("lessThan".equals(codeString))
622        return AssertionOperatorType.LESSTHAN;
623      if ("empty".equals(codeString))
624        return AssertionOperatorType.EMPTY;
625      if ("notEmpty".equals(codeString))
626        return AssertionOperatorType.NOTEMPTY;
627      if ("contains".equals(codeString))
628        return AssertionOperatorType.CONTAINS;
629      if ("notContains".equals(codeString))
630        return AssertionOperatorType.NOTCONTAINS;
631      if ("eval".equals(codeString))
632        return AssertionOperatorType.EVAL;
633      throw new IllegalArgumentException("Unknown AssertionOperatorType code '" + codeString + "'");
634    }
635
636    public Enumeration<AssertionOperatorType> fromType(PrimitiveType<?> code) throws FHIRException {
637      if (code == null)
638        return null;
639      if (code.isEmpty())
640        return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NULL, code);
641      String codeString = code.asStringValue();
642      if (codeString == null || "".equals(codeString))
643        return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NULL, code);
644      if ("equals".equals(codeString))
645        return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EQUALS, code);
646      if ("notEquals".equals(codeString))
647        return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEQUALS, code);
648      if ("in".equals(codeString))
649        return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.IN, code);
650      if ("notIn".equals(codeString))
651        return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTIN, code);
652      if ("greaterThan".equals(codeString))
653        return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.GREATERTHAN, code);
654      if ("lessThan".equals(codeString))
655        return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.LESSTHAN, code);
656      if ("empty".equals(codeString))
657        return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EMPTY, code);
658      if ("notEmpty".equals(codeString))
659        return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEMPTY, code);
660      if ("contains".equals(codeString))
661        return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.CONTAINS, code);
662      if ("notContains".equals(codeString))
663        return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTCONTAINS, code);
664      if ("eval".equals(codeString))
665        return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EVAL, code);
666      throw new FHIRException("Unknown AssertionOperatorType code '" + codeString + "'");
667    }
668
669    public String toCode(AssertionOperatorType code) {
670      if (code == AssertionOperatorType.EQUALS)
671        return "equals";
672      if (code == AssertionOperatorType.NOTEQUALS)
673        return "notEquals";
674      if (code == AssertionOperatorType.IN)
675        return "in";
676      if (code == AssertionOperatorType.NOTIN)
677        return "notIn";
678      if (code == AssertionOperatorType.GREATERTHAN)
679        return "greaterThan";
680      if (code == AssertionOperatorType.LESSTHAN)
681        return "lessThan";
682      if (code == AssertionOperatorType.EMPTY)
683        return "empty";
684      if (code == AssertionOperatorType.NOTEMPTY)
685        return "notEmpty";
686      if (code == AssertionOperatorType.CONTAINS)
687        return "contains";
688      if (code == AssertionOperatorType.NOTCONTAINS)
689        return "notContains";
690      if (code == AssertionOperatorType.EVAL)
691        return "eval";
692      return "?";
693    }
694
695    public String toSystem(AssertionOperatorType code) {
696      return code.getSystem();
697    }
698  }
699
700  public enum AssertionResponseTypes {
701    /**
702     * Response code is 200.
703     */
704    OKAY,
705    /**
706     * Response code is 201.
707     */
708    CREATED,
709    /**
710     * Response code is 204.
711     */
712    NOCONTENT,
713    /**
714     * Response code is 304.
715     */
716    NOTMODIFIED,
717    /**
718     * Response code is 400.
719     */
720    BAD,
721    /**
722     * Response code is 403.
723     */
724    FORBIDDEN,
725    /**
726     * Response code is 404.
727     */
728    NOTFOUND,
729    /**
730     * Response code is 405.
731     */
732    METHODNOTALLOWED,
733    /**
734     * Response code is 409.
735     */
736    CONFLICT,
737    /**
738     * Response code is 410.
739     */
740    GONE,
741    /**
742     * Response code is 412.
743     */
744    PRECONDITIONFAILED,
745    /**
746     * Response code is 422.
747     */
748    UNPROCESSABLE,
749    /**
750     * added to help the parsers with the generic types
751     */
752    NULL;
753
754    public static AssertionResponseTypes fromCode(String codeString) throws FHIRException {
755      if (codeString == null || "".equals(codeString))
756        return null;
757      if ("okay".equals(codeString))
758        return OKAY;
759      if ("created".equals(codeString))
760        return CREATED;
761      if ("noContent".equals(codeString))
762        return NOCONTENT;
763      if ("notModified".equals(codeString))
764        return NOTMODIFIED;
765      if ("bad".equals(codeString))
766        return BAD;
767      if ("forbidden".equals(codeString))
768        return FORBIDDEN;
769      if ("notFound".equals(codeString))
770        return NOTFOUND;
771      if ("methodNotAllowed".equals(codeString))
772        return METHODNOTALLOWED;
773      if ("conflict".equals(codeString))
774        return CONFLICT;
775      if ("gone".equals(codeString))
776        return GONE;
777      if ("preconditionFailed".equals(codeString))
778        return PRECONDITIONFAILED;
779      if ("unprocessable".equals(codeString))
780        return UNPROCESSABLE;
781      if (Configuration.isAcceptInvalidEnums())
782        return null;
783      else
784        throw new FHIRException("Unknown AssertionResponseTypes code '" + codeString + "'");
785    }
786
787    public String toCode() {
788      switch (this) {
789      case OKAY:
790        return "okay";
791      case CREATED:
792        return "created";
793      case NOCONTENT:
794        return "noContent";
795      case NOTMODIFIED:
796        return "notModified";
797      case BAD:
798        return "bad";
799      case FORBIDDEN:
800        return "forbidden";
801      case NOTFOUND:
802        return "notFound";
803      case METHODNOTALLOWED:
804        return "methodNotAllowed";
805      case CONFLICT:
806        return "conflict";
807      case GONE:
808        return "gone";
809      case PRECONDITIONFAILED:
810        return "preconditionFailed";
811      case UNPROCESSABLE:
812        return "unprocessable";
813      case NULL:
814        return null;
815      default:
816        return "?";
817      }
818    }
819
820    public String getSystem() {
821      switch (this) {
822      case OKAY:
823        return "http://hl7.org/fhir/assert-response-code-types";
824      case CREATED:
825        return "http://hl7.org/fhir/assert-response-code-types";
826      case NOCONTENT:
827        return "http://hl7.org/fhir/assert-response-code-types";
828      case NOTMODIFIED:
829        return "http://hl7.org/fhir/assert-response-code-types";
830      case BAD:
831        return "http://hl7.org/fhir/assert-response-code-types";
832      case FORBIDDEN:
833        return "http://hl7.org/fhir/assert-response-code-types";
834      case NOTFOUND:
835        return "http://hl7.org/fhir/assert-response-code-types";
836      case METHODNOTALLOWED:
837        return "http://hl7.org/fhir/assert-response-code-types";
838      case CONFLICT:
839        return "http://hl7.org/fhir/assert-response-code-types";
840      case GONE:
841        return "http://hl7.org/fhir/assert-response-code-types";
842      case PRECONDITIONFAILED:
843        return "http://hl7.org/fhir/assert-response-code-types";
844      case UNPROCESSABLE:
845        return "http://hl7.org/fhir/assert-response-code-types";
846      case NULL:
847        return null;
848      default:
849        return "?";
850      }
851    }
852
853    public String getDefinition() {
854      switch (this) {
855      case OKAY:
856        return "Response code is 200.";
857      case CREATED:
858        return "Response code is 201.";
859      case NOCONTENT:
860        return "Response code is 204.";
861      case NOTMODIFIED:
862        return "Response code is 304.";
863      case BAD:
864        return "Response code is 400.";
865      case FORBIDDEN:
866        return "Response code is 403.";
867      case NOTFOUND:
868        return "Response code is 404.";
869      case METHODNOTALLOWED:
870        return "Response code is 405.";
871      case CONFLICT:
872        return "Response code is 409.";
873      case GONE:
874        return "Response code is 410.";
875      case PRECONDITIONFAILED:
876        return "Response code is 412.";
877      case UNPROCESSABLE:
878        return "Response code is 422.";
879      case NULL:
880        return null;
881      default:
882        return "?";
883      }
884    }
885
886    public String getDisplay() {
887      switch (this) {
888      case OKAY:
889        return "okay";
890      case CREATED:
891        return "created";
892      case NOCONTENT:
893        return "noContent";
894      case NOTMODIFIED:
895        return "notModified";
896      case BAD:
897        return "bad";
898      case FORBIDDEN:
899        return "forbidden";
900      case NOTFOUND:
901        return "notFound";
902      case METHODNOTALLOWED:
903        return "methodNotAllowed";
904      case CONFLICT:
905        return "conflict";
906      case GONE:
907        return "gone";
908      case PRECONDITIONFAILED:
909        return "preconditionFailed";
910      case UNPROCESSABLE:
911        return "unprocessable";
912      case NULL:
913        return null;
914      default:
915        return "?";
916      }
917    }
918  }
919
920  public static class AssertionResponseTypesEnumFactory implements EnumFactory<AssertionResponseTypes> {
921    public AssertionResponseTypes fromCode(String codeString) throws IllegalArgumentException {
922      if (codeString == null || "".equals(codeString))
923        if (codeString == null || "".equals(codeString))
924          return null;
925      if ("okay".equals(codeString))
926        return AssertionResponseTypes.OKAY;
927      if ("created".equals(codeString))
928        return AssertionResponseTypes.CREATED;
929      if ("noContent".equals(codeString))
930        return AssertionResponseTypes.NOCONTENT;
931      if ("notModified".equals(codeString))
932        return AssertionResponseTypes.NOTMODIFIED;
933      if ("bad".equals(codeString))
934        return AssertionResponseTypes.BAD;
935      if ("forbidden".equals(codeString))
936        return AssertionResponseTypes.FORBIDDEN;
937      if ("notFound".equals(codeString))
938        return AssertionResponseTypes.NOTFOUND;
939      if ("methodNotAllowed".equals(codeString))
940        return AssertionResponseTypes.METHODNOTALLOWED;
941      if ("conflict".equals(codeString))
942        return AssertionResponseTypes.CONFLICT;
943      if ("gone".equals(codeString))
944        return AssertionResponseTypes.GONE;
945      if ("preconditionFailed".equals(codeString))
946        return AssertionResponseTypes.PRECONDITIONFAILED;
947      if ("unprocessable".equals(codeString))
948        return AssertionResponseTypes.UNPROCESSABLE;
949      throw new IllegalArgumentException("Unknown AssertionResponseTypes code '" + codeString + "'");
950    }
951
952    public Enumeration<AssertionResponseTypes> fromType(PrimitiveType<?> code) throws FHIRException {
953      if (code == null)
954        return null;
955      if (code.isEmpty())
956        return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NULL, code);
957      String codeString = code.asStringValue();
958      if (codeString == null || "".equals(codeString))
959        return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NULL, code);
960      if ("okay".equals(codeString))
961        return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.OKAY, code);
962      if ("created".equals(codeString))
963        return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CREATED, code);
964      if ("noContent".equals(codeString))
965        return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOCONTENT, code);
966      if ("notModified".equals(codeString))
967        return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTMODIFIED, code);
968      if ("bad".equals(codeString))
969        return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.BAD, code);
970      if ("forbidden".equals(codeString))
971        return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.FORBIDDEN, code);
972      if ("notFound".equals(codeString))
973        return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTFOUND, code);
974      if ("methodNotAllowed".equals(codeString))
975        return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.METHODNOTALLOWED, code);
976      if ("conflict".equals(codeString))
977        return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CONFLICT, code);
978      if ("gone".equals(codeString))
979        return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.GONE, code);
980      if ("preconditionFailed".equals(codeString))
981        return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.PRECONDITIONFAILED, code);
982      if ("unprocessable".equals(codeString))
983        return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.UNPROCESSABLE, code);
984      throw new FHIRException("Unknown AssertionResponseTypes code '" + codeString + "'");
985    }
986
987    public String toCode(AssertionResponseTypes code) {
988      if (code == AssertionResponseTypes.OKAY)
989        return "okay";
990      if (code == AssertionResponseTypes.CREATED)
991        return "created";
992      if (code == AssertionResponseTypes.NOCONTENT)
993        return "noContent";
994      if (code == AssertionResponseTypes.NOTMODIFIED)
995        return "notModified";
996      if (code == AssertionResponseTypes.BAD)
997        return "bad";
998      if (code == AssertionResponseTypes.FORBIDDEN)
999        return "forbidden";
1000      if (code == AssertionResponseTypes.NOTFOUND)
1001        return "notFound";
1002      if (code == AssertionResponseTypes.METHODNOTALLOWED)
1003        return "methodNotAllowed";
1004      if (code == AssertionResponseTypes.CONFLICT)
1005        return "conflict";
1006      if (code == AssertionResponseTypes.GONE)
1007        return "gone";
1008      if (code == AssertionResponseTypes.PRECONDITIONFAILED)
1009        return "preconditionFailed";
1010      if (code == AssertionResponseTypes.UNPROCESSABLE)
1011        return "unprocessable";
1012      return "?";
1013    }
1014
1015    public String toSystem(AssertionResponseTypes code) {
1016      return code.getSystem();
1017    }
1018  }
1019
1020  @Block()
1021  public static class TestScriptOriginComponent extends BackboneElement implements IBaseBackboneElement {
1022    /**
1023     * Abstract name given to an origin server in this test script. The name is
1024     * provided as a number starting at 1.
1025     */
1026    @Child(name = "index", type = { IntegerType.class }, order = 1, min = 1, max = 1, modifier = false, summary = false)
1027    @Description(shortDefinition = "The index of the abstract origin server starting at 1", formalDefinition = "Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.")
1028    protected IntegerType index;
1029
1030    /**
1031     * The type of origin profile the test system supports.
1032     */
1033    @Child(name = "profile", type = { Coding.class }, order = 2, min = 1, max = 1, modifier = false, summary = false)
1034    @Description(shortDefinition = "FHIR-Client | FHIR-SDC-FormFiller", formalDefinition = "The type of origin profile the test system supports.")
1035    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/testscript-profile-origin-types")
1036    protected Coding profile;
1037
1038    private static final long serialVersionUID = -1239935149L;
1039
1040    /**
1041     * Constructor
1042     */
1043    public TestScriptOriginComponent() {
1044      super();
1045    }
1046
1047    /**
1048     * Constructor
1049     */
1050    public TestScriptOriginComponent(IntegerType index, Coding profile) {
1051      super();
1052      this.index = index;
1053      this.profile = profile;
1054    }
1055
1056    /**
1057     * @return {@link #index} (Abstract name given to an origin server in this test
1058     *         script. The name is provided as a number starting at 1.). This is the
1059     *         underlying object with id, value and extensions. The accessor
1060     *         "getIndex" gives direct access to the value
1061     */
1062    public IntegerType getIndexElement() {
1063      if (this.index == null)
1064        if (Configuration.errorOnAutoCreate())
1065          throw new Error("Attempt to auto-create TestScriptOriginComponent.index");
1066        else if (Configuration.doAutoCreate())
1067          this.index = new IntegerType(); // bb
1068      return this.index;
1069    }
1070
1071    public boolean hasIndexElement() {
1072      return this.index != null && !this.index.isEmpty();
1073    }
1074
1075    public boolean hasIndex() {
1076      return this.index != null && !this.index.isEmpty();
1077    }
1078
1079    /**
1080     * @param value {@link #index} (Abstract name given to an origin server in this
1081     *              test script. The name is provided as a number starting at 1.).
1082     *              This is the underlying object with id, value and extensions. The
1083     *              accessor "getIndex" gives direct access to the value
1084     */
1085    public TestScriptOriginComponent setIndexElement(IntegerType value) {
1086      this.index = value;
1087      return this;
1088    }
1089
1090    /**
1091     * @return Abstract name given to an origin server in this test script. The name
1092     *         is provided as a number starting at 1.
1093     */
1094    public int getIndex() {
1095      return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue();
1096    }
1097
1098    /**
1099     * @param value Abstract name given to an origin server in this test script. The
1100     *              name is provided as a number starting at 1.
1101     */
1102    public TestScriptOriginComponent setIndex(int value) {
1103      if (this.index == null)
1104        this.index = new IntegerType();
1105      this.index.setValue(value);
1106      return this;
1107    }
1108
1109    /**
1110     * @return {@link #profile} (The type of origin profile the test system
1111     *         supports.)
1112     */
1113    public Coding getProfile() {
1114      if (this.profile == null)
1115        if (Configuration.errorOnAutoCreate())
1116          throw new Error("Attempt to auto-create TestScriptOriginComponent.profile");
1117        else if (Configuration.doAutoCreate())
1118          this.profile = new Coding(); // cc
1119      return this.profile;
1120    }
1121
1122    public boolean hasProfile() {
1123      return this.profile != null && !this.profile.isEmpty();
1124    }
1125
1126    /**
1127     * @param value {@link #profile} (The type of origin profile the test system
1128     *              supports.)
1129     */
1130    public TestScriptOriginComponent setProfile(Coding value) {
1131      this.profile = value;
1132      return this;
1133    }
1134
1135    protected void listChildren(List<Property> children) {
1136      super.listChildren(children);
1137      children.add(new Property("index", "integer",
1138          "Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.",
1139          0, 1, index));
1140      children.add(
1141          new Property("profile", "Coding", "The type of origin profile the test system supports.", 0, 1, profile));
1142    }
1143
1144    @Override
1145    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1146      switch (_hash) {
1147      case 100346066:
1148        /* index */ return new Property("index", "integer",
1149            "Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.",
1150            0, 1, index);
1151      case -309425751:
1152        /* profile */ return new Property("profile", "Coding", "The type of origin profile the test system supports.",
1153            0, 1, profile);
1154      default:
1155        return super.getNamedProperty(_hash, _name, _checkValid);
1156      }
1157
1158    }
1159
1160    @Override
1161    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1162      switch (hash) {
1163      case 100346066:
1164        /* index */ return this.index == null ? new Base[0] : new Base[] { this.index }; // IntegerType
1165      case -309425751:
1166        /* profile */ return this.profile == null ? new Base[0] : new Base[] { this.profile }; // Coding
1167      default:
1168        return super.getProperty(hash, name, checkValid);
1169      }
1170
1171    }
1172
1173    @Override
1174    public Base setProperty(int hash, String name, Base value) throws FHIRException {
1175      switch (hash) {
1176      case 100346066: // index
1177        this.index = castToInteger(value); // IntegerType
1178        return value;
1179      case -309425751: // profile
1180        this.profile = castToCoding(value); // Coding
1181        return value;
1182      default:
1183        return super.setProperty(hash, name, value);
1184      }
1185
1186    }
1187
1188    @Override
1189    public Base setProperty(String name, Base value) throws FHIRException {
1190      if (name.equals("index")) {
1191        this.index = castToInteger(value); // IntegerType
1192      } else if (name.equals("profile")) {
1193        this.profile = castToCoding(value); // Coding
1194      } else
1195        return super.setProperty(name, value);
1196      return value;
1197    }
1198
1199  @Override
1200  public void removeChild(String name, Base value) throws FHIRException {
1201      if (name.equals("index")) {
1202        this.index = null;
1203      } else if (name.equals("profile")) {
1204        this.profile = null;
1205      } else
1206        super.removeChild(name, value);
1207      
1208    }
1209
1210    @Override
1211    public Base makeProperty(int hash, String name) throws FHIRException {
1212      switch (hash) {
1213      case 100346066:
1214        return getIndexElement();
1215      case -309425751:
1216        return getProfile();
1217      default:
1218        return super.makeProperty(hash, name);
1219      }
1220
1221    }
1222
1223    @Override
1224    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1225      switch (hash) {
1226      case 100346066:
1227        /* index */ return new String[] { "integer" };
1228      case -309425751:
1229        /* profile */ return new String[] { "Coding" };
1230      default:
1231        return super.getTypesForProperty(hash, name);
1232      }
1233
1234    }
1235
1236    @Override
1237    public Base addChild(String name) throws FHIRException {
1238      if (name.equals("index")) {
1239        throw new FHIRException("Cannot call addChild on a singleton property TestScript.index");
1240      } else if (name.equals("profile")) {
1241        this.profile = new Coding();
1242        return this.profile;
1243      } else
1244        return super.addChild(name);
1245    }
1246
1247    public TestScriptOriginComponent copy() {
1248      TestScriptOriginComponent dst = new TestScriptOriginComponent();
1249      copyValues(dst);
1250      return dst;
1251    }
1252
1253    public void copyValues(TestScriptOriginComponent dst) {
1254      super.copyValues(dst);
1255      dst.index = index == null ? null : index.copy();
1256      dst.profile = profile == null ? null : profile.copy();
1257    }
1258
1259    @Override
1260    public boolean equalsDeep(Base other_) {
1261      if (!super.equalsDeep(other_))
1262        return false;
1263      if (!(other_ instanceof TestScriptOriginComponent))
1264        return false;
1265      TestScriptOriginComponent o = (TestScriptOriginComponent) other_;
1266      return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true);
1267    }
1268
1269    @Override
1270    public boolean equalsShallow(Base other_) {
1271      if (!super.equalsShallow(other_))
1272        return false;
1273      if (!(other_ instanceof TestScriptOriginComponent))
1274        return false;
1275      TestScriptOriginComponent o = (TestScriptOriginComponent) other_;
1276      return compareValues(index, o.index, true);
1277    }
1278
1279    public boolean isEmpty() {
1280      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(index, profile);
1281    }
1282
1283    public String fhirType() {
1284      return "TestScript.origin";
1285
1286    }
1287
1288  }
1289
1290  @Block()
1291  public static class TestScriptDestinationComponent extends BackboneElement implements IBaseBackboneElement {
1292    /**
1293     * Abstract name given to a destination server in this test script. The name is
1294     * provided as a number starting at 1.
1295     */
1296    @Child(name = "index", type = { IntegerType.class }, order = 1, min = 1, max = 1, modifier = false, summary = false)
1297    @Description(shortDefinition = "The index of the abstract destination server starting at 1", formalDefinition = "Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.")
1298    protected IntegerType index;
1299
1300    /**
1301     * The type of destination profile the test system supports.
1302     */
1303    @Child(name = "profile", type = { Coding.class }, order = 2, min = 1, max = 1, modifier = false, summary = false)
1304    @Description(shortDefinition = "FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor", formalDefinition = "The type of destination profile the test system supports.")
1305    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/testscript-profile-destination-types")
1306    protected Coding profile;
1307
1308    private static final long serialVersionUID = -1239935149L;
1309
1310    /**
1311     * Constructor
1312     */
1313    public TestScriptDestinationComponent() {
1314      super();
1315    }
1316
1317    /**
1318     * Constructor
1319     */
1320    public TestScriptDestinationComponent(IntegerType index, Coding profile) {
1321      super();
1322      this.index = index;
1323      this.profile = profile;
1324    }
1325
1326    /**
1327     * @return {@link #index} (Abstract name given to a destination server in this
1328     *         test script. The name is provided as a number starting at 1.). This
1329     *         is the underlying object with id, value and extensions. The accessor
1330     *         "getIndex" gives direct access to the value
1331     */
1332    public IntegerType getIndexElement() {
1333      if (this.index == null)
1334        if (Configuration.errorOnAutoCreate())
1335          throw new Error("Attempt to auto-create TestScriptDestinationComponent.index");
1336        else if (Configuration.doAutoCreate())
1337          this.index = new IntegerType(); // bb
1338      return this.index;
1339    }
1340
1341    public boolean hasIndexElement() {
1342      return this.index != null && !this.index.isEmpty();
1343    }
1344
1345    public boolean hasIndex() {
1346      return this.index != null && !this.index.isEmpty();
1347    }
1348
1349    /**
1350     * @param value {@link #index} (Abstract name given to a destination server in
1351     *              this test script. The name is provided as a number starting at
1352     *              1.). This is the underlying object with id, value and
1353     *              extensions. The accessor "getIndex" gives direct access to the
1354     *              value
1355     */
1356    public TestScriptDestinationComponent setIndexElement(IntegerType value) {
1357      this.index = value;
1358      return this;
1359    }
1360
1361    /**
1362     * @return Abstract name given to a destination server in this test script. The
1363     *         name is provided as a number starting at 1.
1364     */
1365    public int getIndex() {
1366      return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue();
1367    }
1368
1369    /**
1370     * @param value Abstract name given to a destination server in this test script.
1371     *              The name is provided as a number starting at 1.
1372     */
1373    public TestScriptDestinationComponent setIndex(int value) {
1374      if (this.index == null)
1375        this.index = new IntegerType();
1376      this.index.setValue(value);
1377      return this;
1378    }
1379
1380    /**
1381     * @return {@link #profile} (The type of destination profile the test system
1382     *         supports.)
1383     */
1384    public Coding getProfile() {
1385      if (this.profile == null)
1386        if (Configuration.errorOnAutoCreate())
1387          throw new Error("Attempt to auto-create TestScriptDestinationComponent.profile");
1388        else if (Configuration.doAutoCreate())
1389          this.profile = new Coding(); // cc
1390      return this.profile;
1391    }
1392
1393    public boolean hasProfile() {
1394      return this.profile != null && !this.profile.isEmpty();
1395    }
1396
1397    /**
1398     * @param value {@link #profile} (The type of destination profile the test
1399     *              system supports.)
1400     */
1401    public TestScriptDestinationComponent setProfile(Coding value) {
1402      this.profile = value;
1403      return this;
1404    }
1405
1406    protected void listChildren(List<Property> children) {
1407      super.listChildren(children);
1408      children.add(new Property("index", "integer",
1409          "Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.",
1410          0, 1, index));
1411      children.add(new Property("profile", "Coding", "The type of destination profile the test system supports.", 0, 1,
1412          profile));
1413    }
1414
1415    @Override
1416    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1417      switch (_hash) {
1418      case 100346066:
1419        /* index */ return new Property("index", "integer",
1420            "Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.",
1421            0, 1, index);
1422      case -309425751:
1423        /* profile */ return new Property("profile", "Coding",
1424            "The type of destination profile the test system supports.", 0, 1, profile);
1425      default:
1426        return super.getNamedProperty(_hash, _name, _checkValid);
1427      }
1428
1429    }
1430
1431    @Override
1432    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1433      switch (hash) {
1434      case 100346066:
1435        /* index */ return this.index == null ? new Base[0] : new Base[] { this.index }; // IntegerType
1436      case -309425751:
1437        /* profile */ return this.profile == null ? new Base[0] : new Base[] { this.profile }; // Coding
1438      default:
1439        return super.getProperty(hash, name, checkValid);
1440      }
1441
1442    }
1443
1444    @Override
1445    public Base setProperty(int hash, String name, Base value) throws FHIRException {
1446      switch (hash) {
1447      case 100346066: // index
1448        this.index = castToInteger(value); // IntegerType
1449        return value;
1450      case -309425751: // profile
1451        this.profile = castToCoding(value); // Coding
1452        return value;
1453      default:
1454        return super.setProperty(hash, name, value);
1455      }
1456
1457    }
1458
1459    @Override
1460    public Base setProperty(String name, Base value) throws FHIRException {
1461      if (name.equals("index")) {
1462        this.index = castToInteger(value); // IntegerType
1463      } else if (name.equals("profile")) {
1464        this.profile = castToCoding(value); // Coding
1465      } else
1466        return super.setProperty(name, value);
1467      return value;
1468    }
1469
1470  @Override
1471  public void removeChild(String name, Base value) throws FHIRException {
1472      if (name.equals("index")) {
1473        this.index = null;
1474      } else if (name.equals("profile")) {
1475        this.profile = null;
1476      } else
1477        super.removeChild(name, value);
1478      
1479    }
1480
1481    @Override
1482    public Base makeProperty(int hash, String name) throws FHIRException {
1483      switch (hash) {
1484      case 100346066:
1485        return getIndexElement();
1486      case -309425751:
1487        return getProfile();
1488      default:
1489        return super.makeProperty(hash, name);
1490      }
1491
1492    }
1493
1494    @Override
1495    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1496      switch (hash) {
1497      case 100346066:
1498        /* index */ return new String[] { "integer" };
1499      case -309425751:
1500        /* profile */ return new String[] { "Coding" };
1501      default:
1502        return super.getTypesForProperty(hash, name);
1503      }
1504
1505    }
1506
1507    @Override
1508    public Base addChild(String name) throws FHIRException {
1509      if (name.equals("index")) {
1510        throw new FHIRException("Cannot call addChild on a singleton property TestScript.index");
1511      } else if (name.equals("profile")) {
1512        this.profile = new Coding();
1513        return this.profile;
1514      } else
1515        return super.addChild(name);
1516    }
1517
1518    public TestScriptDestinationComponent copy() {
1519      TestScriptDestinationComponent dst = new TestScriptDestinationComponent();
1520      copyValues(dst);
1521      return dst;
1522    }
1523
1524    public void copyValues(TestScriptDestinationComponent dst) {
1525      super.copyValues(dst);
1526      dst.index = index == null ? null : index.copy();
1527      dst.profile = profile == null ? null : profile.copy();
1528    }
1529
1530    @Override
1531    public boolean equalsDeep(Base other_) {
1532      if (!super.equalsDeep(other_))
1533        return false;
1534      if (!(other_ instanceof TestScriptDestinationComponent))
1535        return false;
1536      TestScriptDestinationComponent o = (TestScriptDestinationComponent) other_;
1537      return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true);
1538    }
1539
1540    @Override
1541    public boolean equalsShallow(Base other_) {
1542      if (!super.equalsShallow(other_))
1543        return false;
1544      if (!(other_ instanceof TestScriptDestinationComponent))
1545        return false;
1546      TestScriptDestinationComponent o = (TestScriptDestinationComponent) other_;
1547      return compareValues(index, o.index, true);
1548    }
1549
1550    public boolean isEmpty() {
1551      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(index, profile);
1552    }
1553
1554    public String fhirType() {
1555      return "TestScript.destination";
1556
1557    }
1558
1559  }
1560
1561  @Block()
1562  public static class TestScriptMetadataComponent extends BackboneElement implements IBaseBackboneElement {
1563    /**
1564     * A link to the FHIR specification that this test is covering.
1565     */
1566    @Child(name = "link", type = {}, order = 1, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
1567    @Description(shortDefinition = "Links to the FHIR specification", formalDefinition = "A link to the FHIR specification that this test is covering.")
1568    protected List<TestScriptMetadataLinkComponent> link;
1569
1570    /**
1571     * Capabilities that must exist and are assumed to function correctly on the
1572     * FHIR server being tested.
1573     */
1574    @Child(name = "capability", type = {}, order = 2, min = 1, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
1575    @Description(shortDefinition = "Capabilities  that are assumed to function correctly on the FHIR server being tested", formalDefinition = "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.")
1576    protected List<TestScriptMetadataCapabilityComponent> capability;
1577
1578    private static final long serialVersionUID = 745183328L;
1579
1580    /**
1581     * Constructor
1582     */
1583    public TestScriptMetadataComponent() {
1584      super();
1585    }
1586
1587    /**
1588     * @return {@link #link} (A link to the FHIR specification that this test is
1589     *         covering.)
1590     */
1591    public List<TestScriptMetadataLinkComponent> getLink() {
1592      if (this.link == null)
1593        this.link = new ArrayList<TestScriptMetadataLinkComponent>();
1594      return this.link;
1595    }
1596
1597    /**
1598     * @return Returns a reference to <code>this</code> for easy method chaining
1599     */
1600    public TestScriptMetadataComponent setLink(List<TestScriptMetadataLinkComponent> theLink) {
1601      this.link = theLink;
1602      return this;
1603    }
1604
1605    public boolean hasLink() {
1606      if (this.link == null)
1607        return false;
1608      for (TestScriptMetadataLinkComponent item : this.link)
1609        if (!item.isEmpty())
1610          return true;
1611      return false;
1612    }
1613
1614    public TestScriptMetadataLinkComponent addLink() { // 3
1615      TestScriptMetadataLinkComponent t = new TestScriptMetadataLinkComponent();
1616      if (this.link == null)
1617        this.link = new ArrayList<TestScriptMetadataLinkComponent>();
1618      this.link.add(t);
1619      return t;
1620    }
1621
1622    public TestScriptMetadataComponent addLink(TestScriptMetadataLinkComponent t) { // 3
1623      if (t == null)
1624        return this;
1625      if (this.link == null)
1626        this.link = new ArrayList<TestScriptMetadataLinkComponent>();
1627      this.link.add(t);
1628      return this;
1629    }
1630
1631    /**
1632     * @return The first repetition of repeating field {@link #link}, creating it if
1633     *         it does not already exist
1634     */
1635    public TestScriptMetadataLinkComponent getLinkFirstRep() {
1636      if (getLink().isEmpty()) {
1637        addLink();
1638      }
1639      return getLink().get(0);
1640    }
1641
1642    /**
1643     * @return {@link #capability} (Capabilities that must exist and are assumed to
1644     *         function correctly on the FHIR server being tested.)
1645     */
1646    public List<TestScriptMetadataCapabilityComponent> getCapability() {
1647      if (this.capability == null)
1648        this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1649      return this.capability;
1650    }
1651
1652    /**
1653     * @return Returns a reference to <code>this</code> for easy method chaining
1654     */
1655    public TestScriptMetadataComponent setCapability(List<TestScriptMetadataCapabilityComponent> theCapability) {
1656      this.capability = theCapability;
1657      return this;
1658    }
1659
1660    public boolean hasCapability() {
1661      if (this.capability == null)
1662        return false;
1663      for (TestScriptMetadataCapabilityComponent item : this.capability)
1664        if (!item.isEmpty())
1665          return true;
1666      return false;
1667    }
1668
1669    public TestScriptMetadataCapabilityComponent addCapability() { // 3
1670      TestScriptMetadataCapabilityComponent t = new TestScriptMetadataCapabilityComponent();
1671      if (this.capability == null)
1672        this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1673      this.capability.add(t);
1674      return t;
1675    }
1676
1677    public TestScriptMetadataComponent addCapability(TestScriptMetadataCapabilityComponent t) { // 3
1678      if (t == null)
1679        return this;
1680      if (this.capability == null)
1681        this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1682      this.capability.add(t);
1683      return this;
1684    }
1685
1686    /**
1687     * @return The first repetition of repeating field {@link #capability}, creating
1688     *         it if it does not already exist
1689     */
1690    public TestScriptMetadataCapabilityComponent getCapabilityFirstRep() {
1691      if (getCapability().isEmpty()) {
1692        addCapability();
1693      }
1694      return getCapability().get(0);
1695    }
1696
1697    protected void listChildren(List<Property> children) {
1698      super.listChildren(children);
1699      children.add(new Property("link", "", "A link to the FHIR specification that this test is covering.", 0,
1700          java.lang.Integer.MAX_VALUE, link));
1701      children.add(new Property("capability", "",
1702          "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.", 0,
1703          java.lang.Integer.MAX_VALUE, capability));
1704    }
1705
1706    @Override
1707    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1708      switch (_hash) {
1709      case 3321850:
1710        /* link */ return new Property("link", "", "A link to the FHIR specification that this test is covering.", 0,
1711            java.lang.Integer.MAX_VALUE, link);
1712      case -783669992:
1713        /* capability */ return new Property("capability", "",
1714            "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.", 0,
1715            java.lang.Integer.MAX_VALUE, capability);
1716      default:
1717        return super.getNamedProperty(_hash, _name, _checkValid);
1718      }
1719
1720    }
1721
1722    @Override
1723    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1724      switch (hash) {
1725      case 3321850:
1726        /* link */ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // TestScriptMetadataLinkComponent
1727      case -783669992:
1728        /* capability */ return this.capability == null ? new Base[0]
1729            : this.capability.toArray(new Base[this.capability.size()]); // TestScriptMetadataCapabilityComponent
1730      default:
1731        return super.getProperty(hash, name, checkValid);
1732      }
1733
1734    }
1735
1736    @Override
1737    public Base setProperty(int hash, String name, Base value) throws FHIRException {
1738      switch (hash) {
1739      case 3321850: // link
1740        this.getLink().add((TestScriptMetadataLinkComponent) value); // TestScriptMetadataLinkComponent
1741        return value;
1742      case -783669992: // capability
1743        this.getCapability().add((TestScriptMetadataCapabilityComponent) value); // TestScriptMetadataCapabilityComponent
1744        return value;
1745      default:
1746        return super.setProperty(hash, name, value);
1747      }
1748
1749    }
1750
1751    @Override
1752    public Base setProperty(String name, Base value) throws FHIRException {
1753      if (name.equals("link")) {
1754        this.getLink().add((TestScriptMetadataLinkComponent) value);
1755      } else if (name.equals("capability")) {
1756        this.getCapability().add((TestScriptMetadataCapabilityComponent) value);
1757      } else
1758        return super.setProperty(name, value);
1759      return value;
1760    }
1761
1762  @Override
1763  public void removeChild(String name, Base value) throws FHIRException {
1764      if (name.equals("link")) {
1765        this.getLink().remove((TestScriptMetadataLinkComponent) value);
1766      } else if (name.equals("capability")) {
1767        this.getCapability().remove((TestScriptMetadataCapabilityComponent) value);
1768      } else
1769        super.removeChild(name, value);
1770      
1771    }
1772
1773    @Override
1774    public Base makeProperty(int hash, String name) throws FHIRException {
1775      switch (hash) {
1776      case 3321850:
1777        return addLink();
1778      case -783669992:
1779        return addCapability();
1780      default:
1781        return super.makeProperty(hash, name);
1782      }
1783
1784    }
1785
1786    @Override
1787    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1788      switch (hash) {
1789      case 3321850:
1790        /* link */ return new String[] {};
1791      case -783669992:
1792        /* capability */ return new String[] {};
1793      default:
1794        return super.getTypesForProperty(hash, name);
1795      }
1796
1797    }
1798
1799    @Override
1800    public Base addChild(String name) throws FHIRException {
1801      if (name.equals("link")) {
1802        return addLink();
1803      } else if (name.equals("capability")) {
1804        return addCapability();
1805      } else
1806        return super.addChild(name);
1807    }
1808
1809    public TestScriptMetadataComponent copy() {
1810      TestScriptMetadataComponent dst = new TestScriptMetadataComponent();
1811      copyValues(dst);
1812      return dst;
1813    }
1814
1815    public void copyValues(TestScriptMetadataComponent dst) {
1816      super.copyValues(dst);
1817      if (link != null) {
1818        dst.link = new ArrayList<TestScriptMetadataLinkComponent>();
1819        for (TestScriptMetadataLinkComponent i : link)
1820          dst.link.add(i.copy());
1821      }
1822      ;
1823      if (capability != null) {
1824        dst.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1825        for (TestScriptMetadataCapabilityComponent i : capability)
1826          dst.capability.add(i.copy());
1827      }
1828      ;
1829    }
1830
1831    @Override
1832    public boolean equalsDeep(Base other_) {
1833      if (!super.equalsDeep(other_))
1834        return false;
1835      if (!(other_ instanceof TestScriptMetadataComponent))
1836        return false;
1837      TestScriptMetadataComponent o = (TestScriptMetadataComponent) other_;
1838      return compareDeep(link, o.link, true) && compareDeep(capability, o.capability, true);
1839    }
1840
1841    @Override
1842    public boolean equalsShallow(Base other_) {
1843      if (!super.equalsShallow(other_))
1844        return false;
1845      if (!(other_ instanceof TestScriptMetadataComponent))
1846        return false;
1847      TestScriptMetadataComponent o = (TestScriptMetadataComponent) other_;
1848      return true;
1849    }
1850
1851    public boolean isEmpty() {
1852      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(link, capability);
1853    }
1854
1855    public String fhirType() {
1856      return "TestScript.metadata";
1857
1858    }
1859
1860  }
1861
1862  @Block()
1863  public static class TestScriptMetadataLinkComponent extends BackboneElement implements IBaseBackboneElement {
1864    /**
1865     * URL to a particular requirement or feature within the FHIR specification.
1866     */
1867    @Child(name = "url", type = { UriType.class }, order = 1, min = 1, max = 1, modifier = false, summary = false)
1868    @Description(shortDefinition = "URL to the specification", formalDefinition = "URL to a particular requirement or feature within the FHIR specification.")
1869    protected UriType url;
1870
1871    /**
1872     * Short description of the link.
1873     */
1874    @Child(name = "description", type = {
1875        StringType.class }, order = 2, min = 0, max = 1, modifier = false, summary = false)
1876    @Description(shortDefinition = "Short description", formalDefinition = "Short description of the link.")
1877    protected StringType description;
1878
1879    private static final long serialVersionUID = 213372298L;
1880
1881    /**
1882     * Constructor
1883     */
1884    public TestScriptMetadataLinkComponent() {
1885      super();
1886    }
1887
1888    /**
1889     * Constructor
1890     */
1891    public TestScriptMetadataLinkComponent(UriType url) {
1892      super();
1893      this.url = url;
1894    }
1895
1896    /**
1897     * @return {@link #url} (URL to a particular requirement or feature within the
1898     *         FHIR specification.). This is the underlying object with id, value
1899     *         and extensions. The accessor "getUrl" gives direct access to the
1900     *         value
1901     */
1902    public UriType getUrlElement() {
1903      if (this.url == null)
1904        if (Configuration.errorOnAutoCreate())
1905          throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.url");
1906        else if (Configuration.doAutoCreate())
1907          this.url = new UriType(); // bb
1908      return this.url;
1909    }
1910
1911    public boolean hasUrlElement() {
1912      return this.url != null && !this.url.isEmpty();
1913    }
1914
1915    public boolean hasUrl() {
1916      return this.url != null && !this.url.isEmpty();
1917    }
1918
1919    /**
1920     * @param value {@link #url} (URL to a particular requirement or feature within
1921     *              the FHIR specification.). This is the underlying object with id,
1922     *              value and extensions. The accessor "getUrl" gives direct access
1923     *              to the value
1924     */
1925    public TestScriptMetadataLinkComponent setUrlElement(UriType value) {
1926      this.url = value;
1927      return this;
1928    }
1929
1930    /**
1931     * @return URL to a particular requirement or feature within the FHIR
1932     *         specification.
1933     */
1934    public String getUrl() {
1935      return this.url == null ? null : this.url.getValue();
1936    }
1937
1938    /**
1939     * @param value URL to a particular requirement or feature within the FHIR
1940     *              specification.
1941     */
1942    public TestScriptMetadataLinkComponent setUrl(String value) {
1943      if (this.url == null)
1944        this.url = new UriType();
1945      this.url.setValue(value);
1946      return this;
1947    }
1948
1949    /**
1950     * @return {@link #description} (Short description of the link.). This is the
1951     *         underlying object with id, value and extensions. The accessor
1952     *         "getDescription" gives direct access to the value
1953     */
1954    public StringType getDescriptionElement() {
1955      if (this.description == null)
1956        if (Configuration.errorOnAutoCreate())
1957          throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.description");
1958        else if (Configuration.doAutoCreate())
1959          this.description = new StringType(); // bb
1960      return this.description;
1961    }
1962
1963    public boolean hasDescriptionElement() {
1964      return this.description != null && !this.description.isEmpty();
1965    }
1966
1967    public boolean hasDescription() {
1968      return this.description != null && !this.description.isEmpty();
1969    }
1970
1971    /**
1972     * @param value {@link #description} (Short description of the link.). This is
1973     *              the underlying object with id, value and extensions. The
1974     *              accessor "getDescription" gives direct access to the value
1975     */
1976    public TestScriptMetadataLinkComponent setDescriptionElement(StringType value) {
1977      this.description = value;
1978      return this;
1979    }
1980
1981    /**
1982     * @return Short description of the link.
1983     */
1984    public String getDescription() {
1985      return this.description == null ? null : this.description.getValue();
1986    }
1987
1988    /**
1989     * @param value Short description of the link.
1990     */
1991    public TestScriptMetadataLinkComponent setDescription(String value) {
1992      if (Utilities.noString(value))
1993        this.description = null;
1994      else {
1995        if (this.description == null)
1996          this.description = new StringType();
1997        this.description.setValue(value);
1998      }
1999      return this;
2000    }
2001
2002    protected void listChildren(List<Property> children) {
2003      super.listChildren(children);
2004      children.add(new Property("url", "uri",
2005          "URL to a particular requirement or feature within the FHIR specification.", 0, 1, url));
2006      children.add(new Property("description", "string", "Short description of the link.", 0, 1, description));
2007    }
2008
2009    @Override
2010    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2011      switch (_hash) {
2012      case 116079:
2013        /* url */ return new Property("url", "uri",
2014            "URL to a particular requirement or feature within the FHIR specification.", 0, 1, url);
2015      case -1724546052:
2016        /* description */ return new Property("description", "string", "Short description of the link.", 0, 1,
2017            description);
2018      default:
2019        return super.getNamedProperty(_hash, _name, _checkValid);
2020      }
2021
2022    }
2023
2024    @Override
2025    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2026      switch (hash) {
2027      case 116079:
2028        /* url */ return this.url == null ? new Base[0] : new Base[] { this.url }; // UriType
2029      case -1724546052:
2030        /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // StringType
2031      default:
2032        return super.getProperty(hash, name, checkValid);
2033      }
2034
2035    }
2036
2037    @Override
2038    public Base setProperty(int hash, String name, Base value) throws FHIRException {
2039      switch (hash) {
2040      case 116079: // url
2041        this.url = castToUri(value); // UriType
2042        return value;
2043      case -1724546052: // description
2044        this.description = castToString(value); // StringType
2045        return value;
2046      default:
2047        return super.setProperty(hash, name, value);
2048      }
2049
2050    }
2051
2052    @Override
2053    public Base setProperty(String name, Base value) throws FHIRException {
2054      if (name.equals("url")) {
2055        this.url = castToUri(value); // UriType
2056      } else if (name.equals("description")) {
2057        this.description = castToString(value); // StringType
2058      } else
2059        return super.setProperty(name, value);
2060      return value;
2061    }
2062
2063  @Override
2064  public void removeChild(String name, Base value) throws FHIRException {
2065      if (name.equals("url")) {
2066        this.url = null;
2067      } else if (name.equals("description")) {
2068        this.description = null;
2069      } else
2070        super.removeChild(name, value);
2071      
2072    }
2073
2074    @Override
2075    public Base makeProperty(int hash, String name) throws FHIRException {
2076      switch (hash) {
2077      case 116079:
2078        return getUrlElement();
2079      case -1724546052:
2080        return getDescriptionElement();
2081      default:
2082        return super.makeProperty(hash, name);
2083      }
2084
2085    }
2086
2087    @Override
2088    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2089      switch (hash) {
2090      case 116079:
2091        /* url */ return new String[] { "uri" };
2092      case -1724546052:
2093        /* description */ return new String[] { "string" };
2094      default:
2095        return super.getTypesForProperty(hash, name);
2096      }
2097
2098    }
2099
2100    @Override
2101    public Base addChild(String name) throws FHIRException {
2102      if (name.equals("url")) {
2103        throw new FHIRException("Cannot call addChild on a singleton property TestScript.url");
2104      } else if (name.equals("description")) {
2105        throw new FHIRException("Cannot call addChild on a singleton property TestScript.description");
2106      } else
2107        return super.addChild(name);
2108    }
2109
2110    public TestScriptMetadataLinkComponent copy() {
2111      TestScriptMetadataLinkComponent dst = new TestScriptMetadataLinkComponent();
2112      copyValues(dst);
2113      return dst;
2114    }
2115
2116    public void copyValues(TestScriptMetadataLinkComponent dst) {
2117      super.copyValues(dst);
2118      dst.url = url == null ? null : url.copy();
2119      dst.description = description == null ? null : description.copy();
2120    }
2121
2122    @Override
2123    public boolean equalsDeep(Base other_) {
2124      if (!super.equalsDeep(other_))
2125        return false;
2126      if (!(other_ instanceof TestScriptMetadataLinkComponent))
2127        return false;
2128      TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other_;
2129      return compareDeep(url, o.url, true) && compareDeep(description, o.description, true);
2130    }
2131
2132    @Override
2133    public boolean equalsShallow(Base other_) {
2134      if (!super.equalsShallow(other_))
2135        return false;
2136      if (!(other_ instanceof TestScriptMetadataLinkComponent))
2137        return false;
2138      TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other_;
2139      return compareValues(url, o.url, true) && compareValues(description, o.description, true);
2140    }
2141
2142    public boolean isEmpty() {
2143      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, description);
2144    }
2145
2146    public String fhirType() {
2147      return "TestScript.metadata.link";
2148
2149    }
2150
2151  }
2152
2153  @Block()
2154  public static class TestScriptMetadataCapabilityComponent extends BackboneElement implements IBaseBackboneElement {
2155    /**
2156     * Whether or not the test execution will require the given capabilities of the
2157     * server in order for this test script to execute.
2158     */
2159    @Child(name = "required", type = {
2160        BooleanType.class }, order = 1, min = 1, max = 1, modifier = false, summary = false)
2161    @Description(shortDefinition = "Are the capabilities required?", formalDefinition = "Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.")
2162    protected BooleanType required;
2163
2164    /**
2165     * Whether or not the test execution will validate the given capabilities of the
2166     * server in order for this test script to execute.
2167     */
2168    @Child(name = "validated", type = {
2169        BooleanType.class }, order = 2, min = 1, max = 1, modifier = false, summary = false)
2170    @Description(shortDefinition = "Are the capabilities validated?", formalDefinition = "Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.")
2171    protected BooleanType validated;
2172
2173    /**
2174     * Description of the capabilities that this test script is requiring the server
2175     * to support.
2176     */
2177    @Child(name = "description", type = {
2178        StringType.class }, order = 3, min = 0, max = 1, modifier = false, summary = false)
2179    @Description(shortDefinition = "The expected capabilities of the server", formalDefinition = "Description of the capabilities that this test script is requiring the server to support.")
2180    protected StringType description;
2181
2182    /**
2183     * Which origin server these requirements apply to.
2184     */
2185    @Child(name = "origin", type = {
2186        IntegerType.class }, order = 4, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
2187    @Description(shortDefinition = "Which origin server these requirements apply to", formalDefinition = "Which origin server these requirements apply to.")
2188    protected List<IntegerType> origin;
2189
2190    /**
2191     * Which server these requirements apply to.
2192     */
2193    @Child(name = "destination", type = {
2194        IntegerType.class }, order = 5, min = 0, max = 1, modifier = false, summary = false)
2195    @Description(shortDefinition = "Which server these requirements apply to", formalDefinition = "Which server these requirements apply to.")
2196    protected IntegerType destination;
2197
2198    /**
2199     * Links to the FHIR specification that describes this interaction and the
2200     * resources involved in more detail.
2201     */
2202    @Child(name = "link", type = {
2203        UriType.class }, order = 6, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
2204    @Description(shortDefinition = "Links to the FHIR specification", formalDefinition = "Links to the FHIR specification that describes this interaction and the resources involved in more detail.")
2205    protected List<UriType> link;
2206
2207    /**
2208     * Minimum capabilities required of server for test script to execute
2209     * successfully. If server does not meet at a minimum the referenced capability
2210     * statement, then all tests in this script are skipped.
2211     */
2212    @Child(name = "capabilities", type = {
2213        CanonicalType.class }, order = 7, min = 1, max = 1, modifier = false, summary = false)
2214    @Description(shortDefinition = "Required Capability Statement", formalDefinition = "Minimum capabilities required of server for test script to execute successfully.   If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.")
2215    protected CanonicalType capabilities;
2216
2217    private static final long serialVersionUID = -1368199288L;
2218
2219    /**
2220     * Constructor
2221     */
2222    public TestScriptMetadataCapabilityComponent() {
2223      super();
2224    }
2225
2226    /**
2227     * Constructor
2228     */
2229    public TestScriptMetadataCapabilityComponent(BooleanType required, BooleanType validated,
2230        CanonicalType capabilities) {
2231      super();
2232      this.required = required;
2233      this.validated = validated;
2234      this.capabilities = capabilities;
2235    }
2236
2237    /**
2238     * @return {@link #required} (Whether or not the test execution will require the
2239     *         given capabilities of the server in order for this test script to
2240     *         execute.). This is the underlying object with id, value and
2241     *         extensions. The accessor "getRequired" gives direct access to the
2242     *         value
2243     */
2244    public BooleanType getRequiredElement() {
2245      if (this.required == null)
2246        if (Configuration.errorOnAutoCreate())
2247          throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.required");
2248        else if (Configuration.doAutoCreate())
2249          this.required = new BooleanType(); // bb
2250      return this.required;
2251    }
2252
2253    public boolean hasRequiredElement() {
2254      return this.required != null && !this.required.isEmpty();
2255    }
2256
2257    public boolean hasRequired() {
2258      return this.required != null && !this.required.isEmpty();
2259    }
2260
2261    /**
2262     * @param value {@link #required} (Whether or not the test execution will
2263     *              require the given capabilities of the server in order for this
2264     *              test script to execute.). This is the underlying object with id,
2265     *              value and extensions. The accessor "getRequired" gives direct
2266     *              access to the value
2267     */
2268    public TestScriptMetadataCapabilityComponent setRequiredElement(BooleanType value) {
2269      this.required = value;
2270      return this;
2271    }
2272
2273    /**
2274     * @return Whether or not the test execution will require the given capabilities
2275     *         of the server in order for this test script to execute.
2276     */
2277    public boolean getRequired() {
2278      return this.required == null || this.required.isEmpty() ? false : this.required.getValue();
2279    }
2280
2281    /**
2282     * @param value Whether or not the test execution will require the given
2283     *              capabilities of the server in order for this test script to
2284     *              execute.
2285     */
2286    public TestScriptMetadataCapabilityComponent setRequired(boolean value) {
2287      if (this.required == null)
2288        this.required = new BooleanType();
2289      this.required.setValue(value);
2290      return this;
2291    }
2292
2293    /**
2294     * @return {@link #validated} (Whether or not the test execution will validate
2295     *         the given capabilities of the server in order for this test script to
2296     *         execute.). This is the underlying object with id, value and
2297     *         extensions. The accessor "getValidated" gives direct access to the
2298     *         value
2299     */
2300    public BooleanType getValidatedElement() {
2301      if (this.validated == null)
2302        if (Configuration.errorOnAutoCreate())
2303          throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.validated");
2304        else if (Configuration.doAutoCreate())
2305          this.validated = new BooleanType(); // bb
2306      return this.validated;
2307    }
2308
2309    public boolean hasValidatedElement() {
2310      return this.validated != null && !this.validated.isEmpty();
2311    }
2312
2313    public boolean hasValidated() {
2314      return this.validated != null && !this.validated.isEmpty();
2315    }
2316
2317    /**
2318     * @param value {@link #validated} (Whether or not the test execution will
2319     *              validate the given capabilities of the server in order for this
2320     *              test script to execute.). This is the underlying object with id,
2321     *              value and extensions. The accessor "getValidated" gives direct
2322     *              access to the value
2323     */
2324    public TestScriptMetadataCapabilityComponent setValidatedElement(BooleanType value) {
2325      this.validated = value;
2326      return this;
2327    }
2328
2329    /**
2330     * @return Whether or not the test execution will validate the given
2331     *         capabilities of the server in order for this test script to execute.
2332     */
2333    public boolean getValidated() {
2334      return this.validated == null || this.validated.isEmpty() ? false : this.validated.getValue();
2335    }
2336
2337    /**
2338     * @param value Whether or not the test execution will validate the given
2339     *              capabilities of the server in order for this test script to
2340     *              execute.
2341     */
2342    public TestScriptMetadataCapabilityComponent setValidated(boolean value) {
2343      if (this.validated == null)
2344        this.validated = new BooleanType();
2345      this.validated.setValue(value);
2346      return this;
2347    }
2348
2349    /**
2350     * @return {@link #description} (Description of the capabilities that this test
2351     *         script is requiring the server to support.). This is the underlying
2352     *         object with id, value and extensions. The accessor "getDescription"
2353     *         gives direct access to the value
2354     */
2355    public StringType getDescriptionElement() {
2356      if (this.description == null)
2357        if (Configuration.errorOnAutoCreate())
2358          throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.description");
2359        else if (Configuration.doAutoCreate())
2360          this.description = new StringType(); // bb
2361      return this.description;
2362    }
2363
2364    public boolean hasDescriptionElement() {
2365      return this.description != null && !this.description.isEmpty();
2366    }
2367
2368    public boolean hasDescription() {
2369      return this.description != null && !this.description.isEmpty();
2370    }
2371
2372    /**
2373     * @param value {@link #description} (Description of the capabilities that this
2374     *              test script is requiring the server to support.). This is the
2375     *              underlying object with id, value and extensions. The accessor
2376     *              "getDescription" gives direct access to the value
2377     */
2378    public TestScriptMetadataCapabilityComponent setDescriptionElement(StringType value) {
2379      this.description = value;
2380      return this;
2381    }
2382
2383    /**
2384     * @return Description of the capabilities that this test script is requiring
2385     *         the server to support.
2386     */
2387    public String getDescription() {
2388      return this.description == null ? null : this.description.getValue();
2389    }
2390
2391    /**
2392     * @param value Description of the capabilities that this test script is
2393     *              requiring the server to support.
2394     */
2395    public TestScriptMetadataCapabilityComponent setDescription(String value) {
2396      if (Utilities.noString(value))
2397        this.description = null;
2398      else {
2399        if (this.description == null)
2400          this.description = new StringType();
2401        this.description.setValue(value);
2402      }
2403      return this;
2404    }
2405
2406    /**
2407     * @return {@link #origin} (Which origin server these requirements apply to.)
2408     */
2409    public List<IntegerType> getOrigin() {
2410      if (this.origin == null)
2411        this.origin = new ArrayList<IntegerType>();
2412      return this.origin;
2413    }
2414
2415    /**
2416     * @return Returns a reference to <code>this</code> for easy method chaining
2417     */
2418    public TestScriptMetadataCapabilityComponent setOrigin(List<IntegerType> theOrigin) {
2419      this.origin = theOrigin;
2420      return this;
2421    }
2422
2423    public boolean hasOrigin() {
2424      if (this.origin == null)
2425        return false;
2426      for (IntegerType item : this.origin)
2427        if (!item.isEmpty())
2428          return true;
2429      return false;
2430    }
2431
2432    /**
2433     * @return {@link #origin} (Which origin server these requirements apply to.)
2434     */
2435    public IntegerType addOriginElement() {// 2
2436      IntegerType t = new IntegerType();
2437      if (this.origin == null)
2438        this.origin = new ArrayList<IntegerType>();
2439      this.origin.add(t);
2440      return t;
2441    }
2442
2443    /**
2444     * @param value {@link #origin} (Which origin server these requirements apply
2445     *              to.)
2446     */
2447    public TestScriptMetadataCapabilityComponent addOrigin(int value) { // 1
2448      IntegerType t = new IntegerType();
2449      t.setValue(value);
2450      if (this.origin == null)
2451        this.origin = new ArrayList<IntegerType>();
2452      this.origin.add(t);
2453      return this;
2454    }
2455
2456    /**
2457     * @param value {@link #origin} (Which origin server these requirements apply
2458     *              to.)
2459     */
2460    public boolean hasOrigin(int value) {
2461      if (this.origin == null)
2462        return false;
2463      for (IntegerType v : this.origin)
2464        if (v.getValue().equals(value)) // integer
2465          return true;
2466      return false;
2467    }
2468
2469    /**
2470     * @return {@link #destination} (Which server these requirements apply to.).
2471     *         This is the underlying object with id, value and extensions. The
2472     *         accessor "getDestination" gives direct access to the value
2473     */
2474    public IntegerType getDestinationElement() {
2475      if (this.destination == null)
2476        if (Configuration.errorOnAutoCreate())
2477          throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.destination");
2478        else if (Configuration.doAutoCreate())
2479          this.destination = new IntegerType(); // bb
2480      return this.destination;
2481    }
2482
2483    public boolean hasDestinationElement() {
2484      return this.destination != null && !this.destination.isEmpty();
2485    }
2486
2487    public boolean hasDestination() {
2488      return this.destination != null && !this.destination.isEmpty();
2489    }
2490
2491    /**
2492     * @param value {@link #destination} (Which server these requirements apply
2493     *              to.). This is the underlying object with id, value and
2494     *              extensions. The accessor "getDestination" gives direct access to
2495     *              the value
2496     */
2497    public TestScriptMetadataCapabilityComponent setDestinationElement(IntegerType value) {
2498      this.destination = value;
2499      return this;
2500    }
2501
2502    /**
2503     * @return Which server these requirements apply to.
2504     */
2505    public int getDestination() {
2506      return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue();
2507    }
2508
2509    /**
2510     * @param value Which server these requirements apply to.
2511     */
2512    public TestScriptMetadataCapabilityComponent setDestination(int value) {
2513      if (this.destination == null)
2514        this.destination = new IntegerType();
2515      this.destination.setValue(value);
2516      return this;
2517    }
2518
2519    /**
2520     * @return {@link #link} (Links to the FHIR specification that describes this
2521     *         interaction and the resources involved in more detail.)
2522     */
2523    public List<UriType> getLink() {
2524      if (this.link == null)
2525        this.link = new ArrayList<UriType>();
2526      return this.link;
2527    }
2528
2529    /**
2530     * @return Returns a reference to <code>this</code> for easy method chaining
2531     */
2532    public TestScriptMetadataCapabilityComponent setLink(List<UriType> theLink) {
2533      this.link = theLink;
2534      return this;
2535    }
2536
2537    public boolean hasLink() {
2538      if (this.link == null)
2539        return false;
2540      for (UriType item : this.link)
2541        if (!item.isEmpty())
2542          return true;
2543      return false;
2544    }
2545
2546    /**
2547     * @return {@link #link} (Links to the FHIR specification that describes this
2548     *         interaction and the resources involved in more detail.)
2549     */
2550    public UriType addLinkElement() {// 2
2551      UriType t = new UriType();
2552      if (this.link == null)
2553        this.link = new ArrayList<UriType>();
2554      this.link.add(t);
2555      return t;
2556    }
2557
2558    /**
2559     * @param value {@link #link} (Links to the FHIR specification that describes
2560     *              this interaction and the resources involved in more detail.)
2561     */
2562    public TestScriptMetadataCapabilityComponent addLink(String value) { // 1
2563      UriType t = new UriType();
2564      t.setValue(value);
2565      if (this.link == null)
2566        this.link = new ArrayList<UriType>();
2567      this.link.add(t);
2568      return this;
2569    }
2570
2571    /**
2572     * @param value {@link #link} (Links to the FHIR specification that describes
2573     *              this interaction and the resources involved in more detail.)
2574     */
2575    public boolean hasLink(String value) {
2576      if (this.link == null)
2577        return false;
2578      for (UriType v : this.link)
2579        if (v.getValue().equals(value)) // uri
2580          return true;
2581      return false;
2582    }
2583
2584    /**
2585     * @return {@link #capabilities} (Minimum capabilities required of server for
2586     *         test script to execute successfully. If server does not meet at a
2587     *         minimum the referenced capability statement, then all tests in this
2588     *         script are skipped.). This is the underlying object with id, value
2589     *         and extensions. The accessor "getCapabilities" gives direct access to
2590     *         the value
2591     */
2592    public CanonicalType getCapabilitiesElement() {
2593      if (this.capabilities == null)
2594        if (Configuration.errorOnAutoCreate())
2595          throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.capabilities");
2596        else if (Configuration.doAutoCreate())
2597          this.capabilities = new CanonicalType(); // bb
2598      return this.capabilities;
2599    }
2600
2601    public boolean hasCapabilitiesElement() {
2602      return this.capabilities != null && !this.capabilities.isEmpty();
2603    }
2604
2605    public boolean hasCapabilities() {
2606      return this.capabilities != null && !this.capabilities.isEmpty();
2607    }
2608
2609    /**
2610     * @param value {@link #capabilities} (Minimum capabilities required of server
2611     *              for test script to execute successfully. If server does not meet
2612     *              at a minimum the referenced capability statement, then all tests
2613     *              in this script are skipped.). This is the underlying object with
2614     *              id, value and extensions. The accessor "getCapabilities" gives
2615     *              direct access to the value
2616     */
2617    public TestScriptMetadataCapabilityComponent setCapabilitiesElement(CanonicalType value) {
2618      this.capabilities = value;
2619      return this;
2620    }
2621
2622    /**
2623     * @return Minimum capabilities required of server for test script to execute
2624     *         successfully. If server does not meet at a minimum the referenced
2625     *         capability statement, then all tests in this script are skipped.
2626     */
2627    public String getCapabilities() {
2628      return this.capabilities == null ? null : this.capabilities.getValue();
2629    }
2630
2631    /**
2632     * @param value Minimum capabilities required of server for test script to
2633     *              execute successfully. If server does not meet at a minimum the
2634     *              referenced capability statement, then all tests in this script
2635     *              are skipped.
2636     */
2637    public TestScriptMetadataCapabilityComponent setCapabilities(String value) {
2638      if (this.capabilities == null)
2639        this.capabilities = new CanonicalType();
2640      this.capabilities.setValue(value);
2641      return this;
2642    }
2643
2644    protected void listChildren(List<Property> children) {
2645      super.listChildren(children);
2646      children.add(new Property("required", "boolean",
2647          "Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.",
2648          0, 1, required));
2649      children.add(new Property("validated", "boolean",
2650          "Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.",
2651          0, 1, validated));
2652      children.add(new Property("description", "string",
2653          "Description of the capabilities that this test script is requiring the server to support.", 0, 1,
2654          description));
2655      children.add(new Property("origin", "integer", "Which origin server these requirements apply to.", 0,
2656          java.lang.Integer.MAX_VALUE, origin));
2657      children
2658          .add(new Property("destination", "integer", "Which server these requirements apply to.", 0, 1, destination));
2659      children.add(new Property("link", "uri",
2660          "Links to the FHIR specification that describes this interaction and the resources involved in more detail.",
2661          0, java.lang.Integer.MAX_VALUE, link));
2662      children.add(new Property("capabilities", "canonical(CapabilityStatement)",
2663          "Minimum capabilities required of server for test script to execute successfully.   If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.",
2664          0, 1, capabilities));
2665    }
2666
2667    @Override
2668    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2669      switch (_hash) {
2670      case -393139297:
2671        /* required */ return new Property("required", "boolean",
2672            "Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.",
2673            0, 1, required);
2674      case -1109784050:
2675        /* validated */ return new Property("validated", "boolean",
2676            "Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.",
2677            0, 1, validated);
2678      case -1724546052:
2679        /* description */ return new Property("description", "string",
2680            "Description of the capabilities that this test script is requiring the server to support.", 0, 1,
2681            description);
2682      case -1008619738:
2683        /* origin */ return new Property("origin", "integer", "Which origin server these requirements apply to.", 0,
2684            java.lang.Integer.MAX_VALUE, origin);
2685      case -1429847026:
2686        /* destination */ return new Property("destination", "integer", "Which server these requirements apply to.", 0,
2687            1, destination);
2688      case 3321850:
2689        /* link */ return new Property("link", "uri",
2690            "Links to the FHIR specification that describes this interaction and the resources involved in more detail.",
2691            0, java.lang.Integer.MAX_VALUE, link);
2692      case -1487597642:
2693        /* capabilities */ return new Property("capabilities", "canonical(CapabilityStatement)",
2694            "Minimum capabilities required of server for test script to execute successfully.   If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.",
2695            0, 1, capabilities);
2696      default:
2697        return super.getNamedProperty(_hash, _name, _checkValid);
2698      }
2699
2700    }
2701
2702    @Override
2703    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2704      switch (hash) {
2705      case -393139297:
2706        /* required */ return this.required == null ? new Base[0] : new Base[] { this.required }; // BooleanType
2707      case -1109784050:
2708        /* validated */ return this.validated == null ? new Base[0] : new Base[] { this.validated }; // BooleanType
2709      case -1724546052:
2710        /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // StringType
2711      case -1008619738:
2712        /* origin */ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // IntegerType
2713      case -1429847026:
2714        /* destination */ return this.destination == null ? new Base[0] : new Base[] { this.destination }; // IntegerType
2715      case 3321850:
2716        /* link */ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // UriType
2717      case -1487597642:
2718        /* capabilities */ return this.capabilities == null ? new Base[0] : new Base[] { this.capabilities }; // CanonicalType
2719      default:
2720        return super.getProperty(hash, name, checkValid);
2721      }
2722
2723    }
2724
2725    @Override
2726    public Base setProperty(int hash, String name, Base value) throws FHIRException {
2727      switch (hash) {
2728      case -393139297: // required
2729        this.required = castToBoolean(value); // BooleanType
2730        return value;
2731      case -1109784050: // validated
2732        this.validated = castToBoolean(value); // BooleanType
2733        return value;
2734      case -1724546052: // description
2735        this.description = castToString(value); // StringType
2736        return value;
2737      case -1008619738: // origin
2738        this.getOrigin().add(castToInteger(value)); // IntegerType
2739        return value;
2740      case -1429847026: // destination
2741        this.destination = castToInteger(value); // IntegerType
2742        return value;
2743      case 3321850: // link
2744        this.getLink().add(castToUri(value)); // UriType
2745        return value;
2746      case -1487597642: // capabilities
2747        this.capabilities = castToCanonical(value); // CanonicalType
2748        return value;
2749      default:
2750        return super.setProperty(hash, name, value);
2751      }
2752
2753    }
2754
2755    @Override
2756    public Base setProperty(String name, Base value) throws FHIRException {
2757      if (name.equals("required")) {
2758        this.required = castToBoolean(value); // BooleanType
2759      } else if (name.equals("validated")) {
2760        this.validated = castToBoolean(value); // BooleanType
2761      } else if (name.equals("description")) {
2762        this.description = castToString(value); // StringType
2763      } else if (name.equals("origin")) {
2764        this.getOrigin().add(castToInteger(value));
2765      } else if (name.equals("destination")) {
2766        this.destination = castToInteger(value); // IntegerType
2767      } else if (name.equals("link")) {
2768        this.getLink().add(castToUri(value));
2769      } else if (name.equals("capabilities")) {
2770        this.capabilities = castToCanonical(value); // CanonicalType
2771      } else
2772        return super.setProperty(name, value);
2773      return value;
2774    }
2775
2776  @Override
2777  public void removeChild(String name, Base value) throws FHIRException {
2778      if (name.equals("required")) {
2779        this.required = null;
2780      } else if (name.equals("validated")) {
2781        this.validated = null;
2782      } else if (name.equals("description")) {
2783        this.description = null;
2784      } else if (name.equals("origin")) {
2785        this.getOrigin().remove(castToInteger(value));
2786      } else if (name.equals("destination")) {
2787        this.destination = null;
2788      } else if (name.equals("link")) {
2789        this.getLink().remove(castToUri(value));
2790      } else if (name.equals("capabilities")) {
2791        this.capabilities = null;
2792      } else
2793        super.removeChild(name, value);
2794      
2795    }
2796
2797    @Override
2798    public Base makeProperty(int hash, String name) throws FHIRException {
2799      switch (hash) {
2800      case -393139297:
2801        return getRequiredElement();
2802      case -1109784050:
2803        return getValidatedElement();
2804      case -1724546052:
2805        return getDescriptionElement();
2806      case -1008619738:
2807        return addOriginElement();
2808      case -1429847026:
2809        return getDestinationElement();
2810      case 3321850:
2811        return addLinkElement();
2812      case -1487597642:
2813        return getCapabilitiesElement();
2814      default:
2815        return super.makeProperty(hash, name);
2816      }
2817
2818    }
2819
2820    @Override
2821    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2822      switch (hash) {
2823      case -393139297:
2824        /* required */ return new String[] { "boolean" };
2825      case -1109784050:
2826        /* validated */ return new String[] { "boolean" };
2827      case -1724546052:
2828        /* description */ return new String[] { "string" };
2829      case -1008619738:
2830        /* origin */ return new String[] { "integer" };
2831      case -1429847026:
2832        /* destination */ return new String[] { "integer" };
2833      case 3321850:
2834        /* link */ return new String[] { "uri" };
2835      case -1487597642:
2836        /* capabilities */ return new String[] { "canonical" };
2837      default:
2838        return super.getTypesForProperty(hash, name);
2839      }
2840
2841    }
2842
2843    @Override
2844    public Base addChild(String name) throws FHIRException {
2845      if (name.equals("required")) {
2846        throw new FHIRException("Cannot call addChild on a singleton property TestScript.required");
2847      } else if (name.equals("validated")) {
2848        throw new FHIRException("Cannot call addChild on a singleton property TestScript.validated");
2849      } else if (name.equals("description")) {
2850        throw new FHIRException("Cannot call addChild on a singleton property TestScript.description");
2851      } else if (name.equals("origin")) {
2852        throw new FHIRException("Cannot call addChild on a singleton property TestScript.origin");
2853      } else if (name.equals("destination")) {
2854        throw new FHIRException("Cannot call addChild on a singleton property TestScript.destination");
2855      } else if (name.equals("link")) {
2856        throw new FHIRException("Cannot call addChild on a singleton property TestScript.link");
2857      } else if (name.equals("capabilities")) {
2858        throw new FHIRException("Cannot call addChild on a singleton property TestScript.capabilities");
2859      } else
2860        return super.addChild(name);
2861    }
2862
2863    public TestScriptMetadataCapabilityComponent copy() {
2864      TestScriptMetadataCapabilityComponent dst = new TestScriptMetadataCapabilityComponent();
2865      copyValues(dst);
2866      return dst;
2867    }
2868
2869    public void copyValues(TestScriptMetadataCapabilityComponent dst) {
2870      super.copyValues(dst);
2871      dst.required = required == null ? null : required.copy();
2872      dst.validated = validated == null ? null : validated.copy();
2873      dst.description = description == null ? null : description.copy();
2874      if (origin != null) {
2875        dst.origin = new ArrayList<IntegerType>();
2876        for (IntegerType i : origin)
2877          dst.origin.add(i.copy());
2878      }
2879      ;
2880      dst.destination = destination == null ? null : destination.copy();
2881      if (link != null) {
2882        dst.link = new ArrayList<UriType>();
2883        for (UriType i : link)
2884          dst.link.add(i.copy());
2885      }
2886      ;
2887      dst.capabilities = capabilities == null ? null : capabilities.copy();
2888    }
2889
2890    @Override
2891    public boolean equalsDeep(Base other_) {
2892      if (!super.equalsDeep(other_))
2893        return false;
2894      if (!(other_ instanceof TestScriptMetadataCapabilityComponent))
2895        return false;
2896      TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other_;
2897      return compareDeep(required, o.required, true) && compareDeep(validated, o.validated, true)
2898          && compareDeep(description, o.description, true) && compareDeep(origin, o.origin, true)
2899          && compareDeep(destination, o.destination, true) && compareDeep(link, o.link, true)
2900          && compareDeep(capabilities, o.capabilities, true);
2901    }
2902
2903    @Override
2904    public boolean equalsShallow(Base other_) {
2905      if (!super.equalsShallow(other_))
2906        return false;
2907      if (!(other_ instanceof TestScriptMetadataCapabilityComponent))
2908        return false;
2909      TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other_;
2910      return compareValues(required, o.required, true) && compareValues(validated, o.validated, true)
2911          && compareValues(description, o.description, true) && compareValues(origin, o.origin, true)
2912          && compareValues(destination, o.destination, true) && compareValues(link, o.link, true);
2913    }
2914
2915    public boolean isEmpty() {
2916      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(required, validated, description, origin,
2917          destination, link, capabilities);
2918    }
2919
2920    public String fhirType() {
2921      return "TestScript.metadata.capability";
2922
2923    }
2924
2925  }
2926
2927  @Block()
2928  public static class TestScriptFixtureComponent extends BackboneElement implements IBaseBackboneElement {
2929    /**
2930     * Whether or not to implicitly create the fixture during setup. If true, the
2931     * fixture is automatically created on each server being tested during setup,
2932     * therefore no create operation is required for this fixture in the
2933     * TestScript.setup section.
2934     */
2935    @Child(name = "autocreate", type = {
2936        BooleanType.class }, order = 1, min = 1, max = 1, modifier = false, summary = false)
2937    @Description(shortDefinition = "Whether or not to implicitly create the fixture during setup", formalDefinition = "Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.")
2938    protected BooleanType autocreate;
2939
2940    /**
2941     * Whether or not to implicitly delete the fixture during teardown. If true, the
2942     * fixture is automatically deleted on each server being tested during teardown,
2943     * therefore no delete operation is required for this fixture in the
2944     * TestScript.teardown section.
2945     */
2946    @Child(name = "autodelete", type = {
2947        BooleanType.class }, order = 2, min = 1, max = 1, modifier = false, summary = false)
2948    @Description(shortDefinition = "Whether or not to implicitly delete the fixture during teardown", formalDefinition = "Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.")
2949    protected BooleanType autodelete;
2950
2951    /**
2952     * Reference to the resource (containing the contents of the resource needed for
2953     * operations).
2954     */
2955    @Child(name = "resource", type = {
2956        Reference.class }, order = 3, min = 0, max = 1, modifier = false, summary = false)
2957    @Description(shortDefinition = "Reference of the resource", formalDefinition = "Reference to the resource (containing the contents of the resource needed for operations).")
2958    protected Reference resource;
2959
2960    /**
2961     * The actual object that is the target of the reference (Reference to the
2962     * resource (containing the contents of the resource needed for operations).)
2963     */
2964    protected Resource resourceTarget;
2965
2966    private static final long serialVersionUID = 1110683307L;
2967
2968    /**
2969     * Constructor
2970     */
2971    public TestScriptFixtureComponent() {
2972      super();
2973    }
2974
2975    /**
2976     * Constructor
2977     */
2978    public TestScriptFixtureComponent(BooleanType autocreate, BooleanType autodelete) {
2979      super();
2980      this.autocreate = autocreate;
2981      this.autodelete = autodelete;
2982    }
2983
2984    /**
2985     * @return {@link #autocreate} (Whether or not to implicitly create the fixture
2986     *         during setup. If true, the fixture is automatically created on each
2987     *         server being tested during setup, therefore no create operation is
2988     *         required for this fixture in the TestScript.setup section.). This is
2989     *         the underlying object with id, value and extensions. The accessor
2990     *         "getAutocreate" gives direct access to the value
2991     */
2992    public BooleanType getAutocreateElement() {
2993      if (this.autocreate == null)
2994        if (Configuration.errorOnAutoCreate())
2995          throw new Error("Attempt to auto-create TestScriptFixtureComponent.autocreate");
2996        else if (Configuration.doAutoCreate())
2997          this.autocreate = new BooleanType(); // bb
2998      return this.autocreate;
2999    }
3000
3001    public boolean hasAutocreateElement() {
3002      return this.autocreate != null && !this.autocreate.isEmpty();
3003    }
3004
3005    public boolean hasAutocreate() {
3006      return this.autocreate != null && !this.autocreate.isEmpty();
3007    }
3008
3009    /**
3010     * @param value {@link #autocreate} (Whether or not to implicitly create the
3011     *              fixture during setup. If true, the fixture is automatically
3012     *              created on each server being tested during setup, therefore no
3013     *              create operation is required for this fixture in the
3014     *              TestScript.setup section.). This is the underlying object with
3015     *              id, value and extensions. The accessor "getAutocreate" gives
3016     *              direct access to the value
3017     */
3018    public TestScriptFixtureComponent setAutocreateElement(BooleanType value) {
3019      this.autocreate = value;
3020      return this;
3021    }
3022
3023    /**
3024     * @return Whether or not to implicitly create the fixture during setup. If
3025     *         true, the fixture is automatically created on each server being
3026     *         tested during setup, therefore no create operation is required for
3027     *         this fixture in the TestScript.setup section.
3028     */
3029    public boolean getAutocreate() {
3030      return this.autocreate == null || this.autocreate.isEmpty() ? false : this.autocreate.getValue();
3031    }
3032
3033    /**
3034     * @param value Whether or not to implicitly create the fixture during setup. If
3035     *              true, the fixture is automatically created on each server being
3036     *              tested during setup, therefore no create operation is required
3037     *              for this fixture in the TestScript.setup section.
3038     */
3039    public TestScriptFixtureComponent setAutocreate(boolean value) {
3040      if (this.autocreate == null)
3041        this.autocreate = new BooleanType();
3042      this.autocreate.setValue(value);
3043      return this;
3044    }
3045
3046    /**
3047     * @return {@link #autodelete} (Whether or not to implicitly delete the fixture
3048     *         during teardown. If true, the fixture is automatically deleted on
3049     *         each server being tested during teardown, therefore no delete
3050     *         operation is required for this fixture in the TestScript.teardown
3051     *         section.). This is the underlying object with id, value and
3052     *         extensions. The accessor "getAutodelete" gives direct access to the
3053     *         value
3054     */
3055    public BooleanType getAutodeleteElement() {
3056      if (this.autodelete == null)
3057        if (Configuration.errorOnAutoCreate())
3058          throw new Error("Attempt to auto-create TestScriptFixtureComponent.autodelete");
3059        else if (Configuration.doAutoCreate())
3060          this.autodelete = new BooleanType(); // bb
3061      return this.autodelete;
3062    }
3063
3064    public boolean hasAutodeleteElement() {
3065      return this.autodelete != null && !this.autodelete.isEmpty();
3066    }
3067
3068    public boolean hasAutodelete() {
3069      return this.autodelete != null && !this.autodelete.isEmpty();
3070    }
3071
3072    /**
3073     * @param value {@link #autodelete} (Whether or not to implicitly delete the
3074     *              fixture during teardown. If true, the fixture is automatically
3075     *              deleted on each server being tested during teardown, therefore
3076     *              no delete operation is required for this fixture in the
3077     *              TestScript.teardown section.). This is the underlying object
3078     *              with id, value and extensions. The accessor "getAutodelete"
3079     *              gives direct access to the value
3080     */
3081    public TestScriptFixtureComponent setAutodeleteElement(BooleanType value) {
3082      this.autodelete = value;
3083      return this;
3084    }
3085
3086    /**
3087     * @return Whether or not to implicitly delete the fixture during teardown. If
3088     *         true, the fixture is automatically deleted on each server being
3089     *         tested during teardown, therefore no delete operation is required for
3090     *         this fixture in the TestScript.teardown section.
3091     */
3092    public boolean getAutodelete() {
3093      return this.autodelete == null || this.autodelete.isEmpty() ? false : this.autodelete.getValue();
3094    }
3095
3096    /**
3097     * @param value Whether or not to implicitly delete the fixture during teardown.
3098     *              If true, the fixture is automatically deleted on each server
3099     *              being tested during teardown, therefore no delete operation is
3100     *              required for this fixture in the TestScript.teardown section.
3101     */
3102    public TestScriptFixtureComponent setAutodelete(boolean value) {
3103      if (this.autodelete == null)
3104        this.autodelete = new BooleanType();
3105      this.autodelete.setValue(value);
3106      return this;
3107    }
3108
3109    /**
3110     * @return {@link #resource} (Reference to the resource (containing the contents
3111     *         of the resource needed for operations).)
3112     */
3113    public Reference getResource() {
3114      if (this.resource == null)
3115        if (Configuration.errorOnAutoCreate())
3116          throw new Error("Attempt to auto-create TestScriptFixtureComponent.resource");
3117        else if (Configuration.doAutoCreate())
3118          this.resource = new Reference(); // cc
3119      return this.resource;
3120    }
3121
3122    public boolean hasResource() {
3123      return this.resource != null && !this.resource.isEmpty();
3124    }
3125
3126    /**
3127     * @param value {@link #resource} (Reference to the resource (containing the
3128     *              contents of the resource needed for operations).)
3129     */
3130    public TestScriptFixtureComponent setResource(Reference value) {
3131      this.resource = value;
3132      return this;
3133    }
3134
3135    /**
3136     * @return {@link #resource} The actual object that is the target of the
3137     *         reference. The reference library doesn't populate this, but you can
3138     *         use it to hold the resource if you resolve it. (Reference to the
3139     *         resource (containing the contents of the resource needed for
3140     *         operations).)
3141     */
3142    public Resource getResourceTarget() {
3143      return this.resourceTarget;
3144    }
3145
3146    /**
3147     * @param value {@link #resource} The actual object that is the target of the
3148     *              reference. The reference library doesn't use these, but you can
3149     *              use it to hold the resource if you resolve it. (Reference to the
3150     *              resource (containing the contents of the resource needed for
3151     *              operations).)
3152     */
3153    public TestScriptFixtureComponent setResourceTarget(Resource value) {
3154      this.resourceTarget = value;
3155      return this;
3156    }
3157
3158    protected void listChildren(List<Property> children) {
3159      super.listChildren(children);
3160      children.add(new Property("autocreate", "boolean",
3161          "Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.",
3162          0, 1, autocreate));
3163      children.add(new Property("autodelete", "boolean",
3164          "Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.",
3165          0, 1, autodelete));
3166      children.add(new Property("resource", "Reference(Any)",
3167          "Reference to the resource (containing the contents of the resource needed for operations).", 0, 1,
3168          resource));
3169    }
3170
3171    @Override
3172    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3173      switch (_hash) {
3174      case 73154411:
3175        /* autocreate */ return new Property("autocreate", "boolean",
3176            "Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.",
3177            0, 1, autocreate);
3178      case 89990170:
3179        /* autodelete */ return new Property("autodelete", "boolean",
3180            "Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.",
3181            0, 1, autodelete);
3182      case -341064690:
3183        /* resource */ return new Property("resource", "Reference(Any)",
3184            "Reference to the resource (containing the contents of the resource needed for operations).", 0, 1,
3185            resource);
3186      default:
3187        return super.getNamedProperty(_hash, _name, _checkValid);
3188      }
3189
3190    }
3191
3192    @Override
3193    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3194      switch (hash) {
3195      case 73154411:
3196        /* autocreate */ return this.autocreate == null ? new Base[0] : new Base[] { this.autocreate }; // BooleanType
3197      case 89990170:
3198        /* autodelete */ return this.autodelete == null ? new Base[0] : new Base[] { this.autodelete }; // BooleanType
3199      case -341064690:
3200        /* resource */ return this.resource == null ? new Base[0] : new Base[] { this.resource }; // Reference
3201      default:
3202        return super.getProperty(hash, name, checkValid);
3203      }
3204
3205    }
3206
3207    @Override
3208    public Base setProperty(int hash, String name, Base value) throws FHIRException {
3209      switch (hash) {
3210      case 73154411: // autocreate
3211        this.autocreate = castToBoolean(value); // BooleanType
3212        return value;
3213      case 89990170: // autodelete
3214        this.autodelete = castToBoolean(value); // BooleanType
3215        return value;
3216      case -341064690: // resource
3217        this.resource = castToReference(value); // Reference
3218        return value;
3219      default:
3220        return super.setProperty(hash, name, value);
3221      }
3222
3223    }
3224
3225    @Override
3226    public Base setProperty(String name, Base value) throws FHIRException {
3227      if (name.equals("autocreate")) {
3228        this.autocreate = castToBoolean(value); // BooleanType
3229      } else if (name.equals("autodelete")) {
3230        this.autodelete = castToBoolean(value); // BooleanType
3231      } else if (name.equals("resource")) {
3232        this.resource = castToReference(value); // Reference
3233      } else
3234        return super.setProperty(name, value);
3235      return value;
3236    }
3237
3238  @Override
3239  public void removeChild(String name, Base value) throws FHIRException {
3240      if (name.equals("autocreate")) {
3241        this.autocreate = null;
3242      } else if (name.equals("autodelete")) {
3243        this.autodelete = null;
3244      } else if (name.equals("resource")) {
3245        this.resource = null;
3246      } else
3247        super.removeChild(name, value);
3248      
3249    }
3250
3251    @Override
3252    public Base makeProperty(int hash, String name) throws FHIRException {
3253      switch (hash) {
3254      case 73154411:
3255        return getAutocreateElement();
3256      case 89990170:
3257        return getAutodeleteElement();
3258      case -341064690:
3259        return getResource();
3260      default:
3261        return super.makeProperty(hash, name);
3262      }
3263
3264    }
3265
3266    @Override
3267    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3268      switch (hash) {
3269      case 73154411:
3270        /* autocreate */ return new String[] { "boolean" };
3271      case 89990170:
3272        /* autodelete */ return new String[] { "boolean" };
3273      case -341064690:
3274        /* resource */ return new String[] { "Reference" };
3275      default:
3276        return super.getTypesForProperty(hash, name);
3277      }
3278
3279    }
3280
3281    @Override
3282    public Base addChild(String name) throws FHIRException {
3283      if (name.equals("autocreate")) {
3284        throw new FHIRException("Cannot call addChild on a singleton property TestScript.autocreate");
3285      } else if (name.equals("autodelete")) {
3286        throw new FHIRException("Cannot call addChild on a singleton property TestScript.autodelete");
3287      } else if (name.equals("resource")) {
3288        this.resource = new Reference();
3289        return this.resource;
3290      } else
3291        return super.addChild(name);
3292    }
3293
3294    public TestScriptFixtureComponent copy() {
3295      TestScriptFixtureComponent dst = new TestScriptFixtureComponent();
3296      copyValues(dst);
3297      return dst;
3298    }
3299
3300    public void copyValues(TestScriptFixtureComponent dst) {
3301      super.copyValues(dst);
3302      dst.autocreate = autocreate == null ? null : autocreate.copy();
3303      dst.autodelete = autodelete == null ? null : autodelete.copy();
3304      dst.resource = resource == null ? null : resource.copy();
3305    }
3306
3307    @Override
3308    public boolean equalsDeep(Base other_) {
3309      if (!super.equalsDeep(other_))
3310        return false;
3311      if (!(other_ instanceof TestScriptFixtureComponent))
3312        return false;
3313      TestScriptFixtureComponent o = (TestScriptFixtureComponent) other_;
3314      return compareDeep(autocreate, o.autocreate, true) && compareDeep(autodelete, o.autodelete, true)
3315          && compareDeep(resource, o.resource, true);
3316    }
3317
3318    @Override
3319    public boolean equalsShallow(Base other_) {
3320      if (!super.equalsShallow(other_))
3321        return false;
3322      if (!(other_ instanceof TestScriptFixtureComponent))
3323        return false;
3324      TestScriptFixtureComponent o = (TestScriptFixtureComponent) other_;
3325      return compareValues(autocreate, o.autocreate, true) && compareValues(autodelete, o.autodelete, true);
3326    }
3327
3328    public boolean isEmpty() {
3329      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(autocreate, autodelete, resource);
3330    }
3331
3332    public String fhirType() {
3333      return "TestScript.fixture";
3334
3335    }
3336
3337  }
3338
3339  @Block()
3340  public static class TestScriptVariableComponent extends BackboneElement implements IBaseBackboneElement {
3341    /**
3342     * Descriptive name for this variable.
3343     */
3344    @Child(name = "name", type = { StringType.class }, order = 1, min = 1, max = 1, modifier = false, summary = false)
3345    @Description(shortDefinition = "Descriptive name for this variable", formalDefinition = "Descriptive name for this variable.")
3346    protected StringType name;
3347
3348    /**
3349     * A default, hard-coded, or user-defined value for this variable.
3350     */
3351    @Child(name = "defaultValue", type = {
3352        StringType.class }, order = 2, min = 0, max = 1, modifier = false, summary = false)
3353    @Description(shortDefinition = "Default, hard-coded, or user-defined value for this variable", formalDefinition = "A default, hard-coded, or user-defined value for this variable.")
3354    protected StringType defaultValue;
3355
3356    /**
3357     * A free text natural language description of the variable and its purpose.
3358     */
3359    @Child(name = "description", type = {
3360        StringType.class }, order = 3, min = 0, max = 1, modifier = false, summary = false)
3361    @Description(shortDefinition = "Natural language description of the variable", formalDefinition = "A free text natural language description of the variable and its purpose.")
3362    protected StringType description;
3363
3364    /**
3365     * The FHIRPath expression to evaluate against the fixture body. When variables
3366     * are defined, only one of either expression, headerField or path must be
3367     * specified.
3368     */
3369    @Child(name = "expression", type = {
3370        StringType.class }, order = 4, min = 0, max = 1, modifier = false, summary = false)
3371    @Description(shortDefinition = "The FHIRPath expression against the fixture body", formalDefinition = "The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.")
3372    protected StringType expression;
3373
3374    /**
3375     * Will be used to grab the HTTP header field value from the headers that
3376     * sourceId is pointing to.
3377     */
3378    @Child(name = "headerField", type = {
3379        StringType.class }, order = 5, min = 0, max = 1, modifier = false, summary = false)
3380    @Description(shortDefinition = "HTTP header field name for source", formalDefinition = "Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.")
3381    protected StringType headerField;
3382
3383    /**
3384     * Displayable text string with hint help information to the user when entering
3385     * a default value.
3386     */
3387    @Child(name = "hint", type = { StringType.class }, order = 6, min = 0, max = 1, modifier = false, summary = false)
3388    @Description(shortDefinition = "Hint help text for default value to enter", formalDefinition = "Displayable text string with hint help information to the user when entering a default value.")
3389    protected StringType hint;
3390
3391    /**
3392     * XPath or JSONPath to evaluate against the fixture body. When variables are
3393     * defined, only one of either expression, headerField or path must be
3394     * specified.
3395     */
3396    @Child(name = "path", type = { StringType.class }, order = 7, min = 0, max = 1, modifier = false, summary = false)
3397    @Description(shortDefinition = "XPath or JSONPath against the fixture body", formalDefinition = "XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.")
3398    protected StringType path;
3399
3400    /**
3401     * Fixture to evaluate the XPath/JSONPath expression or the headerField against
3402     * within this variable.
3403     */
3404    @Child(name = "sourceId", type = { IdType.class }, order = 8, min = 0, max = 1, modifier = false, summary = false)
3405    @Description(shortDefinition = "Fixture Id of source expression or headerField within this variable", formalDefinition = "Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.")
3406    protected IdType sourceId;
3407
3408    private static final long serialVersionUID = -1592325432L;
3409
3410    /**
3411     * Constructor
3412     */
3413    public TestScriptVariableComponent() {
3414      super();
3415    }
3416
3417    /**
3418     * Constructor
3419     */
3420    public TestScriptVariableComponent(StringType name) {
3421      super();
3422      this.name = name;
3423    }
3424
3425    /**
3426     * @return {@link #name} (Descriptive name for this variable.). This is the
3427     *         underlying object with id, value and extensions. The accessor
3428     *         "getName" gives direct access to the value
3429     */
3430    public StringType getNameElement() {
3431      if (this.name == null)
3432        if (Configuration.errorOnAutoCreate())
3433          throw new Error("Attempt to auto-create TestScriptVariableComponent.name");
3434        else if (Configuration.doAutoCreate())
3435          this.name = new StringType(); // bb
3436      return this.name;
3437    }
3438
3439    public boolean hasNameElement() {
3440      return this.name != null && !this.name.isEmpty();
3441    }
3442
3443    public boolean hasName() {
3444      return this.name != null && !this.name.isEmpty();
3445    }
3446
3447    /**
3448     * @param value {@link #name} (Descriptive name for this variable.). This is the
3449     *              underlying object with id, value and extensions. The accessor
3450     *              "getName" gives direct access to the value
3451     */
3452    public TestScriptVariableComponent setNameElement(StringType value) {
3453      this.name = value;
3454      return this;
3455    }
3456
3457    /**
3458     * @return Descriptive name for this variable.
3459     */
3460    public String getName() {
3461      return this.name == null ? null : this.name.getValue();
3462    }
3463
3464    /**
3465     * @param value Descriptive name for this variable.
3466     */
3467    public TestScriptVariableComponent setName(String value) {
3468      if (this.name == null)
3469        this.name = new StringType();
3470      this.name.setValue(value);
3471      return this;
3472    }
3473
3474    /**
3475     * @return {@link #defaultValue} (A default, hard-coded, or user-defined value
3476     *         for this variable.). This is the underlying object with id, value and
3477     *         extensions. The accessor "getDefaultValue" gives direct access to the
3478     *         value
3479     */
3480    public StringType getDefaultValueElement() {
3481      if (this.defaultValue == null)
3482        if (Configuration.errorOnAutoCreate())
3483          throw new Error("Attempt to auto-create TestScriptVariableComponent.defaultValue");
3484        else if (Configuration.doAutoCreate())
3485          this.defaultValue = new StringType(); // bb
3486      return this.defaultValue;
3487    }
3488
3489    public boolean hasDefaultValueElement() {
3490      return this.defaultValue != null && !this.defaultValue.isEmpty();
3491    }
3492
3493    public boolean hasDefaultValue() {
3494      return this.defaultValue != null && !this.defaultValue.isEmpty();
3495    }
3496
3497    /**
3498     * @param value {@link #defaultValue} (A default, hard-coded, or user-defined
3499     *              value for this variable.). This is the underlying object with
3500     *              id, value and extensions. The accessor "getDefaultValue" gives
3501     *              direct access to the value
3502     */
3503    public TestScriptVariableComponent setDefaultValueElement(StringType value) {
3504      this.defaultValue = value;
3505      return this;
3506    }
3507
3508    /**
3509     * @return A default, hard-coded, or user-defined value for this variable.
3510     */
3511    public String getDefaultValue() {
3512      return this.defaultValue == null ? null : this.defaultValue.getValue();
3513    }
3514
3515    /**
3516     * @param value A default, hard-coded, or user-defined value for this variable.
3517     */
3518    public TestScriptVariableComponent setDefaultValue(String value) {
3519      if (Utilities.noString(value))
3520        this.defaultValue = null;
3521      else {
3522        if (this.defaultValue == null)
3523          this.defaultValue = new StringType();
3524        this.defaultValue.setValue(value);
3525      }
3526      return this;
3527    }
3528
3529    /**
3530     * @return {@link #description} (A free text natural language description of the
3531     *         variable and its purpose.). This is the underlying object with id,
3532     *         value and extensions. The accessor "getDescription" gives direct
3533     *         access to the value
3534     */
3535    public StringType getDescriptionElement() {
3536      if (this.description == null)
3537        if (Configuration.errorOnAutoCreate())
3538          throw new Error("Attempt to auto-create TestScriptVariableComponent.description");
3539        else if (Configuration.doAutoCreate())
3540          this.description = new StringType(); // bb
3541      return this.description;
3542    }
3543
3544    public boolean hasDescriptionElement() {
3545      return this.description != null && !this.description.isEmpty();
3546    }
3547
3548    public boolean hasDescription() {
3549      return this.description != null && !this.description.isEmpty();
3550    }
3551
3552    /**
3553     * @param value {@link #description} (A free text natural language description
3554     *              of the variable and its purpose.). This is the underlying object
3555     *              with id, value and extensions. The accessor "getDescription"
3556     *              gives direct access to the value
3557     */
3558    public TestScriptVariableComponent setDescriptionElement(StringType value) {
3559      this.description = value;
3560      return this;
3561    }
3562
3563    /**
3564     * @return A free text natural language description of the variable and its
3565     *         purpose.
3566     */
3567    public String getDescription() {
3568      return this.description == null ? null : this.description.getValue();
3569    }
3570
3571    /**
3572     * @param value A free text natural language description of the variable and its
3573     *              purpose.
3574     */
3575    public TestScriptVariableComponent setDescription(String value) {
3576      if (Utilities.noString(value))
3577        this.description = null;
3578      else {
3579        if (this.description == null)
3580          this.description = new StringType();
3581        this.description.setValue(value);
3582      }
3583      return this;
3584    }
3585
3586    /**
3587     * @return {@link #expression} (The FHIRPath expression to evaluate against the
3588     *         fixture body. When variables are defined, only one of either
3589     *         expression, headerField or path must be specified.). This is the
3590     *         underlying object with id, value and extensions. The accessor
3591     *         "getExpression" gives direct access to the value
3592     */
3593    public StringType getExpressionElement() {
3594      if (this.expression == null)
3595        if (Configuration.errorOnAutoCreate())
3596          throw new Error("Attempt to auto-create TestScriptVariableComponent.expression");
3597        else if (Configuration.doAutoCreate())
3598          this.expression = new StringType(); // bb
3599      return this.expression;
3600    }
3601
3602    public boolean hasExpressionElement() {
3603      return this.expression != null && !this.expression.isEmpty();
3604    }
3605
3606    public boolean hasExpression() {
3607      return this.expression != null && !this.expression.isEmpty();
3608    }
3609
3610    /**
3611     * @param value {@link #expression} (The FHIRPath expression to evaluate against
3612     *              the fixture body. When variables are defined, only one of either
3613     *              expression, headerField or path must be specified.). This is the
3614     *              underlying object with id, value and extensions. The accessor
3615     *              "getExpression" gives direct access to the value
3616     */
3617    public TestScriptVariableComponent setExpressionElement(StringType value) {
3618      this.expression = value;
3619      return this;
3620    }
3621
3622    /**
3623     * @return The FHIRPath expression to evaluate against the fixture body. When
3624     *         variables are defined, only one of either expression, headerField or
3625     *         path must be specified.
3626     */
3627    public String getExpression() {
3628      return this.expression == null ? null : this.expression.getValue();
3629    }
3630
3631    /**
3632     * @param value The FHIRPath expression to evaluate against the fixture body.
3633     *              When variables are defined, only one of either expression,
3634     *              headerField or path must be specified.
3635     */
3636    public TestScriptVariableComponent setExpression(String value) {
3637      if (Utilities.noString(value))
3638        this.expression = null;
3639      else {
3640        if (this.expression == null)
3641          this.expression = new StringType();
3642        this.expression.setValue(value);
3643      }
3644      return this;
3645    }
3646
3647    /**
3648     * @return {@link #headerField} (Will be used to grab the HTTP header field
3649     *         value from the headers that sourceId is pointing to.). This is the
3650     *         underlying object with id, value and extensions. The accessor
3651     *         "getHeaderField" gives direct access to the value
3652     */
3653    public StringType getHeaderFieldElement() {
3654      if (this.headerField == null)
3655        if (Configuration.errorOnAutoCreate())
3656          throw new Error("Attempt to auto-create TestScriptVariableComponent.headerField");
3657        else if (Configuration.doAutoCreate())
3658          this.headerField = new StringType(); // bb
3659      return this.headerField;
3660    }
3661
3662    public boolean hasHeaderFieldElement() {
3663      return this.headerField != null && !this.headerField.isEmpty();
3664    }
3665
3666    public boolean hasHeaderField() {
3667      return this.headerField != null && !this.headerField.isEmpty();
3668    }
3669
3670    /**
3671     * @param value {@link #headerField} (Will be used to grab the HTTP header field
3672     *              value from the headers that sourceId is pointing to.). This is
3673     *              the underlying object with id, value and extensions. The
3674     *              accessor "getHeaderField" gives direct access to the value
3675     */
3676    public TestScriptVariableComponent setHeaderFieldElement(StringType value) {
3677      this.headerField = value;
3678      return this;
3679    }
3680
3681    /**
3682     * @return Will be used to grab the HTTP header field value from the headers
3683     *         that sourceId is pointing to.
3684     */
3685    public String getHeaderField() {
3686      return this.headerField == null ? null : this.headerField.getValue();
3687    }
3688
3689    /**
3690     * @param value Will be used to grab the HTTP header field value from the
3691     *              headers that sourceId is pointing to.
3692     */
3693    public TestScriptVariableComponent setHeaderField(String value) {
3694      if (Utilities.noString(value))
3695        this.headerField = null;
3696      else {
3697        if (this.headerField == null)
3698          this.headerField = new StringType();
3699        this.headerField.setValue(value);
3700      }
3701      return this;
3702    }
3703
3704    /**
3705     * @return {@link #hint} (Displayable text string with hint help information to
3706     *         the user when entering a default value.). This is the underlying
3707     *         object with id, value and extensions. The accessor "getHint" gives
3708     *         direct access to the value
3709     */
3710    public StringType getHintElement() {
3711      if (this.hint == null)
3712        if (Configuration.errorOnAutoCreate())
3713          throw new Error("Attempt to auto-create TestScriptVariableComponent.hint");
3714        else if (Configuration.doAutoCreate())
3715          this.hint = new StringType(); // bb
3716      return this.hint;
3717    }
3718
3719    public boolean hasHintElement() {
3720      return this.hint != null && !this.hint.isEmpty();
3721    }
3722
3723    public boolean hasHint() {
3724      return this.hint != null && !this.hint.isEmpty();
3725    }
3726
3727    /**
3728     * @param value {@link #hint} (Displayable text string with hint help
3729     *              information to the user when entering a default value.). This is
3730     *              the underlying object with id, value and extensions. The
3731     *              accessor "getHint" gives direct access to the value
3732     */
3733    public TestScriptVariableComponent setHintElement(StringType value) {
3734      this.hint = value;
3735      return this;
3736    }
3737
3738    /**
3739     * @return Displayable text string with hint help information to the user when
3740     *         entering a default value.
3741     */
3742    public String getHint() {
3743      return this.hint == null ? null : this.hint.getValue();
3744    }
3745
3746    /**
3747     * @param value Displayable text string with hint help information to the user
3748     *              when entering a default value.
3749     */
3750    public TestScriptVariableComponent setHint(String value) {
3751      if (Utilities.noString(value))
3752        this.hint = null;
3753      else {
3754        if (this.hint == null)
3755          this.hint = new StringType();
3756        this.hint.setValue(value);
3757      }
3758      return this;
3759    }
3760
3761    /**
3762     * @return {@link #path} (XPath or JSONPath to evaluate against the fixture
3763     *         body. When variables are defined, only one of either expression,
3764     *         headerField or path must be specified.). This is the underlying
3765     *         object with id, value and extensions. The accessor "getPath" gives
3766     *         direct access to the value
3767     */
3768    public StringType getPathElement() {
3769      if (this.path == null)
3770        if (Configuration.errorOnAutoCreate())
3771          throw new Error("Attempt to auto-create TestScriptVariableComponent.path");
3772        else if (Configuration.doAutoCreate())
3773          this.path = new StringType(); // bb
3774      return this.path;
3775    }
3776
3777    public boolean hasPathElement() {
3778      return this.path != null && !this.path.isEmpty();
3779    }
3780
3781    public boolean hasPath() {
3782      return this.path != null && !this.path.isEmpty();
3783    }
3784
3785    /**
3786     * @param value {@link #path} (XPath or JSONPath to evaluate against the fixture
3787     *              body. When variables are defined, only one of either expression,
3788     *              headerField or path must be specified.). This is the underlying
3789     *              object with id, value and extensions. The accessor "getPath"
3790     *              gives direct access to the value
3791     */
3792    public TestScriptVariableComponent setPathElement(StringType value) {
3793      this.path = value;
3794      return this;
3795    }
3796
3797    /**
3798     * @return XPath or JSONPath to evaluate against the fixture body. When
3799     *         variables are defined, only one of either expression, headerField or
3800     *         path must be specified.
3801     */
3802    public String getPath() {
3803      return this.path == null ? null : this.path.getValue();
3804    }
3805
3806    /**
3807     * @param value XPath or JSONPath to evaluate against the fixture body. When
3808     *              variables are defined, only one of either expression,
3809     *              headerField or path must be specified.
3810     */
3811    public TestScriptVariableComponent setPath(String value) {
3812      if (Utilities.noString(value))
3813        this.path = null;
3814      else {
3815        if (this.path == null)
3816          this.path = new StringType();
3817        this.path.setValue(value);
3818      }
3819      return this;
3820    }
3821
3822    /**
3823     * @return {@link #sourceId} (Fixture to evaluate the XPath/JSONPath expression
3824     *         or the headerField against within this variable.). This is the
3825     *         underlying object with id, value and extensions. The accessor
3826     *         "getSourceId" gives direct access to the value
3827     */
3828    public IdType getSourceIdElement() {
3829      if (this.sourceId == null)
3830        if (Configuration.errorOnAutoCreate())
3831          throw new Error("Attempt to auto-create TestScriptVariableComponent.sourceId");
3832        else if (Configuration.doAutoCreate())
3833          this.sourceId = new IdType(); // bb
3834      return this.sourceId;
3835    }
3836
3837    public boolean hasSourceIdElement() {
3838      return this.sourceId != null && !this.sourceId.isEmpty();
3839    }
3840
3841    public boolean hasSourceId() {
3842      return this.sourceId != null && !this.sourceId.isEmpty();
3843    }
3844
3845    /**
3846     * @param value {@link #sourceId} (Fixture to evaluate the XPath/JSONPath
3847     *              expression or the headerField against within this variable.).
3848     *              This is the underlying object with id, value and extensions. The
3849     *              accessor "getSourceId" gives direct access to the value
3850     */
3851    public TestScriptVariableComponent setSourceIdElement(IdType value) {
3852      this.sourceId = value;
3853      return this;
3854    }
3855
3856    /**
3857     * @return Fixture to evaluate the XPath/JSONPath expression or the headerField
3858     *         against within this variable.
3859     */
3860    public String getSourceId() {
3861      return this.sourceId == null ? null : this.sourceId.getValue();
3862    }
3863
3864    /**
3865     * @param value Fixture to evaluate the XPath/JSONPath expression or the
3866     *              headerField against within this variable.
3867     */
3868    public TestScriptVariableComponent setSourceId(String value) {
3869      if (Utilities.noString(value))
3870        this.sourceId = null;
3871      else {
3872        if (this.sourceId == null)
3873          this.sourceId = new IdType();
3874        this.sourceId.setValue(value);
3875      }
3876      return this;
3877    }
3878
3879    protected void listChildren(List<Property> children) {
3880      super.listChildren(children);
3881      children.add(new Property("name", "string", "Descriptive name for this variable.", 0, 1, name));
3882      children.add(new Property("defaultValue", "string",
3883          "A default, hard-coded, or user-defined value for this variable.", 0, 1, defaultValue));
3884      children.add(new Property("description", "string",
3885          "A free text natural language description of the variable and its purpose.", 0, 1, description));
3886      children.add(new Property("expression", "string",
3887          "The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.",
3888          0, 1, expression));
3889      children.add(new Property("headerField", "string",
3890          "Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.", 0, 1,
3891          headerField));
3892      children.add(new Property("hint", "string",
3893          "Displayable text string with hint help information to the user when entering a default value.", 0, 1, hint));
3894      children.add(new Property("path", "string",
3895          "XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.",
3896          0, 1, path));
3897      children.add(new Property("sourceId", "id",
3898          "Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.", 0, 1,
3899          sourceId));
3900    }
3901
3902    @Override
3903    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3904      switch (_hash) {
3905      case 3373707:
3906        /* name */ return new Property("name", "string", "Descriptive name for this variable.", 0, 1, name);
3907      case -659125328:
3908        /* defaultValue */ return new Property("defaultValue", "string",
3909            "A default, hard-coded, or user-defined value for this variable.", 0, 1, defaultValue);
3910      case -1724546052:
3911        /* description */ return new Property("description", "string",
3912            "A free text natural language description of the variable and its purpose.", 0, 1, description);
3913      case -1795452264:
3914        /* expression */ return new Property("expression", "string",
3915            "The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.",
3916            0, 1, expression);
3917      case 1160732269:
3918        /* headerField */ return new Property("headerField", "string",
3919            "Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.", 0, 1,
3920            headerField);
3921      case 3202695:
3922        /* hint */ return new Property("hint", "string",
3923            "Displayable text string with hint help information to the user when entering a default value.", 0, 1,
3924            hint);
3925      case 3433509:
3926        /* path */ return new Property("path", "string",
3927            "XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.",
3928            0, 1, path);
3929      case 1746327190:
3930        /* sourceId */ return new Property("sourceId", "id",
3931            "Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.", 0, 1,
3932            sourceId);
3933      default:
3934        return super.getNamedProperty(_hash, _name, _checkValid);
3935      }
3936
3937    }
3938
3939    @Override
3940    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3941      switch (hash) {
3942      case 3373707:
3943        /* name */ return this.name == null ? new Base[0] : new Base[] { this.name }; // StringType
3944      case -659125328:
3945        /* defaultValue */ return this.defaultValue == null ? new Base[0] : new Base[] { this.defaultValue }; // StringType
3946      case -1724546052:
3947        /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // StringType
3948      case -1795452264:
3949        /* expression */ return this.expression == null ? new Base[0] : new Base[] { this.expression }; // StringType
3950      case 1160732269:
3951        /* headerField */ return this.headerField == null ? new Base[0] : new Base[] { this.headerField }; // StringType
3952      case 3202695:
3953        /* hint */ return this.hint == null ? new Base[0] : new Base[] { this.hint }; // StringType
3954      case 3433509:
3955        /* path */ return this.path == null ? new Base[0] : new Base[] { this.path }; // StringType
3956      case 1746327190:
3957        /* sourceId */ return this.sourceId == null ? new Base[0] : new Base[] { this.sourceId }; // IdType
3958      default:
3959        return super.getProperty(hash, name, checkValid);
3960      }
3961
3962    }
3963
3964    @Override
3965    public Base setProperty(int hash, String name, Base value) throws FHIRException {
3966      switch (hash) {
3967      case 3373707: // name
3968        this.name = castToString(value); // StringType
3969        return value;
3970      case -659125328: // defaultValue
3971        this.defaultValue = castToString(value); // StringType
3972        return value;
3973      case -1724546052: // description
3974        this.description = castToString(value); // StringType
3975        return value;
3976      case -1795452264: // expression
3977        this.expression = castToString(value); // StringType
3978        return value;
3979      case 1160732269: // headerField
3980        this.headerField = castToString(value); // StringType
3981        return value;
3982      case 3202695: // hint
3983        this.hint = castToString(value); // StringType
3984        return value;
3985      case 3433509: // path
3986        this.path = castToString(value); // StringType
3987        return value;
3988      case 1746327190: // sourceId
3989        this.sourceId = castToId(value); // IdType
3990        return value;
3991      default:
3992        return super.setProperty(hash, name, value);
3993      }
3994
3995    }
3996
3997    @Override
3998    public Base setProperty(String name, Base value) throws FHIRException {
3999      if (name.equals("name")) {
4000        this.name = castToString(value); // StringType
4001      } else if (name.equals("defaultValue")) {
4002        this.defaultValue = castToString(value); // StringType
4003      } else if (name.equals("description")) {
4004        this.description = castToString(value); // StringType
4005      } else if (name.equals("expression")) {
4006        this.expression = castToString(value); // StringType
4007      } else if (name.equals("headerField")) {
4008        this.headerField = castToString(value); // StringType
4009      } else if (name.equals("hint")) {
4010        this.hint = castToString(value); // StringType
4011      } else if (name.equals("path")) {
4012        this.path = castToString(value); // StringType
4013      } else if (name.equals("sourceId")) {
4014        this.sourceId = castToId(value); // IdType
4015      } else
4016        return super.setProperty(name, value);
4017      return value;
4018    }
4019
4020  @Override
4021  public void removeChild(String name, Base value) throws FHIRException {
4022      if (name.equals("name")) {
4023        this.name = null;
4024      } else if (name.equals("defaultValue")) {
4025        this.defaultValue = null;
4026      } else if (name.equals("description")) {
4027        this.description = null;
4028      } else if (name.equals("expression")) {
4029        this.expression = null;
4030      } else if (name.equals("headerField")) {
4031        this.headerField = null;
4032      } else if (name.equals("hint")) {
4033        this.hint = null;
4034      } else if (name.equals("path")) {
4035        this.path = null;
4036      } else if (name.equals("sourceId")) {
4037        this.sourceId = null;
4038      } else
4039        super.removeChild(name, value);
4040      
4041    }
4042
4043    @Override
4044    public Base makeProperty(int hash, String name) throws FHIRException {
4045      switch (hash) {
4046      case 3373707:
4047        return getNameElement();
4048      case -659125328:
4049        return getDefaultValueElement();
4050      case -1724546052:
4051        return getDescriptionElement();
4052      case -1795452264:
4053        return getExpressionElement();
4054      case 1160732269:
4055        return getHeaderFieldElement();
4056      case 3202695:
4057        return getHintElement();
4058      case 3433509:
4059        return getPathElement();
4060      case 1746327190:
4061        return getSourceIdElement();
4062      default:
4063        return super.makeProperty(hash, name);
4064      }
4065
4066    }
4067
4068    @Override
4069    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4070      switch (hash) {
4071      case 3373707:
4072        /* name */ return new String[] { "string" };
4073      case -659125328:
4074        /* defaultValue */ return new String[] { "string" };
4075      case -1724546052:
4076        /* description */ return new String[] { "string" };
4077      case -1795452264:
4078        /* expression */ return new String[] { "string" };
4079      case 1160732269:
4080        /* headerField */ return new String[] { "string" };
4081      case 3202695:
4082        /* hint */ return new String[] { "string" };
4083      case 3433509:
4084        /* path */ return new String[] { "string" };
4085      case 1746327190:
4086        /* sourceId */ return new String[] { "id" };
4087      default:
4088        return super.getTypesForProperty(hash, name);
4089      }
4090
4091    }
4092
4093    @Override
4094    public Base addChild(String name) throws FHIRException {
4095      if (name.equals("name")) {
4096        throw new FHIRException("Cannot call addChild on a singleton property TestScript.name");
4097      } else if (name.equals("defaultValue")) {
4098        throw new FHIRException("Cannot call addChild on a singleton property TestScript.defaultValue");
4099      } else if (name.equals("description")) {
4100        throw new FHIRException("Cannot call addChild on a singleton property TestScript.description");
4101      } else if (name.equals("expression")) {
4102        throw new FHIRException("Cannot call addChild on a singleton property TestScript.expression");
4103      } else if (name.equals("headerField")) {
4104        throw new FHIRException("Cannot call addChild on a singleton property TestScript.headerField");
4105      } else if (name.equals("hint")) {
4106        throw new FHIRException("Cannot call addChild on a singleton property TestScript.hint");
4107      } else if (name.equals("path")) {
4108        throw new FHIRException("Cannot call addChild on a singleton property TestScript.path");
4109      } else if (name.equals("sourceId")) {
4110        throw new FHIRException("Cannot call addChild on a singleton property TestScript.sourceId");
4111      } else
4112        return super.addChild(name);
4113    }
4114
4115    public TestScriptVariableComponent copy() {
4116      TestScriptVariableComponent dst = new TestScriptVariableComponent();
4117      copyValues(dst);
4118      return dst;
4119    }
4120
4121    public void copyValues(TestScriptVariableComponent dst) {
4122      super.copyValues(dst);
4123      dst.name = name == null ? null : name.copy();
4124      dst.defaultValue = defaultValue == null ? null : defaultValue.copy();
4125      dst.description = description == null ? null : description.copy();
4126      dst.expression = expression == null ? null : expression.copy();
4127      dst.headerField = headerField == null ? null : headerField.copy();
4128      dst.hint = hint == null ? null : hint.copy();
4129      dst.path = path == null ? null : path.copy();
4130      dst.sourceId = sourceId == null ? null : sourceId.copy();
4131    }
4132
4133    @Override
4134    public boolean equalsDeep(Base other_) {
4135      if (!super.equalsDeep(other_))
4136        return false;
4137      if (!(other_ instanceof TestScriptVariableComponent))
4138        return false;
4139      TestScriptVariableComponent o = (TestScriptVariableComponent) other_;
4140      return compareDeep(name, o.name, true) && compareDeep(defaultValue, o.defaultValue, true)
4141          && compareDeep(description, o.description, true) && compareDeep(expression, o.expression, true)
4142          && compareDeep(headerField, o.headerField, true) && compareDeep(hint, o.hint, true)
4143          && compareDeep(path, o.path, true) && compareDeep(sourceId, o.sourceId, true);
4144    }
4145
4146    @Override
4147    public boolean equalsShallow(Base other_) {
4148      if (!super.equalsShallow(other_))
4149        return false;
4150      if (!(other_ instanceof TestScriptVariableComponent))
4151        return false;
4152      TestScriptVariableComponent o = (TestScriptVariableComponent) other_;
4153      return compareValues(name, o.name, true) && compareValues(defaultValue, o.defaultValue, true)
4154          && compareValues(description, o.description, true) && compareValues(expression, o.expression, true)
4155          && compareValues(headerField, o.headerField, true) && compareValues(hint, o.hint, true)
4156          && compareValues(path, o.path, true) && compareValues(sourceId, o.sourceId, true);
4157    }
4158
4159    public boolean isEmpty() {
4160      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, defaultValue, description, expression,
4161          headerField, hint, path, sourceId);
4162    }
4163
4164    public String fhirType() {
4165      return "TestScript.variable";
4166
4167    }
4168
4169  }
4170
4171  @Block()
4172  public static class TestScriptSetupComponent extends BackboneElement implements IBaseBackboneElement {
4173    /**
4174     * Action would contain either an operation or an assertion.
4175     */
4176    @Child(name = "action", type = {}, order = 1, min = 1, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
4177    @Description(shortDefinition = "A setup operation or assert to perform", formalDefinition = "Action would contain either an operation or an assertion.")
4178    protected List<SetupActionComponent> action;
4179
4180    private static final long serialVersionUID = -123374486L;
4181
4182    /**
4183     * Constructor
4184     */
4185    public TestScriptSetupComponent() {
4186      super();
4187    }
4188
4189    /**
4190     * @return {@link #action} (Action would contain either an operation or an
4191     *         assertion.)
4192     */
4193    public List<SetupActionComponent> getAction() {
4194      if (this.action == null)
4195        this.action = new ArrayList<SetupActionComponent>();
4196      return this.action;
4197    }
4198
4199    /**
4200     * @return Returns a reference to <code>this</code> for easy method chaining
4201     */
4202    public TestScriptSetupComponent setAction(List<SetupActionComponent> theAction) {
4203      this.action = theAction;
4204      return this;
4205    }
4206
4207    public boolean hasAction() {
4208      if (this.action == null)
4209        return false;
4210      for (SetupActionComponent item : this.action)
4211        if (!item.isEmpty())
4212          return true;
4213      return false;
4214    }
4215
4216    public SetupActionComponent addAction() { // 3
4217      SetupActionComponent t = new SetupActionComponent();
4218      if (this.action == null)
4219        this.action = new ArrayList<SetupActionComponent>();
4220      this.action.add(t);
4221      return t;
4222    }
4223
4224    public TestScriptSetupComponent addAction(SetupActionComponent t) { // 3
4225      if (t == null)
4226        return this;
4227      if (this.action == null)
4228        this.action = new ArrayList<SetupActionComponent>();
4229      this.action.add(t);
4230      return this;
4231    }
4232
4233    /**
4234     * @return The first repetition of repeating field {@link #action}, creating it
4235     *         if it does not already exist
4236     */
4237    public SetupActionComponent getActionFirstRep() {
4238      if (getAction().isEmpty()) {
4239        addAction();
4240      }
4241      return getAction().get(0);
4242    }
4243
4244    protected void listChildren(List<Property> children) {
4245      super.listChildren(children);
4246      children.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0,
4247          java.lang.Integer.MAX_VALUE, action));
4248    }
4249
4250    @Override
4251    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4252      switch (_hash) {
4253      case -1422950858:
4254        /* action */ return new Property("action", "", "Action would contain either an operation or an assertion.", 0,
4255            java.lang.Integer.MAX_VALUE, action);
4256      default:
4257        return super.getNamedProperty(_hash, _name, _checkValid);
4258      }
4259
4260    }
4261
4262    @Override
4263    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4264      switch (hash) {
4265      case -1422950858:
4266        /* action */ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // SetupActionComponent
4267      default:
4268        return super.getProperty(hash, name, checkValid);
4269      }
4270
4271    }
4272
4273    @Override
4274    public Base setProperty(int hash, String name, Base value) throws FHIRException {
4275      switch (hash) {
4276      case -1422950858: // action
4277        this.getAction().add((SetupActionComponent) value); // SetupActionComponent
4278        return value;
4279      default:
4280        return super.setProperty(hash, name, value);
4281      }
4282
4283    }
4284
4285    @Override
4286    public Base setProperty(String name, Base value) throws FHIRException {
4287      if (name.equals("action")) {
4288        this.getAction().add((SetupActionComponent) value);
4289      } else
4290        return super.setProperty(name, value);
4291      return value;
4292    }
4293
4294  @Override
4295  public void removeChild(String name, Base value) throws FHIRException {
4296      if (name.equals("action")) {
4297        this.getAction().remove((SetupActionComponent) value);
4298      } else
4299        super.removeChild(name, value);
4300      
4301    }
4302
4303    @Override
4304    public Base makeProperty(int hash, String name) throws FHIRException {
4305      switch (hash) {
4306      case -1422950858:
4307        return addAction();
4308      default:
4309        return super.makeProperty(hash, name);
4310      }
4311
4312    }
4313
4314    @Override
4315    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4316      switch (hash) {
4317      case -1422950858:
4318        /* action */ return new String[] {};
4319      default:
4320        return super.getTypesForProperty(hash, name);
4321      }
4322
4323    }
4324
4325    @Override
4326    public Base addChild(String name) throws FHIRException {
4327      if (name.equals("action")) {
4328        return addAction();
4329      } else
4330        return super.addChild(name);
4331    }
4332
4333    public TestScriptSetupComponent copy() {
4334      TestScriptSetupComponent dst = new TestScriptSetupComponent();
4335      copyValues(dst);
4336      return dst;
4337    }
4338
4339    public void copyValues(TestScriptSetupComponent dst) {
4340      super.copyValues(dst);
4341      if (action != null) {
4342        dst.action = new ArrayList<SetupActionComponent>();
4343        for (SetupActionComponent i : action)
4344          dst.action.add(i.copy());
4345      }
4346      ;
4347    }
4348
4349    @Override
4350    public boolean equalsDeep(Base other_) {
4351      if (!super.equalsDeep(other_))
4352        return false;
4353      if (!(other_ instanceof TestScriptSetupComponent))
4354        return false;
4355      TestScriptSetupComponent o = (TestScriptSetupComponent) other_;
4356      return compareDeep(action, o.action, true);
4357    }
4358
4359    @Override
4360    public boolean equalsShallow(Base other_) {
4361      if (!super.equalsShallow(other_))
4362        return false;
4363      if (!(other_ instanceof TestScriptSetupComponent))
4364        return false;
4365      TestScriptSetupComponent o = (TestScriptSetupComponent) other_;
4366      return true;
4367    }
4368
4369    public boolean isEmpty() {
4370      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(action);
4371    }
4372
4373    public String fhirType() {
4374      return "TestScript.setup";
4375
4376    }
4377
4378  }
4379
4380  @Block()
4381  public static class SetupActionComponent extends BackboneElement implements IBaseBackboneElement {
4382    /**
4383     * The operation to perform.
4384     */
4385    @Child(name = "operation", type = {}, order = 1, min = 0, max = 1, modifier = false, summary = false)
4386    @Description(shortDefinition = "The setup operation to perform", formalDefinition = "The operation to perform.")
4387    protected SetupActionOperationComponent operation;
4388
4389    /**
4390     * Evaluates the results of previous operations to determine if the server under
4391     * test behaves appropriately.
4392     */
4393    @Child(name = "assert", type = {}, order = 2, min = 0, max = 1, modifier = false, summary = false)
4394    @Description(shortDefinition = "The assertion to perform", formalDefinition = "Evaluates the results of previous operations to determine if the server under test behaves appropriately.")
4395    protected SetupActionAssertComponent assert_;
4396
4397    private static final long serialVersionUID = -252088305L;
4398
4399    /**
4400     * Constructor
4401     */
4402    public SetupActionComponent() {
4403      super();
4404    }
4405
4406    /**
4407     * @return {@link #operation} (The operation to perform.)
4408     */
4409    public SetupActionOperationComponent getOperation() {
4410      if (this.operation == null)
4411        if (Configuration.errorOnAutoCreate())
4412          throw new Error("Attempt to auto-create SetupActionComponent.operation");
4413        else if (Configuration.doAutoCreate())
4414          this.operation = new SetupActionOperationComponent(); // cc
4415      return this.operation;
4416    }
4417
4418    public boolean hasOperation() {
4419      return this.operation != null && !this.operation.isEmpty();
4420    }
4421
4422    /**
4423     * @param value {@link #operation} (The operation to perform.)
4424     */
4425    public SetupActionComponent setOperation(SetupActionOperationComponent value) {
4426      this.operation = value;
4427      return this;
4428    }
4429
4430    /**
4431     * @return {@link #assert_} (Evaluates the results of previous operations to
4432     *         determine if the server under test behaves appropriately.)
4433     */
4434    public SetupActionAssertComponent getAssert() {
4435      if (this.assert_ == null)
4436        if (Configuration.errorOnAutoCreate())
4437          throw new Error("Attempt to auto-create SetupActionComponent.assert_");
4438        else if (Configuration.doAutoCreate())
4439          this.assert_ = new SetupActionAssertComponent(); // cc
4440      return this.assert_;
4441    }
4442
4443    public boolean hasAssert() {
4444      return this.assert_ != null && !this.assert_.isEmpty();
4445    }
4446
4447    /**
4448     * @param value {@link #assert_} (Evaluates the results of previous operations
4449     *              to determine if the server under test behaves appropriately.)
4450     */
4451    public SetupActionComponent setAssert(SetupActionAssertComponent value) {
4452      this.assert_ = value;
4453      return this;
4454    }
4455
4456    protected void listChildren(List<Property> children) {
4457      super.listChildren(children);
4458      children.add(new Property("operation", "", "The operation to perform.", 0, 1, operation));
4459      children.add(new Property("assert", "",
4460          "Evaluates the results of previous operations to determine if the server under test behaves appropriately.",
4461          0, 1, assert_));
4462    }
4463
4464    @Override
4465    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4466      switch (_hash) {
4467      case 1662702951:
4468        /* operation */ return new Property("operation", "", "The operation to perform.", 0, 1, operation);
4469      case -1408208058:
4470        /* assert */ return new Property("assert", "",
4471            "Evaluates the results of previous operations to determine if the server under test behaves appropriately.",
4472            0, 1, assert_);
4473      default:
4474        return super.getNamedProperty(_hash, _name, _checkValid);
4475      }
4476
4477    }
4478
4479    @Override
4480    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4481      switch (hash) {
4482      case 1662702951:
4483        /* operation */ return this.operation == null ? new Base[0] : new Base[] { this.operation }; // SetupActionOperationComponent
4484      case -1408208058:
4485        /* assert */ return this.assert_ == null ? new Base[0] : new Base[] { this.assert_ }; // SetupActionAssertComponent
4486      default:
4487        return super.getProperty(hash, name, checkValid);
4488      }
4489
4490    }
4491
4492    @Override
4493    public Base setProperty(int hash, String name, Base value) throws FHIRException {
4494      switch (hash) {
4495      case 1662702951: // operation
4496        this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
4497        return value;
4498      case -1408208058: // assert
4499        this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
4500        return value;
4501      default:
4502        return super.setProperty(hash, name, value);
4503      }
4504
4505    }
4506
4507    @Override
4508    public Base setProperty(String name, Base value) throws FHIRException {
4509      if (name.equals("operation")) {
4510        this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
4511      } else if (name.equals("assert")) {
4512        this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
4513      } else
4514        return super.setProperty(name, value);
4515      return value;
4516    }
4517
4518  @Override
4519  public void removeChild(String name, Base value) throws FHIRException {
4520      if (name.equals("operation")) {
4521        this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
4522      } else if (name.equals("assert")) {
4523        this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
4524      } else
4525        super.removeChild(name, value);
4526      
4527    }
4528
4529    @Override
4530    public Base makeProperty(int hash, String name) throws FHIRException {
4531      switch (hash) {
4532      case 1662702951:
4533        return getOperation();
4534      case -1408208058:
4535        return getAssert();
4536      default:
4537        return super.makeProperty(hash, name);
4538      }
4539
4540    }
4541
4542    @Override
4543    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4544      switch (hash) {
4545      case 1662702951:
4546        /* operation */ return new String[] {};
4547      case -1408208058:
4548        /* assert */ return new String[] {};
4549      default:
4550        return super.getTypesForProperty(hash, name);
4551      }
4552
4553    }
4554
4555    @Override
4556    public Base addChild(String name) throws FHIRException {
4557      if (name.equals("operation")) {
4558        this.operation = new SetupActionOperationComponent();
4559        return this.operation;
4560      } else if (name.equals("assert")) {
4561        this.assert_ = new SetupActionAssertComponent();
4562        return this.assert_;
4563      } else
4564        return super.addChild(name);
4565    }
4566
4567    public SetupActionComponent copy() {
4568      SetupActionComponent dst = new SetupActionComponent();
4569      copyValues(dst);
4570      return dst;
4571    }
4572
4573    public void copyValues(SetupActionComponent dst) {
4574      super.copyValues(dst);
4575      dst.operation = operation == null ? null : operation.copy();
4576      dst.assert_ = assert_ == null ? null : assert_.copy();
4577    }
4578
4579    @Override
4580    public boolean equalsDeep(Base other_) {
4581      if (!super.equalsDeep(other_))
4582        return false;
4583      if (!(other_ instanceof SetupActionComponent))
4584        return false;
4585      SetupActionComponent o = (SetupActionComponent) other_;
4586      return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true);
4587    }
4588
4589    @Override
4590    public boolean equalsShallow(Base other_) {
4591      if (!super.equalsShallow(other_))
4592        return false;
4593      if (!(other_ instanceof SetupActionComponent))
4594        return false;
4595      SetupActionComponent o = (SetupActionComponent) other_;
4596      return true;
4597    }
4598
4599    public boolean isEmpty() {
4600      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation, assert_);
4601    }
4602
4603    public String fhirType() {
4604      return "TestScript.setup.action";
4605
4606    }
4607
4608  }
4609
4610  @Block()
4611  public static class SetupActionOperationComponent extends BackboneElement implements IBaseBackboneElement {
4612    /**
4613     * Server interaction or operation type.
4614     */
4615    @Child(name = "type", type = { Coding.class }, order = 1, min = 0, max = 1, modifier = false, summary = false)
4616    @Description(shortDefinition = "The operation code type that will be executed", formalDefinition = "Server interaction or operation type.")
4617    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/testscript-operation-codes")
4618    protected Coding type;
4619
4620    /**
4621     * The type of the resource. See http://build.fhir.org/resourcelist.html.
4622     */
4623    @Child(name = "resource", type = { CodeType.class }, order = 2, min = 0, max = 1, modifier = false, summary = false)
4624    @Description(shortDefinition = "Resource type", formalDefinition = "The type of the resource.  See http://build.fhir.org/resourcelist.html.")
4625    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/defined-types")
4626    protected CodeType resource;
4627
4628    /**
4629     * The label would be used for tracking/logging purposes by test engines.
4630     */
4631    @Child(name = "label", type = { StringType.class }, order = 3, min = 0, max = 1, modifier = false, summary = false)
4632    @Description(shortDefinition = "Tracking/logging operation label", formalDefinition = "The label would be used for tracking/logging purposes by test engines.")
4633    protected StringType label;
4634
4635    /**
4636     * The description would be used by test engines for tracking and reporting
4637     * purposes.
4638     */
4639    @Child(name = "description", type = {
4640        StringType.class }, order = 4, min = 0, max = 1, modifier = false, summary = false)
4641    @Description(shortDefinition = "Tracking/reporting operation description", formalDefinition = "The description would be used by test engines for tracking and reporting purposes.")
4642    protected StringType description;
4643
4644    /**
4645     * The mime-type to use for RESTful operation in the 'Accept' header.
4646     */
4647    @Child(name = "accept", type = { CodeType.class }, order = 5, min = 0, max = 1, modifier = false, summary = false)
4648    @Description(shortDefinition = "Mime type to accept in the payload of the response, with charset etc.", formalDefinition = "The mime-type to use for RESTful operation in the 'Accept' header.")
4649    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/mimetypes")
4650    protected CodeType accept;
4651
4652    /**
4653     * The mime-type to use for RESTful operation in the 'Content-Type' header.
4654     */
4655    @Child(name = "contentType", type = {
4656        CodeType.class }, order = 6, min = 0, max = 1, modifier = false, summary = false)
4657    @Description(shortDefinition = "Mime type of the request payload contents, with charset etc.", formalDefinition = "The mime-type to use for RESTful operation in the 'Content-Type' header.")
4658    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/mimetypes")
4659    protected CodeType contentType;
4660
4661    /**
4662     * The server where the request message is destined for. Must be one of the
4663     * server numbers listed in TestScript.destination section.
4664     */
4665    @Child(name = "destination", type = {
4666        IntegerType.class }, order = 7, min = 0, max = 1, modifier = false, summary = false)
4667    @Description(shortDefinition = "Server responding to the request", formalDefinition = "The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.")
4668    protected IntegerType destination;
4669
4670    /**
4671     * Whether or not to implicitly send the request url in encoded format. The
4672     * default is true to match the standard RESTful client behavior. Set to false
4673     * when communicating with a server that does not support encoded url paths.
4674     */
4675    @Child(name = "encodeRequestUrl", type = {
4676        BooleanType.class }, order = 8, min = 1, max = 1, modifier = false, summary = false)
4677    @Description(shortDefinition = "Whether or not to send the request url in encoded format", formalDefinition = "Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.")
4678    protected BooleanType encodeRequestUrl;
4679
4680    /**
4681     * The HTTP method the test engine MUST use for this operation regardless of any
4682     * other operation details.
4683     */
4684    @Child(name = "method", type = { CodeType.class }, order = 9, min = 0, max = 1, modifier = false, summary = false)
4685    @Description(shortDefinition = "delete | get | options | patch | post | put | head", formalDefinition = "The HTTP method the test engine MUST use for this operation regardless of any other operation details.")
4686    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/http-operations")
4687    protected Enumeration<TestScriptRequestMethodCode> method;
4688
4689    /**
4690     * The server where the request message originates from. Must be one of the
4691     * server numbers listed in TestScript.origin section.
4692     */
4693    @Child(name = "origin", type = {
4694        IntegerType.class }, order = 10, min = 0, max = 1, modifier = false, summary = false)
4695    @Description(shortDefinition = "Server initiating the request", formalDefinition = "The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.")
4696    protected IntegerType origin;
4697
4698    /**
4699     * Path plus parameters after [type]. Used to set parts of the request URL
4700     * explicitly.
4701     */
4702    @Child(name = "params", type = {
4703        StringType.class }, order = 11, min = 0, max = 1, modifier = false, summary = false)
4704    @Description(shortDefinition = "Explicitly defined path parameters", formalDefinition = "Path plus parameters after [type].  Used to set parts of the request URL explicitly.")
4705    protected StringType params;
4706
4707    /**
4708     * Header elements would be used to set HTTP headers.
4709     */
4710    @Child(name = "requestHeader", type = {}, order = 12, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
4711    @Description(shortDefinition = "Each operation can have one or more header elements", formalDefinition = "Header elements would be used to set HTTP headers.")
4712    protected List<SetupActionOperationRequestHeaderComponent> requestHeader;
4713
4714    /**
4715     * The fixture id (maybe new) to map to the request.
4716     */
4717    @Child(name = "requestId", type = { IdType.class }, order = 13, min = 0, max = 1, modifier = false, summary = false)
4718    @Description(shortDefinition = "Fixture Id of mapped request", formalDefinition = "The fixture id (maybe new) to map to the request.")
4719    protected IdType requestId;
4720
4721    /**
4722     * The fixture id (maybe new) to map to the response.
4723     */
4724    @Child(name = "responseId", type = {
4725        IdType.class }, order = 14, min = 0, max = 1, modifier = false, summary = false)
4726    @Description(shortDefinition = "Fixture Id of mapped response", formalDefinition = "The fixture id (maybe new) to map to the response.")
4727    protected IdType responseId;
4728
4729    /**
4730     * The id of the fixture used as the body of a PUT or POST request.
4731     */
4732    @Child(name = "sourceId", type = { IdType.class }, order = 15, min = 0, max = 1, modifier = false, summary = false)
4733    @Description(shortDefinition = "Fixture Id of body for PUT and POST requests", formalDefinition = "The id of the fixture used as the body of a PUT or POST request.")
4734    protected IdType sourceId;
4735
4736    /**
4737     * Id of fixture used for extracting the [id], [type], and [vid] for GET
4738     * requests.
4739     */
4740    @Child(name = "targetId", type = { IdType.class }, order = 16, min = 0, max = 1, modifier = false, summary = false)
4741    @Description(shortDefinition = "Id of fixture used for extracting the [id],  [type], and [vid] for GET requests", formalDefinition = "Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.")
4742    protected IdType targetId;
4743
4744    /**
4745     * Complete request URL.
4746     */
4747    @Child(name = "url", type = { StringType.class }, order = 17, min = 0, max = 1, modifier = false, summary = false)
4748    @Description(shortDefinition = "Request URL", formalDefinition = "Complete request URL.")
4749    protected StringType url;
4750
4751    private static final long serialVersionUID = 300050202L;
4752
4753    /**
4754     * Constructor
4755     */
4756    public SetupActionOperationComponent() {
4757      super();
4758    }
4759
4760    /**
4761     * Constructor
4762     */
4763    public SetupActionOperationComponent(BooleanType encodeRequestUrl) {
4764      super();
4765      this.encodeRequestUrl = encodeRequestUrl;
4766    }
4767
4768    /**
4769     * @return {@link #type} (Server interaction or operation type.)
4770     */
4771    public Coding getType() {
4772      if (this.type == null)
4773        if (Configuration.errorOnAutoCreate())
4774          throw new Error("Attempt to auto-create SetupActionOperationComponent.type");
4775        else if (Configuration.doAutoCreate())
4776          this.type = new Coding(); // cc
4777      return this.type;
4778    }
4779
4780    public boolean hasType() {
4781      return this.type != null && !this.type.isEmpty();
4782    }
4783
4784    /**
4785     * @param value {@link #type} (Server interaction or operation type.)
4786     */
4787    public SetupActionOperationComponent setType(Coding value) {
4788      this.type = value;
4789      return this;
4790    }
4791
4792    /**
4793     * @return {@link #resource} (The type of the resource. See
4794     *         http://build.fhir.org/resourcelist.html.). This is the underlying
4795     *         object with id, value and extensions. The accessor "getResource"
4796     *         gives direct access to the value
4797     */
4798    public CodeType getResourceElement() {
4799      if (this.resource == null)
4800        if (Configuration.errorOnAutoCreate())
4801          throw new Error("Attempt to auto-create SetupActionOperationComponent.resource");
4802        else if (Configuration.doAutoCreate())
4803          this.resource = new CodeType(); // bb
4804      return this.resource;
4805    }
4806
4807    public boolean hasResourceElement() {
4808      return this.resource != null && !this.resource.isEmpty();
4809    }
4810
4811    public boolean hasResource() {
4812      return this.resource != null && !this.resource.isEmpty();
4813    }
4814
4815    /**
4816     * @param value {@link #resource} (The type of the resource. See
4817     *              http://build.fhir.org/resourcelist.html.). This is the
4818     *              underlying object with id, value and extensions. The accessor
4819     *              "getResource" gives direct access to the value
4820     */
4821    public SetupActionOperationComponent setResourceElement(CodeType value) {
4822      this.resource = value;
4823      return this;
4824    }
4825
4826    /**
4827     * @return The type of the resource. See
4828     *         http://build.fhir.org/resourcelist.html.
4829     */
4830    public String getResource() {
4831      return this.resource == null ? null : this.resource.getValue();
4832    }
4833
4834    /**
4835     * @param value The type of the resource. See
4836     *              http://build.fhir.org/resourcelist.html.
4837     */
4838    public SetupActionOperationComponent setResource(String value) {
4839      if (Utilities.noString(value))
4840        this.resource = null;
4841      else {
4842        if (this.resource == null)
4843          this.resource = new CodeType();
4844        this.resource.setValue(value);
4845      }
4846      return this;
4847    }
4848
4849    /**
4850     * @return {@link #label} (The label would be used for tracking/logging purposes
4851     *         by test engines.). This is the underlying object with id, value and
4852     *         extensions. The accessor "getLabel" gives direct access to the value
4853     */
4854    public StringType getLabelElement() {
4855      if (this.label == null)
4856        if (Configuration.errorOnAutoCreate())
4857          throw new Error("Attempt to auto-create SetupActionOperationComponent.label");
4858        else if (Configuration.doAutoCreate())
4859          this.label = new StringType(); // bb
4860      return this.label;
4861    }
4862
4863    public boolean hasLabelElement() {
4864      return this.label != null && !this.label.isEmpty();
4865    }
4866
4867    public boolean hasLabel() {
4868      return this.label != null && !this.label.isEmpty();
4869    }
4870
4871    /**
4872     * @param value {@link #label} (The label would be used for tracking/logging
4873     *              purposes by test engines.). This is the underlying object with
4874     *              id, value and extensions. The accessor "getLabel" gives direct
4875     *              access to the value
4876     */
4877    public SetupActionOperationComponent setLabelElement(StringType value) {
4878      this.label = value;
4879      return this;
4880    }
4881
4882    /**
4883     * @return The label would be used for tracking/logging purposes by test
4884     *         engines.
4885     */
4886    public String getLabel() {
4887      return this.label == null ? null : this.label.getValue();
4888    }
4889
4890    /**
4891     * @param value The label would be used for tracking/logging purposes by test
4892     *              engines.
4893     */
4894    public SetupActionOperationComponent setLabel(String value) {
4895      if (Utilities.noString(value))
4896        this.label = null;
4897      else {
4898        if (this.label == null)
4899          this.label = new StringType();
4900        this.label.setValue(value);
4901      }
4902      return this;
4903    }
4904
4905    /**
4906     * @return {@link #description} (The description would be used by test engines
4907     *         for tracking and reporting purposes.). This is the underlying object
4908     *         with id, value and extensions. The accessor "getDescription" gives
4909     *         direct access to the value
4910     */
4911    public StringType getDescriptionElement() {
4912      if (this.description == null)
4913        if (Configuration.errorOnAutoCreate())
4914          throw new Error("Attempt to auto-create SetupActionOperationComponent.description");
4915        else if (Configuration.doAutoCreate())
4916          this.description = new StringType(); // bb
4917      return this.description;
4918    }
4919
4920    public boolean hasDescriptionElement() {
4921      return this.description != null && !this.description.isEmpty();
4922    }
4923
4924    public boolean hasDescription() {
4925      return this.description != null && !this.description.isEmpty();
4926    }
4927
4928    /**
4929     * @param value {@link #description} (The description would be used by test
4930     *              engines for tracking and reporting purposes.). This is the
4931     *              underlying object with id, value and extensions. The accessor
4932     *              "getDescription" gives direct access to the value
4933     */
4934    public SetupActionOperationComponent setDescriptionElement(StringType value) {
4935      this.description = value;
4936      return this;
4937    }
4938
4939    /**
4940     * @return The description would be used by test engines for tracking and
4941     *         reporting purposes.
4942     */
4943    public String getDescription() {
4944      return this.description == null ? null : this.description.getValue();
4945    }
4946
4947    /**
4948     * @param value The description would be used by test engines for tracking and
4949     *              reporting purposes.
4950     */
4951    public SetupActionOperationComponent setDescription(String value) {
4952      if (Utilities.noString(value))
4953        this.description = null;
4954      else {
4955        if (this.description == null)
4956          this.description = new StringType();
4957        this.description.setValue(value);
4958      }
4959      return this;
4960    }
4961
4962    /**
4963     * @return {@link #accept} (The mime-type to use for RESTful operation in the
4964     *         'Accept' header.). This is the underlying object with id, value and
4965     *         extensions. The accessor "getAccept" gives direct access to the value
4966     */
4967    public CodeType getAcceptElement() {
4968      if (this.accept == null)
4969        if (Configuration.errorOnAutoCreate())
4970          throw new Error("Attempt to auto-create SetupActionOperationComponent.accept");
4971        else if (Configuration.doAutoCreate())
4972          this.accept = new CodeType(); // bb
4973      return this.accept;
4974    }
4975
4976    public boolean hasAcceptElement() {
4977      return this.accept != null && !this.accept.isEmpty();
4978    }
4979
4980    public boolean hasAccept() {
4981      return this.accept != null && !this.accept.isEmpty();
4982    }
4983
4984    /**
4985     * @param value {@link #accept} (The mime-type to use for RESTful operation in
4986     *              the 'Accept' header.). This is the underlying object with id,
4987     *              value and extensions. The accessor "getAccept" gives direct
4988     *              access to the value
4989     */
4990    public SetupActionOperationComponent setAcceptElement(CodeType value) {
4991      this.accept = value;
4992      return this;
4993    }
4994
4995    /**
4996     * @return The mime-type to use for RESTful operation in the 'Accept' header.
4997     */
4998    public String getAccept() {
4999      return this.accept == null ? null : this.accept.getValue();
5000    }
5001
5002    /**
5003     * @param value The mime-type to use for RESTful operation in the 'Accept'
5004     *              header.
5005     */
5006    public SetupActionOperationComponent setAccept(String value) {
5007      if (Utilities.noString(value))
5008        this.accept = null;
5009      else {
5010        if (this.accept == null)
5011          this.accept = new CodeType();
5012        this.accept.setValue(value);
5013      }
5014      return this;
5015    }
5016
5017    /**
5018     * @return {@link #contentType} (The mime-type to use for RESTful operation in
5019     *         the 'Content-Type' header.). This is the underlying object with id,
5020     *         value and extensions. The accessor "getContentType" gives direct
5021     *         access to the value
5022     */
5023    public CodeType getContentTypeElement() {
5024      if (this.contentType == null)
5025        if (Configuration.errorOnAutoCreate())
5026          throw new Error("Attempt to auto-create SetupActionOperationComponent.contentType");
5027        else if (Configuration.doAutoCreate())
5028          this.contentType = new CodeType(); // bb
5029      return this.contentType;
5030    }
5031
5032    public boolean hasContentTypeElement() {
5033      return this.contentType != null && !this.contentType.isEmpty();
5034    }
5035
5036    public boolean hasContentType() {
5037      return this.contentType != null && !this.contentType.isEmpty();
5038    }
5039
5040    /**
5041     * @param value {@link #contentType} (The mime-type to use for RESTful operation
5042     *              in the 'Content-Type' header.). This is the underlying object
5043     *              with id, value and extensions. The accessor "getContentType"
5044     *              gives direct access to the value
5045     */
5046    public SetupActionOperationComponent setContentTypeElement(CodeType value) {
5047      this.contentType = value;
5048      return this;
5049    }
5050
5051    /**
5052     * @return The mime-type to use for RESTful operation in the 'Content-Type'
5053     *         header.
5054     */
5055    public String getContentType() {
5056      return this.contentType == null ? null : this.contentType.getValue();
5057    }
5058
5059    /**
5060     * @param value The mime-type to use for RESTful operation in the 'Content-Type'
5061     *              header.
5062     */
5063    public SetupActionOperationComponent setContentType(String value) {
5064      if (Utilities.noString(value))
5065        this.contentType = null;
5066      else {
5067        if (this.contentType == null)
5068          this.contentType = new CodeType();
5069        this.contentType.setValue(value);
5070      }
5071      return this;
5072    }
5073
5074    /**
5075     * @return {@link #destination} (The server where the request message is
5076     *         destined for. Must be one of the server numbers listed in
5077     *         TestScript.destination section.). This is the underlying object with
5078     *         id, value and extensions. The accessor "getDestination" gives direct
5079     *         access to the value
5080     */
5081    public IntegerType getDestinationElement() {
5082      if (this.destination == null)
5083        if (Configuration.errorOnAutoCreate())
5084          throw new Error("Attempt to auto-create SetupActionOperationComponent.destination");
5085        else if (Configuration.doAutoCreate())
5086          this.destination = new IntegerType(); // bb
5087      return this.destination;
5088    }
5089
5090    public boolean hasDestinationElement() {
5091      return this.destination != null && !this.destination.isEmpty();
5092    }
5093
5094    public boolean hasDestination() {
5095      return this.destination != null && !this.destination.isEmpty();
5096    }
5097
5098    /**
5099     * @param value {@link #destination} (The server where the request message is
5100     *              destined for. Must be one of the server numbers listed in
5101     *              TestScript.destination section.). This is the underlying object
5102     *              with id, value and extensions. The accessor "getDestination"
5103     *              gives direct access to the value
5104     */
5105    public SetupActionOperationComponent setDestinationElement(IntegerType value) {
5106      this.destination = value;
5107      return this;
5108    }
5109
5110    /**
5111     * @return The server where the request message is destined for. Must be one of
5112     *         the server numbers listed in TestScript.destination section.
5113     */
5114    public int getDestination() {
5115      return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue();
5116    }
5117
5118    /**
5119     * @param value The server where the request message is destined for. Must be
5120     *              one of the server numbers listed in TestScript.destination
5121     *              section.
5122     */
5123    public SetupActionOperationComponent setDestination(int value) {
5124      if (this.destination == null)
5125        this.destination = new IntegerType();
5126      this.destination.setValue(value);
5127      return this;
5128    }
5129
5130    /**
5131     * @return {@link #encodeRequestUrl} (Whether or not to implicitly send the
5132     *         request url in encoded format. The default is true to match the
5133     *         standard RESTful client behavior. Set to false when communicating
5134     *         with a server that does not support encoded url paths.). This is the
5135     *         underlying object with id, value and extensions. The accessor
5136     *         "getEncodeRequestUrl" gives direct access to the value
5137     */
5138    public BooleanType getEncodeRequestUrlElement() {
5139      if (this.encodeRequestUrl == null)
5140        if (Configuration.errorOnAutoCreate())
5141          throw new Error("Attempt to auto-create SetupActionOperationComponent.encodeRequestUrl");
5142        else if (Configuration.doAutoCreate())
5143          this.encodeRequestUrl = new BooleanType(); // bb
5144      return this.encodeRequestUrl;
5145    }
5146
5147    public boolean hasEncodeRequestUrlElement() {
5148      return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty();
5149    }
5150
5151    public boolean hasEncodeRequestUrl() {
5152      return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty();
5153    }
5154
5155    /**
5156     * @param value {@link #encodeRequestUrl} (Whether or not to implicitly send the
5157     *              request url in encoded format. The default is true to match the
5158     *              standard RESTful client behavior. Set to false when
5159     *              communicating with a server that does not support encoded url
5160     *              paths.). This is the underlying object with id, value and
5161     *              extensions. The accessor "getEncodeRequestUrl" gives direct
5162     *              access to the value
5163     */
5164    public SetupActionOperationComponent setEncodeRequestUrlElement(BooleanType value) {
5165      this.encodeRequestUrl = value;
5166      return this;
5167    }
5168
5169    /**
5170     * @return Whether or not to implicitly send the request url in encoded format.
5171     *         The default is true to match the standard RESTful client behavior.
5172     *         Set to false when communicating with a server that does not support
5173     *         encoded url paths.
5174     */
5175    public boolean getEncodeRequestUrl() {
5176      return this.encodeRequestUrl == null || this.encodeRequestUrl.isEmpty() ? false
5177          : this.encodeRequestUrl.getValue();
5178    }
5179
5180    /**
5181     * @param value Whether or not to implicitly send the request url in encoded
5182     *              format. The default is true to match the standard RESTful client
5183     *              behavior. Set to false when communicating with a server that
5184     *              does not support encoded url paths.
5185     */
5186    public SetupActionOperationComponent setEncodeRequestUrl(boolean value) {
5187      if (this.encodeRequestUrl == null)
5188        this.encodeRequestUrl = new BooleanType();
5189      this.encodeRequestUrl.setValue(value);
5190      return this;
5191    }
5192
5193    /**
5194     * @return {@link #method} (The HTTP method the test engine MUST use for this
5195     *         operation regardless of any other operation details.). This is the
5196     *         underlying object with id, value and extensions. The accessor
5197     *         "getMethod" gives direct access to the value
5198     */
5199    public Enumeration<TestScriptRequestMethodCode> getMethodElement() {
5200      if (this.method == null)
5201        if (Configuration.errorOnAutoCreate())
5202          throw new Error("Attempt to auto-create SetupActionOperationComponent.method");
5203        else if (Configuration.doAutoCreate())
5204          this.method = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory()); // bb
5205      return this.method;
5206    }
5207
5208    public boolean hasMethodElement() {
5209      return this.method != null && !this.method.isEmpty();
5210    }
5211
5212    public boolean hasMethod() {
5213      return this.method != null && !this.method.isEmpty();
5214    }
5215
5216    /**
5217     * @param value {@link #method} (The HTTP method the test engine MUST use for
5218     *              this operation regardless of any other operation details.). This
5219     *              is the underlying object with id, value and extensions. The
5220     *              accessor "getMethod" gives direct access to the value
5221     */
5222    public SetupActionOperationComponent setMethodElement(Enumeration<TestScriptRequestMethodCode> value) {
5223      this.method = value;
5224      return this;
5225    }
5226
5227    /**
5228     * @return The HTTP method the test engine MUST use for this operation
5229     *         regardless of any other operation details.
5230     */
5231    public TestScriptRequestMethodCode getMethod() {
5232      return this.method == null ? null : this.method.getValue();
5233    }
5234
5235    /**
5236     * @param value The HTTP method the test engine MUST use for this operation
5237     *              regardless of any other operation details.
5238     */
5239    public SetupActionOperationComponent setMethod(TestScriptRequestMethodCode value) {
5240      if (value == null)
5241        this.method = null;
5242      else {
5243        if (this.method == null)
5244          this.method = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory());
5245        this.method.setValue(value);
5246      }
5247      return this;
5248    }
5249
5250    /**
5251     * @return {@link #origin} (The server where the request message originates
5252     *         from. Must be one of the server numbers listed in TestScript.origin
5253     *         section.). This is the underlying object with id, value and
5254     *         extensions. The accessor "getOrigin" gives direct access to the value
5255     */
5256    public IntegerType getOriginElement() {
5257      if (this.origin == null)
5258        if (Configuration.errorOnAutoCreate())
5259          throw new Error("Attempt to auto-create SetupActionOperationComponent.origin");
5260        else if (Configuration.doAutoCreate())
5261          this.origin = new IntegerType(); // bb
5262      return this.origin;
5263    }
5264
5265    public boolean hasOriginElement() {
5266      return this.origin != null && !this.origin.isEmpty();
5267    }
5268
5269    public boolean hasOrigin() {
5270      return this.origin != null && !this.origin.isEmpty();
5271    }
5272
5273    /**
5274     * @param value {@link #origin} (The server where the request message originates
5275     *              from. Must be one of the server numbers listed in
5276     *              TestScript.origin section.). This is the underlying object with
5277     *              id, value and extensions. The accessor "getOrigin" gives direct
5278     *              access to the value
5279     */
5280    public SetupActionOperationComponent setOriginElement(IntegerType value) {
5281      this.origin = value;
5282      return this;
5283    }
5284
5285    /**
5286     * @return The server where the request message originates from. Must be one of
5287     *         the server numbers listed in TestScript.origin section.
5288     */
5289    public int getOrigin() {
5290      return this.origin == null || this.origin.isEmpty() ? 0 : this.origin.getValue();
5291    }
5292
5293    /**
5294     * @param value The server where the request message originates from. Must be
5295     *              one of the server numbers listed in TestScript.origin section.
5296     */
5297    public SetupActionOperationComponent setOrigin(int value) {
5298      if (this.origin == null)
5299        this.origin = new IntegerType();
5300      this.origin.setValue(value);
5301      return this;
5302    }
5303
5304    /**
5305     * @return {@link #params} (Path plus parameters after [type]. Used to set parts
5306     *         of the request URL explicitly.). This is the underlying object with
5307     *         id, value and extensions. The accessor "getParams" gives direct
5308     *         access to the value
5309     */
5310    public StringType getParamsElement() {
5311      if (this.params == null)
5312        if (Configuration.errorOnAutoCreate())
5313          throw new Error("Attempt to auto-create SetupActionOperationComponent.params");
5314        else if (Configuration.doAutoCreate())
5315          this.params = new StringType(); // bb
5316      return this.params;
5317    }
5318
5319    public boolean hasParamsElement() {
5320      return this.params != null && !this.params.isEmpty();
5321    }
5322
5323    public boolean hasParams() {
5324      return this.params != null && !this.params.isEmpty();
5325    }
5326
5327    /**
5328     * @param value {@link #params} (Path plus parameters after [type]. Used to set
5329     *              parts of the request URL explicitly.). This is the underlying
5330     *              object with id, value and extensions. The accessor "getParams"
5331     *              gives direct access to the value
5332     */
5333    public SetupActionOperationComponent setParamsElement(StringType value) {
5334      this.params = value;
5335      return this;
5336    }
5337
5338    /**
5339     * @return Path plus parameters after [type]. Used to set parts of the request
5340     *         URL explicitly.
5341     */
5342    public String getParams() {
5343      return this.params == null ? null : this.params.getValue();
5344    }
5345
5346    /**
5347     * @param value Path plus parameters after [type]. Used to set parts of the
5348     *              request URL explicitly.
5349     */
5350    public SetupActionOperationComponent setParams(String value) {
5351      if (Utilities.noString(value))
5352        this.params = null;
5353      else {
5354        if (this.params == null)
5355          this.params = new StringType();
5356        this.params.setValue(value);
5357      }
5358      return this;
5359    }
5360
5361    /**
5362     * @return {@link #requestHeader} (Header elements would be used to set HTTP
5363     *         headers.)
5364     */
5365    public List<SetupActionOperationRequestHeaderComponent> getRequestHeader() {
5366      if (this.requestHeader == null)
5367        this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
5368      return this.requestHeader;
5369    }
5370
5371    /**
5372     * @return Returns a reference to <code>this</code> for easy method chaining
5373     */
5374    public SetupActionOperationComponent setRequestHeader(
5375        List<SetupActionOperationRequestHeaderComponent> theRequestHeader) {
5376      this.requestHeader = theRequestHeader;
5377      return this;
5378    }
5379
5380    public boolean hasRequestHeader() {
5381      if (this.requestHeader == null)
5382        return false;
5383      for (SetupActionOperationRequestHeaderComponent item : this.requestHeader)
5384        if (!item.isEmpty())
5385          return true;
5386      return false;
5387    }
5388
5389    public SetupActionOperationRequestHeaderComponent addRequestHeader() { // 3
5390      SetupActionOperationRequestHeaderComponent t = new SetupActionOperationRequestHeaderComponent();
5391      if (this.requestHeader == null)
5392        this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
5393      this.requestHeader.add(t);
5394      return t;
5395    }
5396
5397    public SetupActionOperationComponent addRequestHeader(SetupActionOperationRequestHeaderComponent t) { // 3
5398      if (t == null)
5399        return this;
5400      if (this.requestHeader == null)
5401        this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
5402      this.requestHeader.add(t);
5403      return this;
5404    }
5405
5406    /**
5407     * @return The first repetition of repeating field {@link #requestHeader},
5408     *         creating it if it does not already exist
5409     */
5410    public SetupActionOperationRequestHeaderComponent getRequestHeaderFirstRep() {
5411      if (getRequestHeader().isEmpty()) {
5412        addRequestHeader();
5413      }
5414      return getRequestHeader().get(0);
5415    }
5416
5417    /**
5418     * @return {@link #requestId} (The fixture id (maybe new) to map to the
5419     *         request.). This is the underlying object with id, value and
5420     *         extensions. The accessor "getRequestId" gives direct access to the
5421     *         value
5422     */
5423    public IdType getRequestIdElement() {
5424      if (this.requestId == null)
5425        if (Configuration.errorOnAutoCreate())
5426          throw new Error("Attempt to auto-create SetupActionOperationComponent.requestId");
5427        else if (Configuration.doAutoCreate())
5428          this.requestId = new IdType(); // bb
5429      return this.requestId;
5430    }
5431
5432    public boolean hasRequestIdElement() {
5433      return this.requestId != null && !this.requestId.isEmpty();
5434    }
5435
5436    public boolean hasRequestId() {
5437      return this.requestId != null && !this.requestId.isEmpty();
5438    }
5439
5440    /**
5441     * @param value {@link #requestId} (The fixture id (maybe new) to map to the
5442     *              request.). This is the underlying object with id, value and
5443     *              extensions. The accessor "getRequestId" gives direct access to
5444     *              the value
5445     */
5446    public SetupActionOperationComponent setRequestIdElement(IdType value) {
5447      this.requestId = value;
5448      return this;
5449    }
5450
5451    /**
5452     * @return The fixture id (maybe new) to map to the request.
5453     */
5454    public String getRequestId() {
5455      return this.requestId == null ? null : this.requestId.getValue();
5456    }
5457
5458    /**
5459     * @param value The fixture id (maybe new) to map to the request.
5460     */
5461    public SetupActionOperationComponent setRequestId(String value) {
5462      if (Utilities.noString(value))
5463        this.requestId = null;
5464      else {
5465        if (this.requestId == null)
5466          this.requestId = new IdType();
5467        this.requestId.setValue(value);
5468      }
5469      return this;
5470    }
5471
5472    /**
5473     * @return {@link #responseId} (The fixture id (maybe new) to map to the
5474     *         response.). This is the underlying object with id, value and
5475     *         extensions. The accessor "getResponseId" gives direct access to the
5476     *         value
5477     */
5478    public IdType getResponseIdElement() {
5479      if (this.responseId == null)
5480        if (Configuration.errorOnAutoCreate())
5481          throw new Error("Attempt to auto-create SetupActionOperationComponent.responseId");
5482        else if (Configuration.doAutoCreate())
5483          this.responseId = new IdType(); // bb
5484      return this.responseId;
5485    }
5486
5487    public boolean hasResponseIdElement() {
5488      return this.responseId != null && !this.responseId.isEmpty();
5489    }
5490
5491    public boolean hasResponseId() {
5492      return this.responseId != null && !this.responseId.isEmpty();
5493    }
5494
5495    /**
5496     * @param value {@link #responseId} (The fixture id (maybe new) to map to the
5497     *              response.). This is the underlying object with id, value and
5498     *              extensions. The accessor "getResponseId" gives direct access to
5499     *              the value
5500     */
5501    public SetupActionOperationComponent setResponseIdElement(IdType value) {
5502      this.responseId = value;
5503      return this;
5504    }
5505
5506    /**
5507     * @return The fixture id (maybe new) to map to the response.
5508     */
5509    public String getResponseId() {
5510      return this.responseId == null ? null : this.responseId.getValue();
5511    }
5512
5513    /**
5514     * @param value The fixture id (maybe new) to map to the response.
5515     */
5516    public SetupActionOperationComponent setResponseId(String value) {
5517      if (Utilities.noString(value))
5518        this.responseId = null;
5519      else {
5520        if (this.responseId == null)
5521          this.responseId = new IdType();
5522        this.responseId.setValue(value);
5523      }
5524      return this;
5525    }
5526
5527    /**
5528     * @return {@link #sourceId} (The id of the fixture used as the body of a PUT or
5529     *         POST request.). This is the underlying object with id, value and
5530     *         extensions. The accessor "getSourceId" gives direct access to the
5531     *         value
5532     */
5533    public IdType getSourceIdElement() {
5534      if (this.sourceId == null)
5535        if (Configuration.errorOnAutoCreate())
5536          throw new Error("Attempt to auto-create SetupActionOperationComponent.sourceId");
5537        else if (Configuration.doAutoCreate())
5538          this.sourceId = new IdType(); // bb
5539      return this.sourceId;
5540    }
5541
5542    public boolean hasSourceIdElement() {
5543      return this.sourceId != null && !this.sourceId.isEmpty();
5544    }
5545
5546    public boolean hasSourceId() {
5547      return this.sourceId != null && !this.sourceId.isEmpty();
5548    }
5549
5550    /**
5551     * @param value {@link #sourceId} (The id of the fixture used as the body of a
5552     *              PUT or POST request.). This is the underlying object with id,
5553     *              value and extensions. The accessor "getSourceId" gives direct
5554     *              access to the value
5555     */
5556    public SetupActionOperationComponent setSourceIdElement(IdType value) {
5557      this.sourceId = value;
5558      return this;
5559    }
5560
5561    /**
5562     * @return The id of the fixture used as the body of a PUT or POST request.
5563     */
5564    public String getSourceId() {
5565      return this.sourceId == null ? null : this.sourceId.getValue();
5566    }
5567
5568    /**
5569     * @param value The id of the fixture used as the body of a PUT or POST request.
5570     */
5571    public SetupActionOperationComponent setSourceId(String value) {
5572      if (Utilities.noString(value))
5573        this.sourceId = null;
5574      else {
5575        if (this.sourceId == null)
5576          this.sourceId = new IdType();
5577        this.sourceId.setValue(value);
5578      }
5579      return this;
5580    }
5581
5582    /**
5583     * @return {@link #targetId} (Id of fixture used for extracting the [id],
5584     *         [type], and [vid] for GET requests.). This is the underlying object
5585     *         with id, value and extensions. The accessor "getTargetId" gives
5586     *         direct access to the value
5587     */
5588    public IdType getTargetIdElement() {
5589      if (this.targetId == null)
5590        if (Configuration.errorOnAutoCreate())
5591          throw new Error("Attempt to auto-create SetupActionOperationComponent.targetId");
5592        else if (Configuration.doAutoCreate())
5593          this.targetId = new IdType(); // bb
5594      return this.targetId;
5595    }
5596
5597    public boolean hasTargetIdElement() {
5598      return this.targetId != null && !this.targetId.isEmpty();
5599    }
5600
5601    public boolean hasTargetId() {
5602      return this.targetId != null && !this.targetId.isEmpty();
5603    }
5604
5605    /**
5606     * @param value {@link #targetId} (Id of fixture used for extracting the [id],
5607     *              [type], and [vid] for GET requests.). This is the underlying
5608     *              object with id, value and extensions. The accessor "getTargetId"
5609     *              gives direct access to the value
5610     */
5611    public SetupActionOperationComponent setTargetIdElement(IdType value) {
5612      this.targetId = value;
5613      return this;
5614    }
5615
5616    /**
5617     * @return Id of fixture used for extracting the [id], [type], and [vid] for GET
5618     *         requests.
5619     */
5620    public String getTargetId() {
5621      return this.targetId == null ? null : this.targetId.getValue();
5622    }
5623
5624    /**
5625     * @param value Id of fixture used for extracting the [id], [type], and [vid]
5626     *              for GET requests.
5627     */
5628    public SetupActionOperationComponent setTargetId(String value) {
5629      if (Utilities.noString(value))
5630        this.targetId = null;
5631      else {
5632        if (this.targetId == null)
5633          this.targetId = new IdType();
5634        this.targetId.setValue(value);
5635      }
5636      return this;
5637    }
5638
5639    /**
5640     * @return {@link #url} (Complete request URL.). This is the underlying object
5641     *         with id, value and extensions. The accessor "getUrl" gives direct
5642     *         access to the value
5643     */
5644    public StringType getUrlElement() {
5645      if (this.url == null)
5646        if (Configuration.errorOnAutoCreate())
5647          throw new Error("Attempt to auto-create SetupActionOperationComponent.url");
5648        else if (Configuration.doAutoCreate())
5649          this.url = new StringType(); // bb
5650      return this.url;
5651    }
5652
5653    public boolean hasUrlElement() {
5654      return this.url != null && !this.url.isEmpty();
5655    }
5656
5657    public boolean hasUrl() {
5658      return this.url != null && !this.url.isEmpty();
5659    }
5660
5661    /**
5662     * @param value {@link #url} (Complete request URL.). This is the underlying
5663     *              object with id, value and extensions. The accessor "getUrl"
5664     *              gives direct access to the value
5665     */
5666    public SetupActionOperationComponent setUrlElement(StringType value) {
5667      this.url = value;
5668      return this;
5669    }
5670
5671    /**
5672     * @return Complete request URL.
5673     */
5674    public String getUrl() {
5675      return this.url == null ? null : this.url.getValue();
5676    }
5677
5678    /**
5679     * @param value Complete request URL.
5680     */
5681    public SetupActionOperationComponent setUrl(String value) {
5682      if (Utilities.noString(value))
5683        this.url = null;
5684      else {
5685        if (this.url == null)
5686          this.url = new StringType();
5687        this.url.setValue(value);
5688      }
5689      return this;
5690    }
5691
5692    protected void listChildren(List<Property> children) {
5693      super.listChildren(children);
5694      children.add(new Property("type", "Coding", "Server interaction or operation type.", 0, 1, type));
5695      children.add(new Property("resource", "code",
5696          "The type of the resource.  See http://build.fhir.org/resourcelist.html.", 0, 1, resource));
5697      children.add(new Property("label", "string",
5698          "The label would be used for tracking/logging purposes by test engines.", 0, 1, label));
5699      children.add(new Property("description", "string",
5700          "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description));
5701      children.add(new Property("accept", "code", "The mime-type to use for RESTful operation in the 'Accept' header.",
5702          0, 1, accept));
5703      children.add(new Property("contentType", "code",
5704          "The mime-type to use for RESTful operation in the 'Content-Type' header.", 0, 1, contentType));
5705      children.add(new Property("destination", "integer",
5706          "The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.",
5707          0, 1, destination));
5708      children.add(new Property("encodeRequestUrl", "boolean",
5709          "Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.",
5710          0, 1, encodeRequestUrl));
5711      children.add(new Property("method", "code",
5712          "The HTTP method the test engine MUST use for this operation regardless of any other operation details.", 0,
5713          1, method));
5714      children.add(new Property("origin", "integer",
5715          "The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.",
5716          0, 1, origin));
5717      children.add(new Property("params", "string",
5718          "Path plus parameters after [type].  Used to set parts of the request URL explicitly.", 0, 1, params));
5719      children.add(new Property("requestHeader", "", "Header elements would be used to set HTTP headers.", 0,
5720          java.lang.Integer.MAX_VALUE, requestHeader));
5721      children
5722          .add(new Property("requestId", "id", "The fixture id (maybe new) to map to the request.", 0, 1, requestId));
5723      children.add(
5724          new Property("responseId", "id", "The fixture id (maybe new) to map to the response.", 0, 1, responseId));
5725      children.add(new Property("sourceId", "id", "The id of the fixture used as the body of a PUT or POST request.", 0,
5726          1, sourceId));
5727      children.add(new Property("targetId", "id",
5728          "Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.", 0, 1, targetId));
5729      children.add(new Property("url", "string", "Complete request URL.", 0, 1, url));
5730    }
5731
5732    @Override
5733    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
5734      switch (_hash) {
5735      case 3575610:
5736        /* type */ return new Property("type", "Coding", "Server interaction or operation type.", 0, 1, type);
5737      case -341064690:
5738        /* resource */ return new Property("resource", "code",
5739            "The type of the resource.  See http://build.fhir.org/resourcelist.html.", 0, 1, resource);
5740      case 102727412:
5741        /* label */ return new Property("label", "string",
5742            "The label would be used for tracking/logging purposes by test engines.", 0, 1, label);
5743      case -1724546052:
5744        /* description */ return new Property("description", "string",
5745            "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description);
5746      case -1423461112:
5747        /* accept */ return new Property("accept", "code",
5748            "The mime-type to use for RESTful operation in the 'Accept' header.", 0, 1, accept);
5749      case -389131437:
5750        /* contentType */ return new Property("contentType", "code",
5751            "The mime-type to use for RESTful operation in the 'Content-Type' header.", 0, 1, contentType);
5752      case -1429847026:
5753        /* destination */ return new Property("destination", "integer",
5754            "The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.",
5755            0, 1, destination);
5756      case -1760554218:
5757        /* encodeRequestUrl */ return new Property("encodeRequestUrl", "boolean",
5758            "Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.",
5759            0, 1, encodeRequestUrl);
5760      case -1077554975:
5761        /* method */ return new Property("method", "code",
5762            "The HTTP method the test engine MUST use for this operation regardless of any other operation details.", 0,
5763            1, method);
5764      case -1008619738:
5765        /* origin */ return new Property("origin", "integer",
5766            "The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.",
5767            0, 1, origin);
5768      case -995427962:
5769        /* params */ return new Property("params", "string",
5770            "Path plus parameters after [type].  Used to set parts of the request URL explicitly.", 0, 1, params);
5771      case 1074158076:
5772        /* requestHeader */ return new Property("requestHeader", "",
5773            "Header elements would be used to set HTTP headers.", 0, java.lang.Integer.MAX_VALUE, requestHeader);
5774      case 693933066:
5775        /* requestId */ return new Property("requestId", "id", "The fixture id (maybe new) to map to the request.", 0,
5776            1, requestId);
5777      case -633138884:
5778        /* responseId */ return new Property("responseId", "id", "The fixture id (maybe new) to map to the response.",
5779            0, 1, responseId);
5780      case 1746327190:
5781        /* sourceId */ return new Property("sourceId", "id",
5782            "The id of the fixture used as the body of a PUT or POST request.", 0, 1, sourceId);
5783      case -441951604:
5784        /* targetId */ return new Property("targetId", "id",
5785            "Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.", 0, 1, targetId);
5786      case 116079:
5787        /* url */ return new Property("url", "string", "Complete request URL.", 0, 1, url);
5788      default:
5789        return super.getNamedProperty(_hash, _name, _checkValid);
5790      }
5791
5792    }
5793
5794    @Override
5795    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
5796      switch (hash) {
5797      case 3575610:
5798        /* type */ return this.type == null ? new Base[0] : new Base[] { this.type }; // Coding
5799      case -341064690:
5800        /* resource */ return this.resource == null ? new Base[0] : new Base[] { this.resource }; // CodeType
5801      case 102727412:
5802        /* label */ return this.label == null ? new Base[0] : new Base[] { this.label }; // StringType
5803      case -1724546052:
5804        /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // StringType
5805      case -1423461112:
5806        /* accept */ return this.accept == null ? new Base[0] : new Base[] { this.accept }; // CodeType
5807      case -389131437:
5808        /* contentType */ return this.contentType == null ? new Base[0] : new Base[] { this.contentType }; // CodeType
5809      case -1429847026:
5810        /* destination */ return this.destination == null ? new Base[0] : new Base[] { this.destination }; // IntegerType
5811      case -1760554218:
5812        /* encodeRequestUrl */ return this.encodeRequestUrl == null ? new Base[0]
5813            : new Base[] { this.encodeRequestUrl }; // BooleanType
5814      case -1077554975:
5815        /* method */ return this.method == null ? new Base[0] : new Base[] { this.method }; // Enumeration<TestScriptRequestMethodCode>
5816      case -1008619738:
5817        /* origin */ return this.origin == null ? new Base[0] : new Base[] { this.origin }; // IntegerType
5818      case -995427962:
5819        /* params */ return this.params == null ? new Base[0] : new Base[] { this.params }; // StringType
5820      case 1074158076:
5821        /* requestHeader */ return this.requestHeader == null ? new Base[0]
5822            : this.requestHeader.toArray(new Base[this.requestHeader.size()]); // SetupActionOperationRequestHeaderComponent
5823      case 693933066:
5824        /* requestId */ return this.requestId == null ? new Base[0] : new Base[] { this.requestId }; // IdType
5825      case -633138884:
5826        /* responseId */ return this.responseId == null ? new Base[0] : new Base[] { this.responseId }; // IdType
5827      case 1746327190:
5828        /* sourceId */ return this.sourceId == null ? new Base[0] : new Base[] { this.sourceId }; // IdType
5829      case -441951604:
5830        /* targetId */ return this.targetId == null ? new Base[0] : new Base[] { this.targetId }; // IdType
5831      case 116079:
5832        /* url */ return this.url == null ? new Base[0] : new Base[] { this.url }; // StringType
5833      default:
5834        return super.getProperty(hash, name, checkValid);
5835      }
5836
5837    }
5838
5839    @Override
5840    public Base setProperty(int hash, String name, Base value) throws FHIRException {
5841      switch (hash) {
5842      case 3575610: // type
5843        this.type = castToCoding(value); // Coding
5844        return value;
5845      case -341064690: // resource
5846        this.resource = castToCode(value); // CodeType
5847        return value;
5848      case 102727412: // label
5849        this.label = castToString(value); // StringType
5850        return value;
5851      case -1724546052: // description
5852        this.description = castToString(value); // StringType
5853        return value;
5854      case -1423461112: // accept
5855        this.accept = castToCode(value); // CodeType
5856        return value;
5857      case -389131437: // contentType
5858        this.contentType = castToCode(value); // CodeType
5859        return value;
5860      case -1429847026: // destination
5861        this.destination = castToInteger(value); // IntegerType
5862        return value;
5863      case -1760554218: // encodeRequestUrl
5864        this.encodeRequestUrl = castToBoolean(value); // BooleanType
5865        return value;
5866      case -1077554975: // method
5867        value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value));
5868        this.method = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode>
5869        return value;
5870      case -1008619738: // origin
5871        this.origin = castToInteger(value); // IntegerType
5872        return value;
5873      case -995427962: // params
5874        this.params = castToString(value); // StringType
5875        return value;
5876      case 1074158076: // requestHeader
5877        this.getRequestHeader().add((SetupActionOperationRequestHeaderComponent) value); // SetupActionOperationRequestHeaderComponent
5878        return value;
5879      case 693933066: // requestId
5880        this.requestId = castToId(value); // IdType
5881        return value;
5882      case -633138884: // responseId
5883        this.responseId = castToId(value); // IdType
5884        return value;
5885      case 1746327190: // sourceId
5886        this.sourceId = castToId(value); // IdType
5887        return value;
5888      case -441951604: // targetId
5889        this.targetId = castToId(value); // IdType
5890        return value;
5891      case 116079: // url
5892        this.url = castToString(value); // StringType
5893        return value;
5894      default:
5895        return super.setProperty(hash, name, value);
5896      }
5897
5898    }
5899
5900    @Override
5901    public Base setProperty(String name, Base value) throws FHIRException {
5902      if (name.equals("type")) {
5903        this.type = castToCoding(value); // Coding
5904      } else if (name.equals("resource")) {
5905        this.resource = castToCode(value); // CodeType
5906      } else if (name.equals("label")) {
5907        this.label = castToString(value); // StringType
5908      } else if (name.equals("description")) {
5909        this.description = castToString(value); // StringType
5910      } else if (name.equals("accept")) {
5911        this.accept = castToCode(value); // CodeType
5912      } else if (name.equals("contentType")) {
5913        this.contentType = castToCode(value); // CodeType
5914      } else if (name.equals("destination")) {
5915        this.destination = castToInteger(value); // IntegerType
5916      } else if (name.equals("encodeRequestUrl")) {
5917        this.encodeRequestUrl = castToBoolean(value); // BooleanType
5918      } else if (name.equals("method")) {
5919        value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value));
5920        this.method = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode>
5921      } else if (name.equals("origin")) {
5922        this.origin = castToInteger(value); // IntegerType
5923      } else if (name.equals("params")) {
5924        this.params = castToString(value); // StringType
5925      } else if (name.equals("requestHeader")) {
5926        this.getRequestHeader().add((SetupActionOperationRequestHeaderComponent) value);
5927      } else if (name.equals("requestId")) {
5928        this.requestId = castToId(value); // IdType
5929      } else if (name.equals("responseId")) {
5930        this.responseId = castToId(value); // IdType
5931      } else if (name.equals("sourceId")) {
5932        this.sourceId = castToId(value); // IdType
5933      } else if (name.equals("targetId")) {
5934        this.targetId = castToId(value); // IdType
5935      } else if (name.equals("url")) {
5936        this.url = castToString(value); // StringType
5937      } else
5938        return super.setProperty(name, value);
5939      return value;
5940    }
5941
5942  @Override
5943  public void removeChild(String name, Base value) throws FHIRException {
5944      if (name.equals("type")) {
5945        this.type = null;
5946      } else if (name.equals("resource")) {
5947        this.resource = null;
5948      } else if (name.equals("label")) {
5949        this.label = null;
5950      } else if (name.equals("description")) {
5951        this.description = null;
5952      } else if (name.equals("accept")) {
5953        this.accept = null;
5954      } else if (name.equals("contentType")) {
5955        this.contentType = null;
5956      } else if (name.equals("destination")) {
5957        this.destination = null;
5958      } else if (name.equals("encodeRequestUrl")) {
5959        this.encodeRequestUrl = null;
5960      } else if (name.equals("method")) {
5961        this.method = null;
5962      } else if (name.equals("origin")) {
5963        this.origin = null;
5964      } else if (name.equals("params")) {
5965        this.params = null;
5966      } else if (name.equals("requestHeader")) {
5967        this.getRequestHeader().remove((SetupActionOperationRequestHeaderComponent) value);
5968      } else if (name.equals("requestId")) {
5969        this.requestId = null;
5970      } else if (name.equals("responseId")) {
5971        this.responseId = null;
5972      } else if (name.equals("sourceId")) {
5973        this.sourceId = null;
5974      } else if (name.equals("targetId")) {
5975        this.targetId = null;
5976      } else if (name.equals("url")) {
5977        this.url = null;
5978      } else
5979        super.removeChild(name, value);
5980      
5981    }
5982
5983    @Override
5984    public Base makeProperty(int hash, String name) throws FHIRException {
5985      switch (hash) {
5986      case 3575610:
5987        return getType();
5988      case -341064690:
5989        return getResourceElement();
5990      case 102727412:
5991        return getLabelElement();
5992      case -1724546052:
5993        return getDescriptionElement();
5994      case -1423461112:
5995        return getAcceptElement();
5996      case -389131437:
5997        return getContentTypeElement();
5998      case -1429847026:
5999        return getDestinationElement();
6000      case -1760554218:
6001        return getEncodeRequestUrlElement();
6002      case -1077554975:
6003        return getMethodElement();
6004      case -1008619738:
6005        return getOriginElement();
6006      case -995427962:
6007        return getParamsElement();
6008      case 1074158076:
6009        return addRequestHeader();
6010      case 693933066:
6011        return getRequestIdElement();
6012      case -633138884:
6013        return getResponseIdElement();
6014      case 1746327190:
6015        return getSourceIdElement();
6016      case -441951604:
6017        return getTargetIdElement();
6018      case 116079:
6019        return getUrlElement();
6020      default:
6021        return super.makeProperty(hash, name);
6022      }
6023
6024    }
6025
6026    @Override
6027    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
6028      switch (hash) {
6029      case 3575610:
6030        /* type */ return new String[] { "Coding" };
6031      case -341064690:
6032        /* resource */ return new String[] { "code" };
6033      case 102727412:
6034        /* label */ return new String[] { "string" };
6035      case -1724546052:
6036        /* description */ return new String[] { "string" };
6037      case -1423461112:
6038        /* accept */ return new String[] { "code" };
6039      case -389131437:
6040        /* contentType */ return new String[] { "code" };
6041      case -1429847026:
6042        /* destination */ return new String[] { "integer" };
6043      case -1760554218:
6044        /* encodeRequestUrl */ return new String[] { "boolean" };
6045      case -1077554975:
6046        /* method */ return new String[] { "code" };
6047      case -1008619738:
6048        /* origin */ return new String[] { "integer" };
6049      case -995427962:
6050        /* params */ return new String[] { "string" };
6051      case 1074158076:
6052        /* requestHeader */ return new String[] {};
6053      case 693933066:
6054        /* requestId */ return new String[] { "id" };
6055      case -633138884:
6056        /* responseId */ return new String[] { "id" };
6057      case 1746327190:
6058        /* sourceId */ return new String[] { "id" };
6059      case -441951604:
6060        /* targetId */ return new String[] { "id" };
6061      case 116079:
6062        /* url */ return new String[] { "string" };
6063      default:
6064        return super.getTypesForProperty(hash, name);
6065      }
6066
6067    }
6068
6069    @Override
6070    public Base addChild(String name) throws FHIRException {
6071      if (name.equals("type")) {
6072        this.type = new Coding();
6073        return this.type;
6074      } else if (name.equals("resource")) {
6075        throw new FHIRException("Cannot call addChild on a singleton property TestScript.resource");
6076      } else if (name.equals("label")) {
6077        throw new FHIRException("Cannot call addChild on a singleton property TestScript.label");
6078      } else if (name.equals("description")) {
6079        throw new FHIRException("Cannot call addChild on a singleton property TestScript.description");
6080      } else if (name.equals("accept")) {
6081        throw new FHIRException("Cannot call addChild on a singleton property TestScript.accept");
6082      } else if (name.equals("contentType")) {
6083        throw new FHIRException("Cannot call addChild on a singleton property TestScript.contentType");
6084      } else if (name.equals("destination")) {
6085        throw new FHIRException("Cannot call addChild on a singleton property TestScript.destination");
6086      } else if (name.equals("encodeRequestUrl")) {
6087        throw new FHIRException("Cannot call addChild on a singleton property TestScript.encodeRequestUrl");
6088      } else if (name.equals("method")) {
6089        throw new FHIRException("Cannot call addChild on a singleton property TestScript.method");
6090      } else if (name.equals("origin")) {
6091        throw new FHIRException("Cannot call addChild on a singleton property TestScript.origin");
6092      } else if (name.equals("params")) {
6093        throw new FHIRException("Cannot call addChild on a singleton property TestScript.params");
6094      } else if (name.equals("requestHeader")) {
6095        return addRequestHeader();
6096      } else if (name.equals("requestId")) {
6097        throw new FHIRException("Cannot call addChild on a singleton property TestScript.requestId");
6098      } else if (name.equals("responseId")) {
6099        throw new FHIRException("Cannot call addChild on a singleton property TestScript.responseId");
6100      } else if (name.equals("sourceId")) {
6101        throw new FHIRException("Cannot call addChild on a singleton property TestScript.sourceId");
6102      } else if (name.equals("targetId")) {
6103        throw new FHIRException("Cannot call addChild on a singleton property TestScript.targetId");
6104      } else if (name.equals("url")) {
6105        throw new FHIRException("Cannot call addChild on a singleton property TestScript.url");
6106      } else
6107        return super.addChild(name);
6108    }
6109
6110    public SetupActionOperationComponent copy() {
6111      SetupActionOperationComponent dst = new SetupActionOperationComponent();
6112      copyValues(dst);
6113      return dst;
6114    }
6115
6116    public void copyValues(SetupActionOperationComponent dst) {
6117      super.copyValues(dst);
6118      dst.type = type == null ? null : type.copy();
6119      dst.resource = resource == null ? null : resource.copy();
6120      dst.label = label == null ? null : label.copy();
6121      dst.description = description == null ? null : description.copy();
6122      dst.accept = accept == null ? null : accept.copy();
6123      dst.contentType = contentType == null ? null : contentType.copy();
6124      dst.destination = destination == null ? null : destination.copy();
6125      dst.encodeRequestUrl = encodeRequestUrl == null ? null : encodeRequestUrl.copy();
6126      dst.method = method == null ? null : method.copy();
6127      dst.origin = origin == null ? null : origin.copy();
6128      dst.params = params == null ? null : params.copy();
6129      if (requestHeader != null) {
6130        dst.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
6131        for (SetupActionOperationRequestHeaderComponent i : requestHeader)
6132          dst.requestHeader.add(i.copy());
6133      }
6134      ;
6135      dst.requestId = requestId == null ? null : requestId.copy();
6136      dst.responseId = responseId == null ? null : responseId.copy();
6137      dst.sourceId = sourceId == null ? null : sourceId.copy();
6138      dst.targetId = targetId == null ? null : targetId.copy();
6139      dst.url = url == null ? null : url.copy();
6140    }
6141
6142    @Override
6143    public boolean equalsDeep(Base other_) {
6144      if (!super.equalsDeep(other_))
6145        return false;
6146      if (!(other_ instanceof SetupActionOperationComponent))
6147        return false;
6148      SetupActionOperationComponent o = (SetupActionOperationComponent) other_;
6149      return compareDeep(type, o.type, true) && compareDeep(resource, o.resource, true)
6150          && compareDeep(label, o.label, true) && compareDeep(description, o.description, true)
6151          && compareDeep(accept, o.accept, true) && compareDeep(contentType, o.contentType, true)
6152          && compareDeep(destination, o.destination, true) && compareDeep(encodeRequestUrl, o.encodeRequestUrl, true)
6153          && compareDeep(method, o.method, true) && compareDeep(origin, o.origin, true)
6154          && compareDeep(params, o.params, true) && compareDeep(requestHeader, o.requestHeader, true)
6155          && compareDeep(requestId, o.requestId, true) && compareDeep(responseId, o.responseId, true)
6156          && compareDeep(sourceId, o.sourceId, true) && compareDeep(targetId, o.targetId, true)
6157          && compareDeep(url, o.url, true);
6158    }
6159
6160    @Override
6161    public boolean equalsShallow(Base other_) {
6162      if (!super.equalsShallow(other_))
6163        return false;
6164      if (!(other_ instanceof SetupActionOperationComponent))
6165        return false;
6166      SetupActionOperationComponent o = (SetupActionOperationComponent) other_;
6167      return compareValues(resource, o.resource, true) && compareValues(label, o.label, true)
6168          && compareValues(description, o.description, true) && compareValues(accept, o.accept, true)
6169          && compareValues(contentType, o.contentType, true) && compareValues(destination, o.destination, true)
6170          && compareValues(encodeRequestUrl, o.encodeRequestUrl, true) && compareValues(method, o.method, true)
6171          && compareValues(origin, o.origin, true) && compareValues(params, o.params, true)
6172          && compareValues(requestId, o.requestId, true) && compareValues(responseId, o.responseId, true)
6173          && compareValues(sourceId, o.sourceId, true) && compareValues(targetId, o.targetId, true)
6174          && compareValues(url, o.url, true);
6175    }
6176
6177    public boolean isEmpty() {
6178      return super.isEmpty()
6179          && ca.uhn.fhir.util.ElementUtil.isEmpty(type, resource, label, description, accept, contentType, destination,
6180              encodeRequestUrl, method, origin, params, requestHeader, requestId, responseId, sourceId, targetId, url);
6181    }
6182
6183    public String fhirType() {
6184      return "TestScript.setup.action.operation";
6185
6186    }
6187
6188  }
6189
6190  @Block()
6191  public static class SetupActionOperationRequestHeaderComponent extends BackboneElement
6192      implements IBaseBackboneElement {
6193    /**
6194     * The HTTP header field e.g. "Accept".
6195     */
6196    @Child(name = "field", type = { StringType.class }, order = 1, min = 1, max = 1, modifier = false, summary = false)
6197    @Description(shortDefinition = "HTTP header field name", formalDefinition = "The HTTP header field e.g. \"Accept\".")
6198    protected StringType field;
6199
6200    /**
6201     * The value of the header e.g. "application/fhir+xml".
6202     */
6203    @Child(name = "value", type = { StringType.class }, order = 2, min = 1, max = 1, modifier = false, summary = false)
6204    @Description(shortDefinition = "HTTP headerfield value", formalDefinition = "The value of the header e.g. \"application/fhir+xml\".")
6205    protected StringType value;
6206
6207    private static final long serialVersionUID = 274395337L;
6208
6209    /**
6210     * Constructor
6211     */
6212    public SetupActionOperationRequestHeaderComponent() {
6213      super();
6214    }
6215
6216    /**
6217     * Constructor
6218     */
6219    public SetupActionOperationRequestHeaderComponent(StringType field, StringType value) {
6220      super();
6221      this.field = field;
6222      this.value = value;
6223    }
6224
6225    /**
6226     * @return {@link #field} (The HTTP header field e.g. "Accept".). This is the
6227     *         underlying object with id, value and extensions. The accessor
6228     *         "getField" gives direct access to the value
6229     */
6230    public StringType getFieldElement() {
6231      if (this.field == null)
6232        if (Configuration.errorOnAutoCreate())
6233          throw new Error("Attempt to auto-create SetupActionOperationRequestHeaderComponent.field");
6234        else if (Configuration.doAutoCreate())
6235          this.field = new StringType(); // bb
6236      return this.field;
6237    }
6238
6239    public boolean hasFieldElement() {
6240      return this.field != null && !this.field.isEmpty();
6241    }
6242
6243    public boolean hasField() {
6244      return this.field != null && !this.field.isEmpty();
6245    }
6246
6247    /**
6248     * @param value {@link #field} (The HTTP header field e.g. "Accept".). This is
6249     *              the underlying object with id, value and extensions. The
6250     *              accessor "getField" gives direct access to the value
6251     */
6252    public SetupActionOperationRequestHeaderComponent setFieldElement(StringType value) {
6253      this.field = value;
6254      return this;
6255    }
6256
6257    /**
6258     * @return The HTTP header field e.g. "Accept".
6259     */
6260    public String getField() {
6261      return this.field == null ? null : this.field.getValue();
6262    }
6263
6264    /**
6265     * @param value The HTTP header field e.g. "Accept".
6266     */
6267    public SetupActionOperationRequestHeaderComponent setField(String value) {
6268      if (this.field == null)
6269        this.field = new StringType();
6270      this.field.setValue(value);
6271      return this;
6272    }
6273
6274    /**
6275     * @return {@link #value} (The value of the header e.g.
6276     *         "application/fhir+xml".). This is the underlying object with id,
6277     *         value and extensions. The accessor "getValue" gives direct access to
6278     *         the value
6279     */
6280    public StringType getValueElement() {
6281      if (this.value == null)
6282        if (Configuration.errorOnAutoCreate())
6283          throw new Error("Attempt to auto-create SetupActionOperationRequestHeaderComponent.value");
6284        else if (Configuration.doAutoCreate())
6285          this.value = new StringType(); // bb
6286      return this.value;
6287    }
6288
6289    public boolean hasValueElement() {
6290      return this.value != null && !this.value.isEmpty();
6291    }
6292
6293    public boolean hasValue() {
6294      return this.value != null && !this.value.isEmpty();
6295    }
6296
6297    /**
6298     * @param value {@link #value} (The value of the header e.g.
6299     *              "application/fhir+xml".). This is the underlying object with id,
6300     *              value and extensions. The accessor "getValue" gives direct
6301     *              access to the value
6302     */
6303    public SetupActionOperationRequestHeaderComponent setValueElement(StringType value) {
6304      this.value = value;
6305      return this;
6306    }
6307
6308    /**
6309     * @return The value of the header e.g. "application/fhir+xml".
6310     */
6311    public String getValue() {
6312      return this.value == null ? null : this.value.getValue();
6313    }
6314
6315    /**
6316     * @param value The value of the header e.g. "application/fhir+xml".
6317     */
6318    public SetupActionOperationRequestHeaderComponent setValue(String value) {
6319      if (this.value == null)
6320        this.value = new StringType();
6321      this.value.setValue(value);
6322      return this;
6323    }
6324
6325    protected void listChildren(List<Property> children) {
6326      super.listChildren(children);
6327      children.add(new Property("field", "string", "The HTTP header field e.g. \"Accept\".", 0, 1, field));
6328      children
6329          .add(new Property("value", "string", "The value of the header e.g. \"application/fhir+xml\".", 0, 1, value));
6330    }
6331
6332    @Override
6333    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
6334      switch (_hash) {
6335      case 97427706:
6336        /* field */ return new Property("field", "string", "The HTTP header field e.g. \"Accept\".", 0, 1, field);
6337      case 111972721:
6338        /* value */ return new Property("value", "string", "The value of the header e.g. \"application/fhir+xml\".", 0,
6339            1, value);
6340      default:
6341        return super.getNamedProperty(_hash, _name, _checkValid);
6342      }
6343
6344    }
6345
6346    @Override
6347    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
6348      switch (hash) {
6349      case 97427706:
6350        /* field */ return this.field == null ? new Base[0] : new Base[] { this.field }; // StringType
6351      case 111972721:
6352        /* value */ return this.value == null ? new Base[0] : new Base[] { this.value }; // StringType
6353      default:
6354        return super.getProperty(hash, name, checkValid);
6355      }
6356
6357    }
6358
6359    @Override
6360    public Base setProperty(int hash, String name, Base value) throws FHIRException {
6361      switch (hash) {
6362      case 97427706: // field
6363        this.field = castToString(value); // StringType
6364        return value;
6365      case 111972721: // value
6366        this.value = castToString(value); // StringType
6367        return value;
6368      default:
6369        return super.setProperty(hash, name, value);
6370      }
6371
6372    }
6373
6374    @Override
6375    public Base setProperty(String name, Base value) throws FHIRException {
6376      if (name.equals("field")) {
6377        this.field = castToString(value); // StringType
6378      } else if (name.equals("value")) {
6379        this.value = castToString(value); // StringType
6380      } else
6381        return super.setProperty(name, value);
6382      return value;
6383    }
6384
6385  @Override
6386  public void removeChild(String name, Base value) throws FHIRException {
6387      if (name.equals("field")) {
6388        this.field = null;
6389      } else if (name.equals("value")) {
6390        this.value = null;
6391      } else
6392        super.removeChild(name, value);
6393      
6394    }
6395
6396    @Override
6397    public Base makeProperty(int hash, String name) throws FHIRException {
6398      switch (hash) {
6399      case 97427706:
6400        return getFieldElement();
6401      case 111972721:
6402        return getValueElement();
6403      default:
6404        return super.makeProperty(hash, name);
6405      }
6406
6407    }
6408
6409    @Override
6410    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
6411      switch (hash) {
6412      case 97427706:
6413        /* field */ return new String[] { "string" };
6414      case 111972721:
6415        /* value */ return new String[] { "string" };
6416      default:
6417        return super.getTypesForProperty(hash, name);
6418      }
6419
6420    }
6421
6422    @Override
6423    public Base addChild(String name) throws FHIRException {
6424      if (name.equals("field")) {
6425        throw new FHIRException("Cannot call addChild on a singleton property TestScript.field");
6426      } else if (name.equals("value")) {
6427        throw new FHIRException("Cannot call addChild on a singleton property TestScript.value");
6428      } else
6429        return super.addChild(name);
6430    }
6431
6432    public SetupActionOperationRequestHeaderComponent copy() {
6433      SetupActionOperationRequestHeaderComponent dst = new SetupActionOperationRequestHeaderComponent();
6434      copyValues(dst);
6435      return dst;
6436    }
6437
6438    public void copyValues(SetupActionOperationRequestHeaderComponent dst) {
6439      super.copyValues(dst);
6440      dst.field = field == null ? null : field.copy();
6441      dst.value = value == null ? null : value.copy();
6442    }
6443
6444    @Override
6445    public boolean equalsDeep(Base other_) {
6446      if (!super.equalsDeep(other_))
6447        return false;
6448      if (!(other_ instanceof SetupActionOperationRequestHeaderComponent))
6449        return false;
6450      SetupActionOperationRequestHeaderComponent o = (SetupActionOperationRequestHeaderComponent) other_;
6451      return compareDeep(field, o.field, true) && compareDeep(value, o.value, true);
6452    }
6453
6454    @Override
6455    public boolean equalsShallow(Base other_) {
6456      if (!super.equalsShallow(other_))
6457        return false;
6458      if (!(other_ instanceof SetupActionOperationRequestHeaderComponent))
6459        return false;
6460      SetupActionOperationRequestHeaderComponent o = (SetupActionOperationRequestHeaderComponent) other_;
6461      return compareValues(field, o.field, true) && compareValues(value, o.value, true);
6462    }
6463
6464    public boolean isEmpty() {
6465      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(field, value);
6466    }
6467
6468    public String fhirType() {
6469      return "TestScript.setup.action.operation.requestHeader";
6470
6471    }
6472
6473  }
6474
6475  @Block()
6476  public static class SetupActionAssertComponent extends BackboneElement implements IBaseBackboneElement {
6477    /**
6478     * The label would be used for tracking/logging purposes by test engines.
6479     */
6480    @Child(name = "label", type = { StringType.class }, order = 1, min = 0, max = 1, modifier = false, summary = false)
6481    @Description(shortDefinition = "Tracking/logging assertion label", formalDefinition = "The label would be used for tracking/logging purposes by test engines.")
6482    protected StringType label;
6483
6484    /**
6485     * The description would be used by test engines for tracking and reporting
6486     * purposes.
6487     */
6488    @Child(name = "description", type = {
6489        StringType.class }, order = 2, min = 0, max = 1, modifier = false, summary = false)
6490    @Description(shortDefinition = "Tracking/reporting assertion description", formalDefinition = "The description would be used by test engines for tracking and reporting purposes.")
6491    protected StringType description;
6492
6493    /**
6494     * The direction to use for the assertion.
6495     */
6496    @Child(name = "direction", type = {
6497        CodeType.class }, order = 3, min = 0, max = 1, modifier = false, summary = false)
6498    @Description(shortDefinition = "response | request", formalDefinition = "The direction to use for the assertion.")
6499    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/assert-direction-codes")
6500    protected Enumeration<AssertionDirectionType> direction;
6501
6502    /**
6503     * Id of the source fixture used as the contents to be evaluated by either the
6504     * "source/expression" or "sourceId/path" definition.
6505     */
6506    @Child(name = "compareToSourceId", type = {
6507        StringType.class }, order = 4, min = 0, max = 1, modifier = false, summary = false)
6508    @Description(shortDefinition = "Id of the source fixture to be evaluated", formalDefinition = "Id of the source fixture used as the contents to be evaluated by either the \"source/expression\" or \"sourceId/path\" definition.")
6509    protected StringType compareToSourceId;
6510
6511    /**
6512     * The FHIRPath expression to evaluate against the source fixture. When
6513     * compareToSourceId is defined, either compareToSourceExpression or
6514     * compareToSourcePath must be defined, but not both.
6515     */
6516    @Child(name = "compareToSourceExpression", type = {
6517        StringType.class }, order = 5, min = 0, max = 1, modifier = false, summary = false)
6518    @Description(shortDefinition = "The FHIRPath expression to evaluate against the source fixture", formalDefinition = "The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.")
6519    protected StringType compareToSourceExpression;
6520
6521    /**
6522     * XPath or JSONPath expression to evaluate against the source fixture. When
6523     * compareToSourceId is defined, either compareToSourceExpression or
6524     * compareToSourcePath must be defined, but not both.
6525     */
6526    @Child(name = "compareToSourcePath", type = {
6527        StringType.class }, order = 6, min = 0, max = 1, modifier = false, summary = false)
6528    @Description(shortDefinition = "XPath or JSONPath expression to evaluate against the source fixture", formalDefinition = "XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.")
6529    protected StringType compareToSourcePath;
6530
6531    /**
6532     * The mime-type contents to compare against the request or response message
6533     * 'Content-Type' header.
6534     */
6535    @Child(name = "contentType", type = {
6536        CodeType.class }, order = 7, min = 0, max = 1, modifier = false, summary = false)
6537    @Description(shortDefinition = "Mime type to compare against the 'Content-Type' header", formalDefinition = "The mime-type contents to compare against the request or response message 'Content-Type' header.")
6538    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/mimetypes")
6539    protected CodeType contentType;
6540
6541    /**
6542     * The FHIRPath expression to be evaluated against the request or response
6543     * message contents - HTTP headers and payload.
6544     */
6545    @Child(name = "expression", type = {
6546        StringType.class }, order = 8, min = 0, max = 1, modifier = false, summary = false)
6547    @Description(shortDefinition = "The FHIRPath expression to be evaluated", formalDefinition = "The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.")
6548    protected StringType expression;
6549
6550    /**
6551     * The HTTP header field name e.g. 'Location'.
6552     */
6553    @Child(name = "headerField", type = {
6554        StringType.class }, order = 9, min = 0, max = 1, modifier = false, summary = false)
6555    @Description(shortDefinition = "HTTP header field name", formalDefinition = "The HTTP header field name e.g. 'Location'.")
6556    protected StringType headerField;
6557
6558    /**
6559     * The ID of a fixture. Asserts that the response contains at a minimum the
6560     * fixture specified by minimumId.
6561     */
6562    @Child(name = "minimumId", type = {
6563        StringType.class }, order = 10, min = 0, max = 1, modifier = false, summary = false)
6564    @Description(shortDefinition = "Fixture Id of minimum content resource", formalDefinition = "The ID of a fixture.  Asserts that the response contains at a minimum the fixture specified by minimumId.")
6565    protected StringType minimumId;
6566
6567    /**
6568     * Whether or not the test execution performs validation on the bundle
6569     * navigation links.
6570     */
6571    @Child(name = "navigationLinks", type = {
6572        BooleanType.class }, order = 11, min = 0, max = 1, modifier = false, summary = false)
6573    @Description(shortDefinition = "Perform validation on navigation links?", formalDefinition = "Whether or not the test execution performs validation on the bundle navigation links.")
6574    protected BooleanType navigationLinks;
6575
6576    /**
6577     * The operator type defines the conditional behavior of the assert. If not
6578     * defined, the default is equals.
6579     */
6580    @Child(name = "operator", type = {
6581        CodeType.class }, order = 12, min = 0, max = 1, modifier = false, summary = false)
6582    @Description(shortDefinition = "equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval", formalDefinition = "The operator type defines the conditional behavior of the assert. If not defined, the default is equals.")
6583    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/assert-operator-codes")
6584    protected Enumeration<AssertionOperatorType> operator;
6585
6586    /**
6587     * The XPath or JSONPath expression to be evaluated against the fixture
6588     * representing the response received from server.
6589     */
6590    @Child(name = "path", type = { StringType.class }, order = 13, min = 0, max = 1, modifier = false, summary = false)
6591    @Description(shortDefinition = "XPath or JSONPath expression", formalDefinition = "The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.")
6592    protected StringType path;
6593
6594    /**
6595     * The request method or HTTP operation code to compare against that used by the
6596     * client system under test.
6597     */
6598    @Child(name = "requestMethod", type = {
6599        CodeType.class }, order = 14, min = 0, max = 1, modifier = false, summary = false)
6600    @Description(shortDefinition = "delete | get | options | patch | post | put | head", formalDefinition = "The request method or HTTP operation code to compare against that used by the client system under test.")
6601    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/http-operations")
6602    protected Enumeration<TestScriptRequestMethodCode> requestMethod;
6603
6604    /**
6605     * The value to use in a comparison against the request URL path string.
6606     */
6607    @Child(name = "requestURL", type = {
6608        StringType.class }, order = 15, min = 0, max = 1, modifier = false, summary = false)
6609    @Description(shortDefinition = "Request URL comparison value", formalDefinition = "The value to use in a comparison against the request URL path string.")
6610    protected StringType requestURL;
6611
6612    /**
6613     * The type of the resource. See http://build.fhir.org/resourcelist.html.
6614     */
6615    @Child(name = "resource", type = {
6616        CodeType.class }, order = 16, min = 0, max = 1, modifier = false, summary = false)
6617    @Description(shortDefinition = "Resource type", formalDefinition = "The type of the resource.  See http://build.fhir.org/resourcelist.html.")
6618    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/defined-types")
6619    protected CodeType resource;
6620
6621    /**
6622     * okay | created | noContent | notModified | bad | forbidden | notFound |
6623     * methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.
6624     */
6625    @Child(name = "response", type = {
6626        CodeType.class }, order = 17, min = 0, max = 1, modifier = false, summary = false)
6627    @Description(shortDefinition = "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable", formalDefinition = "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.")
6628    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/assert-response-code-types")
6629    protected Enumeration<AssertionResponseTypes> response;
6630
6631    /**
6632     * The value of the HTTP response code to be tested.
6633     */
6634    @Child(name = "responseCode", type = {
6635        StringType.class }, order = 18, min = 0, max = 1, modifier = false, summary = false)
6636    @Description(shortDefinition = "HTTP response code to test", formalDefinition = "The value of the HTTP response code to be tested.")
6637    protected StringType responseCode;
6638
6639    /**
6640     * Fixture to evaluate the XPath/JSONPath expression or the headerField against.
6641     */
6642    @Child(name = "sourceId", type = { IdType.class }, order = 19, min = 0, max = 1, modifier = false, summary = false)
6643    @Description(shortDefinition = "Fixture Id of source expression or headerField", formalDefinition = "Fixture to evaluate the XPath/JSONPath expression or the headerField  against.")
6644    protected IdType sourceId;
6645
6646    /**
6647     * The ID of the Profile to validate against.
6648     */
6649    @Child(name = "validateProfileId", type = {
6650        IdType.class }, order = 20, min = 0, max = 1, modifier = false, summary = false)
6651    @Description(shortDefinition = "Profile Id of validation profile reference", formalDefinition = "The ID of the Profile to validate against.")
6652    protected IdType validateProfileId;
6653
6654    /**
6655     * The value to compare to.
6656     */
6657    @Child(name = "value", type = { StringType.class }, order = 21, min = 0, max = 1, modifier = false, summary = false)
6658    @Description(shortDefinition = "The value to compare to", formalDefinition = "The value to compare to.")
6659    protected StringType value;
6660
6661    /**
6662     * Whether or not the test execution will produce a warning only on error for
6663     * this assert.
6664     */
6665    @Child(name = "warningOnly", type = {
6666        BooleanType.class }, order = 22, min = 1, max = 1, modifier = false, summary = false)
6667    @Description(shortDefinition = "Will this assert produce a warning only on error?", formalDefinition = "Whether or not the test execution will produce a warning only on error for this assert.")
6668    protected BooleanType warningOnly;
6669
6670    private static final long serialVersionUID = -1086518778L;
6671
6672    /**
6673     * Constructor
6674     */
6675    public SetupActionAssertComponent() {
6676      super();
6677    }
6678
6679    /**
6680     * Constructor
6681     */
6682    public SetupActionAssertComponent(BooleanType warningOnly) {
6683      super();
6684      this.warningOnly = warningOnly;
6685    }
6686
6687    /**
6688     * @return {@link #label} (The label would be used for tracking/logging purposes
6689     *         by test engines.). This is the underlying object with id, value and
6690     *         extensions. The accessor "getLabel" gives direct access to the value
6691     */
6692    public StringType getLabelElement() {
6693      if (this.label == null)
6694        if (Configuration.errorOnAutoCreate())
6695          throw new Error("Attempt to auto-create SetupActionAssertComponent.label");
6696        else if (Configuration.doAutoCreate())
6697          this.label = new StringType(); // bb
6698      return this.label;
6699    }
6700
6701    public boolean hasLabelElement() {
6702      return this.label != null && !this.label.isEmpty();
6703    }
6704
6705    public boolean hasLabel() {
6706      return this.label != null && !this.label.isEmpty();
6707    }
6708
6709    /**
6710     * @param value {@link #label} (The label would be used for tracking/logging
6711     *              purposes by test engines.). This is the underlying object with
6712     *              id, value and extensions. The accessor "getLabel" gives direct
6713     *              access to the value
6714     */
6715    public SetupActionAssertComponent setLabelElement(StringType value) {
6716      this.label = value;
6717      return this;
6718    }
6719
6720    /**
6721     * @return The label would be used for tracking/logging purposes by test
6722     *         engines.
6723     */
6724    public String getLabel() {
6725      return this.label == null ? null : this.label.getValue();
6726    }
6727
6728    /**
6729     * @param value The label would be used for tracking/logging purposes by test
6730     *              engines.
6731     */
6732    public SetupActionAssertComponent setLabel(String value) {
6733      if (Utilities.noString(value))
6734        this.label = null;
6735      else {
6736        if (this.label == null)
6737          this.label = new StringType();
6738        this.label.setValue(value);
6739      }
6740      return this;
6741    }
6742
6743    /**
6744     * @return {@link #description} (The description would be used by test engines
6745     *         for tracking and reporting purposes.). This is the underlying object
6746     *         with id, value and extensions. The accessor "getDescription" gives
6747     *         direct access to the value
6748     */
6749    public StringType getDescriptionElement() {
6750      if (this.description == null)
6751        if (Configuration.errorOnAutoCreate())
6752          throw new Error("Attempt to auto-create SetupActionAssertComponent.description");
6753        else if (Configuration.doAutoCreate())
6754          this.description = new StringType(); // bb
6755      return this.description;
6756    }
6757
6758    public boolean hasDescriptionElement() {
6759      return this.description != null && !this.description.isEmpty();
6760    }
6761
6762    public boolean hasDescription() {
6763      return this.description != null && !this.description.isEmpty();
6764    }
6765
6766    /**
6767     * @param value {@link #description} (The description would be used by test
6768     *              engines for tracking and reporting purposes.). This is the
6769     *              underlying object with id, value and extensions. The accessor
6770     *              "getDescription" gives direct access to the value
6771     */
6772    public SetupActionAssertComponent setDescriptionElement(StringType value) {
6773      this.description = value;
6774      return this;
6775    }
6776
6777    /**
6778     * @return The description would be used by test engines for tracking and
6779     *         reporting purposes.
6780     */
6781    public String getDescription() {
6782      return this.description == null ? null : this.description.getValue();
6783    }
6784
6785    /**
6786     * @param value The description would be used by test engines for tracking and
6787     *              reporting purposes.
6788     */
6789    public SetupActionAssertComponent setDescription(String value) {
6790      if (Utilities.noString(value))
6791        this.description = null;
6792      else {
6793        if (this.description == null)
6794          this.description = new StringType();
6795        this.description.setValue(value);
6796      }
6797      return this;
6798    }
6799
6800    /**
6801     * @return {@link #direction} (The direction to use for the assertion.). This is
6802     *         the underlying object with id, value and extensions. The accessor
6803     *         "getDirection" gives direct access to the value
6804     */
6805    public Enumeration<AssertionDirectionType> getDirectionElement() {
6806      if (this.direction == null)
6807        if (Configuration.errorOnAutoCreate())
6808          throw new Error("Attempt to auto-create SetupActionAssertComponent.direction");
6809        else if (Configuration.doAutoCreate())
6810          this.direction = new Enumeration<AssertionDirectionType>(new AssertionDirectionTypeEnumFactory()); // bb
6811      return this.direction;
6812    }
6813
6814    public boolean hasDirectionElement() {
6815      return this.direction != null && !this.direction.isEmpty();
6816    }
6817
6818    public boolean hasDirection() {
6819      return this.direction != null && !this.direction.isEmpty();
6820    }
6821
6822    /**
6823     * @param value {@link #direction} (The direction to use for the assertion.).
6824     *              This is the underlying object with id, value and extensions. The
6825     *              accessor "getDirection" gives direct access to the value
6826     */
6827    public SetupActionAssertComponent setDirectionElement(Enumeration<AssertionDirectionType> value) {
6828      this.direction = value;
6829      return this;
6830    }
6831
6832    /**
6833     * @return The direction to use for the assertion.
6834     */
6835    public AssertionDirectionType getDirection() {
6836      return this.direction == null ? null : this.direction.getValue();
6837    }
6838
6839    /**
6840     * @param value The direction to use for the assertion.
6841     */
6842    public SetupActionAssertComponent setDirection(AssertionDirectionType value) {
6843      if (value == null)
6844        this.direction = null;
6845      else {
6846        if (this.direction == null)
6847          this.direction = new Enumeration<AssertionDirectionType>(new AssertionDirectionTypeEnumFactory());
6848        this.direction.setValue(value);
6849      }
6850      return this;
6851    }
6852
6853    /**
6854     * @return {@link #compareToSourceId} (Id of the source fixture used as the
6855     *         contents to be evaluated by either the "source/expression" or
6856     *         "sourceId/path" definition.). This is the underlying object with id,
6857     *         value and extensions. The accessor "getCompareToSourceId" gives
6858     *         direct access to the value
6859     */
6860    public StringType getCompareToSourceIdElement() {
6861      if (this.compareToSourceId == null)
6862        if (Configuration.errorOnAutoCreate())
6863          throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourceId");
6864        else if (Configuration.doAutoCreate())
6865          this.compareToSourceId = new StringType(); // bb
6866      return this.compareToSourceId;
6867    }
6868
6869    public boolean hasCompareToSourceIdElement() {
6870      return this.compareToSourceId != null && !this.compareToSourceId.isEmpty();
6871    }
6872
6873    public boolean hasCompareToSourceId() {
6874      return this.compareToSourceId != null && !this.compareToSourceId.isEmpty();
6875    }
6876
6877    /**
6878     * @param value {@link #compareToSourceId} (Id of the source fixture used as the
6879     *              contents to be evaluated by either the "source/expression" or
6880     *              "sourceId/path" definition.). This is the underlying object with
6881     *              id, value and extensions. The accessor "getCompareToSourceId"
6882     *              gives direct access to the value
6883     */
6884    public SetupActionAssertComponent setCompareToSourceIdElement(StringType value) {
6885      this.compareToSourceId = value;
6886      return this;
6887    }
6888
6889    /**
6890     * @return Id of the source fixture used as the contents to be evaluated by
6891     *         either the "source/expression" or "sourceId/path" definition.
6892     */
6893    public String getCompareToSourceId() {
6894      return this.compareToSourceId == null ? null : this.compareToSourceId.getValue();
6895    }
6896
6897    /**
6898     * @param value Id of the source fixture used as the contents to be evaluated by
6899     *              either the "source/expression" or "sourceId/path" definition.
6900     */
6901    public SetupActionAssertComponent setCompareToSourceId(String value) {
6902      if (Utilities.noString(value))
6903        this.compareToSourceId = null;
6904      else {
6905        if (this.compareToSourceId == null)
6906          this.compareToSourceId = new StringType();
6907        this.compareToSourceId.setValue(value);
6908      }
6909      return this;
6910    }
6911
6912    /**
6913     * @return {@link #compareToSourceExpression} (The FHIRPath expression to
6914     *         evaluate against the source fixture. When compareToSourceId is
6915     *         defined, either compareToSourceExpression or compareToSourcePath must
6916     *         be defined, but not both.). This is the underlying object with id,
6917     *         value and extensions. The accessor "getCompareToSourceExpression"
6918     *         gives direct access to the value
6919     */
6920    public StringType getCompareToSourceExpressionElement() {
6921      if (this.compareToSourceExpression == null)
6922        if (Configuration.errorOnAutoCreate())
6923          throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourceExpression");
6924        else if (Configuration.doAutoCreate())
6925          this.compareToSourceExpression = new StringType(); // bb
6926      return this.compareToSourceExpression;
6927    }
6928
6929    public boolean hasCompareToSourceExpressionElement() {
6930      return this.compareToSourceExpression != null && !this.compareToSourceExpression.isEmpty();
6931    }
6932
6933    public boolean hasCompareToSourceExpression() {
6934      return this.compareToSourceExpression != null && !this.compareToSourceExpression.isEmpty();
6935    }
6936
6937    /**
6938     * @param value {@link #compareToSourceExpression} (The FHIRPath expression to
6939     *              evaluate against the source fixture. When compareToSourceId is
6940     *              defined, either compareToSourceExpression or compareToSourcePath
6941     *              must be defined, but not both.). This is the underlying object
6942     *              with id, value and extensions. The accessor
6943     *              "getCompareToSourceExpression" gives direct access to the value
6944     */
6945    public SetupActionAssertComponent setCompareToSourceExpressionElement(StringType value) {
6946      this.compareToSourceExpression = value;
6947      return this;
6948    }
6949
6950    /**
6951     * @return The FHIRPath expression to evaluate against the source fixture. When
6952     *         compareToSourceId is defined, either compareToSourceExpression or
6953     *         compareToSourcePath must be defined, but not both.
6954     */
6955    public String getCompareToSourceExpression() {
6956      return this.compareToSourceExpression == null ? null : this.compareToSourceExpression.getValue();
6957    }
6958
6959    /**
6960     * @param value The FHIRPath expression to evaluate against the source fixture.
6961     *              When compareToSourceId is defined, either
6962     *              compareToSourceExpression or compareToSourcePath must be
6963     *              defined, but not both.
6964     */
6965    public SetupActionAssertComponent setCompareToSourceExpression(String value) {
6966      if (Utilities.noString(value))
6967        this.compareToSourceExpression = null;
6968      else {
6969        if (this.compareToSourceExpression == null)
6970          this.compareToSourceExpression = new StringType();
6971        this.compareToSourceExpression.setValue(value);
6972      }
6973      return this;
6974    }
6975
6976    /**
6977     * @return {@link #compareToSourcePath} (XPath or JSONPath expression to
6978     *         evaluate against the source fixture. When compareToSourceId is
6979     *         defined, either compareToSourceExpression or compareToSourcePath must
6980     *         be defined, but not both.). This is the underlying object with id,
6981     *         value and extensions. The accessor "getCompareToSourcePath" gives
6982     *         direct access to the value
6983     */
6984    public StringType getCompareToSourcePathElement() {
6985      if (this.compareToSourcePath == null)
6986        if (Configuration.errorOnAutoCreate())
6987          throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourcePath");
6988        else if (Configuration.doAutoCreate())
6989          this.compareToSourcePath = new StringType(); // bb
6990      return this.compareToSourcePath;
6991    }
6992
6993    public boolean hasCompareToSourcePathElement() {
6994      return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty();
6995    }
6996
6997    public boolean hasCompareToSourcePath() {
6998      return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty();
6999    }
7000
7001    /**
7002     * @param value {@link #compareToSourcePath} (XPath or JSONPath expression to
7003     *              evaluate against the source fixture. When compareToSourceId is
7004     *              defined, either compareToSourceExpression or compareToSourcePath
7005     *              must be defined, but not both.). This is the underlying object
7006     *              with id, value and extensions. The accessor
7007     *              "getCompareToSourcePath" gives direct access to the value
7008     */
7009    public SetupActionAssertComponent setCompareToSourcePathElement(StringType value) {
7010      this.compareToSourcePath = value;
7011      return this;
7012    }
7013
7014    /**
7015     * @return XPath or JSONPath expression to evaluate against the source fixture.
7016     *         When compareToSourceId is defined, either compareToSourceExpression
7017     *         or compareToSourcePath must be defined, but not both.
7018     */
7019    public String getCompareToSourcePath() {
7020      return this.compareToSourcePath == null ? null : this.compareToSourcePath.getValue();
7021    }
7022
7023    /**
7024     * @param value XPath or JSONPath expression to evaluate against the source
7025     *              fixture. When compareToSourceId is defined, either
7026     *              compareToSourceExpression or compareToSourcePath must be
7027     *              defined, but not both.
7028     */
7029    public SetupActionAssertComponent setCompareToSourcePath(String value) {
7030      if (Utilities.noString(value))
7031        this.compareToSourcePath = null;
7032      else {
7033        if (this.compareToSourcePath == null)
7034          this.compareToSourcePath = new StringType();
7035        this.compareToSourcePath.setValue(value);
7036      }
7037      return this;
7038    }
7039
7040    /**
7041     * @return {@link #contentType} (The mime-type contents to compare against the
7042     *         request or response message 'Content-Type' header.). This is the
7043     *         underlying object with id, value and extensions. The accessor
7044     *         "getContentType" gives direct access to the value
7045     */
7046    public CodeType getContentTypeElement() {
7047      if (this.contentType == null)
7048        if (Configuration.errorOnAutoCreate())
7049          throw new Error("Attempt to auto-create SetupActionAssertComponent.contentType");
7050        else if (Configuration.doAutoCreate())
7051          this.contentType = new CodeType(); // bb
7052      return this.contentType;
7053    }
7054
7055    public boolean hasContentTypeElement() {
7056      return this.contentType != null && !this.contentType.isEmpty();
7057    }
7058
7059    public boolean hasContentType() {
7060      return this.contentType != null && !this.contentType.isEmpty();
7061    }
7062
7063    /**
7064     * @param value {@link #contentType} (The mime-type contents to compare against
7065     *              the request or response message 'Content-Type' header.). This is
7066     *              the underlying object with id, value and extensions. The
7067     *              accessor "getContentType" gives direct access to the value
7068     */
7069    public SetupActionAssertComponent setContentTypeElement(CodeType value) {
7070      this.contentType = value;
7071      return this;
7072    }
7073
7074    /**
7075     * @return The mime-type contents to compare against the request or response
7076     *         message 'Content-Type' header.
7077     */
7078    public String getContentType() {
7079      return this.contentType == null ? null : this.contentType.getValue();
7080    }
7081
7082    /**
7083     * @param value The mime-type contents to compare against the request or
7084     *              response message 'Content-Type' header.
7085     */
7086    public SetupActionAssertComponent setContentType(String value) {
7087      if (Utilities.noString(value))
7088        this.contentType = null;
7089      else {
7090        if (this.contentType == null)
7091          this.contentType = new CodeType();
7092        this.contentType.setValue(value);
7093      }
7094      return this;
7095    }
7096
7097    /**
7098     * @return {@link #expression} (The FHIRPath expression to be evaluated against
7099     *         the request or response message contents - HTTP headers and
7100     *         payload.). This is the underlying object with id, value and
7101     *         extensions. The accessor "getExpression" gives direct access to the
7102     *         value
7103     */
7104    public StringType getExpressionElement() {
7105      if (this.expression == null)
7106        if (Configuration.errorOnAutoCreate())
7107          throw new Error("Attempt to auto-create SetupActionAssertComponent.expression");
7108        else if (Configuration.doAutoCreate())
7109          this.expression = new StringType(); // bb
7110      return this.expression;
7111    }
7112
7113    public boolean hasExpressionElement() {
7114      return this.expression != null && !this.expression.isEmpty();
7115    }
7116
7117    public boolean hasExpression() {
7118      return this.expression != null && !this.expression.isEmpty();
7119    }
7120
7121    /**
7122     * @param value {@link #expression} (The FHIRPath expression to be evaluated
7123     *              against the request or response message contents - HTTP headers
7124     *              and payload.). This is the underlying object with id, value and
7125     *              extensions. The accessor "getExpression" gives direct access to
7126     *              the value
7127     */
7128    public SetupActionAssertComponent setExpressionElement(StringType value) {
7129      this.expression = value;
7130      return this;
7131    }
7132
7133    /**
7134     * @return The FHIRPath expression to be evaluated against the request or
7135     *         response message contents - HTTP headers and payload.
7136     */
7137    public String getExpression() {
7138      return this.expression == null ? null : this.expression.getValue();
7139    }
7140
7141    /**
7142     * @param value The FHIRPath expression to be evaluated against the request or
7143     *              response message contents - HTTP headers and payload.
7144     */
7145    public SetupActionAssertComponent setExpression(String value) {
7146      if (Utilities.noString(value))
7147        this.expression = null;
7148      else {
7149        if (this.expression == null)
7150          this.expression = new StringType();
7151        this.expression.setValue(value);
7152      }
7153      return this;
7154    }
7155
7156    /**
7157     * @return {@link #headerField} (The HTTP header field name e.g. 'Location'.).
7158     *         This is the underlying object with id, value and extensions. The
7159     *         accessor "getHeaderField" gives direct access to the value
7160     */
7161    public StringType getHeaderFieldElement() {
7162      if (this.headerField == null)
7163        if (Configuration.errorOnAutoCreate())
7164          throw new Error("Attempt to auto-create SetupActionAssertComponent.headerField");
7165        else if (Configuration.doAutoCreate())
7166          this.headerField = new StringType(); // bb
7167      return this.headerField;
7168    }
7169
7170    public boolean hasHeaderFieldElement() {
7171      return this.headerField != null && !this.headerField.isEmpty();
7172    }
7173
7174    public boolean hasHeaderField() {
7175      return this.headerField != null && !this.headerField.isEmpty();
7176    }
7177
7178    /**
7179     * @param value {@link #headerField} (The HTTP header field name e.g.
7180     *              'Location'.). This is the underlying object with id, value and
7181     *              extensions. The accessor "getHeaderField" gives direct access to
7182     *              the value
7183     */
7184    public SetupActionAssertComponent setHeaderFieldElement(StringType value) {
7185      this.headerField = value;
7186      return this;
7187    }
7188
7189    /**
7190     * @return The HTTP header field name e.g. 'Location'.
7191     */
7192    public String getHeaderField() {
7193      return this.headerField == null ? null : this.headerField.getValue();
7194    }
7195
7196    /**
7197     * @param value The HTTP header field name e.g. 'Location'.
7198     */
7199    public SetupActionAssertComponent setHeaderField(String value) {
7200      if (Utilities.noString(value))
7201        this.headerField = null;
7202      else {
7203        if (this.headerField == null)
7204          this.headerField = new StringType();
7205        this.headerField.setValue(value);
7206      }
7207      return this;
7208    }
7209
7210    /**
7211     * @return {@link #minimumId} (The ID of a fixture. Asserts that the response
7212     *         contains at a minimum the fixture specified by minimumId.). This is
7213     *         the underlying object with id, value and extensions. The accessor
7214     *         "getMinimumId" gives direct access to the value
7215     */
7216    public StringType getMinimumIdElement() {
7217      if (this.minimumId == null)
7218        if (Configuration.errorOnAutoCreate())
7219          throw new Error("Attempt to auto-create SetupActionAssertComponent.minimumId");
7220        else if (Configuration.doAutoCreate())
7221          this.minimumId = new StringType(); // bb
7222      return this.minimumId;
7223    }
7224
7225    public boolean hasMinimumIdElement() {
7226      return this.minimumId != null && !this.minimumId.isEmpty();
7227    }
7228
7229    public boolean hasMinimumId() {
7230      return this.minimumId != null && !this.minimumId.isEmpty();
7231    }
7232
7233    /**
7234     * @param value {@link #minimumId} (The ID of a fixture. Asserts that the
7235     *              response contains at a minimum the fixture specified by
7236     *              minimumId.). This is the underlying object with id, value and
7237     *              extensions. The accessor "getMinimumId" gives direct access to
7238     *              the value
7239     */
7240    public SetupActionAssertComponent setMinimumIdElement(StringType value) {
7241      this.minimumId = value;
7242      return this;
7243    }
7244
7245    /**
7246     * @return The ID of a fixture. Asserts that the response contains at a minimum
7247     *         the fixture specified by minimumId.
7248     */
7249    public String getMinimumId() {
7250      return this.minimumId == null ? null : this.minimumId.getValue();
7251    }
7252
7253    /**
7254     * @param value The ID of a fixture. Asserts that the response contains at a
7255     *              minimum the fixture specified by minimumId.
7256     */
7257    public SetupActionAssertComponent setMinimumId(String value) {
7258      if (Utilities.noString(value))
7259        this.minimumId = null;
7260      else {
7261        if (this.minimumId == null)
7262          this.minimumId = new StringType();
7263        this.minimumId.setValue(value);
7264      }
7265      return this;
7266    }
7267
7268    /**
7269     * @return {@link #navigationLinks} (Whether or not the test execution performs
7270     *         validation on the bundle navigation links.). This is the underlying
7271     *         object with id, value and extensions. The accessor
7272     *         "getNavigationLinks" gives direct access to the value
7273     */
7274    public BooleanType getNavigationLinksElement() {
7275      if (this.navigationLinks == null)
7276        if (Configuration.errorOnAutoCreate())
7277          throw new Error("Attempt to auto-create SetupActionAssertComponent.navigationLinks");
7278        else if (Configuration.doAutoCreate())
7279          this.navigationLinks = new BooleanType(); // bb
7280      return this.navigationLinks;
7281    }
7282
7283    public boolean hasNavigationLinksElement() {
7284      return this.navigationLinks != null && !this.navigationLinks.isEmpty();
7285    }
7286
7287    public boolean hasNavigationLinks() {
7288      return this.navigationLinks != null && !this.navigationLinks.isEmpty();
7289    }
7290
7291    /**
7292     * @param value {@link #navigationLinks} (Whether or not the test execution
7293     *              performs validation on the bundle navigation links.). This is
7294     *              the underlying object with id, value and extensions. The
7295     *              accessor "getNavigationLinks" gives direct access to the value
7296     */
7297    public SetupActionAssertComponent setNavigationLinksElement(BooleanType value) {
7298      this.navigationLinks = value;
7299      return this;
7300    }
7301
7302    /**
7303     * @return Whether or not the test execution performs validation on the bundle
7304     *         navigation links.
7305     */
7306    public boolean getNavigationLinks() {
7307      return this.navigationLinks == null || this.navigationLinks.isEmpty() ? false : this.navigationLinks.getValue();
7308    }
7309
7310    /**
7311     * @param value Whether or not the test execution performs validation on the
7312     *              bundle navigation links.
7313     */
7314    public SetupActionAssertComponent setNavigationLinks(boolean value) {
7315      if (this.navigationLinks == null)
7316        this.navigationLinks = new BooleanType();
7317      this.navigationLinks.setValue(value);
7318      return this;
7319    }
7320
7321    /**
7322     * @return {@link #operator} (The operator type defines the conditional behavior
7323     *         of the assert. If not defined, the default is equals.). This is the
7324     *         underlying object with id, value and extensions. The accessor
7325     *         "getOperator" gives direct access to the value
7326     */
7327    public Enumeration<AssertionOperatorType> getOperatorElement() {
7328      if (this.operator == null)
7329        if (Configuration.errorOnAutoCreate())
7330          throw new Error("Attempt to auto-create SetupActionAssertComponent.operator");
7331        else if (Configuration.doAutoCreate())
7332          this.operator = new Enumeration<AssertionOperatorType>(new AssertionOperatorTypeEnumFactory()); // bb
7333      return this.operator;
7334    }
7335
7336    public boolean hasOperatorElement() {
7337      return this.operator != null && !this.operator.isEmpty();
7338    }
7339
7340    public boolean hasOperator() {
7341      return this.operator != null && !this.operator.isEmpty();
7342    }
7343
7344    /**
7345     * @param value {@link #operator} (The operator type defines the conditional
7346     *              behavior of the assert. If not defined, the default is equals.).
7347     *              This is the underlying object with id, value and extensions. The
7348     *              accessor "getOperator" gives direct access to the value
7349     */
7350    public SetupActionAssertComponent setOperatorElement(Enumeration<AssertionOperatorType> value) {
7351      this.operator = value;
7352      return this;
7353    }
7354
7355    /**
7356     * @return The operator type defines the conditional behavior of the assert. If
7357     *         not defined, the default is equals.
7358     */
7359    public AssertionOperatorType getOperator() {
7360      return this.operator == null ? null : this.operator.getValue();
7361    }
7362
7363    /**
7364     * @param value The operator type defines the conditional behavior of the
7365     *              assert. If not defined, the default is equals.
7366     */
7367    public SetupActionAssertComponent setOperator(AssertionOperatorType value) {
7368      if (value == null)
7369        this.operator = null;
7370      else {
7371        if (this.operator == null)
7372          this.operator = new Enumeration<AssertionOperatorType>(new AssertionOperatorTypeEnumFactory());
7373        this.operator.setValue(value);
7374      }
7375      return this;
7376    }
7377
7378    /**
7379     * @return {@link #path} (The XPath or JSONPath expression to be evaluated
7380     *         against the fixture representing the response received from server.).
7381     *         This is the underlying object with id, value and extensions. The
7382     *         accessor "getPath" gives direct access to the value
7383     */
7384    public StringType getPathElement() {
7385      if (this.path == null)
7386        if (Configuration.errorOnAutoCreate())
7387          throw new Error("Attempt to auto-create SetupActionAssertComponent.path");
7388        else if (Configuration.doAutoCreate())
7389          this.path = new StringType(); // bb
7390      return this.path;
7391    }
7392
7393    public boolean hasPathElement() {
7394      return this.path != null && !this.path.isEmpty();
7395    }
7396
7397    public boolean hasPath() {
7398      return this.path != null && !this.path.isEmpty();
7399    }
7400
7401    /**
7402     * @param value {@link #path} (The XPath or JSONPath expression to be evaluated
7403     *              against the fixture representing the response received from
7404     *              server.). This is the underlying object with id, value and
7405     *              extensions. The accessor "getPath" gives direct access to the
7406     *              value
7407     */
7408    public SetupActionAssertComponent setPathElement(StringType value) {
7409      this.path = value;
7410      return this;
7411    }
7412
7413    /**
7414     * @return The XPath or JSONPath expression to be evaluated against the fixture
7415     *         representing the response received from server.
7416     */
7417    public String getPath() {
7418      return this.path == null ? null : this.path.getValue();
7419    }
7420
7421    /**
7422     * @param value The XPath or JSONPath expression to be evaluated against the
7423     *              fixture representing the response received from server.
7424     */
7425    public SetupActionAssertComponent setPath(String value) {
7426      if (Utilities.noString(value))
7427        this.path = null;
7428      else {
7429        if (this.path == null)
7430          this.path = new StringType();
7431        this.path.setValue(value);
7432      }
7433      return this;
7434    }
7435
7436    /**
7437     * @return {@link #requestMethod} (The request method or HTTP operation code to
7438     *         compare against that used by the client system under test.). This is
7439     *         the underlying object with id, value and extensions. The accessor
7440     *         "getRequestMethod" gives direct access to the value
7441     */
7442    public Enumeration<TestScriptRequestMethodCode> getRequestMethodElement() {
7443      if (this.requestMethod == null)
7444        if (Configuration.errorOnAutoCreate())
7445          throw new Error("Attempt to auto-create SetupActionAssertComponent.requestMethod");
7446        else if (Configuration.doAutoCreate())
7447          this.requestMethod = new Enumeration<TestScriptRequestMethodCode>(
7448              new TestScriptRequestMethodCodeEnumFactory()); // bb
7449      return this.requestMethod;
7450    }
7451
7452    public boolean hasRequestMethodElement() {
7453      return this.requestMethod != null && !this.requestMethod.isEmpty();
7454    }
7455
7456    public boolean hasRequestMethod() {
7457      return this.requestMethod != null && !this.requestMethod.isEmpty();
7458    }
7459
7460    /**
7461     * @param value {@link #requestMethod} (The request method or HTTP operation
7462     *              code to compare against that used by the client system under
7463     *              test.). This is the underlying object with id, value and
7464     *              extensions. The accessor "getRequestMethod" gives direct access
7465     *              to the value
7466     */
7467    public SetupActionAssertComponent setRequestMethodElement(Enumeration<TestScriptRequestMethodCode> value) {
7468      this.requestMethod = value;
7469      return this;
7470    }
7471
7472    /**
7473     * @return The request method or HTTP operation code to compare against that
7474     *         used by the client system under test.
7475     */
7476    public TestScriptRequestMethodCode getRequestMethod() {
7477      return this.requestMethod == null ? null : this.requestMethod.getValue();
7478    }
7479
7480    /**
7481     * @param value The request method or HTTP operation code to compare against
7482     *              that used by the client system under test.
7483     */
7484    public SetupActionAssertComponent setRequestMethod(TestScriptRequestMethodCode value) {
7485      if (value == null)
7486        this.requestMethod = null;
7487      else {
7488        if (this.requestMethod == null)
7489          this.requestMethod = new Enumeration<TestScriptRequestMethodCode>(
7490              new TestScriptRequestMethodCodeEnumFactory());
7491        this.requestMethod.setValue(value);
7492      }
7493      return this;
7494    }
7495
7496    /**
7497     * @return {@link #requestURL} (The value to use in a comparison against the
7498     *         request URL path string.). This is the underlying object with id,
7499     *         value and extensions. The accessor "getRequestURL" gives direct
7500     *         access to the value
7501     */
7502    public StringType getRequestURLElement() {
7503      if (this.requestURL == null)
7504        if (Configuration.errorOnAutoCreate())
7505          throw new Error("Attempt to auto-create SetupActionAssertComponent.requestURL");
7506        else if (Configuration.doAutoCreate())
7507          this.requestURL = new StringType(); // bb
7508      return this.requestURL;
7509    }
7510
7511    public boolean hasRequestURLElement() {
7512      return this.requestURL != null && !this.requestURL.isEmpty();
7513    }
7514
7515    public boolean hasRequestURL() {
7516      return this.requestURL != null && !this.requestURL.isEmpty();
7517    }
7518
7519    /**
7520     * @param value {@link #requestURL} (The value to use in a comparison against
7521     *              the request URL path string.). This is the underlying object
7522     *              with id, value and extensions. The accessor "getRequestURL"
7523     *              gives direct access to the value
7524     */
7525    public SetupActionAssertComponent setRequestURLElement(StringType value) {
7526      this.requestURL = value;
7527      return this;
7528    }
7529
7530    /**
7531     * @return The value to use in a comparison against the request URL path string.
7532     */
7533    public String getRequestURL() {
7534      return this.requestURL == null ? null : this.requestURL.getValue();
7535    }
7536
7537    /**
7538     * @param value The value to use in a comparison against the request URL path
7539     *              string.
7540     */
7541    public SetupActionAssertComponent setRequestURL(String value) {
7542      if (Utilities.noString(value))
7543        this.requestURL = null;
7544      else {
7545        if (this.requestURL == null)
7546          this.requestURL = new StringType();
7547        this.requestURL.setValue(value);
7548      }
7549      return this;
7550    }
7551
7552    /**
7553     * @return {@link #resource} (The type of the resource. See
7554     *         http://build.fhir.org/resourcelist.html.). This is the underlying
7555     *         object with id, value and extensions. The accessor "getResource"
7556     *         gives direct access to the value
7557     */
7558    public CodeType getResourceElement() {
7559      if (this.resource == null)
7560        if (Configuration.errorOnAutoCreate())
7561          throw new Error("Attempt to auto-create SetupActionAssertComponent.resource");
7562        else if (Configuration.doAutoCreate())
7563          this.resource = new CodeType(); // bb
7564      return this.resource;
7565    }
7566
7567    public boolean hasResourceElement() {
7568      return this.resource != null && !this.resource.isEmpty();
7569    }
7570
7571    public boolean hasResource() {
7572      return this.resource != null && !this.resource.isEmpty();
7573    }
7574
7575    /**
7576     * @param value {@link #resource} (The type of the resource. See
7577     *              http://build.fhir.org/resourcelist.html.). This is the
7578     *              underlying object with id, value and extensions. The accessor
7579     *              "getResource" gives direct access to the value
7580     */
7581    public SetupActionAssertComponent setResourceElement(CodeType value) {
7582      this.resource = value;
7583      return this;
7584    }
7585
7586    /**
7587     * @return The type of the resource. See
7588     *         http://build.fhir.org/resourcelist.html.
7589     */
7590    public String getResource() {
7591      return this.resource == null ? null : this.resource.getValue();
7592    }
7593
7594    /**
7595     * @param value The type of the resource. See
7596     *              http://build.fhir.org/resourcelist.html.
7597     */
7598    public SetupActionAssertComponent setResource(String value) {
7599      if (Utilities.noString(value))
7600        this.resource = null;
7601      else {
7602        if (this.resource == null)
7603          this.resource = new CodeType();
7604        this.resource.setValue(value);
7605      }
7606      return this;
7607    }
7608
7609    /**
7610     * @return {@link #response} (okay | created | noContent | notModified | bad |
7611     *         forbidden | notFound | methodNotAllowed | conflict | gone |
7612     *         preconditionFailed | unprocessable.). This is the underlying object
7613     *         with id, value and extensions. The accessor "getResponse" gives
7614     *         direct access to the value
7615     */
7616    public Enumeration<AssertionResponseTypes> getResponseElement() {
7617      if (this.response == null)
7618        if (Configuration.errorOnAutoCreate())
7619          throw new Error("Attempt to auto-create SetupActionAssertComponent.response");
7620        else if (Configuration.doAutoCreate())
7621          this.response = new Enumeration<AssertionResponseTypes>(new AssertionResponseTypesEnumFactory()); // bb
7622      return this.response;
7623    }
7624
7625    public boolean hasResponseElement() {
7626      return this.response != null && !this.response.isEmpty();
7627    }
7628
7629    public boolean hasResponse() {
7630      return this.response != null && !this.response.isEmpty();
7631    }
7632
7633    /**
7634     * @param value {@link #response} (okay | created | noContent | notModified |
7635     *              bad | forbidden | notFound | methodNotAllowed | conflict | gone
7636     *              | preconditionFailed | unprocessable.). This is the underlying
7637     *              object with id, value and extensions. The accessor "getResponse"
7638     *              gives direct access to the value
7639     */
7640    public SetupActionAssertComponent setResponseElement(Enumeration<AssertionResponseTypes> value) {
7641      this.response = value;
7642      return this;
7643    }
7644
7645    /**
7646     * @return okay | created | noContent | notModified | bad | forbidden | notFound
7647     *         | methodNotAllowed | conflict | gone | preconditionFailed |
7648     *         unprocessable.
7649     */
7650    public AssertionResponseTypes getResponse() {
7651      return this.response == null ? null : this.response.getValue();
7652    }
7653
7654    /**
7655     * @param value okay | created | noContent | notModified | bad | forbidden |
7656     *              notFound | methodNotAllowed | conflict | gone |
7657     *              preconditionFailed | unprocessable.
7658     */
7659    public SetupActionAssertComponent setResponse(AssertionResponseTypes value) {
7660      if (value == null)
7661        this.response = null;
7662      else {
7663        if (this.response == null)
7664          this.response = new Enumeration<AssertionResponseTypes>(new AssertionResponseTypesEnumFactory());
7665        this.response.setValue(value);
7666      }
7667      return this;
7668    }
7669
7670    /**
7671     * @return {@link #responseCode} (The value of the HTTP response code to be
7672     *         tested.). This is the underlying object with id, value and
7673     *         extensions. The accessor "getResponseCode" gives direct access to the
7674     *         value
7675     */
7676    public StringType getResponseCodeElement() {
7677      if (this.responseCode == null)
7678        if (Configuration.errorOnAutoCreate())
7679          throw new Error("Attempt to auto-create SetupActionAssertComponent.responseCode");
7680        else if (Configuration.doAutoCreate())
7681          this.responseCode = new StringType(); // bb
7682      return this.responseCode;
7683    }
7684
7685    public boolean hasResponseCodeElement() {
7686      return this.responseCode != null && !this.responseCode.isEmpty();
7687    }
7688
7689    public boolean hasResponseCode() {
7690      return this.responseCode != null && !this.responseCode.isEmpty();
7691    }
7692
7693    /**
7694     * @param value {@link #responseCode} (The value of the HTTP response code to be
7695     *              tested.). This is the underlying object with id, value and
7696     *              extensions. The accessor "getResponseCode" gives direct access
7697     *              to the value
7698     */
7699    public SetupActionAssertComponent setResponseCodeElement(StringType value) {
7700      this.responseCode = value;
7701      return this;
7702    }
7703
7704    /**
7705     * @return The value of the HTTP response code to be tested.
7706     */
7707    public String getResponseCode() {
7708      return this.responseCode == null ? null : this.responseCode.getValue();
7709    }
7710
7711    /**
7712     * @param value The value of the HTTP response code to be tested.
7713     */
7714    public SetupActionAssertComponent setResponseCode(String value) {
7715      if (Utilities.noString(value))
7716        this.responseCode = null;
7717      else {
7718        if (this.responseCode == null)
7719          this.responseCode = new StringType();
7720        this.responseCode.setValue(value);
7721      }
7722      return this;
7723    }
7724
7725    /**
7726     * @return {@link #sourceId} (Fixture to evaluate the XPath/JSONPath expression
7727     *         or the headerField against.). This is the underlying object with id,
7728     *         value and extensions. The accessor "getSourceId" gives direct access
7729     *         to the value
7730     */
7731    public IdType getSourceIdElement() {
7732      if (this.sourceId == null)
7733        if (Configuration.errorOnAutoCreate())
7734          throw new Error("Attempt to auto-create SetupActionAssertComponent.sourceId");
7735        else if (Configuration.doAutoCreate())
7736          this.sourceId = new IdType(); // bb
7737      return this.sourceId;
7738    }
7739
7740    public boolean hasSourceIdElement() {
7741      return this.sourceId != null && !this.sourceId.isEmpty();
7742    }
7743
7744    public boolean hasSourceId() {
7745      return this.sourceId != null && !this.sourceId.isEmpty();
7746    }
7747
7748    /**
7749     * @param value {@link #sourceId} (Fixture to evaluate the XPath/JSONPath
7750     *              expression or the headerField against.). This is the underlying
7751     *              object with id, value and extensions. The accessor "getSourceId"
7752     *              gives direct access to the value
7753     */
7754    public SetupActionAssertComponent setSourceIdElement(IdType value) {
7755      this.sourceId = value;
7756      return this;
7757    }
7758
7759    /**
7760     * @return Fixture to evaluate the XPath/JSONPath expression or the headerField
7761     *         against.
7762     */
7763    public String getSourceId() {
7764      return this.sourceId == null ? null : this.sourceId.getValue();
7765    }
7766
7767    /**
7768     * @param value Fixture to evaluate the XPath/JSONPath expression or the
7769     *              headerField against.
7770     */
7771    public SetupActionAssertComponent setSourceId(String value) {
7772      if (Utilities.noString(value))
7773        this.sourceId = null;
7774      else {
7775        if (this.sourceId == null)
7776          this.sourceId = new IdType();
7777        this.sourceId.setValue(value);
7778      }
7779      return this;
7780    }
7781
7782    /**
7783     * @return {@link #validateProfileId} (The ID of the Profile to validate
7784     *         against.). This is the underlying object with id, value and
7785     *         extensions. The accessor "getValidateProfileId" gives direct access
7786     *         to the value
7787     */
7788    public IdType getValidateProfileIdElement() {
7789      if (this.validateProfileId == null)
7790        if (Configuration.errorOnAutoCreate())
7791          throw new Error("Attempt to auto-create SetupActionAssertComponent.validateProfileId");
7792        else if (Configuration.doAutoCreate())
7793          this.validateProfileId = new IdType(); // bb
7794      return this.validateProfileId;
7795    }
7796
7797    public boolean hasValidateProfileIdElement() {
7798      return this.validateProfileId != null && !this.validateProfileId.isEmpty();
7799    }
7800
7801    public boolean hasValidateProfileId() {
7802      return this.validateProfileId != null && !this.validateProfileId.isEmpty();
7803    }
7804
7805    /**
7806     * @param value {@link #validateProfileId} (The ID of the Profile to validate
7807     *              against.). This is the underlying object with id, value and
7808     *              extensions. The accessor "getValidateProfileId" gives direct
7809     *              access to the value
7810     */
7811    public SetupActionAssertComponent setValidateProfileIdElement(IdType value) {
7812      this.validateProfileId = value;
7813      return this;
7814    }
7815
7816    /**
7817     * @return The ID of the Profile to validate against.
7818     */
7819    public String getValidateProfileId() {
7820      return this.validateProfileId == null ? null : this.validateProfileId.getValue();
7821    }
7822
7823    /**
7824     * @param value The ID of the Profile to validate against.
7825     */
7826    public SetupActionAssertComponent setValidateProfileId(String value) {
7827      if (Utilities.noString(value))
7828        this.validateProfileId = null;
7829      else {
7830        if (this.validateProfileId == null)
7831          this.validateProfileId = new IdType();
7832        this.validateProfileId.setValue(value);
7833      }
7834      return this;
7835    }
7836
7837    /**
7838     * @return {@link #value} (The value to compare to.). This is the underlying
7839     *         object with id, value and extensions. The accessor "getValue" gives
7840     *         direct access to the value
7841     */
7842    public StringType getValueElement() {
7843      if (this.value == null)
7844        if (Configuration.errorOnAutoCreate())
7845          throw new Error("Attempt to auto-create SetupActionAssertComponent.value");
7846        else if (Configuration.doAutoCreate())
7847          this.value = new StringType(); // bb
7848      return this.value;
7849    }
7850
7851    public boolean hasValueElement() {
7852      return this.value != null && !this.value.isEmpty();
7853    }
7854
7855    public boolean hasValue() {
7856      return this.value != null && !this.value.isEmpty();
7857    }
7858
7859    /**
7860     * @param value {@link #value} (The value to compare to.). This is the
7861     *              underlying object with id, value and extensions. The accessor
7862     *              "getValue" gives direct access to the value
7863     */
7864    public SetupActionAssertComponent setValueElement(StringType value) {
7865      this.value = value;
7866      return this;
7867    }
7868
7869    /**
7870     * @return The value to compare to.
7871     */
7872    public String getValue() {
7873      return this.value == null ? null : this.value.getValue();
7874    }
7875
7876    /**
7877     * @param value The value to compare to.
7878     */
7879    public SetupActionAssertComponent setValue(String value) {
7880      if (Utilities.noString(value))
7881        this.value = null;
7882      else {
7883        if (this.value == null)
7884          this.value = new StringType();
7885        this.value.setValue(value);
7886      }
7887      return this;
7888    }
7889
7890    /**
7891     * @return {@link #warningOnly} (Whether or not the test execution will produce
7892     *         a warning only on error for this assert.). This is the underlying
7893     *         object with id, value and extensions. The accessor "getWarningOnly"
7894     *         gives direct access to the value
7895     */
7896    public BooleanType getWarningOnlyElement() {
7897      if (this.warningOnly == null)
7898        if (Configuration.errorOnAutoCreate())
7899          throw new Error("Attempt to auto-create SetupActionAssertComponent.warningOnly");
7900        else if (Configuration.doAutoCreate())
7901          this.warningOnly = new BooleanType(); // bb
7902      return this.warningOnly;
7903    }
7904
7905    public boolean hasWarningOnlyElement() {
7906      return this.warningOnly != null && !this.warningOnly.isEmpty();
7907    }
7908
7909    public boolean hasWarningOnly() {
7910      return this.warningOnly != null && !this.warningOnly.isEmpty();
7911    }
7912
7913    /**
7914     * @param value {@link #warningOnly} (Whether or not the test execution will
7915     *              produce a warning only on error for this assert.). This is the
7916     *              underlying object with id, value and extensions. The accessor
7917     *              "getWarningOnly" gives direct access to the value
7918     */
7919    public SetupActionAssertComponent setWarningOnlyElement(BooleanType value) {
7920      this.warningOnly = value;
7921      return this;
7922    }
7923
7924    /**
7925     * @return Whether or not the test execution will produce a warning only on
7926     *         error for this assert.
7927     */
7928    public boolean getWarningOnly() {
7929      return this.warningOnly == null || this.warningOnly.isEmpty() ? false : this.warningOnly.getValue();
7930    }
7931
7932    /**
7933     * @param value Whether or not the test execution will produce a warning only on
7934     *              error for this assert.
7935     */
7936    public SetupActionAssertComponent setWarningOnly(boolean value) {
7937      if (this.warningOnly == null)
7938        this.warningOnly = new BooleanType();
7939      this.warningOnly.setValue(value);
7940      return this;
7941    }
7942
7943    protected void listChildren(List<Property> children) {
7944      super.listChildren(children);
7945      children.add(new Property("label", "string",
7946          "The label would be used for tracking/logging purposes by test engines.", 0, 1, label));
7947      children.add(new Property("description", "string",
7948          "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description));
7949      children.add(new Property("direction", "code", "The direction to use for the assertion.", 0, 1, direction));
7950      children.add(new Property("compareToSourceId", "string",
7951          "Id of the source fixture used as the contents to be evaluated by either the \"source/expression\" or \"sourceId/path\" definition.",
7952          0, 1, compareToSourceId));
7953      children.add(new Property("compareToSourceExpression", "string",
7954          "The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.",
7955          0, 1, compareToSourceExpression));
7956      children.add(new Property("compareToSourcePath", "string",
7957          "XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.",
7958          0, 1, compareToSourcePath));
7959      children.add(new Property("contentType", "code",
7960          "The mime-type contents to compare against the request or response message 'Content-Type' header.", 0, 1,
7961          contentType));
7962      children.add(new Property("expression", "string",
7963          "The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.",
7964          0, 1, expression));
7965      children
7966          .add(new Property("headerField", "string", "The HTTP header field name e.g. 'Location'.", 0, 1, headerField));
7967      children.add(new Property("minimumId", "string",
7968          "The ID of a fixture.  Asserts that the response contains at a minimum the fixture specified by minimumId.",
7969          0, 1, minimumId));
7970      children.add(new Property("navigationLinks", "boolean",
7971          "Whether or not the test execution performs validation on the bundle navigation links.", 0, 1,
7972          navigationLinks));
7973      children.add(new Property("operator", "code",
7974          "The operator type defines the conditional behavior of the assert. If not defined, the default is equals.", 0,
7975          1, operator));
7976      children.add(new Property("path", "string",
7977          "The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.",
7978          0, 1, path));
7979      children.add(new Property("requestMethod", "code",
7980          "The request method or HTTP operation code to compare against that used by the client system under test.", 0,
7981          1, requestMethod));
7982      children.add(new Property("requestURL", "string",
7983          "The value to use in a comparison against the request URL path string.", 0, 1, requestURL));
7984      children.add(new Property("resource", "code",
7985          "The type of the resource.  See http://build.fhir.org/resourcelist.html.", 0, 1, resource));
7986      children.add(new Property("response", "code",
7987          "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.",
7988          0, 1, response));
7989      children.add(new Property("responseCode", "string", "The value of the HTTP response code to be tested.", 0, 1,
7990          responseCode));
7991      children.add(new Property("sourceId", "id",
7992          "Fixture to evaluate the XPath/JSONPath expression or the headerField  against.", 0, 1, sourceId));
7993      children.add(new Property("validateProfileId", "id", "The ID of the Profile to validate against.", 0, 1,
7994          validateProfileId));
7995      children.add(new Property("value", "string", "The value to compare to.", 0, 1, value));
7996      children.add(new Property("warningOnly", "boolean",
7997          "Whether or not the test execution will produce a warning only on error for this assert.", 0, 1,
7998          warningOnly));
7999    }
8000
8001    @Override
8002    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
8003      switch (_hash) {
8004      case 102727412:
8005        /* label */ return new Property("label", "string",
8006            "The label would be used for tracking/logging purposes by test engines.", 0, 1, label);
8007      case -1724546052:
8008        /* description */ return new Property("description", "string",
8009            "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description);
8010      case -962590849:
8011        /* direction */ return new Property("direction", "code", "The direction to use for the assertion.", 0, 1,
8012            direction);
8013      case 2081856758:
8014        /* compareToSourceId */ return new Property("compareToSourceId", "string",
8015            "Id of the source fixture used as the contents to be evaluated by either the \"source/expression\" or \"sourceId/path\" definition.",
8016            0, 1, compareToSourceId);
8017      case -1415702669:
8018        /* compareToSourceExpression */ return new Property("compareToSourceExpression", "string",
8019            "The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.",
8020            0, 1, compareToSourceExpression);
8021      case -790206144:
8022        /* compareToSourcePath */ return new Property("compareToSourcePath", "string",
8023            "XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.",
8024            0, 1, compareToSourcePath);
8025      case -389131437:
8026        /* contentType */ return new Property("contentType", "code",
8027            "The mime-type contents to compare against the request or response message 'Content-Type' header.", 0, 1,
8028            contentType);
8029      case -1795452264:
8030        /* expression */ return new Property("expression", "string",
8031            "The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.",
8032            0, 1, expression);
8033      case 1160732269:
8034        /* headerField */ return new Property("headerField", "string", "The HTTP header field name e.g. 'Location'.", 0,
8035            1, headerField);
8036      case 818925001:
8037        /* minimumId */ return new Property("minimumId", "string",
8038            "The ID of a fixture.  Asserts that the response contains at a minimum the fixture specified by minimumId.",
8039            0, 1, minimumId);
8040      case 1001488901:
8041        /* navigationLinks */ return new Property("navigationLinks", "boolean",
8042            "Whether or not the test execution performs validation on the bundle navigation links.", 0, 1,
8043            navigationLinks);
8044      case -500553564:
8045        /* operator */ return new Property("operator", "code",
8046            "The operator type defines the conditional behavior of the assert. If not defined, the default is equals.",
8047            0, 1, operator);
8048      case 3433509:
8049        /* path */ return new Property("path", "string",
8050            "The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.",
8051            0, 1, path);
8052      case 1217874000:
8053        /* requestMethod */ return new Property("requestMethod", "code",
8054            "The request method or HTTP operation code to compare against that used by the client system under test.",
8055            0, 1, requestMethod);
8056      case 37099616:
8057        /* requestURL */ return new Property("requestURL", "string",
8058            "The value to use in a comparison against the request URL path string.", 0, 1, requestURL);
8059      case -341064690:
8060        /* resource */ return new Property("resource", "code",
8061            "The type of the resource.  See http://build.fhir.org/resourcelist.html.", 0, 1, resource);
8062      case -340323263:
8063        /* response */ return new Property("response", "code",
8064            "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.",
8065            0, 1, response);
8066      case 1438723534:
8067        /* responseCode */ return new Property("responseCode", "string",
8068            "The value of the HTTP response code to be tested.", 0, 1, responseCode);
8069      case 1746327190:
8070        /* sourceId */ return new Property("sourceId", "id",
8071            "Fixture to evaluate the XPath/JSONPath expression or the headerField  against.", 0, 1, sourceId);
8072      case 1555541038:
8073        /* validateProfileId */ return new Property("validateProfileId", "id",
8074            "The ID of the Profile to validate against.", 0, 1, validateProfileId);
8075      case 111972721:
8076        /* value */ return new Property("value", "string", "The value to compare to.", 0, 1, value);
8077      case -481159832:
8078        /* warningOnly */ return new Property("warningOnly", "boolean",
8079            "Whether or not the test execution will produce a warning only on error for this assert.", 0, 1,
8080            warningOnly);
8081      default:
8082        return super.getNamedProperty(_hash, _name, _checkValid);
8083      }
8084
8085    }
8086
8087    @Override
8088    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
8089      switch (hash) {
8090      case 102727412:
8091        /* label */ return this.label == null ? new Base[0] : new Base[] { this.label }; // StringType
8092      case -1724546052:
8093        /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // StringType
8094      case -962590849:
8095        /* direction */ return this.direction == null ? new Base[0] : new Base[] { this.direction }; // Enumeration<AssertionDirectionType>
8096      case 2081856758:
8097        /* compareToSourceId */ return this.compareToSourceId == null ? new Base[0]
8098            : new Base[] { this.compareToSourceId }; // StringType
8099      case -1415702669:
8100        /* compareToSourceExpression */ return this.compareToSourceExpression == null ? new Base[0]
8101            : new Base[] { this.compareToSourceExpression }; // StringType
8102      case -790206144:
8103        /* compareToSourcePath */ return this.compareToSourcePath == null ? new Base[0]
8104            : new Base[] { this.compareToSourcePath }; // StringType
8105      case -389131437:
8106        /* contentType */ return this.contentType == null ? new Base[0] : new Base[] { this.contentType }; // CodeType
8107      case -1795452264:
8108        /* expression */ return this.expression == null ? new Base[0] : new Base[] { this.expression }; // StringType
8109      case 1160732269:
8110        /* headerField */ return this.headerField == null ? new Base[0] : new Base[] { this.headerField }; // StringType
8111      case 818925001:
8112        /* minimumId */ return this.minimumId == null ? new Base[0] : new Base[] { this.minimumId }; // StringType
8113      case 1001488901:
8114        /* navigationLinks */ return this.navigationLinks == null ? new Base[0] : new Base[] { this.navigationLinks }; // BooleanType
8115      case -500553564:
8116        /* operator */ return this.operator == null ? new Base[0] : new Base[] { this.operator }; // Enumeration<AssertionOperatorType>
8117      case 3433509:
8118        /* path */ return this.path == null ? new Base[0] : new Base[] { this.path }; // StringType
8119      case 1217874000:
8120        /* requestMethod */ return this.requestMethod == null ? new Base[0] : new Base[] { this.requestMethod }; // Enumeration<TestScriptRequestMethodCode>
8121      case 37099616:
8122        /* requestURL */ return this.requestURL == null ? new Base[0] : new Base[] { this.requestURL }; // StringType
8123      case -341064690:
8124        /* resource */ return this.resource == null ? new Base[0] : new Base[] { this.resource }; // CodeType
8125      case -340323263:
8126        /* response */ return this.response == null ? new Base[0] : new Base[] { this.response }; // Enumeration<AssertionResponseTypes>
8127      case 1438723534:
8128        /* responseCode */ return this.responseCode == null ? new Base[0] : new Base[] { this.responseCode }; // StringType
8129      case 1746327190:
8130        /* sourceId */ return this.sourceId == null ? new Base[0] : new Base[] { this.sourceId }; // IdType
8131      case 1555541038:
8132        /* validateProfileId */ return this.validateProfileId == null ? new Base[0]
8133            : new Base[] { this.validateProfileId }; // IdType
8134      case 111972721:
8135        /* value */ return this.value == null ? new Base[0] : new Base[] { this.value }; // StringType
8136      case -481159832:
8137        /* warningOnly */ return this.warningOnly == null ? new Base[0] : new Base[] { this.warningOnly }; // BooleanType
8138      default:
8139        return super.getProperty(hash, name, checkValid);
8140      }
8141
8142    }
8143
8144    @Override
8145    public Base setProperty(int hash, String name, Base value) throws FHIRException {
8146      switch (hash) {
8147      case 102727412: // label
8148        this.label = castToString(value); // StringType
8149        return value;
8150      case -1724546052: // description
8151        this.description = castToString(value); // StringType
8152        return value;
8153      case -962590849: // direction
8154        value = new AssertionDirectionTypeEnumFactory().fromType(castToCode(value));
8155        this.direction = (Enumeration) value; // Enumeration<AssertionDirectionType>
8156        return value;
8157      case 2081856758: // compareToSourceId
8158        this.compareToSourceId = castToString(value); // StringType
8159        return value;
8160      case -1415702669: // compareToSourceExpression
8161        this.compareToSourceExpression = castToString(value); // StringType
8162        return value;
8163      case -790206144: // compareToSourcePath
8164        this.compareToSourcePath = castToString(value); // StringType
8165        return value;
8166      case -389131437: // contentType
8167        this.contentType = castToCode(value); // CodeType
8168        return value;
8169      case -1795452264: // expression
8170        this.expression = castToString(value); // StringType
8171        return value;
8172      case 1160732269: // headerField
8173        this.headerField = castToString(value); // StringType
8174        return value;
8175      case 818925001: // minimumId
8176        this.minimumId = castToString(value); // StringType
8177        return value;
8178      case 1001488901: // navigationLinks
8179        this.navigationLinks = castToBoolean(value); // BooleanType
8180        return value;
8181      case -500553564: // operator
8182        value = new AssertionOperatorTypeEnumFactory().fromType(castToCode(value));
8183        this.operator = (Enumeration) value; // Enumeration<AssertionOperatorType>
8184        return value;
8185      case 3433509: // path
8186        this.path = castToString(value); // StringType
8187        return value;
8188      case 1217874000: // requestMethod
8189        value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value));
8190        this.requestMethod = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode>
8191        return value;
8192      case 37099616: // requestURL
8193        this.requestURL = castToString(value); // StringType
8194        return value;
8195      case -341064690: // resource
8196        this.resource = castToCode(value); // CodeType
8197        return value;
8198      case -340323263: // response
8199        value = new AssertionResponseTypesEnumFactory().fromType(castToCode(value));
8200        this.response = (Enumeration) value; // Enumeration<AssertionResponseTypes>
8201        return value;
8202      case 1438723534: // responseCode
8203        this.responseCode = castToString(value); // StringType
8204        return value;
8205      case 1746327190: // sourceId
8206        this.sourceId = castToId(value); // IdType
8207        return value;
8208      case 1555541038: // validateProfileId
8209        this.validateProfileId = castToId(value); // IdType
8210        return value;
8211      case 111972721: // value
8212        this.value = castToString(value); // StringType
8213        return value;
8214      case -481159832: // warningOnly
8215        this.warningOnly = castToBoolean(value); // BooleanType
8216        return value;
8217      default:
8218        return super.setProperty(hash, name, value);
8219      }
8220
8221    }
8222
8223    @Override
8224    public Base setProperty(String name, Base value) throws FHIRException {
8225      if (name.equals("label")) {
8226        this.label = castToString(value); // StringType
8227      } else if (name.equals("description")) {
8228        this.description = castToString(value); // StringType
8229      } else if (name.equals("direction")) {
8230        value = new AssertionDirectionTypeEnumFactory().fromType(castToCode(value));
8231        this.direction = (Enumeration) value; // Enumeration<AssertionDirectionType>
8232      } else if (name.equals("compareToSourceId")) {
8233        this.compareToSourceId = castToString(value); // StringType
8234      } else if (name.equals("compareToSourceExpression")) {
8235        this.compareToSourceExpression = castToString(value); // StringType
8236      } else if (name.equals("compareToSourcePath")) {
8237        this.compareToSourcePath = castToString(value); // StringType
8238      } else if (name.equals("contentType")) {
8239        this.contentType = castToCode(value); // CodeType
8240      } else if (name.equals("expression")) {
8241        this.expression = castToString(value); // StringType
8242      } else if (name.equals("headerField")) {
8243        this.headerField = castToString(value); // StringType
8244      } else if (name.equals("minimumId")) {
8245        this.minimumId = castToString(value); // StringType
8246      } else if (name.equals("navigationLinks")) {
8247        this.navigationLinks = castToBoolean(value); // BooleanType
8248      } else if (name.equals("operator")) {
8249        value = new AssertionOperatorTypeEnumFactory().fromType(castToCode(value));
8250        this.operator = (Enumeration) value; // Enumeration<AssertionOperatorType>
8251      } else if (name.equals("path")) {
8252        this.path = castToString(value); // StringType
8253      } else if (name.equals("requestMethod")) {
8254        value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value));
8255        this.requestMethod = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode>
8256      } else if (name.equals("requestURL")) {
8257        this.requestURL = castToString(value); // StringType
8258      } else if (name.equals("resource")) {
8259        this.resource = castToCode(value); // CodeType
8260      } else if (name.equals("response")) {
8261        value = new AssertionResponseTypesEnumFactory().fromType(castToCode(value));
8262        this.response = (Enumeration) value; // Enumeration<AssertionResponseTypes>
8263      } else if (name.equals("responseCode")) {
8264        this.responseCode = castToString(value); // StringType
8265      } else if (name.equals("sourceId")) {
8266        this.sourceId = castToId(value); // IdType
8267      } else if (name.equals("validateProfileId")) {
8268        this.validateProfileId = castToId(value); // IdType
8269      } else if (name.equals("value")) {
8270        this.value = castToString(value); // StringType
8271      } else if (name.equals("warningOnly")) {
8272        this.warningOnly = castToBoolean(value); // BooleanType
8273      } else
8274        return super.setProperty(name, value);
8275      return value;
8276    }
8277
8278  @Override
8279  public void removeChild(String name, Base value) throws FHIRException {
8280      if (name.equals("label")) {
8281        this.label = null;
8282      } else if (name.equals("description")) {
8283        this.description = null;
8284      } else if (name.equals("direction")) {
8285        this.direction = null;
8286      } else if (name.equals("compareToSourceId")) {
8287        this.compareToSourceId = null;
8288      } else if (name.equals("compareToSourceExpression")) {
8289        this.compareToSourceExpression = null;
8290      } else if (name.equals("compareToSourcePath")) {
8291        this.compareToSourcePath = null;
8292      } else if (name.equals("contentType")) {
8293        this.contentType = null;
8294      } else if (name.equals("expression")) {
8295        this.expression = null;
8296      } else if (name.equals("headerField")) {
8297        this.headerField = null;
8298      } else if (name.equals("minimumId")) {
8299        this.minimumId = null;
8300      } else if (name.equals("navigationLinks")) {
8301        this.navigationLinks = null;
8302      } else if (name.equals("operator")) {
8303        this.operator = null;
8304      } else if (name.equals("path")) {
8305        this.path = null;
8306      } else if (name.equals("requestMethod")) {
8307        this.requestMethod = null;
8308      } else if (name.equals("requestURL")) {
8309        this.requestURL = null;
8310      } else if (name.equals("resource")) {
8311        this.resource = null;
8312      } else if (name.equals("response")) {
8313        this.response = null;
8314      } else if (name.equals("responseCode")) {
8315        this.responseCode = null;
8316      } else if (name.equals("sourceId")) {
8317        this.sourceId = null;
8318      } else if (name.equals("validateProfileId")) {
8319        this.validateProfileId = null;
8320      } else if (name.equals("value")) {
8321        this.value = null;
8322      } else if (name.equals("warningOnly")) {
8323        this.warningOnly = null;
8324      } else
8325        super.removeChild(name, value);
8326      
8327    }
8328
8329    @Override
8330    public Base makeProperty(int hash, String name) throws FHIRException {
8331      switch (hash) {
8332      case 102727412:
8333        return getLabelElement();
8334      case -1724546052:
8335        return getDescriptionElement();
8336      case -962590849:
8337        return getDirectionElement();
8338      case 2081856758:
8339        return getCompareToSourceIdElement();
8340      case -1415702669:
8341        return getCompareToSourceExpressionElement();
8342      case -790206144:
8343        return getCompareToSourcePathElement();
8344      case -389131437:
8345        return getContentTypeElement();
8346      case -1795452264:
8347        return getExpressionElement();
8348      case 1160732269:
8349        return getHeaderFieldElement();
8350      case 818925001:
8351        return getMinimumIdElement();
8352      case 1001488901:
8353        return getNavigationLinksElement();
8354      case -500553564:
8355        return getOperatorElement();
8356      case 3433509:
8357        return getPathElement();
8358      case 1217874000:
8359        return getRequestMethodElement();
8360      case 37099616:
8361        return getRequestURLElement();
8362      case -341064690:
8363        return getResourceElement();
8364      case -340323263:
8365        return getResponseElement();
8366      case 1438723534:
8367        return getResponseCodeElement();
8368      case 1746327190:
8369        return getSourceIdElement();
8370      case 1555541038:
8371        return getValidateProfileIdElement();
8372      case 111972721:
8373        return getValueElement();
8374      case -481159832:
8375        return getWarningOnlyElement();
8376      default:
8377        return super.makeProperty(hash, name);
8378      }
8379
8380    }
8381
8382    @Override
8383    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
8384      switch (hash) {
8385      case 102727412:
8386        /* label */ return new String[] { "string" };
8387      case -1724546052:
8388        /* description */ return new String[] { "string" };
8389      case -962590849:
8390        /* direction */ return new String[] { "code" };
8391      case 2081856758:
8392        /* compareToSourceId */ return new String[] { "string" };
8393      case -1415702669:
8394        /* compareToSourceExpression */ return new String[] { "string" };
8395      case -790206144:
8396        /* compareToSourcePath */ return new String[] { "string" };
8397      case -389131437:
8398        /* contentType */ return new String[] { "code" };
8399      case -1795452264:
8400        /* expression */ return new String[] { "string" };
8401      case 1160732269:
8402        /* headerField */ return new String[] { "string" };
8403      case 818925001:
8404        /* minimumId */ return new String[] { "string" };
8405      case 1001488901:
8406        /* navigationLinks */ return new String[] { "boolean" };
8407      case -500553564:
8408        /* operator */ return new String[] { "code" };
8409      case 3433509:
8410        /* path */ return new String[] { "string" };
8411      case 1217874000:
8412        /* requestMethod */ return new String[] { "code" };
8413      case 37099616:
8414        /* requestURL */ return new String[] { "string" };
8415      case -341064690:
8416        /* resource */ return new String[] { "code" };
8417      case -340323263:
8418        /* response */ return new String[] { "code" };
8419      case 1438723534:
8420        /* responseCode */ return new String[] { "string" };
8421      case 1746327190:
8422        /* sourceId */ return new String[] { "id" };
8423      case 1555541038:
8424        /* validateProfileId */ return new String[] { "id" };
8425      case 111972721:
8426        /* value */ return new String[] { "string" };
8427      case -481159832:
8428        /* warningOnly */ return new String[] { "boolean" };
8429      default:
8430        return super.getTypesForProperty(hash, name);
8431      }
8432
8433    }
8434
8435    @Override
8436    public Base addChild(String name) throws FHIRException {
8437      if (name.equals("label")) {
8438        throw new FHIRException("Cannot call addChild on a singleton property TestScript.label");
8439      } else if (name.equals("description")) {
8440        throw new FHIRException("Cannot call addChild on a singleton property TestScript.description");
8441      } else if (name.equals("direction")) {
8442        throw new FHIRException("Cannot call addChild on a singleton property TestScript.direction");
8443      } else if (name.equals("compareToSourceId")) {
8444        throw new FHIRException("Cannot call addChild on a singleton property TestScript.compareToSourceId");
8445      } else if (name.equals("compareToSourceExpression")) {
8446        throw new FHIRException("Cannot call addChild on a singleton property TestScript.compareToSourceExpression");
8447      } else if (name.equals("compareToSourcePath")) {
8448        throw new FHIRException("Cannot call addChild on a singleton property TestScript.compareToSourcePath");
8449      } else if (name.equals("contentType")) {
8450        throw new FHIRException("Cannot call addChild on a singleton property TestScript.contentType");
8451      } else if (name.equals("expression")) {
8452        throw new FHIRException("Cannot call addChild on a singleton property TestScript.expression");
8453      } else if (name.equals("headerField")) {
8454        throw new FHIRException("Cannot call addChild on a singleton property TestScript.headerField");
8455      } else if (name.equals("minimumId")) {
8456        throw new FHIRException("Cannot call addChild on a singleton property TestScript.minimumId");
8457      } else if (name.equals("navigationLinks")) {
8458        throw new FHIRException("Cannot call addChild on a singleton property TestScript.navigationLinks");
8459      } else if (name.equals("operator")) {
8460        throw new FHIRException("Cannot call addChild on a singleton property TestScript.operator");
8461      } else if (name.equals("path")) {
8462        throw new FHIRException("Cannot call addChild on a singleton property TestScript.path");
8463      } else if (name.equals("requestMethod")) {
8464        throw new FHIRException("Cannot call addChild on a singleton property TestScript.requestMethod");
8465      } else if (name.equals("requestURL")) {
8466        throw new FHIRException("Cannot call addChild on a singleton property TestScript.requestURL");
8467      } else if (name.equals("resource")) {
8468        throw new FHIRException("Cannot call addChild on a singleton property TestScript.resource");
8469      } else if (name.equals("response")) {
8470        throw new FHIRException("Cannot call addChild on a singleton property TestScript.response");
8471      } else if (name.equals("responseCode")) {
8472        throw new FHIRException("Cannot call addChild on a singleton property TestScript.responseCode");
8473      } else if (name.equals("sourceId")) {
8474        throw new FHIRException("Cannot call addChild on a singleton property TestScript.sourceId");
8475      } else if (name.equals("validateProfileId")) {
8476        throw new FHIRException("Cannot call addChild on a singleton property TestScript.validateProfileId");
8477      } else if (name.equals("value")) {
8478        throw new FHIRException("Cannot call addChild on a singleton property TestScript.value");
8479      } else if (name.equals("warningOnly")) {
8480        throw new FHIRException("Cannot call addChild on a singleton property TestScript.warningOnly");
8481      } else
8482        return super.addChild(name);
8483    }
8484
8485    public SetupActionAssertComponent copy() {
8486      SetupActionAssertComponent dst = new SetupActionAssertComponent();
8487      copyValues(dst);
8488      return dst;
8489    }
8490
8491    public void copyValues(SetupActionAssertComponent dst) {
8492      super.copyValues(dst);
8493      dst.label = label == null ? null : label.copy();
8494      dst.description = description == null ? null : description.copy();
8495      dst.direction = direction == null ? null : direction.copy();
8496      dst.compareToSourceId = compareToSourceId == null ? null : compareToSourceId.copy();
8497      dst.compareToSourceExpression = compareToSourceExpression == null ? null : compareToSourceExpression.copy();
8498      dst.compareToSourcePath = compareToSourcePath == null ? null : compareToSourcePath.copy();
8499      dst.contentType = contentType == null ? null : contentType.copy();
8500      dst.expression = expression == null ? null : expression.copy();
8501      dst.headerField = headerField == null ? null : headerField.copy();
8502      dst.minimumId = minimumId == null ? null : minimumId.copy();
8503      dst.navigationLinks = navigationLinks == null ? null : navigationLinks.copy();
8504      dst.operator = operator == null ? null : operator.copy();
8505      dst.path = path == null ? null : path.copy();
8506      dst.requestMethod = requestMethod == null ? null : requestMethod.copy();
8507      dst.requestURL = requestURL == null ? null : requestURL.copy();
8508      dst.resource = resource == null ? null : resource.copy();
8509      dst.response = response == null ? null : response.copy();
8510      dst.responseCode = responseCode == null ? null : responseCode.copy();
8511      dst.sourceId = sourceId == null ? null : sourceId.copy();
8512      dst.validateProfileId = validateProfileId == null ? null : validateProfileId.copy();
8513      dst.value = value == null ? null : value.copy();
8514      dst.warningOnly = warningOnly == null ? null : warningOnly.copy();
8515    }
8516
8517    @Override
8518    public boolean equalsDeep(Base other_) {
8519      if (!super.equalsDeep(other_))
8520        return false;
8521      if (!(other_ instanceof SetupActionAssertComponent))
8522        return false;
8523      SetupActionAssertComponent o = (SetupActionAssertComponent) other_;
8524      return compareDeep(label, o.label, true) && compareDeep(description, o.description, true)
8525          && compareDeep(direction, o.direction, true) && compareDeep(compareToSourceId, o.compareToSourceId, true)
8526          && compareDeep(compareToSourceExpression, o.compareToSourceExpression, true)
8527          && compareDeep(compareToSourcePath, o.compareToSourcePath, true)
8528          && compareDeep(contentType, o.contentType, true) && compareDeep(expression, o.expression, true)
8529          && compareDeep(headerField, o.headerField, true) && compareDeep(minimumId, o.minimumId, true)
8530          && compareDeep(navigationLinks, o.navigationLinks, true) && compareDeep(operator, o.operator, true)
8531          && compareDeep(path, o.path, true) && compareDeep(requestMethod, o.requestMethod, true)
8532          && compareDeep(requestURL, o.requestURL, true) && compareDeep(resource, o.resource, true)
8533          && compareDeep(response, o.response, true) && compareDeep(responseCode, o.responseCode, true)
8534          && compareDeep(sourceId, o.sourceId, true) && compareDeep(validateProfileId, o.validateProfileId, true)
8535          && compareDeep(value, o.value, true) && compareDeep(warningOnly, o.warningOnly, true);
8536    }
8537
8538    @Override
8539    public boolean equalsShallow(Base other_) {
8540      if (!super.equalsShallow(other_))
8541        return false;
8542      if (!(other_ instanceof SetupActionAssertComponent))
8543        return false;
8544      SetupActionAssertComponent o = (SetupActionAssertComponent) other_;
8545      return compareValues(label, o.label, true) && compareValues(description, o.description, true)
8546          && compareValues(direction, o.direction, true) && compareValues(compareToSourceId, o.compareToSourceId, true)
8547          && compareValues(compareToSourceExpression, o.compareToSourceExpression, true)
8548          && compareValues(compareToSourcePath, o.compareToSourcePath, true)
8549          && compareValues(contentType, o.contentType, true) && compareValues(expression, o.expression, true)
8550          && compareValues(headerField, o.headerField, true) && compareValues(minimumId, o.minimumId, true)
8551          && compareValues(navigationLinks, o.navigationLinks, true) && compareValues(operator, o.operator, true)
8552          && compareValues(path, o.path, true) && compareValues(requestMethod, o.requestMethod, true)
8553          && compareValues(requestURL, o.requestURL, true) && compareValues(resource, o.resource, true)
8554          && compareValues(response, o.response, true) && compareValues(responseCode, o.responseCode, true)
8555          && compareValues(sourceId, o.sourceId, true) && compareValues(validateProfileId, o.validateProfileId, true)
8556          && compareValues(value, o.value, true) && compareValues(warningOnly, o.warningOnly, true);
8557    }
8558
8559    public boolean isEmpty() {
8560      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(label, description, direction, compareToSourceId,
8561          compareToSourceExpression, compareToSourcePath, contentType, expression, headerField, minimumId,
8562          navigationLinks, operator, path, requestMethod, requestURL, resource, response, responseCode, sourceId,
8563          validateProfileId, value, warningOnly);
8564    }
8565
8566    public String fhirType() {
8567      return "TestScript.setup.action.assert";
8568
8569    }
8570
8571  }
8572
8573  @Block()
8574  public static class TestScriptTestComponent extends BackboneElement implements IBaseBackboneElement {
8575    /**
8576     * The name of this test used for tracking/logging purposes by test engines.
8577     */
8578    @Child(name = "name", type = { StringType.class }, order = 1, min = 0, max = 1, modifier = false, summary = false)
8579    @Description(shortDefinition = "Tracking/logging name of this test", formalDefinition = "The name of this test used for tracking/logging purposes by test engines.")
8580    protected StringType name;
8581
8582    /**
8583     * A short description of the test used by test engines for tracking and
8584     * reporting purposes.
8585     */
8586    @Child(name = "description", type = {
8587        StringType.class }, order = 2, min = 0, max = 1, modifier = false, summary = false)
8588    @Description(shortDefinition = "Tracking/reporting short description of the test", formalDefinition = "A short description of the test used by test engines for tracking and reporting purposes.")
8589    protected StringType description;
8590
8591    /**
8592     * Action would contain either an operation or an assertion.
8593     */
8594    @Child(name = "action", type = {}, order = 3, min = 1, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
8595    @Description(shortDefinition = "A test operation or assert to perform", formalDefinition = "Action would contain either an operation or an assertion.")
8596    protected List<TestActionComponent> action;
8597
8598    private static final long serialVersionUID = -865006110L;
8599
8600    /**
8601     * Constructor
8602     */
8603    public TestScriptTestComponent() {
8604      super();
8605    }
8606
8607    /**
8608     * @return {@link #name} (The name of this test used for tracking/logging
8609     *         purposes by test engines.). This is the underlying object with id,
8610     *         value and extensions. The accessor "getName" gives direct access to
8611     *         the value
8612     */
8613    public StringType getNameElement() {
8614      if (this.name == null)
8615        if (Configuration.errorOnAutoCreate())
8616          throw new Error("Attempt to auto-create TestScriptTestComponent.name");
8617        else if (Configuration.doAutoCreate())
8618          this.name = new StringType(); // bb
8619      return this.name;
8620    }
8621
8622    public boolean hasNameElement() {
8623      return this.name != null && !this.name.isEmpty();
8624    }
8625
8626    public boolean hasName() {
8627      return this.name != null && !this.name.isEmpty();
8628    }
8629
8630    /**
8631     * @param value {@link #name} (The name of this test used for tracking/logging
8632     *              purposes by test engines.). This is the underlying object with
8633     *              id, value and extensions. The accessor "getName" gives direct
8634     *              access to the value
8635     */
8636    public TestScriptTestComponent setNameElement(StringType value) {
8637      this.name = value;
8638      return this;
8639    }
8640
8641    /**
8642     * @return The name of this test used for tracking/logging purposes by test
8643     *         engines.
8644     */
8645    public String getName() {
8646      return this.name == null ? null : this.name.getValue();
8647    }
8648
8649    /**
8650     * @param value The name of this test used for tracking/logging purposes by test
8651     *              engines.
8652     */
8653    public TestScriptTestComponent setName(String value) {
8654      if (Utilities.noString(value))
8655        this.name = null;
8656      else {
8657        if (this.name == null)
8658          this.name = new StringType();
8659        this.name.setValue(value);
8660      }
8661      return this;
8662    }
8663
8664    /**
8665     * @return {@link #description} (A short description of the test used by test
8666     *         engines for tracking and reporting purposes.). This is the underlying
8667     *         object with id, value and extensions. The accessor "getDescription"
8668     *         gives direct access to the value
8669     */
8670    public StringType getDescriptionElement() {
8671      if (this.description == null)
8672        if (Configuration.errorOnAutoCreate())
8673          throw new Error("Attempt to auto-create TestScriptTestComponent.description");
8674        else if (Configuration.doAutoCreate())
8675          this.description = new StringType(); // bb
8676      return this.description;
8677    }
8678
8679    public boolean hasDescriptionElement() {
8680      return this.description != null && !this.description.isEmpty();
8681    }
8682
8683    public boolean hasDescription() {
8684      return this.description != null && !this.description.isEmpty();
8685    }
8686
8687    /**
8688     * @param value {@link #description} (A short description of the test used by
8689     *              test engines for tracking and reporting purposes.). This is the
8690     *              underlying object with id, value and extensions. The accessor
8691     *              "getDescription" gives direct access to the value
8692     */
8693    public TestScriptTestComponent setDescriptionElement(StringType value) {
8694      this.description = value;
8695      return this;
8696    }
8697
8698    /**
8699     * @return A short description of the test used by test engines for tracking and
8700     *         reporting purposes.
8701     */
8702    public String getDescription() {
8703      return this.description == null ? null : this.description.getValue();
8704    }
8705
8706    /**
8707     * @param value A short description of the test used by test engines for
8708     *              tracking and reporting purposes.
8709     */
8710    public TestScriptTestComponent setDescription(String value) {
8711      if (Utilities.noString(value))
8712        this.description = null;
8713      else {
8714        if (this.description == null)
8715          this.description = new StringType();
8716        this.description.setValue(value);
8717      }
8718      return this;
8719    }
8720
8721    /**
8722     * @return {@link #action} (Action would contain either an operation or an
8723     *         assertion.)
8724     */
8725    public List<TestActionComponent> getAction() {
8726      if (this.action == null)
8727        this.action = new ArrayList<TestActionComponent>();
8728      return this.action;
8729    }
8730
8731    /**
8732     * @return Returns a reference to <code>this</code> for easy method chaining
8733     */
8734    public TestScriptTestComponent setAction(List<TestActionComponent> theAction) {
8735      this.action = theAction;
8736      return this;
8737    }
8738
8739    public boolean hasAction() {
8740      if (this.action == null)
8741        return false;
8742      for (TestActionComponent item : this.action)
8743        if (!item.isEmpty())
8744          return true;
8745      return false;
8746    }
8747
8748    public TestActionComponent addAction() { // 3
8749      TestActionComponent t = new TestActionComponent();
8750      if (this.action == null)
8751        this.action = new ArrayList<TestActionComponent>();
8752      this.action.add(t);
8753      return t;
8754    }
8755
8756    public TestScriptTestComponent addAction(TestActionComponent t) { // 3
8757      if (t == null)
8758        return this;
8759      if (this.action == null)
8760        this.action = new ArrayList<TestActionComponent>();
8761      this.action.add(t);
8762      return this;
8763    }
8764
8765    /**
8766     * @return The first repetition of repeating field {@link #action}, creating it
8767     *         if it does not already exist
8768     */
8769    public TestActionComponent getActionFirstRep() {
8770      if (getAction().isEmpty()) {
8771        addAction();
8772      }
8773      return getAction().get(0);
8774    }
8775
8776    protected void listChildren(List<Property> children) {
8777      super.listChildren(children);
8778      children.add(new Property("name", "string",
8779          "The name of this test used for tracking/logging purposes by test engines.", 0, 1, name));
8780      children.add(new Property("description", "string",
8781          "A short description of the test used by test engines for tracking and reporting purposes.", 0, 1,
8782          description));
8783      children.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0,
8784          java.lang.Integer.MAX_VALUE, action));
8785    }
8786
8787    @Override
8788    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
8789      switch (_hash) {
8790      case 3373707:
8791        /* name */ return new Property("name", "string",
8792            "The name of this test used for tracking/logging purposes by test engines.", 0, 1, name);
8793      case -1724546052:
8794        /* description */ return new Property("description", "string",
8795            "A short description of the test used by test engines for tracking and reporting purposes.", 0, 1,
8796            description);
8797      case -1422950858:
8798        /* action */ return new Property("action", "", "Action would contain either an operation or an assertion.", 0,
8799            java.lang.Integer.MAX_VALUE, action);
8800      default:
8801        return super.getNamedProperty(_hash, _name, _checkValid);
8802      }
8803
8804    }
8805
8806    @Override
8807    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
8808      switch (hash) {
8809      case 3373707:
8810        /* name */ return this.name == null ? new Base[0] : new Base[] { this.name }; // StringType
8811      case -1724546052:
8812        /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // StringType
8813      case -1422950858:
8814        /* action */ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // TestActionComponent
8815      default:
8816        return super.getProperty(hash, name, checkValid);
8817      }
8818
8819    }
8820
8821    @Override
8822    public Base setProperty(int hash, String name, Base value) throws FHIRException {
8823      switch (hash) {
8824      case 3373707: // name
8825        this.name = castToString(value); // StringType
8826        return value;
8827      case -1724546052: // description
8828        this.description = castToString(value); // StringType
8829        return value;
8830      case -1422950858: // action
8831        this.getAction().add((TestActionComponent) value); // TestActionComponent
8832        return value;
8833      default:
8834        return super.setProperty(hash, name, value);
8835      }
8836
8837    }
8838
8839    @Override
8840    public Base setProperty(String name, Base value) throws FHIRException {
8841      if (name.equals("name")) {
8842        this.name = castToString(value); // StringType
8843      } else if (name.equals("description")) {
8844        this.description = castToString(value); // StringType
8845      } else if (name.equals("action")) {
8846        this.getAction().add((TestActionComponent) value);
8847      } else
8848        return super.setProperty(name, value);
8849      return value;
8850    }
8851
8852  @Override
8853  public void removeChild(String name, Base value) throws FHIRException {
8854      if (name.equals("name")) {
8855        this.name = null;
8856      } else if (name.equals("description")) {
8857        this.description = null;
8858      } else if (name.equals("action")) {
8859        this.getAction().remove((TestActionComponent) value);
8860      } else
8861        super.removeChild(name, value);
8862      
8863    }
8864
8865    @Override
8866    public Base makeProperty(int hash, String name) throws FHIRException {
8867      switch (hash) {
8868      case 3373707:
8869        return getNameElement();
8870      case -1724546052:
8871        return getDescriptionElement();
8872      case -1422950858:
8873        return addAction();
8874      default:
8875        return super.makeProperty(hash, name);
8876      }
8877
8878    }
8879
8880    @Override
8881    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
8882      switch (hash) {
8883      case 3373707:
8884        /* name */ return new String[] { "string" };
8885      case -1724546052:
8886        /* description */ return new String[] { "string" };
8887      case -1422950858:
8888        /* action */ return new String[] {};
8889      default:
8890        return super.getTypesForProperty(hash, name);
8891      }
8892
8893    }
8894
8895    @Override
8896    public Base addChild(String name) throws FHIRException {
8897      if (name.equals("name")) {
8898        throw new FHIRException("Cannot call addChild on a singleton property TestScript.name");
8899      } else if (name.equals("description")) {
8900        throw new FHIRException("Cannot call addChild on a singleton property TestScript.description");
8901      } else if (name.equals("action")) {
8902        return addAction();
8903      } else
8904        return super.addChild(name);
8905    }
8906
8907    public TestScriptTestComponent copy() {
8908      TestScriptTestComponent dst = new TestScriptTestComponent();
8909      copyValues(dst);
8910      return dst;
8911    }
8912
8913    public void copyValues(TestScriptTestComponent dst) {
8914      super.copyValues(dst);
8915      dst.name = name == null ? null : name.copy();
8916      dst.description = description == null ? null : description.copy();
8917      if (action != null) {
8918        dst.action = new ArrayList<TestActionComponent>();
8919        for (TestActionComponent i : action)
8920          dst.action.add(i.copy());
8921      }
8922      ;
8923    }
8924
8925    @Override
8926    public boolean equalsDeep(Base other_) {
8927      if (!super.equalsDeep(other_))
8928        return false;
8929      if (!(other_ instanceof TestScriptTestComponent))
8930        return false;
8931      TestScriptTestComponent o = (TestScriptTestComponent) other_;
8932      return compareDeep(name, o.name, true) && compareDeep(description, o.description, true)
8933          && compareDeep(action, o.action, true);
8934    }
8935
8936    @Override
8937    public boolean equalsShallow(Base other_) {
8938      if (!super.equalsShallow(other_))
8939        return false;
8940      if (!(other_ instanceof TestScriptTestComponent))
8941        return false;
8942      TestScriptTestComponent o = (TestScriptTestComponent) other_;
8943      return compareValues(name, o.name, true) && compareValues(description, o.description, true);
8944    }
8945
8946    public boolean isEmpty() {
8947      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, description, action);
8948    }
8949
8950    public String fhirType() {
8951      return "TestScript.test";
8952
8953    }
8954
8955  }
8956
8957  @Block()
8958  public static class TestActionComponent extends BackboneElement implements IBaseBackboneElement {
8959    /**
8960     * An operation would involve a REST request to a server.
8961     */
8962    @Child(name = "operation", type = {
8963        SetupActionOperationComponent.class }, order = 1, min = 0, max = 1, modifier = false, summary = false)
8964    @Description(shortDefinition = "The setup operation to perform", formalDefinition = "An operation would involve a REST request to a server.")
8965    protected SetupActionOperationComponent operation;
8966
8967    /**
8968     * Evaluates the results of previous operations to determine if the server under
8969     * test behaves appropriately.
8970     */
8971    @Child(name = "assert", type = {
8972        SetupActionAssertComponent.class }, order = 2, min = 0, max = 1, modifier = false, summary = false)
8973    @Description(shortDefinition = "The setup assertion to perform", formalDefinition = "Evaluates the results of previous operations to determine if the server under test behaves appropriately.")
8974    protected SetupActionAssertComponent assert_;
8975
8976    private static final long serialVersionUID = -252088305L;
8977
8978    /**
8979     * Constructor
8980     */
8981    public TestActionComponent() {
8982      super();
8983    }
8984
8985    /**
8986     * @return {@link #operation} (An operation would involve a REST request to a
8987     *         server.)
8988     */
8989    public SetupActionOperationComponent getOperation() {
8990      if (this.operation == null)
8991        if (Configuration.errorOnAutoCreate())
8992          throw new Error("Attempt to auto-create TestActionComponent.operation");
8993        else if (Configuration.doAutoCreate())
8994          this.operation = new SetupActionOperationComponent(); // cc
8995      return this.operation;
8996    }
8997
8998    public boolean hasOperation() {
8999      return this.operation != null && !this.operation.isEmpty();
9000    }
9001
9002    /**
9003     * @param value {@link #operation} (An operation would involve a REST request to
9004     *              a server.)
9005     */
9006    public TestActionComponent setOperation(SetupActionOperationComponent value) {
9007      this.operation = value;
9008      return this;
9009    }
9010
9011    /**
9012     * @return {@link #assert_} (Evaluates the results of previous operations to
9013     *         determine if the server under test behaves appropriately.)
9014     */
9015    public SetupActionAssertComponent getAssert() {
9016      if (this.assert_ == null)
9017        if (Configuration.errorOnAutoCreate())
9018          throw new Error("Attempt to auto-create TestActionComponent.assert_");
9019        else if (Configuration.doAutoCreate())
9020          this.assert_ = new SetupActionAssertComponent(); // cc
9021      return this.assert_;
9022    }
9023
9024    public boolean hasAssert() {
9025      return this.assert_ != null && !this.assert_.isEmpty();
9026    }
9027
9028    /**
9029     * @param value {@link #assert_} (Evaluates the results of previous operations
9030     *              to determine if the server under test behaves appropriately.)
9031     */
9032    public TestActionComponent setAssert(SetupActionAssertComponent value) {
9033      this.assert_ = value;
9034      return this;
9035    }
9036
9037    protected void listChildren(List<Property> children) {
9038      super.listChildren(children);
9039      children.add(new Property("operation", "@TestScript.setup.action.operation",
9040          "An operation would involve a REST request to a server.", 0, 1, operation));
9041      children.add(new Property("assert", "@TestScript.setup.action.assert",
9042          "Evaluates the results of previous operations to determine if the server under test behaves appropriately.",
9043          0, 1, assert_));
9044    }
9045
9046    @Override
9047    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
9048      switch (_hash) {
9049      case 1662702951:
9050        /* operation */ return new Property("operation", "@TestScript.setup.action.operation",
9051            "An operation would involve a REST request to a server.", 0, 1, operation);
9052      case -1408208058:
9053        /* assert */ return new Property("assert", "@TestScript.setup.action.assert",
9054            "Evaluates the results of previous operations to determine if the server under test behaves appropriately.",
9055            0, 1, assert_);
9056      default:
9057        return super.getNamedProperty(_hash, _name, _checkValid);
9058      }
9059
9060    }
9061
9062    @Override
9063    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
9064      switch (hash) {
9065      case 1662702951:
9066        /* operation */ return this.operation == null ? new Base[0] : new Base[] { this.operation }; // SetupActionOperationComponent
9067      case -1408208058:
9068        /* assert */ return this.assert_ == null ? new Base[0] : new Base[] { this.assert_ }; // SetupActionAssertComponent
9069      default:
9070        return super.getProperty(hash, name, checkValid);
9071      }
9072
9073    }
9074
9075    @Override
9076    public Base setProperty(int hash, String name, Base value) throws FHIRException {
9077      switch (hash) {
9078      case 1662702951: // operation
9079        this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
9080        return value;
9081      case -1408208058: // assert
9082        this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
9083        return value;
9084      default:
9085        return super.setProperty(hash, name, value);
9086      }
9087
9088    }
9089
9090    @Override
9091    public Base setProperty(String name, Base value) throws FHIRException {
9092      if (name.equals("operation")) {
9093        this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
9094      } else if (name.equals("assert")) {
9095        this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
9096      } else
9097        return super.setProperty(name, value);
9098      return value;
9099    }
9100
9101  @Override
9102  public void removeChild(String name, Base value) throws FHIRException {
9103      if (name.equals("operation")) {
9104        this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
9105      } else if (name.equals("assert")) {
9106        this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
9107      } else
9108        super.removeChild(name, value);
9109      
9110    }
9111
9112    @Override
9113    public Base makeProperty(int hash, String name) throws FHIRException {
9114      switch (hash) {
9115      case 1662702951:
9116        return getOperation();
9117      case -1408208058:
9118        return getAssert();
9119      default:
9120        return super.makeProperty(hash, name);
9121      }
9122
9123    }
9124
9125    @Override
9126    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
9127      switch (hash) {
9128      case 1662702951:
9129        /* operation */ return new String[] { "@TestScript.setup.action.operation" };
9130      case -1408208058:
9131        /* assert */ return new String[] { "@TestScript.setup.action.assert" };
9132      default:
9133        return super.getTypesForProperty(hash, name);
9134      }
9135
9136    }
9137
9138    @Override
9139    public Base addChild(String name) throws FHIRException {
9140      if (name.equals("operation")) {
9141        this.operation = new SetupActionOperationComponent();
9142        return this.operation;
9143      } else if (name.equals("assert")) {
9144        this.assert_ = new SetupActionAssertComponent();
9145        return this.assert_;
9146      } else
9147        return super.addChild(name);
9148    }
9149
9150    public TestActionComponent copy() {
9151      TestActionComponent dst = new TestActionComponent();
9152      copyValues(dst);
9153      return dst;
9154    }
9155
9156    public void copyValues(TestActionComponent dst) {
9157      super.copyValues(dst);
9158      dst.operation = operation == null ? null : operation.copy();
9159      dst.assert_ = assert_ == null ? null : assert_.copy();
9160    }
9161
9162    @Override
9163    public boolean equalsDeep(Base other_) {
9164      if (!super.equalsDeep(other_))
9165        return false;
9166      if (!(other_ instanceof TestActionComponent))
9167        return false;
9168      TestActionComponent o = (TestActionComponent) other_;
9169      return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true);
9170    }
9171
9172    @Override
9173    public boolean equalsShallow(Base other_) {
9174      if (!super.equalsShallow(other_))
9175        return false;
9176      if (!(other_ instanceof TestActionComponent))
9177        return false;
9178      TestActionComponent o = (TestActionComponent) other_;
9179      return true;
9180    }
9181
9182    public boolean isEmpty() {
9183      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation, assert_);
9184    }
9185
9186    public String fhirType() {
9187      return "TestScript.test.action";
9188
9189    }
9190
9191  }
9192
9193  @Block()
9194  public static class TestScriptTeardownComponent extends BackboneElement implements IBaseBackboneElement {
9195    /**
9196     * The teardown action will only contain an operation.
9197     */
9198    @Child(name = "action", type = {}, order = 1, min = 1, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
9199    @Description(shortDefinition = "One or more teardown operations to perform", formalDefinition = "The teardown action will only contain an operation.")
9200    protected List<TeardownActionComponent> action;
9201
9202    private static final long serialVersionUID = 1168638089L;
9203
9204    /**
9205     * Constructor
9206     */
9207    public TestScriptTeardownComponent() {
9208      super();
9209    }
9210
9211    /**
9212     * @return {@link #action} (The teardown action will only contain an operation.)
9213     */
9214    public List<TeardownActionComponent> getAction() {
9215      if (this.action == null)
9216        this.action = new ArrayList<TeardownActionComponent>();
9217      return this.action;
9218    }
9219
9220    /**
9221     * @return Returns a reference to <code>this</code> for easy method chaining
9222     */
9223    public TestScriptTeardownComponent setAction(List<TeardownActionComponent> theAction) {
9224      this.action = theAction;
9225      return this;
9226    }
9227
9228    public boolean hasAction() {
9229      if (this.action == null)
9230        return false;
9231      for (TeardownActionComponent item : this.action)
9232        if (!item.isEmpty())
9233          return true;
9234      return false;
9235    }
9236
9237    public TeardownActionComponent addAction() { // 3
9238      TeardownActionComponent t = new TeardownActionComponent();
9239      if (this.action == null)
9240        this.action = new ArrayList<TeardownActionComponent>();
9241      this.action.add(t);
9242      return t;
9243    }
9244
9245    public TestScriptTeardownComponent addAction(TeardownActionComponent t) { // 3
9246      if (t == null)
9247        return this;
9248      if (this.action == null)
9249        this.action = new ArrayList<TeardownActionComponent>();
9250      this.action.add(t);
9251      return this;
9252    }
9253
9254    /**
9255     * @return The first repetition of repeating field {@link #action}, creating it
9256     *         if it does not already exist
9257     */
9258    public TeardownActionComponent getActionFirstRep() {
9259      if (getAction().isEmpty()) {
9260        addAction();
9261      }
9262      return getAction().get(0);
9263    }
9264
9265    protected void listChildren(List<Property> children) {
9266      super.listChildren(children);
9267      children.add(new Property("action", "", "The teardown action will only contain an operation.", 0,
9268          java.lang.Integer.MAX_VALUE, action));
9269    }
9270
9271    @Override
9272    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
9273      switch (_hash) {
9274      case -1422950858:
9275        /* action */ return new Property("action", "", "The teardown action will only contain an operation.", 0,
9276            java.lang.Integer.MAX_VALUE, action);
9277      default:
9278        return super.getNamedProperty(_hash, _name, _checkValid);
9279      }
9280
9281    }
9282
9283    @Override
9284    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
9285      switch (hash) {
9286      case -1422950858:
9287        /* action */ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // TeardownActionComponent
9288      default:
9289        return super.getProperty(hash, name, checkValid);
9290      }
9291
9292    }
9293
9294    @Override
9295    public Base setProperty(int hash, String name, Base value) throws FHIRException {
9296      switch (hash) {
9297      case -1422950858: // action
9298        this.getAction().add((TeardownActionComponent) value); // TeardownActionComponent
9299        return value;
9300      default:
9301        return super.setProperty(hash, name, value);
9302      }
9303
9304    }
9305
9306    @Override
9307    public Base setProperty(String name, Base value) throws FHIRException {
9308      if (name.equals("action")) {
9309        this.getAction().add((TeardownActionComponent) value);
9310      } else
9311        return super.setProperty(name, value);
9312      return value;
9313    }
9314
9315  @Override
9316  public void removeChild(String name, Base value) throws FHIRException {
9317      if (name.equals("action")) {
9318        this.getAction().remove((TeardownActionComponent) value);
9319      } else
9320        super.removeChild(name, value);
9321      
9322    }
9323
9324    @Override
9325    public Base makeProperty(int hash, String name) throws FHIRException {
9326      switch (hash) {
9327      case -1422950858:
9328        return addAction();
9329      default:
9330        return super.makeProperty(hash, name);
9331      }
9332
9333    }
9334
9335    @Override
9336    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
9337      switch (hash) {
9338      case -1422950858:
9339        /* action */ return new String[] {};
9340      default:
9341        return super.getTypesForProperty(hash, name);
9342      }
9343
9344    }
9345
9346    @Override
9347    public Base addChild(String name) throws FHIRException {
9348      if (name.equals("action")) {
9349        return addAction();
9350      } else
9351        return super.addChild(name);
9352    }
9353
9354    public TestScriptTeardownComponent copy() {
9355      TestScriptTeardownComponent dst = new TestScriptTeardownComponent();
9356      copyValues(dst);
9357      return dst;
9358    }
9359
9360    public void copyValues(TestScriptTeardownComponent dst) {
9361      super.copyValues(dst);
9362      if (action != null) {
9363        dst.action = new ArrayList<TeardownActionComponent>();
9364        for (TeardownActionComponent i : action)
9365          dst.action.add(i.copy());
9366      }
9367      ;
9368    }
9369
9370    @Override
9371    public boolean equalsDeep(Base other_) {
9372      if (!super.equalsDeep(other_))
9373        return false;
9374      if (!(other_ instanceof TestScriptTeardownComponent))
9375        return false;
9376      TestScriptTeardownComponent o = (TestScriptTeardownComponent) other_;
9377      return compareDeep(action, o.action, true);
9378    }
9379
9380    @Override
9381    public boolean equalsShallow(Base other_) {
9382      if (!super.equalsShallow(other_))
9383        return false;
9384      if (!(other_ instanceof TestScriptTeardownComponent))
9385        return false;
9386      TestScriptTeardownComponent o = (TestScriptTeardownComponent) other_;
9387      return true;
9388    }
9389
9390    public boolean isEmpty() {
9391      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(action);
9392    }
9393
9394    public String fhirType() {
9395      return "TestScript.teardown";
9396
9397    }
9398
9399  }
9400
9401  @Block()
9402  public static class TeardownActionComponent extends BackboneElement implements IBaseBackboneElement {
9403    /**
9404     * An operation would involve a REST request to a server.
9405     */
9406    @Child(name = "operation", type = {
9407        SetupActionOperationComponent.class }, order = 1, min = 1, max = 1, modifier = false, summary = false)
9408    @Description(shortDefinition = "The teardown operation to perform", formalDefinition = "An operation would involve a REST request to a server.")
9409    protected SetupActionOperationComponent operation;
9410
9411    private static final long serialVersionUID = -1099598054L;
9412
9413    /**
9414     * Constructor
9415     */
9416    public TeardownActionComponent() {
9417      super();
9418    }
9419
9420    /**
9421     * Constructor
9422     */
9423    public TeardownActionComponent(SetupActionOperationComponent operation) {
9424      super();
9425      this.operation = operation;
9426    }
9427
9428    /**
9429     * @return {@link #operation} (An operation would involve a REST request to a
9430     *         server.)
9431     */
9432    public SetupActionOperationComponent getOperation() {
9433      if (this.operation == null)
9434        if (Configuration.errorOnAutoCreate())
9435          throw new Error("Attempt to auto-create TeardownActionComponent.operation");
9436        else if (Configuration.doAutoCreate())
9437          this.operation = new SetupActionOperationComponent(); // cc
9438      return this.operation;
9439    }
9440
9441    public boolean hasOperation() {
9442      return this.operation != null && !this.operation.isEmpty();
9443    }
9444
9445    /**
9446     * @param value {@link #operation} (An operation would involve a REST request to
9447     *              a server.)
9448     */
9449    public TeardownActionComponent setOperation(SetupActionOperationComponent value) {
9450      this.operation = value;
9451      return this;
9452    }
9453
9454    protected void listChildren(List<Property> children) {
9455      super.listChildren(children);
9456      children.add(new Property("operation", "@TestScript.setup.action.operation",
9457          "An operation would involve a REST request to a server.", 0, 1, operation));
9458    }
9459
9460    @Override
9461    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
9462      switch (_hash) {
9463      case 1662702951:
9464        /* operation */ return new Property("operation", "@TestScript.setup.action.operation",
9465            "An operation would involve a REST request to a server.", 0, 1, operation);
9466      default:
9467        return super.getNamedProperty(_hash, _name, _checkValid);
9468      }
9469
9470    }
9471
9472    @Override
9473    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
9474      switch (hash) {
9475      case 1662702951:
9476        /* operation */ return this.operation == null ? new Base[0] : new Base[] { this.operation }; // SetupActionOperationComponent
9477      default:
9478        return super.getProperty(hash, name, checkValid);
9479      }
9480
9481    }
9482
9483    @Override
9484    public Base setProperty(int hash, String name, Base value) throws FHIRException {
9485      switch (hash) {
9486      case 1662702951: // operation
9487        this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
9488        return value;
9489      default:
9490        return super.setProperty(hash, name, value);
9491      }
9492
9493    }
9494
9495    @Override
9496    public Base setProperty(String name, Base value) throws FHIRException {
9497      if (name.equals("operation")) {
9498        this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
9499      } else
9500        return super.setProperty(name, value);
9501      return value;
9502    }
9503
9504  @Override
9505  public void removeChild(String name, Base value) throws FHIRException {
9506      if (name.equals("operation")) {
9507        this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
9508      } else
9509        super.removeChild(name, value);
9510      
9511    }
9512
9513    @Override
9514    public Base makeProperty(int hash, String name) throws FHIRException {
9515      switch (hash) {
9516      case 1662702951:
9517        return getOperation();
9518      default:
9519        return super.makeProperty(hash, name);
9520      }
9521
9522    }
9523
9524    @Override
9525    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
9526      switch (hash) {
9527      case 1662702951:
9528        /* operation */ return new String[] { "@TestScript.setup.action.operation" };
9529      default:
9530        return super.getTypesForProperty(hash, name);
9531      }
9532
9533    }
9534
9535    @Override
9536    public Base addChild(String name) throws FHIRException {
9537      if (name.equals("operation")) {
9538        this.operation = new SetupActionOperationComponent();
9539        return this.operation;
9540      } else
9541        return super.addChild(name);
9542    }
9543
9544    public TeardownActionComponent copy() {
9545      TeardownActionComponent dst = new TeardownActionComponent();
9546      copyValues(dst);
9547      return dst;
9548    }
9549
9550    public void copyValues(TeardownActionComponent dst) {
9551      super.copyValues(dst);
9552      dst.operation = operation == null ? null : operation.copy();
9553    }
9554
9555    @Override
9556    public boolean equalsDeep(Base other_) {
9557      if (!super.equalsDeep(other_))
9558        return false;
9559      if (!(other_ instanceof TeardownActionComponent))
9560        return false;
9561      TeardownActionComponent o = (TeardownActionComponent) other_;
9562      return compareDeep(operation, o.operation, true);
9563    }
9564
9565    @Override
9566    public boolean equalsShallow(Base other_) {
9567      if (!super.equalsShallow(other_))
9568        return false;
9569      if (!(other_ instanceof TeardownActionComponent))
9570        return false;
9571      TeardownActionComponent o = (TeardownActionComponent) other_;
9572      return true;
9573    }
9574
9575    public boolean isEmpty() {
9576      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation);
9577    }
9578
9579    public String fhirType() {
9580      return "TestScript.teardown.action";
9581
9582    }
9583
9584  }
9585
9586  /**
9587   * A formal identifier that is used to identify this test script when it is
9588   * represented in other formats, or referenced in a specification, model, design
9589   * or an instance.
9590   */
9591  @Child(name = "identifier", type = {
9592      Identifier.class }, order = 0, min = 0, max = 1, modifier = false, summary = true)
9593  @Description(shortDefinition = "Additional identifier for the test script", formalDefinition = "A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instance.")
9594  protected Identifier identifier;
9595
9596  /**
9597   * Explanation of why this test script is needed and why it has been designed as
9598   * it has.
9599   */
9600  @Child(name = "purpose", type = {
9601      MarkdownType.class }, order = 1, min = 0, max = 1, modifier = false, summary = false)
9602  @Description(shortDefinition = "Why this test script is defined", formalDefinition = "Explanation of why this test script is needed and why it has been designed as it has.")
9603  protected MarkdownType purpose;
9604
9605  /**
9606   * A copyright statement relating to the test script and/or its contents.
9607   * Copyright statements are generally legal restrictions on the use and
9608   * publishing of the test script.
9609   */
9610  @Child(name = "copyright", type = {
9611      MarkdownType.class }, order = 2, min = 0, max = 1, modifier = false, summary = false)
9612  @Description(shortDefinition = "Use and/or publishing restrictions", formalDefinition = "A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script.")
9613  protected MarkdownType copyright;
9614
9615  /**
9616   * An abstract server used in operations within this test script in the origin
9617   * element.
9618   */
9619  @Child(name = "origin", type = {}, order = 3, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
9620  @Description(shortDefinition = "An abstract server representing a client or sender in a message exchange", formalDefinition = "An abstract server used in operations within this test script in the origin element.")
9621  protected List<TestScriptOriginComponent> origin;
9622
9623  /**
9624   * An abstract server used in operations within this test script in the
9625   * destination element.
9626   */
9627  @Child(name = "destination", type = {}, order = 4, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
9628  @Description(shortDefinition = "An abstract server representing a destination or receiver in a message exchange", formalDefinition = "An abstract server used in operations within this test script in the destination element.")
9629  protected List<TestScriptDestinationComponent> destination;
9630
9631  /**
9632   * The required capability must exist and are assumed to function correctly on
9633   * the FHIR server being tested.
9634   */
9635  @Child(name = "metadata", type = {}, order = 5, min = 0, max = 1, modifier = false, summary = false)
9636  @Description(shortDefinition = "Required capability that is assumed to function correctly on the FHIR server being tested", formalDefinition = "The required capability must exist and are assumed to function correctly on the FHIR server being tested.")
9637  protected TestScriptMetadataComponent metadata;
9638
9639  /**
9640   * Fixture in the test script - by reference (uri). All fixtures are required
9641   * for the test script to execute.
9642   */
9643  @Child(name = "fixture", type = {}, order = 6, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
9644  @Description(shortDefinition = "Fixture in the test script - by reference (uri)", formalDefinition = "Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.")
9645  protected List<TestScriptFixtureComponent> fixture;
9646
9647  /**
9648   * Reference to the profile to be used for validation.
9649   */
9650  @Child(name = "profile", type = {
9651      Reference.class }, order = 7, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
9652  @Description(shortDefinition = "Reference of the validation profile", formalDefinition = "Reference to the profile to be used for validation.")
9653  protected List<Reference> profile;
9654  /**
9655   * The actual objects that are the target of the reference (Reference to the
9656   * profile to be used for validation.)
9657   */
9658  protected List<Resource> profileTarget;
9659
9660  /**
9661   * Variable is set based either on element value in response body or on header
9662   * field value in the response headers.
9663   */
9664  @Child(name = "variable", type = {}, order = 8, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
9665  @Description(shortDefinition = "Placeholder for evaluated elements", formalDefinition = "Variable is set based either on element value in response body or on header field value in the response headers.")
9666  protected List<TestScriptVariableComponent> variable;
9667
9668  /**
9669   * A series of required setup operations before tests are executed.
9670   */
9671  @Child(name = "setup", type = {}, order = 9, min = 0, max = 1, modifier = false, summary = false)
9672  @Description(shortDefinition = "A series of required setup operations before tests are executed", formalDefinition = "A series of required setup operations before tests are executed.")
9673  protected TestScriptSetupComponent setup;
9674
9675  /**
9676   * A test in this script.
9677   */
9678  @Child(name = "test", type = {}, order = 10, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
9679  @Description(shortDefinition = "A test in this script", formalDefinition = "A test in this script.")
9680  protected List<TestScriptTestComponent> test;
9681
9682  /**
9683   * A series of operations required to clean up after all the tests are executed
9684   * (successfully or otherwise).
9685   */
9686  @Child(name = "teardown", type = {}, order = 11, min = 0, max = 1, modifier = false, summary = false)
9687  @Description(shortDefinition = "A series of required clean up steps", formalDefinition = "A series of operations required to clean up after all the tests are executed (successfully or otherwise).")
9688  protected TestScriptTeardownComponent teardown;
9689
9690  private static final long serialVersionUID = -1433230137L;
9691
9692  /**
9693   * Constructor
9694   */
9695  public TestScript() {
9696    super();
9697  }
9698
9699  /**
9700   * Constructor
9701   */
9702  public TestScript(UriType url, StringType name, Enumeration<PublicationStatus> status) {
9703    super();
9704    this.url = url;
9705    this.name = name;
9706    this.status = status;
9707  }
9708
9709  /**
9710   * @return {@link #url} (An absolute URI that is used to identify this test
9711   *         script when it is referenced in a specification, model, design or an
9712   *         instance; also called its canonical identifier. This SHOULD be
9713   *         globally unique and SHOULD be a literal address at which at which an
9714   *         authoritative instance of this test script is (or will be) published.
9715   *         This URL can be the target of a canonical reference. It SHALL remain
9716   *         the same when the test script is stored on different servers.). This
9717   *         is the underlying object with id, value and extensions. The accessor
9718   *         "getUrl" gives direct access to the value
9719   */
9720  public UriType getUrlElement() {
9721    if (this.url == null)
9722      if (Configuration.errorOnAutoCreate())
9723        throw new Error("Attempt to auto-create TestScript.url");
9724      else if (Configuration.doAutoCreate())
9725        this.url = new UriType(); // bb
9726    return this.url;
9727  }
9728
9729  public boolean hasUrlElement() {
9730    return this.url != null && !this.url.isEmpty();
9731  }
9732
9733  public boolean hasUrl() {
9734    return this.url != null && !this.url.isEmpty();
9735  }
9736
9737  /**
9738   * @param value {@link #url} (An absolute URI that is used to identify this test
9739   *              script when it is referenced in a specification, model, design
9740   *              or an instance; also called its canonical identifier. This
9741   *              SHOULD be globally unique and SHOULD be a literal address at
9742   *              which at which an authoritative instance of this test script is
9743   *              (or will be) published. This URL can be the target of a
9744   *              canonical reference. It SHALL remain the same when the test
9745   *              script is stored on different servers.). This is the underlying
9746   *              object with id, value and extensions. The accessor "getUrl"
9747   *              gives direct access to the value
9748   */
9749  public TestScript setUrlElement(UriType value) {
9750    this.url = value;
9751    return this;
9752  }
9753
9754  /**
9755   * @return An absolute URI that is used to identify this test script when it is
9756   *         referenced in a specification, model, design or an instance; also
9757   *         called its canonical identifier. This SHOULD be globally unique and
9758   *         SHOULD be a literal address at which at which an authoritative
9759   *         instance of this test script is (or will be) published. This URL can
9760   *         be the target of a canonical reference. It SHALL remain the same when
9761   *         the test script is stored on different servers.
9762   */
9763  public String getUrl() {
9764    return this.url == null ? null : this.url.getValue();
9765  }
9766
9767  /**
9768   * @param value An absolute URI that is used to identify this test script when
9769   *              it is referenced in a specification, model, design or an
9770   *              instance; also called its canonical identifier. This SHOULD be
9771   *              globally unique and SHOULD be a literal address at which at
9772   *              which an authoritative instance of this test script is (or will
9773   *              be) published. This URL can be the target of a canonical
9774   *              reference. It SHALL remain the same when the test script is
9775   *              stored on different servers.
9776   */
9777  public TestScript setUrl(String value) {
9778    if (this.url == null)
9779      this.url = new UriType();
9780    this.url.setValue(value);
9781    return this;
9782  }
9783
9784  /**
9785   * @return {@link #identifier} (A formal identifier that is used to identify
9786   *         this test script when it is represented in other formats, or
9787   *         referenced in a specification, model, design or an instance.)
9788   */
9789  public Identifier getIdentifier() {
9790    if (this.identifier == null)
9791      if (Configuration.errorOnAutoCreate())
9792        throw new Error("Attempt to auto-create TestScript.identifier");
9793      else if (Configuration.doAutoCreate())
9794        this.identifier = new Identifier(); // cc
9795    return this.identifier;
9796  }
9797
9798  public boolean hasIdentifier() {
9799    return this.identifier != null && !this.identifier.isEmpty();
9800  }
9801
9802  /**
9803   * @param value {@link #identifier} (A formal identifier that is used to
9804   *              identify this test script when it is represented in other
9805   *              formats, or referenced in a specification, model, design or an
9806   *              instance.)
9807   */
9808  public TestScript setIdentifier(Identifier value) {
9809    this.identifier = value;
9810    return this;
9811  }
9812
9813  /**
9814   * @return {@link #version} (The identifier that is used to identify this
9815   *         version of the test script when it is referenced in a specification,
9816   *         model, design or instance. This is an arbitrary value managed by the
9817   *         test script author and is not expected to be globally unique. For
9818   *         example, it might be a timestamp (e.g. yyyymmdd) if a managed version
9819   *         is not available. There is also no expectation that versions can be
9820   *         placed in a lexicographical sequence.). This is the underlying object
9821   *         with id, value and extensions. The accessor "getVersion" gives direct
9822   *         access to the value
9823   */
9824  public StringType getVersionElement() {
9825    if (this.version == null)
9826      if (Configuration.errorOnAutoCreate())
9827        throw new Error("Attempt to auto-create TestScript.version");
9828      else if (Configuration.doAutoCreate())
9829        this.version = new StringType(); // bb
9830    return this.version;
9831  }
9832
9833  public boolean hasVersionElement() {
9834    return this.version != null && !this.version.isEmpty();
9835  }
9836
9837  public boolean hasVersion() {
9838    return this.version != null && !this.version.isEmpty();
9839  }
9840
9841  /**
9842   * @param value {@link #version} (The identifier that is used to identify this
9843   *              version of the test script when it is referenced in a
9844   *              specification, model, design or instance. This is an arbitrary
9845   *              value managed by the test script author and is not expected to
9846   *              be globally unique. For example, it might be a timestamp (e.g.
9847   *              yyyymmdd) if a managed version is not available. There is also
9848   *              no expectation that versions can be placed in a lexicographical
9849   *              sequence.). This is the underlying object with id, value and
9850   *              extensions. The accessor "getVersion" gives direct access to the
9851   *              value
9852   */
9853  public TestScript setVersionElement(StringType value) {
9854    this.version = value;
9855    return this;
9856  }
9857
9858  /**
9859   * @return The identifier that is used to identify this version of the test
9860   *         script when it is referenced in a specification, model, design or
9861   *         instance. This is an arbitrary value managed by the test script
9862   *         author and is not expected to be globally unique. For example, it
9863   *         might be a timestamp (e.g. yyyymmdd) if a managed version is not
9864   *         available. There is also no expectation that versions can be placed
9865   *         in a lexicographical sequence.
9866   */
9867  public String getVersion() {
9868    return this.version == null ? null : this.version.getValue();
9869  }
9870
9871  /**
9872   * @param value The identifier that is used to identify this version of the test
9873   *              script when it is referenced in a specification, model, design
9874   *              or instance. This is an arbitrary value managed by the test
9875   *              script author and is not expected to be globally unique. For
9876   *              example, it might be a timestamp (e.g. yyyymmdd) if a managed
9877   *              version is not available. There is also no expectation that
9878   *              versions can be placed in a lexicographical sequence.
9879   */
9880  public TestScript setVersion(String value) {
9881    if (Utilities.noString(value))
9882      this.version = null;
9883    else {
9884      if (this.version == null)
9885        this.version = new StringType();
9886      this.version.setValue(value);
9887    }
9888    return this;
9889  }
9890
9891  /**
9892   * @return {@link #name} (A natural language name identifying the test script.
9893   *         This name should be usable as an identifier for the module by machine
9894   *         processing applications such as code generation.). This is the
9895   *         underlying object with id, value and extensions. The accessor
9896   *         "getName" gives direct access to the value
9897   */
9898  public StringType getNameElement() {
9899    if (this.name == null)
9900      if (Configuration.errorOnAutoCreate())
9901        throw new Error("Attempt to auto-create TestScript.name");
9902      else if (Configuration.doAutoCreate())
9903        this.name = new StringType(); // bb
9904    return this.name;
9905  }
9906
9907  public boolean hasNameElement() {
9908    return this.name != null && !this.name.isEmpty();
9909  }
9910
9911  public boolean hasName() {
9912    return this.name != null && !this.name.isEmpty();
9913  }
9914
9915  /**
9916   * @param value {@link #name} (A natural language name identifying the test
9917   *              script. This name should be usable as an identifier for the
9918   *              module by machine processing applications such as code
9919   *              generation.). This is the underlying object with id, value and
9920   *              extensions. The accessor "getName" gives direct access to the
9921   *              value
9922   */
9923  public TestScript setNameElement(StringType value) {
9924    this.name = value;
9925    return this;
9926  }
9927
9928  /**
9929   * @return A natural language name identifying the test script. This name should
9930   *         be usable as an identifier for the module by machine processing
9931   *         applications such as code generation.
9932   */
9933  public String getName() {
9934    return this.name == null ? null : this.name.getValue();
9935  }
9936
9937  /**
9938   * @param value A natural language name identifying the test script. This name
9939   *              should be usable as an identifier for the module by machine
9940   *              processing applications such as code generation.
9941   */
9942  public TestScript setName(String value) {
9943    if (this.name == null)
9944      this.name = new StringType();
9945    this.name.setValue(value);
9946    return this;
9947  }
9948
9949  /**
9950   * @return {@link #title} (A short, descriptive, user-friendly title for the
9951   *         test script.). This is the underlying object with id, value and
9952   *         extensions. The accessor "getTitle" gives direct access to the value
9953   */
9954  public StringType getTitleElement() {
9955    if (this.title == null)
9956      if (Configuration.errorOnAutoCreate())
9957        throw new Error("Attempt to auto-create TestScript.title");
9958      else if (Configuration.doAutoCreate())
9959        this.title = new StringType(); // bb
9960    return this.title;
9961  }
9962
9963  public boolean hasTitleElement() {
9964    return this.title != null && !this.title.isEmpty();
9965  }
9966
9967  public boolean hasTitle() {
9968    return this.title != null && !this.title.isEmpty();
9969  }
9970
9971  /**
9972   * @param value {@link #title} (A short, descriptive, user-friendly title for
9973   *              the test script.). This is the underlying object with id, value
9974   *              and extensions. The accessor "getTitle" gives direct access to
9975   *              the value
9976   */
9977  public TestScript setTitleElement(StringType value) {
9978    this.title = value;
9979    return this;
9980  }
9981
9982  /**
9983   * @return A short, descriptive, user-friendly title for the test script.
9984   */
9985  public String getTitle() {
9986    return this.title == null ? null : this.title.getValue();
9987  }
9988
9989  /**
9990   * @param value A short, descriptive, user-friendly title for the test script.
9991   */
9992  public TestScript setTitle(String value) {
9993    if (Utilities.noString(value))
9994      this.title = null;
9995    else {
9996      if (this.title == null)
9997        this.title = new StringType();
9998      this.title.setValue(value);
9999    }
10000    return this;
10001  }
10002
10003  /**
10004   * @return {@link #status} (The status of this test script. Enables tracking the
10005   *         life-cycle of the content.). This is the underlying object with id,
10006   *         value and extensions. The accessor "getStatus" gives direct access to
10007   *         the value
10008   */
10009  public Enumeration<PublicationStatus> getStatusElement() {
10010    if (this.status == null)
10011      if (Configuration.errorOnAutoCreate())
10012        throw new Error("Attempt to auto-create TestScript.status");
10013      else if (Configuration.doAutoCreate())
10014        this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
10015    return this.status;
10016  }
10017
10018  public boolean hasStatusElement() {
10019    return this.status != null && !this.status.isEmpty();
10020  }
10021
10022  public boolean hasStatus() {
10023    return this.status != null && !this.status.isEmpty();
10024  }
10025
10026  /**
10027   * @param value {@link #status} (The status of this test script. Enables
10028   *              tracking the life-cycle of the content.). This is the underlying
10029   *              object with id, value and extensions. The accessor "getStatus"
10030   *              gives direct access to the value
10031   */
10032  public TestScript setStatusElement(Enumeration<PublicationStatus> value) {
10033    this.status = value;
10034    return this;
10035  }
10036
10037  /**
10038   * @return The status of this test script. Enables tracking the life-cycle of
10039   *         the content.
10040   */
10041  public PublicationStatus getStatus() {
10042    return this.status == null ? null : this.status.getValue();
10043  }
10044
10045  /**
10046   * @param value The status of this test script. Enables tracking the life-cycle
10047   *              of the content.
10048   */
10049  public TestScript setStatus(PublicationStatus value) {
10050    if (this.status == null)
10051      this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
10052    this.status.setValue(value);
10053    return this;
10054  }
10055
10056  /**
10057   * @return {@link #experimental} (A Boolean value to indicate that this test
10058   *         script is authored for testing purposes (or
10059   *         education/evaluation/marketing) and is not intended to be used for
10060   *         genuine usage.). This is the underlying object with id, value and
10061   *         extensions. The accessor "getExperimental" gives direct access to the
10062   *         value
10063   */
10064  public BooleanType getExperimentalElement() {
10065    if (this.experimental == null)
10066      if (Configuration.errorOnAutoCreate())
10067        throw new Error("Attempt to auto-create TestScript.experimental");
10068      else if (Configuration.doAutoCreate())
10069        this.experimental = new BooleanType(); // bb
10070    return this.experimental;
10071  }
10072
10073  public boolean hasExperimentalElement() {
10074    return this.experimental != null && !this.experimental.isEmpty();
10075  }
10076
10077  public boolean hasExperimental() {
10078    return this.experimental != null && !this.experimental.isEmpty();
10079  }
10080
10081  /**
10082   * @param value {@link #experimental} (A Boolean value to indicate that this
10083   *              test script is authored for testing purposes (or
10084   *              education/evaluation/marketing) and is not intended to be used
10085   *              for genuine usage.). This is the underlying object with id,
10086   *              value and extensions. The accessor "getExperimental" gives
10087   *              direct access to the value
10088   */
10089  public TestScript setExperimentalElement(BooleanType value) {
10090    this.experimental = value;
10091    return this;
10092  }
10093
10094  /**
10095   * @return A Boolean value to indicate that this test script is authored for
10096   *         testing purposes (or education/evaluation/marketing) and is not
10097   *         intended to be used for genuine usage.
10098   */
10099  public boolean getExperimental() {
10100    return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
10101  }
10102
10103  /**
10104   * @param value A Boolean value to indicate that this test script is authored
10105   *              for testing purposes (or education/evaluation/marketing) and is
10106   *              not intended to be used for genuine usage.
10107   */
10108  public TestScript setExperimental(boolean value) {
10109    if (this.experimental == null)
10110      this.experimental = new BooleanType();
10111    this.experimental.setValue(value);
10112    return this;
10113  }
10114
10115  /**
10116   * @return {@link #date} (The date (and optionally time) when the test script
10117   *         was published. The date must change when the business version changes
10118   *         and it must change if the status code changes. In addition, it should
10119   *         change when the substantive content of the test script changes.).
10120   *         This is the underlying object with id, value and extensions. The
10121   *         accessor "getDate" gives direct access to the value
10122   */
10123  public DateTimeType getDateElement() {
10124    if (this.date == null)
10125      if (Configuration.errorOnAutoCreate())
10126        throw new Error("Attempt to auto-create TestScript.date");
10127      else if (Configuration.doAutoCreate())
10128        this.date = new DateTimeType(); // bb
10129    return this.date;
10130  }
10131
10132  public boolean hasDateElement() {
10133    return this.date != null && !this.date.isEmpty();
10134  }
10135
10136  public boolean hasDate() {
10137    return this.date != null && !this.date.isEmpty();
10138  }
10139
10140  /**
10141   * @param value {@link #date} (The date (and optionally time) when the test
10142   *              script was published. The date must change when the business
10143   *              version changes and it must change if the status code changes.
10144   *              In addition, it should change when the substantive content of
10145   *              the test script changes.). This is the underlying object with
10146   *              id, value and extensions. The accessor "getDate" gives direct
10147   *              access to the value
10148   */
10149  public TestScript setDateElement(DateTimeType value) {
10150    this.date = value;
10151    return this;
10152  }
10153
10154  /**
10155   * @return The date (and optionally time) when the test script was published.
10156   *         The date must change when the business version changes and it must
10157   *         change if the status code changes. In addition, it should change when
10158   *         the substantive content of the test script changes.
10159   */
10160  public Date getDate() {
10161    return this.date == null ? null : this.date.getValue();
10162  }
10163
10164  /**
10165   * @param value The date (and optionally time) when the test script was
10166   *              published. The date must change when the business version
10167   *              changes and it must change if the status code changes. In
10168   *              addition, it should change when the substantive content of the
10169   *              test script changes.
10170   */
10171  public TestScript setDate(Date value) {
10172    if (value == null)
10173      this.date = null;
10174    else {
10175      if (this.date == null)
10176        this.date = new DateTimeType();
10177      this.date.setValue(value);
10178    }
10179    return this;
10180  }
10181
10182  /**
10183   * @return {@link #publisher} (The name of the organization or individual that
10184   *         published the test script.). This is the underlying object with id,
10185   *         value and extensions. The accessor "getPublisher" gives direct access
10186   *         to the value
10187   */
10188  public StringType getPublisherElement() {
10189    if (this.publisher == null)
10190      if (Configuration.errorOnAutoCreate())
10191        throw new Error("Attempt to auto-create TestScript.publisher");
10192      else if (Configuration.doAutoCreate())
10193        this.publisher = new StringType(); // bb
10194    return this.publisher;
10195  }
10196
10197  public boolean hasPublisherElement() {
10198    return this.publisher != null && !this.publisher.isEmpty();
10199  }
10200
10201  public boolean hasPublisher() {
10202    return this.publisher != null && !this.publisher.isEmpty();
10203  }
10204
10205  /**
10206   * @param value {@link #publisher} (The name of the organization or individual
10207   *              that published the test script.). This is the underlying object
10208   *              with id, value and extensions. The accessor "getPublisher" gives
10209   *              direct access to the value
10210   */
10211  public TestScript setPublisherElement(StringType value) {
10212    this.publisher = value;
10213    return this;
10214  }
10215
10216  /**
10217   * @return The name of the organization or individual that published the test
10218   *         script.
10219   */
10220  public String getPublisher() {
10221    return this.publisher == null ? null : this.publisher.getValue();
10222  }
10223
10224  /**
10225   * @param value The name of the organization or individual that published the
10226   *              test script.
10227   */
10228  public TestScript setPublisher(String value) {
10229    if (Utilities.noString(value))
10230      this.publisher = null;
10231    else {
10232      if (this.publisher == null)
10233        this.publisher = new StringType();
10234      this.publisher.setValue(value);
10235    }
10236    return this;
10237  }
10238
10239  /**
10240   * @return {@link #contact} (Contact details to assist a user in finding and
10241   *         communicating with the publisher.)
10242   */
10243  public List<ContactDetail> getContact() {
10244    if (this.contact == null)
10245      this.contact = new ArrayList<ContactDetail>();
10246    return this.contact;
10247  }
10248
10249  /**
10250   * @return Returns a reference to <code>this</code> for easy method chaining
10251   */
10252  public TestScript setContact(List<ContactDetail> theContact) {
10253    this.contact = theContact;
10254    return this;
10255  }
10256
10257  public boolean hasContact() {
10258    if (this.contact == null)
10259      return false;
10260    for (ContactDetail item : this.contact)
10261      if (!item.isEmpty())
10262        return true;
10263    return false;
10264  }
10265
10266  public ContactDetail addContact() { // 3
10267    ContactDetail t = new ContactDetail();
10268    if (this.contact == null)
10269      this.contact = new ArrayList<ContactDetail>();
10270    this.contact.add(t);
10271    return t;
10272  }
10273
10274  public TestScript addContact(ContactDetail t) { // 3
10275    if (t == null)
10276      return this;
10277    if (this.contact == null)
10278      this.contact = new ArrayList<ContactDetail>();
10279    this.contact.add(t);
10280    return this;
10281  }
10282
10283  /**
10284   * @return The first repetition of repeating field {@link #contact}, creating it
10285   *         if it does not already exist
10286   */
10287  public ContactDetail getContactFirstRep() {
10288    if (getContact().isEmpty()) {
10289      addContact();
10290    }
10291    return getContact().get(0);
10292  }
10293
10294  /**
10295   * @return {@link #description} (A free text natural language description of the
10296   *         test script from a consumer's perspective.). This is the underlying
10297   *         object with id, value and extensions. The accessor "getDescription"
10298   *         gives direct access to the value
10299   */
10300  public MarkdownType getDescriptionElement() {
10301    if (this.description == null)
10302      if (Configuration.errorOnAutoCreate())
10303        throw new Error("Attempt to auto-create TestScript.description");
10304      else if (Configuration.doAutoCreate())
10305        this.description = new MarkdownType(); // bb
10306    return this.description;
10307  }
10308
10309  public boolean hasDescriptionElement() {
10310    return this.description != null && !this.description.isEmpty();
10311  }
10312
10313  public boolean hasDescription() {
10314    return this.description != null && !this.description.isEmpty();
10315  }
10316
10317  /**
10318   * @param value {@link #description} (A free text natural language description
10319   *              of the test script from a consumer's perspective.). This is the
10320   *              underlying object with id, value and extensions. The accessor
10321   *              "getDescription" gives direct access to the value
10322   */
10323  public TestScript setDescriptionElement(MarkdownType value) {
10324    this.description = value;
10325    return this;
10326  }
10327
10328  /**
10329   * @return A free text natural language description of the test script from a
10330   *         consumer's perspective.
10331   */
10332  public String getDescription() {
10333    return this.description == null ? null : this.description.getValue();
10334  }
10335
10336  /**
10337   * @param value A free text natural language description of the test script from
10338   *              a consumer's perspective.
10339   */
10340  public TestScript setDescription(String value) {
10341    if (value == null)
10342      this.description = null;
10343    else {
10344      if (this.description == null)
10345        this.description = new MarkdownType();
10346      this.description.setValue(value);
10347    }
10348    return this;
10349  }
10350
10351  /**
10352   * @return {@link #useContext} (The content was developed with a focus and
10353   *         intent of supporting the contexts that are listed. These contexts may
10354   *         be general categories (gender, age, ...) or may be references to
10355   *         specific programs (insurance plans, studies, ...) and may be used to
10356   *         assist with indexing and searching for appropriate test script
10357   *         instances.)
10358   */
10359  public List<UsageContext> getUseContext() {
10360    if (this.useContext == null)
10361      this.useContext = new ArrayList<UsageContext>();
10362    return this.useContext;
10363  }
10364
10365  /**
10366   * @return Returns a reference to <code>this</code> for easy method chaining
10367   */
10368  public TestScript setUseContext(List<UsageContext> theUseContext) {
10369    this.useContext = theUseContext;
10370    return this;
10371  }
10372
10373  public boolean hasUseContext() {
10374    if (this.useContext == null)
10375      return false;
10376    for (UsageContext item : this.useContext)
10377      if (!item.isEmpty())
10378        return true;
10379    return false;
10380  }
10381
10382  public UsageContext addUseContext() { // 3
10383    UsageContext t = new UsageContext();
10384    if (this.useContext == null)
10385      this.useContext = new ArrayList<UsageContext>();
10386    this.useContext.add(t);
10387    return t;
10388  }
10389
10390  public TestScript addUseContext(UsageContext t) { // 3
10391    if (t == null)
10392      return this;
10393    if (this.useContext == null)
10394      this.useContext = new ArrayList<UsageContext>();
10395    this.useContext.add(t);
10396    return this;
10397  }
10398
10399  /**
10400   * @return The first repetition of repeating field {@link #useContext}, creating
10401   *         it if it does not already exist
10402   */
10403  public UsageContext getUseContextFirstRep() {
10404    if (getUseContext().isEmpty()) {
10405      addUseContext();
10406    }
10407    return getUseContext().get(0);
10408  }
10409
10410  /**
10411   * @return {@link #jurisdiction} (A legal or geographic region in which the test
10412   *         script is intended to be used.)
10413   */
10414  public List<CodeableConcept> getJurisdiction() {
10415    if (this.jurisdiction == null)
10416      this.jurisdiction = new ArrayList<CodeableConcept>();
10417    return this.jurisdiction;
10418  }
10419
10420  /**
10421   * @return Returns a reference to <code>this</code> for easy method chaining
10422   */
10423  public TestScript setJurisdiction(List<CodeableConcept> theJurisdiction) {
10424    this.jurisdiction = theJurisdiction;
10425    return this;
10426  }
10427
10428  public boolean hasJurisdiction() {
10429    if (this.jurisdiction == null)
10430      return false;
10431    for (CodeableConcept item : this.jurisdiction)
10432      if (!item.isEmpty())
10433        return true;
10434    return false;
10435  }
10436
10437  public CodeableConcept addJurisdiction() { // 3
10438    CodeableConcept t = new CodeableConcept();
10439    if (this.jurisdiction == null)
10440      this.jurisdiction = new ArrayList<CodeableConcept>();
10441    this.jurisdiction.add(t);
10442    return t;
10443  }
10444
10445  public TestScript addJurisdiction(CodeableConcept t) { // 3
10446    if (t == null)
10447      return this;
10448    if (this.jurisdiction == null)
10449      this.jurisdiction = new ArrayList<CodeableConcept>();
10450    this.jurisdiction.add(t);
10451    return this;
10452  }
10453
10454  /**
10455   * @return The first repetition of repeating field {@link #jurisdiction},
10456   *         creating it if it does not already exist
10457   */
10458  public CodeableConcept getJurisdictionFirstRep() {
10459    if (getJurisdiction().isEmpty()) {
10460      addJurisdiction();
10461    }
10462    return getJurisdiction().get(0);
10463  }
10464
10465  /**
10466   * @return {@link #purpose} (Explanation of why this test script is needed and
10467   *         why it has been designed as it has.). This is the underlying object
10468   *         with id, value and extensions. The accessor "getPurpose" gives direct
10469   *         access to the value
10470   */
10471  public MarkdownType getPurposeElement() {
10472    if (this.purpose == null)
10473      if (Configuration.errorOnAutoCreate())
10474        throw new Error("Attempt to auto-create TestScript.purpose");
10475      else if (Configuration.doAutoCreate())
10476        this.purpose = new MarkdownType(); // bb
10477    return this.purpose;
10478  }
10479
10480  public boolean hasPurposeElement() {
10481    return this.purpose != null && !this.purpose.isEmpty();
10482  }
10483
10484  public boolean hasPurpose() {
10485    return this.purpose != null && !this.purpose.isEmpty();
10486  }
10487
10488  /**
10489   * @param value {@link #purpose} (Explanation of why this test script is needed
10490   *              and why it has been designed as it has.). This is the underlying
10491   *              object with id, value and extensions. The accessor "getPurpose"
10492   *              gives direct access to the value
10493   */
10494  public TestScript setPurposeElement(MarkdownType value) {
10495    this.purpose = value;
10496    return this;
10497  }
10498
10499  /**
10500   * @return Explanation of why this test script is needed and why it has been
10501   *         designed as it has.
10502   */
10503  public String getPurpose() {
10504    return this.purpose == null ? null : this.purpose.getValue();
10505  }
10506
10507  /**
10508   * @param value Explanation of why this test script is needed and why it has
10509   *              been designed as it has.
10510   */
10511  public TestScript setPurpose(String value) {
10512    if (value == null)
10513      this.purpose = null;
10514    else {
10515      if (this.purpose == null)
10516        this.purpose = new MarkdownType();
10517      this.purpose.setValue(value);
10518    }
10519    return this;
10520  }
10521
10522  /**
10523   * @return {@link #copyright} (A copyright statement relating to the test script
10524   *         and/or its contents. Copyright statements are generally legal
10525   *         restrictions on the use and publishing of the test script.). This is
10526   *         the underlying object with id, value and extensions. The accessor
10527   *         "getCopyright" gives direct access to the value
10528   */
10529  public MarkdownType getCopyrightElement() {
10530    if (this.copyright == null)
10531      if (Configuration.errorOnAutoCreate())
10532        throw new Error("Attempt to auto-create TestScript.copyright");
10533      else if (Configuration.doAutoCreate())
10534        this.copyright = new MarkdownType(); // bb
10535    return this.copyright;
10536  }
10537
10538  public boolean hasCopyrightElement() {
10539    return this.copyright != null && !this.copyright.isEmpty();
10540  }
10541
10542  public boolean hasCopyright() {
10543    return this.copyright != null && !this.copyright.isEmpty();
10544  }
10545
10546  /**
10547   * @param value {@link #copyright} (A copyright statement relating to the test
10548   *              script and/or its contents. Copyright statements are generally
10549   *              legal restrictions on the use and publishing of the test
10550   *              script.). This is the underlying object with id, value and
10551   *              extensions. The accessor "getCopyright" gives direct access to
10552   *              the value
10553   */
10554  public TestScript setCopyrightElement(MarkdownType value) {
10555    this.copyright = value;
10556    return this;
10557  }
10558
10559  /**
10560   * @return A copyright statement relating to the test script and/or its
10561   *         contents. Copyright statements are generally legal restrictions on
10562   *         the use and publishing of the test script.
10563   */
10564  public String getCopyright() {
10565    return this.copyright == null ? null : this.copyright.getValue();
10566  }
10567
10568  /**
10569   * @param value A copyright statement relating to the test script and/or its
10570   *              contents. Copyright statements are generally legal restrictions
10571   *              on the use and publishing of the test script.
10572   */
10573  public TestScript setCopyright(String value) {
10574    if (value == null)
10575      this.copyright = null;
10576    else {
10577      if (this.copyright == null)
10578        this.copyright = new MarkdownType();
10579      this.copyright.setValue(value);
10580    }
10581    return this;
10582  }
10583
10584  /**
10585   * @return {@link #origin} (An abstract server used in operations within this
10586   *         test script in the origin element.)
10587   */
10588  public List<TestScriptOriginComponent> getOrigin() {
10589    if (this.origin == null)
10590      this.origin = new ArrayList<TestScriptOriginComponent>();
10591    return this.origin;
10592  }
10593
10594  /**
10595   * @return Returns a reference to <code>this</code> for easy method chaining
10596   */
10597  public TestScript setOrigin(List<TestScriptOriginComponent> theOrigin) {
10598    this.origin = theOrigin;
10599    return this;
10600  }
10601
10602  public boolean hasOrigin() {
10603    if (this.origin == null)
10604      return false;
10605    for (TestScriptOriginComponent item : this.origin)
10606      if (!item.isEmpty())
10607        return true;
10608    return false;
10609  }
10610
10611  public TestScriptOriginComponent addOrigin() { // 3
10612    TestScriptOriginComponent t = new TestScriptOriginComponent();
10613    if (this.origin == null)
10614      this.origin = new ArrayList<TestScriptOriginComponent>();
10615    this.origin.add(t);
10616    return t;
10617  }
10618
10619  public TestScript addOrigin(TestScriptOriginComponent t) { // 3
10620    if (t == null)
10621      return this;
10622    if (this.origin == null)
10623      this.origin = new ArrayList<TestScriptOriginComponent>();
10624    this.origin.add(t);
10625    return this;
10626  }
10627
10628  /**
10629   * @return The first repetition of repeating field {@link #origin}, creating it
10630   *         if it does not already exist
10631   */
10632  public TestScriptOriginComponent getOriginFirstRep() {
10633    if (getOrigin().isEmpty()) {
10634      addOrigin();
10635    }
10636    return getOrigin().get(0);
10637  }
10638
10639  /**
10640   * @return {@link #destination} (An abstract server used in operations within
10641   *         this test script in the destination element.)
10642   */
10643  public List<TestScriptDestinationComponent> getDestination() {
10644    if (this.destination == null)
10645      this.destination = new ArrayList<TestScriptDestinationComponent>();
10646    return this.destination;
10647  }
10648
10649  /**
10650   * @return Returns a reference to <code>this</code> for easy method chaining
10651   */
10652  public TestScript setDestination(List<TestScriptDestinationComponent> theDestination) {
10653    this.destination = theDestination;
10654    return this;
10655  }
10656
10657  public boolean hasDestination() {
10658    if (this.destination == null)
10659      return false;
10660    for (TestScriptDestinationComponent item : this.destination)
10661      if (!item.isEmpty())
10662        return true;
10663    return false;
10664  }
10665
10666  public TestScriptDestinationComponent addDestination() { // 3
10667    TestScriptDestinationComponent t = new TestScriptDestinationComponent();
10668    if (this.destination == null)
10669      this.destination = new ArrayList<TestScriptDestinationComponent>();
10670    this.destination.add(t);
10671    return t;
10672  }
10673
10674  public TestScript addDestination(TestScriptDestinationComponent t) { // 3
10675    if (t == null)
10676      return this;
10677    if (this.destination == null)
10678      this.destination = new ArrayList<TestScriptDestinationComponent>();
10679    this.destination.add(t);
10680    return this;
10681  }
10682
10683  /**
10684   * @return The first repetition of repeating field {@link #destination},
10685   *         creating it if it does not already exist
10686   */
10687  public TestScriptDestinationComponent getDestinationFirstRep() {
10688    if (getDestination().isEmpty()) {
10689      addDestination();
10690    }
10691    return getDestination().get(0);
10692  }
10693
10694  /**
10695   * @return {@link #metadata} (The required capability must exist and are assumed
10696   *         to function correctly on the FHIR server being tested.)
10697   */
10698  public TestScriptMetadataComponent getMetadata() {
10699    if (this.metadata == null)
10700      if (Configuration.errorOnAutoCreate())
10701        throw new Error("Attempt to auto-create TestScript.metadata");
10702      else if (Configuration.doAutoCreate())
10703        this.metadata = new TestScriptMetadataComponent(); // cc
10704    return this.metadata;
10705  }
10706
10707  public boolean hasMetadata() {
10708    return this.metadata != null && !this.metadata.isEmpty();
10709  }
10710
10711  /**
10712   * @param value {@link #metadata} (The required capability must exist and are
10713   *              assumed to function correctly on the FHIR server being tested.)
10714   */
10715  public TestScript setMetadata(TestScriptMetadataComponent value) {
10716    this.metadata = value;
10717    return this;
10718  }
10719
10720  /**
10721   * @return {@link #fixture} (Fixture in the test script - by reference (uri).
10722   *         All fixtures are required for the test script to execute.)
10723   */
10724  public List<TestScriptFixtureComponent> getFixture() {
10725    if (this.fixture == null)
10726      this.fixture = new ArrayList<TestScriptFixtureComponent>();
10727    return this.fixture;
10728  }
10729
10730  /**
10731   * @return Returns a reference to <code>this</code> for easy method chaining
10732   */
10733  public TestScript setFixture(List<TestScriptFixtureComponent> theFixture) {
10734    this.fixture = theFixture;
10735    return this;
10736  }
10737
10738  public boolean hasFixture() {
10739    if (this.fixture == null)
10740      return false;
10741    for (TestScriptFixtureComponent item : this.fixture)
10742      if (!item.isEmpty())
10743        return true;
10744    return false;
10745  }
10746
10747  public TestScriptFixtureComponent addFixture() { // 3
10748    TestScriptFixtureComponent t = new TestScriptFixtureComponent();
10749    if (this.fixture == null)
10750      this.fixture = new ArrayList<TestScriptFixtureComponent>();
10751    this.fixture.add(t);
10752    return t;
10753  }
10754
10755  public TestScript addFixture(TestScriptFixtureComponent t) { // 3
10756    if (t == null)
10757      return this;
10758    if (this.fixture == null)
10759      this.fixture = new ArrayList<TestScriptFixtureComponent>();
10760    this.fixture.add(t);
10761    return this;
10762  }
10763
10764  /**
10765   * @return The first repetition of repeating field {@link #fixture}, creating it
10766   *         if it does not already exist
10767   */
10768  public TestScriptFixtureComponent getFixtureFirstRep() {
10769    if (getFixture().isEmpty()) {
10770      addFixture();
10771    }
10772    return getFixture().get(0);
10773  }
10774
10775  /**
10776   * @return {@link #profile} (Reference to the profile to be used for
10777   *         validation.)
10778   */
10779  public List<Reference> getProfile() {
10780    if (this.profile == null)
10781      this.profile = new ArrayList<Reference>();
10782    return this.profile;
10783  }
10784
10785  /**
10786   * @return Returns a reference to <code>this</code> for easy method chaining
10787   */
10788  public TestScript setProfile(List<Reference> theProfile) {
10789    this.profile = theProfile;
10790    return this;
10791  }
10792
10793  public boolean hasProfile() {
10794    if (this.profile == null)
10795      return false;
10796    for (Reference item : this.profile)
10797      if (!item.isEmpty())
10798        return true;
10799    return false;
10800  }
10801
10802  public Reference addProfile() { // 3
10803    Reference t = new Reference();
10804    if (this.profile == null)
10805      this.profile = new ArrayList<Reference>();
10806    this.profile.add(t);
10807    return t;
10808  }
10809
10810  public TestScript addProfile(Reference t) { // 3
10811    if (t == null)
10812      return this;
10813    if (this.profile == null)
10814      this.profile = new ArrayList<Reference>();
10815    this.profile.add(t);
10816    return this;
10817  }
10818
10819  /**
10820   * @return The first repetition of repeating field {@link #profile}, creating it
10821   *         if it does not already exist
10822   */
10823  public Reference getProfileFirstRep() {
10824    if (getProfile().isEmpty()) {
10825      addProfile();
10826    }
10827    return getProfile().get(0);
10828  }
10829
10830  /**
10831   * @deprecated Use Reference#setResource(IBaseResource) instead
10832   */
10833  @Deprecated
10834  public List<Resource> getProfileTarget() {
10835    if (this.profileTarget == null)
10836      this.profileTarget = new ArrayList<Resource>();
10837    return this.profileTarget;
10838  }
10839
10840  /**
10841   * @return {@link #variable} (Variable is set based either on element value in
10842   *         response body or on header field value in the response headers.)
10843   */
10844  public List<TestScriptVariableComponent> getVariable() {
10845    if (this.variable == null)
10846      this.variable = new ArrayList<TestScriptVariableComponent>();
10847    return this.variable;
10848  }
10849
10850  /**
10851   * @return Returns a reference to <code>this</code> for easy method chaining
10852   */
10853  public TestScript setVariable(List<TestScriptVariableComponent> theVariable) {
10854    this.variable = theVariable;
10855    return this;
10856  }
10857
10858  public boolean hasVariable() {
10859    if (this.variable == null)
10860      return false;
10861    for (TestScriptVariableComponent item : this.variable)
10862      if (!item.isEmpty())
10863        return true;
10864    return false;
10865  }
10866
10867  public TestScriptVariableComponent addVariable() { // 3
10868    TestScriptVariableComponent t = new TestScriptVariableComponent();
10869    if (this.variable == null)
10870      this.variable = new ArrayList<TestScriptVariableComponent>();
10871    this.variable.add(t);
10872    return t;
10873  }
10874
10875  public TestScript addVariable(TestScriptVariableComponent t) { // 3
10876    if (t == null)
10877      return this;
10878    if (this.variable == null)
10879      this.variable = new ArrayList<TestScriptVariableComponent>();
10880    this.variable.add(t);
10881    return this;
10882  }
10883
10884  /**
10885   * @return The first repetition of repeating field {@link #variable}, creating
10886   *         it if it does not already exist
10887   */
10888  public TestScriptVariableComponent getVariableFirstRep() {
10889    if (getVariable().isEmpty()) {
10890      addVariable();
10891    }
10892    return getVariable().get(0);
10893  }
10894
10895  /**
10896   * @return {@link #setup} (A series of required setup operations before tests
10897   *         are executed.)
10898   */
10899  public TestScriptSetupComponent getSetup() {
10900    if (this.setup == null)
10901      if (Configuration.errorOnAutoCreate())
10902        throw new Error("Attempt to auto-create TestScript.setup");
10903      else if (Configuration.doAutoCreate())
10904        this.setup = new TestScriptSetupComponent(); // cc
10905    return this.setup;
10906  }
10907
10908  public boolean hasSetup() {
10909    return this.setup != null && !this.setup.isEmpty();
10910  }
10911
10912  /**
10913   * @param value {@link #setup} (A series of required setup operations before
10914   *              tests are executed.)
10915   */
10916  public TestScript setSetup(TestScriptSetupComponent value) {
10917    this.setup = value;
10918    return this;
10919  }
10920
10921  /**
10922   * @return {@link #test} (A test in this script.)
10923   */
10924  public List<TestScriptTestComponent> getTest() {
10925    if (this.test == null)
10926      this.test = new ArrayList<TestScriptTestComponent>();
10927    return this.test;
10928  }
10929
10930  /**
10931   * @return Returns a reference to <code>this</code> for easy method chaining
10932   */
10933  public TestScript setTest(List<TestScriptTestComponent> theTest) {
10934    this.test = theTest;
10935    return this;
10936  }
10937
10938  public boolean hasTest() {
10939    if (this.test == null)
10940      return false;
10941    for (TestScriptTestComponent item : this.test)
10942      if (!item.isEmpty())
10943        return true;
10944    return false;
10945  }
10946
10947  public TestScriptTestComponent addTest() { // 3
10948    TestScriptTestComponent t = new TestScriptTestComponent();
10949    if (this.test == null)
10950      this.test = new ArrayList<TestScriptTestComponent>();
10951    this.test.add(t);
10952    return t;
10953  }
10954
10955  public TestScript addTest(TestScriptTestComponent t) { // 3
10956    if (t == null)
10957      return this;
10958    if (this.test == null)
10959      this.test = new ArrayList<TestScriptTestComponent>();
10960    this.test.add(t);
10961    return this;
10962  }
10963
10964  /**
10965   * @return The first repetition of repeating field {@link #test}, creating it if
10966   *         it does not already exist
10967   */
10968  public TestScriptTestComponent getTestFirstRep() {
10969    if (getTest().isEmpty()) {
10970      addTest();
10971    }
10972    return getTest().get(0);
10973  }
10974
10975  /**
10976   * @return {@link #teardown} (A series of operations required to clean up after
10977   *         all the tests are executed (successfully or otherwise).)
10978   */
10979  public TestScriptTeardownComponent getTeardown() {
10980    if (this.teardown == null)
10981      if (Configuration.errorOnAutoCreate())
10982        throw new Error("Attempt to auto-create TestScript.teardown");
10983      else if (Configuration.doAutoCreate())
10984        this.teardown = new TestScriptTeardownComponent(); // cc
10985    return this.teardown;
10986  }
10987
10988  public boolean hasTeardown() {
10989    return this.teardown != null && !this.teardown.isEmpty();
10990  }
10991
10992  /**
10993   * @param value {@link #teardown} (A series of operations required to clean up
10994   *              after all the tests are executed (successfully or otherwise).)
10995   */
10996  public TestScript setTeardown(TestScriptTeardownComponent value) {
10997    this.teardown = value;
10998    return this;
10999  }
11000
11001  protected void listChildren(List<Property> children) {
11002    super.listChildren(children);
11003    children.add(new Property("url", "uri",
11004        "An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this test script is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test script is stored on different servers.",
11005        0, 1, url));
11006    children.add(new Property("identifier", "Identifier",
11007        "A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instance.",
11008        0, 1, identifier));
11009    children.add(new Property("version", "string",
11010        "The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.",
11011        0, 1, version));
11012    children.add(new Property("name", "string",
11013        "A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation.",
11014        0, 1, name));
11015    children.add(
11016        new Property("title", "string", "A short, descriptive, user-friendly title for the test script.", 0, 1, title));
11017    children.add(new Property("status", "code",
11018        "The status of this test script. Enables tracking the life-cycle of the content.", 0, 1, status));
11019    children.add(new Property("experimental", "boolean",
11020        "A Boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.",
11021        0, 1, experimental));
11022    children.add(new Property("date", "dateTime",
11023        "The date  (and optionally time) when the test script was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.",
11024        0, 1, date));
11025    children.add(new Property("publisher", "string",
11026        "The name of the organization or individual that published the test script.", 0, 1, publisher));
11027    children.add(new Property("contact", "ContactDetail",
11028        "Contact details to assist a user in finding and communicating with the publisher.", 0,
11029        java.lang.Integer.MAX_VALUE, contact));
11030    children.add(new Property("description", "markdown",
11031        "A free text natural language description of the test script from a consumer's perspective.", 0, 1,
11032        description));
11033    children.add(new Property("useContext", "UsageContext",
11034        "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate test script instances.",
11035        0, java.lang.Integer.MAX_VALUE, useContext));
11036    children.add(new Property("jurisdiction", "CodeableConcept",
11037        "A legal or geographic region in which the test script is intended to be used.", 0, java.lang.Integer.MAX_VALUE,
11038        jurisdiction));
11039    children.add(new Property("purpose", "markdown",
11040        "Explanation of why this test script is needed and why it has been designed as it has.", 0, 1, purpose));
11041    children.add(new Property("copyright", "markdown",
11042        "A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script.",
11043        0, 1, copyright));
11044    children.add(new Property("origin", "",
11045        "An abstract server used in operations within this test script in the origin element.", 0,
11046        java.lang.Integer.MAX_VALUE, origin));
11047    children.add(new Property("destination", "",
11048        "An abstract server used in operations within this test script in the destination element.", 0,
11049        java.lang.Integer.MAX_VALUE, destination));
11050    children.add(new Property("metadata", "",
11051        "The required capability must exist and are assumed to function correctly on the FHIR server being tested.", 0,
11052        1, metadata));
11053    children.add(new Property("fixture", "",
11054        "Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.", 0,
11055        java.lang.Integer.MAX_VALUE, fixture));
11056    children.add(new Property("profile", "Reference(Any)", "Reference to the profile to be used for validation.", 0,
11057        java.lang.Integer.MAX_VALUE, profile));
11058    children.add(new Property("variable", "",
11059        "Variable is set based either on element value in response body or on header field value in the response headers.",
11060        0, java.lang.Integer.MAX_VALUE, variable));
11061    children.add(
11062        new Property("setup", "", "A series of required setup operations before tests are executed.", 0, 1, setup));
11063    children.add(new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test));
11064    children.add(new Property("teardown", "",
11065        "A series of operations required to clean up after all the tests are executed (successfully or otherwise).", 0,
11066        1, teardown));
11067  }
11068
11069  @Override
11070  public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
11071    switch (_hash) {
11072    case 116079:
11073      /* url */ return new Property("url", "uri",
11074          "An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this test script is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test script is stored on different servers.",
11075          0, 1, url);
11076    case -1618432855:
11077      /* identifier */ return new Property("identifier", "Identifier",
11078          "A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instance.",
11079          0, 1, identifier);
11080    case 351608024:
11081      /* version */ return new Property("version", "string",
11082          "The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.",
11083          0, 1, version);
11084    case 3373707:
11085      /* name */ return new Property("name", "string",
11086          "A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation.",
11087          0, 1, name);
11088    case 110371416:
11089      /* title */ return new Property("title", "string",
11090          "A short, descriptive, user-friendly title for the test script.", 0, 1, title);
11091    case -892481550:
11092      /* status */ return new Property("status", "code",
11093          "The status of this test script. Enables tracking the life-cycle of the content.", 0, 1, status);
11094    case -404562712:
11095      /* experimental */ return new Property("experimental", "boolean",
11096          "A Boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.",
11097          0, 1, experimental);
11098    case 3076014:
11099      /* date */ return new Property("date", "dateTime",
11100          "The date  (and optionally time) when the test script was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.",
11101          0, 1, date);
11102    case 1447404028:
11103      /* publisher */ return new Property("publisher", "string",
11104          "The name of the organization or individual that published the test script.", 0, 1, publisher);
11105    case 951526432:
11106      /* contact */ return new Property("contact", "ContactDetail",
11107          "Contact details to assist a user in finding and communicating with the publisher.", 0,
11108          java.lang.Integer.MAX_VALUE, contact);
11109    case -1724546052:
11110      /* description */ return new Property("description", "markdown",
11111          "A free text natural language description of the test script from a consumer's perspective.", 0, 1,
11112          description);
11113    case -669707736:
11114      /* useContext */ return new Property("useContext", "UsageContext",
11115          "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate test script instances.",
11116          0, java.lang.Integer.MAX_VALUE, useContext);
11117    case -507075711:
11118      /* jurisdiction */ return new Property("jurisdiction", "CodeableConcept",
11119          "A legal or geographic region in which the test script is intended to be used.", 0,
11120          java.lang.Integer.MAX_VALUE, jurisdiction);
11121    case -220463842:
11122      /* purpose */ return new Property("purpose", "markdown",
11123          "Explanation of why this test script is needed and why it has been designed as it has.", 0, 1, purpose);
11124    case 1522889671:
11125      /* copyright */ return new Property("copyright", "markdown",
11126          "A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script.",
11127          0, 1, copyright);
11128    case -1008619738:
11129      /* origin */ return new Property("origin", "",
11130          "An abstract server used in operations within this test script in the origin element.", 0,
11131          java.lang.Integer.MAX_VALUE, origin);
11132    case -1429847026:
11133      /* destination */ return new Property("destination", "",
11134          "An abstract server used in operations within this test script in the destination element.", 0,
11135          java.lang.Integer.MAX_VALUE, destination);
11136    case -450004177:
11137      /* metadata */ return new Property("metadata", "",
11138          "The required capability must exist and are assumed to function correctly on the FHIR server being tested.",
11139          0, 1, metadata);
11140    case -843449847:
11141      /* fixture */ return new Property("fixture", "",
11142          "Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.",
11143          0, java.lang.Integer.MAX_VALUE, fixture);
11144    case -309425751:
11145      /* profile */ return new Property("profile", "Reference(Any)",
11146          "Reference to the profile to be used for validation.", 0, java.lang.Integer.MAX_VALUE, profile);
11147    case -1249586564:
11148      /* variable */ return new Property("variable", "",
11149          "Variable is set based either on element value in response body or on header field value in the response headers.",
11150          0, java.lang.Integer.MAX_VALUE, variable);
11151    case 109329021:
11152      /* setup */ return new Property("setup", "", "A series of required setup operations before tests are executed.",
11153          0, 1, setup);
11154    case 3556498:
11155      /* test */ return new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test);
11156    case -1663474172:
11157      /* teardown */ return new Property("teardown", "",
11158          "A series of operations required to clean up after all the tests are executed (successfully or otherwise).",
11159          0, 1, teardown);
11160    default:
11161      return super.getNamedProperty(_hash, _name, _checkValid);
11162    }
11163
11164  }
11165
11166  @Override
11167  public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
11168    switch (hash) {
11169    case 116079:
11170      /* url */ return this.url == null ? new Base[0] : new Base[] { this.url }; // UriType
11171    case -1618432855:
11172      /* identifier */ return this.identifier == null ? new Base[0] : new Base[] { this.identifier }; // Identifier
11173    case 351608024:
11174      /* version */ return this.version == null ? new Base[0] : new Base[] { this.version }; // StringType
11175    case 3373707:
11176      /* name */ return this.name == null ? new Base[0] : new Base[] { this.name }; // StringType
11177    case 110371416:
11178      /* title */ return this.title == null ? new Base[0] : new Base[] { this.title }; // StringType
11179    case -892481550:
11180      /* status */ return this.status == null ? new Base[0] : new Base[] { this.status }; // Enumeration<PublicationStatus>
11181    case -404562712:
11182      /* experimental */ return this.experimental == null ? new Base[0] : new Base[] { this.experimental }; // BooleanType
11183    case 3076014:
11184      /* date */ return this.date == null ? new Base[0] : new Base[] { this.date }; // DateTimeType
11185    case 1447404028:
11186      /* publisher */ return this.publisher == null ? new Base[0] : new Base[] { this.publisher }; // StringType
11187    case 951526432:
11188      /* contact */ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
11189    case -1724546052:
11190      /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // MarkdownType
11191    case -669707736:
11192      /* useContext */ return this.useContext == null ? new Base[0]
11193          : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
11194    case -507075711:
11195      /* jurisdiction */ return this.jurisdiction == null ? new Base[0]
11196          : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
11197    case -220463842:
11198      /* purpose */ return this.purpose == null ? new Base[0] : new Base[] { this.purpose }; // MarkdownType
11199    case 1522889671:
11200      /* copyright */ return this.copyright == null ? new Base[0] : new Base[] { this.copyright }; // MarkdownType
11201    case -1008619738:
11202      /* origin */ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // TestScriptOriginComponent
11203    case -1429847026:
11204      /* destination */ return this.destination == null ? new Base[0]
11205          : this.destination.toArray(new Base[this.destination.size()]); // TestScriptDestinationComponent
11206    case -450004177:
11207      /* metadata */ return this.metadata == null ? new Base[0] : new Base[] { this.metadata }; // TestScriptMetadataComponent
11208    case -843449847:
11209      /* fixture */ return this.fixture == null ? new Base[0] : this.fixture.toArray(new Base[this.fixture.size()]); // TestScriptFixtureComponent
11210    case -309425751:
11211      /* profile */ return this.profile == null ? new Base[0] : this.profile.toArray(new Base[this.profile.size()]); // Reference
11212    case -1249586564:
11213      /* variable */ return this.variable == null ? new Base[0] : this.variable.toArray(new Base[this.variable.size()]); // TestScriptVariableComponent
11214    case 109329021:
11215      /* setup */ return this.setup == null ? new Base[0] : new Base[] { this.setup }; // TestScriptSetupComponent
11216    case 3556498:
11217      /* test */ return this.test == null ? new Base[0] : this.test.toArray(new Base[this.test.size()]); // TestScriptTestComponent
11218    case -1663474172:
11219      /* teardown */ return this.teardown == null ? new Base[0] : new Base[] { this.teardown }; // TestScriptTeardownComponent
11220    default:
11221      return super.getProperty(hash, name, checkValid);
11222    }
11223
11224  }
11225
11226  @Override
11227  public Base setProperty(int hash, String name, Base value) throws FHIRException {
11228    switch (hash) {
11229    case 116079: // url
11230      this.url = castToUri(value); // UriType
11231      return value;
11232    case -1618432855: // identifier
11233      this.identifier = castToIdentifier(value); // Identifier
11234      return value;
11235    case 351608024: // version
11236      this.version = castToString(value); // StringType
11237      return value;
11238    case 3373707: // name
11239      this.name = castToString(value); // StringType
11240      return value;
11241    case 110371416: // title
11242      this.title = castToString(value); // StringType
11243      return value;
11244    case -892481550: // status
11245      value = new PublicationStatusEnumFactory().fromType(castToCode(value));
11246      this.status = (Enumeration) value; // Enumeration<PublicationStatus>
11247      return value;
11248    case -404562712: // experimental
11249      this.experimental = castToBoolean(value); // BooleanType
11250      return value;
11251    case 3076014: // date
11252      this.date = castToDateTime(value); // DateTimeType
11253      return value;
11254    case 1447404028: // publisher
11255      this.publisher = castToString(value); // StringType
11256      return value;
11257    case 951526432: // contact
11258      this.getContact().add(castToContactDetail(value)); // ContactDetail
11259      return value;
11260    case -1724546052: // description
11261      this.description = castToMarkdown(value); // MarkdownType
11262      return value;
11263    case -669707736: // useContext
11264      this.getUseContext().add(castToUsageContext(value)); // UsageContext
11265      return value;
11266    case -507075711: // jurisdiction
11267      this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept
11268      return value;
11269    case -220463842: // purpose
11270      this.purpose = castToMarkdown(value); // MarkdownType
11271      return value;
11272    case 1522889671: // copyright
11273      this.copyright = castToMarkdown(value); // MarkdownType
11274      return value;
11275    case -1008619738: // origin
11276      this.getOrigin().add((TestScriptOriginComponent) value); // TestScriptOriginComponent
11277      return value;
11278    case -1429847026: // destination
11279      this.getDestination().add((TestScriptDestinationComponent) value); // TestScriptDestinationComponent
11280      return value;
11281    case -450004177: // metadata
11282      this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent
11283      return value;
11284    case -843449847: // fixture
11285      this.getFixture().add((TestScriptFixtureComponent) value); // TestScriptFixtureComponent
11286      return value;
11287    case -309425751: // profile
11288      this.getProfile().add(castToReference(value)); // Reference
11289      return value;
11290    case -1249586564: // variable
11291      this.getVariable().add((TestScriptVariableComponent) value); // TestScriptVariableComponent
11292      return value;
11293    case 109329021: // setup
11294      this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent
11295      return value;
11296    case 3556498: // test
11297      this.getTest().add((TestScriptTestComponent) value); // TestScriptTestComponent
11298      return value;
11299    case -1663474172: // teardown
11300      this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent
11301      return value;
11302    default:
11303      return super.setProperty(hash, name, value);
11304    }
11305
11306  }
11307
11308  @Override
11309  public Base setProperty(String name, Base value) throws FHIRException {
11310    if (name.equals("url")) {
11311      this.url = castToUri(value); // UriType
11312    } else if (name.equals("identifier")) {
11313      this.identifier = castToIdentifier(value); // Identifier
11314    } else if (name.equals("version")) {
11315      this.version = castToString(value); // StringType
11316    } else if (name.equals("name")) {
11317      this.name = castToString(value); // StringType
11318    } else if (name.equals("title")) {
11319      this.title = castToString(value); // StringType
11320    } else if (name.equals("status")) {
11321      value = new PublicationStatusEnumFactory().fromType(castToCode(value));
11322      this.status = (Enumeration) value; // Enumeration<PublicationStatus>
11323    } else if (name.equals("experimental")) {
11324      this.experimental = castToBoolean(value); // BooleanType
11325    } else if (name.equals("date")) {
11326      this.date = castToDateTime(value); // DateTimeType
11327    } else if (name.equals("publisher")) {
11328      this.publisher = castToString(value); // StringType
11329    } else if (name.equals("contact")) {
11330      this.getContact().add(castToContactDetail(value));
11331    } else if (name.equals("description")) {
11332      this.description = castToMarkdown(value); // MarkdownType
11333    } else if (name.equals("useContext")) {
11334      this.getUseContext().add(castToUsageContext(value));
11335    } else if (name.equals("jurisdiction")) {
11336      this.getJurisdiction().add(castToCodeableConcept(value));
11337    } else if (name.equals("purpose")) {
11338      this.purpose = castToMarkdown(value); // MarkdownType
11339    } else if (name.equals("copyright")) {
11340      this.copyright = castToMarkdown(value); // MarkdownType
11341    } else if (name.equals("origin")) {
11342      this.getOrigin().add((TestScriptOriginComponent) value);
11343    } else if (name.equals("destination")) {
11344      this.getDestination().add((TestScriptDestinationComponent) value);
11345    } else if (name.equals("metadata")) {
11346      this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent
11347    } else if (name.equals("fixture")) {
11348      this.getFixture().add((TestScriptFixtureComponent) value);
11349    } else if (name.equals("profile")) {
11350      this.getProfile().add(castToReference(value));
11351    } else if (name.equals("variable")) {
11352      this.getVariable().add((TestScriptVariableComponent) value);
11353    } else if (name.equals("setup")) {
11354      this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent
11355    } else if (name.equals("test")) {
11356      this.getTest().add((TestScriptTestComponent) value);
11357    } else if (name.equals("teardown")) {
11358      this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent
11359    } else
11360      return super.setProperty(name, value);
11361    return value;
11362  }
11363
11364  @Override
11365  public void removeChild(String name, Base value) throws FHIRException {
11366    if (name.equals("url")) {
11367      this.url = null;
11368    } else if (name.equals("identifier")) {
11369      this.identifier = null;
11370    } else if (name.equals("version")) {
11371      this.version = null;
11372    } else if (name.equals("name")) {
11373      this.name = null;
11374    } else if (name.equals("title")) {
11375      this.title = null;
11376    } else if (name.equals("status")) {
11377      this.status = null;
11378    } else if (name.equals("experimental")) {
11379      this.experimental = null;
11380    } else if (name.equals("date")) {
11381      this.date = null;
11382    } else if (name.equals("publisher")) {
11383      this.publisher = null;
11384    } else if (name.equals("contact")) {
11385      this.getContact().remove(castToContactDetail(value));
11386    } else if (name.equals("description")) {
11387      this.description = null;
11388    } else if (name.equals("useContext")) {
11389      this.getUseContext().remove(castToUsageContext(value));
11390    } else if (name.equals("jurisdiction")) {
11391      this.getJurisdiction().remove(castToCodeableConcept(value));
11392    } else if (name.equals("purpose")) {
11393      this.purpose = null;
11394    } else if (name.equals("copyright")) {
11395      this.copyright = null;
11396    } else if (name.equals("origin")) {
11397      this.getOrigin().remove((TestScriptOriginComponent) value);
11398    } else if (name.equals("destination")) {
11399      this.getDestination().remove((TestScriptDestinationComponent) value);
11400    } else if (name.equals("metadata")) {
11401      this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent
11402    } else if (name.equals("fixture")) {
11403      this.getFixture().remove((TestScriptFixtureComponent) value);
11404    } else if (name.equals("profile")) {
11405      this.getProfile().remove(castToReference(value));
11406    } else if (name.equals("variable")) {
11407      this.getVariable().remove((TestScriptVariableComponent) value);
11408    } else if (name.equals("setup")) {
11409      this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent
11410    } else if (name.equals("test")) {
11411      this.getTest().remove((TestScriptTestComponent) value);
11412    } else if (name.equals("teardown")) {
11413      this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent
11414    } else
11415      super.removeChild(name, value);
11416    
11417  }
11418
11419  @Override
11420  public Base makeProperty(int hash, String name) throws FHIRException {
11421    switch (hash) {
11422    case 116079:
11423      return getUrlElement();
11424    case -1618432855:
11425      return getIdentifier();
11426    case 351608024:
11427      return getVersionElement();
11428    case 3373707:
11429      return getNameElement();
11430    case 110371416:
11431      return getTitleElement();
11432    case -892481550:
11433      return getStatusElement();
11434    case -404562712:
11435      return getExperimentalElement();
11436    case 3076014:
11437      return getDateElement();
11438    case 1447404028:
11439      return getPublisherElement();
11440    case 951526432:
11441      return addContact();
11442    case -1724546052:
11443      return getDescriptionElement();
11444    case -669707736:
11445      return addUseContext();
11446    case -507075711:
11447      return addJurisdiction();
11448    case -220463842:
11449      return getPurposeElement();
11450    case 1522889671:
11451      return getCopyrightElement();
11452    case -1008619738:
11453      return addOrigin();
11454    case -1429847026:
11455      return addDestination();
11456    case -450004177:
11457      return getMetadata();
11458    case -843449847:
11459      return addFixture();
11460    case -309425751:
11461      return addProfile();
11462    case -1249586564:
11463      return addVariable();
11464    case 109329021:
11465      return getSetup();
11466    case 3556498:
11467      return addTest();
11468    case -1663474172:
11469      return getTeardown();
11470    default:
11471      return super.makeProperty(hash, name);
11472    }
11473
11474  }
11475
11476  @Override
11477  public String[] getTypesForProperty(int hash, String name) throws FHIRException {
11478    switch (hash) {
11479    case 116079:
11480      /* url */ return new String[] { "uri" };
11481    case -1618432855:
11482      /* identifier */ return new String[] { "Identifier" };
11483    case 351608024:
11484      /* version */ return new String[] { "string" };
11485    case 3373707:
11486      /* name */ return new String[] { "string" };
11487    case 110371416:
11488      /* title */ return new String[] { "string" };
11489    case -892481550:
11490      /* status */ return new String[] { "code" };
11491    case -404562712:
11492      /* experimental */ return new String[] { "boolean" };
11493    case 3076014:
11494      /* date */ return new String[] { "dateTime" };
11495    case 1447404028:
11496      /* publisher */ return new String[] { "string" };
11497    case 951526432:
11498      /* contact */ return new String[] { "ContactDetail" };
11499    case -1724546052:
11500      /* description */ return new String[] { "markdown" };
11501    case -669707736:
11502      /* useContext */ return new String[] { "UsageContext" };
11503    case -507075711:
11504      /* jurisdiction */ return new String[] { "CodeableConcept" };
11505    case -220463842:
11506      /* purpose */ return new String[] { "markdown" };
11507    case 1522889671:
11508      /* copyright */ return new String[] { "markdown" };
11509    case -1008619738:
11510      /* origin */ return new String[] {};
11511    case -1429847026:
11512      /* destination */ return new String[] {};
11513    case -450004177:
11514      /* metadata */ return new String[] {};
11515    case -843449847:
11516      /* fixture */ return new String[] {};
11517    case -309425751:
11518      /* profile */ return new String[] { "Reference" };
11519    case -1249586564:
11520      /* variable */ return new String[] {};
11521    case 109329021:
11522      /* setup */ return new String[] {};
11523    case 3556498:
11524      /* test */ return new String[] {};
11525    case -1663474172:
11526      /* teardown */ return new String[] {};
11527    default:
11528      return super.getTypesForProperty(hash, name);
11529    }
11530
11531  }
11532
11533  @Override
11534  public Base addChild(String name) throws FHIRException {
11535    if (name.equals("url")) {
11536      throw new FHIRException("Cannot call addChild on a singleton property TestScript.url");
11537    } else if (name.equals("identifier")) {
11538      this.identifier = new Identifier();
11539      return this.identifier;
11540    } else if (name.equals("version")) {
11541      throw new FHIRException("Cannot call addChild on a singleton property TestScript.version");
11542    } else if (name.equals("name")) {
11543      throw new FHIRException("Cannot call addChild on a singleton property TestScript.name");
11544    } else if (name.equals("title")) {
11545      throw new FHIRException("Cannot call addChild on a singleton property TestScript.title");
11546    } else if (name.equals("status")) {
11547      throw new FHIRException("Cannot call addChild on a singleton property TestScript.status");
11548    } else if (name.equals("experimental")) {
11549      throw new FHIRException("Cannot call addChild on a singleton property TestScript.experimental");
11550    } else if (name.equals("date")) {
11551      throw new FHIRException("Cannot call addChild on a singleton property TestScript.date");
11552    } else if (name.equals("publisher")) {
11553      throw new FHIRException("Cannot call addChild on a singleton property TestScript.publisher");
11554    } else if (name.equals("contact")) {
11555      return addContact();
11556    } else if (name.equals("description")) {
11557      throw new FHIRException("Cannot call addChild on a singleton property TestScript.description");
11558    } else if (name.equals("useContext")) {
11559      return addUseContext();
11560    } else if (name.equals("jurisdiction")) {
11561      return addJurisdiction();
11562    } else if (name.equals("purpose")) {
11563      throw new FHIRException("Cannot call addChild on a singleton property TestScript.purpose");
11564    } else if (name.equals("copyright")) {
11565      throw new FHIRException("Cannot call addChild on a singleton property TestScript.copyright");
11566    } else if (name.equals("origin")) {
11567      return addOrigin();
11568    } else if (name.equals("destination")) {
11569      return addDestination();
11570    } else if (name.equals("metadata")) {
11571      this.metadata = new TestScriptMetadataComponent();
11572      return this.metadata;
11573    } else if (name.equals("fixture")) {
11574      return addFixture();
11575    } else if (name.equals("profile")) {
11576      return addProfile();
11577    } else if (name.equals("variable")) {
11578      return addVariable();
11579    } else if (name.equals("setup")) {
11580      this.setup = new TestScriptSetupComponent();
11581      return this.setup;
11582    } else if (name.equals("test")) {
11583      return addTest();
11584    } else if (name.equals("teardown")) {
11585      this.teardown = new TestScriptTeardownComponent();
11586      return this.teardown;
11587    } else
11588      return super.addChild(name);
11589  }
11590
11591  public String fhirType() {
11592    return "TestScript";
11593
11594  }
11595
11596  public TestScript copy() {
11597    TestScript dst = new TestScript();
11598    copyValues(dst);
11599    return dst;
11600  }
11601
11602  public void copyValues(TestScript dst) {
11603    super.copyValues(dst);
11604    dst.url = url == null ? null : url.copy();
11605    dst.identifier = identifier == null ? null : identifier.copy();
11606    dst.version = version == null ? null : version.copy();
11607    dst.name = name == null ? null : name.copy();
11608    dst.title = title == null ? null : title.copy();
11609    dst.status = status == null ? null : status.copy();
11610    dst.experimental = experimental == null ? null : experimental.copy();
11611    dst.date = date == null ? null : date.copy();
11612    dst.publisher = publisher == null ? null : publisher.copy();
11613    if (contact != null) {
11614      dst.contact = new ArrayList<ContactDetail>();
11615      for (ContactDetail i : contact)
11616        dst.contact.add(i.copy());
11617    }
11618    ;
11619    dst.description = description == null ? null : description.copy();
11620    if (useContext != null) {
11621      dst.useContext = new ArrayList<UsageContext>();
11622      for (UsageContext i : useContext)
11623        dst.useContext.add(i.copy());
11624    }
11625    ;
11626    if (jurisdiction != null) {
11627      dst.jurisdiction = new ArrayList<CodeableConcept>();
11628      for (CodeableConcept i : jurisdiction)
11629        dst.jurisdiction.add(i.copy());
11630    }
11631    ;
11632    dst.purpose = purpose == null ? null : purpose.copy();
11633    dst.copyright = copyright == null ? null : copyright.copy();
11634    if (origin != null) {
11635      dst.origin = new ArrayList<TestScriptOriginComponent>();
11636      for (TestScriptOriginComponent i : origin)
11637        dst.origin.add(i.copy());
11638    }
11639    ;
11640    if (destination != null) {
11641      dst.destination = new ArrayList<TestScriptDestinationComponent>();
11642      for (TestScriptDestinationComponent i : destination)
11643        dst.destination.add(i.copy());
11644    }
11645    ;
11646    dst.metadata = metadata == null ? null : metadata.copy();
11647    if (fixture != null) {
11648      dst.fixture = new ArrayList<TestScriptFixtureComponent>();
11649      for (TestScriptFixtureComponent i : fixture)
11650        dst.fixture.add(i.copy());
11651    }
11652    ;
11653    if (profile != null) {
11654      dst.profile = new ArrayList<Reference>();
11655      for (Reference i : profile)
11656        dst.profile.add(i.copy());
11657    }
11658    ;
11659    if (variable != null) {
11660      dst.variable = new ArrayList<TestScriptVariableComponent>();
11661      for (TestScriptVariableComponent i : variable)
11662        dst.variable.add(i.copy());
11663    }
11664    ;
11665    dst.setup = setup == null ? null : setup.copy();
11666    if (test != null) {
11667      dst.test = new ArrayList<TestScriptTestComponent>();
11668      for (TestScriptTestComponent i : test)
11669        dst.test.add(i.copy());
11670    }
11671    ;
11672    dst.teardown = teardown == null ? null : teardown.copy();
11673  }
11674
11675  protected TestScript typedCopy() {
11676    return copy();
11677  }
11678
11679  @Override
11680  public boolean equalsDeep(Base other_) {
11681    if (!super.equalsDeep(other_))
11682      return false;
11683    if (!(other_ instanceof TestScript))
11684      return false;
11685    TestScript o = (TestScript) other_;
11686    return compareDeep(identifier, o.identifier, true) && compareDeep(purpose, o.purpose, true)
11687        && compareDeep(copyright, o.copyright, true) && compareDeep(origin, o.origin, true)
11688        && compareDeep(destination, o.destination, true) && compareDeep(metadata, o.metadata, true)
11689        && compareDeep(fixture, o.fixture, true) && compareDeep(profile, o.profile, true)
11690        && compareDeep(variable, o.variable, true) && compareDeep(setup, o.setup, true)
11691        && compareDeep(test, o.test, true) && compareDeep(teardown, o.teardown, true);
11692  }
11693
11694  @Override
11695  public boolean equalsShallow(Base other_) {
11696    if (!super.equalsShallow(other_))
11697      return false;
11698    if (!(other_ instanceof TestScript))
11699      return false;
11700    TestScript o = (TestScript) other_;
11701    return compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true);
11702  }
11703
11704  public boolean isEmpty() {
11705    return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, purpose, copyright, origin, destination,
11706        metadata, fixture, profile, variable, setup, test, teardown);
11707  }
11708
11709  @Override
11710  public ResourceType getResourceType() {
11711    return ResourceType.TestScript;
11712  }
11713
11714  /**
11715   * Search parameter: <b>date</b>
11716   * <p>
11717   * Description: <b>The test script publication date</b><br>
11718   * Type: <b>date</b><br>
11719   * Path: <b>TestScript.date</b><br>
11720   * </p>
11721   */
11722  @SearchParamDefinition(name = "date", path = "TestScript.date", description = "The test script publication date", type = "date")
11723  public static final String SP_DATE = "date";
11724  /**
11725   * <b>Fluent Client</b> search parameter constant for <b>date</b>
11726   * <p>
11727   * Description: <b>The test script publication date</b><br>
11728   * Type: <b>date</b><br>
11729   * Path: <b>TestScript.date</b><br>
11730   * </p>
11731   */
11732  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(
11733      SP_DATE);
11734
11735  /**
11736   * Search parameter: <b>identifier</b>
11737   * <p>
11738   * Description: <b>External identifier for the test script</b><br>
11739   * Type: <b>token</b><br>
11740   * Path: <b>TestScript.identifier</b><br>
11741   * </p>
11742   */
11743  @SearchParamDefinition(name = "identifier", path = "TestScript.identifier", description = "External identifier for the test script", type = "token")
11744  public static final String SP_IDENTIFIER = "identifier";
11745  /**
11746   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
11747   * <p>
11748   * Description: <b>External identifier for the test script</b><br>
11749   * Type: <b>token</b><br>
11750   * Path: <b>TestScript.identifier</b><br>
11751   * </p>
11752   */
11753  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(
11754      SP_IDENTIFIER);
11755
11756  /**
11757   * Search parameter: <b>context-type-value</b>
11758   * <p>
11759   * Description: <b>A use context type and value assigned to the test
11760   * script</b><br>
11761   * Type: <b>composite</b><br>
11762   * Path: <b></b><br>
11763   * </p>
11764   */
11765  @SearchParamDefinition(name = "context-type-value", path = "TestScript.useContext", description = "A use context type and value assigned to the test script", type = "composite", compositeOf = {
11766      "context-type", "context" })
11767  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
11768  /**
11769   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
11770   * <p>
11771   * Description: <b>A use context type and value assigned to the test
11772   * script</b><br>
11773   * Type: <b>composite</b><br>
11774   * Path: <b></b><br>
11775   * </p>
11776   */
11777  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CONTEXT_TYPE_VALUE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(
11778      SP_CONTEXT_TYPE_VALUE);
11779
11780  /**
11781   * Search parameter: <b>jurisdiction</b>
11782   * <p>
11783   * Description: <b>Intended jurisdiction for the test script</b><br>
11784   * Type: <b>token</b><br>
11785   * Path: <b>TestScript.jurisdiction</b><br>
11786   * </p>
11787   */
11788  @SearchParamDefinition(name = "jurisdiction", path = "TestScript.jurisdiction", description = "Intended jurisdiction for the test script", type = "token")
11789  public static final String SP_JURISDICTION = "jurisdiction";
11790  /**
11791   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
11792   * <p>
11793   * Description: <b>Intended jurisdiction for the test script</b><br>
11794   * Type: <b>token</b><br>
11795   * Path: <b>TestScript.jurisdiction</b><br>
11796   * </p>
11797   */
11798  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(
11799      SP_JURISDICTION);
11800
11801  /**
11802   * Search parameter: <b>description</b>
11803   * <p>
11804   * Description: <b>The description of the test script</b><br>
11805   * Type: <b>string</b><br>
11806   * Path: <b>TestScript.description</b><br>
11807   * </p>
11808   */
11809  @SearchParamDefinition(name = "description", path = "TestScript.description", description = "The description of the test script", type = "string")
11810  public static final String SP_DESCRIPTION = "description";
11811  /**
11812   * <b>Fluent Client</b> search parameter constant for <b>description</b>
11813   * <p>
11814   * Description: <b>The description of the test script</b><br>
11815   * Type: <b>string</b><br>
11816   * Path: <b>TestScript.description</b><br>
11817   * </p>
11818   */
11819  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(
11820      SP_DESCRIPTION);
11821
11822  /**
11823   * Search parameter: <b>testscript-capability</b>
11824   * <p>
11825   * Description: <b>TestScript required and validated capability</b><br>
11826   * Type: <b>string</b><br>
11827   * Path: <b>TestScript.metadata.capability.description</b><br>
11828   * </p>
11829   */
11830  @SearchParamDefinition(name = "testscript-capability", path = "TestScript.metadata.capability.description", description = "TestScript required and validated capability", type = "string")
11831  public static final String SP_TESTSCRIPT_CAPABILITY = "testscript-capability";
11832  /**
11833   * <b>Fluent Client</b> search parameter constant for
11834   * <b>testscript-capability</b>
11835   * <p>
11836   * Description: <b>TestScript required and validated capability</b><br>
11837   * Type: <b>string</b><br>
11838   * Path: <b>TestScript.metadata.capability.description</b><br>
11839   * </p>
11840   */
11841  public static final ca.uhn.fhir.rest.gclient.StringClientParam TESTSCRIPT_CAPABILITY = new ca.uhn.fhir.rest.gclient.StringClientParam(
11842      SP_TESTSCRIPT_CAPABILITY);
11843
11844  /**
11845   * Search parameter: <b>context-type</b>
11846   * <p>
11847   * Description: <b>A type of use context assigned to the test script</b><br>
11848   * Type: <b>token</b><br>
11849   * Path: <b>TestScript.useContext.code</b><br>
11850   * </p>
11851   */
11852  @SearchParamDefinition(name = "context-type", path = "TestScript.useContext.code", description = "A type of use context assigned to the test script", type = "token")
11853  public static final String SP_CONTEXT_TYPE = "context-type";
11854  /**
11855   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
11856   * <p>
11857   * Description: <b>A type of use context assigned to the test script</b><br>
11858   * Type: <b>token</b><br>
11859   * Path: <b>TestScript.useContext.code</b><br>
11860   * </p>
11861   */
11862  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(
11863      SP_CONTEXT_TYPE);
11864
11865  /**
11866   * Search parameter: <b>title</b>
11867   * <p>
11868   * Description: <b>The human-friendly name of the test script</b><br>
11869   * Type: <b>string</b><br>
11870   * Path: <b>TestScript.title</b><br>
11871   * </p>
11872   */
11873  @SearchParamDefinition(name = "title", path = "TestScript.title", description = "The human-friendly name of the test script", type = "string")
11874  public static final String SP_TITLE = "title";
11875  /**
11876   * <b>Fluent Client</b> search parameter constant for <b>title</b>
11877   * <p>
11878   * Description: <b>The human-friendly name of the test script</b><br>
11879   * Type: <b>string</b><br>
11880   * Path: <b>TestScript.title</b><br>
11881   * </p>
11882   */
11883  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(
11884      SP_TITLE);
11885
11886  /**
11887   * Search parameter: <b>version</b>
11888   * <p>
11889   * Description: <b>The business version of the test script</b><br>
11890   * Type: <b>token</b><br>
11891   * Path: <b>TestScript.version</b><br>
11892   * </p>
11893   */
11894  @SearchParamDefinition(name = "version", path = "TestScript.version", description = "The business version of the test script", type = "token")
11895  public static final String SP_VERSION = "version";
11896  /**
11897   * <b>Fluent Client</b> search parameter constant for <b>version</b>
11898   * <p>
11899   * Description: <b>The business version of the test script</b><br>
11900   * Type: <b>token</b><br>
11901   * Path: <b>TestScript.version</b><br>
11902   * </p>
11903   */
11904  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(
11905      SP_VERSION);
11906
11907  /**
11908   * Search parameter: <b>url</b>
11909   * <p>
11910   * Description: <b>The uri that identifies the test script</b><br>
11911   * Type: <b>uri</b><br>
11912   * Path: <b>TestScript.url</b><br>
11913   * </p>
11914   */
11915  @SearchParamDefinition(name = "url", path = "TestScript.url", description = "The uri that identifies the test script", type = "uri")
11916  public static final String SP_URL = "url";
11917  /**
11918   * <b>Fluent Client</b> search parameter constant for <b>url</b>
11919   * <p>
11920   * Description: <b>The uri that identifies the test script</b><br>
11921   * Type: <b>uri</b><br>
11922   * Path: <b>TestScript.url</b><br>
11923   * </p>
11924   */
11925  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
11926
11927  /**
11928   * Search parameter: <b>context-quantity</b>
11929   * <p>
11930   * Description: <b>A quantity- or range-valued use context assigned to the test
11931   * script</b><br>
11932   * Type: <b>quantity</b><br>
11933   * Path: <b>TestScript.useContext.valueQuantity,
11934   * TestScript.useContext.valueRange</b><br>
11935   * </p>
11936   */
11937  @SearchParamDefinition(name = "context-quantity", path = "(TestScript.useContext.value as Quantity) | (TestScript.useContext.value as Range)", description = "A quantity- or range-valued use context assigned to the test script", type = "quantity")
11938  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
11939  /**
11940   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
11941   * <p>
11942   * Description: <b>A quantity- or range-valued use context assigned to the test
11943   * script</b><br>
11944   * Type: <b>quantity</b><br>
11945   * Path: <b>TestScript.useContext.valueQuantity,
11946   * TestScript.useContext.valueRange</b><br>
11947   * </p>
11948   */
11949  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(
11950      SP_CONTEXT_QUANTITY);
11951
11952  /**
11953   * Search parameter: <b>name</b>
11954   * <p>
11955   * Description: <b>Computationally friendly name of the test script</b><br>
11956   * Type: <b>string</b><br>
11957   * Path: <b>TestScript.name</b><br>
11958   * </p>
11959   */
11960  @SearchParamDefinition(name = "name", path = "TestScript.name", description = "Computationally friendly name of the test script", type = "string")
11961  public static final String SP_NAME = "name";
11962  /**
11963   * <b>Fluent Client</b> search parameter constant for <b>name</b>
11964   * <p>
11965   * Description: <b>Computationally friendly name of the test script</b><br>
11966   * Type: <b>string</b><br>
11967   * Path: <b>TestScript.name</b><br>
11968   * </p>
11969   */
11970  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(
11971      SP_NAME);
11972
11973  /**
11974   * Search parameter: <b>context</b>
11975   * <p>
11976   * Description: <b>A use context assigned to the test script</b><br>
11977   * Type: <b>token</b><br>
11978   * Path: <b>TestScript.useContext.valueCodeableConcept</b><br>
11979   * </p>
11980   */
11981  @SearchParamDefinition(name = "context", path = "(TestScript.useContext.value as CodeableConcept)", description = "A use context assigned to the test script", type = "token")
11982  public static final String SP_CONTEXT = "context";
11983  /**
11984   * <b>Fluent Client</b> search parameter constant for <b>context</b>
11985   * <p>
11986   * Description: <b>A use context assigned to the test script</b><br>
11987   * Type: <b>token</b><br>
11988   * Path: <b>TestScript.useContext.valueCodeableConcept</b><br>
11989   * </p>
11990   */
11991  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(
11992      SP_CONTEXT);
11993
11994  /**
11995   * Search parameter: <b>publisher</b>
11996   * <p>
11997   * Description: <b>Name of the publisher of the test script</b><br>
11998   * Type: <b>string</b><br>
11999   * Path: <b>TestScript.publisher</b><br>
12000   * </p>
12001   */
12002  @SearchParamDefinition(name = "publisher", path = "TestScript.publisher", description = "Name of the publisher of the test script", type = "string")
12003  public static final String SP_PUBLISHER = "publisher";
12004  /**
12005   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
12006   * <p>
12007   * Description: <b>Name of the publisher of the test script</b><br>
12008   * Type: <b>string</b><br>
12009   * Path: <b>TestScript.publisher</b><br>
12010   * </p>
12011   */
12012  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(
12013      SP_PUBLISHER);
12014
12015  /**
12016   * Search parameter: <b>context-type-quantity</b>
12017   * <p>
12018   * Description: <b>A use context type and quantity- or range-based value
12019   * assigned to the test script</b><br>
12020   * Type: <b>composite</b><br>
12021   * Path: <b></b><br>
12022   * </p>
12023   */
12024  @SearchParamDefinition(name = "context-type-quantity", path = "TestScript.useContext", description = "A use context type and quantity- or range-based value assigned to the test script", type = "composite", compositeOf = {
12025      "context-type", "context-quantity" })
12026  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
12027  /**
12028   * <b>Fluent Client</b> search parameter constant for
12029   * <b>context-type-quantity</b>
12030   * <p>
12031   * Description: <b>A use context type and quantity- or range-based value
12032   * assigned to the test script</b><br>
12033   * Type: <b>composite</b><br>
12034   * Path: <b></b><br>
12035   * </p>
12036   */
12037  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> CONTEXT_TYPE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(
12038      SP_CONTEXT_TYPE_QUANTITY);
12039
12040  /**
12041   * Search parameter: <b>status</b>
12042   * <p>
12043   * Description: <b>The current status of the test script</b><br>
12044   * Type: <b>token</b><br>
12045   * Path: <b>TestScript.status</b><br>
12046   * </p>
12047   */
12048  @SearchParamDefinition(name = "status", path = "TestScript.status", description = "The current status of the test script", type = "token")
12049  public static final String SP_STATUS = "status";
12050  /**
12051   * <b>Fluent Client</b> search parameter constant for <b>status</b>
12052   * <p>
12053   * Description: <b>The current status of the test script</b><br>
12054   * Type: <b>token</b><br>
12055   * Path: <b>TestScript.status</b><br>
12056   * </p>
12057   */
12058  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(
12059      SP_STATUS);
12060
12061}