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 Base makeProperty(int hash, String name) throws FHIRException {
1201      switch (hash) {
1202      case 100346066:
1203        return getIndexElement();
1204      case -309425751:
1205        return getProfile();
1206      default:
1207        return super.makeProperty(hash, name);
1208      }
1209
1210    }
1211
1212    @Override
1213    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1214      switch (hash) {
1215      case 100346066:
1216        /* index */ return new String[] { "integer" };
1217      case -309425751:
1218        /* profile */ return new String[] { "Coding" };
1219      default:
1220        return super.getTypesForProperty(hash, name);
1221      }
1222
1223    }
1224
1225    @Override
1226    public Base addChild(String name) throws FHIRException {
1227      if (name.equals("index")) {
1228        throw new FHIRException("Cannot call addChild on a singleton property TestScript.index");
1229      } else if (name.equals("profile")) {
1230        this.profile = new Coding();
1231        return this.profile;
1232      } else
1233        return super.addChild(name);
1234    }
1235
1236    public TestScriptOriginComponent copy() {
1237      TestScriptOriginComponent dst = new TestScriptOriginComponent();
1238      copyValues(dst);
1239      return dst;
1240    }
1241
1242    public void copyValues(TestScriptOriginComponent dst) {
1243      super.copyValues(dst);
1244      dst.index = index == null ? null : index.copy();
1245      dst.profile = profile == null ? null : profile.copy();
1246    }
1247
1248    @Override
1249    public boolean equalsDeep(Base other_) {
1250      if (!super.equalsDeep(other_))
1251        return false;
1252      if (!(other_ instanceof TestScriptOriginComponent))
1253        return false;
1254      TestScriptOriginComponent o = (TestScriptOriginComponent) other_;
1255      return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true);
1256    }
1257
1258    @Override
1259    public boolean equalsShallow(Base other_) {
1260      if (!super.equalsShallow(other_))
1261        return false;
1262      if (!(other_ instanceof TestScriptOriginComponent))
1263        return false;
1264      TestScriptOriginComponent o = (TestScriptOriginComponent) other_;
1265      return compareValues(index, o.index, true);
1266    }
1267
1268    public boolean isEmpty() {
1269      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(index, profile);
1270    }
1271
1272    public String fhirType() {
1273      return "TestScript.origin";
1274
1275    }
1276
1277  }
1278
1279  @Block()
1280  public static class TestScriptDestinationComponent extends BackboneElement implements IBaseBackboneElement {
1281    /**
1282     * Abstract name given to a destination server in this test script. The name is
1283     * provided as a number starting at 1.
1284     */
1285    @Child(name = "index", type = { IntegerType.class }, order = 1, min = 1, max = 1, modifier = false, summary = false)
1286    @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.")
1287    protected IntegerType index;
1288
1289    /**
1290     * The type of destination profile the test system supports.
1291     */
1292    @Child(name = "profile", type = { Coding.class }, order = 2, min = 1, max = 1, modifier = false, summary = false)
1293    @Description(shortDefinition = "FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor", formalDefinition = "The type of destination profile the test system supports.")
1294    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/testscript-profile-destination-types")
1295    protected Coding profile;
1296
1297    private static final long serialVersionUID = -1239935149L;
1298
1299    /**
1300     * Constructor
1301     */
1302    public TestScriptDestinationComponent() {
1303      super();
1304    }
1305
1306    /**
1307     * Constructor
1308     */
1309    public TestScriptDestinationComponent(IntegerType index, Coding profile) {
1310      super();
1311      this.index = index;
1312      this.profile = profile;
1313    }
1314
1315    /**
1316     * @return {@link #index} (Abstract name given to a destination server in this
1317     *         test script. The name is provided as a number starting at 1.). This
1318     *         is the underlying object with id, value and extensions. The accessor
1319     *         "getIndex" gives direct access to the value
1320     */
1321    public IntegerType getIndexElement() {
1322      if (this.index == null)
1323        if (Configuration.errorOnAutoCreate())
1324          throw new Error("Attempt to auto-create TestScriptDestinationComponent.index");
1325        else if (Configuration.doAutoCreate())
1326          this.index = new IntegerType(); // bb
1327      return this.index;
1328    }
1329
1330    public boolean hasIndexElement() {
1331      return this.index != null && !this.index.isEmpty();
1332    }
1333
1334    public boolean hasIndex() {
1335      return this.index != null && !this.index.isEmpty();
1336    }
1337
1338    /**
1339     * @param value {@link #index} (Abstract name given to a destination server in
1340     *              this test script. The name is provided as a number starting at
1341     *              1.). This is the underlying object with id, value and
1342     *              extensions. The accessor "getIndex" gives direct access to the
1343     *              value
1344     */
1345    public TestScriptDestinationComponent setIndexElement(IntegerType value) {
1346      this.index = value;
1347      return this;
1348    }
1349
1350    /**
1351     * @return Abstract name given to a destination server in this test script. The
1352     *         name is provided as a number starting at 1.
1353     */
1354    public int getIndex() {
1355      return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue();
1356    }
1357
1358    /**
1359     * @param value Abstract name given to a destination server in this test script.
1360     *              The name is provided as a number starting at 1.
1361     */
1362    public TestScriptDestinationComponent setIndex(int value) {
1363      if (this.index == null)
1364        this.index = new IntegerType();
1365      this.index.setValue(value);
1366      return this;
1367    }
1368
1369    /**
1370     * @return {@link #profile} (The type of destination profile the test system
1371     *         supports.)
1372     */
1373    public Coding getProfile() {
1374      if (this.profile == null)
1375        if (Configuration.errorOnAutoCreate())
1376          throw new Error("Attempt to auto-create TestScriptDestinationComponent.profile");
1377        else if (Configuration.doAutoCreate())
1378          this.profile = new Coding(); // cc
1379      return this.profile;
1380    }
1381
1382    public boolean hasProfile() {
1383      return this.profile != null && !this.profile.isEmpty();
1384    }
1385
1386    /**
1387     * @param value {@link #profile} (The type of destination profile the test
1388     *              system supports.)
1389     */
1390    public TestScriptDestinationComponent setProfile(Coding value) {
1391      this.profile = value;
1392      return this;
1393    }
1394
1395    protected void listChildren(List<Property> children) {
1396      super.listChildren(children);
1397      children.add(new Property("index", "integer",
1398          "Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.",
1399          0, 1, index));
1400      children.add(new Property("profile", "Coding", "The type of destination profile the test system supports.", 0, 1,
1401          profile));
1402    }
1403
1404    @Override
1405    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1406      switch (_hash) {
1407      case 100346066:
1408        /* index */ return 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      case -309425751:
1412        /* profile */ return new Property("profile", "Coding",
1413            "The type of destination profile the test system supports.", 0, 1, profile);
1414      default:
1415        return super.getNamedProperty(_hash, _name, _checkValid);
1416      }
1417
1418    }
1419
1420    @Override
1421    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1422      switch (hash) {
1423      case 100346066:
1424        /* index */ return this.index == null ? new Base[0] : new Base[] { this.index }; // IntegerType
1425      case -309425751:
1426        /* profile */ return this.profile == null ? new Base[0] : new Base[] { this.profile }; // Coding
1427      default:
1428        return super.getProperty(hash, name, checkValid);
1429      }
1430
1431    }
1432
1433    @Override
1434    public Base setProperty(int hash, String name, Base value) throws FHIRException {
1435      switch (hash) {
1436      case 100346066: // index
1437        this.index = castToInteger(value); // IntegerType
1438        return value;
1439      case -309425751: // profile
1440        this.profile = castToCoding(value); // Coding
1441        return value;
1442      default:
1443        return super.setProperty(hash, name, value);
1444      }
1445
1446    }
1447
1448    @Override
1449    public Base setProperty(String name, Base value) throws FHIRException {
1450      if (name.equals("index")) {
1451        this.index = castToInteger(value); // IntegerType
1452      } else if (name.equals("profile")) {
1453        this.profile = castToCoding(value); // Coding
1454      } else
1455        return super.setProperty(name, value);
1456      return value;
1457    }
1458
1459    @Override
1460    public Base makeProperty(int hash, String name) throws FHIRException {
1461      switch (hash) {
1462      case 100346066:
1463        return getIndexElement();
1464      case -309425751:
1465        return getProfile();
1466      default:
1467        return super.makeProperty(hash, name);
1468      }
1469
1470    }
1471
1472    @Override
1473    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1474      switch (hash) {
1475      case 100346066:
1476        /* index */ return new String[] { "integer" };
1477      case -309425751:
1478        /* profile */ return new String[] { "Coding" };
1479      default:
1480        return super.getTypesForProperty(hash, name);
1481      }
1482
1483    }
1484
1485    @Override
1486    public Base addChild(String name) throws FHIRException {
1487      if (name.equals("index")) {
1488        throw new FHIRException("Cannot call addChild on a singleton property TestScript.index");
1489      } else if (name.equals("profile")) {
1490        this.profile = new Coding();
1491        return this.profile;
1492      } else
1493        return super.addChild(name);
1494    }
1495
1496    public TestScriptDestinationComponent copy() {
1497      TestScriptDestinationComponent dst = new TestScriptDestinationComponent();
1498      copyValues(dst);
1499      return dst;
1500    }
1501
1502    public void copyValues(TestScriptDestinationComponent dst) {
1503      super.copyValues(dst);
1504      dst.index = index == null ? null : index.copy();
1505      dst.profile = profile == null ? null : profile.copy();
1506    }
1507
1508    @Override
1509    public boolean equalsDeep(Base other_) {
1510      if (!super.equalsDeep(other_))
1511        return false;
1512      if (!(other_ instanceof TestScriptDestinationComponent))
1513        return false;
1514      TestScriptDestinationComponent o = (TestScriptDestinationComponent) other_;
1515      return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true);
1516    }
1517
1518    @Override
1519    public boolean equalsShallow(Base other_) {
1520      if (!super.equalsShallow(other_))
1521        return false;
1522      if (!(other_ instanceof TestScriptDestinationComponent))
1523        return false;
1524      TestScriptDestinationComponent o = (TestScriptDestinationComponent) other_;
1525      return compareValues(index, o.index, true);
1526    }
1527
1528    public boolean isEmpty() {
1529      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(index, profile);
1530    }
1531
1532    public String fhirType() {
1533      return "TestScript.destination";
1534
1535    }
1536
1537  }
1538
1539  @Block()
1540  public static class TestScriptMetadataComponent extends BackboneElement implements IBaseBackboneElement {
1541    /**
1542     * A link to the FHIR specification that this test is covering.
1543     */
1544    @Child(name = "link", type = {}, order = 1, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
1545    @Description(shortDefinition = "Links to the FHIR specification", formalDefinition = "A link to the FHIR specification that this test is covering.")
1546    protected List<TestScriptMetadataLinkComponent> link;
1547
1548    /**
1549     * Capabilities that must exist and are assumed to function correctly on the
1550     * FHIR server being tested.
1551     */
1552    @Child(name = "capability", type = {}, order = 2, min = 1, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
1553    @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.")
1554    protected List<TestScriptMetadataCapabilityComponent> capability;
1555
1556    private static final long serialVersionUID = 745183328L;
1557
1558    /**
1559     * Constructor
1560     */
1561    public TestScriptMetadataComponent() {
1562      super();
1563    }
1564
1565    /**
1566     * @return {@link #link} (A link to the FHIR specification that this test is
1567     *         covering.)
1568     */
1569    public List<TestScriptMetadataLinkComponent> getLink() {
1570      if (this.link == null)
1571        this.link = new ArrayList<TestScriptMetadataLinkComponent>();
1572      return this.link;
1573    }
1574
1575    /**
1576     * @return Returns a reference to <code>this</code> for easy method chaining
1577     */
1578    public TestScriptMetadataComponent setLink(List<TestScriptMetadataLinkComponent> theLink) {
1579      this.link = theLink;
1580      return this;
1581    }
1582
1583    public boolean hasLink() {
1584      if (this.link == null)
1585        return false;
1586      for (TestScriptMetadataLinkComponent item : this.link)
1587        if (!item.isEmpty())
1588          return true;
1589      return false;
1590    }
1591
1592    public TestScriptMetadataLinkComponent addLink() { // 3
1593      TestScriptMetadataLinkComponent t = new TestScriptMetadataLinkComponent();
1594      if (this.link == null)
1595        this.link = new ArrayList<TestScriptMetadataLinkComponent>();
1596      this.link.add(t);
1597      return t;
1598    }
1599
1600    public TestScriptMetadataComponent addLink(TestScriptMetadataLinkComponent t) { // 3
1601      if (t == null)
1602        return this;
1603      if (this.link == null)
1604        this.link = new ArrayList<TestScriptMetadataLinkComponent>();
1605      this.link.add(t);
1606      return this;
1607    }
1608
1609    /**
1610     * @return The first repetition of repeating field {@link #link}, creating it if
1611     *         it does not already exist
1612     */
1613    public TestScriptMetadataLinkComponent getLinkFirstRep() {
1614      if (getLink().isEmpty()) {
1615        addLink();
1616      }
1617      return getLink().get(0);
1618    }
1619
1620    /**
1621     * @return {@link #capability} (Capabilities that must exist and are assumed to
1622     *         function correctly on the FHIR server being tested.)
1623     */
1624    public List<TestScriptMetadataCapabilityComponent> getCapability() {
1625      if (this.capability == null)
1626        this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1627      return this.capability;
1628    }
1629
1630    /**
1631     * @return Returns a reference to <code>this</code> for easy method chaining
1632     */
1633    public TestScriptMetadataComponent setCapability(List<TestScriptMetadataCapabilityComponent> theCapability) {
1634      this.capability = theCapability;
1635      return this;
1636    }
1637
1638    public boolean hasCapability() {
1639      if (this.capability == null)
1640        return false;
1641      for (TestScriptMetadataCapabilityComponent item : this.capability)
1642        if (!item.isEmpty())
1643          return true;
1644      return false;
1645    }
1646
1647    public TestScriptMetadataCapabilityComponent addCapability() { // 3
1648      TestScriptMetadataCapabilityComponent t = new TestScriptMetadataCapabilityComponent();
1649      if (this.capability == null)
1650        this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1651      this.capability.add(t);
1652      return t;
1653    }
1654
1655    public TestScriptMetadataComponent addCapability(TestScriptMetadataCapabilityComponent t) { // 3
1656      if (t == null)
1657        return this;
1658      if (this.capability == null)
1659        this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1660      this.capability.add(t);
1661      return this;
1662    }
1663
1664    /**
1665     * @return The first repetition of repeating field {@link #capability}, creating
1666     *         it if it does not already exist
1667     */
1668    public TestScriptMetadataCapabilityComponent getCapabilityFirstRep() {
1669      if (getCapability().isEmpty()) {
1670        addCapability();
1671      }
1672      return getCapability().get(0);
1673    }
1674
1675    protected void listChildren(List<Property> children) {
1676      super.listChildren(children);
1677      children.add(new Property("link", "", "A link to the FHIR specification that this test is covering.", 0,
1678          java.lang.Integer.MAX_VALUE, link));
1679      children.add(new Property("capability", "",
1680          "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.", 0,
1681          java.lang.Integer.MAX_VALUE, capability));
1682    }
1683
1684    @Override
1685    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1686      switch (_hash) {
1687      case 3321850:
1688        /* link */ return new Property("link", "", "A link to the FHIR specification that this test is covering.", 0,
1689            java.lang.Integer.MAX_VALUE, link);
1690      case -783669992:
1691        /* capability */ return new Property("capability", "",
1692            "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.", 0,
1693            java.lang.Integer.MAX_VALUE, capability);
1694      default:
1695        return super.getNamedProperty(_hash, _name, _checkValid);
1696      }
1697
1698    }
1699
1700    @Override
1701    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1702      switch (hash) {
1703      case 3321850:
1704        /* link */ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // TestScriptMetadataLinkComponent
1705      case -783669992:
1706        /* capability */ return this.capability == null ? new Base[0]
1707            : this.capability.toArray(new Base[this.capability.size()]); // TestScriptMetadataCapabilityComponent
1708      default:
1709        return super.getProperty(hash, name, checkValid);
1710      }
1711
1712    }
1713
1714    @Override
1715    public Base setProperty(int hash, String name, Base value) throws FHIRException {
1716      switch (hash) {
1717      case 3321850: // link
1718        this.getLink().add((TestScriptMetadataLinkComponent) value); // TestScriptMetadataLinkComponent
1719        return value;
1720      case -783669992: // capability
1721        this.getCapability().add((TestScriptMetadataCapabilityComponent) value); // TestScriptMetadataCapabilityComponent
1722        return value;
1723      default:
1724        return super.setProperty(hash, name, value);
1725      }
1726
1727    }
1728
1729    @Override
1730    public Base setProperty(String name, Base value) throws FHIRException {
1731      if (name.equals("link")) {
1732        this.getLink().add((TestScriptMetadataLinkComponent) value);
1733      } else if (name.equals("capability")) {
1734        this.getCapability().add((TestScriptMetadataCapabilityComponent) value);
1735      } else
1736        return super.setProperty(name, value);
1737      return value;
1738    }
1739
1740    @Override
1741    public Base makeProperty(int hash, String name) throws FHIRException {
1742      switch (hash) {
1743      case 3321850:
1744        return addLink();
1745      case -783669992:
1746        return addCapability();
1747      default:
1748        return super.makeProperty(hash, name);
1749      }
1750
1751    }
1752
1753    @Override
1754    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1755      switch (hash) {
1756      case 3321850:
1757        /* link */ return new String[] {};
1758      case -783669992:
1759        /* capability */ return new String[] {};
1760      default:
1761        return super.getTypesForProperty(hash, name);
1762      }
1763
1764    }
1765
1766    @Override
1767    public Base addChild(String name) throws FHIRException {
1768      if (name.equals("link")) {
1769        return addLink();
1770      } else if (name.equals("capability")) {
1771        return addCapability();
1772      } else
1773        return super.addChild(name);
1774    }
1775
1776    public TestScriptMetadataComponent copy() {
1777      TestScriptMetadataComponent dst = new TestScriptMetadataComponent();
1778      copyValues(dst);
1779      return dst;
1780    }
1781
1782    public void copyValues(TestScriptMetadataComponent dst) {
1783      super.copyValues(dst);
1784      if (link != null) {
1785        dst.link = new ArrayList<TestScriptMetadataLinkComponent>();
1786        for (TestScriptMetadataLinkComponent i : link)
1787          dst.link.add(i.copy());
1788      }
1789      ;
1790      if (capability != null) {
1791        dst.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1792        for (TestScriptMetadataCapabilityComponent i : capability)
1793          dst.capability.add(i.copy());
1794      }
1795      ;
1796    }
1797
1798    @Override
1799    public boolean equalsDeep(Base other_) {
1800      if (!super.equalsDeep(other_))
1801        return false;
1802      if (!(other_ instanceof TestScriptMetadataComponent))
1803        return false;
1804      TestScriptMetadataComponent o = (TestScriptMetadataComponent) other_;
1805      return compareDeep(link, o.link, true) && compareDeep(capability, o.capability, true);
1806    }
1807
1808    @Override
1809    public boolean equalsShallow(Base other_) {
1810      if (!super.equalsShallow(other_))
1811        return false;
1812      if (!(other_ instanceof TestScriptMetadataComponent))
1813        return false;
1814      TestScriptMetadataComponent o = (TestScriptMetadataComponent) other_;
1815      return true;
1816    }
1817
1818    public boolean isEmpty() {
1819      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(link, capability);
1820    }
1821
1822    public String fhirType() {
1823      return "TestScript.metadata";
1824
1825    }
1826
1827  }
1828
1829  @Block()
1830  public static class TestScriptMetadataLinkComponent extends BackboneElement implements IBaseBackboneElement {
1831    /**
1832     * URL to a particular requirement or feature within the FHIR specification.
1833     */
1834    @Child(name = "url", type = { UriType.class }, order = 1, min = 1, max = 1, modifier = false, summary = false)
1835    @Description(shortDefinition = "URL to the specification", formalDefinition = "URL to a particular requirement or feature within the FHIR specification.")
1836    protected UriType url;
1837
1838    /**
1839     * Short description of the link.
1840     */
1841    @Child(name = "description", type = {
1842        StringType.class }, order = 2, min = 0, max = 1, modifier = false, summary = false)
1843    @Description(shortDefinition = "Short description", formalDefinition = "Short description of the link.")
1844    protected StringType description;
1845
1846    private static final long serialVersionUID = 213372298L;
1847
1848    /**
1849     * Constructor
1850     */
1851    public TestScriptMetadataLinkComponent() {
1852      super();
1853    }
1854
1855    /**
1856     * Constructor
1857     */
1858    public TestScriptMetadataLinkComponent(UriType url) {
1859      super();
1860      this.url = url;
1861    }
1862
1863    /**
1864     * @return {@link #url} (URL to a particular requirement or feature within the
1865     *         FHIR specification.). This is the underlying object with id, value
1866     *         and extensions. The accessor "getUrl" gives direct access to the
1867     *         value
1868     */
1869    public UriType getUrlElement() {
1870      if (this.url == null)
1871        if (Configuration.errorOnAutoCreate())
1872          throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.url");
1873        else if (Configuration.doAutoCreate())
1874          this.url = new UriType(); // bb
1875      return this.url;
1876    }
1877
1878    public boolean hasUrlElement() {
1879      return this.url != null && !this.url.isEmpty();
1880    }
1881
1882    public boolean hasUrl() {
1883      return this.url != null && !this.url.isEmpty();
1884    }
1885
1886    /**
1887     * @param value {@link #url} (URL to a particular requirement or feature within
1888     *              the FHIR specification.). This is the underlying object with id,
1889     *              value and extensions. The accessor "getUrl" gives direct access
1890     *              to the value
1891     */
1892    public TestScriptMetadataLinkComponent setUrlElement(UriType value) {
1893      this.url = value;
1894      return this;
1895    }
1896
1897    /**
1898     * @return URL to a particular requirement or feature within the FHIR
1899     *         specification.
1900     */
1901    public String getUrl() {
1902      return this.url == null ? null : this.url.getValue();
1903    }
1904
1905    /**
1906     * @param value URL to a particular requirement or feature within the FHIR
1907     *              specification.
1908     */
1909    public TestScriptMetadataLinkComponent setUrl(String value) {
1910      if (this.url == null)
1911        this.url = new UriType();
1912      this.url.setValue(value);
1913      return this;
1914    }
1915
1916    /**
1917     * @return {@link #description} (Short description of the link.). This is the
1918     *         underlying object with id, value and extensions. The accessor
1919     *         "getDescription" gives direct access to the value
1920     */
1921    public StringType getDescriptionElement() {
1922      if (this.description == null)
1923        if (Configuration.errorOnAutoCreate())
1924          throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.description");
1925        else if (Configuration.doAutoCreate())
1926          this.description = new StringType(); // bb
1927      return this.description;
1928    }
1929
1930    public boolean hasDescriptionElement() {
1931      return this.description != null && !this.description.isEmpty();
1932    }
1933
1934    public boolean hasDescription() {
1935      return this.description != null && !this.description.isEmpty();
1936    }
1937
1938    /**
1939     * @param value {@link #description} (Short description of the link.). This is
1940     *              the underlying object with id, value and extensions. The
1941     *              accessor "getDescription" gives direct access to the value
1942     */
1943    public TestScriptMetadataLinkComponent setDescriptionElement(StringType value) {
1944      this.description = value;
1945      return this;
1946    }
1947
1948    /**
1949     * @return Short description of the link.
1950     */
1951    public String getDescription() {
1952      return this.description == null ? null : this.description.getValue();
1953    }
1954
1955    /**
1956     * @param value Short description of the link.
1957     */
1958    public TestScriptMetadataLinkComponent setDescription(String value) {
1959      if (Utilities.noString(value))
1960        this.description = null;
1961      else {
1962        if (this.description == null)
1963          this.description = new StringType();
1964        this.description.setValue(value);
1965      }
1966      return this;
1967    }
1968
1969    protected void listChildren(List<Property> children) {
1970      super.listChildren(children);
1971      children.add(new Property("url", "uri",
1972          "URL to a particular requirement or feature within the FHIR specification.", 0, 1, url));
1973      children.add(new Property("description", "string", "Short description of the link.", 0, 1, description));
1974    }
1975
1976    @Override
1977    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1978      switch (_hash) {
1979      case 116079:
1980        /* url */ return new Property("url", "uri",
1981            "URL to a particular requirement or feature within the FHIR specification.", 0, 1, url);
1982      case -1724546052:
1983        /* description */ return new Property("description", "string", "Short description of the link.", 0, 1,
1984            description);
1985      default:
1986        return super.getNamedProperty(_hash, _name, _checkValid);
1987      }
1988
1989    }
1990
1991    @Override
1992    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1993      switch (hash) {
1994      case 116079:
1995        /* url */ return this.url == null ? new Base[0] : new Base[] { this.url }; // UriType
1996      case -1724546052:
1997        /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // StringType
1998      default:
1999        return super.getProperty(hash, name, checkValid);
2000      }
2001
2002    }
2003
2004    @Override
2005    public Base setProperty(int hash, String name, Base value) throws FHIRException {
2006      switch (hash) {
2007      case 116079: // url
2008        this.url = castToUri(value); // UriType
2009        return value;
2010      case -1724546052: // description
2011        this.description = castToString(value); // StringType
2012        return value;
2013      default:
2014        return super.setProperty(hash, name, value);
2015      }
2016
2017    }
2018
2019    @Override
2020    public Base setProperty(String name, Base value) throws FHIRException {
2021      if (name.equals("url")) {
2022        this.url = castToUri(value); // UriType
2023      } else if (name.equals("description")) {
2024        this.description = castToString(value); // StringType
2025      } else
2026        return super.setProperty(name, value);
2027      return value;
2028    }
2029
2030    @Override
2031    public Base makeProperty(int hash, String name) throws FHIRException {
2032      switch (hash) {
2033      case 116079:
2034        return getUrlElement();
2035      case -1724546052:
2036        return getDescriptionElement();
2037      default:
2038        return super.makeProperty(hash, name);
2039      }
2040
2041    }
2042
2043    @Override
2044    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2045      switch (hash) {
2046      case 116079:
2047        /* url */ return new String[] { "uri" };
2048      case -1724546052:
2049        /* description */ return new String[] { "string" };
2050      default:
2051        return super.getTypesForProperty(hash, name);
2052      }
2053
2054    }
2055
2056    @Override
2057    public Base addChild(String name) throws FHIRException {
2058      if (name.equals("url")) {
2059        throw new FHIRException("Cannot call addChild on a singleton property TestScript.url");
2060      } else if (name.equals("description")) {
2061        throw new FHIRException("Cannot call addChild on a singleton property TestScript.description");
2062      } else
2063        return super.addChild(name);
2064    }
2065
2066    public TestScriptMetadataLinkComponent copy() {
2067      TestScriptMetadataLinkComponent dst = new TestScriptMetadataLinkComponent();
2068      copyValues(dst);
2069      return dst;
2070    }
2071
2072    public void copyValues(TestScriptMetadataLinkComponent dst) {
2073      super.copyValues(dst);
2074      dst.url = url == null ? null : url.copy();
2075      dst.description = description == null ? null : description.copy();
2076    }
2077
2078    @Override
2079    public boolean equalsDeep(Base other_) {
2080      if (!super.equalsDeep(other_))
2081        return false;
2082      if (!(other_ instanceof TestScriptMetadataLinkComponent))
2083        return false;
2084      TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other_;
2085      return compareDeep(url, o.url, true) && compareDeep(description, o.description, true);
2086    }
2087
2088    @Override
2089    public boolean equalsShallow(Base other_) {
2090      if (!super.equalsShallow(other_))
2091        return false;
2092      if (!(other_ instanceof TestScriptMetadataLinkComponent))
2093        return false;
2094      TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other_;
2095      return compareValues(url, o.url, true) && compareValues(description, o.description, true);
2096    }
2097
2098    public boolean isEmpty() {
2099      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, description);
2100    }
2101
2102    public String fhirType() {
2103      return "TestScript.metadata.link";
2104
2105    }
2106
2107  }
2108
2109  @Block()
2110  public static class TestScriptMetadataCapabilityComponent extends BackboneElement implements IBaseBackboneElement {
2111    /**
2112     * Whether or not the test execution will require the given capabilities of the
2113     * server in order for this test script to execute.
2114     */
2115    @Child(name = "required", type = {
2116        BooleanType.class }, order = 1, min = 1, max = 1, modifier = false, summary = false)
2117    @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.")
2118    protected BooleanType required;
2119
2120    /**
2121     * Whether or not the test execution will validate the given capabilities of the
2122     * server in order for this test script to execute.
2123     */
2124    @Child(name = "validated", type = {
2125        BooleanType.class }, order = 2, min = 1, max = 1, modifier = false, summary = false)
2126    @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.")
2127    protected BooleanType validated;
2128
2129    /**
2130     * Description of the capabilities that this test script is requiring the server
2131     * to support.
2132     */
2133    @Child(name = "description", type = {
2134        StringType.class }, order = 3, min = 0, max = 1, modifier = false, summary = false)
2135    @Description(shortDefinition = "The expected capabilities of the server", formalDefinition = "Description of the capabilities that this test script is requiring the server to support.")
2136    protected StringType description;
2137
2138    /**
2139     * Which origin server these requirements apply to.
2140     */
2141    @Child(name = "origin", type = {
2142        IntegerType.class }, order = 4, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
2143    @Description(shortDefinition = "Which origin server these requirements apply to", formalDefinition = "Which origin server these requirements apply to.")
2144    protected List<IntegerType> origin;
2145
2146    /**
2147     * Which server these requirements apply to.
2148     */
2149    @Child(name = "destination", type = {
2150        IntegerType.class }, order = 5, min = 0, max = 1, modifier = false, summary = false)
2151    @Description(shortDefinition = "Which server these requirements apply to", formalDefinition = "Which server these requirements apply to.")
2152    protected IntegerType destination;
2153
2154    /**
2155     * Links to the FHIR specification that describes this interaction and the
2156     * resources involved in more detail.
2157     */
2158    @Child(name = "link", type = {
2159        UriType.class }, order = 6, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
2160    @Description(shortDefinition = "Links to the FHIR specification", formalDefinition = "Links to the FHIR specification that describes this interaction and the resources involved in more detail.")
2161    protected List<UriType> link;
2162
2163    /**
2164     * Minimum capabilities required of server for test script to execute
2165     * successfully. If server does not meet at a minimum the referenced capability
2166     * statement, then all tests in this script are skipped.
2167     */
2168    @Child(name = "capabilities", type = {
2169        CanonicalType.class }, order = 7, min = 1, max = 1, modifier = false, summary = false)
2170    @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.")
2171    protected CanonicalType capabilities;
2172
2173    private static final long serialVersionUID = -1368199288L;
2174
2175    /**
2176     * Constructor
2177     */
2178    public TestScriptMetadataCapabilityComponent() {
2179      super();
2180    }
2181
2182    /**
2183     * Constructor
2184     */
2185    public TestScriptMetadataCapabilityComponent(BooleanType required, BooleanType validated,
2186        CanonicalType capabilities) {
2187      super();
2188      this.required = required;
2189      this.validated = validated;
2190      this.capabilities = capabilities;
2191    }
2192
2193    /**
2194     * @return {@link #required} (Whether or not the test execution will require the
2195     *         given capabilities of the server in order for this test script to
2196     *         execute.). This is the underlying object with id, value and
2197     *         extensions. The accessor "getRequired" gives direct access to the
2198     *         value
2199     */
2200    public BooleanType getRequiredElement() {
2201      if (this.required == null)
2202        if (Configuration.errorOnAutoCreate())
2203          throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.required");
2204        else if (Configuration.doAutoCreate())
2205          this.required = new BooleanType(); // bb
2206      return this.required;
2207    }
2208
2209    public boolean hasRequiredElement() {
2210      return this.required != null && !this.required.isEmpty();
2211    }
2212
2213    public boolean hasRequired() {
2214      return this.required != null && !this.required.isEmpty();
2215    }
2216
2217    /**
2218     * @param value {@link #required} (Whether or not the test execution will
2219     *              require the given capabilities of the server in order for this
2220     *              test script to execute.). This is the underlying object with id,
2221     *              value and extensions. The accessor "getRequired" gives direct
2222     *              access to the value
2223     */
2224    public TestScriptMetadataCapabilityComponent setRequiredElement(BooleanType value) {
2225      this.required = value;
2226      return this;
2227    }
2228
2229    /**
2230     * @return Whether or not the test execution will require the given capabilities
2231     *         of the server in order for this test script to execute.
2232     */
2233    public boolean getRequired() {
2234      return this.required == null || this.required.isEmpty() ? false : this.required.getValue();
2235    }
2236
2237    /**
2238     * @param value Whether or not the test execution will require the given
2239     *              capabilities of the server in order for this test script to
2240     *              execute.
2241     */
2242    public TestScriptMetadataCapabilityComponent setRequired(boolean value) {
2243      if (this.required == null)
2244        this.required = new BooleanType();
2245      this.required.setValue(value);
2246      return this;
2247    }
2248
2249    /**
2250     * @return {@link #validated} (Whether or not the test execution will validate
2251     *         the given capabilities of the server in order for this test script to
2252     *         execute.). This is the underlying object with id, value and
2253     *         extensions. The accessor "getValidated" gives direct access to the
2254     *         value
2255     */
2256    public BooleanType getValidatedElement() {
2257      if (this.validated == null)
2258        if (Configuration.errorOnAutoCreate())
2259          throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.validated");
2260        else if (Configuration.doAutoCreate())
2261          this.validated = new BooleanType(); // bb
2262      return this.validated;
2263    }
2264
2265    public boolean hasValidatedElement() {
2266      return this.validated != null && !this.validated.isEmpty();
2267    }
2268
2269    public boolean hasValidated() {
2270      return this.validated != null && !this.validated.isEmpty();
2271    }
2272
2273    /**
2274     * @param value {@link #validated} (Whether or not the test execution will
2275     *              validate the given capabilities of the server in order for this
2276     *              test script to execute.). This is the underlying object with id,
2277     *              value and extensions. The accessor "getValidated" gives direct
2278     *              access to the value
2279     */
2280    public TestScriptMetadataCapabilityComponent setValidatedElement(BooleanType value) {
2281      this.validated = value;
2282      return this;
2283    }
2284
2285    /**
2286     * @return Whether or not the test execution will validate the given
2287     *         capabilities of the server in order for this test script to execute.
2288     */
2289    public boolean getValidated() {
2290      return this.validated == null || this.validated.isEmpty() ? false : this.validated.getValue();
2291    }
2292
2293    /**
2294     * @param value Whether or not the test execution will validate the given
2295     *              capabilities of the server in order for this test script to
2296     *              execute.
2297     */
2298    public TestScriptMetadataCapabilityComponent setValidated(boolean value) {
2299      if (this.validated == null)
2300        this.validated = new BooleanType();
2301      this.validated.setValue(value);
2302      return this;
2303    }
2304
2305    /**
2306     * @return {@link #description} (Description of the capabilities that this test
2307     *         script is requiring the server to support.). This is the underlying
2308     *         object with id, value and extensions. The accessor "getDescription"
2309     *         gives direct access to the value
2310     */
2311    public StringType getDescriptionElement() {
2312      if (this.description == null)
2313        if (Configuration.errorOnAutoCreate())
2314          throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.description");
2315        else if (Configuration.doAutoCreate())
2316          this.description = new StringType(); // bb
2317      return this.description;
2318    }
2319
2320    public boolean hasDescriptionElement() {
2321      return this.description != null && !this.description.isEmpty();
2322    }
2323
2324    public boolean hasDescription() {
2325      return this.description != null && !this.description.isEmpty();
2326    }
2327
2328    /**
2329     * @param value {@link #description} (Description of the capabilities that this
2330     *              test script is requiring the server to support.). This is the
2331     *              underlying object with id, value and extensions. The accessor
2332     *              "getDescription" gives direct access to the value
2333     */
2334    public TestScriptMetadataCapabilityComponent setDescriptionElement(StringType value) {
2335      this.description = value;
2336      return this;
2337    }
2338
2339    /**
2340     * @return Description of the capabilities that this test script is requiring
2341     *         the server to support.
2342     */
2343    public String getDescription() {
2344      return this.description == null ? null : this.description.getValue();
2345    }
2346
2347    /**
2348     * @param value Description of the capabilities that this test script is
2349     *              requiring the server to support.
2350     */
2351    public TestScriptMetadataCapabilityComponent setDescription(String value) {
2352      if (Utilities.noString(value))
2353        this.description = null;
2354      else {
2355        if (this.description == null)
2356          this.description = new StringType();
2357        this.description.setValue(value);
2358      }
2359      return this;
2360    }
2361
2362    /**
2363     * @return {@link #origin} (Which origin server these requirements apply to.)
2364     */
2365    public List<IntegerType> getOrigin() {
2366      if (this.origin == null)
2367        this.origin = new ArrayList<IntegerType>();
2368      return this.origin;
2369    }
2370
2371    /**
2372     * @return Returns a reference to <code>this</code> for easy method chaining
2373     */
2374    public TestScriptMetadataCapabilityComponent setOrigin(List<IntegerType> theOrigin) {
2375      this.origin = theOrigin;
2376      return this;
2377    }
2378
2379    public boolean hasOrigin() {
2380      if (this.origin == null)
2381        return false;
2382      for (IntegerType item : this.origin)
2383        if (!item.isEmpty())
2384          return true;
2385      return false;
2386    }
2387
2388    /**
2389     * @return {@link #origin} (Which origin server these requirements apply to.)
2390     */
2391    public IntegerType addOriginElement() {// 2
2392      IntegerType t = new IntegerType();
2393      if (this.origin == null)
2394        this.origin = new ArrayList<IntegerType>();
2395      this.origin.add(t);
2396      return t;
2397    }
2398
2399    /**
2400     * @param value {@link #origin} (Which origin server these requirements apply
2401     *              to.)
2402     */
2403    public TestScriptMetadataCapabilityComponent addOrigin(int value) { // 1
2404      IntegerType t = new IntegerType();
2405      t.setValue(value);
2406      if (this.origin == null)
2407        this.origin = new ArrayList<IntegerType>();
2408      this.origin.add(t);
2409      return this;
2410    }
2411
2412    /**
2413     * @param value {@link #origin} (Which origin server these requirements apply
2414     *              to.)
2415     */
2416    public boolean hasOrigin(int value) {
2417      if (this.origin == null)
2418        return false;
2419      for (IntegerType v : this.origin)
2420        if (v.getValue().equals(value)) // integer
2421          return true;
2422      return false;
2423    }
2424
2425    /**
2426     * @return {@link #destination} (Which server these requirements apply to.).
2427     *         This is the underlying object with id, value and extensions. The
2428     *         accessor "getDestination" gives direct access to the value
2429     */
2430    public IntegerType getDestinationElement() {
2431      if (this.destination == null)
2432        if (Configuration.errorOnAutoCreate())
2433          throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.destination");
2434        else if (Configuration.doAutoCreate())
2435          this.destination = new IntegerType(); // bb
2436      return this.destination;
2437    }
2438
2439    public boolean hasDestinationElement() {
2440      return this.destination != null && !this.destination.isEmpty();
2441    }
2442
2443    public boolean hasDestination() {
2444      return this.destination != null && !this.destination.isEmpty();
2445    }
2446
2447    /**
2448     * @param value {@link #destination} (Which server these requirements apply
2449     *              to.). This is the underlying object with id, value and
2450     *              extensions. The accessor "getDestination" gives direct access to
2451     *              the value
2452     */
2453    public TestScriptMetadataCapabilityComponent setDestinationElement(IntegerType value) {
2454      this.destination = value;
2455      return this;
2456    }
2457
2458    /**
2459     * @return Which server these requirements apply to.
2460     */
2461    public int getDestination() {
2462      return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue();
2463    }
2464
2465    /**
2466     * @param value Which server these requirements apply to.
2467     */
2468    public TestScriptMetadataCapabilityComponent setDestination(int value) {
2469      if (this.destination == null)
2470        this.destination = new IntegerType();
2471      this.destination.setValue(value);
2472      return this;
2473    }
2474
2475    /**
2476     * @return {@link #link} (Links to the FHIR specification that describes this
2477     *         interaction and the resources involved in more detail.)
2478     */
2479    public List<UriType> getLink() {
2480      if (this.link == null)
2481        this.link = new ArrayList<UriType>();
2482      return this.link;
2483    }
2484
2485    /**
2486     * @return Returns a reference to <code>this</code> for easy method chaining
2487     */
2488    public TestScriptMetadataCapabilityComponent setLink(List<UriType> theLink) {
2489      this.link = theLink;
2490      return this;
2491    }
2492
2493    public boolean hasLink() {
2494      if (this.link == null)
2495        return false;
2496      for (UriType item : this.link)
2497        if (!item.isEmpty())
2498          return true;
2499      return false;
2500    }
2501
2502    /**
2503     * @return {@link #link} (Links to the FHIR specification that describes this
2504     *         interaction and the resources involved in more detail.)
2505     */
2506    public UriType addLinkElement() {// 2
2507      UriType t = new UriType();
2508      if (this.link == null)
2509        this.link = new ArrayList<UriType>();
2510      this.link.add(t);
2511      return t;
2512    }
2513
2514    /**
2515     * @param value {@link #link} (Links to the FHIR specification that describes
2516     *              this interaction and the resources involved in more detail.)
2517     */
2518    public TestScriptMetadataCapabilityComponent addLink(String value) { // 1
2519      UriType t = new UriType();
2520      t.setValue(value);
2521      if (this.link == null)
2522        this.link = new ArrayList<UriType>();
2523      this.link.add(t);
2524      return this;
2525    }
2526
2527    /**
2528     * @param value {@link #link} (Links to the FHIR specification that describes
2529     *              this interaction and the resources involved in more detail.)
2530     */
2531    public boolean hasLink(String value) {
2532      if (this.link == null)
2533        return false;
2534      for (UriType v : this.link)
2535        if (v.getValue().equals(value)) // uri
2536          return true;
2537      return false;
2538    }
2539
2540    /**
2541     * @return {@link #capabilities} (Minimum capabilities required of server for
2542     *         test script to execute successfully. If server does not meet at a
2543     *         minimum the referenced capability statement, then all tests in this
2544     *         script are skipped.). This is the underlying object with id, value
2545     *         and extensions. The accessor "getCapabilities" gives direct access to
2546     *         the value
2547     */
2548    public CanonicalType getCapabilitiesElement() {
2549      if (this.capabilities == null)
2550        if (Configuration.errorOnAutoCreate())
2551          throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.capabilities");
2552        else if (Configuration.doAutoCreate())
2553          this.capabilities = new CanonicalType(); // bb
2554      return this.capabilities;
2555    }
2556
2557    public boolean hasCapabilitiesElement() {
2558      return this.capabilities != null && !this.capabilities.isEmpty();
2559    }
2560
2561    public boolean hasCapabilities() {
2562      return this.capabilities != null && !this.capabilities.isEmpty();
2563    }
2564
2565    /**
2566     * @param value {@link #capabilities} (Minimum capabilities required of server
2567     *              for test script to execute successfully. If server does not meet
2568     *              at a minimum the referenced capability statement, then all tests
2569     *              in this script are skipped.). This is the underlying object with
2570     *              id, value and extensions. The accessor "getCapabilities" gives
2571     *              direct access to the value
2572     */
2573    public TestScriptMetadataCapabilityComponent setCapabilitiesElement(CanonicalType value) {
2574      this.capabilities = value;
2575      return this;
2576    }
2577
2578    /**
2579     * @return Minimum capabilities required of server for test script to execute
2580     *         successfully. If server does not meet at a minimum the referenced
2581     *         capability statement, then all tests in this script are skipped.
2582     */
2583    public String getCapabilities() {
2584      return this.capabilities == null ? null : this.capabilities.getValue();
2585    }
2586
2587    /**
2588     * @param value Minimum capabilities required of server for test script to
2589     *              execute successfully. If server does not meet at a minimum the
2590     *              referenced capability statement, then all tests in this script
2591     *              are skipped.
2592     */
2593    public TestScriptMetadataCapabilityComponent setCapabilities(String value) {
2594      if (this.capabilities == null)
2595        this.capabilities = new CanonicalType();
2596      this.capabilities.setValue(value);
2597      return this;
2598    }
2599
2600    protected void listChildren(List<Property> children) {
2601      super.listChildren(children);
2602      children.add(new Property("required", "boolean",
2603          "Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.",
2604          0, 1, required));
2605      children.add(new Property("validated", "boolean",
2606          "Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.",
2607          0, 1, validated));
2608      children.add(new Property("description", "string",
2609          "Description of the capabilities that this test script is requiring the server to support.", 0, 1,
2610          description));
2611      children.add(new Property("origin", "integer", "Which origin server these requirements apply to.", 0,
2612          java.lang.Integer.MAX_VALUE, origin));
2613      children
2614          .add(new Property("destination", "integer", "Which server these requirements apply to.", 0, 1, destination));
2615      children.add(new Property("link", "uri",
2616          "Links to the FHIR specification that describes this interaction and the resources involved in more detail.",
2617          0, java.lang.Integer.MAX_VALUE, link));
2618      children.add(new Property("capabilities", "canonical(CapabilityStatement)",
2619          "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.",
2620          0, 1, capabilities));
2621    }
2622
2623    @Override
2624    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2625      switch (_hash) {
2626      case -393139297:
2627        /* required */ return new Property("required", "boolean",
2628            "Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.",
2629            0, 1, required);
2630      case -1109784050:
2631        /* validated */ return new Property("validated", "boolean",
2632            "Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.",
2633            0, 1, validated);
2634      case -1724546052:
2635        /* description */ return new Property("description", "string",
2636            "Description of the capabilities that this test script is requiring the server to support.", 0, 1,
2637            description);
2638      case -1008619738:
2639        /* origin */ return new Property("origin", "integer", "Which origin server these requirements apply to.", 0,
2640            java.lang.Integer.MAX_VALUE, origin);
2641      case -1429847026:
2642        /* destination */ return new Property("destination", "integer", "Which server these requirements apply to.", 0,
2643            1, destination);
2644      case 3321850:
2645        /* link */ return new Property("link", "uri",
2646            "Links to the FHIR specification that describes this interaction and the resources involved in more detail.",
2647            0, java.lang.Integer.MAX_VALUE, link);
2648      case -1487597642:
2649        /* capabilities */ return new Property("capabilities", "canonical(CapabilityStatement)",
2650            "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.",
2651            0, 1, capabilities);
2652      default:
2653        return super.getNamedProperty(_hash, _name, _checkValid);
2654      }
2655
2656    }
2657
2658    @Override
2659    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2660      switch (hash) {
2661      case -393139297:
2662        /* required */ return this.required == null ? new Base[0] : new Base[] { this.required }; // BooleanType
2663      case -1109784050:
2664        /* validated */ return this.validated == null ? new Base[0] : new Base[] { this.validated }; // BooleanType
2665      case -1724546052:
2666        /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // StringType
2667      case -1008619738:
2668        /* origin */ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // IntegerType
2669      case -1429847026:
2670        /* destination */ return this.destination == null ? new Base[0] : new Base[] { this.destination }; // IntegerType
2671      case 3321850:
2672        /* link */ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // UriType
2673      case -1487597642:
2674        /* capabilities */ return this.capabilities == null ? new Base[0] : new Base[] { this.capabilities }; // CanonicalType
2675      default:
2676        return super.getProperty(hash, name, checkValid);
2677      }
2678
2679    }
2680
2681    @Override
2682    public Base setProperty(int hash, String name, Base value) throws FHIRException {
2683      switch (hash) {
2684      case -393139297: // required
2685        this.required = castToBoolean(value); // BooleanType
2686        return value;
2687      case -1109784050: // validated
2688        this.validated = castToBoolean(value); // BooleanType
2689        return value;
2690      case -1724546052: // description
2691        this.description = castToString(value); // StringType
2692        return value;
2693      case -1008619738: // origin
2694        this.getOrigin().add(castToInteger(value)); // IntegerType
2695        return value;
2696      case -1429847026: // destination
2697        this.destination = castToInteger(value); // IntegerType
2698        return value;
2699      case 3321850: // link
2700        this.getLink().add(castToUri(value)); // UriType
2701        return value;
2702      case -1487597642: // capabilities
2703        this.capabilities = castToCanonical(value); // CanonicalType
2704        return value;
2705      default:
2706        return super.setProperty(hash, name, value);
2707      }
2708
2709    }
2710
2711    @Override
2712    public Base setProperty(String name, Base value) throws FHIRException {
2713      if (name.equals("required")) {
2714        this.required = castToBoolean(value); // BooleanType
2715      } else if (name.equals("validated")) {
2716        this.validated = castToBoolean(value); // BooleanType
2717      } else if (name.equals("description")) {
2718        this.description = castToString(value); // StringType
2719      } else if (name.equals("origin")) {
2720        this.getOrigin().add(castToInteger(value));
2721      } else if (name.equals("destination")) {
2722        this.destination = castToInteger(value); // IntegerType
2723      } else if (name.equals("link")) {
2724        this.getLink().add(castToUri(value));
2725      } else if (name.equals("capabilities")) {
2726        this.capabilities = castToCanonical(value); // CanonicalType
2727      } else
2728        return super.setProperty(name, value);
2729      return value;
2730    }
2731
2732    @Override
2733    public Base makeProperty(int hash, String name) throws FHIRException {
2734      switch (hash) {
2735      case -393139297:
2736        return getRequiredElement();
2737      case -1109784050:
2738        return getValidatedElement();
2739      case -1724546052:
2740        return getDescriptionElement();
2741      case -1008619738:
2742        return addOriginElement();
2743      case -1429847026:
2744        return getDestinationElement();
2745      case 3321850:
2746        return addLinkElement();
2747      case -1487597642:
2748        return getCapabilitiesElement();
2749      default:
2750        return super.makeProperty(hash, name);
2751      }
2752
2753    }
2754
2755    @Override
2756    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2757      switch (hash) {
2758      case -393139297:
2759        /* required */ return new String[] { "boolean" };
2760      case -1109784050:
2761        /* validated */ return new String[] { "boolean" };
2762      case -1724546052:
2763        /* description */ return new String[] { "string" };
2764      case -1008619738:
2765        /* origin */ return new String[] { "integer" };
2766      case -1429847026:
2767        /* destination */ return new String[] { "integer" };
2768      case 3321850:
2769        /* link */ return new String[] { "uri" };
2770      case -1487597642:
2771        /* capabilities */ return new String[] { "canonical" };
2772      default:
2773        return super.getTypesForProperty(hash, name);
2774      }
2775
2776    }
2777
2778    @Override
2779    public Base addChild(String name) throws FHIRException {
2780      if (name.equals("required")) {
2781        throw new FHIRException("Cannot call addChild on a singleton property TestScript.required");
2782      } else if (name.equals("validated")) {
2783        throw new FHIRException("Cannot call addChild on a singleton property TestScript.validated");
2784      } else if (name.equals("description")) {
2785        throw new FHIRException("Cannot call addChild on a singleton property TestScript.description");
2786      } else if (name.equals("origin")) {
2787        throw new FHIRException("Cannot call addChild on a singleton property TestScript.origin");
2788      } else if (name.equals("destination")) {
2789        throw new FHIRException("Cannot call addChild on a singleton property TestScript.destination");
2790      } else if (name.equals("link")) {
2791        throw new FHIRException("Cannot call addChild on a singleton property TestScript.link");
2792      } else if (name.equals("capabilities")) {
2793        throw new FHIRException("Cannot call addChild on a singleton property TestScript.capabilities");
2794      } else
2795        return super.addChild(name);
2796    }
2797
2798    public TestScriptMetadataCapabilityComponent copy() {
2799      TestScriptMetadataCapabilityComponent dst = new TestScriptMetadataCapabilityComponent();
2800      copyValues(dst);
2801      return dst;
2802    }
2803
2804    public void copyValues(TestScriptMetadataCapabilityComponent dst) {
2805      super.copyValues(dst);
2806      dst.required = required == null ? null : required.copy();
2807      dst.validated = validated == null ? null : validated.copy();
2808      dst.description = description == null ? null : description.copy();
2809      if (origin != null) {
2810        dst.origin = new ArrayList<IntegerType>();
2811        for (IntegerType i : origin)
2812          dst.origin.add(i.copy());
2813      }
2814      ;
2815      dst.destination = destination == null ? null : destination.copy();
2816      if (link != null) {
2817        dst.link = new ArrayList<UriType>();
2818        for (UriType i : link)
2819          dst.link.add(i.copy());
2820      }
2821      ;
2822      dst.capabilities = capabilities == null ? null : capabilities.copy();
2823    }
2824
2825    @Override
2826    public boolean equalsDeep(Base other_) {
2827      if (!super.equalsDeep(other_))
2828        return false;
2829      if (!(other_ instanceof TestScriptMetadataCapabilityComponent))
2830        return false;
2831      TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other_;
2832      return compareDeep(required, o.required, true) && compareDeep(validated, o.validated, true)
2833          && compareDeep(description, o.description, true) && compareDeep(origin, o.origin, true)
2834          && compareDeep(destination, o.destination, true) && compareDeep(link, o.link, true)
2835          && compareDeep(capabilities, o.capabilities, true);
2836    }
2837
2838    @Override
2839    public boolean equalsShallow(Base other_) {
2840      if (!super.equalsShallow(other_))
2841        return false;
2842      if (!(other_ instanceof TestScriptMetadataCapabilityComponent))
2843        return false;
2844      TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other_;
2845      return compareValues(required, o.required, true) && compareValues(validated, o.validated, true)
2846          && compareValues(description, o.description, true) && compareValues(origin, o.origin, true)
2847          && compareValues(destination, o.destination, true) && compareValues(link, o.link, true);
2848    }
2849
2850    public boolean isEmpty() {
2851      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(required, validated, description, origin,
2852          destination, link, capabilities);
2853    }
2854
2855    public String fhirType() {
2856      return "TestScript.metadata.capability";
2857
2858    }
2859
2860  }
2861
2862  @Block()
2863  public static class TestScriptFixtureComponent extends BackboneElement implements IBaseBackboneElement {
2864    /**
2865     * Whether or not to implicitly create the fixture during setup. If true, the
2866     * fixture is automatically created on each server being tested during setup,
2867     * therefore no create operation is required for this fixture in the
2868     * TestScript.setup section.
2869     */
2870    @Child(name = "autocreate", type = {
2871        BooleanType.class }, order = 1, min = 1, max = 1, modifier = false, summary = false)
2872    @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.")
2873    protected BooleanType autocreate;
2874
2875    /**
2876     * Whether or not to implicitly delete the fixture during teardown. If true, the
2877     * fixture is automatically deleted on each server being tested during teardown,
2878     * therefore no delete operation is required for this fixture in the
2879     * TestScript.teardown section.
2880     */
2881    @Child(name = "autodelete", type = {
2882        BooleanType.class }, order = 2, min = 1, max = 1, modifier = false, summary = false)
2883    @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.")
2884    protected BooleanType autodelete;
2885
2886    /**
2887     * Reference to the resource (containing the contents of the resource needed for
2888     * operations).
2889     */
2890    @Child(name = "resource", type = {
2891        Reference.class }, order = 3, min = 0, max = 1, modifier = false, summary = false)
2892    @Description(shortDefinition = "Reference of the resource", formalDefinition = "Reference to the resource (containing the contents of the resource needed for operations).")
2893    protected Reference resource;
2894
2895    /**
2896     * The actual object that is the target of the reference (Reference to the
2897     * resource (containing the contents of the resource needed for operations).)
2898     */
2899    protected Resource resourceTarget;
2900
2901    private static final long serialVersionUID = 1110683307L;
2902
2903    /**
2904     * Constructor
2905     */
2906    public TestScriptFixtureComponent() {
2907      super();
2908    }
2909
2910    /**
2911     * Constructor
2912     */
2913    public TestScriptFixtureComponent(BooleanType autocreate, BooleanType autodelete) {
2914      super();
2915      this.autocreate = autocreate;
2916      this.autodelete = autodelete;
2917    }
2918
2919    /**
2920     * @return {@link #autocreate} (Whether or not to implicitly create the fixture
2921     *         during setup. If true, the fixture is automatically created on each
2922     *         server being tested during setup, therefore no create operation is
2923     *         required for this fixture in the TestScript.setup section.). This is
2924     *         the underlying object with id, value and extensions. The accessor
2925     *         "getAutocreate" gives direct access to the value
2926     */
2927    public BooleanType getAutocreateElement() {
2928      if (this.autocreate == null)
2929        if (Configuration.errorOnAutoCreate())
2930          throw new Error("Attempt to auto-create TestScriptFixtureComponent.autocreate");
2931        else if (Configuration.doAutoCreate())
2932          this.autocreate = new BooleanType(); // bb
2933      return this.autocreate;
2934    }
2935
2936    public boolean hasAutocreateElement() {
2937      return this.autocreate != null && !this.autocreate.isEmpty();
2938    }
2939
2940    public boolean hasAutocreate() {
2941      return this.autocreate != null && !this.autocreate.isEmpty();
2942    }
2943
2944    /**
2945     * @param value {@link #autocreate} (Whether or not to implicitly create the
2946     *              fixture during setup. If true, the fixture is automatically
2947     *              created on each server being tested during setup, therefore no
2948     *              create operation is required for this fixture in the
2949     *              TestScript.setup section.). This is the underlying object with
2950     *              id, value and extensions. The accessor "getAutocreate" gives
2951     *              direct access to the value
2952     */
2953    public TestScriptFixtureComponent setAutocreateElement(BooleanType value) {
2954      this.autocreate = value;
2955      return this;
2956    }
2957
2958    /**
2959     * @return Whether or not to implicitly create the fixture during setup. If
2960     *         true, the fixture is automatically created on each server being
2961     *         tested during setup, therefore no create operation is required for
2962     *         this fixture in the TestScript.setup section.
2963     */
2964    public boolean getAutocreate() {
2965      return this.autocreate == null || this.autocreate.isEmpty() ? false : this.autocreate.getValue();
2966    }
2967
2968    /**
2969     * @param value Whether or not to implicitly create the fixture during setup. If
2970     *              true, the fixture is automatically created on each server being
2971     *              tested during setup, therefore no create operation is required
2972     *              for this fixture in the TestScript.setup section.
2973     */
2974    public TestScriptFixtureComponent setAutocreate(boolean value) {
2975      if (this.autocreate == null)
2976        this.autocreate = new BooleanType();
2977      this.autocreate.setValue(value);
2978      return this;
2979    }
2980
2981    /**
2982     * @return {@link #autodelete} (Whether or not to implicitly delete the fixture
2983     *         during teardown. If true, the fixture is automatically deleted on
2984     *         each server being tested during teardown, therefore no delete
2985     *         operation is required for this fixture in the TestScript.teardown
2986     *         section.). This is the underlying object with id, value and
2987     *         extensions. The accessor "getAutodelete" gives direct access to the
2988     *         value
2989     */
2990    public BooleanType getAutodeleteElement() {
2991      if (this.autodelete == null)
2992        if (Configuration.errorOnAutoCreate())
2993          throw new Error("Attempt to auto-create TestScriptFixtureComponent.autodelete");
2994        else if (Configuration.doAutoCreate())
2995          this.autodelete = new BooleanType(); // bb
2996      return this.autodelete;
2997    }
2998
2999    public boolean hasAutodeleteElement() {
3000      return this.autodelete != null && !this.autodelete.isEmpty();
3001    }
3002
3003    public boolean hasAutodelete() {
3004      return this.autodelete != null && !this.autodelete.isEmpty();
3005    }
3006
3007    /**
3008     * @param value {@link #autodelete} (Whether or not to implicitly delete the
3009     *              fixture during teardown. If true, the fixture is automatically
3010     *              deleted on each server being tested during teardown, therefore
3011     *              no delete operation is required for this fixture in the
3012     *              TestScript.teardown section.). This is the underlying object
3013     *              with id, value and extensions. The accessor "getAutodelete"
3014     *              gives direct access to the value
3015     */
3016    public TestScriptFixtureComponent setAutodeleteElement(BooleanType value) {
3017      this.autodelete = value;
3018      return this;
3019    }
3020
3021    /**
3022     * @return Whether or not to implicitly delete the fixture during teardown. If
3023     *         true, the fixture is automatically deleted on each server being
3024     *         tested during teardown, therefore no delete operation is required for
3025     *         this fixture in the TestScript.teardown section.
3026     */
3027    public boolean getAutodelete() {
3028      return this.autodelete == null || this.autodelete.isEmpty() ? false : this.autodelete.getValue();
3029    }
3030
3031    /**
3032     * @param value Whether or not to implicitly delete the fixture during teardown.
3033     *              If true, the fixture is automatically deleted on each server
3034     *              being tested during teardown, therefore no delete operation is
3035     *              required for this fixture in the TestScript.teardown section.
3036     */
3037    public TestScriptFixtureComponent setAutodelete(boolean value) {
3038      if (this.autodelete == null)
3039        this.autodelete = new BooleanType();
3040      this.autodelete.setValue(value);
3041      return this;
3042    }
3043
3044    /**
3045     * @return {@link #resource} (Reference to the resource (containing the contents
3046     *         of the resource needed for operations).)
3047     */
3048    public Reference getResource() {
3049      if (this.resource == null)
3050        if (Configuration.errorOnAutoCreate())
3051          throw new Error("Attempt to auto-create TestScriptFixtureComponent.resource");
3052        else if (Configuration.doAutoCreate())
3053          this.resource = new Reference(); // cc
3054      return this.resource;
3055    }
3056
3057    public boolean hasResource() {
3058      return this.resource != null && !this.resource.isEmpty();
3059    }
3060
3061    /**
3062     * @param value {@link #resource} (Reference to the resource (containing the
3063     *              contents of the resource needed for operations).)
3064     */
3065    public TestScriptFixtureComponent setResource(Reference value) {
3066      this.resource = value;
3067      return this;
3068    }
3069
3070    /**
3071     * @return {@link #resource} The actual object that is the target of the
3072     *         reference. The reference library doesn't populate this, but you can
3073     *         use it to hold the resource if you resolve it. (Reference to the
3074     *         resource (containing the contents of the resource needed for
3075     *         operations).)
3076     */
3077    public Resource getResourceTarget() {
3078      return this.resourceTarget;
3079    }
3080
3081    /**
3082     * @param value {@link #resource} The actual object that is the target of the
3083     *              reference. The reference library doesn't use these, but you can
3084     *              use it to hold the resource if you resolve it. (Reference to the
3085     *              resource (containing the contents of the resource needed for
3086     *              operations).)
3087     */
3088    public TestScriptFixtureComponent setResourceTarget(Resource value) {
3089      this.resourceTarget = value;
3090      return this;
3091    }
3092
3093    protected void listChildren(List<Property> children) {
3094      super.listChildren(children);
3095      children.add(new Property("autocreate", "boolean",
3096          "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.",
3097          0, 1, autocreate));
3098      children.add(new Property("autodelete", "boolean",
3099          "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.",
3100          0, 1, autodelete));
3101      children.add(new Property("resource", "Reference(Any)",
3102          "Reference to the resource (containing the contents of the resource needed for operations).", 0, 1,
3103          resource));
3104    }
3105
3106    @Override
3107    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3108      switch (_hash) {
3109      case 73154411:
3110        /* autocreate */ return new Property("autocreate", "boolean",
3111            "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.",
3112            0, 1, autocreate);
3113      case 89990170:
3114        /* autodelete */ return new Property("autodelete", "boolean",
3115            "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.",
3116            0, 1, autodelete);
3117      case -341064690:
3118        /* resource */ return new Property("resource", "Reference(Any)",
3119            "Reference to the resource (containing the contents of the resource needed for operations).", 0, 1,
3120            resource);
3121      default:
3122        return super.getNamedProperty(_hash, _name, _checkValid);
3123      }
3124
3125    }
3126
3127    @Override
3128    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3129      switch (hash) {
3130      case 73154411:
3131        /* autocreate */ return this.autocreate == null ? new Base[0] : new Base[] { this.autocreate }; // BooleanType
3132      case 89990170:
3133        /* autodelete */ return this.autodelete == null ? new Base[0] : new Base[] { this.autodelete }; // BooleanType
3134      case -341064690:
3135        /* resource */ return this.resource == null ? new Base[0] : new Base[] { this.resource }; // Reference
3136      default:
3137        return super.getProperty(hash, name, checkValid);
3138      }
3139
3140    }
3141
3142    @Override
3143    public Base setProperty(int hash, String name, Base value) throws FHIRException {
3144      switch (hash) {
3145      case 73154411: // autocreate
3146        this.autocreate = castToBoolean(value); // BooleanType
3147        return value;
3148      case 89990170: // autodelete
3149        this.autodelete = castToBoolean(value); // BooleanType
3150        return value;
3151      case -341064690: // resource
3152        this.resource = castToReference(value); // Reference
3153        return value;
3154      default:
3155        return super.setProperty(hash, name, value);
3156      }
3157
3158    }
3159
3160    @Override
3161    public Base setProperty(String name, Base value) throws FHIRException {
3162      if (name.equals("autocreate")) {
3163        this.autocreate = castToBoolean(value); // BooleanType
3164      } else if (name.equals("autodelete")) {
3165        this.autodelete = castToBoolean(value); // BooleanType
3166      } else if (name.equals("resource")) {
3167        this.resource = castToReference(value); // Reference
3168      } else
3169        return super.setProperty(name, value);
3170      return value;
3171    }
3172
3173    @Override
3174    public Base makeProperty(int hash, String name) throws FHIRException {
3175      switch (hash) {
3176      case 73154411:
3177        return getAutocreateElement();
3178      case 89990170:
3179        return getAutodeleteElement();
3180      case -341064690:
3181        return getResource();
3182      default:
3183        return super.makeProperty(hash, name);
3184      }
3185
3186    }
3187
3188    @Override
3189    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3190      switch (hash) {
3191      case 73154411:
3192        /* autocreate */ return new String[] { "boolean" };
3193      case 89990170:
3194        /* autodelete */ return new String[] { "boolean" };
3195      case -341064690:
3196        /* resource */ return new String[] { "Reference" };
3197      default:
3198        return super.getTypesForProperty(hash, name);
3199      }
3200
3201    }
3202
3203    @Override
3204    public Base addChild(String name) throws FHIRException {
3205      if (name.equals("autocreate")) {
3206        throw new FHIRException("Cannot call addChild on a singleton property TestScript.autocreate");
3207      } else if (name.equals("autodelete")) {
3208        throw new FHIRException("Cannot call addChild on a singleton property TestScript.autodelete");
3209      } else if (name.equals("resource")) {
3210        this.resource = new Reference();
3211        return this.resource;
3212      } else
3213        return super.addChild(name);
3214    }
3215
3216    public TestScriptFixtureComponent copy() {
3217      TestScriptFixtureComponent dst = new TestScriptFixtureComponent();
3218      copyValues(dst);
3219      return dst;
3220    }
3221
3222    public void copyValues(TestScriptFixtureComponent dst) {
3223      super.copyValues(dst);
3224      dst.autocreate = autocreate == null ? null : autocreate.copy();
3225      dst.autodelete = autodelete == null ? null : autodelete.copy();
3226      dst.resource = resource == null ? null : resource.copy();
3227    }
3228
3229    @Override
3230    public boolean equalsDeep(Base other_) {
3231      if (!super.equalsDeep(other_))
3232        return false;
3233      if (!(other_ instanceof TestScriptFixtureComponent))
3234        return false;
3235      TestScriptFixtureComponent o = (TestScriptFixtureComponent) other_;
3236      return compareDeep(autocreate, o.autocreate, true) && compareDeep(autodelete, o.autodelete, true)
3237          && compareDeep(resource, o.resource, true);
3238    }
3239
3240    @Override
3241    public boolean equalsShallow(Base other_) {
3242      if (!super.equalsShallow(other_))
3243        return false;
3244      if (!(other_ instanceof TestScriptFixtureComponent))
3245        return false;
3246      TestScriptFixtureComponent o = (TestScriptFixtureComponent) other_;
3247      return compareValues(autocreate, o.autocreate, true) && compareValues(autodelete, o.autodelete, true);
3248    }
3249
3250    public boolean isEmpty() {
3251      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(autocreate, autodelete, resource);
3252    }
3253
3254    public String fhirType() {
3255      return "TestScript.fixture";
3256
3257    }
3258
3259  }
3260
3261  @Block()
3262  public static class TestScriptVariableComponent extends BackboneElement implements IBaseBackboneElement {
3263    /**
3264     * Descriptive name for this variable.
3265     */
3266    @Child(name = "name", type = { StringType.class }, order = 1, min = 1, max = 1, modifier = false, summary = false)
3267    @Description(shortDefinition = "Descriptive name for this variable", formalDefinition = "Descriptive name for this variable.")
3268    protected StringType name;
3269
3270    /**
3271     * A default, hard-coded, or user-defined value for this variable.
3272     */
3273    @Child(name = "defaultValue", type = {
3274        StringType.class }, order = 2, min = 0, max = 1, modifier = false, summary = false)
3275    @Description(shortDefinition = "Default, hard-coded, or user-defined value for this variable", formalDefinition = "A default, hard-coded, or user-defined value for this variable.")
3276    protected StringType defaultValue;
3277
3278    /**
3279     * A free text natural language description of the variable and its purpose.
3280     */
3281    @Child(name = "description", type = {
3282        StringType.class }, order = 3, min = 0, max = 1, modifier = false, summary = false)
3283    @Description(shortDefinition = "Natural language description of the variable", formalDefinition = "A free text natural language description of the variable and its purpose.")
3284    protected StringType description;
3285
3286    /**
3287     * The FHIRPath expression to evaluate against the fixture body. When variables
3288     * are defined, only one of either expression, headerField or path must be
3289     * specified.
3290     */
3291    @Child(name = "expression", type = {
3292        StringType.class }, order = 4, min = 0, max = 1, modifier = false, summary = false)
3293    @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.")
3294    protected StringType expression;
3295
3296    /**
3297     * Will be used to grab the HTTP header field value from the headers that
3298     * sourceId is pointing to.
3299     */
3300    @Child(name = "headerField", type = {
3301        StringType.class }, order = 5, min = 0, max = 1, modifier = false, summary = false)
3302    @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.")
3303    protected StringType headerField;
3304
3305    /**
3306     * Displayable text string with hint help information to the user when entering
3307     * a default value.
3308     */
3309    @Child(name = "hint", type = { StringType.class }, order = 6, min = 0, max = 1, modifier = false, summary = false)
3310    @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.")
3311    protected StringType hint;
3312
3313    /**
3314     * XPath or JSONPath to evaluate against the fixture body. When variables are
3315     * defined, only one of either expression, headerField or path must be
3316     * specified.
3317     */
3318    @Child(name = "path", type = { StringType.class }, order = 7, min = 0, max = 1, modifier = false, summary = false)
3319    @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.")
3320    protected StringType path;
3321
3322    /**
3323     * Fixture to evaluate the XPath/JSONPath expression or the headerField against
3324     * within this variable.
3325     */
3326    @Child(name = "sourceId", type = { IdType.class }, order = 8, min = 0, max = 1, modifier = false, summary = false)
3327    @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.")
3328    protected IdType sourceId;
3329
3330    private static final long serialVersionUID = -1592325432L;
3331
3332    /**
3333     * Constructor
3334     */
3335    public TestScriptVariableComponent() {
3336      super();
3337    }
3338
3339    /**
3340     * Constructor
3341     */
3342    public TestScriptVariableComponent(StringType name) {
3343      super();
3344      this.name = name;
3345    }
3346
3347    /**
3348     * @return {@link #name} (Descriptive name for this variable.). This is the
3349     *         underlying object with id, value and extensions. The accessor
3350     *         "getName" gives direct access to the value
3351     */
3352    public StringType getNameElement() {
3353      if (this.name == null)
3354        if (Configuration.errorOnAutoCreate())
3355          throw new Error("Attempt to auto-create TestScriptVariableComponent.name");
3356        else if (Configuration.doAutoCreate())
3357          this.name = new StringType(); // bb
3358      return this.name;
3359    }
3360
3361    public boolean hasNameElement() {
3362      return this.name != null && !this.name.isEmpty();
3363    }
3364
3365    public boolean hasName() {
3366      return this.name != null && !this.name.isEmpty();
3367    }
3368
3369    /**
3370     * @param value {@link #name} (Descriptive name for this variable.). This is the
3371     *              underlying object with id, value and extensions. The accessor
3372     *              "getName" gives direct access to the value
3373     */
3374    public TestScriptVariableComponent setNameElement(StringType value) {
3375      this.name = value;
3376      return this;
3377    }
3378
3379    /**
3380     * @return Descriptive name for this variable.
3381     */
3382    public String getName() {
3383      return this.name == null ? null : this.name.getValue();
3384    }
3385
3386    /**
3387     * @param value Descriptive name for this variable.
3388     */
3389    public TestScriptVariableComponent setName(String value) {
3390      if (this.name == null)
3391        this.name = new StringType();
3392      this.name.setValue(value);
3393      return this;
3394    }
3395
3396    /**
3397     * @return {@link #defaultValue} (A default, hard-coded, or user-defined value
3398     *         for this variable.). This is the underlying object with id, value and
3399     *         extensions. The accessor "getDefaultValue" gives direct access to the
3400     *         value
3401     */
3402    public StringType getDefaultValueElement() {
3403      if (this.defaultValue == null)
3404        if (Configuration.errorOnAutoCreate())
3405          throw new Error("Attempt to auto-create TestScriptVariableComponent.defaultValue");
3406        else if (Configuration.doAutoCreate())
3407          this.defaultValue = new StringType(); // bb
3408      return this.defaultValue;
3409    }
3410
3411    public boolean hasDefaultValueElement() {
3412      return this.defaultValue != null && !this.defaultValue.isEmpty();
3413    }
3414
3415    public boolean hasDefaultValue() {
3416      return this.defaultValue != null && !this.defaultValue.isEmpty();
3417    }
3418
3419    /**
3420     * @param value {@link #defaultValue} (A default, hard-coded, or user-defined
3421     *              value for this variable.). This is the underlying object with
3422     *              id, value and extensions. The accessor "getDefaultValue" gives
3423     *              direct access to the value
3424     */
3425    public TestScriptVariableComponent setDefaultValueElement(StringType value) {
3426      this.defaultValue = value;
3427      return this;
3428    }
3429
3430    /**
3431     * @return A default, hard-coded, or user-defined value for this variable.
3432     */
3433    public String getDefaultValue() {
3434      return this.defaultValue == null ? null : this.defaultValue.getValue();
3435    }
3436
3437    /**
3438     * @param value A default, hard-coded, or user-defined value for this variable.
3439     */
3440    public TestScriptVariableComponent setDefaultValue(String value) {
3441      if (Utilities.noString(value))
3442        this.defaultValue = null;
3443      else {
3444        if (this.defaultValue == null)
3445          this.defaultValue = new StringType();
3446        this.defaultValue.setValue(value);
3447      }
3448      return this;
3449    }
3450
3451    /**
3452     * @return {@link #description} (A free text natural language description of the
3453     *         variable and its purpose.). This is the underlying object with id,
3454     *         value and extensions. The accessor "getDescription" gives direct
3455     *         access to the value
3456     */
3457    public StringType getDescriptionElement() {
3458      if (this.description == null)
3459        if (Configuration.errorOnAutoCreate())
3460          throw new Error("Attempt to auto-create TestScriptVariableComponent.description");
3461        else if (Configuration.doAutoCreate())
3462          this.description = new StringType(); // bb
3463      return this.description;
3464    }
3465
3466    public boolean hasDescriptionElement() {
3467      return this.description != null && !this.description.isEmpty();
3468    }
3469
3470    public boolean hasDescription() {
3471      return this.description != null && !this.description.isEmpty();
3472    }
3473
3474    /**
3475     * @param value {@link #description} (A free text natural language description
3476     *              of the variable and its purpose.). This is the underlying object
3477     *              with id, value and extensions. The accessor "getDescription"
3478     *              gives direct access to the value
3479     */
3480    public TestScriptVariableComponent setDescriptionElement(StringType value) {
3481      this.description = value;
3482      return this;
3483    }
3484
3485    /**
3486     * @return A free text natural language description of the variable and its
3487     *         purpose.
3488     */
3489    public String getDescription() {
3490      return this.description == null ? null : this.description.getValue();
3491    }
3492
3493    /**
3494     * @param value A free text natural language description of the variable and its
3495     *              purpose.
3496     */
3497    public TestScriptVariableComponent setDescription(String value) {
3498      if (Utilities.noString(value))
3499        this.description = null;
3500      else {
3501        if (this.description == null)
3502          this.description = new StringType();
3503        this.description.setValue(value);
3504      }
3505      return this;
3506    }
3507
3508    /**
3509     * @return {@link #expression} (The FHIRPath expression to evaluate against the
3510     *         fixture body. When variables are defined, only one of either
3511     *         expression, headerField or path must be specified.). This is the
3512     *         underlying object with id, value and extensions. The accessor
3513     *         "getExpression" gives direct access to the value
3514     */
3515    public StringType getExpressionElement() {
3516      if (this.expression == null)
3517        if (Configuration.errorOnAutoCreate())
3518          throw new Error("Attempt to auto-create TestScriptVariableComponent.expression");
3519        else if (Configuration.doAutoCreate())
3520          this.expression = new StringType(); // bb
3521      return this.expression;
3522    }
3523
3524    public boolean hasExpressionElement() {
3525      return this.expression != null && !this.expression.isEmpty();
3526    }
3527
3528    public boolean hasExpression() {
3529      return this.expression != null && !this.expression.isEmpty();
3530    }
3531
3532    /**
3533     * @param value {@link #expression} (The FHIRPath expression to evaluate against
3534     *              the fixture body. When variables are defined, only one of either
3535     *              expression, headerField or path must be specified.). This is the
3536     *              underlying object with id, value and extensions. The accessor
3537     *              "getExpression" gives direct access to the value
3538     */
3539    public TestScriptVariableComponent setExpressionElement(StringType value) {
3540      this.expression = value;
3541      return this;
3542    }
3543
3544    /**
3545     * @return The FHIRPath expression to evaluate against the fixture body. When
3546     *         variables are defined, only one of either expression, headerField or
3547     *         path must be specified.
3548     */
3549    public String getExpression() {
3550      return this.expression == null ? null : this.expression.getValue();
3551    }
3552
3553    /**
3554     * @param value The FHIRPath expression to evaluate against the fixture body.
3555     *              When variables are defined, only one of either expression,
3556     *              headerField or path must be specified.
3557     */
3558    public TestScriptVariableComponent setExpression(String value) {
3559      if (Utilities.noString(value))
3560        this.expression = null;
3561      else {
3562        if (this.expression == null)
3563          this.expression = new StringType();
3564        this.expression.setValue(value);
3565      }
3566      return this;
3567    }
3568
3569    /**
3570     * @return {@link #headerField} (Will be used to grab the HTTP header field
3571     *         value from the headers that sourceId is pointing to.). This is the
3572     *         underlying object with id, value and extensions. The accessor
3573     *         "getHeaderField" gives direct access to the value
3574     */
3575    public StringType getHeaderFieldElement() {
3576      if (this.headerField == null)
3577        if (Configuration.errorOnAutoCreate())
3578          throw new Error("Attempt to auto-create TestScriptVariableComponent.headerField");
3579        else if (Configuration.doAutoCreate())
3580          this.headerField = new StringType(); // bb
3581      return this.headerField;
3582    }
3583
3584    public boolean hasHeaderFieldElement() {
3585      return this.headerField != null && !this.headerField.isEmpty();
3586    }
3587
3588    public boolean hasHeaderField() {
3589      return this.headerField != null && !this.headerField.isEmpty();
3590    }
3591
3592    /**
3593     * @param value {@link #headerField} (Will be used to grab the HTTP header field
3594     *              value from the headers that sourceId is pointing to.). This is
3595     *              the underlying object with id, value and extensions. The
3596     *              accessor "getHeaderField" gives direct access to the value
3597     */
3598    public TestScriptVariableComponent setHeaderFieldElement(StringType value) {
3599      this.headerField = value;
3600      return this;
3601    }
3602
3603    /**
3604     * @return Will be used to grab the HTTP header field value from the headers
3605     *         that sourceId is pointing to.
3606     */
3607    public String getHeaderField() {
3608      return this.headerField == null ? null : this.headerField.getValue();
3609    }
3610
3611    /**
3612     * @param value Will be used to grab the HTTP header field value from the
3613     *              headers that sourceId is pointing to.
3614     */
3615    public TestScriptVariableComponent setHeaderField(String value) {
3616      if (Utilities.noString(value))
3617        this.headerField = null;
3618      else {
3619        if (this.headerField == null)
3620          this.headerField = new StringType();
3621        this.headerField.setValue(value);
3622      }
3623      return this;
3624    }
3625
3626    /**
3627     * @return {@link #hint} (Displayable text string with hint help information to
3628     *         the user when entering a default value.). This is the underlying
3629     *         object with id, value and extensions. The accessor "getHint" gives
3630     *         direct access to the value
3631     */
3632    public StringType getHintElement() {
3633      if (this.hint == null)
3634        if (Configuration.errorOnAutoCreate())
3635          throw new Error("Attempt to auto-create TestScriptVariableComponent.hint");
3636        else if (Configuration.doAutoCreate())
3637          this.hint = new StringType(); // bb
3638      return this.hint;
3639    }
3640
3641    public boolean hasHintElement() {
3642      return this.hint != null && !this.hint.isEmpty();
3643    }
3644
3645    public boolean hasHint() {
3646      return this.hint != null && !this.hint.isEmpty();
3647    }
3648
3649    /**
3650     * @param value {@link #hint} (Displayable text string with hint help
3651     *              information to the user when entering a default value.). This is
3652     *              the underlying object with id, value and extensions. The
3653     *              accessor "getHint" gives direct access to the value
3654     */
3655    public TestScriptVariableComponent setHintElement(StringType value) {
3656      this.hint = value;
3657      return this;
3658    }
3659
3660    /**
3661     * @return Displayable text string with hint help information to the user when
3662     *         entering a default value.
3663     */
3664    public String getHint() {
3665      return this.hint == null ? null : this.hint.getValue();
3666    }
3667
3668    /**
3669     * @param value Displayable text string with hint help information to the user
3670     *              when entering a default value.
3671     */
3672    public TestScriptVariableComponent setHint(String value) {
3673      if (Utilities.noString(value))
3674        this.hint = null;
3675      else {
3676        if (this.hint == null)
3677          this.hint = new StringType();
3678        this.hint.setValue(value);
3679      }
3680      return this;
3681    }
3682
3683    /**
3684     * @return {@link #path} (XPath or JSONPath to evaluate against the fixture
3685     *         body. When variables are defined, only one of either expression,
3686     *         headerField or path must be specified.). This is the underlying
3687     *         object with id, value and extensions. The accessor "getPath" gives
3688     *         direct access to the value
3689     */
3690    public StringType getPathElement() {
3691      if (this.path == null)
3692        if (Configuration.errorOnAutoCreate())
3693          throw new Error("Attempt to auto-create TestScriptVariableComponent.path");
3694        else if (Configuration.doAutoCreate())
3695          this.path = new StringType(); // bb
3696      return this.path;
3697    }
3698
3699    public boolean hasPathElement() {
3700      return this.path != null && !this.path.isEmpty();
3701    }
3702
3703    public boolean hasPath() {
3704      return this.path != null && !this.path.isEmpty();
3705    }
3706
3707    /**
3708     * @param value {@link #path} (XPath or JSONPath to evaluate against the fixture
3709     *              body. When variables are defined, only one of either expression,
3710     *              headerField or path must be specified.). This is the underlying
3711     *              object with id, value and extensions. The accessor "getPath"
3712     *              gives direct access to the value
3713     */
3714    public TestScriptVariableComponent setPathElement(StringType value) {
3715      this.path = value;
3716      return this;
3717    }
3718
3719    /**
3720     * @return XPath or JSONPath to evaluate against the fixture body. When
3721     *         variables are defined, only one of either expression, headerField or
3722     *         path must be specified.
3723     */
3724    public String getPath() {
3725      return this.path == null ? null : this.path.getValue();
3726    }
3727
3728    /**
3729     * @param value XPath or JSONPath to evaluate against the fixture body. When
3730     *              variables are defined, only one of either expression,
3731     *              headerField or path must be specified.
3732     */
3733    public TestScriptVariableComponent setPath(String value) {
3734      if (Utilities.noString(value))
3735        this.path = null;
3736      else {
3737        if (this.path == null)
3738          this.path = new StringType();
3739        this.path.setValue(value);
3740      }
3741      return this;
3742    }
3743
3744    /**
3745     * @return {@link #sourceId} (Fixture to evaluate the XPath/JSONPath expression
3746     *         or the headerField against within this variable.). This is the
3747     *         underlying object with id, value and extensions. The accessor
3748     *         "getSourceId" gives direct access to the value
3749     */
3750    public IdType getSourceIdElement() {
3751      if (this.sourceId == null)
3752        if (Configuration.errorOnAutoCreate())
3753          throw new Error("Attempt to auto-create TestScriptVariableComponent.sourceId");
3754        else if (Configuration.doAutoCreate())
3755          this.sourceId = new IdType(); // bb
3756      return this.sourceId;
3757    }
3758
3759    public boolean hasSourceIdElement() {
3760      return this.sourceId != null && !this.sourceId.isEmpty();
3761    }
3762
3763    public boolean hasSourceId() {
3764      return this.sourceId != null && !this.sourceId.isEmpty();
3765    }
3766
3767    /**
3768     * @param value {@link #sourceId} (Fixture to evaluate the XPath/JSONPath
3769     *              expression or the headerField against within this variable.).
3770     *              This is the underlying object with id, value and extensions. The
3771     *              accessor "getSourceId" gives direct access to the value
3772     */
3773    public TestScriptVariableComponent setSourceIdElement(IdType value) {
3774      this.sourceId = value;
3775      return this;
3776    }
3777
3778    /**
3779     * @return Fixture to evaluate the XPath/JSONPath expression or the headerField
3780     *         against within this variable.
3781     */
3782    public String getSourceId() {
3783      return this.sourceId == null ? null : this.sourceId.getValue();
3784    }
3785
3786    /**
3787     * @param value Fixture to evaluate the XPath/JSONPath expression or the
3788     *              headerField against within this variable.
3789     */
3790    public TestScriptVariableComponent setSourceId(String value) {
3791      if (Utilities.noString(value))
3792        this.sourceId = null;
3793      else {
3794        if (this.sourceId == null)
3795          this.sourceId = new IdType();
3796        this.sourceId.setValue(value);
3797      }
3798      return this;
3799    }
3800
3801    protected void listChildren(List<Property> children) {
3802      super.listChildren(children);
3803      children.add(new Property("name", "string", "Descriptive name for this variable.", 0, 1, name));
3804      children.add(new Property("defaultValue", "string",
3805          "A default, hard-coded, or user-defined value for this variable.", 0, 1, defaultValue));
3806      children.add(new Property("description", "string",
3807          "A free text natural language description of the variable and its purpose.", 0, 1, description));
3808      children.add(new Property("expression", "string",
3809          "The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.",
3810          0, 1, expression));
3811      children.add(new Property("headerField", "string",
3812          "Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.", 0, 1,
3813          headerField));
3814      children.add(new Property("hint", "string",
3815          "Displayable text string with hint help information to the user when entering a default value.", 0, 1, hint));
3816      children.add(new Property("path", "string",
3817          "XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.",
3818          0, 1, path));
3819      children.add(new Property("sourceId", "id",
3820          "Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.", 0, 1,
3821          sourceId));
3822    }
3823
3824    @Override
3825    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3826      switch (_hash) {
3827      case 3373707:
3828        /* name */ return new Property("name", "string", "Descriptive name for this variable.", 0, 1, name);
3829      case -659125328:
3830        /* defaultValue */ return new Property("defaultValue", "string",
3831            "A default, hard-coded, or user-defined value for this variable.", 0, 1, defaultValue);
3832      case -1724546052:
3833        /* description */ return new Property("description", "string",
3834            "A free text natural language description of the variable and its purpose.", 0, 1, description);
3835      case -1795452264:
3836        /* expression */ return new Property("expression", "string",
3837            "The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.",
3838            0, 1, expression);
3839      case 1160732269:
3840        /* headerField */ return new Property("headerField", "string",
3841            "Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.", 0, 1,
3842            headerField);
3843      case 3202695:
3844        /* hint */ return new Property("hint", "string",
3845            "Displayable text string with hint help information to the user when entering a default value.", 0, 1,
3846            hint);
3847      case 3433509:
3848        /* path */ return new Property("path", "string",
3849            "XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.",
3850            0, 1, path);
3851      case 1746327190:
3852        /* sourceId */ return new Property("sourceId", "id",
3853            "Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.", 0, 1,
3854            sourceId);
3855      default:
3856        return super.getNamedProperty(_hash, _name, _checkValid);
3857      }
3858
3859    }
3860
3861    @Override
3862    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3863      switch (hash) {
3864      case 3373707:
3865        /* name */ return this.name == null ? new Base[0] : new Base[] { this.name }; // StringType
3866      case -659125328:
3867        /* defaultValue */ return this.defaultValue == null ? new Base[0] : new Base[] { this.defaultValue }; // StringType
3868      case -1724546052:
3869        /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // StringType
3870      case -1795452264:
3871        /* expression */ return this.expression == null ? new Base[0] : new Base[] { this.expression }; // StringType
3872      case 1160732269:
3873        /* headerField */ return this.headerField == null ? new Base[0] : new Base[] { this.headerField }; // StringType
3874      case 3202695:
3875        /* hint */ return this.hint == null ? new Base[0] : new Base[] { this.hint }; // StringType
3876      case 3433509:
3877        /* path */ return this.path == null ? new Base[0] : new Base[] { this.path }; // StringType
3878      case 1746327190:
3879        /* sourceId */ return this.sourceId == null ? new Base[0] : new Base[] { this.sourceId }; // IdType
3880      default:
3881        return super.getProperty(hash, name, checkValid);
3882      }
3883
3884    }
3885
3886    @Override
3887    public Base setProperty(int hash, String name, Base value) throws FHIRException {
3888      switch (hash) {
3889      case 3373707: // name
3890        this.name = castToString(value); // StringType
3891        return value;
3892      case -659125328: // defaultValue
3893        this.defaultValue = castToString(value); // StringType
3894        return value;
3895      case -1724546052: // description
3896        this.description = castToString(value); // StringType
3897        return value;
3898      case -1795452264: // expression
3899        this.expression = castToString(value); // StringType
3900        return value;
3901      case 1160732269: // headerField
3902        this.headerField = castToString(value); // StringType
3903        return value;
3904      case 3202695: // hint
3905        this.hint = castToString(value); // StringType
3906        return value;
3907      case 3433509: // path
3908        this.path = castToString(value); // StringType
3909        return value;
3910      case 1746327190: // sourceId
3911        this.sourceId = castToId(value); // IdType
3912        return value;
3913      default:
3914        return super.setProperty(hash, name, value);
3915      }
3916
3917    }
3918
3919    @Override
3920    public Base setProperty(String name, Base value) throws FHIRException {
3921      if (name.equals("name")) {
3922        this.name = castToString(value); // StringType
3923      } else if (name.equals("defaultValue")) {
3924        this.defaultValue = castToString(value); // StringType
3925      } else if (name.equals("description")) {
3926        this.description = castToString(value); // StringType
3927      } else if (name.equals("expression")) {
3928        this.expression = castToString(value); // StringType
3929      } else if (name.equals("headerField")) {
3930        this.headerField = castToString(value); // StringType
3931      } else if (name.equals("hint")) {
3932        this.hint = castToString(value); // StringType
3933      } else if (name.equals("path")) {
3934        this.path = castToString(value); // StringType
3935      } else if (name.equals("sourceId")) {
3936        this.sourceId = castToId(value); // IdType
3937      } else
3938        return super.setProperty(name, value);
3939      return value;
3940    }
3941
3942    @Override
3943    public Base makeProperty(int hash, String name) throws FHIRException {
3944      switch (hash) {
3945      case 3373707:
3946        return getNameElement();
3947      case -659125328:
3948        return getDefaultValueElement();
3949      case -1724546052:
3950        return getDescriptionElement();
3951      case -1795452264:
3952        return getExpressionElement();
3953      case 1160732269:
3954        return getHeaderFieldElement();
3955      case 3202695:
3956        return getHintElement();
3957      case 3433509:
3958        return getPathElement();
3959      case 1746327190:
3960        return getSourceIdElement();
3961      default:
3962        return super.makeProperty(hash, name);
3963      }
3964
3965    }
3966
3967    @Override
3968    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3969      switch (hash) {
3970      case 3373707:
3971        /* name */ return new String[] { "string" };
3972      case -659125328:
3973        /* defaultValue */ return new String[] { "string" };
3974      case -1724546052:
3975        /* description */ return new String[] { "string" };
3976      case -1795452264:
3977        /* expression */ return new String[] { "string" };
3978      case 1160732269:
3979        /* headerField */ return new String[] { "string" };
3980      case 3202695:
3981        /* hint */ return new String[] { "string" };
3982      case 3433509:
3983        /* path */ return new String[] { "string" };
3984      case 1746327190:
3985        /* sourceId */ return new String[] { "id" };
3986      default:
3987        return super.getTypesForProperty(hash, name);
3988      }
3989
3990    }
3991
3992    @Override
3993    public Base addChild(String name) throws FHIRException {
3994      if (name.equals("name")) {
3995        throw new FHIRException("Cannot call addChild on a singleton property TestScript.name");
3996      } else if (name.equals("defaultValue")) {
3997        throw new FHIRException("Cannot call addChild on a singleton property TestScript.defaultValue");
3998      } else if (name.equals("description")) {
3999        throw new FHIRException("Cannot call addChild on a singleton property TestScript.description");
4000      } else if (name.equals("expression")) {
4001        throw new FHIRException("Cannot call addChild on a singleton property TestScript.expression");
4002      } else if (name.equals("headerField")) {
4003        throw new FHIRException("Cannot call addChild on a singleton property TestScript.headerField");
4004      } else if (name.equals("hint")) {
4005        throw new FHIRException("Cannot call addChild on a singleton property TestScript.hint");
4006      } else if (name.equals("path")) {
4007        throw new FHIRException("Cannot call addChild on a singleton property TestScript.path");
4008      } else if (name.equals("sourceId")) {
4009        throw new FHIRException("Cannot call addChild on a singleton property TestScript.sourceId");
4010      } else
4011        return super.addChild(name);
4012    }
4013
4014    public TestScriptVariableComponent copy() {
4015      TestScriptVariableComponent dst = new TestScriptVariableComponent();
4016      copyValues(dst);
4017      return dst;
4018    }
4019
4020    public void copyValues(TestScriptVariableComponent dst) {
4021      super.copyValues(dst);
4022      dst.name = name == null ? null : name.copy();
4023      dst.defaultValue = defaultValue == null ? null : defaultValue.copy();
4024      dst.description = description == null ? null : description.copy();
4025      dst.expression = expression == null ? null : expression.copy();
4026      dst.headerField = headerField == null ? null : headerField.copy();
4027      dst.hint = hint == null ? null : hint.copy();
4028      dst.path = path == null ? null : path.copy();
4029      dst.sourceId = sourceId == null ? null : sourceId.copy();
4030    }
4031
4032    @Override
4033    public boolean equalsDeep(Base other_) {
4034      if (!super.equalsDeep(other_))
4035        return false;
4036      if (!(other_ instanceof TestScriptVariableComponent))
4037        return false;
4038      TestScriptVariableComponent o = (TestScriptVariableComponent) other_;
4039      return compareDeep(name, o.name, true) && compareDeep(defaultValue, o.defaultValue, true)
4040          && compareDeep(description, o.description, true) && compareDeep(expression, o.expression, true)
4041          && compareDeep(headerField, o.headerField, true) && compareDeep(hint, o.hint, true)
4042          && compareDeep(path, o.path, true) && compareDeep(sourceId, o.sourceId, true);
4043    }
4044
4045    @Override
4046    public boolean equalsShallow(Base other_) {
4047      if (!super.equalsShallow(other_))
4048        return false;
4049      if (!(other_ instanceof TestScriptVariableComponent))
4050        return false;
4051      TestScriptVariableComponent o = (TestScriptVariableComponent) other_;
4052      return compareValues(name, o.name, true) && compareValues(defaultValue, o.defaultValue, true)
4053          && compareValues(description, o.description, true) && compareValues(expression, o.expression, true)
4054          && compareValues(headerField, o.headerField, true) && compareValues(hint, o.hint, true)
4055          && compareValues(path, o.path, true) && compareValues(sourceId, o.sourceId, true);
4056    }
4057
4058    public boolean isEmpty() {
4059      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, defaultValue, description, expression,
4060          headerField, hint, path, sourceId);
4061    }
4062
4063    public String fhirType() {
4064      return "TestScript.variable";
4065
4066    }
4067
4068  }
4069
4070  @Block()
4071  public static class TestScriptSetupComponent extends BackboneElement implements IBaseBackboneElement {
4072    /**
4073     * Action would contain either an operation or an assertion.
4074     */
4075    @Child(name = "action", type = {}, order = 1, min = 1, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
4076    @Description(shortDefinition = "A setup operation or assert to perform", formalDefinition = "Action would contain either an operation or an assertion.")
4077    protected List<SetupActionComponent> action;
4078
4079    private static final long serialVersionUID = -123374486L;
4080
4081    /**
4082     * Constructor
4083     */
4084    public TestScriptSetupComponent() {
4085      super();
4086    }
4087
4088    /**
4089     * @return {@link #action} (Action would contain either an operation or an
4090     *         assertion.)
4091     */
4092    public List<SetupActionComponent> getAction() {
4093      if (this.action == null)
4094        this.action = new ArrayList<SetupActionComponent>();
4095      return this.action;
4096    }
4097
4098    /**
4099     * @return Returns a reference to <code>this</code> for easy method chaining
4100     */
4101    public TestScriptSetupComponent setAction(List<SetupActionComponent> theAction) {
4102      this.action = theAction;
4103      return this;
4104    }
4105
4106    public boolean hasAction() {
4107      if (this.action == null)
4108        return false;
4109      for (SetupActionComponent item : this.action)
4110        if (!item.isEmpty())
4111          return true;
4112      return false;
4113    }
4114
4115    public SetupActionComponent addAction() { // 3
4116      SetupActionComponent t = new SetupActionComponent();
4117      if (this.action == null)
4118        this.action = new ArrayList<SetupActionComponent>();
4119      this.action.add(t);
4120      return t;
4121    }
4122
4123    public TestScriptSetupComponent addAction(SetupActionComponent t) { // 3
4124      if (t == null)
4125        return this;
4126      if (this.action == null)
4127        this.action = new ArrayList<SetupActionComponent>();
4128      this.action.add(t);
4129      return this;
4130    }
4131
4132    /**
4133     * @return The first repetition of repeating field {@link #action}, creating it
4134     *         if it does not already exist
4135     */
4136    public SetupActionComponent getActionFirstRep() {
4137      if (getAction().isEmpty()) {
4138        addAction();
4139      }
4140      return getAction().get(0);
4141    }
4142
4143    protected void listChildren(List<Property> children) {
4144      super.listChildren(children);
4145      children.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0,
4146          java.lang.Integer.MAX_VALUE, action));
4147    }
4148
4149    @Override
4150    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4151      switch (_hash) {
4152      case -1422950858:
4153        /* action */ return new Property("action", "", "Action would contain either an operation or an assertion.", 0,
4154            java.lang.Integer.MAX_VALUE, action);
4155      default:
4156        return super.getNamedProperty(_hash, _name, _checkValid);
4157      }
4158
4159    }
4160
4161    @Override
4162    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4163      switch (hash) {
4164      case -1422950858:
4165        /* action */ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // SetupActionComponent
4166      default:
4167        return super.getProperty(hash, name, checkValid);
4168      }
4169
4170    }
4171
4172    @Override
4173    public Base setProperty(int hash, String name, Base value) throws FHIRException {
4174      switch (hash) {
4175      case -1422950858: // action
4176        this.getAction().add((SetupActionComponent) value); // SetupActionComponent
4177        return value;
4178      default:
4179        return super.setProperty(hash, name, value);
4180      }
4181
4182    }
4183
4184    @Override
4185    public Base setProperty(String name, Base value) throws FHIRException {
4186      if (name.equals("action")) {
4187        this.getAction().add((SetupActionComponent) value);
4188      } else
4189        return super.setProperty(name, value);
4190      return value;
4191    }
4192
4193    @Override
4194    public Base makeProperty(int hash, String name) throws FHIRException {
4195      switch (hash) {
4196      case -1422950858:
4197        return addAction();
4198      default:
4199        return super.makeProperty(hash, name);
4200      }
4201
4202    }
4203
4204    @Override
4205    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4206      switch (hash) {
4207      case -1422950858:
4208        /* action */ return new String[] {};
4209      default:
4210        return super.getTypesForProperty(hash, name);
4211      }
4212
4213    }
4214
4215    @Override
4216    public Base addChild(String name) throws FHIRException {
4217      if (name.equals("action")) {
4218        return addAction();
4219      } else
4220        return super.addChild(name);
4221    }
4222
4223    public TestScriptSetupComponent copy() {
4224      TestScriptSetupComponent dst = new TestScriptSetupComponent();
4225      copyValues(dst);
4226      return dst;
4227    }
4228
4229    public void copyValues(TestScriptSetupComponent dst) {
4230      super.copyValues(dst);
4231      if (action != null) {
4232        dst.action = new ArrayList<SetupActionComponent>();
4233        for (SetupActionComponent i : action)
4234          dst.action.add(i.copy());
4235      }
4236      ;
4237    }
4238
4239    @Override
4240    public boolean equalsDeep(Base other_) {
4241      if (!super.equalsDeep(other_))
4242        return false;
4243      if (!(other_ instanceof TestScriptSetupComponent))
4244        return false;
4245      TestScriptSetupComponent o = (TestScriptSetupComponent) other_;
4246      return compareDeep(action, o.action, true);
4247    }
4248
4249    @Override
4250    public boolean equalsShallow(Base other_) {
4251      if (!super.equalsShallow(other_))
4252        return false;
4253      if (!(other_ instanceof TestScriptSetupComponent))
4254        return false;
4255      TestScriptSetupComponent o = (TestScriptSetupComponent) other_;
4256      return true;
4257    }
4258
4259    public boolean isEmpty() {
4260      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(action);
4261    }
4262
4263    public String fhirType() {
4264      return "TestScript.setup";
4265
4266    }
4267
4268  }
4269
4270  @Block()
4271  public static class SetupActionComponent extends BackboneElement implements IBaseBackboneElement {
4272    /**
4273     * The operation to perform.
4274     */
4275    @Child(name = "operation", type = {}, order = 1, min = 0, max = 1, modifier = false, summary = false)
4276    @Description(shortDefinition = "The setup operation to perform", formalDefinition = "The operation to perform.")
4277    protected SetupActionOperationComponent operation;
4278
4279    /**
4280     * Evaluates the results of previous operations to determine if the server under
4281     * test behaves appropriately.
4282     */
4283    @Child(name = "assert", type = {}, order = 2, min = 0, max = 1, modifier = false, summary = false)
4284    @Description(shortDefinition = "The assertion to perform", formalDefinition = "Evaluates the results of previous operations to determine if the server under test behaves appropriately.")
4285    protected SetupActionAssertComponent assert_;
4286
4287    private static final long serialVersionUID = -252088305L;
4288
4289    /**
4290     * Constructor
4291     */
4292    public SetupActionComponent() {
4293      super();
4294    }
4295
4296    /**
4297     * @return {@link #operation} (The operation to perform.)
4298     */
4299    public SetupActionOperationComponent getOperation() {
4300      if (this.operation == null)
4301        if (Configuration.errorOnAutoCreate())
4302          throw new Error("Attempt to auto-create SetupActionComponent.operation");
4303        else if (Configuration.doAutoCreate())
4304          this.operation = new SetupActionOperationComponent(); // cc
4305      return this.operation;
4306    }
4307
4308    public boolean hasOperation() {
4309      return this.operation != null && !this.operation.isEmpty();
4310    }
4311
4312    /**
4313     * @param value {@link #operation} (The operation to perform.)
4314     */
4315    public SetupActionComponent setOperation(SetupActionOperationComponent value) {
4316      this.operation = value;
4317      return this;
4318    }
4319
4320    /**
4321     * @return {@link #assert_} (Evaluates the results of previous operations to
4322     *         determine if the server under test behaves appropriately.)
4323     */
4324    public SetupActionAssertComponent getAssert() {
4325      if (this.assert_ == null)
4326        if (Configuration.errorOnAutoCreate())
4327          throw new Error("Attempt to auto-create SetupActionComponent.assert_");
4328        else if (Configuration.doAutoCreate())
4329          this.assert_ = new SetupActionAssertComponent(); // cc
4330      return this.assert_;
4331    }
4332
4333    public boolean hasAssert() {
4334      return this.assert_ != null && !this.assert_.isEmpty();
4335    }
4336
4337    /**
4338     * @param value {@link #assert_} (Evaluates the results of previous operations
4339     *              to determine if the server under test behaves appropriately.)
4340     */
4341    public SetupActionComponent setAssert(SetupActionAssertComponent value) {
4342      this.assert_ = value;
4343      return this;
4344    }
4345
4346    protected void listChildren(List<Property> children) {
4347      super.listChildren(children);
4348      children.add(new Property("operation", "", "The operation to perform.", 0, 1, operation));
4349      children.add(new Property("assert", "",
4350          "Evaluates the results of previous operations to determine if the server under test behaves appropriately.",
4351          0, 1, assert_));
4352    }
4353
4354    @Override
4355    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4356      switch (_hash) {
4357      case 1662702951:
4358        /* operation */ return new Property("operation", "", "The operation to perform.", 0, 1, operation);
4359      case -1408208058:
4360        /* assert */ return new Property("assert", "",
4361            "Evaluates the results of previous operations to determine if the server under test behaves appropriately.",
4362            0, 1, assert_);
4363      default:
4364        return super.getNamedProperty(_hash, _name, _checkValid);
4365      }
4366
4367    }
4368
4369    @Override
4370    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4371      switch (hash) {
4372      case 1662702951:
4373        /* operation */ return this.operation == null ? new Base[0] : new Base[] { this.operation }; // SetupActionOperationComponent
4374      case -1408208058:
4375        /* assert */ return this.assert_ == null ? new Base[0] : new Base[] { this.assert_ }; // SetupActionAssertComponent
4376      default:
4377        return super.getProperty(hash, name, checkValid);
4378      }
4379
4380    }
4381
4382    @Override
4383    public Base setProperty(int hash, String name, Base value) throws FHIRException {
4384      switch (hash) {
4385      case 1662702951: // operation
4386        this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
4387        return value;
4388      case -1408208058: // assert
4389        this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
4390        return value;
4391      default:
4392        return super.setProperty(hash, name, value);
4393      }
4394
4395    }
4396
4397    @Override
4398    public Base setProperty(String name, Base value) throws FHIRException {
4399      if (name.equals("operation")) {
4400        this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
4401      } else if (name.equals("assert")) {
4402        this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
4403      } else
4404        return super.setProperty(name, value);
4405      return value;
4406    }
4407
4408    @Override
4409    public Base makeProperty(int hash, String name) throws FHIRException {
4410      switch (hash) {
4411      case 1662702951:
4412        return getOperation();
4413      case -1408208058:
4414        return getAssert();
4415      default:
4416        return super.makeProperty(hash, name);
4417      }
4418
4419    }
4420
4421    @Override
4422    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4423      switch (hash) {
4424      case 1662702951:
4425        /* operation */ return new String[] {};
4426      case -1408208058:
4427        /* assert */ return new String[] {};
4428      default:
4429        return super.getTypesForProperty(hash, name);
4430      }
4431
4432    }
4433
4434    @Override
4435    public Base addChild(String name) throws FHIRException {
4436      if (name.equals("operation")) {
4437        this.operation = new SetupActionOperationComponent();
4438        return this.operation;
4439      } else if (name.equals("assert")) {
4440        this.assert_ = new SetupActionAssertComponent();
4441        return this.assert_;
4442      } else
4443        return super.addChild(name);
4444    }
4445
4446    public SetupActionComponent copy() {
4447      SetupActionComponent dst = new SetupActionComponent();
4448      copyValues(dst);
4449      return dst;
4450    }
4451
4452    public void copyValues(SetupActionComponent dst) {
4453      super.copyValues(dst);
4454      dst.operation = operation == null ? null : operation.copy();
4455      dst.assert_ = assert_ == null ? null : assert_.copy();
4456    }
4457
4458    @Override
4459    public boolean equalsDeep(Base other_) {
4460      if (!super.equalsDeep(other_))
4461        return false;
4462      if (!(other_ instanceof SetupActionComponent))
4463        return false;
4464      SetupActionComponent o = (SetupActionComponent) other_;
4465      return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true);
4466    }
4467
4468    @Override
4469    public boolean equalsShallow(Base other_) {
4470      if (!super.equalsShallow(other_))
4471        return false;
4472      if (!(other_ instanceof SetupActionComponent))
4473        return false;
4474      SetupActionComponent o = (SetupActionComponent) other_;
4475      return true;
4476    }
4477
4478    public boolean isEmpty() {
4479      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation, assert_);
4480    }
4481
4482    public String fhirType() {
4483      return "TestScript.setup.action";
4484
4485    }
4486
4487  }
4488
4489  @Block()
4490  public static class SetupActionOperationComponent extends BackboneElement implements IBaseBackboneElement {
4491    /**
4492     * Server interaction or operation type.
4493     */
4494    @Child(name = "type", type = { Coding.class }, order = 1, min = 0, max = 1, modifier = false, summary = false)
4495    @Description(shortDefinition = "The operation code type that will be executed", formalDefinition = "Server interaction or operation type.")
4496    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/testscript-operation-codes")
4497    protected Coding type;
4498
4499    /**
4500     * The type of the resource. See http://build.fhir.org/resourcelist.html.
4501     */
4502    @Child(name = "resource", type = { CodeType.class }, order = 2, min = 0, max = 1, modifier = false, summary = false)
4503    @Description(shortDefinition = "Resource type", formalDefinition = "The type of the resource.  See http://build.fhir.org/resourcelist.html.")
4504    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/defined-types")
4505    protected CodeType resource;
4506
4507    /**
4508     * The label would be used for tracking/logging purposes by test engines.
4509     */
4510    @Child(name = "label", type = { StringType.class }, order = 3, min = 0, max = 1, modifier = false, summary = false)
4511    @Description(shortDefinition = "Tracking/logging operation label", formalDefinition = "The label would be used for tracking/logging purposes by test engines.")
4512    protected StringType label;
4513
4514    /**
4515     * The description would be used by test engines for tracking and reporting
4516     * purposes.
4517     */
4518    @Child(name = "description", type = {
4519        StringType.class }, order = 4, min = 0, max = 1, modifier = false, summary = false)
4520    @Description(shortDefinition = "Tracking/reporting operation description", formalDefinition = "The description would be used by test engines for tracking and reporting purposes.")
4521    protected StringType description;
4522
4523    /**
4524     * The mime-type to use for RESTful operation in the 'Accept' header.
4525     */
4526    @Child(name = "accept", type = { CodeType.class }, order = 5, min = 0, max = 1, modifier = false, summary = false)
4527    @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.")
4528    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/mimetypes")
4529    protected CodeType accept;
4530
4531    /**
4532     * The mime-type to use for RESTful operation in the 'Content-Type' header.
4533     */
4534    @Child(name = "contentType", type = {
4535        CodeType.class }, order = 6, min = 0, max = 1, modifier = false, summary = false)
4536    @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.")
4537    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/mimetypes")
4538    protected CodeType contentType;
4539
4540    /**
4541     * The server where the request message is destined for. Must be one of the
4542     * server numbers listed in TestScript.destination section.
4543     */
4544    @Child(name = "destination", type = {
4545        IntegerType.class }, order = 7, min = 0, max = 1, modifier = false, summary = false)
4546    @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.")
4547    protected IntegerType destination;
4548
4549    /**
4550     * Whether or not to implicitly send the request url in encoded format. The
4551     * default is true to match the standard RESTful client behavior. Set to false
4552     * when communicating with a server that does not support encoded url paths.
4553     */
4554    @Child(name = "encodeRequestUrl", type = {
4555        BooleanType.class }, order = 8, min = 1, max = 1, modifier = false, summary = false)
4556    @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.")
4557    protected BooleanType encodeRequestUrl;
4558
4559    /**
4560     * The HTTP method the test engine MUST use for this operation regardless of any
4561     * other operation details.
4562     */
4563    @Child(name = "method", type = { CodeType.class }, order = 9, min = 0, max = 1, modifier = false, summary = false)
4564    @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.")
4565    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/http-operations")
4566    protected Enumeration<TestScriptRequestMethodCode> method;
4567
4568    /**
4569     * The server where the request message originates from. Must be one of the
4570     * server numbers listed in TestScript.origin section.
4571     */
4572    @Child(name = "origin", type = {
4573        IntegerType.class }, order = 10, min = 0, max = 1, modifier = false, summary = false)
4574    @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.")
4575    protected IntegerType origin;
4576
4577    /**
4578     * Path plus parameters after [type]. Used to set parts of the request URL
4579     * explicitly.
4580     */
4581    @Child(name = "params", type = {
4582        StringType.class }, order = 11, min = 0, max = 1, modifier = false, summary = false)
4583    @Description(shortDefinition = "Explicitly defined path parameters", formalDefinition = "Path plus parameters after [type].  Used to set parts of the request URL explicitly.")
4584    protected StringType params;
4585
4586    /**
4587     * Header elements would be used to set HTTP headers.
4588     */
4589    @Child(name = "requestHeader", type = {}, order = 12, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
4590    @Description(shortDefinition = "Each operation can have one or more header elements", formalDefinition = "Header elements would be used to set HTTP headers.")
4591    protected List<SetupActionOperationRequestHeaderComponent> requestHeader;
4592
4593    /**
4594     * The fixture id (maybe new) to map to the request.
4595     */
4596    @Child(name = "requestId", type = { IdType.class }, order = 13, min = 0, max = 1, modifier = false, summary = false)
4597    @Description(shortDefinition = "Fixture Id of mapped request", formalDefinition = "The fixture id (maybe new) to map to the request.")
4598    protected IdType requestId;
4599
4600    /**
4601     * The fixture id (maybe new) to map to the response.
4602     */
4603    @Child(name = "responseId", type = {
4604        IdType.class }, order = 14, min = 0, max = 1, modifier = false, summary = false)
4605    @Description(shortDefinition = "Fixture Id of mapped response", formalDefinition = "The fixture id (maybe new) to map to the response.")
4606    protected IdType responseId;
4607
4608    /**
4609     * The id of the fixture used as the body of a PUT or POST request.
4610     */
4611    @Child(name = "sourceId", type = { IdType.class }, order = 15, min = 0, max = 1, modifier = false, summary = false)
4612    @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.")
4613    protected IdType sourceId;
4614
4615    /**
4616     * Id of fixture used for extracting the [id], [type], and [vid] for GET
4617     * requests.
4618     */
4619    @Child(name = "targetId", type = { IdType.class }, order = 16, min = 0, max = 1, modifier = false, summary = false)
4620    @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.")
4621    protected IdType targetId;
4622
4623    /**
4624     * Complete request URL.
4625     */
4626    @Child(name = "url", type = { StringType.class }, order = 17, min = 0, max = 1, modifier = false, summary = false)
4627    @Description(shortDefinition = "Request URL", formalDefinition = "Complete request URL.")
4628    protected StringType url;
4629
4630    private static final long serialVersionUID = 300050202L;
4631
4632    /**
4633     * Constructor
4634     */
4635    public SetupActionOperationComponent() {
4636      super();
4637    }
4638
4639    /**
4640     * Constructor
4641     */
4642    public SetupActionOperationComponent(BooleanType encodeRequestUrl) {
4643      super();
4644      this.encodeRequestUrl = encodeRequestUrl;
4645    }
4646
4647    /**
4648     * @return {@link #type} (Server interaction or operation type.)
4649     */
4650    public Coding getType() {
4651      if (this.type == null)
4652        if (Configuration.errorOnAutoCreate())
4653          throw new Error("Attempt to auto-create SetupActionOperationComponent.type");
4654        else if (Configuration.doAutoCreate())
4655          this.type = new Coding(); // cc
4656      return this.type;
4657    }
4658
4659    public boolean hasType() {
4660      return this.type != null && !this.type.isEmpty();
4661    }
4662
4663    /**
4664     * @param value {@link #type} (Server interaction or operation type.)
4665     */
4666    public SetupActionOperationComponent setType(Coding value) {
4667      this.type = value;
4668      return this;
4669    }
4670
4671    /**
4672     * @return {@link #resource} (The type of the resource. See
4673     *         http://build.fhir.org/resourcelist.html.). This is the underlying
4674     *         object with id, value and extensions. The accessor "getResource"
4675     *         gives direct access to the value
4676     */
4677    public CodeType getResourceElement() {
4678      if (this.resource == null)
4679        if (Configuration.errorOnAutoCreate())
4680          throw new Error("Attempt to auto-create SetupActionOperationComponent.resource");
4681        else if (Configuration.doAutoCreate())
4682          this.resource = new CodeType(); // bb
4683      return this.resource;
4684    }
4685
4686    public boolean hasResourceElement() {
4687      return this.resource != null && !this.resource.isEmpty();
4688    }
4689
4690    public boolean hasResource() {
4691      return this.resource != null && !this.resource.isEmpty();
4692    }
4693
4694    /**
4695     * @param value {@link #resource} (The type of the resource. See
4696     *              http://build.fhir.org/resourcelist.html.). This is the
4697     *              underlying object with id, value and extensions. The accessor
4698     *              "getResource" gives direct access to the value
4699     */
4700    public SetupActionOperationComponent setResourceElement(CodeType value) {
4701      this.resource = value;
4702      return this;
4703    }
4704
4705    /**
4706     * @return The type of the resource. See
4707     *         http://build.fhir.org/resourcelist.html.
4708     */
4709    public String getResource() {
4710      return this.resource == null ? null : this.resource.getValue();
4711    }
4712
4713    /**
4714     * @param value The type of the resource. See
4715     *              http://build.fhir.org/resourcelist.html.
4716     */
4717    public SetupActionOperationComponent setResource(String value) {
4718      if (Utilities.noString(value))
4719        this.resource = null;
4720      else {
4721        if (this.resource == null)
4722          this.resource = new CodeType();
4723        this.resource.setValue(value);
4724      }
4725      return this;
4726    }
4727
4728    /**
4729     * @return {@link #label} (The label would be used for tracking/logging purposes
4730     *         by test engines.). This is the underlying object with id, value and
4731     *         extensions. The accessor "getLabel" gives direct access to the value
4732     */
4733    public StringType getLabelElement() {
4734      if (this.label == null)
4735        if (Configuration.errorOnAutoCreate())
4736          throw new Error("Attempt to auto-create SetupActionOperationComponent.label");
4737        else if (Configuration.doAutoCreate())
4738          this.label = new StringType(); // bb
4739      return this.label;
4740    }
4741
4742    public boolean hasLabelElement() {
4743      return this.label != null && !this.label.isEmpty();
4744    }
4745
4746    public boolean hasLabel() {
4747      return this.label != null && !this.label.isEmpty();
4748    }
4749
4750    /**
4751     * @param value {@link #label} (The label would be used for tracking/logging
4752     *              purposes by test engines.). This is the underlying object with
4753     *              id, value and extensions. The accessor "getLabel" gives direct
4754     *              access to the value
4755     */
4756    public SetupActionOperationComponent setLabelElement(StringType value) {
4757      this.label = value;
4758      return this;
4759    }
4760
4761    /**
4762     * @return The label would be used for tracking/logging purposes by test
4763     *         engines.
4764     */
4765    public String getLabel() {
4766      return this.label == null ? null : this.label.getValue();
4767    }
4768
4769    /**
4770     * @param value The label would be used for tracking/logging purposes by test
4771     *              engines.
4772     */
4773    public SetupActionOperationComponent setLabel(String value) {
4774      if (Utilities.noString(value))
4775        this.label = null;
4776      else {
4777        if (this.label == null)
4778          this.label = new StringType();
4779        this.label.setValue(value);
4780      }
4781      return this;
4782    }
4783
4784    /**
4785     * @return {@link #description} (The description would be used by test engines
4786     *         for tracking and reporting purposes.). This is the underlying object
4787     *         with id, value and extensions. The accessor "getDescription" gives
4788     *         direct access to the value
4789     */
4790    public StringType getDescriptionElement() {
4791      if (this.description == null)
4792        if (Configuration.errorOnAutoCreate())
4793          throw new Error("Attempt to auto-create SetupActionOperationComponent.description");
4794        else if (Configuration.doAutoCreate())
4795          this.description = new StringType(); // bb
4796      return this.description;
4797    }
4798
4799    public boolean hasDescriptionElement() {
4800      return this.description != null && !this.description.isEmpty();
4801    }
4802
4803    public boolean hasDescription() {
4804      return this.description != null && !this.description.isEmpty();
4805    }
4806
4807    /**
4808     * @param value {@link #description} (The description would be used by test
4809     *              engines for tracking and reporting purposes.). This is the
4810     *              underlying object with id, value and extensions. The accessor
4811     *              "getDescription" gives direct access to the value
4812     */
4813    public SetupActionOperationComponent setDescriptionElement(StringType value) {
4814      this.description = value;
4815      return this;
4816    }
4817
4818    /**
4819     * @return The description would be used by test engines for tracking and
4820     *         reporting purposes.
4821     */
4822    public String getDescription() {
4823      return this.description == null ? null : this.description.getValue();
4824    }
4825
4826    /**
4827     * @param value The description would be used by test engines for tracking and
4828     *              reporting purposes.
4829     */
4830    public SetupActionOperationComponent setDescription(String value) {
4831      if (Utilities.noString(value))
4832        this.description = null;
4833      else {
4834        if (this.description == null)
4835          this.description = new StringType();
4836        this.description.setValue(value);
4837      }
4838      return this;
4839    }
4840
4841    /**
4842     * @return {@link #accept} (The mime-type to use for RESTful operation in the
4843     *         'Accept' header.). This is the underlying object with id, value and
4844     *         extensions. The accessor "getAccept" gives direct access to the value
4845     */
4846    public CodeType getAcceptElement() {
4847      if (this.accept == null)
4848        if (Configuration.errorOnAutoCreate())
4849          throw new Error("Attempt to auto-create SetupActionOperationComponent.accept");
4850        else if (Configuration.doAutoCreate())
4851          this.accept = new CodeType(); // bb
4852      return this.accept;
4853    }
4854
4855    public boolean hasAcceptElement() {
4856      return this.accept != null && !this.accept.isEmpty();
4857    }
4858
4859    public boolean hasAccept() {
4860      return this.accept != null && !this.accept.isEmpty();
4861    }
4862
4863    /**
4864     * @param value {@link #accept} (The mime-type to use for RESTful operation in
4865     *              the 'Accept' header.). This is the underlying object with id,
4866     *              value and extensions. The accessor "getAccept" gives direct
4867     *              access to the value
4868     */
4869    public SetupActionOperationComponent setAcceptElement(CodeType value) {
4870      this.accept = value;
4871      return this;
4872    }
4873
4874    /**
4875     * @return The mime-type to use for RESTful operation in the 'Accept' header.
4876     */
4877    public String getAccept() {
4878      return this.accept == null ? null : this.accept.getValue();
4879    }
4880
4881    /**
4882     * @param value The mime-type to use for RESTful operation in the 'Accept'
4883     *              header.
4884     */
4885    public SetupActionOperationComponent setAccept(String value) {
4886      if (Utilities.noString(value))
4887        this.accept = null;
4888      else {
4889        if (this.accept == null)
4890          this.accept = new CodeType();
4891        this.accept.setValue(value);
4892      }
4893      return this;
4894    }
4895
4896    /**
4897     * @return {@link #contentType} (The mime-type to use for RESTful operation in
4898     *         the 'Content-Type' header.). This is the underlying object with id,
4899     *         value and extensions. The accessor "getContentType" gives direct
4900     *         access to the value
4901     */
4902    public CodeType getContentTypeElement() {
4903      if (this.contentType == null)
4904        if (Configuration.errorOnAutoCreate())
4905          throw new Error("Attempt to auto-create SetupActionOperationComponent.contentType");
4906        else if (Configuration.doAutoCreate())
4907          this.contentType = new CodeType(); // bb
4908      return this.contentType;
4909    }
4910
4911    public boolean hasContentTypeElement() {
4912      return this.contentType != null && !this.contentType.isEmpty();
4913    }
4914
4915    public boolean hasContentType() {
4916      return this.contentType != null && !this.contentType.isEmpty();
4917    }
4918
4919    /**
4920     * @param value {@link #contentType} (The mime-type to use for RESTful operation
4921     *              in the 'Content-Type' header.). This is the underlying object
4922     *              with id, value and extensions. The accessor "getContentType"
4923     *              gives direct access to the value
4924     */
4925    public SetupActionOperationComponent setContentTypeElement(CodeType value) {
4926      this.contentType = value;
4927      return this;
4928    }
4929
4930    /**
4931     * @return The mime-type to use for RESTful operation in the 'Content-Type'
4932     *         header.
4933     */
4934    public String getContentType() {
4935      return this.contentType == null ? null : this.contentType.getValue();
4936    }
4937
4938    /**
4939     * @param value The mime-type to use for RESTful operation in the 'Content-Type'
4940     *              header.
4941     */
4942    public SetupActionOperationComponent setContentType(String value) {
4943      if (Utilities.noString(value))
4944        this.contentType = null;
4945      else {
4946        if (this.contentType == null)
4947          this.contentType = new CodeType();
4948        this.contentType.setValue(value);
4949      }
4950      return this;
4951    }
4952
4953    /**
4954     * @return {@link #destination} (The server where the request message is
4955     *         destined for. Must be one of the server numbers listed in
4956     *         TestScript.destination section.). This is the underlying object with
4957     *         id, value and extensions. The accessor "getDestination" gives direct
4958     *         access to the value
4959     */
4960    public IntegerType getDestinationElement() {
4961      if (this.destination == null)
4962        if (Configuration.errorOnAutoCreate())
4963          throw new Error("Attempt to auto-create SetupActionOperationComponent.destination");
4964        else if (Configuration.doAutoCreate())
4965          this.destination = new IntegerType(); // bb
4966      return this.destination;
4967    }
4968
4969    public boolean hasDestinationElement() {
4970      return this.destination != null && !this.destination.isEmpty();
4971    }
4972
4973    public boolean hasDestination() {
4974      return this.destination != null && !this.destination.isEmpty();
4975    }
4976
4977    /**
4978     * @param value {@link #destination} (The server where the request message is
4979     *              destined for. Must be one of the server numbers listed in
4980     *              TestScript.destination section.). This is the underlying object
4981     *              with id, value and extensions. The accessor "getDestination"
4982     *              gives direct access to the value
4983     */
4984    public SetupActionOperationComponent setDestinationElement(IntegerType value) {
4985      this.destination = value;
4986      return this;
4987    }
4988
4989    /**
4990     * @return The server where the request message is destined for. Must be one of
4991     *         the server numbers listed in TestScript.destination section.
4992     */
4993    public int getDestination() {
4994      return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue();
4995    }
4996
4997    /**
4998     * @param value The server where the request message is destined for. Must be
4999     *              one of the server numbers listed in TestScript.destination
5000     *              section.
5001     */
5002    public SetupActionOperationComponent setDestination(int value) {
5003      if (this.destination == null)
5004        this.destination = new IntegerType();
5005      this.destination.setValue(value);
5006      return this;
5007    }
5008
5009    /**
5010     * @return {@link #encodeRequestUrl} (Whether or not to implicitly send the
5011     *         request url in encoded format. The default is true to match the
5012     *         standard RESTful client behavior. Set to false when communicating
5013     *         with a server that does not support encoded url paths.). This is the
5014     *         underlying object with id, value and extensions. The accessor
5015     *         "getEncodeRequestUrl" gives direct access to the value
5016     */
5017    public BooleanType getEncodeRequestUrlElement() {
5018      if (this.encodeRequestUrl == null)
5019        if (Configuration.errorOnAutoCreate())
5020          throw new Error("Attempt to auto-create SetupActionOperationComponent.encodeRequestUrl");
5021        else if (Configuration.doAutoCreate())
5022          this.encodeRequestUrl = new BooleanType(); // bb
5023      return this.encodeRequestUrl;
5024    }
5025
5026    public boolean hasEncodeRequestUrlElement() {
5027      return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty();
5028    }
5029
5030    public boolean hasEncodeRequestUrl() {
5031      return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty();
5032    }
5033
5034    /**
5035     * @param value {@link #encodeRequestUrl} (Whether or not to implicitly send the
5036     *              request url in encoded format. The default is true to match the
5037     *              standard RESTful client behavior. Set to false when
5038     *              communicating with a server that does not support encoded url
5039     *              paths.). This is the underlying object with id, value and
5040     *              extensions. The accessor "getEncodeRequestUrl" gives direct
5041     *              access to the value
5042     */
5043    public SetupActionOperationComponent setEncodeRequestUrlElement(BooleanType value) {
5044      this.encodeRequestUrl = value;
5045      return this;
5046    }
5047
5048    /**
5049     * @return Whether or not to implicitly send the request url in encoded format.
5050     *         The default is true to match the standard RESTful client behavior.
5051     *         Set to false when communicating with a server that does not support
5052     *         encoded url paths.
5053     */
5054    public boolean getEncodeRequestUrl() {
5055      return this.encodeRequestUrl == null || this.encodeRequestUrl.isEmpty() ? false
5056          : this.encodeRequestUrl.getValue();
5057    }
5058
5059    /**
5060     * @param value Whether or not to implicitly send the request url in encoded
5061     *              format. The default is true to match the standard RESTful client
5062     *              behavior. Set to false when communicating with a server that
5063     *              does not support encoded url paths.
5064     */
5065    public SetupActionOperationComponent setEncodeRequestUrl(boolean value) {
5066      if (this.encodeRequestUrl == null)
5067        this.encodeRequestUrl = new BooleanType();
5068      this.encodeRequestUrl.setValue(value);
5069      return this;
5070    }
5071
5072    /**
5073     * @return {@link #method} (The HTTP method the test engine MUST use for this
5074     *         operation regardless of any other operation details.). This is the
5075     *         underlying object with id, value and extensions. The accessor
5076     *         "getMethod" gives direct access to the value
5077     */
5078    public Enumeration<TestScriptRequestMethodCode> getMethodElement() {
5079      if (this.method == null)
5080        if (Configuration.errorOnAutoCreate())
5081          throw new Error("Attempt to auto-create SetupActionOperationComponent.method");
5082        else if (Configuration.doAutoCreate())
5083          this.method = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory()); // bb
5084      return this.method;
5085    }
5086
5087    public boolean hasMethodElement() {
5088      return this.method != null && !this.method.isEmpty();
5089    }
5090
5091    public boolean hasMethod() {
5092      return this.method != null && !this.method.isEmpty();
5093    }
5094
5095    /**
5096     * @param value {@link #method} (The HTTP method the test engine MUST use for
5097     *              this operation regardless of any other operation details.). This
5098     *              is the underlying object with id, value and extensions. The
5099     *              accessor "getMethod" gives direct access to the value
5100     */
5101    public SetupActionOperationComponent setMethodElement(Enumeration<TestScriptRequestMethodCode> value) {
5102      this.method = value;
5103      return this;
5104    }
5105
5106    /**
5107     * @return The HTTP method the test engine MUST use for this operation
5108     *         regardless of any other operation details.
5109     */
5110    public TestScriptRequestMethodCode getMethod() {
5111      return this.method == null ? null : this.method.getValue();
5112    }
5113
5114    /**
5115     * @param value The HTTP method the test engine MUST use for this operation
5116     *              regardless of any other operation details.
5117     */
5118    public SetupActionOperationComponent setMethod(TestScriptRequestMethodCode value) {
5119      if (value == null)
5120        this.method = null;
5121      else {
5122        if (this.method == null)
5123          this.method = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory());
5124        this.method.setValue(value);
5125      }
5126      return this;
5127    }
5128
5129    /**
5130     * @return {@link #origin} (The server where the request message originates
5131     *         from. Must be one of the server numbers listed in TestScript.origin
5132     *         section.). This is the underlying object with id, value and
5133     *         extensions. The accessor "getOrigin" gives direct access to the value
5134     */
5135    public IntegerType getOriginElement() {
5136      if (this.origin == null)
5137        if (Configuration.errorOnAutoCreate())
5138          throw new Error("Attempt to auto-create SetupActionOperationComponent.origin");
5139        else if (Configuration.doAutoCreate())
5140          this.origin = new IntegerType(); // bb
5141      return this.origin;
5142    }
5143
5144    public boolean hasOriginElement() {
5145      return this.origin != null && !this.origin.isEmpty();
5146    }
5147
5148    public boolean hasOrigin() {
5149      return this.origin != null && !this.origin.isEmpty();
5150    }
5151
5152    /**
5153     * @param value {@link #origin} (The server where the request message originates
5154     *              from. Must be one of the server numbers listed in
5155     *              TestScript.origin section.). This is the underlying object with
5156     *              id, value and extensions. The accessor "getOrigin" gives direct
5157     *              access to the value
5158     */
5159    public SetupActionOperationComponent setOriginElement(IntegerType value) {
5160      this.origin = value;
5161      return this;
5162    }
5163
5164    /**
5165     * @return The server where the request message originates from. Must be one of
5166     *         the server numbers listed in TestScript.origin section.
5167     */
5168    public int getOrigin() {
5169      return this.origin == null || this.origin.isEmpty() ? 0 : this.origin.getValue();
5170    }
5171
5172    /**
5173     * @param value The server where the request message originates from. Must be
5174     *              one of the server numbers listed in TestScript.origin section.
5175     */
5176    public SetupActionOperationComponent setOrigin(int value) {
5177      if (this.origin == null)
5178        this.origin = new IntegerType();
5179      this.origin.setValue(value);
5180      return this;
5181    }
5182
5183    /**
5184     * @return {@link #params} (Path plus parameters after [type]. Used to set parts
5185     *         of the request URL explicitly.). This is the underlying object with
5186     *         id, value and extensions. The accessor "getParams" gives direct
5187     *         access to the value
5188     */
5189    public StringType getParamsElement() {
5190      if (this.params == null)
5191        if (Configuration.errorOnAutoCreate())
5192          throw new Error("Attempt to auto-create SetupActionOperationComponent.params");
5193        else if (Configuration.doAutoCreate())
5194          this.params = new StringType(); // bb
5195      return this.params;
5196    }
5197
5198    public boolean hasParamsElement() {
5199      return this.params != null && !this.params.isEmpty();
5200    }
5201
5202    public boolean hasParams() {
5203      return this.params != null && !this.params.isEmpty();
5204    }
5205
5206    /**
5207     * @param value {@link #params} (Path plus parameters after [type]. Used to set
5208     *              parts of the request URL explicitly.). This is the underlying
5209     *              object with id, value and extensions. The accessor "getParams"
5210     *              gives direct access to the value
5211     */
5212    public SetupActionOperationComponent setParamsElement(StringType value) {
5213      this.params = value;
5214      return this;
5215    }
5216
5217    /**
5218     * @return Path plus parameters after [type]. Used to set parts of the request
5219     *         URL explicitly.
5220     */
5221    public String getParams() {
5222      return this.params == null ? null : this.params.getValue();
5223    }
5224
5225    /**
5226     * @param value Path plus parameters after [type]. Used to set parts of the
5227     *              request URL explicitly.
5228     */
5229    public SetupActionOperationComponent setParams(String value) {
5230      if (Utilities.noString(value))
5231        this.params = null;
5232      else {
5233        if (this.params == null)
5234          this.params = new StringType();
5235        this.params.setValue(value);
5236      }
5237      return this;
5238    }
5239
5240    /**
5241     * @return {@link #requestHeader} (Header elements would be used to set HTTP
5242     *         headers.)
5243     */
5244    public List<SetupActionOperationRequestHeaderComponent> getRequestHeader() {
5245      if (this.requestHeader == null)
5246        this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
5247      return this.requestHeader;
5248    }
5249
5250    /**
5251     * @return Returns a reference to <code>this</code> for easy method chaining
5252     */
5253    public SetupActionOperationComponent setRequestHeader(
5254        List<SetupActionOperationRequestHeaderComponent> theRequestHeader) {
5255      this.requestHeader = theRequestHeader;
5256      return this;
5257    }
5258
5259    public boolean hasRequestHeader() {
5260      if (this.requestHeader == null)
5261        return false;
5262      for (SetupActionOperationRequestHeaderComponent item : this.requestHeader)
5263        if (!item.isEmpty())
5264          return true;
5265      return false;
5266    }
5267
5268    public SetupActionOperationRequestHeaderComponent addRequestHeader() { // 3
5269      SetupActionOperationRequestHeaderComponent t = new SetupActionOperationRequestHeaderComponent();
5270      if (this.requestHeader == null)
5271        this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
5272      this.requestHeader.add(t);
5273      return t;
5274    }
5275
5276    public SetupActionOperationComponent addRequestHeader(SetupActionOperationRequestHeaderComponent t) { // 3
5277      if (t == null)
5278        return this;
5279      if (this.requestHeader == null)
5280        this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
5281      this.requestHeader.add(t);
5282      return this;
5283    }
5284
5285    /**
5286     * @return The first repetition of repeating field {@link #requestHeader},
5287     *         creating it if it does not already exist
5288     */
5289    public SetupActionOperationRequestHeaderComponent getRequestHeaderFirstRep() {
5290      if (getRequestHeader().isEmpty()) {
5291        addRequestHeader();
5292      }
5293      return getRequestHeader().get(0);
5294    }
5295
5296    /**
5297     * @return {@link #requestId} (The fixture id (maybe new) to map to the
5298     *         request.). This is the underlying object with id, value and
5299     *         extensions. The accessor "getRequestId" gives direct access to the
5300     *         value
5301     */
5302    public IdType getRequestIdElement() {
5303      if (this.requestId == null)
5304        if (Configuration.errorOnAutoCreate())
5305          throw new Error("Attempt to auto-create SetupActionOperationComponent.requestId");
5306        else if (Configuration.doAutoCreate())
5307          this.requestId = new IdType(); // bb
5308      return this.requestId;
5309    }
5310
5311    public boolean hasRequestIdElement() {
5312      return this.requestId != null && !this.requestId.isEmpty();
5313    }
5314
5315    public boolean hasRequestId() {
5316      return this.requestId != null && !this.requestId.isEmpty();
5317    }
5318
5319    /**
5320     * @param value {@link #requestId} (The fixture id (maybe new) to map to the
5321     *              request.). This is the underlying object with id, value and
5322     *              extensions. The accessor "getRequestId" gives direct access to
5323     *              the value
5324     */
5325    public SetupActionOperationComponent setRequestIdElement(IdType value) {
5326      this.requestId = value;
5327      return this;
5328    }
5329
5330    /**
5331     * @return The fixture id (maybe new) to map to the request.
5332     */
5333    public String getRequestId() {
5334      return this.requestId == null ? null : this.requestId.getValue();
5335    }
5336
5337    /**
5338     * @param value The fixture id (maybe new) to map to the request.
5339     */
5340    public SetupActionOperationComponent setRequestId(String value) {
5341      if (Utilities.noString(value))
5342        this.requestId = null;
5343      else {
5344        if (this.requestId == null)
5345          this.requestId = new IdType();
5346        this.requestId.setValue(value);
5347      }
5348      return this;
5349    }
5350
5351    /**
5352     * @return {@link #responseId} (The fixture id (maybe new) to map to the
5353     *         response.). This is the underlying object with id, value and
5354     *         extensions. The accessor "getResponseId" gives direct access to the
5355     *         value
5356     */
5357    public IdType getResponseIdElement() {
5358      if (this.responseId == null)
5359        if (Configuration.errorOnAutoCreate())
5360          throw new Error("Attempt to auto-create SetupActionOperationComponent.responseId");
5361        else if (Configuration.doAutoCreate())
5362          this.responseId = new IdType(); // bb
5363      return this.responseId;
5364    }
5365
5366    public boolean hasResponseIdElement() {
5367      return this.responseId != null && !this.responseId.isEmpty();
5368    }
5369
5370    public boolean hasResponseId() {
5371      return this.responseId != null && !this.responseId.isEmpty();
5372    }
5373
5374    /**
5375     * @param value {@link #responseId} (The fixture id (maybe new) to map to the
5376     *              response.). This is the underlying object with id, value and
5377     *              extensions. The accessor "getResponseId" gives direct access to
5378     *              the value
5379     */
5380    public SetupActionOperationComponent setResponseIdElement(IdType value) {
5381      this.responseId = value;
5382      return this;
5383    }
5384
5385    /**
5386     * @return The fixture id (maybe new) to map to the response.
5387     */
5388    public String getResponseId() {
5389      return this.responseId == null ? null : this.responseId.getValue();
5390    }
5391
5392    /**
5393     * @param value The fixture id (maybe new) to map to the response.
5394     */
5395    public SetupActionOperationComponent setResponseId(String value) {
5396      if (Utilities.noString(value))
5397        this.responseId = null;
5398      else {
5399        if (this.responseId == null)
5400          this.responseId = new IdType();
5401        this.responseId.setValue(value);
5402      }
5403      return this;
5404    }
5405
5406    /**
5407     * @return {@link #sourceId} (The id of the fixture used as the body of a PUT or
5408     *         POST request.). This is the underlying object with id, value and
5409     *         extensions. The accessor "getSourceId" gives direct access to the
5410     *         value
5411     */
5412    public IdType getSourceIdElement() {
5413      if (this.sourceId == null)
5414        if (Configuration.errorOnAutoCreate())
5415          throw new Error("Attempt to auto-create SetupActionOperationComponent.sourceId");
5416        else if (Configuration.doAutoCreate())
5417          this.sourceId = new IdType(); // bb
5418      return this.sourceId;
5419    }
5420
5421    public boolean hasSourceIdElement() {
5422      return this.sourceId != null && !this.sourceId.isEmpty();
5423    }
5424
5425    public boolean hasSourceId() {
5426      return this.sourceId != null && !this.sourceId.isEmpty();
5427    }
5428
5429    /**
5430     * @param value {@link #sourceId} (The id of the fixture used as the body of a
5431     *              PUT or POST request.). This is the underlying object with id,
5432     *              value and extensions. The accessor "getSourceId" gives direct
5433     *              access to the value
5434     */
5435    public SetupActionOperationComponent setSourceIdElement(IdType value) {
5436      this.sourceId = value;
5437      return this;
5438    }
5439
5440    /**
5441     * @return The id of the fixture used as the body of a PUT or POST request.
5442     */
5443    public String getSourceId() {
5444      return this.sourceId == null ? null : this.sourceId.getValue();
5445    }
5446
5447    /**
5448     * @param value The id of the fixture used as the body of a PUT or POST request.
5449     */
5450    public SetupActionOperationComponent setSourceId(String value) {
5451      if (Utilities.noString(value))
5452        this.sourceId = null;
5453      else {
5454        if (this.sourceId == null)
5455          this.sourceId = new IdType();
5456        this.sourceId.setValue(value);
5457      }
5458      return this;
5459    }
5460
5461    /**
5462     * @return {@link #targetId} (Id of fixture used for extracting the [id],
5463     *         [type], and [vid] for GET requests.). This is the underlying object
5464     *         with id, value and extensions. The accessor "getTargetId" gives
5465     *         direct access to the value
5466     */
5467    public IdType getTargetIdElement() {
5468      if (this.targetId == null)
5469        if (Configuration.errorOnAutoCreate())
5470          throw new Error("Attempt to auto-create SetupActionOperationComponent.targetId");
5471        else if (Configuration.doAutoCreate())
5472          this.targetId = new IdType(); // bb
5473      return this.targetId;
5474    }
5475
5476    public boolean hasTargetIdElement() {
5477      return this.targetId != null && !this.targetId.isEmpty();
5478    }
5479
5480    public boolean hasTargetId() {
5481      return this.targetId != null && !this.targetId.isEmpty();
5482    }
5483
5484    /**
5485     * @param value {@link #targetId} (Id of fixture used for extracting the [id],
5486     *              [type], and [vid] for GET requests.). This is the underlying
5487     *              object with id, value and extensions. The accessor "getTargetId"
5488     *              gives direct access to the value
5489     */
5490    public SetupActionOperationComponent setTargetIdElement(IdType value) {
5491      this.targetId = value;
5492      return this;
5493    }
5494
5495    /**
5496     * @return Id of fixture used for extracting the [id], [type], and [vid] for GET
5497     *         requests.
5498     */
5499    public String getTargetId() {
5500      return this.targetId == null ? null : this.targetId.getValue();
5501    }
5502
5503    /**
5504     * @param value Id of fixture used for extracting the [id], [type], and [vid]
5505     *              for GET requests.
5506     */
5507    public SetupActionOperationComponent setTargetId(String value) {
5508      if (Utilities.noString(value))
5509        this.targetId = null;
5510      else {
5511        if (this.targetId == null)
5512          this.targetId = new IdType();
5513        this.targetId.setValue(value);
5514      }
5515      return this;
5516    }
5517
5518    /**
5519     * @return {@link #url} (Complete request URL.). This is the underlying object
5520     *         with id, value and extensions. The accessor "getUrl" gives direct
5521     *         access to the value
5522     */
5523    public StringType getUrlElement() {
5524      if (this.url == null)
5525        if (Configuration.errorOnAutoCreate())
5526          throw new Error("Attempt to auto-create SetupActionOperationComponent.url");
5527        else if (Configuration.doAutoCreate())
5528          this.url = new StringType(); // bb
5529      return this.url;
5530    }
5531
5532    public boolean hasUrlElement() {
5533      return this.url != null && !this.url.isEmpty();
5534    }
5535
5536    public boolean hasUrl() {
5537      return this.url != null && !this.url.isEmpty();
5538    }
5539
5540    /**
5541     * @param value {@link #url} (Complete request URL.). This is the underlying
5542     *              object with id, value and extensions. The accessor "getUrl"
5543     *              gives direct access to the value
5544     */
5545    public SetupActionOperationComponent setUrlElement(StringType value) {
5546      this.url = value;
5547      return this;
5548    }
5549
5550    /**
5551     * @return Complete request URL.
5552     */
5553    public String getUrl() {
5554      return this.url == null ? null : this.url.getValue();
5555    }
5556
5557    /**
5558     * @param value Complete request URL.
5559     */
5560    public SetupActionOperationComponent setUrl(String value) {
5561      if (Utilities.noString(value))
5562        this.url = null;
5563      else {
5564        if (this.url == null)
5565          this.url = new StringType();
5566        this.url.setValue(value);
5567      }
5568      return this;
5569    }
5570
5571    protected void listChildren(List<Property> children) {
5572      super.listChildren(children);
5573      children.add(new Property("type", "Coding", "Server interaction or operation type.", 0, 1, type));
5574      children.add(new Property("resource", "code",
5575          "The type of the resource.  See http://build.fhir.org/resourcelist.html.", 0, 1, resource));
5576      children.add(new Property("label", "string",
5577          "The label would be used for tracking/logging purposes by test engines.", 0, 1, label));
5578      children.add(new Property("description", "string",
5579          "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description));
5580      children.add(new Property("accept", "code", "The mime-type to use for RESTful operation in the 'Accept' header.",
5581          0, 1, accept));
5582      children.add(new Property("contentType", "code",
5583          "The mime-type to use for RESTful operation in the 'Content-Type' header.", 0, 1, contentType));
5584      children.add(new Property("destination", "integer",
5585          "The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.",
5586          0, 1, destination));
5587      children.add(new Property("encodeRequestUrl", "boolean",
5588          "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.",
5589          0, 1, encodeRequestUrl));
5590      children.add(new Property("method", "code",
5591          "The HTTP method the test engine MUST use for this operation regardless of any other operation details.", 0,
5592          1, method));
5593      children.add(new Property("origin", "integer",
5594          "The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.",
5595          0, 1, origin));
5596      children.add(new Property("params", "string",
5597          "Path plus parameters after [type].  Used to set parts of the request URL explicitly.", 0, 1, params));
5598      children.add(new Property("requestHeader", "", "Header elements would be used to set HTTP headers.", 0,
5599          java.lang.Integer.MAX_VALUE, requestHeader));
5600      children
5601          .add(new Property("requestId", "id", "The fixture id (maybe new) to map to the request.", 0, 1, requestId));
5602      children.add(
5603          new Property("responseId", "id", "The fixture id (maybe new) to map to the response.", 0, 1, responseId));
5604      children.add(new Property("sourceId", "id", "The id of the fixture used as the body of a PUT or POST request.", 0,
5605          1, sourceId));
5606      children.add(new Property("targetId", "id",
5607          "Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.", 0, 1, targetId));
5608      children.add(new Property("url", "string", "Complete request URL.", 0, 1, url));
5609    }
5610
5611    @Override
5612    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
5613      switch (_hash) {
5614      case 3575610:
5615        /* type */ return new Property("type", "Coding", "Server interaction or operation type.", 0, 1, type);
5616      case -341064690:
5617        /* resource */ return new Property("resource", "code",
5618            "The type of the resource.  See http://build.fhir.org/resourcelist.html.", 0, 1, resource);
5619      case 102727412:
5620        /* label */ return new Property("label", "string",
5621            "The label would be used for tracking/logging purposes by test engines.", 0, 1, label);
5622      case -1724546052:
5623        /* description */ return new Property("description", "string",
5624            "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description);
5625      case -1423461112:
5626        /* accept */ return new Property("accept", "code",
5627            "The mime-type to use for RESTful operation in the 'Accept' header.", 0, 1, accept);
5628      case -389131437:
5629        /* contentType */ return new Property("contentType", "code",
5630            "The mime-type to use for RESTful operation in the 'Content-Type' header.", 0, 1, contentType);
5631      case -1429847026:
5632        /* destination */ return new Property("destination", "integer",
5633            "The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.",
5634            0, 1, destination);
5635      case -1760554218:
5636        /* encodeRequestUrl */ return new Property("encodeRequestUrl", "boolean",
5637            "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.",
5638            0, 1, encodeRequestUrl);
5639      case -1077554975:
5640        /* method */ return new Property("method", "code",
5641            "The HTTP method the test engine MUST use for this operation regardless of any other operation details.", 0,
5642            1, method);
5643      case -1008619738:
5644        /* origin */ return new Property("origin", "integer",
5645            "The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.",
5646            0, 1, origin);
5647      case -995427962:
5648        /* params */ return new Property("params", "string",
5649            "Path plus parameters after [type].  Used to set parts of the request URL explicitly.", 0, 1, params);
5650      case 1074158076:
5651        /* requestHeader */ return new Property("requestHeader", "",
5652            "Header elements would be used to set HTTP headers.", 0, java.lang.Integer.MAX_VALUE, requestHeader);
5653      case 693933066:
5654        /* requestId */ return new Property("requestId", "id", "The fixture id (maybe new) to map to the request.", 0,
5655            1, requestId);
5656      case -633138884:
5657        /* responseId */ return new Property("responseId", "id", "The fixture id (maybe new) to map to the response.",
5658            0, 1, responseId);
5659      case 1746327190:
5660        /* sourceId */ return new Property("sourceId", "id",
5661            "The id of the fixture used as the body of a PUT or POST request.", 0, 1, sourceId);
5662      case -441951604:
5663        /* targetId */ return new Property("targetId", "id",
5664            "Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.", 0, 1, targetId);
5665      case 116079:
5666        /* url */ return new Property("url", "string", "Complete request URL.", 0, 1, url);
5667      default:
5668        return super.getNamedProperty(_hash, _name, _checkValid);
5669      }
5670
5671    }
5672
5673    @Override
5674    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
5675      switch (hash) {
5676      case 3575610:
5677        /* type */ return this.type == null ? new Base[0] : new Base[] { this.type }; // Coding
5678      case -341064690:
5679        /* resource */ return this.resource == null ? new Base[0] : new Base[] { this.resource }; // CodeType
5680      case 102727412:
5681        /* label */ return this.label == null ? new Base[0] : new Base[] { this.label }; // StringType
5682      case -1724546052:
5683        /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // StringType
5684      case -1423461112:
5685        /* accept */ return this.accept == null ? new Base[0] : new Base[] { this.accept }; // CodeType
5686      case -389131437:
5687        /* contentType */ return this.contentType == null ? new Base[0] : new Base[] { this.contentType }; // CodeType
5688      case -1429847026:
5689        /* destination */ return this.destination == null ? new Base[0] : new Base[] { this.destination }; // IntegerType
5690      case -1760554218:
5691        /* encodeRequestUrl */ return this.encodeRequestUrl == null ? new Base[0]
5692            : new Base[] { this.encodeRequestUrl }; // BooleanType
5693      case -1077554975:
5694        /* method */ return this.method == null ? new Base[0] : new Base[] { this.method }; // Enumeration<TestScriptRequestMethodCode>
5695      case -1008619738:
5696        /* origin */ return this.origin == null ? new Base[0] : new Base[] { this.origin }; // IntegerType
5697      case -995427962:
5698        /* params */ return this.params == null ? new Base[0] : new Base[] { this.params }; // StringType
5699      case 1074158076:
5700        /* requestHeader */ return this.requestHeader == null ? new Base[0]
5701            : this.requestHeader.toArray(new Base[this.requestHeader.size()]); // SetupActionOperationRequestHeaderComponent
5702      case 693933066:
5703        /* requestId */ return this.requestId == null ? new Base[0] : new Base[] { this.requestId }; // IdType
5704      case -633138884:
5705        /* responseId */ return this.responseId == null ? new Base[0] : new Base[] { this.responseId }; // IdType
5706      case 1746327190:
5707        /* sourceId */ return this.sourceId == null ? new Base[0] : new Base[] { this.sourceId }; // IdType
5708      case -441951604:
5709        /* targetId */ return this.targetId == null ? new Base[0] : new Base[] { this.targetId }; // IdType
5710      case 116079:
5711        /* url */ return this.url == null ? new Base[0] : new Base[] { this.url }; // StringType
5712      default:
5713        return super.getProperty(hash, name, checkValid);
5714      }
5715
5716    }
5717
5718    @Override
5719    public Base setProperty(int hash, String name, Base value) throws FHIRException {
5720      switch (hash) {
5721      case 3575610: // type
5722        this.type = castToCoding(value); // Coding
5723        return value;
5724      case -341064690: // resource
5725        this.resource = castToCode(value); // CodeType
5726        return value;
5727      case 102727412: // label
5728        this.label = castToString(value); // StringType
5729        return value;
5730      case -1724546052: // description
5731        this.description = castToString(value); // StringType
5732        return value;
5733      case -1423461112: // accept
5734        this.accept = castToCode(value); // CodeType
5735        return value;
5736      case -389131437: // contentType
5737        this.contentType = castToCode(value); // CodeType
5738        return value;
5739      case -1429847026: // destination
5740        this.destination = castToInteger(value); // IntegerType
5741        return value;
5742      case -1760554218: // encodeRequestUrl
5743        this.encodeRequestUrl = castToBoolean(value); // BooleanType
5744        return value;
5745      case -1077554975: // method
5746        value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value));
5747        this.method = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode>
5748        return value;
5749      case -1008619738: // origin
5750        this.origin = castToInteger(value); // IntegerType
5751        return value;
5752      case -995427962: // params
5753        this.params = castToString(value); // StringType
5754        return value;
5755      case 1074158076: // requestHeader
5756        this.getRequestHeader().add((SetupActionOperationRequestHeaderComponent) value); // SetupActionOperationRequestHeaderComponent
5757        return value;
5758      case 693933066: // requestId
5759        this.requestId = castToId(value); // IdType
5760        return value;
5761      case -633138884: // responseId
5762        this.responseId = castToId(value); // IdType
5763        return value;
5764      case 1746327190: // sourceId
5765        this.sourceId = castToId(value); // IdType
5766        return value;
5767      case -441951604: // targetId
5768        this.targetId = castToId(value); // IdType
5769        return value;
5770      case 116079: // url
5771        this.url = castToString(value); // StringType
5772        return value;
5773      default:
5774        return super.setProperty(hash, name, value);
5775      }
5776
5777    }
5778
5779    @Override
5780    public Base setProperty(String name, Base value) throws FHIRException {
5781      if (name.equals("type")) {
5782        this.type = castToCoding(value); // Coding
5783      } else if (name.equals("resource")) {
5784        this.resource = castToCode(value); // CodeType
5785      } else if (name.equals("label")) {
5786        this.label = castToString(value); // StringType
5787      } else if (name.equals("description")) {
5788        this.description = castToString(value); // StringType
5789      } else if (name.equals("accept")) {
5790        this.accept = castToCode(value); // CodeType
5791      } else if (name.equals("contentType")) {
5792        this.contentType = castToCode(value); // CodeType
5793      } else if (name.equals("destination")) {
5794        this.destination = castToInteger(value); // IntegerType
5795      } else if (name.equals("encodeRequestUrl")) {
5796        this.encodeRequestUrl = castToBoolean(value); // BooleanType
5797      } else if (name.equals("method")) {
5798        value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value));
5799        this.method = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode>
5800      } else if (name.equals("origin")) {
5801        this.origin = castToInteger(value); // IntegerType
5802      } else if (name.equals("params")) {
5803        this.params = castToString(value); // StringType
5804      } else if (name.equals("requestHeader")) {
5805        this.getRequestHeader().add((SetupActionOperationRequestHeaderComponent) value);
5806      } else if (name.equals("requestId")) {
5807        this.requestId = castToId(value); // IdType
5808      } else if (name.equals("responseId")) {
5809        this.responseId = castToId(value); // IdType
5810      } else if (name.equals("sourceId")) {
5811        this.sourceId = castToId(value); // IdType
5812      } else if (name.equals("targetId")) {
5813        this.targetId = castToId(value); // IdType
5814      } else if (name.equals("url")) {
5815        this.url = castToString(value); // StringType
5816      } else
5817        return super.setProperty(name, value);
5818      return value;
5819    }
5820
5821    @Override
5822    public Base makeProperty(int hash, String name) throws FHIRException {
5823      switch (hash) {
5824      case 3575610:
5825        return getType();
5826      case -341064690:
5827        return getResourceElement();
5828      case 102727412:
5829        return getLabelElement();
5830      case -1724546052:
5831        return getDescriptionElement();
5832      case -1423461112:
5833        return getAcceptElement();
5834      case -389131437:
5835        return getContentTypeElement();
5836      case -1429847026:
5837        return getDestinationElement();
5838      case -1760554218:
5839        return getEncodeRequestUrlElement();
5840      case -1077554975:
5841        return getMethodElement();
5842      case -1008619738:
5843        return getOriginElement();
5844      case -995427962:
5845        return getParamsElement();
5846      case 1074158076:
5847        return addRequestHeader();
5848      case 693933066:
5849        return getRequestIdElement();
5850      case -633138884:
5851        return getResponseIdElement();
5852      case 1746327190:
5853        return getSourceIdElement();
5854      case -441951604:
5855        return getTargetIdElement();
5856      case 116079:
5857        return getUrlElement();
5858      default:
5859        return super.makeProperty(hash, name);
5860      }
5861
5862    }
5863
5864    @Override
5865    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
5866      switch (hash) {
5867      case 3575610:
5868        /* type */ return new String[] { "Coding" };
5869      case -341064690:
5870        /* resource */ return new String[] { "code" };
5871      case 102727412:
5872        /* label */ return new String[] { "string" };
5873      case -1724546052:
5874        /* description */ return new String[] { "string" };
5875      case -1423461112:
5876        /* accept */ return new String[] { "code" };
5877      case -389131437:
5878        /* contentType */ return new String[] { "code" };
5879      case -1429847026:
5880        /* destination */ return new String[] { "integer" };
5881      case -1760554218:
5882        /* encodeRequestUrl */ return new String[] { "boolean" };
5883      case -1077554975:
5884        /* method */ return new String[] { "code" };
5885      case -1008619738:
5886        /* origin */ return new String[] { "integer" };
5887      case -995427962:
5888        /* params */ return new String[] { "string" };
5889      case 1074158076:
5890        /* requestHeader */ return new String[] {};
5891      case 693933066:
5892        /* requestId */ return new String[] { "id" };
5893      case -633138884:
5894        /* responseId */ return new String[] { "id" };
5895      case 1746327190:
5896        /* sourceId */ return new String[] { "id" };
5897      case -441951604:
5898        /* targetId */ return new String[] { "id" };
5899      case 116079:
5900        /* url */ return new String[] { "string" };
5901      default:
5902        return super.getTypesForProperty(hash, name);
5903      }
5904
5905    }
5906
5907    @Override
5908    public Base addChild(String name) throws FHIRException {
5909      if (name.equals("type")) {
5910        this.type = new Coding();
5911        return this.type;
5912      } else if (name.equals("resource")) {
5913        throw new FHIRException("Cannot call addChild on a singleton property TestScript.resource");
5914      } else if (name.equals("label")) {
5915        throw new FHIRException("Cannot call addChild on a singleton property TestScript.label");
5916      } else if (name.equals("description")) {
5917        throw new FHIRException("Cannot call addChild on a singleton property TestScript.description");
5918      } else if (name.equals("accept")) {
5919        throw new FHIRException("Cannot call addChild on a singleton property TestScript.accept");
5920      } else if (name.equals("contentType")) {
5921        throw new FHIRException("Cannot call addChild on a singleton property TestScript.contentType");
5922      } else if (name.equals("destination")) {
5923        throw new FHIRException("Cannot call addChild on a singleton property TestScript.destination");
5924      } else if (name.equals("encodeRequestUrl")) {
5925        throw new FHIRException("Cannot call addChild on a singleton property TestScript.encodeRequestUrl");
5926      } else if (name.equals("method")) {
5927        throw new FHIRException("Cannot call addChild on a singleton property TestScript.method");
5928      } else if (name.equals("origin")) {
5929        throw new FHIRException("Cannot call addChild on a singleton property TestScript.origin");
5930      } else if (name.equals("params")) {
5931        throw new FHIRException("Cannot call addChild on a singleton property TestScript.params");
5932      } else if (name.equals("requestHeader")) {
5933        return addRequestHeader();
5934      } else if (name.equals("requestId")) {
5935        throw new FHIRException("Cannot call addChild on a singleton property TestScript.requestId");
5936      } else if (name.equals("responseId")) {
5937        throw new FHIRException("Cannot call addChild on a singleton property TestScript.responseId");
5938      } else if (name.equals("sourceId")) {
5939        throw new FHIRException("Cannot call addChild on a singleton property TestScript.sourceId");
5940      } else if (name.equals("targetId")) {
5941        throw new FHIRException("Cannot call addChild on a singleton property TestScript.targetId");
5942      } else if (name.equals("url")) {
5943        throw new FHIRException("Cannot call addChild on a singleton property TestScript.url");
5944      } else
5945        return super.addChild(name);
5946    }
5947
5948    public SetupActionOperationComponent copy() {
5949      SetupActionOperationComponent dst = new SetupActionOperationComponent();
5950      copyValues(dst);
5951      return dst;
5952    }
5953
5954    public void copyValues(SetupActionOperationComponent dst) {
5955      super.copyValues(dst);
5956      dst.type = type == null ? null : type.copy();
5957      dst.resource = resource == null ? null : resource.copy();
5958      dst.label = label == null ? null : label.copy();
5959      dst.description = description == null ? null : description.copy();
5960      dst.accept = accept == null ? null : accept.copy();
5961      dst.contentType = contentType == null ? null : contentType.copy();
5962      dst.destination = destination == null ? null : destination.copy();
5963      dst.encodeRequestUrl = encodeRequestUrl == null ? null : encodeRequestUrl.copy();
5964      dst.method = method == null ? null : method.copy();
5965      dst.origin = origin == null ? null : origin.copy();
5966      dst.params = params == null ? null : params.copy();
5967      if (requestHeader != null) {
5968        dst.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
5969        for (SetupActionOperationRequestHeaderComponent i : requestHeader)
5970          dst.requestHeader.add(i.copy());
5971      }
5972      ;
5973      dst.requestId = requestId == null ? null : requestId.copy();
5974      dst.responseId = responseId == null ? null : responseId.copy();
5975      dst.sourceId = sourceId == null ? null : sourceId.copy();
5976      dst.targetId = targetId == null ? null : targetId.copy();
5977      dst.url = url == null ? null : url.copy();
5978    }
5979
5980    @Override
5981    public boolean equalsDeep(Base other_) {
5982      if (!super.equalsDeep(other_))
5983        return false;
5984      if (!(other_ instanceof SetupActionOperationComponent))
5985        return false;
5986      SetupActionOperationComponent o = (SetupActionOperationComponent) other_;
5987      return compareDeep(type, o.type, true) && compareDeep(resource, o.resource, true)
5988          && compareDeep(label, o.label, true) && compareDeep(description, o.description, true)
5989          && compareDeep(accept, o.accept, true) && compareDeep(contentType, o.contentType, true)
5990          && compareDeep(destination, o.destination, true) && compareDeep(encodeRequestUrl, o.encodeRequestUrl, true)
5991          && compareDeep(method, o.method, true) && compareDeep(origin, o.origin, true)
5992          && compareDeep(params, o.params, true) && compareDeep(requestHeader, o.requestHeader, true)
5993          && compareDeep(requestId, o.requestId, true) && compareDeep(responseId, o.responseId, true)
5994          && compareDeep(sourceId, o.sourceId, true) && compareDeep(targetId, o.targetId, true)
5995          && compareDeep(url, o.url, true);
5996    }
5997
5998    @Override
5999    public boolean equalsShallow(Base other_) {
6000      if (!super.equalsShallow(other_))
6001        return false;
6002      if (!(other_ instanceof SetupActionOperationComponent))
6003        return false;
6004      SetupActionOperationComponent o = (SetupActionOperationComponent) other_;
6005      return compareValues(resource, o.resource, true) && compareValues(label, o.label, true)
6006          && compareValues(description, o.description, true) && compareValues(accept, o.accept, true)
6007          && compareValues(contentType, o.contentType, true) && compareValues(destination, o.destination, true)
6008          && compareValues(encodeRequestUrl, o.encodeRequestUrl, true) && compareValues(method, o.method, true)
6009          && compareValues(origin, o.origin, true) && compareValues(params, o.params, true)
6010          && compareValues(requestId, o.requestId, true) && compareValues(responseId, o.responseId, true)
6011          && compareValues(sourceId, o.sourceId, true) && compareValues(targetId, o.targetId, true)
6012          && compareValues(url, o.url, true);
6013    }
6014
6015    public boolean isEmpty() {
6016      return super.isEmpty()
6017          && ca.uhn.fhir.util.ElementUtil.isEmpty(type, resource, label, description, accept, contentType, destination,
6018              encodeRequestUrl, method, origin, params, requestHeader, requestId, responseId, sourceId, targetId, url);
6019    }
6020
6021    public String fhirType() {
6022      return "TestScript.setup.action.operation";
6023
6024    }
6025
6026  }
6027
6028  @Block()
6029  public static class SetupActionOperationRequestHeaderComponent extends BackboneElement
6030      implements IBaseBackboneElement {
6031    /**
6032     * The HTTP header field e.g. "Accept".
6033     */
6034    @Child(name = "field", type = { StringType.class }, order = 1, min = 1, max = 1, modifier = false, summary = false)
6035    @Description(shortDefinition = "HTTP header field name", formalDefinition = "The HTTP header field e.g. \"Accept\".")
6036    protected StringType field;
6037
6038    /**
6039     * The value of the header e.g. "application/fhir+xml".
6040     */
6041    @Child(name = "value", type = { StringType.class }, order = 2, min = 1, max = 1, modifier = false, summary = false)
6042    @Description(shortDefinition = "HTTP headerfield value", formalDefinition = "The value of the header e.g. \"application/fhir+xml\".")
6043    protected StringType value;
6044
6045    private static final long serialVersionUID = 274395337L;
6046
6047    /**
6048     * Constructor
6049     */
6050    public SetupActionOperationRequestHeaderComponent() {
6051      super();
6052    }
6053
6054    /**
6055     * Constructor
6056     */
6057    public SetupActionOperationRequestHeaderComponent(StringType field, StringType value) {
6058      super();
6059      this.field = field;
6060      this.value = value;
6061    }
6062
6063    /**
6064     * @return {@link #field} (The HTTP header field e.g. "Accept".). This is the
6065     *         underlying object with id, value and extensions. The accessor
6066     *         "getField" gives direct access to the value
6067     */
6068    public StringType getFieldElement() {
6069      if (this.field == null)
6070        if (Configuration.errorOnAutoCreate())
6071          throw new Error("Attempt to auto-create SetupActionOperationRequestHeaderComponent.field");
6072        else if (Configuration.doAutoCreate())
6073          this.field = new StringType(); // bb
6074      return this.field;
6075    }
6076
6077    public boolean hasFieldElement() {
6078      return this.field != null && !this.field.isEmpty();
6079    }
6080
6081    public boolean hasField() {
6082      return this.field != null && !this.field.isEmpty();
6083    }
6084
6085    /**
6086     * @param value {@link #field} (The HTTP header field e.g. "Accept".). This is
6087     *              the underlying object with id, value and extensions. The
6088     *              accessor "getField" gives direct access to the value
6089     */
6090    public SetupActionOperationRequestHeaderComponent setFieldElement(StringType value) {
6091      this.field = value;
6092      return this;
6093    }
6094
6095    /**
6096     * @return The HTTP header field e.g. "Accept".
6097     */
6098    public String getField() {
6099      return this.field == null ? null : this.field.getValue();
6100    }
6101
6102    /**
6103     * @param value The HTTP header field e.g. "Accept".
6104     */
6105    public SetupActionOperationRequestHeaderComponent setField(String value) {
6106      if (this.field == null)
6107        this.field = new StringType();
6108      this.field.setValue(value);
6109      return this;
6110    }
6111
6112    /**
6113     * @return {@link #value} (The value of the header e.g.
6114     *         "application/fhir+xml".). This is the underlying object with id,
6115     *         value and extensions. The accessor "getValue" gives direct access to
6116     *         the value
6117     */
6118    public StringType getValueElement() {
6119      if (this.value == null)
6120        if (Configuration.errorOnAutoCreate())
6121          throw new Error("Attempt to auto-create SetupActionOperationRequestHeaderComponent.value");
6122        else if (Configuration.doAutoCreate())
6123          this.value = new StringType(); // bb
6124      return this.value;
6125    }
6126
6127    public boolean hasValueElement() {
6128      return this.value != null && !this.value.isEmpty();
6129    }
6130
6131    public boolean hasValue() {
6132      return this.value != null && !this.value.isEmpty();
6133    }
6134
6135    /**
6136     * @param value {@link #value} (The value of the header e.g.
6137     *              "application/fhir+xml".). This is the underlying object with id,
6138     *              value and extensions. The accessor "getValue" gives direct
6139     *              access to the value
6140     */
6141    public SetupActionOperationRequestHeaderComponent setValueElement(StringType value) {
6142      this.value = value;
6143      return this;
6144    }
6145
6146    /**
6147     * @return The value of the header e.g. "application/fhir+xml".
6148     */
6149    public String getValue() {
6150      return this.value == null ? null : this.value.getValue();
6151    }
6152
6153    /**
6154     * @param value The value of the header e.g. "application/fhir+xml".
6155     */
6156    public SetupActionOperationRequestHeaderComponent setValue(String value) {
6157      if (this.value == null)
6158        this.value = new StringType();
6159      this.value.setValue(value);
6160      return this;
6161    }
6162
6163    protected void listChildren(List<Property> children) {
6164      super.listChildren(children);
6165      children.add(new Property("field", "string", "The HTTP header field e.g. \"Accept\".", 0, 1, field));
6166      children
6167          .add(new Property("value", "string", "The value of the header e.g. \"application/fhir+xml\".", 0, 1, value));
6168    }
6169
6170    @Override
6171    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
6172      switch (_hash) {
6173      case 97427706:
6174        /* field */ return new Property("field", "string", "The HTTP header field e.g. \"Accept\".", 0, 1, field);
6175      case 111972721:
6176        /* value */ return new Property("value", "string", "The value of the header e.g. \"application/fhir+xml\".", 0,
6177            1, value);
6178      default:
6179        return super.getNamedProperty(_hash, _name, _checkValid);
6180      }
6181
6182    }
6183
6184    @Override
6185    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
6186      switch (hash) {
6187      case 97427706:
6188        /* field */ return this.field == null ? new Base[0] : new Base[] { this.field }; // StringType
6189      case 111972721:
6190        /* value */ return this.value == null ? new Base[0] : new Base[] { this.value }; // StringType
6191      default:
6192        return super.getProperty(hash, name, checkValid);
6193      }
6194
6195    }
6196
6197    @Override
6198    public Base setProperty(int hash, String name, Base value) throws FHIRException {
6199      switch (hash) {
6200      case 97427706: // field
6201        this.field = castToString(value); // StringType
6202        return value;
6203      case 111972721: // value
6204        this.value = castToString(value); // StringType
6205        return value;
6206      default:
6207        return super.setProperty(hash, name, value);
6208      }
6209
6210    }
6211
6212    @Override
6213    public Base setProperty(String name, Base value) throws FHIRException {
6214      if (name.equals("field")) {
6215        this.field = castToString(value); // StringType
6216      } else if (name.equals("value")) {
6217        this.value = castToString(value); // StringType
6218      } else
6219        return super.setProperty(name, value);
6220      return value;
6221    }
6222
6223    @Override
6224    public Base makeProperty(int hash, String name) throws FHIRException {
6225      switch (hash) {
6226      case 97427706:
6227        return getFieldElement();
6228      case 111972721:
6229        return getValueElement();
6230      default:
6231        return super.makeProperty(hash, name);
6232      }
6233
6234    }
6235
6236    @Override
6237    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
6238      switch (hash) {
6239      case 97427706:
6240        /* field */ return new String[] { "string" };
6241      case 111972721:
6242        /* value */ return new String[] { "string" };
6243      default:
6244        return super.getTypesForProperty(hash, name);
6245      }
6246
6247    }
6248
6249    @Override
6250    public Base addChild(String name) throws FHIRException {
6251      if (name.equals("field")) {
6252        throw new FHIRException("Cannot call addChild on a singleton property TestScript.field");
6253      } else if (name.equals("value")) {
6254        throw new FHIRException("Cannot call addChild on a singleton property TestScript.value");
6255      } else
6256        return super.addChild(name);
6257    }
6258
6259    public SetupActionOperationRequestHeaderComponent copy() {
6260      SetupActionOperationRequestHeaderComponent dst = new SetupActionOperationRequestHeaderComponent();
6261      copyValues(dst);
6262      return dst;
6263    }
6264
6265    public void copyValues(SetupActionOperationRequestHeaderComponent dst) {
6266      super.copyValues(dst);
6267      dst.field = field == null ? null : field.copy();
6268      dst.value = value == null ? null : value.copy();
6269    }
6270
6271    @Override
6272    public boolean equalsDeep(Base other_) {
6273      if (!super.equalsDeep(other_))
6274        return false;
6275      if (!(other_ instanceof SetupActionOperationRequestHeaderComponent))
6276        return false;
6277      SetupActionOperationRequestHeaderComponent o = (SetupActionOperationRequestHeaderComponent) other_;
6278      return compareDeep(field, o.field, true) && compareDeep(value, o.value, true);
6279    }
6280
6281    @Override
6282    public boolean equalsShallow(Base other_) {
6283      if (!super.equalsShallow(other_))
6284        return false;
6285      if (!(other_ instanceof SetupActionOperationRequestHeaderComponent))
6286        return false;
6287      SetupActionOperationRequestHeaderComponent o = (SetupActionOperationRequestHeaderComponent) other_;
6288      return compareValues(field, o.field, true) && compareValues(value, o.value, true);
6289    }
6290
6291    public boolean isEmpty() {
6292      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(field, value);
6293    }
6294
6295    public String fhirType() {
6296      return "TestScript.setup.action.operation.requestHeader";
6297
6298    }
6299
6300  }
6301
6302  @Block()
6303  public static class SetupActionAssertComponent extends BackboneElement implements IBaseBackboneElement {
6304    /**
6305     * The label would be used for tracking/logging purposes by test engines.
6306     */
6307    @Child(name = "label", type = { StringType.class }, order = 1, min = 0, max = 1, modifier = false, summary = false)
6308    @Description(shortDefinition = "Tracking/logging assertion label", formalDefinition = "The label would be used for tracking/logging purposes by test engines.")
6309    protected StringType label;
6310
6311    /**
6312     * The description would be used by test engines for tracking and reporting
6313     * purposes.
6314     */
6315    @Child(name = "description", type = {
6316        StringType.class }, order = 2, min = 0, max = 1, modifier = false, summary = false)
6317    @Description(shortDefinition = "Tracking/reporting assertion description", formalDefinition = "The description would be used by test engines for tracking and reporting purposes.")
6318    protected StringType description;
6319
6320    /**
6321     * The direction to use for the assertion.
6322     */
6323    @Child(name = "direction", type = {
6324        CodeType.class }, order = 3, min = 0, max = 1, modifier = false, summary = false)
6325    @Description(shortDefinition = "response | request", formalDefinition = "The direction to use for the assertion.")
6326    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/assert-direction-codes")
6327    protected Enumeration<AssertionDirectionType> direction;
6328
6329    /**
6330     * Id of the source fixture used as the contents to be evaluated by either the
6331     * "source/expression" or "sourceId/path" definition.
6332     */
6333    @Child(name = "compareToSourceId", type = {
6334        StringType.class }, order = 4, min = 0, max = 1, modifier = false, summary = false)
6335    @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.")
6336    protected StringType compareToSourceId;
6337
6338    /**
6339     * The FHIRPath expression to evaluate against the source fixture. When
6340     * compareToSourceId is defined, either compareToSourceExpression or
6341     * compareToSourcePath must be defined, but not both.
6342     */
6343    @Child(name = "compareToSourceExpression", type = {
6344        StringType.class }, order = 5, min = 0, max = 1, modifier = false, summary = false)
6345    @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.")
6346    protected StringType compareToSourceExpression;
6347
6348    /**
6349     * XPath or JSONPath expression to evaluate against the source fixture. When
6350     * compareToSourceId is defined, either compareToSourceExpression or
6351     * compareToSourcePath must be defined, but not both.
6352     */
6353    @Child(name = "compareToSourcePath", type = {
6354        StringType.class }, order = 6, min = 0, max = 1, modifier = false, summary = false)
6355    @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.")
6356    protected StringType compareToSourcePath;
6357
6358    /**
6359     * The mime-type contents to compare against the request or response message
6360     * 'Content-Type' header.
6361     */
6362    @Child(name = "contentType", type = {
6363        CodeType.class }, order = 7, min = 0, max = 1, modifier = false, summary = false)
6364    @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.")
6365    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/mimetypes")
6366    protected CodeType contentType;
6367
6368    /**
6369     * The FHIRPath expression to be evaluated against the request or response
6370     * message contents - HTTP headers and payload.
6371     */
6372    @Child(name = "expression", type = {
6373        StringType.class }, order = 8, min = 0, max = 1, modifier = false, summary = false)
6374    @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.")
6375    protected StringType expression;
6376
6377    /**
6378     * The HTTP header field name e.g. 'Location'.
6379     */
6380    @Child(name = "headerField", type = {
6381        StringType.class }, order = 9, min = 0, max = 1, modifier = false, summary = false)
6382    @Description(shortDefinition = "HTTP header field name", formalDefinition = "The HTTP header field name e.g. 'Location'.")
6383    protected StringType headerField;
6384
6385    /**
6386     * The ID of a fixture. Asserts that the response contains at a minimum the
6387     * fixture specified by minimumId.
6388     */
6389    @Child(name = "minimumId", type = {
6390        StringType.class }, order = 10, min = 0, max = 1, modifier = false, summary = false)
6391    @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.")
6392    protected StringType minimumId;
6393
6394    /**
6395     * Whether or not the test execution performs validation on the bundle
6396     * navigation links.
6397     */
6398    @Child(name = "navigationLinks", type = {
6399        BooleanType.class }, order = 11, min = 0, max = 1, modifier = false, summary = false)
6400    @Description(shortDefinition = "Perform validation on navigation links?", formalDefinition = "Whether or not the test execution performs validation on the bundle navigation links.")
6401    protected BooleanType navigationLinks;
6402
6403    /**
6404     * The operator type defines the conditional behavior of the assert. If not
6405     * defined, the default is equals.
6406     */
6407    @Child(name = "operator", type = {
6408        CodeType.class }, order = 12, min = 0, max = 1, modifier = false, summary = false)
6409    @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.")
6410    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/assert-operator-codes")
6411    protected Enumeration<AssertionOperatorType> operator;
6412
6413    /**
6414     * The XPath or JSONPath expression to be evaluated against the fixture
6415     * representing the response received from server.
6416     */
6417    @Child(name = "path", type = { StringType.class }, order = 13, min = 0, max = 1, modifier = false, summary = false)
6418    @Description(shortDefinition = "XPath or JSONPath expression", formalDefinition = "The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.")
6419    protected StringType path;
6420
6421    /**
6422     * The request method or HTTP operation code to compare against that used by the
6423     * client system under test.
6424     */
6425    @Child(name = "requestMethod", type = {
6426        CodeType.class }, order = 14, min = 0, max = 1, modifier = false, summary = false)
6427    @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.")
6428    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/http-operations")
6429    protected Enumeration<TestScriptRequestMethodCode> requestMethod;
6430
6431    /**
6432     * The value to use in a comparison against the request URL path string.
6433     */
6434    @Child(name = "requestURL", type = {
6435        StringType.class }, order = 15, min = 0, max = 1, modifier = false, summary = false)
6436    @Description(shortDefinition = "Request URL comparison value", formalDefinition = "The value to use in a comparison against the request URL path string.")
6437    protected StringType requestURL;
6438
6439    /**
6440     * The type of the resource. See http://build.fhir.org/resourcelist.html.
6441     */
6442    @Child(name = "resource", type = {
6443        CodeType.class }, order = 16, min = 0, max = 1, modifier = false, summary = false)
6444    @Description(shortDefinition = "Resource type", formalDefinition = "The type of the resource.  See http://build.fhir.org/resourcelist.html.")
6445    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/defined-types")
6446    protected CodeType resource;
6447
6448    /**
6449     * okay | created | noContent | notModified | bad | forbidden | notFound |
6450     * methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.
6451     */
6452    @Child(name = "response", type = {
6453        CodeType.class }, order = 17, min = 0, max = 1, modifier = false, summary = false)
6454    @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.")
6455    @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/assert-response-code-types")
6456    protected Enumeration<AssertionResponseTypes> response;
6457
6458    /**
6459     * The value of the HTTP response code to be tested.
6460     */
6461    @Child(name = "responseCode", type = {
6462        StringType.class }, order = 18, min = 0, max = 1, modifier = false, summary = false)
6463    @Description(shortDefinition = "HTTP response code to test", formalDefinition = "The value of the HTTP response code to be tested.")
6464    protected StringType responseCode;
6465
6466    /**
6467     * Fixture to evaluate the XPath/JSONPath expression or the headerField against.
6468     */
6469    @Child(name = "sourceId", type = { IdType.class }, order = 19, min = 0, max = 1, modifier = false, summary = false)
6470    @Description(shortDefinition = "Fixture Id of source expression or headerField", formalDefinition = "Fixture to evaluate the XPath/JSONPath expression or the headerField  against.")
6471    protected IdType sourceId;
6472
6473    /**
6474     * The ID of the Profile to validate against.
6475     */
6476    @Child(name = "validateProfileId", type = {
6477        IdType.class }, order = 20, min = 0, max = 1, modifier = false, summary = false)
6478    @Description(shortDefinition = "Profile Id of validation profile reference", formalDefinition = "The ID of the Profile to validate against.")
6479    protected IdType validateProfileId;
6480
6481    /**
6482     * The value to compare to.
6483     */
6484    @Child(name = "value", type = { StringType.class }, order = 21, min = 0, max = 1, modifier = false, summary = false)
6485    @Description(shortDefinition = "The value to compare to", formalDefinition = "The value to compare to.")
6486    protected StringType value;
6487
6488    /**
6489     * Whether or not the test execution will produce a warning only on error for
6490     * this assert.
6491     */
6492    @Child(name = "warningOnly", type = {
6493        BooleanType.class }, order = 22, min = 1, max = 1, modifier = false, summary = false)
6494    @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.")
6495    protected BooleanType warningOnly;
6496
6497    private static final long serialVersionUID = -1086518778L;
6498
6499    /**
6500     * Constructor
6501     */
6502    public SetupActionAssertComponent() {
6503      super();
6504    }
6505
6506    /**
6507     * Constructor
6508     */
6509    public SetupActionAssertComponent(BooleanType warningOnly) {
6510      super();
6511      this.warningOnly = warningOnly;
6512    }
6513
6514    /**
6515     * @return {@link #label} (The label would be used for tracking/logging purposes
6516     *         by test engines.). This is the underlying object with id, value and
6517     *         extensions. The accessor "getLabel" gives direct access to the value
6518     */
6519    public StringType getLabelElement() {
6520      if (this.label == null)
6521        if (Configuration.errorOnAutoCreate())
6522          throw new Error("Attempt to auto-create SetupActionAssertComponent.label");
6523        else if (Configuration.doAutoCreate())
6524          this.label = new StringType(); // bb
6525      return this.label;
6526    }
6527
6528    public boolean hasLabelElement() {
6529      return this.label != null && !this.label.isEmpty();
6530    }
6531
6532    public boolean hasLabel() {
6533      return this.label != null && !this.label.isEmpty();
6534    }
6535
6536    /**
6537     * @param value {@link #label} (The label would be used for tracking/logging
6538     *              purposes by test engines.). This is the underlying object with
6539     *              id, value and extensions. The accessor "getLabel" gives direct
6540     *              access to the value
6541     */
6542    public SetupActionAssertComponent setLabelElement(StringType value) {
6543      this.label = value;
6544      return this;
6545    }
6546
6547    /**
6548     * @return The label would be used for tracking/logging purposes by test
6549     *         engines.
6550     */
6551    public String getLabel() {
6552      return this.label == null ? null : this.label.getValue();
6553    }
6554
6555    /**
6556     * @param value The label would be used for tracking/logging purposes by test
6557     *              engines.
6558     */
6559    public SetupActionAssertComponent setLabel(String value) {
6560      if (Utilities.noString(value))
6561        this.label = null;
6562      else {
6563        if (this.label == null)
6564          this.label = new StringType();
6565        this.label.setValue(value);
6566      }
6567      return this;
6568    }
6569
6570    /**
6571     * @return {@link #description} (The description would be used by test engines
6572     *         for tracking and reporting purposes.). This is the underlying object
6573     *         with id, value and extensions. The accessor "getDescription" gives
6574     *         direct access to the value
6575     */
6576    public StringType getDescriptionElement() {
6577      if (this.description == null)
6578        if (Configuration.errorOnAutoCreate())
6579          throw new Error("Attempt to auto-create SetupActionAssertComponent.description");
6580        else if (Configuration.doAutoCreate())
6581          this.description = new StringType(); // bb
6582      return this.description;
6583    }
6584
6585    public boolean hasDescriptionElement() {
6586      return this.description != null && !this.description.isEmpty();
6587    }
6588
6589    public boolean hasDescription() {
6590      return this.description != null && !this.description.isEmpty();
6591    }
6592
6593    /**
6594     * @param value {@link #description} (The description would be used by test
6595     *              engines for tracking and reporting purposes.). This is the
6596     *              underlying object with id, value and extensions. The accessor
6597     *              "getDescription" gives direct access to the value
6598     */
6599    public SetupActionAssertComponent setDescriptionElement(StringType value) {
6600      this.description = value;
6601      return this;
6602    }
6603
6604    /**
6605     * @return The description would be used by test engines for tracking and
6606     *         reporting purposes.
6607     */
6608    public String getDescription() {
6609      return this.description == null ? null : this.description.getValue();
6610    }
6611
6612    /**
6613     * @param value The description would be used by test engines for tracking and
6614     *              reporting purposes.
6615     */
6616    public SetupActionAssertComponent setDescription(String value) {
6617      if (Utilities.noString(value))
6618        this.description = null;
6619      else {
6620        if (this.description == null)
6621          this.description = new StringType();
6622        this.description.setValue(value);
6623      }
6624      return this;
6625    }
6626
6627    /**
6628     * @return {@link #direction} (The direction to use for the assertion.). This is
6629     *         the underlying object with id, value and extensions. The accessor
6630     *         "getDirection" gives direct access to the value
6631     */
6632    public Enumeration<AssertionDirectionType> getDirectionElement() {
6633      if (this.direction == null)
6634        if (Configuration.errorOnAutoCreate())
6635          throw new Error("Attempt to auto-create SetupActionAssertComponent.direction");
6636        else if (Configuration.doAutoCreate())
6637          this.direction = new Enumeration<AssertionDirectionType>(new AssertionDirectionTypeEnumFactory()); // bb
6638      return this.direction;
6639    }
6640
6641    public boolean hasDirectionElement() {
6642      return this.direction != null && !this.direction.isEmpty();
6643    }
6644
6645    public boolean hasDirection() {
6646      return this.direction != null && !this.direction.isEmpty();
6647    }
6648
6649    /**
6650     * @param value {@link #direction} (The direction to use for the assertion.).
6651     *              This is the underlying object with id, value and extensions. The
6652     *              accessor "getDirection" gives direct access to the value
6653     */
6654    public SetupActionAssertComponent setDirectionElement(Enumeration<AssertionDirectionType> value) {
6655      this.direction = value;
6656      return this;
6657    }
6658
6659    /**
6660     * @return The direction to use for the assertion.
6661     */
6662    public AssertionDirectionType getDirection() {
6663      return this.direction == null ? null : this.direction.getValue();
6664    }
6665
6666    /**
6667     * @param value The direction to use for the assertion.
6668     */
6669    public SetupActionAssertComponent setDirection(AssertionDirectionType value) {
6670      if (value == null)
6671        this.direction = null;
6672      else {
6673        if (this.direction == null)
6674          this.direction = new Enumeration<AssertionDirectionType>(new AssertionDirectionTypeEnumFactory());
6675        this.direction.setValue(value);
6676      }
6677      return this;
6678    }
6679
6680    /**
6681     * @return {@link #compareToSourceId} (Id of the source fixture used as the
6682     *         contents to be evaluated by either the "source/expression" or
6683     *         "sourceId/path" definition.). This is the underlying object with id,
6684     *         value and extensions. The accessor "getCompareToSourceId" gives
6685     *         direct access to the value
6686     */
6687    public StringType getCompareToSourceIdElement() {
6688      if (this.compareToSourceId == null)
6689        if (Configuration.errorOnAutoCreate())
6690          throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourceId");
6691        else if (Configuration.doAutoCreate())
6692          this.compareToSourceId = new StringType(); // bb
6693      return this.compareToSourceId;
6694    }
6695
6696    public boolean hasCompareToSourceIdElement() {
6697      return this.compareToSourceId != null && !this.compareToSourceId.isEmpty();
6698    }
6699
6700    public boolean hasCompareToSourceId() {
6701      return this.compareToSourceId != null && !this.compareToSourceId.isEmpty();
6702    }
6703
6704    /**
6705     * @param value {@link #compareToSourceId} (Id of the source fixture used as the
6706     *              contents to be evaluated by either the "source/expression" or
6707     *              "sourceId/path" definition.). This is the underlying object with
6708     *              id, value and extensions. The accessor "getCompareToSourceId"
6709     *              gives direct access to the value
6710     */
6711    public SetupActionAssertComponent setCompareToSourceIdElement(StringType value) {
6712      this.compareToSourceId = value;
6713      return this;
6714    }
6715
6716    /**
6717     * @return Id of the source fixture used as the contents to be evaluated by
6718     *         either the "source/expression" or "sourceId/path" definition.
6719     */
6720    public String getCompareToSourceId() {
6721      return this.compareToSourceId == null ? null : this.compareToSourceId.getValue();
6722    }
6723
6724    /**
6725     * @param value Id of the source fixture used as the contents to be evaluated by
6726     *              either the "source/expression" or "sourceId/path" definition.
6727     */
6728    public SetupActionAssertComponent setCompareToSourceId(String value) {
6729      if (Utilities.noString(value))
6730        this.compareToSourceId = null;
6731      else {
6732        if (this.compareToSourceId == null)
6733          this.compareToSourceId = new StringType();
6734        this.compareToSourceId.setValue(value);
6735      }
6736      return this;
6737    }
6738
6739    /**
6740     * @return {@link #compareToSourceExpression} (The FHIRPath expression to
6741     *         evaluate against the source fixture. When compareToSourceId is
6742     *         defined, either compareToSourceExpression or compareToSourcePath must
6743     *         be defined, but not both.). This is the underlying object with id,
6744     *         value and extensions. The accessor "getCompareToSourceExpression"
6745     *         gives direct access to the value
6746     */
6747    public StringType getCompareToSourceExpressionElement() {
6748      if (this.compareToSourceExpression == null)
6749        if (Configuration.errorOnAutoCreate())
6750          throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourceExpression");
6751        else if (Configuration.doAutoCreate())
6752          this.compareToSourceExpression = new StringType(); // bb
6753      return this.compareToSourceExpression;
6754    }
6755
6756    public boolean hasCompareToSourceExpressionElement() {
6757      return this.compareToSourceExpression != null && !this.compareToSourceExpression.isEmpty();
6758    }
6759
6760    public boolean hasCompareToSourceExpression() {
6761      return this.compareToSourceExpression != null && !this.compareToSourceExpression.isEmpty();
6762    }
6763
6764    /**
6765     * @param value {@link #compareToSourceExpression} (The FHIRPath expression to
6766     *              evaluate against the source fixture. When compareToSourceId is
6767     *              defined, either compareToSourceExpression or compareToSourcePath
6768     *              must be defined, but not both.). This is the underlying object
6769     *              with id, value and extensions. The accessor
6770     *              "getCompareToSourceExpression" gives direct access to the value
6771     */
6772    public SetupActionAssertComponent setCompareToSourceExpressionElement(StringType value) {
6773      this.compareToSourceExpression = value;
6774      return this;
6775    }
6776
6777    /**
6778     * @return The FHIRPath expression to evaluate against the source fixture. When
6779     *         compareToSourceId is defined, either compareToSourceExpression or
6780     *         compareToSourcePath must be defined, but not both.
6781     */
6782    public String getCompareToSourceExpression() {
6783      return this.compareToSourceExpression == null ? null : this.compareToSourceExpression.getValue();
6784    }
6785
6786    /**
6787     * @param value The FHIRPath expression to evaluate against the source fixture.
6788     *              When compareToSourceId is defined, either
6789     *              compareToSourceExpression or compareToSourcePath must be
6790     *              defined, but not both.
6791     */
6792    public SetupActionAssertComponent setCompareToSourceExpression(String value) {
6793      if (Utilities.noString(value))
6794        this.compareToSourceExpression = null;
6795      else {
6796        if (this.compareToSourceExpression == null)
6797          this.compareToSourceExpression = new StringType();
6798        this.compareToSourceExpression.setValue(value);
6799      }
6800      return this;
6801    }
6802
6803    /**
6804     * @return {@link #compareToSourcePath} (XPath or JSONPath expression to
6805     *         evaluate against the source fixture. When compareToSourceId is
6806     *         defined, either compareToSourceExpression or compareToSourcePath must
6807     *         be defined, but not both.). This is the underlying object with id,
6808     *         value and extensions. The accessor "getCompareToSourcePath" gives
6809     *         direct access to the value
6810     */
6811    public StringType getCompareToSourcePathElement() {
6812      if (this.compareToSourcePath == null)
6813        if (Configuration.errorOnAutoCreate())
6814          throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourcePath");
6815        else if (Configuration.doAutoCreate())
6816          this.compareToSourcePath = new StringType(); // bb
6817      return this.compareToSourcePath;
6818    }
6819
6820    public boolean hasCompareToSourcePathElement() {
6821      return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty();
6822    }
6823
6824    public boolean hasCompareToSourcePath() {
6825      return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty();
6826    }
6827
6828    /**
6829     * @param value {@link #compareToSourcePath} (XPath or JSONPath expression to
6830     *              evaluate against the source fixture. When compareToSourceId is
6831     *              defined, either compareToSourceExpression or compareToSourcePath
6832     *              must be defined, but not both.). This is the underlying object
6833     *              with id, value and extensions. The accessor
6834     *              "getCompareToSourcePath" gives direct access to the value
6835     */
6836    public SetupActionAssertComponent setCompareToSourcePathElement(StringType value) {
6837      this.compareToSourcePath = value;
6838      return this;
6839    }
6840
6841    /**
6842     * @return XPath or JSONPath expression to evaluate against the source fixture.
6843     *         When compareToSourceId is defined, either compareToSourceExpression
6844     *         or compareToSourcePath must be defined, but not both.
6845     */
6846    public String getCompareToSourcePath() {
6847      return this.compareToSourcePath == null ? null : this.compareToSourcePath.getValue();
6848    }
6849
6850    /**
6851     * @param value XPath or JSONPath expression to evaluate against the source
6852     *              fixture. When compareToSourceId is defined, either
6853     *              compareToSourceExpression or compareToSourcePath must be
6854     *              defined, but not both.
6855     */
6856    public SetupActionAssertComponent setCompareToSourcePath(String value) {
6857      if (Utilities.noString(value))
6858        this.compareToSourcePath = null;
6859      else {
6860        if (this.compareToSourcePath == null)
6861          this.compareToSourcePath = new StringType();
6862        this.compareToSourcePath.setValue(value);
6863      }
6864      return this;
6865    }
6866
6867    /**
6868     * @return {@link #contentType} (The mime-type contents to compare against the
6869     *         request or response message 'Content-Type' header.). This is the
6870     *         underlying object with id, value and extensions. The accessor
6871     *         "getContentType" gives direct access to the value
6872     */
6873    public CodeType getContentTypeElement() {
6874      if (this.contentType == null)
6875        if (Configuration.errorOnAutoCreate())
6876          throw new Error("Attempt to auto-create SetupActionAssertComponent.contentType");
6877        else if (Configuration.doAutoCreate())
6878          this.contentType = new CodeType(); // bb
6879      return this.contentType;
6880    }
6881
6882    public boolean hasContentTypeElement() {
6883      return this.contentType != null && !this.contentType.isEmpty();
6884    }
6885
6886    public boolean hasContentType() {
6887      return this.contentType != null && !this.contentType.isEmpty();
6888    }
6889
6890    /**
6891     * @param value {@link #contentType} (The mime-type contents to compare against
6892     *              the request or response message 'Content-Type' header.). This is
6893     *              the underlying object with id, value and extensions. The
6894     *              accessor "getContentType" gives direct access to the value
6895     */
6896    public SetupActionAssertComponent setContentTypeElement(CodeType value) {
6897      this.contentType = value;
6898      return this;
6899    }
6900
6901    /**
6902     * @return The mime-type contents to compare against the request or response
6903     *         message 'Content-Type' header.
6904     */
6905    public String getContentType() {
6906      return this.contentType == null ? null : this.contentType.getValue();
6907    }
6908
6909    /**
6910     * @param value The mime-type contents to compare against the request or
6911     *              response message 'Content-Type' header.
6912     */
6913    public SetupActionAssertComponent setContentType(String value) {
6914      if (Utilities.noString(value))
6915        this.contentType = null;
6916      else {
6917        if (this.contentType == null)
6918          this.contentType = new CodeType();
6919        this.contentType.setValue(value);
6920      }
6921      return this;
6922    }
6923
6924    /**
6925     * @return {@link #expression} (The FHIRPath expression to be evaluated against
6926     *         the request or response message contents - HTTP headers and
6927     *         payload.). This is the underlying object with id, value and
6928     *         extensions. The accessor "getExpression" gives direct access to the
6929     *         value
6930     */
6931    public StringType getExpressionElement() {
6932      if (this.expression == null)
6933        if (Configuration.errorOnAutoCreate())
6934          throw new Error("Attempt to auto-create SetupActionAssertComponent.expression");
6935        else if (Configuration.doAutoCreate())
6936          this.expression = new StringType(); // bb
6937      return this.expression;
6938    }
6939
6940    public boolean hasExpressionElement() {
6941      return this.expression != null && !this.expression.isEmpty();
6942    }
6943
6944    public boolean hasExpression() {
6945      return this.expression != null && !this.expression.isEmpty();
6946    }
6947
6948    /**
6949     * @param value {@link #expression} (The FHIRPath expression to be evaluated
6950     *              against the request or response message contents - HTTP headers
6951     *              and payload.). This is the underlying object with id, value and
6952     *              extensions. The accessor "getExpression" gives direct access to
6953     *              the value
6954     */
6955    public SetupActionAssertComponent setExpressionElement(StringType value) {
6956      this.expression = value;
6957      return this;
6958    }
6959
6960    /**
6961     * @return The FHIRPath expression to be evaluated against the request or
6962     *         response message contents - HTTP headers and payload.
6963     */
6964    public String getExpression() {
6965      return this.expression == null ? null : this.expression.getValue();
6966    }
6967
6968    /**
6969     * @param value The FHIRPath expression to be evaluated against the request or
6970     *              response message contents - HTTP headers and payload.
6971     */
6972    public SetupActionAssertComponent setExpression(String value) {
6973      if (Utilities.noString(value))
6974        this.expression = null;
6975      else {
6976        if (this.expression == null)
6977          this.expression = new StringType();
6978        this.expression.setValue(value);
6979      }
6980      return this;
6981    }
6982
6983    /**
6984     * @return {@link #headerField} (The HTTP header field name e.g. 'Location'.).
6985     *         This is the underlying object with id, value and extensions. The
6986     *         accessor "getHeaderField" gives direct access to the value
6987     */
6988    public StringType getHeaderFieldElement() {
6989      if (this.headerField == null)
6990        if (Configuration.errorOnAutoCreate())
6991          throw new Error("Attempt to auto-create SetupActionAssertComponent.headerField");
6992        else if (Configuration.doAutoCreate())
6993          this.headerField = new StringType(); // bb
6994      return this.headerField;
6995    }
6996
6997    public boolean hasHeaderFieldElement() {
6998      return this.headerField != null && !this.headerField.isEmpty();
6999    }
7000
7001    public boolean hasHeaderField() {
7002      return this.headerField != null && !this.headerField.isEmpty();
7003    }
7004
7005    /**
7006     * @param value {@link #headerField} (The HTTP header field name e.g.
7007     *              'Location'.). This is the underlying object with id, value and
7008     *              extensions. The accessor "getHeaderField" gives direct access to
7009     *              the value
7010     */
7011    public SetupActionAssertComponent setHeaderFieldElement(StringType value) {
7012      this.headerField = value;
7013      return this;
7014    }
7015
7016    /**
7017     * @return The HTTP header field name e.g. 'Location'.
7018     */
7019    public String getHeaderField() {
7020      return this.headerField == null ? null : this.headerField.getValue();
7021    }
7022
7023    /**
7024     * @param value The HTTP header field name e.g. 'Location'.
7025     */
7026    public SetupActionAssertComponent setHeaderField(String value) {
7027      if (Utilities.noString(value))
7028        this.headerField = null;
7029      else {
7030        if (this.headerField == null)
7031          this.headerField = new StringType();
7032        this.headerField.setValue(value);
7033      }
7034      return this;
7035    }
7036
7037    /**
7038     * @return {@link #minimumId} (The ID of a fixture. Asserts that the response
7039     *         contains at a minimum the fixture specified by minimumId.). This is
7040     *         the underlying object with id, value and extensions. The accessor
7041     *         "getMinimumId" gives direct access to the value
7042     */
7043    public StringType getMinimumIdElement() {
7044      if (this.minimumId == null)
7045        if (Configuration.errorOnAutoCreate())
7046          throw new Error("Attempt to auto-create SetupActionAssertComponent.minimumId");
7047        else if (Configuration.doAutoCreate())
7048          this.minimumId = new StringType(); // bb
7049      return this.minimumId;
7050    }
7051
7052    public boolean hasMinimumIdElement() {
7053      return this.minimumId != null && !this.minimumId.isEmpty();
7054    }
7055
7056    public boolean hasMinimumId() {
7057      return this.minimumId != null && !this.minimumId.isEmpty();
7058    }
7059
7060    /**
7061     * @param value {@link #minimumId} (The ID of a fixture. Asserts that the
7062     *              response contains at a minimum the fixture specified by
7063     *              minimumId.). This is the underlying object with id, value and
7064     *              extensions. The accessor "getMinimumId" gives direct access to
7065     *              the value
7066     */
7067    public SetupActionAssertComponent setMinimumIdElement(StringType value) {
7068      this.minimumId = value;
7069      return this;
7070    }
7071
7072    /**
7073     * @return The ID of a fixture. Asserts that the response contains at a minimum
7074     *         the fixture specified by minimumId.
7075     */
7076    public String getMinimumId() {
7077      return this.minimumId == null ? null : this.minimumId.getValue();
7078    }
7079
7080    /**
7081     * @param value The ID of a fixture. Asserts that the response contains at a
7082     *              minimum the fixture specified by minimumId.
7083     */
7084    public SetupActionAssertComponent setMinimumId(String value) {
7085      if (Utilities.noString(value))
7086        this.minimumId = null;
7087      else {
7088        if (this.minimumId == null)
7089          this.minimumId = new StringType();
7090        this.minimumId.setValue(value);
7091      }
7092      return this;
7093    }
7094
7095    /**
7096     * @return {@link #navigationLinks} (Whether or not the test execution performs
7097     *         validation on the bundle navigation links.). This is the underlying
7098     *         object with id, value and extensions. The accessor
7099     *         "getNavigationLinks" gives direct access to the value
7100     */
7101    public BooleanType getNavigationLinksElement() {
7102      if (this.navigationLinks == null)
7103        if (Configuration.errorOnAutoCreate())
7104          throw new Error("Attempt to auto-create SetupActionAssertComponent.navigationLinks");
7105        else if (Configuration.doAutoCreate())
7106          this.navigationLinks = new BooleanType(); // bb
7107      return this.navigationLinks;
7108    }
7109
7110    public boolean hasNavigationLinksElement() {
7111      return this.navigationLinks != null && !this.navigationLinks.isEmpty();
7112    }
7113
7114    public boolean hasNavigationLinks() {
7115      return this.navigationLinks != null && !this.navigationLinks.isEmpty();
7116    }
7117
7118    /**
7119     * @param value {@link #navigationLinks} (Whether or not the test execution
7120     *              performs validation on the bundle navigation links.). This is
7121     *              the underlying object with id, value and extensions. The
7122     *              accessor "getNavigationLinks" gives direct access to the value
7123     */
7124    public SetupActionAssertComponent setNavigationLinksElement(BooleanType value) {
7125      this.navigationLinks = value;
7126      return this;
7127    }
7128
7129    /**
7130     * @return Whether or not the test execution performs validation on the bundle
7131     *         navigation links.
7132     */
7133    public boolean getNavigationLinks() {
7134      return this.navigationLinks == null || this.navigationLinks.isEmpty() ? false : this.navigationLinks.getValue();
7135    }
7136
7137    /**
7138     * @param value Whether or not the test execution performs validation on the
7139     *              bundle navigation links.
7140     */
7141    public SetupActionAssertComponent setNavigationLinks(boolean value) {
7142      if (this.navigationLinks == null)
7143        this.navigationLinks = new BooleanType();
7144      this.navigationLinks.setValue(value);
7145      return this;
7146    }
7147
7148    /**
7149     * @return {@link #operator} (The operator type defines the conditional behavior
7150     *         of the assert. If not defined, the default is equals.). This is the
7151     *         underlying object with id, value and extensions. The accessor
7152     *         "getOperator" gives direct access to the value
7153     */
7154    public Enumeration<AssertionOperatorType> getOperatorElement() {
7155      if (this.operator == null)
7156        if (Configuration.errorOnAutoCreate())
7157          throw new Error("Attempt to auto-create SetupActionAssertComponent.operator");
7158        else if (Configuration.doAutoCreate())
7159          this.operator = new Enumeration<AssertionOperatorType>(new AssertionOperatorTypeEnumFactory()); // bb
7160      return this.operator;
7161    }
7162
7163    public boolean hasOperatorElement() {
7164      return this.operator != null && !this.operator.isEmpty();
7165    }
7166
7167    public boolean hasOperator() {
7168      return this.operator != null && !this.operator.isEmpty();
7169    }
7170
7171    /**
7172     * @param value {@link #operator} (The operator type defines the conditional
7173     *              behavior of the assert. If not defined, the default is equals.).
7174     *              This is the underlying object with id, value and extensions. The
7175     *              accessor "getOperator" gives direct access to the value
7176     */
7177    public SetupActionAssertComponent setOperatorElement(Enumeration<AssertionOperatorType> value) {
7178      this.operator = value;
7179      return this;
7180    }
7181
7182    /**
7183     * @return The operator type defines the conditional behavior of the assert. If
7184     *         not defined, the default is equals.
7185     */
7186    public AssertionOperatorType getOperator() {
7187      return this.operator == null ? null : this.operator.getValue();
7188    }
7189
7190    /**
7191     * @param value The operator type defines the conditional behavior of the
7192     *              assert. If not defined, the default is equals.
7193     */
7194    public SetupActionAssertComponent setOperator(AssertionOperatorType value) {
7195      if (value == null)
7196        this.operator = null;
7197      else {
7198        if (this.operator == null)
7199          this.operator = new Enumeration<AssertionOperatorType>(new AssertionOperatorTypeEnumFactory());
7200        this.operator.setValue(value);
7201      }
7202      return this;
7203    }
7204
7205    /**
7206     * @return {@link #path} (The XPath or JSONPath expression to be evaluated
7207     *         against the fixture representing the response received from server.).
7208     *         This is the underlying object with id, value and extensions. The
7209     *         accessor "getPath" gives direct access to the value
7210     */
7211    public StringType getPathElement() {
7212      if (this.path == null)
7213        if (Configuration.errorOnAutoCreate())
7214          throw new Error("Attempt to auto-create SetupActionAssertComponent.path");
7215        else if (Configuration.doAutoCreate())
7216          this.path = new StringType(); // bb
7217      return this.path;
7218    }
7219
7220    public boolean hasPathElement() {
7221      return this.path != null && !this.path.isEmpty();
7222    }
7223
7224    public boolean hasPath() {
7225      return this.path != null && !this.path.isEmpty();
7226    }
7227
7228    /**
7229     * @param value {@link #path} (The XPath or JSONPath expression to be evaluated
7230     *              against the fixture representing the response received from
7231     *              server.). This is the underlying object with id, value and
7232     *              extensions. The accessor "getPath" gives direct access to the
7233     *              value
7234     */
7235    public SetupActionAssertComponent setPathElement(StringType value) {
7236      this.path = value;
7237      return this;
7238    }
7239
7240    /**
7241     * @return The XPath or JSONPath expression to be evaluated against the fixture
7242     *         representing the response received from server.
7243     */
7244    public String getPath() {
7245      return this.path == null ? null : this.path.getValue();
7246    }
7247
7248    /**
7249     * @param value The XPath or JSONPath expression to be evaluated against the
7250     *              fixture representing the response received from server.
7251     */
7252    public SetupActionAssertComponent setPath(String value) {
7253      if (Utilities.noString(value))
7254        this.path = null;
7255      else {
7256        if (this.path == null)
7257          this.path = new StringType();
7258        this.path.setValue(value);
7259      }
7260      return this;
7261    }
7262
7263    /**
7264     * @return {@link #requestMethod} (The request method or HTTP operation code to
7265     *         compare against that used by the client system under test.). This is
7266     *         the underlying object with id, value and extensions. The accessor
7267     *         "getRequestMethod" gives direct access to the value
7268     */
7269    public Enumeration<TestScriptRequestMethodCode> getRequestMethodElement() {
7270      if (this.requestMethod == null)
7271        if (Configuration.errorOnAutoCreate())
7272          throw new Error("Attempt to auto-create SetupActionAssertComponent.requestMethod");
7273        else if (Configuration.doAutoCreate())
7274          this.requestMethod = new Enumeration<TestScriptRequestMethodCode>(
7275              new TestScriptRequestMethodCodeEnumFactory()); // bb
7276      return this.requestMethod;
7277    }
7278
7279    public boolean hasRequestMethodElement() {
7280      return this.requestMethod != null && !this.requestMethod.isEmpty();
7281    }
7282
7283    public boolean hasRequestMethod() {
7284      return this.requestMethod != null && !this.requestMethod.isEmpty();
7285    }
7286
7287    /**
7288     * @param value {@link #requestMethod} (The request method or HTTP operation
7289     *              code to compare against that used by the client system under
7290     *              test.). This is the underlying object with id, value and
7291     *              extensions. The accessor "getRequestMethod" gives direct access
7292     *              to the value
7293     */
7294    public SetupActionAssertComponent setRequestMethodElement(Enumeration<TestScriptRequestMethodCode> value) {
7295      this.requestMethod = value;
7296      return this;
7297    }
7298
7299    /**
7300     * @return The request method or HTTP operation code to compare against that
7301     *         used by the client system under test.
7302     */
7303    public TestScriptRequestMethodCode getRequestMethod() {
7304      return this.requestMethod == null ? null : this.requestMethod.getValue();
7305    }
7306
7307    /**
7308     * @param value The request method or HTTP operation code to compare against
7309     *              that used by the client system under test.
7310     */
7311    public SetupActionAssertComponent setRequestMethod(TestScriptRequestMethodCode value) {
7312      if (value == null)
7313        this.requestMethod = null;
7314      else {
7315        if (this.requestMethod == null)
7316          this.requestMethod = new Enumeration<TestScriptRequestMethodCode>(
7317              new TestScriptRequestMethodCodeEnumFactory());
7318        this.requestMethod.setValue(value);
7319      }
7320      return this;
7321    }
7322
7323    /**
7324     * @return {@link #requestURL} (The value to use in a comparison against the
7325     *         request URL path string.). This is the underlying object with id,
7326     *         value and extensions. The accessor "getRequestURL" gives direct
7327     *         access to the value
7328     */
7329    public StringType getRequestURLElement() {
7330      if (this.requestURL == null)
7331        if (Configuration.errorOnAutoCreate())
7332          throw new Error("Attempt to auto-create SetupActionAssertComponent.requestURL");
7333        else if (Configuration.doAutoCreate())
7334          this.requestURL = new StringType(); // bb
7335      return this.requestURL;
7336    }
7337
7338    public boolean hasRequestURLElement() {
7339      return this.requestURL != null && !this.requestURL.isEmpty();
7340    }
7341
7342    public boolean hasRequestURL() {
7343      return this.requestURL != null && !this.requestURL.isEmpty();
7344    }
7345
7346    /**
7347     * @param value {@link #requestURL} (The value to use in a comparison against
7348     *              the request URL path string.). This is the underlying object
7349     *              with id, value and extensions. The accessor "getRequestURL"
7350     *              gives direct access to the value
7351     */
7352    public SetupActionAssertComponent setRequestURLElement(StringType value) {
7353      this.requestURL = value;
7354      return this;
7355    }
7356
7357    /**
7358     * @return The value to use in a comparison against the request URL path string.
7359     */
7360    public String getRequestURL() {
7361      return this.requestURL == null ? null : this.requestURL.getValue();
7362    }
7363
7364    /**
7365     * @param value The value to use in a comparison against the request URL path
7366     *              string.
7367     */
7368    public SetupActionAssertComponent setRequestURL(String value) {
7369      if (Utilities.noString(value))
7370        this.requestURL = null;
7371      else {
7372        if (this.requestURL == null)
7373          this.requestURL = new StringType();
7374        this.requestURL.setValue(value);
7375      }
7376      return this;
7377    }
7378
7379    /**
7380     * @return {@link #resource} (The type of the resource. See
7381     *         http://build.fhir.org/resourcelist.html.). This is the underlying
7382     *         object with id, value and extensions. The accessor "getResource"
7383     *         gives direct access to the value
7384     */
7385    public CodeType getResourceElement() {
7386      if (this.resource == null)
7387        if (Configuration.errorOnAutoCreate())
7388          throw new Error("Attempt to auto-create SetupActionAssertComponent.resource");
7389        else if (Configuration.doAutoCreate())
7390          this.resource = new CodeType(); // bb
7391      return this.resource;
7392    }
7393
7394    public boolean hasResourceElement() {
7395      return this.resource != null && !this.resource.isEmpty();
7396    }
7397
7398    public boolean hasResource() {
7399      return this.resource != null && !this.resource.isEmpty();
7400    }
7401
7402    /**
7403     * @param value {@link #resource} (The type of the resource. See
7404     *              http://build.fhir.org/resourcelist.html.). This is the
7405     *              underlying object with id, value and extensions. The accessor
7406     *              "getResource" gives direct access to the value
7407     */
7408    public SetupActionAssertComponent setResourceElement(CodeType value) {
7409      this.resource = value;
7410      return this;
7411    }
7412
7413    /**
7414     * @return The type of the resource. See
7415     *         http://build.fhir.org/resourcelist.html.
7416     */
7417    public String getResource() {
7418      return this.resource == null ? null : this.resource.getValue();
7419    }
7420
7421    /**
7422     * @param value The type of the resource. See
7423     *              http://build.fhir.org/resourcelist.html.
7424     */
7425    public SetupActionAssertComponent setResource(String value) {
7426      if (Utilities.noString(value))
7427        this.resource = null;
7428      else {
7429        if (this.resource == null)
7430          this.resource = new CodeType();
7431        this.resource.setValue(value);
7432      }
7433      return this;
7434    }
7435
7436    /**
7437     * @return {@link #response} (okay | created | noContent | notModified | bad |
7438     *         forbidden | notFound | methodNotAllowed | conflict | gone |
7439     *         preconditionFailed | unprocessable.). This is the underlying object
7440     *         with id, value and extensions. The accessor "getResponse" gives
7441     *         direct access to the value
7442     */
7443    public Enumeration<AssertionResponseTypes> getResponseElement() {
7444      if (this.response == null)
7445        if (Configuration.errorOnAutoCreate())
7446          throw new Error("Attempt to auto-create SetupActionAssertComponent.response");
7447        else if (Configuration.doAutoCreate())
7448          this.response = new Enumeration<AssertionResponseTypes>(new AssertionResponseTypesEnumFactory()); // bb
7449      return this.response;
7450    }
7451
7452    public boolean hasResponseElement() {
7453      return this.response != null && !this.response.isEmpty();
7454    }
7455
7456    public boolean hasResponse() {
7457      return this.response != null && !this.response.isEmpty();
7458    }
7459
7460    /**
7461     * @param value {@link #response} (okay | created | noContent | notModified |
7462     *              bad | forbidden | notFound | methodNotAllowed | conflict | gone
7463     *              | preconditionFailed | unprocessable.). This is the underlying
7464     *              object with id, value and extensions. The accessor "getResponse"
7465     *              gives direct access to the value
7466     */
7467    public SetupActionAssertComponent setResponseElement(Enumeration<AssertionResponseTypes> value) {
7468      this.response = value;
7469      return this;
7470    }
7471
7472    /**
7473     * @return okay | created | noContent | notModified | bad | forbidden | notFound
7474     *         | methodNotAllowed | conflict | gone | preconditionFailed |
7475     *         unprocessable.
7476     */
7477    public AssertionResponseTypes getResponse() {
7478      return this.response == null ? null : this.response.getValue();
7479    }
7480
7481    /**
7482     * @param value okay | created | noContent | notModified | bad | forbidden |
7483     *              notFound | methodNotAllowed | conflict | gone |
7484     *              preconditionFailed | unprocessable.
7485     */
7486    public SetupActionAssertComponent setResponse(AssertionResponseTypes value) {
7487      if (value == null)
7488        this.response = null;
7489      else {
7490        if (this.response == null)
7491          this.response = new Enumeration<AssertionResponseTypes>(new AssertionResponseTypesEnumFactory());
7492        this.response.setValue(value);
7493      }
7494      return this;
7495    }
7496
7497    /**
7498     * @return {@link #responseCode} (The value of the HTTP response code to be
7499     *         tested.). This is the underlying object with id, value and
7500     *         extensions. The accessor "getResponseCode" gives direct access to the
7501     *         value
7502     */
7503    public StringType getResponseCodeElement() {
7504      if (this.responseCode == null)
7505        if (Configuration.errorOnAutoCreate())
7506          throw new Error("Attempt to auto-create SetupActionAssertComponent.responseCode");
7507        else if (Configuration.doAutoCreate())
7508          this.responseCode = new StringType(); // bb
7509      return this.responseCode;
7510    }
7511
7512    public boolean hasResponseCodeElement() {
7513      return this.responseCode != null && !this.responseCode.isEmpty();
7514    }
7515
7516    public boolean hasResponseCode() {
7517      return this.responseCode != null && !this.responseCode.isEmpty();
7518    }
7519
7520    /**
7521     * @param value {@link #responseCode} (The value of the HTTP response code to be
7522     *              tested.). This is the underlying object with id, value and
7523     *              extensions. The accessor "getResponseCode" gives direct access
7524     *              to the value
7525     */
7526    public SetupActionAssertComponent setResponseCodeElement(StringType value) {
7527      this.responseCode = value;
7528      return this;
7529    }
7530
7531    /**
7532     * @return The value of the HTTP response code to be tested.
7533     */
7534    public String getResponseCode() {
7535      return this.responseCode == null ? null : this.responseCode.getValue();
7536    }
7537
7538    /**
7539     * @param value The value of the HTTP response code to be tested.
7540     */
7541    public SetupActionAssertComponent setResponseCode(String value) {
7542      if (Utilities.noString(value))
7543        this.responseCode = null;
7544      else {
7545        if (this.responseCode == null)
7546          this.responseCode = new StringType();
7547        this.responseCode.setValue(value);
7548      }
7549      return this;
7550    }
7551
7552    /**
7553     * @return {@link #sourceId} (Fixture to evaluate the XPath/JSONPath expression
7554     *         or the headerField against.). This is the underlying object with id,
7555     *         value and extensions. The accessor "getSourceId" gives direct access
7556     *         to the value
7557     */
7558    public IdType getSourceIdElement() {
7559      if (this.sourceId == null)
7560        if (Configuration.errorOnAutoCreate())
7561          throw new Error("Attempt to auto-create SetupActionAssertComponent.sourceId");
7562        else if (Configuration.doAutoCreate())
7563          this.sourceId = new IdType(); // bb
7564      return this.sourceId;
7565    }
7566
7567    public boolean hasSourceIdElement() {
7568      return this.sourceId != null && !this.sourceId.isEmpty();
7569    }
7570
7571    public boolean hasSourceId() {
7572      return this.sourceId != null && !this.sourceId.isEmpty();
7573    }
7574
7575    /**
7576     * @param value {@link #sourceId} (Fixture to evaluate the XPath/JSONPath
7577     *              expression or the headerField against.). This is the underlying
7578     *              object with id, value and extensions. The accessor "getSourceId"
7579     *              gives direct access to the value
7580     */
7581    public SetupActionAssertComponent setSourceIdElement(IdType value) {
7582      this.sourceId = value;
7583      return this;
7584    }
7585
7586    /**
7587     * @return Fixture to evaluate the XPath/JSONPath expression or the headerField
7588     *         against.
7589     */
7590    public String getSourceId() {
7591      return this.sourceId == null ? null : this.sourceId.getValue();
7592    }
7593
7594    /**
7595     * @param value Fixture to evaluate the XPath/JSONPath expression or the
7596     *              headerField against.
7597     */
7598    public SetupActionAssertComponent setSourceId(String value) {
7599      if (Utilities.noString(value))
7600        this.sourceId = null;
7601      else {
7602        if (this.sourceId == null)
7603          this.sourceId = new IdType();
7604        this.sourceId.setValue(value);
7605      }
7606      return this;
7607    }
7608
7609    /**
7610     * @return {@link #validateProfileId} (The ID of the Profile to validate
7611     *         against.). This is the underlying object with id, value and
7612     *         extensions. The accessor "getValidateProfileId" gives direct access
7613     *         to the value
7614     */
7615    public IdType getValidateProfileIdElement() {
7616      if (this.validateProfileId == null)
7617        if (Configuration.errorOnAutoCreate())
7618          throw new Error("Attempt to auto-create SetupActionAssertComponent.validateProfileId");
7619        else if (Configuration.doAutoCreate())
7620          this.validateProfileId = new IdType(); // bb
7621      return this.validateProfileId;
7622    }
7623
7624    public boolean hasValidateProfileIdElement() {
7625      return this.validateProfileId != null && !this.validateProfileId.isEmpty();
7626    }
7627
7628    public boolean hasValidateProfileId() {
7629      return this.validateProfileId != null && !this.validateProfileId.isEmpty();
7630    }
7631
7632    /**
7633     * @param value {@link #validateProfileId} (The ID of the Profile to validate
7634     *              against.). This is the underlying object with id, value and
7635     *              extensions. The accessor "getValidateProfileId" gives direct
7636     *              access to the value
7637     */
7638    public SetupActionAssertComponent setValidateProfileIdElement(IdType value) {
7639      this.validateProfileId = value;
7640      return this;
7641    }
7642
7643    /**
7644     * @return The ID of the Profile to validate against.
7645     */
7646    public String getValidateProfileId() {
7647      return this.validateProfileId == null ? null : this.validateProfileId.getValue();
7648    }
7649
7650    /**
7651     * @param value The ID of the Profile to validate against.
7652     */
7653    public SetupActionAssertComponent setValidateProfileId(String value) {
7654      if (Utilities.noString(value))
7655        this.validateProfileId = null;
7656      else {
7657        if (this.validateProfileId == null)
7658          this.validateProfileId = new IdType();
7659        this.validateProfileId.setValue(value);
7660      }
7661      return this;
7662    }
7663
7664    /**
7665     * @return {@link #value} (The value to compare to.). This is the underlying
7666     *         object with id, value and extensions. The accessor "getValue" gives
7667     *         direct access to the value
7668     */
7669    public StringType getValueElement() {
7670      if (this.value == null)
7671        if (Configuration.errorOnAutoCreate())
7672          throw new Error("Attempt to auto-create SetupActionAssertComponent.value");
7673        else if (Configuration.doAutoCreate())
7674          this.value = new StringType(); // bb
7675      return this.value;
7676    }
7677
7678    public boolean hasValueElement() {
7679      return this.value != null && !this.value.isEmpty();
7680    }
7681
7682    public boolean hasValue() {
7683      return this.value != null && !this.value.isEmpty();
7684    }
7685
7686    /**
7687     * @param value {@link #value} (The value to compare to.). This is the
7688     *              underlying object with id, value and extensions. The accessor
7689     *              "getValue" gives direct access to the value
7690     */
7691    public SetupActionAssertComponent setValueElement(StringType value) {
7692      this.value = value;
7693      return this;
7694    }
7695
7696    /**
7697     * @return The value to compare to.
7698     */
7699    public String getValue() {
7700      return this.value == null ? null : this.value.getValue();
7701    }
7702
7703    /**
7704     * @param value The value to compare to.
7705     */
7706    public SetupActionAssertComponent setValue(String value) {
7707      if (Utilities.noString(value))
7708        this.value = null;
7709      else {
7710        if (this.value == null)
7711          this.value = new StringType();
7712        this.value.setValue(value);
7713      }
7714      return this;
7715    }
7716
7717    /**
7718     * @return {@link #warningOnly} (Whether or not the test execution will produce
7719     *         a warning only on error for this assert.). This is the underlying
7720     *         object with id, value and extensions. The accessor "getWarningOnly"
7721     *         gives direct access to the value
7722     */
7723    public BooleanType getWarningOnlyElement() {
7724      if (this.warningOnly == null)
7725        if (Configuration.errorOnAutoCreate())
7726          throw new Error("Attempt to auto-create SetupActionAssertComponent.warningOnly");
7727        else if (Configuration.doAutoCreate())
7728          this.warningOnly = new BooleanType(); // bb
7729      return this.warningOnly;
7730    }
7731
7732    public boolean hasWarningOnlyElement() {
7733      return this.warningOnly != null && !this.warningOnly.isEmpty();
7734    }
7735
7736    public boolean hasWarningOnly() {
7737      return this.warningOnly != null && !this.warningOnly.isEmpty();
7738    }
7739
7740    /**
7741     * @param value {@link #warningOnly} (Whether or not the test execution will
7742     *              produce a warning only on error for this assert.). This is the
7743     *              underlying object with id, value and extensions. The accessor
7744     *              "getWarningOnly" gives direct access to the value
7745     */
7746    public SetupActionAssertComponent setWarningOnlyElement(BooleanType value) {
7747      this.warningOnly = value;
7748      return this;
7749    }
7750
7751    /**
7752     * @return Whether or not the test execution will produce a warning only on
7753     *         error for this assert.
7754     */
7755    public boolean getWarningOnly() {
7756      return this.warningOnly == null || this.warningOnly.isEmpty() ? false : this.warningOnly.getValue();
7757    }
7758
7759    /**
7760     * @param value Whether or not the test execution will produce a warning only on
7761     *              error for this assert.
7762     */
7763    public SetupActionAssertComponent setWarningOnly(boolean value) {
7764      if (this.warningOnly == null)
7765        this.warningOnly = new BooleanType();
7766      this.warningOnly.setValue(value);
7767      return this;
7768    }
7769
7770    protected void listChildren(List<Property> children) {
7771      super.listChildren(children);
7772      children.add(new Property("label", "string",
7773          "The label would be used for tracking/logging purposes by test engines.", 0, 1, label));
7774      children.add(new Property("description", "string",
7775          "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description));
7776      children.add(new Property("direction", "code", "The direction to use for the assertion.", 0, 1, direction));
7777      children.add(new Property("compareToSourceId", "string",
7778          "Id of the source fixture used as the contents to be evaluated by either the \"source/expression\" or \"sourceId/path\" definition.",
7779          0, 1, compareToSourceId));
7780      children.add(new Property("compareToSourceExpression", "string",
7781          "The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.",
7782          0, 1, compareToSourceExpression));
7783      children.add(new Property("compareToSourcePath", "string",
7784          "XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.",
7785          0, 1, compareToSourcePath));
7786      children.add(new Property("contentType", "code",
7787          "The mime-type contents to compare against the request or response message 'Content-Type' header.", 0, 1,
7788          contentType));
7789      children.add(new Property("expression", "string",
7790          "The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.",
7791          0, 1, expression));
7792      children
7793          .add(new Property("headerField", "string", "The HTTP header field name e.g. 'Location'.", 0, 1, headerField));
7794      children.add(new Property("minimumId", "string",
7795          "The ID of a fixture.  Asserts that the response contains at a minimum the fixture specified by minimumId.",
7796          0, 1, minimumId));
7797      children.add(new Property("navigationLinks", "boolean",
7798          "Whether or not the test execution performs validation on the bundle navigation links.", 0, 1,
7799          navigationLinks));
7800      children.add(new Property("operator", "code",
7801          "The operator type defines the conditional behavior of the assert. If not defined, the default is equals.", 0,
7802          1, operator));
7803      children.add(new Property("path", "string",
7804          "The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.",
7805          0, 1, path));
7806      children.add(new Property("requestMethod", "code",
7807          "The request method or HTTP operation code to compare against that used by the client system under test.", 0,
7808          1, requestMethod));
7809      children.add(new Property("requestURL", "string",
7810          "The value to use in a comparison against the request URL path string.", 0, 1, requestURL));
7811      children.add(new Property("resource", "code",
7812          "The type of the resource.  See http://build.fhir.org/resourcelist.html.", 0, 1, resource));
7813      children.add(new Property("response", "code",
7814          "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.",
7815          0, 1, response));
7816      children.add(new Property("responseCode", "string", "The value of the HTTP response code to be tested.", 0, 1,
7817          responseCode));
7818      children.add(new Property("sourceId", "id",
7819          "Fixture to evaluate the XPath/JSONPath expression or the headerField  against.", 0, 1, sourceId));
7820      children.add(new Property("validateProfileId", "id", "The ID of the Profile to validate against.", 0, 1,
7821          validateProfileId));
7822      children.add(new Property("value", "string", "The value to compare to.", 0, 1, value));
7823      children.add(new Property("warningOnly", "boolean",
7824          "Whether or not the test execution will produce a warning only on error for this assert.", 0, 1,
7825          warningOnly));
7826    }
7827
7828    @Override
7829    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
7830      switch (_hash) {
7831      case 102727412:
7832        /* label */ return new Property("label", "string",
7833            "The label would be used for tracking/logging purposes by test engines.", 0, 1, label);
7834      case -1724546052:
7835        /* description */ return new Property("description", "string",
7836            "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description);
7837      case -962590849:
7838        /* direction */ return new Property("direction", "code", "The direction to use for the assertion.", 0, 1,
7839            direction);
7840      case 2081856758:
7841        /* compareToSourceId */ return new Property("compareToSourceId", "string",
7842            "Id of the source fixture used as the contents to be evaluated by either the \"source/expression\" or \"sourceId/path\" definition.",
7843            0, 1, compareToSourceId);
7844      case -1415702669:
7845        /* compareToSourceExpression */ return new Property("compareToSourceExpression", "string",
7846            "The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.",
7847            0, 1, compareToSourceExpression);
7848      case -790206144:
7849        /* compareToSourcePath */ return new Property("compareToSourcePath", "string",
7850            "XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.",
7851            0, 1, compareToSourcePath);
7852      case -389131437:
7853        /* contentType */ return new Property("contentType", "code",
7854            "The mime-type contents to compare against the request or response message 'Content-Type' header.", 0, 1,
7855            contentType);
7856      case -1795452264:
7857        /* expression */ return new Property("expression", "string",
7858            "The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.",
7859            0, 1, expression);
7860      case 1160732269:
7861        /* headerField */ return new Property("headerField", "string", "The HTTP header field name e.g. 'Location'.", 0,
7862            1, headerField);
7863      case 818925001:
7864        /* minimumId */ return new Property("minimumId", "string",
7865            "The ID of a fixture.  Asserts that the response contains at a minimum the fixture specified by minimumId.",
7866            0, 1, minimumId);
7867      case 1001488901:
7868        /* navigationLinks */ return new Property("navigationLinks", "boolean",
7869            "Whether or not the test execution performs validation on the bundle navigation links.", 0, 1,
7870            navigationLinks);
7871      case -500553564:
7872        /* operator */ return new Property("operator", "code",
7873            "The operator type defines the conditional behavior of the assert. If not defined, the default is equals.",
7874            0, 1, operator);
7875      case 3433509:
7876        /* path */ return new Property("path", "string",
7877            "The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.",
7878            0, 1, path);
7879      case 1217874000:
7880        /* requestMethod */ return new Property("requestMethod", "code",
7881            "The request method or HTTP operation code to compare against that used by the client system under test.",
7882            0, 1, requestMethod);
7883      case 37099616:
7884        /* requestURL */ return new Property("requestURL", "string",
7885            "The value to use in a comparison against the request URL path string.", 0, 1, requestURL);
7886      case -341064690:
7887        /* resource */ return new Property("resource", "code",
7888            "The type of the resource.  See http://build.fhir.org/resourcelist.html.", 0, 1, resource);
7889      case -340323263:
7890        /* response */ return new Property("response", "code",
7891            "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.",
7892            0, 1, response);
7893      case 1438723534:
7894        /* responseCode */ return new Property("responseCode", "string",
7895            "The value of the HTTP response code to be tested.", 0, 1, responseCode);
7896      case 1746327190:
7897        /* sourceId */ return new Property("sourceId", "id",
7898            "Fixture to evaluate the XPath/JSONPath expression or the headerField  against.", 0, 1, sourceId);
7899      case 1555541038:
7900        /* validateProfileId */ return new Property("validateProfileId", "id",
7901            "The ID of the Profile to validate against.", 0, 1, validateProfileId);
7902      case 111972721:
7903        /* value */ return new Property("value", "string", "The value to compare to.", 0, 1, value);
7904      case -481159832:
7905        /* warningOnly */ return new Property("warningOnly", "boolean",
7906            "Whether or not the test execution will produce a warning only on error for this assert.", 0, 1,
7907            warningOnly);
7908      default:
7909        return super.getNamedProperty(_hash, _name, _checkValid);
7910      }
7911
7912    }
7913
7914    @Override
7915    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
7916      switch (hash) {
7917      case 102727412:
7918        /* label */ return this.label == null ? new Base[0] : new Base[] { this.label }; // StringType
7919      case -1724546052:
7920        /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // StringType
7921      case -962590849:
7922        /* direction */ return this.direction == null ? new Base[0] : new Base[] { this.direction }; // Enumeration<AssertionDirectionType>
7923      case 2081856758:
7924        /* compareToSourceId */ return this.compareToSourceId == null ? new Base[0]
7925            : new Base[] { this.compareToSourceId }; // StringType
7926      case -1415702669:
7927        /* compareToSourceExpression */ return this.compareToSourceExpression == null ? new Base[0]
7928            : new Base[] { this.compareToSourceExpression }; // StringType
7929      case -790206144:
7930        /* compareToSourcePath */ return this.compareToSourcePath == null ? new Base[0]
7931            : new Base[] { this.compareToSourcePath }; // StringType
7932      case -389131437:
7933        /* contentType */ return this.contentType == null ? new Base[0] : new Base[] { this.contentType }; // CodeType
7934      case -1795452264:
7935        /* expression */ return this.expression == null ? new Base[0] : new Base[] { this.expression }; // StringType
7936      case 1160732269:
7937        /* headerField */ return this.headerField == null ? new Base[0] : new Base[] { this.headerField }; // StringType
7938      case 818925001:
7939        /* minimumId */ return this.minimumId == null ? new Base[0] : new Base[] { this.minimumId }; // StringType
7940      case 1001488901:
7941        /* navigationLinks */ return this.navigationLinks == null ? new Base[0] : new Base[] { this.navigationLinks }; // BooleanType
7942      case -500553564:
7943        /* operator */ return this.operator == null ? new Base[0] : new Base[] { this.operator }; // Enumeration<AssertionOperatorType>
7944      case 3433509:
7945        /* path */ return this.path == null ? new Base[0] : new Base[] { this.path }; // StringType
7946      case 1217874000:
7947        /* requestMethod */ return this.requestMethod == null ? new Base[0] : new Base[] { this.requestMethod }; // Enumeration<TestScriptRequestMethodCode>
7948      case 37099616:
7949        /* requestURL */ return this.requestURL == null ? new Base[0] : new Base[] { this.requestURL }; // StringType
7950      case -341064690:
7951        /* resource */ return this.resource == null ? new Base[0] : new Base[] { this.resource }; // CodeType
7952      case -340323263:
7953        /* response */ return this.response == null ? new Base[0] : new Base[] { this.response }; // Enumeration<AssertionResponseTypes>
7954      case 1438723534:
7955        /* responseCode */ return this.responseCode == null ? new Base[0] : new Base[] { this.responseCode }; // StringType
7956      case 1746327190:
7957        /* sourceId */ return this.sourceId == null ? new Base[0] : new Base[] { this.sourceId }; // IdType
7958      case 1555541038:
7959        /* validateProfileId */ return this.validateProfileId == null ? new Base[0]
7960            : new Base[] { this.validateProfileId }; // IdType
7961      case 111972721:
7962        /* value */ return this.value == null ? new Base[0] : new Base[] { this.value }; // StringType
7963      case -481159832:
7964        /* warningOnly */ return this.warningOnly == null ? new Base[0] : new Base[] { this.warningOnly }; // BooleanType
7965      default:
7966        return super.getProperty(hash, name, checkValid);
7967      }
7968
7969    }
7970
7971    @Override
7972    public Base setProperty(int hash, String name, Base value) throws FHIRException {
7973      switch (hash) {
7974      case 102727412: // label
7975        this.label = castToString(value); // StringType
7976        return value;
7977      case -1724546052: // description
7978        this.description = castToString(value); // StringType
7979        return value;
7980      case -962590849: // direction
7981        value = new AssertionDirectionTypeEnumFactory().fromType(castToCode(value));
7982        this.direction = (Enumeration) value; // Enumeration<AssertionDirectionType>
7983        return value;
7984      case 2081856758: // compareToSourceId
7985        this.compareToSourceId = castToString(value); // StringType
7986        return value;
7987      case -1415702669: // compareToSourceExpression
7988        this.compareToSourceExpression = castToString(value); // StringType
7989        return value;
7990      case -790206144: // compareToSourcePath
7991        this.compareToSourcePath = castToString(value); // StringType
7992        return value;
7993      case -389131437: // contentType
7994        this.contentType = castToCode(value); // CodeType
7995        return value;
7996      case -1795452264: // expression
7997        this.expression = castToString(value); // StringType
7998        return value;
7999      case 1160732269: // headerField
8000        this.headerField = castToString(value); // StringType
8001        return value;
8002      case 818925001: // minimumId
8003        this.minimumId = castToString(value); // StringType
8004        return value;
8005      case 1001488901: // navigationLinks
8006        this.navigationLinks = castToBoolean(value); // BooleanType
8007        return value;
8008      case -500553564: // operator
8009        value = new AssertionOperatorTypeEnumFactory().fromType(castToCode(value));
8010        this.operator = (Enumeration) value; // Enumeration<AssertionOperatorType>
8011        return value;
8012      case 3433509: // path
8013        this.path = castToString(value); // StringType
8014        return value;
8015      case 1217874000: // requestMethod
8016        value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value));
8017        this.requestMethod = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode>
8018        return value;
8019      case 37099616: // requestURL
8020        this.requestURL = castToString(value); // StringType
8021        return value;
8022      case -341064690: // resource
8023        this.resource = castToCode(value); // CodeType
8024        return value;
8025      case -340323263: // response
8026        value = new AssertionResponseTypesEnumFactory().fromType(castToCode(value));
8027        this.response = (Enumeration) value; // Enumeration<AssertionResponseTypes>
8028        return value;
8029      case 1438723534: // responseCode
8030        this.responseCode = castToString(value); // StringType
8031        return value;
8032      case 1746327190: // sourceId
8033        this.sourceId = castToId(value); // IdType
8034        return value;
8035      case 1555541038: // validateProfileId
8036        this.validateProfileId = castToId(value); // IdType
8037        return value;
8038      case 111972721: // value
8039        this.value = castToString(value); // StringType
8040        return value;
8041      case -481159832: // warningOnly
8042        this.warningOnly = castToBoolean(value); // BooleanType
8043        return value;
8044      default:
8045        return super.setProperty(hash, name, value);
8046      }
8047
8048    }
8049
8050    @Override
8051    public Base setProperty(String name, Base value) throws FHIRException {
8052      if (name.equals("label")) {
8053        this.label = castToString(value); // StringType
8054      } else if (name.equals("description")) {
8055        this.description = castToString(value); // StringType
8056      } else if (name.equals("direction")) {
8057        value = new AssertionDirectionTypeEnumFactory().fromType(castToCode(value));
8058        this.direction = (Enumeration) value; // Enumeration<AssertionDirectionType>
8059      } else if (name.equals("compareToSourceId")) {
8060        this.compareToSourceId = castToString(value); // StringType
8061      } else if (name.equals("compareToSourceExpression")) {
8062        this.compareToSourceExpression = castToString(value); // StringType
8063      } else if (name.equals("compareToSourcePath")) {
8064        this.compareToSourcePath = castToString(value); // StringType
8065      } else if (name.equals("contentType")) {
8066        this.contentType = castToCode(value); // CodeType
8067      } else if (name.equals("expression")) {
8068        this.expression = castToString(value); // StringType
8069      } else if (name.equals("headerField")) {
8070        this.headerField = castToString(value); // StringType
8071      } else if (name.equals("minimumId")) {
8072        this.minimumId = castToString(value); // StringType
8073      } else if (name.equals("navigationLinks")) {
8074        this.navigationLinks = castToBoolean(value); // BooleanType
8075      } else if (name.equals("operator")) {
8076        value = new AssertionOperatorTypeEnumFactory().fromType(castToCode(value));
8077        this.operator = (Enumeration) value; // Enumeration<AssertionOperatorType>
8078      } else if (name.equals("path")) {
8079        this.path = castToString(value); // StringType
8080      } else if (name.equals("requestMethod")) {
8081        value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value));
8082        this.requestMethod = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode>
8083      } else if (name.equals("requestURL")) {
8084        this.requestURL = castToString(value); // StringType
8085      } else if (name.equals("resource")) {
8086        this.resource = castToCode(value); // CodeType
8087      } else if (name.equals("response")) {
8088        value = new AssertionResponseTypesEnumFactory().fromType(castToCode(value));
8089        this.response = (Enumeration) value; // Enumeration<AssertionResponseTypes>
8090      } else if (name.equals("responseCode")) {
8091        this.responseCode = castToString(value); // StringType
8092      } else if (name.equals("sourceId")) {
8093        this.sourceId = castToId(value); // IdType
8094      } else if (name.equals("validateProfileId")) {
8095        this.validateProfileId = castToId(value); // IdType
8096      } else if (name.equals("value")) {
8097        this.value = castToString(value); // StringType
8098      } else if (name.equals("warningOnly")) {
8099        this.warningOnly = castToBoolean(value); // BooleanType
8100      } else
8101        return super.setProperty(name, value);
8102      return value;
8103    }
8104
8105    @Override
8106    public Base makeProperty(int hash, String name) throws FHIRException {
8107      switch (hash) {
8108      case 102727412:
8109        return getLabelElement();
8110      case -1724546052:
8111        return getDescriptionElement();
8112      case -962590849:
8113        return getDirectionElement();
8114      case 2081856758:
8115        return getCompareToSourceIdElement();
8116      case -1415702669:
8117        return getCompareToSourceExpressionElement();
8118      case -790206144:
8119        return getCompareToSourcePathElement();
8120      case -389131437:
8121        return getContentTypeElement();
8122      case -1795452264:
8123        return getExpressionElement();
8124      case 1160732269:
8125        return getHeaderFieldElement();
8126      case 818925001:
8127        return getMinimumIdElement();
8128      case 1001488901:
8129        return getNavigationLinksElement();
8130      case -500553564:
8131        return getOperatorElement();
8132      case 3433509:
8133        return getPathElement();
8134      case 1217874000:
8135        return getRequestMethodElement();
8136      case 37099616:
8137        return getRequestURLElement();
8138      case -341064690:
8139        return getResourceElement();
8140      case -340323263:
8141        return getResponseElement();
8142      case 1438723534:
8143        return getResponseCodeElement();
8144      case 1746327190:
8145        return getSourceIdElement();
8146      case 1555541038:
8147        return getValidateProfileIdElement();
8148      case 111972721:
8149        return getValueElement();
8150      case -481159832:
8151        return getWarningOnlyElement();
8152      default:
8153        return super.makeProperty(hash, name);
8154      }
8155
8156    }
8157
8158    @Override
8159    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
8160      switch (hash) {
8161      case 102727412:
8162        /* label */ return new String[] { "string" };
8163      case -1724546052:
8164        /* description */ return new String[] { "string" };
8165      case -962590849:
8166        /* direction */ return new String[] { "code" };
8167      case 2081856758:
8168        /* compareToSourceId */ return new String[] { "string" };
8169      case -1415702669:
8170        /* compareToSourceExpression */ return new String[] { "string" };
8171      case -790206144:
8172        /* compareToSourcePath */ return new String[] { "string" };
8173      case -389131437:
8174        /* contentType */ return new String[] { "code" };
8175      case -1795452264:
8176        /* expression */ return new String[] { "string" };
8177      case 1160732269:
8178        /* headerField */ return new String[] { "string" };
8179      case 818925001:
8180        /* minimumId */ return new String[] { "string" };
8181      case 1001488901:
8182        /* navigationLinks */ return new String[] { "boolean" };
8183      case -500553564:
8184        /* operator */ return new String[] { "code" };
8185      case 3433509:
8186        /* path */ return new String[] { "string" };
8187      case 1217874000:
8188        /* requestMethod */ return new String[] { "code" };
8189      case 37099616:
8190        /* requestURL */ return new String[] { "string" };
8191      case -341064690:
8192        /* resource */ return new String[] { "code" };
8193      case -340323263:
8194        /* response */ return new String[] { "code" };
8195      case 1438723534:
8196        /* responseCode */ return new String[] { "string" };
8197      case 1746327190:
8198        /* sourceId */ return new String[] { "id" };
8199      case 1555541038:
8200        /* validateProfileId */ return new String[] { "id" };
8201      case 111972721:
8202        /* value */ return new String[] { "string" };
8203      case -481159832:
8204        /* warningOnly */ return new String[] { "boolean" };
8205      default:
8206        return super.getTypesForProperty(hash, name);
8207      }
8208
8209    }
8210
8211    @Override
8212    public Base addChild(String name) throws FHIRException {
8213      if (name.equals("label")) {
8214        throw new FHIRException("Cannot call addChild on a singleton property TestScript.label");
8215      } else if (name.equals("description")) {
8216        throw new FHIRException("Cannot call addChild on a singleton property TestScript.description");
8217      } else if (name.equals("direction")) {
8218        throw new FHIRException("Cannot call addChild on a singleton property TestScript.direction");
8219      } else if (name.equals("compareToSourceId")) {
8220        throw new FHIRException("Cannot call addChild on a singleton property TestScript.compareToSourceId");
8221      } else if (name.equals("compareToSourceExpression")) {
8222        throw new FHIRException("Cannot call addChild on a singleton property TestScript.compareToSourceExpression");
8223      } else if (name.equals("compareToSourcePath")) {
8224        throw new FHIRException("Cannot call addChild on a singleton property TestScript.compareToSourcePath");
8225      } else if (name.equals("contentType")) {
8226        throw new FHIRException("Cannot call addChild on a singleton property TestScript.contentType");
8227      } else if (name.equals("expression")) {
8228        throw new FHIRException("Cannot call addChild on a singleton property TestScript.expression");
8229      } else if (name.equals("headerField")) {
8230        throw new FHIRException("Cannot call addChild on a singleton property TestScript.headerField");
8231      } else if (name.equals("minimumId")) {
8232        throw new FHIRException("Cannot call addChild on a singleton property TestScript.minimumId");
8233      } else if (name.equals("navigationLinks")) {
8234        throw new FHIRException("Cannot call addChild on a singleton property TestScript.navigationLinks");
8235      } else if (name.equals("operator")) {
8236        throw new FHIRException("Cannot call addChild on a singleton property TestScript.operator");
8237      } else if (name.equals("path")) {
8238        throw new FHIRException("Cannot call addChild on a singleton property TestScript.path");
8239      } else if (name.equals("requestMethod")) {
8240        throw new FHIRException("Cannot call addChild on a singleton property TestScript.requestMethod");
8241      } else if (name.equals("requestURL")) {
8242        throw new FHIRException("Cannot call addChild on a singleton property TestScript.requestURL");
8243      } else if (name.equals("resource")) {
8244        throw new FHIRException("Cannot call addChild on a singleton property TestScript.resource");
8245      } else if (name.equals("response")) {
8246        throw new FHIRException("Cannot call addChild on a singleton property TestScript.response");
8247      } else if (name.equals("responseCode")) {
8248        throw new FHIRException("Cannot call addChild on a singleton property TestScript.responseCode");
8249      } else if (name.equals("sourceId")) {
8250        throw new FHIRException("Cannot call addChild on a singleton property TestScript.sourceId");
8251      } else if (name.equals("validateProfileId")) {
8252        throw new FHIRException("Cannot call addChild on a singleton property TestScript.validateProfileId");
8253      } else if (name.equals("value")) {
8254        throw new FHIRException("Cannot call addChild on a singleton property TestScript.value");
8255      } else if (name.equals("warningOnly")) {
8256        throw new FHIRException("Cannot call addChild on a singleton property TestScript.warningOnly");
8257      } else
8258        return super.addChild(name);
8259    }
8260
8261    public SetupActionAssertComponent copy() {
8262      SetupActionAssertComponent dst = new SetupActionAssertComponent();
8263      copyValues(dst);
8264      return dst;
8265    }
8266
8267    public void copyValues(SetupActionAssertComponent dst) {
8268      super.copyValues(dst);
8269      dst.label = label == null ? null : label.copy();
8270      dst.description = description == null ? null : description.copy();
8271      dst.direction = direction == null ? null : direction.copy();
8272      dst.compareToSourceId = compareToSourceId == null ? null : compareToSourceId.copy();
8273      dst.compareToSourceExpression = compareToSourceExpression == null ? null : compareToSourceExpression.copy();
8274      dst.compareToSourcePath = compareToSourcePath == null ? null : compareToSourcePath.copy();
8275      dst.contentType = contentType == null ? null : contentType.copy();
8276      dst.expression = expression == null ? null : expression.copy();
8277      dst.headerField = headerField == null ? null : headerField.copy();
8278      dst.minimumId = minimumId == null ? null : minimumId.copy();
8279      dst.navigationLinks = navigationLinks == null ? null : navigationLinks.copy();
8280      dst.operator = operator == null ? null : operator.copy();
8281      dst.path = path == null ? null : path.copy();
8282      dst.requestMethod = requestMethod == null ? null : requestMethod.copy();
8283      dst.requestURL = requestURL == null ? null : requestURL.copy();
8284      dst.resource = resource == null ? null : resource.copy();
8285      dst.response = response == null ? null : response.copy();
8286      dst.responseCode = responseCode == null ? null : responseCode.copy();
8287      dst.sourceId = sourceId == null ? null : sourceId.copy();
8288      dst.validateProfileId = validateProfileId == null ? null : validateProfileId.copy();
8289      dst.value = value == null ? null : value.copy();
8290      dst.warningOnly = warningOnly == null ? null : warningOnly.copy();
8291    }
8292
8293    @Override
8294    public boolean equalsDeep(Base other_) {
8295      if (!super.equalsDeep(other_))
8296        return false;
8297      if (!(other_ instanceof SetupActionAssertComponent))
8298        return false;
8299      SetupActionAssertComponent o = (SetupActionAssertComponent) other_;
8300      return compareDeep(label, o.label, true) && compareDeep(description, o.description, true)
8301          && compareDeep(direction, o.direction, true) && compareDeep(compareToSourceId, o.compareToSourceId, true)
8302          && compareDeep(compareToSourceExpression, o.compareToSourceExpression, true)
8303          && compareDeep(compareToSourcePath, o.compareToSourcePath, true)
8304          && compareDeep(contentType, o.contentType, true) && compareDeep(expression, o.expression, true)
8305          && compareDeep(headerField, o.headerField, true) && compareDeep(minimumId, o.minimumId, true)
8306          && compareDeep(navigationLinks, o.navigationLinks, true) && compareDeep(operator, o.operator, true)
8307          && compareDeep(path, o.path, true) && compareDeep(requestMethod, o.requestMethod, true)
8308          && compareDeep(requestURL, o.requestURL, true) && compareDeep(resource, o.resource, true)
8309          && compareDeep(response, o.response, true) && compareDeep(responseCode, o.responseCode, true)
8310          && compareDeep(sourceId, o.sourceId, true) && compareDeep(validateProfileId, o.validateProfileId, true)
8311          && compareDeep(value, o.value, true) && compareDeep(warningOnly, o.warningOnly, true);
8312    }
8313
8314    @Override
8315    public boolean equalsShallow(Base other_) {
8316      if (!super.equalsShallow(other_))
8317        return false;
8318      if (!(other_ instanceof SetupActionAssertComponent))
8319        return false;
8320      SetupActionAssertComponent o = (SetupActionAssertComponent) other_;
8321      return compareValues(label, o.label, true) && compareValues(description, o.description, true)
8322          && compareValues(direction, o.direction, true) && compareValues(compareToSourceId, o.compareToSourceId, true)
8323          && compareValues(compareToSourceExpression, o.compareToSourceExpression, true)
8324          && compareValues(compareToSourcePath, o.compareToSourcePath, true)
8325          && compareValues(contentType, o.contentType, true) && compareValues(expression, o.expression, true)
8326          && compareValues(headerField, o.headerField, true) && compareValues(minimumId, o.minimumId, true)
8327          && compareValues(navigationLinks, o.navigationLinks, true) && compareValues(operator, o.operator, true)
8328          && compareValues(path, o.path, true) && compareValues(requestMethod, o.requestMethod, true)
8329          && compareValues(requestURL, o.requestURL, true) && compareValues(resource, o.resource, true)
8330          && compareValues(response, o.response, true) && compareValues(responseCode, o.responseCode, true)
8331          && compareValues(sourceId, o.sourceId, true) && compareValues(validateProfileId, o.validateProfileId, true)
8332          && compareValues(value, o.value, true) && compareValues(warningOnly, o.warningOnly, true);
8333    }
8334
8335    public boolean isEmpty() {
8336      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(label, description, direction, compareToSourceId,
8337          compareToSourceExpression, compareToSourcePath, contentType, expression, headerField, minimumId,
8338          navigationLinks, operator, path, requestMethod, requestURL, resource, response, responseCode, sourceId,
8339          validateProfileId, value, warningOnly);
8340    }
8341
8342    public String fhirType() {
8343      return "TestScript.setup.action.assert";
8344
8345    }
8346
8347  }
8348
8349  @Block()
8350  public static class TestScriptTestComponent extends BackboneElement implements IBaseBackboneElement {
8351    /**
8352     * The name of this test used for tracking/logging purposes by test engines.
8353     */
8354    @Child(name = "name", type = { StringType.class }, order = 1, min = 0, max = 1, modifier = false, summary = false)
8355    @Description(shortDefinition = "Tracking/logging name of this test", formalDefinition = "The name of this test used for tracking/logging purposes by test engines.")
8356    protected StringType name;
8357
8358    /**
8359     * A short description of the test used by test engines for tracking and
8360     * reporting purposes.
8361     */
8362    @Child(name = "description", type = {
8363        StringType.class }, order = 2, min = 0, max = 1, modifier = false, summary = false)
8364    @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.")
8365    protected StringType description;
8366
8367    /**
8368     * Action would contain either an operation or an assertion.
8369     */
8370    @Child(name = "action", type = {}, order = 3, min = 1, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
8371    @Description(shortDefinition = "A test operation or assert to perform", formalDefinition = "Action would contain either an operation or an assertion.")
8372    protected List<TestActionComponent> action;
8373
8374    private static final long serialVersionUID = -865006110L;
8375
8376    /**
8377     * Constructor
8378     */
8379    public TestScriptTestComponent() {
8380      super();
8381    }
8382
8383    /**
8384     * @return {@link #name} (The name of this test used for tracking/logging
8385     *         purposes by test engines.). This is the underlying object with id,
8386     *         value and extensions. The accessor "getName" gives direct access to
8387     *         the value
8388     */
8389    public StringType getNameElement() {
8390      if (this.name == null)
8391        if (Configuration.errorOnAutoCreate())
8392          throw new Error("Attempt to auto-create TestScriptTestComponent.name");
8393        else if (Configuration.doAutoCreate())
8394          this.name = new StringType(); // bb
8395      return this.name;
8396    }
8397
8398    public boolean hasNameElement() {
8399      return this.name != null && !this.name.isEmpty();
8400    }
8401
8402    public boolean hasName() {
8403      return this.name != null && !this.name.isEmpty();
8404    }
8405
8406    /**
8407     * @param value {@link #name} (The name of this test used for tracking/logging
8408     *              purposes by test engines.). This is the underlying object with
8409     *              id, value and extensions. The accessor "getName" gives direct
8410     *              access to the value
8411     */
8412    public TestScriptTestComponent setNameElement(StringType value) {
8413      this.name = value;
8414      return this;
8415    }
8416
8417    /**
8418     * @return The name of this test used for tracking/logging purposes by test
8419     *         engines.
8420     */
8421    public String getName() {
8422      return this.name == null ? null : this.name.getValue();
8423    }
8424
8425    /**
8426     * @param value The name of this test used for tracking/logging purposes by test
8427     *              engines.
8428     */
8429    public TestScriptTestComponent setName(String value) {
8430      if (Utilities.noString(value))
8431        this.name = null;
8432      else {
8433        if (this.name == null)
8434          this.name = new StringType();
8435        this.name.setValue(value);
8436      }
8437      return this;
8438    }
8439
8440    /**
8441     * @return {@link #description} (A short description of the test used by test
8442     *         engines for tracking and reporting purposes.). This is the underlying
8443     *         object with id, value and extensions. The accessor "getDescription"
8444     *         gives direct access to the value
8445     */
8446    public StringType getDescriptionElement() {
8447      if (this.description == null)
8448        if (Configuration.errorOnAutoCreate())
8449          throw new Error("Attempt to auto-create TestScriptTestComponent.description");
8450        else if (Configuration.doAutoCreate())
8451          this.description = new StringType(); // bb
8452      return this.description;
8453    }
8454
8455    public boolean hasDescriptionElement() {
8456      return this.description != null && !this.description.isEmpty();
8457    }
8458
8459    public boolean hasDescription() {
8460      return this.description != null && !this.description.isEmpty();
8461    }
8462
8463    /**
8464     * @param value {@link #description} (A short description of the test used by
8465     *              test engines for tracking and reporting purposes.). This is the
8466     *              underlying object with id, value and extensions. The accessor
8467     *              "getDescription" gives direct access to the value
8468     */
8469    public TestScriptTestComponent setDescriptionElement(StringType value) {
8470      this.description = value;
8471      return this;
8472    }
8473
8474    /**
8475     * @return A short description of the test used by test engines for tracking and
8476     *         reporting purposes.
8477     */
8478    public String getDescription() {
8479      return this.description == null ? null : this.description.getValue();
8480    }
8481
8482    /**
8483     * @param value A short description of the test used by test engines for
8484     *              tracking and reporting purposes.
8485     */
8486    public TestScriptTestComponent setDescription(String value) {
8487      if (Utilities.noString(value))
8488        this.description = null;
8489      else {
8490        if (this.description == null)
8491          this.description = new StringType();
8492        this.description.setValue(value);
8493      }
8494      return this;
8495    }
8496
8497    /**
8498     * @return {@link #action} (Action would contain either an operation or an
8499     *         assertion.)
8500     */
8501    public List<TestActionComponent> getAction() {
8502      if (this.action == null)
8503        this.action = new ArrayList<TestActionComponent>();
8504      return this.action;
8505    }
8506
8507    /**
8508     * @return Returns a reference to <code>this</code> for easy method chaining
8509     */
8510    public TestScriptTestComponent setAction(List<TestActionComponent> theAction) {
8511      this.action = theAction;
8512      return this;
8513    }
8514
8515    public boolean hasAction() {
8516      if (this.action == null)
8517        return false;
8518      for (TestActionComponent item : this.action)
8519        if (!item.isEmpty())
8520          return true;
8521      return false;
8522    }
8523
8524    public TestActionComponent addAction() { // 3
8525      TestActionComponent t = new TestActionComponent();
8526      if (this.action == null)
8527        this.action = new ArrayList<TestActionComponent>();
8528      this.action.add(t);
8529      return t;
8530    }
8531
8532    public TestScriptTestComponent addAction(TestActionComponent t) { // 3
8533      if (t == null)
8534        return this;
8535      if (this.action == null)
8536        this.action = new ArrayList<TestActionComponent>();
8537      this.action.add(t);
8538      return this;
8539    }
8540
8541    /**
8542     * @return The first repetition of repeating field {@link #action}, creating it
8543     *         if it does not already exist
8544     */
8545    public TestActionComponent getActionFirstRep() {
8546      if (getAction().isEmpty()) {
8547        addAction();
8548      }
8549      return getAction().get(0);
8550    }
8551
8552    protected void listChildren(List<Property> children) {
8553      super.listChildren(children);
8554      children.add(new Property("name", "string",
8555          "The name of this test used for tracking/logging purposes by test engines.", 0, 1, name));
8556      children.add(new Property("description", "string",
8557          "A short description of the test used by test engines for tracking and reporting purposes.", 0, 1,
8558          description));
8559      children.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0,
8560          java.lang.Integer.MAX_VALUE, action));
8561    }
8562
8563    @Override
8564    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
8565      switch (_hash) {
8566      case 3373707:
8567        /* name */ return new Property("name", "string",
8568            "The name of this test used for tracking/logging purposes by test engines.", 0, 1, name);
8569      case -1724546052:
8570        /* description */ return new Property("description", "string",
8571            "A short description of the test used by test engines for tracking and reporting purposes.", 0, 1,
8572            description);
8573      case -1422950858:
8574        /* action */ return new Property("action", "", "Action would contain either an operation or an assertion.", 0,
8575            java.lang.Integer.MAX_VALUE, action);
8576      default:
8577        return super.getNamedProperty(_hash, _name, _checkValid);
8578      }
8579
8580    }
8581
8582    @Override
8583    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
8584      switch (hash) {
8585      case 3373707:
8586        /* name */ return this.name == null ? new Base[0] : new Base[] { this.name }; // StringType
8587      case -1724546052:
8588        /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // StringType
8589      case -1422950858:
8590        /* action */ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // TestActionComponent
8591      default:
8592        return super.getProperty(hash, name, checkValid);
8593      }
8594
8595    }
8596
8597    @Override
8598    public Base setProperty(int hash, String name, Base value) throws FHIRException {
8599      switch (hash) {
8600      case 3373707: // name
8601        this.name = castToString(value); // StringType
8602        return value;
8603      case -1724546052: // description
8604        this.description = castToString(value); // StringType
8605        return value;
8606      case -1422950858: // action
8607        this.getAction().add((TestActionComponent) value); // TestActionComponent
8608        return value;
8609      default:
8610        return super.setProperty(hash, name, value);
8611      }
8612
8613    }
8614
8615    @Override
8616    public Base setProperty(String name, Base value) throws FHIRException {
8617      if (name.equals("name")) {
8618        this.name = castToString(value); // StringType
8619      } else if (name.equals("description")) {
8620        this.description = castToString(value); // StringType
8621      } else if (name.equals("action")) {
8622        this.getAction().add((TestActionComponent) value);
8623      } else
8624        return super.setProperty(name, value);
8625      return value;
8626    }
8627
8628    @Override
8629    public Base makeProperty(int hash, String name) throws FHIRException {
8630      switch (hash) {
8631      case 3373707:
8632        return getNameElement();
8633      case -1724546052:
8634        return getDescriptionElement();
8635      case -1422950858:
8636        return addAction();
8637      default:
8638        return super.makeProperty(hash, name);
8639      }
8640
8641    }
8642
8643    @Override
8644    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
8645      switch (hash) {
8646      case 3373707:
8647        /* name */ return new String[] { "string" };
8648      case -1724546052:
8649        /* description */ return new String[] { "string" };
8650      case -1422950858:
8651        /* action */ return new String[] {};
8652      default:
8653        return super.getTypesForProperty(hash, name);
8654      }
8655
8656    }
8657
8658    @Override
8659    public Base addChild(String name) throws FHIRException {
8660      if (name.equals("name")) {
8661        throw new FHIRException("Cannot call addChild on a singleton property TestScript.name");
8662      } else if (name.equals("description")) {
8663        throw new FHIRException("Cannot call addChild on a singleton property TestScript.description");
8664      } else if (name.equals("action")) {
8665        return addAction();
8666      } else
8667        return super.addChild(name);
8668    }
8669
8670    public TestScriptTestComponent copy() {
8671      TestScriptTestComponent dst = new TestScriptTestComponent();
8672      copyValues(dst);
8673      return dst;
8674    }
8675
8676    public void copyValues(TestScriptTestComponent dst) {
8677      super.copyValues(dst);
8678      dst.name = name == null ? null : name.copy();
8679      dst.description = description == null ? null : description.copy();
8680      if (action != null) {
8681        dst.action = new ArrayList<TestActionComponent>();
8682        for (TestActionComponent i : action)
8683          dst.action.add(i.copy());
8684      }
8685      ;
8686    }
8687
8688    @Override
8689    public boolean equalsDeep(Base other_) {
8690      if (!super.equalsDeep(other_))
8691        return false;
8692      if (!(other_ instanceof TestScriptTestComponent))
8693        return false;
8694      TestScriptTestComponent o = (TestScriptTestComponent) other_;
8695      return compareDeep(name, o.name, true) && compareDeep(description, o.description, true)
8696          && compareDeep(action, o.action, true);
8697    }
8698
8699    @Override
8700    public boolean equalsShallow(Base other_) {
8701      if (!super.equalsShallow(other_))
8702        return false;
8703      if (!(other_ instanceof TestScriptTestComponent))
8704        return false;
8705      TestScriptTestComponent o = (TestScriptTestComponent) other_;
8706      return compareValues(name, o.name, true) && compareValues(description, o.description, true);
8707    }
8708
8709    public boolean isEmpty() {
8710      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, description, action);
8711    }
8712
8713    public String fhirType() {
8714      return "TestScript.test";
8715
8716    }
8717
8718  }
8719
8720  @Block()
8721  public static class TestActionComponent extends BackboneElement implements IBaseBackboneElement {
8722    /**
8723     * An operation would involve a REST request to a server.
8724     */
8725    @Child(name = "operation", type = {
8726        SetupActionOperationComponent.class }, order = 1, min = 0, max = 1, modifier = false, summary = false)
8727    @Description(shortDefinition = "The setup operation to perform", formalDefinition = "An operation would involve a REST request to a server.")
8728    protected SetupActionOperationComponent operation;
8729
8730    /**
8731     * Evaluates the results of previous operations to determine if the server under
8732     * test behaves appropriately.
8733     */
8734    @Child(name = "assert", type = {
8735        SetupActionAssertComponent.class }, order = 2, min = 0, max = 1, modifier = false, summary = false)
8736    @Description(shortDefinition = "The setup assertion to perform", formalDefinition = "Evaluates the results of previous operations to determine if the server under test behaves appropriately.")
8737    protected SetupActionAssertComponent assert_;
8738
8739    private static final long serialVersionUID = -252088305L;
8740
8741    /**
8742     * Constructor
8743     */
8744    public TestActionComponent() {
8745      super();
8746    }
8747
8748    /**
8749     * @return {@link #operation} (An operation would involve a REST request to a
8750     *         server.)
8751     */
8752    public SetupActionOperationComponent getOperation() {
8753      if (this.operation == null)
8754        if (Configuration.errorOnAutoCreate())
8755          throw new Error("Attempt to auto-create TestActionComponent.operation");
8756        else if (Configuration.doAutoCreate())
8757          this.operation = new SetupActionOperationComponent(); // cc
8758      return this.operation;
8759    }
8760
8761    public boolean hasOperation() {
8762      return this.operation != null && !this.operation.isEmpty();
8763    }
8764
8765    /**
8766     * @param value {@link #operation} (An operation would involve a REST request to
8767     *              a server.)
8768     */
8769    public TestActionComponent setOperation(SetupActionOperationComponent value) {
8770      this.operation = value;
8771      return this;
8772    }
8773
8774    /**
8775     * @return {@link #assert_} (Evaluates the results of previous operations to
8776     *         determine if the server under test behaves appropriately.)
8777     */
8778    public SetupActionAssertComponent getAssert() {
8779      if (this.assert_ == null)
8780        if (Configuration.errorOnAutoCreate())
8781          throw new Error("Attempt to auto-create TestActionComponent.assert_");
8782        else if (Configuration.doAutoCreate())
8783          this.assert_ = new SetupActionAssertComponent(); // cc
8784      return this.assert_;
8785    }
8786
8787    public boolean hasAssert() {
8788      return this.assert_ != null && !this.assert_.isEmpty();
8789    }
8790
8791    /**
8792     * @param value {@link #assert_} (Evaluates the results of previous operations
8793     *              to determine if the server under test behaves appropriately.)
8794     */
8795    public TestActionComponent setAssert(SetupActionAssertComponent value) {
8796      this.assert_ = value;
8797      return this;
8798    }
8799
8800    protected void listChildren(List<Property> children) {
8801      super.listChildren(children);
8802      children.add(new Property("operation", "@TestScript.setup.action.operation",
8803          "An operation would involve a REST request to a server.", 0, 1, operation));
8804      children.add(new Property("assert", "@TestScript.setup.action.assert",
8805          "Evaluates the results of previous operations to determine if the server under test behaves appropriately.",
8806          0, 1, assert_));
8807    }
8808
8809    @Override
8810    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
8811      switch (_hash) {
8812      case 1662702951:
8813        /* operation */ return new Property("operation", "@TestScript.setup.action.operation",
8814            "An operation would involve a REST request to a server.", 0, 1, operation);
8815      case -1408208058:
8816        /* assert */ return new Property("assert", "@TestScript.setup.action.assert",
8817            "Evaluates the results of previous operations to determine if the server under test behaves appropriately.",
8818            0, 1, assert_);
8819      default:
8820        return super.getNamedProperty(_hash, _name, _checkValid);
8821      }
8822
8823    }
8824
8825    @Override
8826    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
8827      switch (hash) {
8828      case 1662702951:
8829        /* operation */ return this.operation == null ? new Base[0] : new Base[] { this.operation }; // SetupActionOperationComponent
8830      case -1408208058:
8831        /* assert */ return this.assert_ == null ? new Base[0] : new Base[] { this.assert_ }; // SetupActionAssertComponent
8832      default:
8833        return super.getProperty(hash, name, checkValid);
8834      }
8835
8836    }
8837
8838    @Override
8839    public Base setProperty(int hash, String name, Base value) throws FHIRException {
8840      switch (hash) {
8841      case 1662702951: // operation
8842        this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
8843        return value;
8844      case -1408208058: // assert
8845        this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
8846        return value;
8847      default:
8848        return super.setProperty(hash, name, value);
8849      }
8850
8851    }
8852
8853    @Override
8854    public Base setProperty(String name, Base value) throws FHIRException {
8855      if (name.equals("operation")) {
8856        this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
8857      } else if (name.equals("assert")) {
8858        this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
8859      } else
8860        return super.setProperty(name, value);
8861      return value;
8862    }
8863
8864    @Override
8865    public Base makeProperty(int hash, String name) throws FHIRException {
8866      switch (hash) {
8867      case 1662702951:
8868        return getOperation();
8869      case -1408208058:
8870        return getAssert();
8871      default:
8872        return super.makeProperty(hash, name);
8873      }
8874
8875    }
8876
8877    @Override
8878    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
8879      switch (hash) {
8880      case 1662702951:
8881        /* operation */ return new String[] { "@TestScript.setup.action.operation" };
8882      case -1408208058:
8883        /* assert */ return new String[] { "@TestScript.setup.action.assert" };
8884      default:
8885        return super.getTypesForProperty(hash, name);
8886      }
8887
8888    }
8889
8890    @Override
8891    public Base addChild(String name) throws FHIRException {
8892      if (name.equals("operation")) {
8893        this.operation = new SetupActionOperationComponent();
8894        return this.operation;
8895      } else if (name.equals("assert")) {
8896        this.assert_ = new SetupActionAssertComponent();
8897        return this.assert_;
8898      } else
8899        return super.addChild(name);
8900    }
8901
8902    public TestActionComponent copy() {
8903      TestActionComponent dst = new TestActionComponent();
8904      copyValues(dst);
8905      return dst;
8906    }
8907
8908    public void copyValues(TestActionComponent dst) {
8909      super.copyValues(dst);
8910      dst.operation = operation == null ? null : operation.copy();
8911      dst.assert_ = assert_ == null ? null : assert_.copy();
8912    }
8913
8914    @Override
8915    public boolean equalsDeep(Base other_) {
8916      if (!super.equalsDeep(other_))
8917        return false;
8918      if (!(other_ instanceof TestActionComponent))
8919        return false;
8920      TestActionComponent o = (TestActionComponent) other_;
8921      return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true);
8922    }
8923
8924    @Override
8925    public boolean equalsShallow(Base other_) {
8926      if (!super.equalsShallow(other_))
8927        return false;
8928      if (!(other_ instanceof TestActionComponent))
8929        return false;
8930      TestActionComponent o = (TestActionComponent) other_;
8931      return true;
8932    }
8933
8934    public boolean isEmpty() {
8935      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation, assert_);
8936    }
8937
8938    public String fhirType() {
8939      return "TestScript.test.action";
8940
8941    }
8942
8943  }
8944
8945  @Block()
8946  public static class TestScriptTeardownComponent extends BackboneElement implements IBaseBackboneElement {
8947    /**
8948     * The teardown action will only contain an operation.
8949     */
8950    @Child(name = "action", type = {}, order = 1, min = 1, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
8951    @Description(shortDefinition = "One or more teardown operations to perform", formalDefinition = "The teardown action will only contain an operation.")
8952    protected List<TeardownActionComponent> action;
8953
8954    private static final long serialVersionUID = 1168638089L;
8955
8956    /**
8957     * Constructor
8958     */
8959    public TestScriptTeardownComponent() {
8960      super();
8961    }
8962
8963    /**
8964     * @return {@link #action} (The teardown action will only contain an operation.)
8965     */
8966    public List<TeardownActionComponent> getAction() {
8967      if (this.action == null)
8968        this.action = new ArrayList<TeardownActionComponent>();
8969      return this.action;
8970    }
8971
8972    /**
8973     * @return Returns a reference to <code>this</code> for easy method chaining
8974     */
8975    public TestScriptTeardownComponent setAction(List<TeardownActionComponent> theAction) {
8976      this.action = theAction;
8977      return this;
8978    }
8979
8980    public boolean hasAction() {
8981      if (this.action == null)
8982        return false;
8983      for (TeardownActionComponent item : this.action)
8984        if (!item.isEmpty())
8985          return true;
8986      return false;
8987    }
8988
8989    public TeardownActionComponent addAction() { // 3
8990      TeardownActionComponent t = new TeardownActionComponent();
8991      if (this.action == null)
8992        this.action = new ArrayList<TeardownActionComponent>();
8993      this.action.add(t);
8994      return t;
8995    }
8996
8997    public TestScriptTeardownComponent addAction(TeardownActionComponent t) { // 3
8998      if (t == null)
8999        return this;
9000      if (this.action == null)
9001        this.action = new ArrayList<TeardownActionComponent>();
9002      this.action.add(t);
9003      return this;
9004    }
9005
9006    /**
9007     * @return The first repetition of repeating field {@link #action}, creating it
9008     *         if it does not already exist
9009     */
9010    public TeardownActionComponent getActionFirstRep() {
9011      if (getAction().isEmpty()) {
9012        addAction();
9013      }
9014      return getAction().get(0);
9015    }
9016
9017    protected void listChildren(List<Property> children) {
9018      super.listChildren(children);
9019      children.add(new Property("action", "", "The teardown action will only contain an operation.", 0,
9020          java.lang.Integer.MAX_VALUE, action));
9021    }
9022
9023    @Override
9024    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
9025      switch (_hash) {
9026      case -1422950858:
9027        /* action */ return new Property("action", "", "The teardown action will only contain an operation.", 0,
9028            java.lang.Integer.MAX_VALUE, action);
9029      default:
9030        return super.getNamedProperty(_hash, _name, _checkValid);
9031      }
9032
9033    }
9034
9035    @Override
9036    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
9037      switch (hash) {
9038      case -1422950858:
9039        /* action */ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // TeardownActionComponent
9040      default:
9041        return super.getProperty(hash, name, checkValid);
9042      }
9043
9044    }
9045
9046    @Override
9047    public Base setProperty(int hash, String name, Base value) throws FHIRException {
9048      switch (hash) {
9049      case -1422950858: // action
9050        this.getAction().add((TeardownActionComponent) value); // TeardownActionComponent
9051        return value;
9052      default:
9053        return super.setProperty(hash, name, value);
9054      }
9055
9056    }
9057
9058    @Override
9059    public Base setProperty(String name, Base value) throws FHIRException {
9060      if (name.equals("action")) {
9061        this.getAction().add((TeardownActionComponent) value);
9062      } else
9063        return super.setProperty(name, value);
9064      return value;
9065    }
9066
9067    @Override
9068    public Base makeProperty(int hash, String name) throws FHIRException {
9069      switch (hash) {
9070      case -1422950858:
9071        return addAction();
9072      default:
9073        return super.makeProperty(hash, name);
9074      }
9075
9076    }
9077
9078    @Override
9079    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
9080      switch (hash) {
9081      case -1422950858:
9082        /* action */ return new String[] {};
9083      default:
9084        return super.getTypesForProperty(hash, name);
9085      }
9086
9087    }
9088
9089    @Override
9090    public Base addChild(String name) throws FHIRException {
9091      if (name.equals("action")) {
9092        return addAction();
9093      } else
9094        return super.addChild(name);
9095    }
9096
9097    public TestScriptTeardownComponent copy() {
9098      TestScriptTeardownComponent dst = new TestScriptTeardownComponent();
9099      copyValues(dst);
9100      return dst;
9101    }
9102
9103    public void copyValues(TestScriptTeardownComponent dst) {
9104      super.copyValues(dst);
9105      if (action != null) {
9106        dst.action = new ArrayList<TeardownActionComponent>();
9107        for (TeardownActionComponent i : action)
9108          dst.action.add(i.copy());
9109      }
9110      ;
9111    }
9112
9113    @Override
9114    public boolean equalsDeep(Base other_) {
9115      if (!super.equalsDeep(other_))
9116        return false;
9117      if (!(other_ instanceof TestScriptTeardownComponent))
9118        return false;
9119      TestScriptTeardownComponent o = (TestScriptTeardownComponent) other_;
9120      return compareDeep(action, o.action, true);
9121    }
9122
9123    @Override
9124    public boolean equalsShallow(Base other_) {
9125      if (!super.equalsShallow(other_))
9126        return false;
9127      if (!(other_ instanceof TestScriptTeardownComponent))
9128        return false;
9129      TestScriptTeardownComponent o = (TestScriptTeardownComponent) other_;
9130      return true;
9131    }
9132
9133    public boolean isEmpty() {
9134      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(action);
9135    }
9136
9137    public String fhirType() {
9138      return "TestScript.teardown";
9139
9140    }
9141
9142  }
9143
9144  @Block()
9145  public static class TeardownActionComponent extends BackboneElement implements IBaseBackboneElement {
9146    /**
9147     * An operation would involve a REST request to a server.
9148     */
9149    @Child(name = "operation", type = {
9150        SetupActionOperationComponent.class }, order = 1, min = 1, max = 1, modifier = false, summary = false)
9151    @Description(shortDefinition = "The teardown operation to perform", formalDefinition = "An operation would involve a REST request to a server.")
9152    protected SetupActionOperationComponent operation;
9153
9154    private static final long serialVersionUID = -1099598054L;
9155
9156    /**
9157     * Constructor
9158     */
9159    public TeardownActionComponent() {
9160      super();
9161    }
9162
9163    /**
9164     * Constructor
9165     */
9166    public TeardownActionComponent(SetupActionOperationComponent operation) {
9167      super();
9168      this.operation = operation;
9169    }
9170
9171    /**
9172     * @return {@link #operation} (An operation would involve a REST request to a
9173     *         server.)
9174     */
9175    public SetupActionOperationComponent getOperation() {
9176      if (this.operation == null)
9177        if (Configuration.errorOnAutoCreate())
9178          throw new Error("Attempt to auto-create TeardownActionComponent.operation");
9179        else if (Configuration.doAutoCreate())
9180          this.operation = new SetupActionOperationComponent(); // cc
9181      return this.operation;
9182    }
9183
9184    public boolean hasOperation() {
9185      return this.operation != null && !this.operation.isEmpty();
9186    }
9187
9188    /**
9189     * @param value {@link #operation} (An operation would involve a REST request to
9190     *              a server.)
9191     */
9192    public TeardownActionComponent setOperation(SetupActionOperationComponent value) {
9193      this.operation = value;
9194      return this;
9195    }
9196
9197    protected void listChildren(List<Property> children) {
9198      super.listChildren(children);
9199      children.add(new Property("operation", "@TestScript.setup.action.operation",
9200          "An operation would involve a REST request to a server.", 0, 1, operation));
9201    }
9202
9203    @Override
9204    public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
9205      switch (_hash) {
9206      case 1662702951:
9207        /* operation */ return new Property("operation", "@TestScript.setup.action.operation",
9208            "An operation would involve a REST request to a server.", 0, 1, operation);
9209      default:
9210        return super.getNamedProperty(_hash, _name, _checkValid);
9211      }
9212
9213    }
9214
9215    @Override
9216    public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
9217      switch (hash) {
9218      case 1662702951:
9219        /* operation */ return this.operation == null ? new Base[0] : new Base[] { this.operation }; // SetupActionOperationComponent
9220      default:
9221        return super.getProperty(hash, name, checkValid);
9222      }
9223
9224    }
9225
9226    @Override
9227    public Base setProperty(int hash, String name, Base value) throws FHIRException {
9228      switch (hash) {
9229      case 1662702951: // operation
9230        this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
9231        return value;
9232      default:
9233        return super.setProperty(hash, name, value);
9234      }
9235
9236    }
9237
9238    @Override
9239    public Base setProperty(String name, Base value) throws FHIRException {
9240      if (name.equals("operation")) {
9241        this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
9242      } else
9243        return super.setProperty(name, value);
9244      return value;
9245    }
9246
9247    @Override
9248    public Base makeProperty(int hash, String name) throws FHIRException {
9249      switch (hash) {
9250      case 1662702951:
9251        return getOperation();
9252      default:
9253        return super.makeProperty(hash, name);
9254      }
9255
9256    }
9257
9258    @Override
9259    public String[] getTypesForProperty(int hash, String name) throws FHIRException {
9260      switch (hash) {
9261      case 1662702951:
9262        /* operation */ return new String[] { "@TestScript.setup.action.operation" };
9263      default:
9264        return super.getTypesForProperty(hash, name);
9265      }
9266
9267    }
9268
9269    @Override
9270    public Base addChild(String name) throws FHIRException {
9271      if (name.equals("operation")) {
9272        this.operation = new SetupActionOperationComponent();
9273        return this.operation;
9274      } else
9275        return super.addChild(name);
9276    }
9277
9278    public TeardownActionComponent copy() {
9279      TeardownActionComponent dst = new TeardownActionComponent();
9280      copyValues(dst);
9281      return dst;
9282    }
9283
9284    public void copyValues(TeardownActionComponent dst) {
9285      super.copyValues(dst);
9286      dst.operation = operation == null ? null : operation.copy();
9287    }
9288
9289    @Override
9290    public boolean equalsDeep(Base other_) {
9291      if (!super.equalsDeep(other_))
9292        return false;
9293      if (!(other_ instanceof TeardownActionComponent))
9294        return false;
9295      TeardownActionComponent o = (TeardownActionComponent) other_;
9296      return compareDeep(operation, o.operation, true);
9297    }
9298
9299    @Override
9300    public boolean equalsShallow(Base other_) {
9301      if (!super.equalsShallow(other_))
9302        return false;
9303      if (!(other_ instanceof TeardownActionComponent))
9304        return false;
9305      TeardownActionComponent o = (TeardownActionComponent) other_;
9306      return true;
9307    }
9308
9309    public boolean isEmpty() {
9310      return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation);
9311    }
9312
9313    public String fhirType() {
9314      return "TestScript.teardown.action";
9315
9316    }
9317
9318  }
9319
9320  /**
9321   * A formal identifier that is used to identify this test script when it is
9322   * represented in other formats, or referenced in a specification, model, design
9323   * or an instance.
9324   */
9325  @Child(name = "identifier", type = {
9326      Identifier.class }, order = 0, min = 0, max = 1, modifier = false, summary = true)
9327  @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.")
9328  protected Identifier identifier;
9329
9330  /**
9331   * Explanation of why this test script is needed and why it has been designed as
9332   * it has.
9333   */
9334  @Child(name = "purpose", type = {
9335      MarkdownType.class }, order = 1, min = 0, max = 1, modifier = false, summary = false)
9336  @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.")
9337  protected MarkdownType purpose;
9338
9339  /**
9340   * A copyright statement relating to the test script and/or its contents.
9341   * Copyright statements are generally legal restrictions on the use and
9342   * publishing of the test script.
9343   */
9344  @Child(name = "copyright", type = {
9345      MarkdownType.class }, order = 2, min = 0, max = 1, modifier = false, summary = false)
9346  @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.")
9347  protected MarkdownType copyright;
9348
9349  /**
9350   * An abstract server used in operations within this test script in the origin
9351   * element.
9352   */
9353  @Child(name = "origin", type = {}, order = 3, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
9354  @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.")
9355  protected List<TestScriptOriginComponent> origin;
9356
9357  /**
9358   * An abstract server used in operations within this test script in the
9359   * destination element.
9360   */
9361  @Child(name = "destination", type = {}, order = 4, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
9362  @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.")
9363  protected List<TestScriptDestinationComponent> destination;
9364
9365  /**
9366   * The required capability must exist and are assumed to function correctly on
9367   * the FHIR server being tested.
9368   */
9369  @Child(name = "metadata", type = {}, order = 5, min = 0, max = 1, modifier = false, summary = false)
9370  @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.")
9371  protected TestScriptMetadataComponent metadata;
9372
9373  /**
9374   * Fixture in the test script - by reference (uri). All fixtures are required
9375   * for the test script to execute.
9376   */
9377  @Child(name = "fixture", type = {}, order = 6, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
9378  @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.")
9379  protected List<TestScriptFixtureComponent> fixture;
9380
9381  /**
9382   * Reference to the profile to be used for validation.
9383   */
9384  @Child(name = "profile", type = {
9385      Reference.class }, order = 7, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
9386  @Description(shortDefinition = "Reference of the validation profile", formalDefinition = "Reference to the profile to be used for validation.")
9387  protected List<Reference> profile;
9388  /**
9389   * The actual objects that are the target of the reference (Reference to the
9390   * profile to be used for validation.)
9391   */
9392  protected List<Resource> profileTarget;
9393
9394  /**
9395   * Variable is set based either on element value in response body or on header
9396   * field value in the response headers.
9397   */
9398  @Child(name = "variable", type = {}, order = 8, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
9399  @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.")
9400  protected List<TestScriptVariableComponent> variable;
9401
9402  /**
9403   * A series of required setup operations before tests are executed.
9404   */
9405  @Child(name = "setup", type = {}, order = 9, min = 0, max = 1, modifier = false, summary = false)
9406  @Description(shortDefinition = "A series of required setup operations before tests are executed", formalDefinition = "A series of required setup operations before tests are executed.")
9407  protected TestScriptSetupComponent setup;
9408
9409  /**
9410   * A test in this script.
9411   */
9412  @Child(name = "test", type = {}, order = 10, min = 0, max = Child.MAX_UNLIMITED, modifier = false, summary = false)
9413  @Description(shortDefinition = "A test in this script", formalDefinition = "A test in this script.")
9414  protected List<TestScriptTestComponent> test;
9415
9416  /**
9417   * A series of operations required to clean up after all the tests are executed
9418   * (successfully or otherwise).
9419   */
9420  @Child(name = "teardown", type = {}, order = 11, min = 0, max = 1, modifier = false, summary = false)
9421  @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).")
9422  protected TestScriptTeardownComponent teardown;
9423
9424  private static final long serialVersionUID = -1433230137L;
9425
9426  /**
9427   * Constructor
9428   */
9429  public TestScript() {
9430    super();
9431  }
9432
9433  /**
9434   * Constructor
9435   */
9436  public TestScript(UriType url, StringType name, Enumeration<PublicationStatus> status) {
9437    super();
9438    this.url = url;
9439    this.name = name;
9440    this.status = status;
9441  }
9442
9443  /**
9444   * @return {@link #url} (An absolute URI that is used to identify this test
9445   *         script when it is referenced in a specification, model, design or an
9446   *         instance; also called its canonical identifier. This SHOULD be
9447   *         globally unique and SHOULD be a literal address at which at which an
9448   *         authoritative instance of this test script is (or will be) published.
9449   *         This URL can be the target of a canonical reference. It SHALL remain
9450   *         the same when the test script is stored on different servers.). This
9451   *         is the underlying object with id, value and extensions. The accessor
9452   *         "getUrl" gives direct access to the value
9453   */
9454  public UriType getUrlElement() {
9455    if (this.url == null)
9456      if (Configuration.errorOnAutoCreate())
9457        throw new Error("Attempt to auto-create TestScript.url");
9458      else if (Configuration.doAutoCreate())
9459        this.url = new UriType(); // bb
9460    return this.url;
9461  }
9462
9463  public boolean hasUrlElement() {
9464    return this.url != null && !this.url.isEmpty();
9465  }
9466
9467  public boolean hasUrl() {
9468    return this.url != null && !this.url.isEmpty();
9469  }
9470
9471  /**
9472   * @param value {@link #url} (An absolute URI that is used to identify this test
9473   *              script when it is referenced in a specification, model, design
9474   *              or an instance; also called its canonical identifier. This
9475   *              SHOULD be globally unique and SHOULD be a literal address at
9476   *              which at which an authoritative instance of this test script is
9477   *              (or will be) published. This URL can be the target of a
9478   *              canonical reference. It SHALL remain the same when the test
9479   *              script is stored on different servers.). This is the underlying
9480   *              object with id, value and extensions. The accessor "getUrl"
9481   *              gives direct access to the value
9482   */
9483  public TestScript setUrlElement(UriType value) {
9484    this.url = value;
9485    return this;
9486  }
9487
9488  /**
9489   * @return An absolute URI that is used to identify this test script when it is
9490   *         referenced in a specification, model, design or an instance; also
9491   *         called its canonical identifier. This SHOULD be globally unique and
9492   *         SHOULD be a literal address at which at which an authoritative
9493   *         instance of this test script is (or will be) published. This URL can
9494   *         be the target of a canonical reference. It SHALL remain the same when
9495   *         the test script is stored on different servers.
9496   */
9497  public String getUrl() {
9498    return this.url == null ? null : this.url.getValue();
9499  }
9500
9501  /**
9502   * @param value An absolute URI that is used to identify this test script when
9503   *              it is referenced in a specification, model, design or an
9504   *              instance; also called its canonical identifier. This SHOULD be
9505   *              globally unique and SHOULD be a literal address at which at
9506   *              which an authoritative instance of this test script is (or will
9507   *              be) published. This URL can be the target of a canonical
9508   *              reference. It SHALL remain the same when the test script is
9509   *              stored on different servers.
9510   */
9511  public TestScript setUrl(String value) {
9512    if (this.url == null)
9513      this.url = new UriType();
9514    this.url.setValue(value);
9515    return this;
9516  }
9517
9518  /**
9519   * @return {@link #identifier} (A formal identifier that is used to identify
9520   *         this test script when it is represented in other formats, or
9521   *         referenced in a specification, model, design or an instance.)
9522   */
9523  public Identifier getIdentifier() {
9524    if (this.identifier == null)
9525      if (Configuration.errorOnAutoCreate())
9526        throw new Error("Attempt to auto-create TestScript.identifier");
9527      else if (Configuration.doAutoCreate())
9528        this.identifier = new Identifier(); // cc
9529    return this.identifier;
9530  }
9531
9532  public boolean hasIdentifier() {
9533    return this.identifier != null && !this.identifier.isEmpty();
9534  }
9535
9536  /**
9537   * @param value {@link #identifier} (A formal identifier that is used to
9538   *              identify this test script when it is represented in other
9539   *              formats, or referenced in a specification, model, design or an
9540   *              instance.)
9541   */
9542  public TestScript setIdentifier(Identifier value) {
9543    this.identifier = value;
9544    return this;
9545  }
9546
9547  /**
9548   * @return {@link #version} (The identifier that is used to identify this
9549   *         version of the test script when it is referenced in a specification,
9550   *         model, design or instance. This is an arbitrary value managed by the
9551   *         test script author and is not expected to be globally unique. For
9552   *         example, it might be a timestamp (e.g. yyyymmdd) if a managed version
9553   *         is not available. There is also no expectation that versions can be
9554   *         placed in a lexicographical sequence.). This is the underlying object
9555   *         with id, value and extensions. The accessor "getVersion" gives direct
9556   *         access to the value
9557   */
9558  public StringType getVersionElement() {
9559    if (this.version == null)
9560      if (Configuration.errorOnAutoCreate())
9561        throw new Error("Attempt to auto-create TestScript.version");
9562      else if (Configuration.doAutoCreate())
9563        this.version = new StringType(); // bb
9564    return this.version;
9565  }
9566
9567  public boolean hasVersionElement() {
9568    return this.version != null && !this.version.isEmpty();
9569  }
9570
9571  public boolean hasVersion() {
9572    return this.version != null && !this.version.isEmpty();
9573  }
9574
9575  /**
9576   * @param value {@link #version} (The identifier that is used to identify this
9577   *              version of the test script when it is referenced in a
9578   *              specification, model, design or instance. This is an arbitrary
9579   *              value managed by the test script author and is not expected to
9580   *              be globally unique. For example, it might be a timestamp (e.g.
9581   *              yyyymmdd) if a managed version is not available. There is also
9582   *              no expectation that versions can be placed in a lexicographical
9583   *              sequence.). This is the underlying object with id, value and
9584   *              extensions. The accessor "getVersion" gives direct access to the
9585   *              value
9586   */
9587  public TestScript setVersionElement(StringType value) {
9588    this.version = value;
9589    return this;
9590  }
9591
9592  /**
9593   * @return The identifier that is used to identify this version of the test
9594   *         script when it is referenced in a specification, model, design or
9595   *         instance. This is an arbitrary value managed by the test script
9596   *         author and is not expected to be globally unique. For example, it
9597   *         might be a timestamp (e.g. yyyymmdd) if a managed version is not
9598   *         available. There is also no expectation that versions can be placed
9599   *         in a lexicographical sequence.
9600   */
9601  public String getVersion() {
9602    return this.version == null ? null : this.version.getValue();
9603  }
9604
9605  /**
9606   * @param value The identifier that is used to identify this version of the test
9607   *              script when it is referenced in a specification, model, design
9608   *              or instance. This is an arbitrary value managed by the test
9609   *              script author and is not expected to be globally unique. For
9610   *              example, it might be a timestamp (e.g. yyyymmdd) if a managed
9611   *              version is not available. There is also no expectation that
9612   *              versions can be placed in a lexicographical sequence.
9613   */
9614  public TestScript setVersion(String value) {
9615    if (Utilities.noString(value))
9616      this.version = null;
9617    else {
9618      if (this.version == null)
9619        this.version = new StringType();
9620      this.version.setValue(value);
9621    }
9622    return this;
9623  }
9624
9625  /**
9626   * @return {@link #name} (A natural language name identifying the test script.
9627   *         This name should be usable as an identifier for the module by machine
9628   *         processing applications such as code generation.). This is the
9629   *         underlying object with id, value and extensions. The accessor
9630   *         "getName" gives direct access to the value
9631   */
9632  public StringType getNameElement() {
9633    if (this.name == null)
9634      if (Configuration.errorOnAutoCreate())
9635        throw new Error("Attempt to auto-create TestScript.name");
9636      else if (Configuration.doAutoCreate())
9637        this.name = new StringType(); // bb
9638    return this.name;
9639  }
9640
9641  public boolean hasNameElement() {
9642    return this.name != null && !this.name.isEmpty();
9643  }
9644
9645  public boolean hasName() {
9646    return this.name != null && !this.name.isEmpty();
9647  }
9648
9649  /**
9650   * @param value {@link #name} (A natural language name identifying the test
9651   *              script. This name should be usable as an identifier for the
9652   *              module by machine processing applications such as code
9653   *              generation.). This is the underlying object with id, value and
9654   *              extensions. The accessor "getName" gives direct access to the
9655   *              value
9656   */
9657  public TestScript setNameElement(StringType value) {
9658    this.name = value;
9659    return this;
9660  }
9661
9662  /**
9663   * @return A natural language name identifying the test script. This name should
9664   *         be usable as an identifier for the module by machine processing
9665   *         applications such as code generation.
9666   */
9667  public String getName() {
9668    return this.name == null ? null : this.name.getValue();
9669  }
9670
9671  /**
9672   * @param value A natural language name identifying the test script. This name
9673   *              should be usable as an identifier for the module by machine
9674   *              processing applications such as code generation.
9675   */
9676  public TestScript setName(String value) {
9677    if (this.name == null)
9678      this.name = new StringType();
9679    this.name.setValue(value);
9680    return this;
9681  }
9682
9683  /**
9684   * @return {@link #title} (A short, descriptive, user-friendly title for the
9685   *         test script.). This is the underlying object with id, value and
9686   *         extensions. The accessor "getTitle" gives direct access to the value
9687   */
9688  public StringType getTitleElement() {
9689    if (this.title == null)
9690      if (Configuration.errorOnAutoCreate())
9691        throw new Error("Attempt to auto-create TestScript.title");
9692      else if (Configuration.doAutoCreate())
9693        this.title = new StringType(); // bb
9694    return this.title;
9695  }
9696
9697  public boolean hasTitleElement() {
9698    return this.title != null && !this.title.isEmpty();
9699  }
9700
9701  public boolean hasTitle() {
9702    return this.title != null && !this.title.isEmpty();
9703  }
9704
9705  /**
9706   * @param value {@link #title} (A short, descriptive, user-friendly title for
9707   *              the test script.). This is the underlying object with id, value
9708   *              and extensions. The accessor "getTitle" gives direct access to
9709   *              the value
9710   */
9711  public TestScript setTitleElement(StringType value) {
9712    this.title = value;
9713    return this;
9714  }
9715
9716  /**
9717   * @return A short, descriptive, user-friendly title for the test script.
9718   */
9719  public String getTitle() {
9720    return this.title == null ? null : this.title.getValue();
9721  }
9722
9723  /**
9724   * @param value A short, descriptive, user-friendly title for the test script.
9725   */
9726  public TestScript setTitle(String value) {
9727    if (Utilities.noString(value))
9728      this.title = null;
9729    else {
9730      if (this.title == null)
9731        this.title = new StringType();
9732      this.title.setValue(value);
9733    }
9734    return this;
9735  }
9736
9737  /**
9738   * @return {@link #status} (The status of this test script. Enables tracking the
9739   *         life-cycle of the content.). This is the underlying object with id,
9740   *         value and extensions. The accessor "getStatus" gives direct access to
9741   *         the value
9742   */
9743  public Enumeration<PublicationStatus> getStatusElement() {
9744    if (this.status == null)
9745      if (Configuration.errorOnAutoCreate())
9746        throw new Error("Attempt to auto-create TestScript.status");
9747      else if (Configuration.doAutoCreate())
9748        this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
9749    return this.status;
9750  }
9751
9752  public boolean hasStatusElement() {
9753    return this.status != null && !this.status.isEmpty();
9754  }
9755
9756  public boolean hasStatus() {
9757    return this.status != null && !this.status.isEmpty();
9758  }
9759
9760  /**
9761   * @param value {@link #status} (The status of this test script. Enables
9762   *              tracking the life-cycle of the content.). This is the underlying
9763   *              object with id, value and extensions. The accessor "getStatus"
9764   *              gives direct access to the value
9765   */
9766  public TestScript setStatusElement(Enumeration<PublicationStatus> value) {
9767    this.status = value;
9768    return this;
9769  }
9770
9771  /**
9772   * @return The status of this test script. Enables tracking the life-cycle of
9773   *         the content.
9774   */
9775  public PublicationStatus getStatus() {
9776    return this.status == null ? null : this.status.getValue();
9777  }
9778
9779  /**
9780   * @param value The status of this test script. Enables tracking the life-cycle
9781   *              of the content.
9782   */
9783  public TestScript setStatus(PublicationStatus value) {
9784    if (this.status == null)
9785      this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
9786    this.status.setValue(value);
9787    return this;
9788  }
9789
9790  /**
9791   * @return {@link #experimental} (A Boolean value to indicate that this test
9792   *         script is authored for testing purposes (or
9793   *         education/evaluation/marketing) and is not intended to be used for
9794   *         genuine usage.). This is the underlying object with id, value and
9795   *         extensions. The accessor "getExperimental" gives direct access to the
9796   *         value
9797   */
9798  public BooleanType getExperimentalElement() {
9799    if (this.experimental == null)
9800      if (Configuration.errorOnAutoCreate())
9801        throw new Error("Attempt to auto-create TestScript.experimental");
9802      else if (Configuration.doAutoCreate())
9803        this.experimental = new BooleanType(); // bb
9804    return this.experimental;
9805  }
9806
9807  public boolean hasExperimentalElement() {
9808    return this.experimental != null && !this.experimental.isEmpty();
9809  }
9810
9811  public boolean hasExperimental() {
9812    return this.experimental != null && !this.experimental.isEmpty();
9813  }
9814
9815  /**
9816   * @param value {@link #experimental} (A Boolean value to indicate that this
9817   *              test script is authored for testing purposes (or
9818   *              education/evaluation/marketing) and is not intended to be used
9819   *              for genuine usage.). This is the underlying object with id,
9820   *              value and extensions. The accessor "getExperimental" gives
9821   *              direct access to the value
9822   */
9823  public TestScript setExperimentalElement(BooleanType value) {
9824    this.experimental = value;
9825    return this;
9826  }
9827
9828  /**
9829   * @return A Boolean value to indicate that this test script is authored for
9830   *         testing purposes (or education/evaluation/marketing) and is not
9831   *         intended to be used for genuine usage.
9832   */
9833  public boolean getExperimental() {
9834    return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
9835  }
9836
9837  /**
9838   * @param value A Boolean value to indicate that this test script is authored
9839   *              for testing purposes (or education/evaluation/marketing) and is
9840   *              not intended to be used for genuine usage.
9841   */
9842  public TestScript setExperimental(boolean value) {
9843    if (this.experimental == null)
9844      this.experimental = new BooleanType();
9845    this.experimental.setValue(value);
9846    return this;
9847  }
9848
9849  /**
9850   * @return {@link #date} (The date (and optionally time) when the test script
9851   *         was published. The date must change when the business version changes
9852   *         and it must change if the status code changes. In addition, it should
9853   *         change when the substantive content of the test script changes.).
9854   *         This is the underlying object with id, value and extensions. The
9855   *         accessor "getDate" gives direct access to the value
9856   */
9857  public DateTimeType getDateElement() {
9858    if (this.date == null)
9859      if (Configuration.errorOnAutoCreate())
9860        throw new Error("Attempt to auto-create TestScript.date");
9861      else if (Configuration.doAutoCreate())
9862        this.date = new DateTimeType(); // bb
9863    return this.date;
9864  }
9865
9866  public boolean hasDateElement() {
9867    return this.date != null && !this.date.isEmpty();
9868  }
9869
9870  public boolean hasDate() {
9871    return this.date != null && !this.date.isEmpty();
9872  }
9873
9874  /**
9875   * @param value {@link #date} (The date (and optionally time) when the test
9876   *              script was published. The date must change when the business
9877   *              version changes and it must change if the status code changes.
9878   *              In addition, it should change when the substantive content of
9879   *              the test script changes.). This is the underlying object with
9880   *              id, value and extensions. The accessor "getDate" gives direct
9881   *              access to the value
9882   */
9883  public TestScript setDateElement(DateTimeType value) {
9884    this.date = value;
9885    return this;
9886  }
9887
9888  /**
9889   * @return The date (and optionally time) when the test script was published.
9890   *         The date must change when the business version changes and it must
9891   *         change if the status code changes. In addition, it should change when
9892   *         the substantive content of the test script changes.
9893   */
9894  public Date getDate() {
9895    return this.date == null ? null : this.date.getValue();
9896  }
9897
9898  /**
9899   * @param value The date (and optionally time) when the test script was
9900   *              published. The date must change when the business version
9901   *              changes and it must change if the status code changes. In
9902   *              addition, it should change when the substantive content of the
9903   *              test script changes.
9904   */
9905  public TestScript setDate(Date value) {
9906    if (value == null)
9907      this.date = null;
9908    else {
9909      if (this.date == null)
9910        this.date = new DateTimeType();
9911      this.date.setValue(value);
9912    }
9913    return this;
9914  }
9915
9916  /**
9917   * @return {@link #publisher} (The name of the organization or individual that
9918   *         published the test script.). This is the underlying object with id,
9919   *         value and extensions. The accessor "getPublisher" gives direct access
9920   *         to the value
9921   */
9922  public StringType getPublisherElement() {
9923    if (this.publisher == null)
9924      if (Configuration.errorOnAutoCreate())
9925        throw new Error("Attempt to auto-create TestScript.publisher");
9926      else if (Configuration.doAutoCreate())
9927        this.publisher = new StringType(); // bb
9928    return this.publisher;
9929  }
9930
9931  public boolean hasPublisherElement() {
9932    return this.publisher != null && !this.publisher.isEmpty();
9933  }
9934
9935  public boolean hasPublisher() {
9936    return this.publisher != null && !this.publisher.isEmpty();
9937  }
9938
9939  /**
9940   * @param value {@link #publisher} (The name of the organization or individual
9941   *              that published the test script.). This is the underlying object
9942   *              with id, value and extensions. The accessor "getPublisher" gives
9943   *              direct access to the value
9944   */
9945  public TestScript setPublisherElement(StringType value) {
9946    this.publisher = value;
9947    return this;
9948  }
9949
9950  /**
9951   * @return The name of the organization or individual that published the test
9952   *         script.
9953   */
9954  public String getPublisher() {
9955    return this.publisher == null ? null : this.publisher.getValue();
9956  }
9957
9958  /**
9959   * @param value The name of the organization or individual that published the
9960   *              test script.
9961   */
9962  public TestScript setPublisher(String value) {
9963    if (Utilities.noString(value))
9964      this.publisher = null;
9965    else {
9966      if (this.publisher == null)
9967        this.publisher = new StringType();
9968      this.publisher.setValue(value);
9969    }
9970    return this;
9971  }
9972
9973  /**
9974   * @return {@link #contact} (Contact details to assist a user in finding and
9975   *         communicating with the publisher.)
9976   */
9977  public List<ContactDetail> getContact() {
9978    if (this.contact == null)
9979      this.contact = new ArrayList<ContactDetail>();
9980    return this.contact;
9981  }
9982
9983  /**
9984   * @return Returns a reference to <code>this</code> for easy method chaining
9985   */
9986  public TestScript setContact(List<ContactDetail> theContact) {
9987    this.contact = theContact;
9988    return this;
9989  }
9990
9991  public boolean hasContact() {
9992    if (this.contact == null)
9993      return false;
9994    for (ContactDetail item : this.contact)
9995      if (!item.isEmpty())
9996        return true;
9997    return false;
9998  }
9999
10000  public ContactDetail addContact() { // 3
10001    ContactDetail t = new ContactDetail();
10002    if (this.contact == null)
10003      this.contact = new ArrayList<ContactDetail>();
10004    this.contact.add(t);
10005    return t;
10006  }
10007
10008  public TestScript addContact(ContactDetail t) { // 3
10009    if (t == null)
10010      return this;
10011    if (this.contact == null)
10012      this.contact = new ArrayList<ContactDetail>();
10013    this.contact.add(t);
10014    return this;
10015  }
10016
10017  /**
10018   * @return The first repetition of repeating field {@link #contact}, creating it
10019   *         if it does not already exist
10020   */
10021  public ContactDetail getContactFirstRep() {
10022    if (getContact().isEmpty()) {
10023      addContact();
10024    }
10025    return getContact().get(0);
10026  }
10027
10028  /**
10029   * @return {@link #description} (A free text natural language description of the
10030   *         test script from a consumer's perspective.). This is the underlying
10031   *         object with id, value and extensions. The accessor "getDescription"
10032   *         gives direct access to the value
10033   */
10034  public MarkdownType getDescriptionElement() {
10035    if (this.description == null)
10036      if (Configuration.errorOnAutoCreate())
10037        throw new Error("Attempt to auto-create TestScript.description");
10038      else if (Configuration.doAutoCreate())
10039        this.description = new MarkdownType(); // bb
10040    return this.description;
10041  }
10042
10043  public boolean hasDescriptionElement() {
10044    return this.description != null && !this.description.isEmpty();
10045  }
10046
10047  public boolean hasDescription() {
10048    return this.description != null && !this.description.isEmpty();
10049  }
10050
10051  /**
10052   * @param value {@link #description} (A free text natural language description
10053   *              of the test script from a consumer's perspective.). This is the
10054   *              underlying object with id, value and extensions. The accessor
10055   *              "getDescription" gives direct access to the value
10056   */
10057  public TestScript setDescriptionElement(MarkdownType value) {
10058    this.description = value;
10059    return this;
10060  }
10061
10062  /**
10063   * @return A free text natural language description of the test script from a
10064   *         consumer's perspective.
10065   */
10066  public String getDescription() {
10067    return this.description == null ? null : this.description.getValue();
10068  }
10069
10070  /**
10071   * @param value A free text natural language description of the test script from
10072   *              a consumer's perspective.
10073   */
10074  public TestScript setDescription(String value) {
10075    if (value == null)
10076      this.description = null;
10077    else {
10078      if (this.description == null)
10079        this.description = new MarkdownType();
10080      this.description.setValue(value);
10081    }
10082    return this;
10083  }
10084
10085  /**
10086   * @return {@link #useContext} (The content was developed with a focus and
10087   *         intent of supporting the contexts that are listed. These contexts may
10088   *         be general categories (gender, age, ...) or may be references to
10089   *         specific programs (insurance plans, studies, ...) and may be used to
10090   *         assist with indexing and searching for appropriate test script
10091   *         instances.)
10092   */
10093  public List<UsageContext> getUseContext() {
10094    if (this.useContext == null)
10095      this.useContext = new ArrayList<UsageContext>();
10096    return this.useContext;
10097  }
10098
10099  /**
10100   * @return Returns a reference to <code>this</code> for easy method chaining
10101   */
10102  public TestScript setUseContext(List<UsageContext> theUseContext) {
10103    this.useContext = theUseContext;
10104    return this;
10105  }
10106
10107  public boolean hasUseContext() {
10108    if (this.useContext == null)
10109      return false;
10110    for (UsageContext item : this.useContext)
10111      if (!item.isEmpty())
10112        return true;
10113    return false;
10114  }
10115
10116  public UsageContext addUseContext() { // 3
10117    UsageContext t = new UsageContext();
10118    if (this.useContext == null)
10119      this.useContext = new ArrayList<UsageContext>();
10120    this.useContext.add(t);
10121    return t;
10122  }
10123
10124  public TestScript addUseContext(UsageContext t) { // 3
10125    if (t == null)
10126      return this;
10127    if (this.useContext == null)
10128      this.useContext = new ArrayList<UsageContext>();
10129    this.useContext.add(t);
10130    return this;
10131  }
10132
10133  /**
10134   * @return The first repetition of repeating field {@link #useContext}, creating
10135   *         it if it does not already exist
10136   */
10137  public UsageContext getUseContextFirstRep() {
10138    if (getUseContext().isEmpty()) {
10139      addUseContext();
10140    }
10141    return getUseContext().get(0);
10142  }
10143
10144  /**
10145   * @return {@link #jurisdiction} (A legal or geographic region in which the test
10146   *         script is intended to be used.)
10147   */
10148  public List<CodeableConcept> getJurisdiction() {
10149    if (this.jurisdiction == null)
10150      this.jurisdiction = new ArrayList<CodeableConcept>();
10151    return this.jurisdiction;
10152  }
10153
10154  /**
10155   * @return Returns a reference to <code>this</code> for easy method chaining
10156   */
10157  public TestScript setJurisdiction(List<CodeableConcept> theJurisdiction) {
10158    this.jurisdiction = theJurisdiction;
10159    return this;
10160  }
10161
10162  public boolean hasJurisdiction() {
10163    if (this.jurisdiction == null)
10164      return false;
10165    for (CodeableConcept item : this.jurisdiction)
10166      if (!item.isEmpty())
10167        return true;
10168    return false;
10169  }
10170
10171  public CodeableConcept addJurisdiction() { // 3
10172    CodeableConcept t = new CodeableConcept();
10173    if (this.jurisdiction == null)
10174      this.jurisdiction = new ArrayList<CodeableConcept>();
10175    this.jurisdiction.add(t);
10176    return t;
10177  }
10178
10179  public TestScript addJurisdiction(CodeableConcept t) { // 3
10180    if (t == null)
10181      return this;
10182    if (this.jurisdiction == null)
10183      this.jurisdiction = new ArrayList<CodeableConcept>();
10184    this.jurisdiction.add(t);
10185    return this;
10186  }
10187
10188  /**
10189   * @return The first repetition of repeating field {@link #jurisdiction},
10190   *         creating it if it does not already exist
10191   */
10192  public CodeableConcept getJurisdictionFirstRep() {
10193    if (getJurisdiction().isEmpty()) {
10194      addJurisdiction();
10195    }
10196    return getJurisdiction().get(0);
10197  }
10198
10199  /**
10200   * @return {@link #purpose} (Explanation of why this test script is needed and
10201   *         why it has been designed as it has.). This is the underlying object
10202   *         with id, value and extensions. The accessor "getPurpose" gives direct
10203   *         access to the value
10204   */
10205  public MarkdownType getPurposeElement() {
10206    if (this.purpose == null)
10207      if (Configuration.errorOnAutoCreate())
10208        throw new Error("Attempt to auto-create TestScript.purpose");
10209      else if (Configuration.doAutoCreate())
10210        this.purpose = new MarkdownType(); // bb
10211    return this.purpose;
10212  }
10213
10214  public boolean hasPurposeElement() {
10215    return this.purpose != null && !this.purpose.isEmpty();
10216  }
10217
10218  public boolean hasPurpose() {
10219    return this.purpose != null && !this.purpose.isEmpty();
10220  }
10221
10222  /**
10223   * @param value {@link #purpose} (Explanation of why this test script is needed
10224   *              and why it has been designed as it has.). This is the underlying
10225   *              object with id, value and extensions. The accessor "getPurpose"
10226   *              gives direct access to the value
10227   */
10228  public TestScript setPurposeElement(MarkdownType value) {
10229    this.purpose = value;
10230    return this;
10231  }
10232
10233  /**
10234   * @return Explanation of why this test script is needed and why it has been
10235   *         designed as it has.
10236   */
10237  public String getPurpose() {
10238    return this.purpose == null ? null : this.purpose.getValue();
10239  }
10240
10241  /**
10242   * @param value Explanation of why this test script is needed and why it has
10243   *              been designed as it has.
10244   */
10245  public TestScript setPurpose(String value) {
10246    if (value == null)
10247      this.purpose = null;
10248    else {
10249      if (this.purpose == null)
10250        this.purpose = new MarkdownType();
10251      this.purpose.setValue(value);
10252    }
10253    return this;
10254  }
10255
10256  /**
10257   * @return {@link #copyright} (A copyright statement relating to the test script
10258   *         and/or its contents. Copyright statements are generally legal
10259   *         restrictions on the use and publishing of the test script.). This is
10260   *         the underlying object with id, value and extensions. The accessor
10261   *         "getCopyright" gives direct access to the value
10262   */
10263  public MarkdownType getCopyrightElement() {
10264    if (this.copyright == null)
10265      if (Configuration.errorOnAutoCreate())
10266        throw new Error("Attempt to auto-create TestScript.copyright");
10267      else if (Configuration.doAutoCreate())
10268        this.copyright = new MarkdownType(); // bb
10269    return this.copyright;
10270  }
10271
10272  public boolean hasCopyrightElement() {
10273    return this.copyright != null && !this.copyright.isEmpty();
10274  }
10275
10276  public boolean hasCopyright() {
10277    return this.copyright != null && !this.copyright.isEmpty();
10278  }
10279
10280  /**
10281   * @param value {@link #copyright} (A copyright statement relating to the test
10282   *              script and/or its contents. Copyright statements are generally
10283   *              legal restrictions on the use and publishing of the test
10284   *              script.). This is the underlying object with id, value and
10285   *              extensions. The accessor "getCopyright" gives direct access to
10286   *              the value
10287   */
10288  public TestScript setCopyrightElement(MarkdownType value) {
10289    this.copyright = value;
10290    return this;
10291  }
10292
10293  /**
10294   * @return A copyright statement relating to the test script and/or its
10295   *         contents. Copyright statements are generally legal restrictions on
10296   *         the use and publishing of the test script.
10297   */
10298  public String getCopyright() {
10299    return this.copyright == null ? null : this.copyright.getValue();
10300  }
10301
10302  /**
10303   * @param value A copyright statement relating to the test script and/or its
10304   *              contents. Copyright statements are generally legal restrictions
10305   *              on the use and publishing of the test script.
10306   */
10307  public TestScript setCopyright(String value) {
10308    if (value == null)
10309      this.copyright = null;
10310    else {
10311      if (this.copyright == null)
10312        this.copyright = new MarkdownType();
10313      this.copyright.setValue(value);
10314    }
10315    return this;
10316  }
10317
10318  /**
10319   * @return {@link #origin} (An abstract server used in operations within this
10320   *         test script in the origin element.)
10321   */
10322  public List<TestScriptOriginComponent> getOrigin() {
10323    if (this.origin == null)
10324      this.origin = new ArrayList<TestScriptOriginComponent>();
10325    return this.origin;
10326  }
10327
10328  /**
10329   * @return Returns a reference to <code>this</code> for easy method chaining
10330   */
10331  public TestScript setOrigin(List<TestScriptOriginComponent> theOrigin) {
10332    this.origin = theOrigin;
10333    return this;
10334  }
10335
10336  public boolean hasOrigin() {
10337    if (this.origin == null)
10338      return false;
10339    for (TestScriptOriginComponent item : this.origin)
10340      if (!item.isEmpty())
10341        return true;
10342    return false;
10343  }
10344
10345  public TestScriptOriginComponent addOrigin() { // 3
10346    TestScriptOriginComponent t = new TestScriptOriginComponent();
10347    if (this.origin == null)
10348      this.origin = new ArrayList<TestScriptOriginComponent>();
10349    this.origin.add(t);
10350    return t;
10351  }
10352
10353  public TestScript addOrigin(TestScriptOriginComponent t) { // 3
10354    if (t == null)
10355      return this;
10356    if (this.origin == null)
10357      this.origin = new ArrayList<TestScriptOriginComponent>();
10358    this.origin.add(t);
10359    return this;
10360  }
10361
10362  /**
10363   * @return The first repetition of repeating field {@link #origin}, creating it
10364   *         if it does not already exist
10365   */
10366  public TestScriptOriginComponent getOriginFirstRep() {
10367    if (getOrigin().isEmpty()) {
10368      addOrigin();
10369    }
10370    return getOrigin().get(0);
10371  }
10372
10373  /**
10374   * @return {@link #destination} (An abstract server used in operations within
10375   *         this test script in the destination element.)
10376   */
10377  public List<TestScriptDestinationComponent> getDestination() {
10378    if (this.destination == null)
10379      this.destination = new ArrayList<TestScriptDestinationComponent>();
10380    return this.destination;
10381  }
10382
10383  /**
10384   * @return Returns a reference to <code>this</code> for easy method chaining
10385   */
10386  public TestScript setDestination(List<TestScriptDestinationComponent> theDestination) {
10387    this.destination = theDestination;
10388    return this;
10389  }
10390
10391  public boolean hasDestination() {
10392    if (this.destination == null)
10393      return false;
10394    for (TestScriptDestinationComponent item : this.destination)
10395      if (!item.isEmpty())
10396        return true;
10397    return false;
10398  }
10399
10400  public TestScriptDestinationComponent addDestination() { // 3
10401    TestScriptDestinationComponent t = new TestScriptDestinationComponent();
10402    if (this.destination == null)
10403      this.destination = new ArrayList<TestScriptDestinationComponent>();
10404    this.destination.add(t);
10405    return t;
10406  }
10407
10408  public TestScript addDestination(TestScriptDestinationComponent t) { // 3
10409    if (t == null)
10410      return this;
10411    if (this.destination == null)
10412      this.destination = new ArrayList<TestScriptDestinationComponent>();
10413    this.destination.add(t);
10414    return this;
10415  }
10416
10417  /**
10418   * @return The first repetition of repeating field {@link #destination},
10419   *         creating it if it does not already exist
10420   */
10421  public TestScriptDestinationComponent getDestinationFirstRep() {
10422    if (getDestination().isEmpty()) {
10423      addDestination();
10424    }
10425    return getDestination().get(0);
10426  }
10427
10428  /**
10429   * @return {@link #metadata} (The required capability must exist and are assumed
10430   *         to function correctly on the FHIR server being tested.)
10431   */
10432  public TestScriptMetadataComponent getMetadata() {
10433    if (this.metadata == null)
10434      if (Configuration.errorOnAutoCreate())
10435        throw new Error("Attempt to auto-create TestScript.metadata");
10436      else if (Configuration.doAutoCreate())
10437        this.metadata = new TestScriptMetadataComponent(); // cc
10438    return this.metadata;
10439  }
10440
10441  public boolean hasMetadata() {
10442    return this.metadata != null && !this.metadata.isEmpty();
10443  }
10444
10445  /**
10446   * @param value {@link #metadata} (The required capability must exist and are
10447   *              assumed to function correctly on the FHIR server being tested.)
10448   */
10449  public TestScript setMetadata(TestScriptMetadataComponent value) {
10450    this.metadata = value;
10451    return this;
10452  }
10453
10454  /**
10455   * @return {@link #fixture} (Fixture in the test script - by reference (uri).
10456   *         All fixtures are required for the test script to execute.)
10457   */
10458  public List<TestScriptFixtureComponent> getFixture() {
10459    if (this.fixture == null)
10460      this.fixture = new ArrayList<TestScriptFixtureComponent>();
10461    return this.fixture;
10462  }
10463
10464  /**
10465   * @return Returns a reference to <code>this</code> for easy method chaining
10466   */
10467  public TestScript setFixture(List<TestScriptFixtureComponent> theFixture) {
10468    this.fixture = theFixture;
10469    return this;
10470  }
10471
10472  public boolean hasFixture() {
10473    if (this.fixture == null)
10474      return false;
10475    for (TestScriptFixtureComponent item : this.fixture)
10476      if (!item.isEmpty())
10477        return true;
10478    return false;
10479  }
10480
10481  public TestScriptFixtureComponent addFixture() { // 3
10482    TestScriptFixtureComponent t = new TestScriptFixtureComponent();
10483    if (this.fixture == null)
10484      this.fixture = new ArrayList<TestScriptFixtureComponent>();
10485    this.fixture.add(t);
10486    return t;
10487  }
10488
10489  public TestScript addFixture(TestScriptFixtureComponent t) { // 3
10490    if (t == null)
10491      return this;
10492    if (this.fixture == null)
10493      this.fixture = new ArrayList<TestScriptFixtureComponent>();
10494    this.fixture.add(t);
10495    return this;
10496  }
10497
10498  /**
10499   * @return The first repetition of repeating field {@link #fixture}, creating it
10500   *         if it does not already exist
10501   */
10502  public TestScriptFixtureComponent getFixtureFirstRep() {
10503    if (getFixture().isEmpty()) {
10504      addFixture();
10505    }
10506    return getFixture().get(0);
10507  }
10508
10509  /**
10510   * @return {@link #profile} (Reference to the profile to be used for
10511   *         validation.)
10512   */
10513  public List<Reference> getProfile() {
10514    if (this.profile == null)
10515      this.profile = new ArrayList<Reference>();
10516    return this.profile;
10517  }
10518
10519  /**
10520   * @return Returns a reference to <code>this</code> for easy method chaining
10521   */
10522  public TestScript setProfile(List<Reference> theProfile) {
10523    this.profile = theProfile;
10524    return this;
10525  }
10526
10527  public boolean hasProfile() {
10528    if (this.profile == null)
10529      return false;
10530    for (Reference item : this.profile)
10531      if (!item.isEmpty())
10532        return true;
10533    return false;
10534  }
10535
10536  public Reference addProfile() { // 3
10537    Reference t = new Reference();
10538    if (this.profile == null)
10539      this.profile = new ArrayList<Reference>();
10540    this.profile.add(t);
10541    return t;
10542  }
10543
10544  public TestScript addProfile(Reference t) { // 3
10545    if (t == null)
10546      return this;
10547    if (this.profile == null)
10548      this.profile = new ArrayList<Reference>();
10549    this.profile.add(t);
10550    return this;
10551  }
10552
10553  /**
10554   * @return The first repetition of repeating field {@link #profile}, creating it
10555   *         if it does not already exist
10556   */
10557  public Reference getProfileFirstRep() {
10558    if (getProfile().isEmpty()) {
10559      addProfile();
10560    }
10561    return getProfile().get(0);
10562  }
10563
10564  /**
10565   * @deprecated Use Reference#setResource(IBaseResource) instead
10566   */
10567  @Deprecated
10568  public List<Resource> getProfileTarget() {
10569    if (this.profileTarget == null)
10570      this.profileTarget = new ArrayList<Resource>();
10571    return this.profileTarget;
10572  }
10573
10574  /**
10575   * @return {@link #variable} (Variable is set based either on element value in
10576   *         response body or on header field value in the response headers.)
10577   */
10578  public List<TestScriptVariableComponent> getVariable() {
10579    if (this.variable == null)
10580      this.variable = new ArrayList<TestScriptVariableComponent>();
10581    return this.variable;
10582  }
10583
10584  /**
10585   * @return Returns a reference to <code>this</code> for easy method chaining
10586   */
10587  public TestScript setVariable(List<TestScriptVariableComponent> theVariable) {
10588    this.variable = theVariable;
10589    return this;
10590  }
10591
10592  public boolean hasVariable() {
10593    if (this.variable == null)
10594      return false;
10595    for (TestScriptVariableComponent item : this.variable)
10596      if (!item.isEmpty())
10597        return true;
10598    return false;
10599  }
10600
10601  public TestScriptVariableComponent addVariable() { // 3
10602    TestScriptVariableComponent t = new TestScriptVariableComponent();
10603    if (this.variable == null)
10604      this.variable = new ArrayList<TestScriptVariableComponent>();
10605    this.variable.add(t);
10606    return t;
10607  }
10608
10609  public TestScript addVariable(TestScriptVariableComponent t) { // 3
10610    if (t == null)
10611      return this;
10612    if (this.variable == null)
10613      this.variable = new ArrayList<TestScriptVariableComponent>();
10614    this.variable.add(t);
10615    return this;
10616  }
10617
10618  /**
10619   * @return The first repetition of repeating field {@link #variable}, creating
10620   *         it if it does not already exist
10621   */
10622  public TestScriptVariableComponent getVariableFirstRep() {
10623    if (getVariable().isEmpty()) {
10624      addVariable();
10625    }
10626    return getVariable().get(0);
10627  }
10628
10629  /**
10630   * @return {@link #setup} (A series of required setup operations before tests
10631   *         are executed.)
10632   */
10633  public TestScriptSetupComponent getSetup() {
10634    if (this.setup == null)
10635      if (Configuration.errorOnAutoCreate())
10636        throw new Error("Attempt to auto-create TestScript.setup");
10637      else if (Configuration.doAutoCreate())
10638        this.setup = new TestScriptSetupComponent(); // cc
10639    return this.setup;
10640  }
10641
10642  public boolean hasSetup() {
10643    return this.setup != null && !this.setup.isEmpty();
10644  }
10645
10646  /**
10647   * @param value {@link #setup} (A series of required setup operations before
10648   *              tests are executed.)
10649   */
10650  public TestScript setSetup(TestScriptSetupComponent value) {
10651    this.setup = value;
10652    return this;
10653  }
10654
10655  /**
10656   * @return {@link #test} (A test in this script.)
10657   */
10658  public List<TestScriptTestComponent> getTest() {
10659    if (this.test == null)
10660      this.test = new ArrayList<TestScriptTestComponent>();
10661    return this.test;
10662  }
10663
10664  /**
10665   * @return Returns a reference to <code>this</code> for easy method chaining
10666   */
10667  public TestScript setTest(List<TestScriptTestComponent> theTest) {
10668    this.test = theTest;
10669    return this;
10670  }
10671
10672  public boolean hasTest() {
10673    if (this.test == null)
10674      return false;
10675    for (TestScriptTestComponent item : this.test)
10676      if (!item.isEmpty())
10677        return true;
10678    return false;
10679  }
10680
10681  public TestScriptTestComponent addTest() { // 3
10682    TestScriptTestComponent t = new TestScriptTestComponent();
10683    if (this.test == null)
10684      this.test = new ArrayList<TestScriptTestComponent>();
10685    this.test.add(t);
10686    return t;
10687  }
10688
10689  public TestScript addTest(TestScriptTestComponent t) { // 3
10690    if (t == null)
10691      return this;
10692    if (this.test == null)
10693      this.test = new ArrayList<TestScriptTestComponent>();
10694    this.test.add(t);
10695    return this;
10696  }
10697
10698  /**
10699   * @return The first repetition of repeating field {@link #test}, creating it if
10700   *         it does not already exist
10701   */
10702  public TestScriptTestComponent getTestFirstRep() {
10703    if (getTest().isEmpty()) {
10704      addTest();
10705    }
10706    return getTest().get(0);
10707  }
10708
10709  /**
10710   * @return {@link #teardown} (A series of operations required to clean up after
10711   *         all the tests are executed (successfully or otherwise).)
10712   */
10713  public TestScriptTeardownComponent getTeardown() {
10714    if (this.teardown == null)
10715      if (Configuration.errorOnAutoCreate())
10716        throw new Error("Attempt to auto-create TestScript.teardown");
10717      else if (Configuration.doAutoCreate())
10718        this.teardown = new TestScriptTeardownComponent(); // cc
10719    return this.teardown;
10720  }
10721
10722  public boolean hasTeardown() {
10723    return this.teardown != null && !this.teardown.isEmpty();
10724  }
10725
10726  /**
10727   * @param value {@link #teardown} (A series of operations required to clean up
10728   *              after all the tests are executed (successfully or otherwise).)
10729   */
10730  public TestScript setTeardown(TestScriptTeardownComponent value) {
10731    this.teardown = value;
10732    return this;
10733  }
10734
10735  protected void listChildren(List<Property> children) {
10736    super.listChildren(children);
10737    children.add(new Property("url", "uri",
10738        "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.",
10739        0, 1, url));
10740    children.add(new Property("identifier", "Identifier",
10741        "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.",
10742        0, 1, identifier));
10743    children.add(new Property("version", "string",
10744        "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.",
10745        0, 1, version));
10746    children.add(new Property("name", "string",
10747        "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.",
10748        0, 1, name));
10749    children.add(
10750        new Property("title", "string", "A short, descriptive, user-friendly title for the test script.", 0, 1, title));
10751    children.add(new Property("status", "code",
10752        "The status of this test script. Enables tracking the life-cycle of the content.", 0, 1, status));
10753    children.add(new Property("experimental", "boolean",
10754        "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.",
10755        0, 1, experimental));
10756    children.add(new Property("date", "dateTime",
10757        "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.",
10758        0, 1, date));
10759    children.add(new Property("publisher", "string",
10760        "The name of the organization or individual that published the test script.", 0, 1, publisher));
10761    children.add(new Property("contact", "ContactDetail",
10762        "Contact details to assist a user in finding and communicating with the publisher.", 0,
10763        java.lang.Integer.MAX_VALUE, contact));
10764    children.add(new Property("description", "markdown",
10765        "A free text natural language description of the test script from a consumer's perspective.", 0, 1,
10766        description));
10767    children.add(new Property("useContext", "UsageContext",
10768        "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.",
10769        0, java.lang.Integer.MAX_VALUE, useContext));
10770    children.add(new Property("jurisdiction", "CodeableConcept",
10771        "A legal or geographic region in which the test script is intended to be used.", 0, java.lang.Integer.MAX_VALUE,
10772        jurisdiction));
10773    children.add(new Property("purpose", "markdown",
10774        "Explanation of why this test script is needed and why it has been designed as it has.", 0, 1, purpose));
10775    children.add(new Property("copyright", "markdown",
10776        "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.",
10777        0, 1, copyright));
10778    children.add(new Property("origin", "",
10779        "An abstract server used in operations within this test script in the origin element.", 0,
10780        java.lang.Integer.MAX_VALUE, origin));
10781    children.add(new Property("destination", "",
10782        "An abstract server used in operations within this test script in the destination element.", 0,
10783        java.lang.Integer.MAX_VALUE, destination));
10784    children.add(new Property("metadata", "",
10785        "The required capability must exist and are assumed to function correctly on the FHIR server being tested.", 0,
10786        1, metadata));
10787    children.add(new Property("fixture", "",
10788        "Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.", 0,
10789        java.lang.Integer.MAX_VALUE, fixture));
10790    children.add(new Property("profile", "Reference(Any)", "Reference to the profile to be used for validation.", 0,
10791        java.lang.Integer.MAX_VALUE, profile));
10792    children.add(new Property("variable", "",
10793        "Variable is set based either on element value in response body or on header field value in the response headers.",
10794        0, java.lang.Integer.MAX_VALUE, variable));
10795    children.add(
10796        new Property("setup", "", "A series of required setup operations before tests are executed.", 0, 1, setup));
10797    children.add(new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test));
10798    children.add(new Property("teardown", "",
10799        "A series of operations required to clean up after all the tests are executed (successfully or otherwise).", 0,
10800        1, teardown));
10801  }
10802
10803  @Override
10804  public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
10805    switch (_hash) {
10806    case 116079:
10807      /* url */ return new Property("url", "uri",
10808          "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.",
10809          0, 1, url);
10810    case -1618432855:
10811      /* identifier */ return new Property("identifier", "Identifier",
10812          "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.",
10813          0, 1, identifier);
10814    case 351608024:
10815      /* version */ return new Property("version", "string",
10816          "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.",
10817          0, 1, version);
10818    case 3373707:
10819      /* name */ return new Property("name", "string",
10820          "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.",
10821          0, 1, name);
10822    case 110371416:
10823      /* title */ return new Property("title", "string",
10824          "A short, descriptive, user-friendly title for the test script.", 0, 1, title);
10825    case -892481550:
10826      /* status */ return new Property("status", "code",
10827          "The status of this test script. Enables tracking the life-cycle of the content.", 0, 1, status);
10828    case -404562712:
10829      /* experimental */ return new Property("experimental", "boolean",
10830          "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.",
10831          0, 1, experimental);
10832    case 3076014:
10833      /* date */ return new Property("date", "dateTime",
10834          "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.",
10835          0, 1, date);
10836    case 1447404028:
10837      /* publisher */ return new Property("publisher", "string",
10838          "The name of the organization or individual that published the test script.", 0, 1, publisher);
10839    case 951526432:
10840      /* contact */ return new Property("contact", "ContactDetail",
10841          "Contact details to assist a user in finding and communicating with the publisher.", 0,
10842          java.lang.Integer.MAX_VALUE, contact);
10843    case -1724546052:
10844      /* description */ return new Property("description", "markdown",
10845          "A free text natural language description of the test script from a consumer's perspective.", 0, 1,
10846          description);
10847    case -669707736:
10848      /* useContext */ return new Property("useContext", "UsageContext",
10849          "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.",
10850          0, java.lang.Integer.MAX_VALUE, useContext);
10851    case -507075711:
10852      /* jurisdiction */ return new Property("jurisdiction", "CodeableConcept",
10853          "A legal or geographic region in which the test script is intended to be used.", 0,
10854          java.lang.Integer.MAX_VALUE, jurisdiction);
10855    case -220463842:
10856      /* purpose */ return new Property("purpose", "markdown",
10857          "Explanation of why this test script is needed and why it has been designed as it has.", 0, 1, purpose);
10858    case 1522889671:
10859      /* copyright */ return new Property("copyright", "markdown",
10860          "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.",
10861          0, 1, copyright);
10862    case -1008619738:
10863      /* origin */ return new Property("origin", "",
10864          "An abstract server used in operations within this test script in the origin element.", 0,
10865          java.lang.Integer.MAX_VALUE, origin);
10866    case -1429847026:
10867      /* destination */ return new Property("destination", "",
10868          "An abstract server used in operations within this test script in the destination element.", 0,
10869          java.lang.Integer.MAX_VALUE, destination);
10870    case -450004177:
10871      /* metadata */ return new Property("metadata", "",
10872          "The required capability must exist and are assumed to function correctly on the FHIR server being tested.",
10873          0, 1, metadata);
10874    case -843449847:
10875      /* fixture */ return new Property("fixture", "",
10876          "Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.",
10877          0, java.lang.Integer.MAX_VALUE, fixture);
10878    case -309425751:
10879      /* profile */ return new Property("profile", "Reference(Any)",
10880          "Reference to the profile to be used for validation.", 0, java.lang.Integer.MAX_VALUE, profile);
10881    case -1249586564:
10882      /* variable */ return new Property("variable", "",
10883          "Variable is set based either on element value in response body or on header field value in the response headers.",
10884          0, java.lang.Integer.MAX_VALUE, variable);
10885    case 109329021:
10886      /* setup */ return new Property("setup", "", "A series of required setup operations before tests are executed.",
10887          0, 1, setup);
10888    case 3556498:
10889      /* test */ return new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test);
10890    case -1663474172:
10891      /* teardown */ return new Property("teardown", "",
10892          "A series of operations required to clean up after all the tests are executed (successfully or otherwise).",
10893          0, 1, teardown);
10894    default:
10895      return super.getNamedProperty(_hash, _name, _checkValid);
10896    }
10897
10898  }
10899
10900  @Override
10901  public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
10902    switch (hash) {
10903    case 116079:
10904      /* url */ return this.url == null ? new Base[0] : new Base[] { this.url }; // UriType
10905    case -1618432855:
10906      /* identifier */ return this.identifier == null ? new Base[0] : new Base[] { this.identifier }; // Identifier
10907    case 351608024:
10908      /* version */ return this.version == null ? new Base[0] : new Base[] { this.version }; // StringType
10909    case 3373707:
10910      /* name */ return this.name == null ? new Base[0] : new Base[] { this.name }; // StringType
10911    case 110371416:
10912      /* title */ return this.title == null ? new Base[0] : new Base[] { this.title }; // StringType
10913    case -892481550:
10914      /* status */ return this.status == null ? new Base[0] : new Base[] { this.status }; // Enumeration<PublicationStatus>
10915    case -404562712:
10916      /* experimental */ return this.experimental == null ? new Base[0] : new Base[] { this.experimental }; // BooleanType
10917    case 3076014:
10918      /* date */ return this.date == null ? new Base[0] : new Base[] { this.date }; // DateTimeType
10919    case 1447404028:
10920      /* publisher */ return this.publisher == null ? new Base[0] : new Base[] { this.publisher }; // StringType
10921    case 951526432:
10922      /* contact */ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
10923    case -1724546052:
10924      /* description */ return this.description == null ? new Base[0] : new Base[] { this.description }; // MarkdownType
10925    case -669707736:
10926      /* useContext */ return this.useContext == null ? new Base[0]
10927          : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
10928    case -507075711:
10929      /* jurisdiction */ return this.jurisdiction == null ? new Base[0]
10930          : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
10931    case -220463842:
10932      /* purpose */ return this.purpose == null ? new Base[0] : new Base[] { this.purpose }; // MarkdownType
10933    case 1522889671:
10934      /* copyright */ return this.copyright == null ? new Base[0] : new Base[] { this.copyright }; // MarkdownType
10935    case -1008619738:
10936      /* origin */ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // TestScriptOriginComponent
10937    case -1429847026:
10938      /* destination */ return this.destination == null ? new Base[0]
10939          : this.destination.toArray(new Base[this.destination.size()]); // TestScriptDestinationComponent
10940    case -450004177:
10941      /* metadata */ return this.metadata == null ? new Base[0] : new Base[] { this.metadata }; // TestScriptMetadataComponent
10942    case -843449847:
10943      /* fixture */ return this.fixture == null ? new Base[0] : this.fixture.toArray(new Base[this.fixture.size()]); // TestScriptFixtureComponent
10944    case -309425751:
10945      /* profile */ return this.profile == null ? new Base[0] : this.profile.toArray(new Base[this.profile.size()]); // Reference
10946    case -1249586564:
10947      /* variable */ return this.variable == null ? new Base[0] : this.variable.toArray(new Base[this.variable.size()]); // TestScriptVariableComponent
10948    case 109329021:
10949      /* setup */ return this.setup == null ? new Base[0] : new Base[] { this.setup }; // TestScriptSetupComponent
10950    case 3556498:
10951      /* test */ return this.test == null ? new Base[0] : this.test.toArray(new Base[this.test.size()]); // TestScriptTestComponent
10952    case -1663474172:
10953      /* teardown */ return this.teardown == null ? new Base[0] : new Base[] { this.teardown }; // TestScriptTeardownComponent
10954    default:
10955      return super.getProperty(hash, name, checkValid);
10956    }
10957
10958  }
10959
10960  @Override
10961  public Base setProperty(int hash, String name, Base value) throws FHIRException {
10962    switch (hash) {
10963    case 116079: // url
10964      this.url = castToUri(value); // UriType
10965      return value;
10966    case -1618432855: // identifier
10967      this.identifier = castToIdentifier(value); // Identifier
10968      return value;
10969    case 351608024: // version
10970      this.version = castToString(value); // StringType
10971      return value;
10972    case 3373707: // name
10973      this.name = castToString(value); // StringType
10974      return value;
10975    case 110371416: // title
10976      this.title = castToString(value); // StringType
10977      return value;
10978    case -892481550: // status
10979      value = new PublicationStatusEnumFactory().fromType(castToCode(value));
10980      this.status = (Enumeration) value; // Enumeration<PublicationStatus>
10981      return value;
10982    case -404562712: // experimental
10983      this.experimental = castToBoolean(value); // BooleanType
10984      return value;
10985    case 3076014: // date
10986      this.date = castToDateTime(value); // DateTimeType
10987      return value;
10988    case 1447404028: // publisher
10989      this.publisher = castToString(value); // StringType
10990      return value;
10991    case 951526432: // contact
10992      this.getContact().add(castToContactDetail(value)); // ContactDetail
10993      return value;
10994    case -1724546052: // description
10995      this.description = castToMarkdown(value); // MarkdownType
10996      return value;
10997    case -669707736: // useContext
10998      this.getUseContext().add(castToUsageContext(value)); // UsageContext
10999      return value;
11000    case -507075711: // jurisdiction
11001      this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept
11002      return value;
11003    case -220463842: // purpose
11004      this.purpose = castToMarkdown(value); // MarkdownType
11005      return value;
11006    case 1522889671: // copyright
11007      this.copyright = castToMarkdown(value); // MarkdownType
11008      return value;
11009    case -1008619738: // origin
11010      this.getOrigin().add((TestScriptOriginComponent) value); // TestScriptOriginComponent
11011      return value;
11012    case -1429847026: // destination
11013      this.getDestination().add((TestScriptDestinationComponent) value); // TestScriptDestinationComponent
11014      return value;
11015    case -450004177: // metadata
11016      this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent
11017      return value;
11018    case -843449847: // fixture
11019      this.getFixture().add((TestScriptFixtureComponent) value); // TestScriptFixtureComponent
11020      return value;
11021    case -309425751: // profile
11022      this.getProfile().add(castToReference(value)); // Reference
11023      return value;
11024    case -1249586564: // variable
11025      this.getVariable().add((TestScriptVariableComponent) value); // TestScriptVariableComponent
11026      return value;
11027    case 109329021: // setup
11028      this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent
11029      return value;
11030    case 3556498: // test
11031      this.getTest().add((TestScriptTestComponent) value); // TestScriptTestComponent
11032      return value;
11033    case -1663474172: // teardown
11034      this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent
11035      return value;
11036    default:
11037      return super.setProperty(hash, name, value);
11038    }
11039
11040  }
11041
11042  @Override
11043  public Base setProperty(String name, Base value) throws FHIRException {
11044    if (name.equals("url")) {
11045      this.url = castToUri(value); // UriType
11046    } else if (name.equals("identifier")) {
11047      this.identifier = castToIdentifier(value); // Identifier
11048    } else if (name.equals("version")) {
11049      this.version = castToString(value); // StringType
11050    } else if (name.equals("name")) {
11051      this.name = castToString(value); // StringType
11052    } else if (name.equals("title")) {
11053      this.title = castToString(value); // StringType
11054    } else if (name.equals("status")) {
11055      value = new PublicationStatusEnumFactory().fromType(castToCode(value));
11056      this.status = (Enumeration) value; // Enumeration<PublicationStatus>
11057    } else if (name.equals("experimental")) {
11058      this.experimental = castToBoolean(value); // BooleanType
11059    } else if (name.equals("date")) {
11060      this.date = castToDateTime(value); // DateTimeType
11061    } else if (name.equals("publisher")) {
11062      this.publisher = castToString(value); // StringType
11063    } else if (name.equals("contact")) {
11064      this.getContact().add(castToContactDetail(value));
11065    } else if (name.equals("description")) {
11066      this.description = castToMarkdown(value); // MarkdownType
11067    } else if (name.equals("useContext")) {
11068      this.getUseContext().add(castToUsageContext(value));
11069    } else if (name.equals("jurisdiction")) {
11070      this.getJurisdiction().add(castToCodeableConcept(value));
11071    } else if (name.equals("purpose")) {
11072      this.purpose = castToMarkdown(value); // MarkdownType
11073    } else if (name.equals("copyright")) {
11074      this.copyright = castToMarkdown(value); // MarkdownType
11075    } else if (name.equals("origin")) {
11076      this.getOrigin().add((TestScriptOriginComponent) value);
11077    } else if (name.equals("destination")) {
11078      this.getDestination().add((TestScriptDestinationComponent) value);
11079    } else if (name.equals("metadata")) {
11080      this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent
11081    } else if (name.equals("fixture")) {
11082      this.getFixture().add((TestScriptFixtureComponent) value);
11083    } else if (name.equals("profile")) {
11084      this.getProfile().add(castToReference(value));
11085    } else if (name.equals("variable")) {
11086      this.getVariable().add((TestScriptVariableComponent) value);
11087    } else if (name.equals("setup")) {
11088      this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent
11089    } else if (name.equals("test")) {
11090      this.getTest().add((TestScriptTestComponent) value);
11091    } else if (name.equals("teardown")) {
11092      this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent
11093    } else
11094      return super.setProperty(name, value);
11095    return value;
11096  }
11097
11098  @Override
11099  public Base makeProperty(int hash, String name) throws FHIRException {
11100    switch (hash) {
11101    case 116079:
11102      return getUrlElement();
11103    case -1618432855:
11104      return getIdentifier();
11105    case 351608024:
11106      return getVersionElement();
11107    case 3373707:
11108      return getNameElement();
11109    case 110371416:
11110      return getTitleElement();
11111    case -892481550:
11112      return getStatusElement();
11113    case -404562712:
11114      return getExperimentalElement();
11115    case 3076014:
11116      return getDateElement();
11117    case 1447404028:
11118      return getPublisherElement();
11119    case 951526432:
11120      return addContact();
11121    case -1724546052:
11122      return getDescriptionElement();
11123    case -669707736:
11124      return addUseContext();
11125    case -507075711:
11126      return addJurisdiction();
11127    case -220463842:
11128      return getPurposeElement();
11129    case 1522889671:
11130      return getCopyrightElement();
11131    case -1008619738:
11132      return addOrigin();
11133    case -1429847026:
11134      return addDestination();
11135    case -450004177:
11136      return getMetadata();
11137    case -843449847:
11138      return addFixture();
11139    case -309425751:
11140      return addProfile();
11141    case -1249586564:
11142      return addVariable();
11143    case 109329021:
11144      return getSetup();
11145    case 3556498:
11146      return addTest();
11147    case -1663474172:
11148      return getTeardown();
11149    default:
11150      return super.makeProperty(hash, name);
11151    }
11152
11153  }
11154
11155  @Override
11156  public String[] getTypesForProperty(int hash, String name) throws FHIRException {
11157    switch (hash) {
11158    case 116079:
11159      /* url */ return new String[] { "uri" };
11160    case -1618432855:
11161      /* identifier */ return new String[] { "Identifier" };
11162    case 351608024:
11163      /* version */ return new String[] { "string" };
11164    case 3373707:
11165      /* name */ return new String[] { "string" };
11166    case 110371416:
11167      /* title */ return new String[] { "string" };
11168    case -892481550:
11169      /* status */ return new String[] { "code" };
11170    case -404562712:
11171      /* experimental */ return new String[] { "boolean" };
11172    case 3076014:
11173      /* date */ return new String[] { "dateTime" };
11174    case 1447404028:
11175      /* publisher */ return new String[] { "string" };
11176    case 951526432:
11177      /* contact */ return new String[] { "ContactDetail" };
11178    case -1724546052:
11179      /* description */ return new String[] { "markdown" };
11180    case -669707736:
11181      /* useContext */ return new String[] { "UsageContext" };
11182    case -507075711:
11183      /* jurisdiction */ return new String[] { "CodeableConcept" };
11184    case -220463842:
11185      /* purpose */ return new String[] { "markdown" };
11186    case 1522889671:
11187      /* copyright */ return new String[] { "markdown" };
11188    case -1008619738:
11189      /* origin */ return new String[] {};
11190    case -1429847026:
11191      /* destination */ return new String[] {};
11192    case -450004177:
11193      /* metadata */ return new String[] {};
11194    case -843449847:
11195      /* fixture */ return new String[] {};
11196    case -309425751:
11197      /* profile */ return new String[] { "Reference" };
11198    case -1249586564:
11199      /* variable */ return new String[] {};
11200    case 109329021:
11201      /* setup */ return new String[] {};
11202    case 3556498:
11203      /* test */ return new String[] {};
11204    case -1663474172:
11205      /* teardown */ return new String[] {};
11206    default:
11207      return super.getTypesForProperty(hash, name);
11208    }
11209
11210  }
11211
11212  @Override
11213  public Base addChild(String name) throws FHIRException {
11214    if (name.equals("url")) {
11215      throw new FHIRException("Cannot call addChild on a singleton property TestScript.url");
11216    } else if (name.equals("identifier")) {
11217      this.identifier = new Identifier();
11218      return this.identifier;
11219    } else if (name.equals("version")) {
11220      throw new FHIRException("Cannot call addChild on a singleton property TestScript.version");
11221    } else if (name.equals("name")) {
11222      throw new FHIRException("Cannot call addChild on a singleton property TestScript.name");
11223    } else if (name.equals("title")) {
11224      throw new FHIRException("Cannot call addChild on a singleton property TestScript.title");
11225    } else if (name.equals("status")) {
11226      throw new FHIRException("Cannot call addChild on a singleton property TestScript.status");
11227    } else if (name.equals("experimental")) {
11228      throw new FHIRException("Cannot call addChild on a singleton property TestScript.experimental");
11229    } else if (name.equals("date")) {
11230      throw new FHIRException("Cannot call addChild on a singleton property TestScript.date");
11231    } else if (name.equals("publisher")) {
11232      throw new FHIRException("Cannot call addChild on a singleton property TestScript.publisher");
11233    } else if (name.equals("contact")) {
11234      return addContact();
11235    } else if (name.equals("description")) {
11236      throw new FHIRException("Cannot call addChild on a singleton property TestScript.description");
11237    } else if (name.equals("useContext")) {
11238      return addUseContext();
11239    } else if (name.equals("jurisdiction")) {
11240      return addJurisdiction();
11241    } else if (name.equals("purpose")) {
11242      throw new FHIRException("Cannot call addChild on a singleton property TestScript.purpose");
11243    } else if (name.equals("copyright")) {
11244      throw new FHIRException("Cannot call addChild on a singleton property TestScript.copyright");
11245    } else if (name.equals("origin")) {
11246      return addOrigin();
11247    } else if (name.equals("destination")) {
11248      return addDestination();
11249    } else if (name.equals("metadata")) {
11250      this.metadata = new TestScriptMetadataComponent();
11251      return this.metadata;
11252    } else if (name.equals("fixture")) {
11253      return addFixture();
11254    } else if (name.equals("profile")) {
11255      return addProfile();
11256    } else if (name.equals("variable")) {
11257      return addVariable();
11258    } else if (name.equals("setup")) {
11259      this.setup = new TestScriptSetupComponent();
11260      return this.setup;
11261    } else if (name.equals("test")) {
11262      return addTest();
11263    } else if (name.equals("teardown")) {
11264      this.teardown = new TestScriptTeardownComponent();
11265      return this.teardown;
11266    } else
11267      return super.addChild(name);
11268  }
11269
11270  public String fhirType() {
11271    return "TestScript";
11272
11273  }
11274
11275  public TestScript copy() {
11276    TestScript dst = new TestScript();
11277    copyValues(dst);
11278    return dst;
11279  }
11280
11281  public void copyValues(TestScript dst) {
11282    super.copyValues(dst);
11283    dst.url = url == null ? null : url.copy();
11284    dst.identifier = identifier == null ? null : identifier.copy();
11285    dst.version = version == null ? null : version.copy();
11286    dst.name = name == null ? null : name.copy();
11287    dst.title = title == null ? null : title.copy();
11288    dst.status = status == null ? null : status.copy();
11289    dst.experimental = experimental == null ? null : experimental.copy();
11290    dst.date = date == null ? null : date.copy();
11291    dst.publisher = publisher == null ? null : publisher.copy();
11292    if (contact != null) {
11293      dst.contact = new ArrayList<ContactDetail>();
11294      for (ContactDetail i : contact)
11295        dst.contact.add(i.copy());
11296    }
11297    ;
11298    dst.description = description == null ? null : description.copy();
11299    if (useContext != null) {
11300      dst.useContext = new ArrayList<UsageContext>();
11301      for (UsageContext i : useContext)
11302        dst.useContext.add(i.copy());
11303    }
11304    ;
11305    if (jurisdiction != null) {
11306      dst.jurisdiction = new ArrayList<CodeableConcept>();
11307      for (CodeableConcept i : jurisdiction)
11308        dst.jurisdiction.add(i.copy());
11309    }
11310    ;
11311    dst.purpose = purpose == null ? null : purpose.copy();
11312    dst.copyright = copyright == null ? null : copyright.copy();
11313    if (origin != null) {
11314      dst.origin = new ArrayList<TestScriptOriginComponent>();
11315      for (TestScriptOriginComponent i : origin)
11316        dst.origin.add(i.copy());
11317    }
11318    ;
11319    if (destination != null) {
11320      dst.destination = new ArrayList<TestScriptDestinationComponent>();
11321      for (TestScriptDestinationComponent i : destination)
11322        dst.destination.add(i.copy());
11323    }
11324    ;
11325    dst.metadata = metadata == null ? null : metadata.copy();
11326    if (fixture != null) {
11327      dst.fixture = new ArrayList<TestScriptFixtureComponent>();
11328      for (TestScriptFixtureComponent i : fixture)
11329        dst.fixture.add(i.copy());
11330    }
11331    ;
11332    if (profile != null) {
11333      dst.profile = new ArrayList<Reference>();
11334      for (Reference i : profile)
11335        dst.profile.add(i.copy());
11336    }
11337    ;
11338    if (variable != null) {
11339      dst.variable = new ArrayList<TestScriptVariableComponent>();
11340      for (TestScriptVariableComponent i : variable)
11341        dst.variable.add(i.copy());
11342    }
11343    ;
11344    dst.setup = setup == null ? null : setup.copy();
11345    if (test != null) {
11346      dst.test = new ArrayList<TestScriptTestComponent>();
11347      for (TestScriptTestComponent i : test)
11348        dst.test.add(i.copy());
11349    }
11350    ;
11351    dst.teardown = teardown == null ? null : teardown.copy();
11352  }
11353
11354  protected TestScript typedCopy() {
11355    return copy();
11356  }
11357
11358  @Override
11359  public boolean equalsDeep(Base other_) {
11360    if (!super.equalsDeep(other_))
11361      return false;
11362    if (!(other_ instanceof TestScript))
11363      return false;
11364    TestScript o = (TestScript) other_;
11365    return compareDeep(identifier, o.identifier, true) && compareDeep(purpose, o.purpose, true)
11366        && compareDeep(copyright, o.copyright, true) && compareDeep(origin, o.origin, true)
11367        && compareDeep(destination, o.destination, true) && compareDeep(metadata, o.metadata, true)
11368        && compareDeep(fixture, o.fixture, true) && compareDeep(profile, o.profile, true)
11369        && compareDeep(variable, o.variable, true) && compareDeep(setup, o.setup, true)
11370        && compareDeep(test, o.test, true) && compareDeep(teardown, o.teardown, true);
11371  }
11372
11373  @Override
11374  public boolean equalsShallow(Base other_) {
11375    if (!super.equalsShallow(other_))
11376      return false;
11377    if (!(other_ instanceof TestScript))
11378      return false;
11379    TestScript o = (TestScript) other_;
11380    return compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true);
11381  }
11382
11383  public boolean isEmpty() {
11384    return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, purpose, copyright, origin, destination,
11385        metadata, fixture, profile, variable, setup, test, teardown);
11386  }
11387
11388  @Override
11389  public ResourceType getResourceType() {
11390    return ResourceType.TestScript;
11391  }
11392
11393  /**
11394   * Search parameter: <b>date</b>
11395   * <p>
11396   * Description: <b>The test script publication date</b><br>
11397   * Type: <b>date</b><br>
11398   * Path: <b>TestScript.date</b><br>
11399   * </p>
11400   */
11401  @SearchParamDefinition(name = "date", path = "TestScript.date", description = "The test script publication date", type = "date")
11402  public static final String SP_DATE = "date";
11403  /**
11404   * <b>Fluent Client</b> search parameter constant for <b>date</b>
11405   * <p>
11406   * Description: <b>The test script publication date</b><br>
11407   * Type: <b>date</b><br>
11408   * Path: <b>TestScript.date</b><br>
11409   * </p>
11410   */
11411  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(
11412      SP_DATE);
11413
11414  /**
11415   * Search parameter: <b>identifier</b>
11416   * <p>
11417   * Description: <b>External identifier for the test script</b><br>
11418   * Type: <b>token</b><br>
11419   * Path: <b>TestScript.identifier</b><br>
11420   * </p>
11421   */
11422  @SearchParamDefinition(name = "identifier", path = "TestScript.identifier", description = "External identifier for the test script", type = "token")
11423  public static final String SP_IDENTIFIER = "identifier";
11424  /**
11425   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
11426   * <p>
11427   * Description: <b>External identifier for the test script</b><br>
11428   * Type: <b>token</b><br>
11429   * Path: <b>TestScript.identifier</b><br>
11430   * </p>
11431   */
11432  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(
11433      SP_IDENTIFIER);
11434
11435  /**
11436   * Search parameter: <b>context-type-value</b>
11437   * <p>
11438   * Description: <b>A use context type and value assigned to the test
11439   * script</b><br>
11440   * Type: <b>composite</b><br>
11441   * Path: <b></b><br>
11442   * </p>
11443   */
11444  @SearchParamDefinition(name = "context-type-value", path = "TestScript.useContext", description = "A use context type and value assigned to the test script", type = "composite", compositeOf = {
11445      "context-type", "context" })
11446  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
11447  /**
11448   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
11449   * <p>
11450   * Description: <b>A use context type and value assigned to the test
11451   * script</b><br>
11452   * Type: <b>composite</b><br>
11453   * Path: <b></b><br>
11454   * </p>
11455   */
11456  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>(
11457      SP_CONTEXT_TYPE_VALUE);
11458
11459  /**
11460   * Search parameter: <b>jurisdiction</b>
11461   * <p>
11462   * Description: <b>Intended jurisdiction for the test script</b><br>
11463   * Type: <b>token</b><br>
11464   * Path: <b>TestScript.jurisdiction</b><br>
11465   * </p>
11466   */
11467  @SearchParamDefinition(name = "jurisdiction", path = "TestScript.jurisdiction", description = "Intended jurisdiction for the test script", type = "token")
11468  public static final String SP_JURISDICTION = "jurisdiction";
11469  /**
11470   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
11471   * <p>
11472   * Description: <b>Intended jurisdiction for the test script</b><br>
11473   * Type: <b>token</b><br>
11474   * Path: <b>TestScript.jurisdiction</b><br>
11475   * </p>
11476   */
11477  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(
11478      SP_JURISDICTION);
11479
11480  /**
11481   * Search parameter: <b>description</b>
11482   * <p>
11483   * Description: <b>The description of the test script</b><br>
11484   * Type: <b>string</b><br>
11485   * Path: <b>TestScript.description</b><br>
11486   * </p>
11487   */
11488  @SearchParamDefinition(name = "description", path = "TestScript.description", description = "The description of the test script", type = "string")
11489  public static final String SP_DESCRIPTION = "description";
11490  /**
11491   * <b>Fluent Client</b> search parameter constant for <b>description</b>
11492   * <p>
11493   * Description: <b>The description of the test script</b><br>
11494   * Type: <b>string</b><br>
11495   * Path: <b>TestScript.description</b><br>
11496   * </p>
11497   */
11498  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(
11499      SP_DESCRIPTION);
11500
11501  /**
11502   * Search parameter: <b>testscript-capability</b>
11503   * <p>
11504   * Description: <b>TestScript required and validated capability</b><br>
11505   * Type: <b>string</b><br>
11506   * Path: <b>TestScript.metadata.capability.description</b><br>
11507   * </p>
11508   */
11509  @SearchParamDefinition(name = "testscript-capability", path = "TestScript.metadata.capability.description", description = "TestScript required and validated capability", type = "string")
11510  public static final String SP_TESTSCRIPT_CAPABILITY = "testscript-capability";
11511  /**
11512   * <b>Fluent Client</b> search parameter constant for
11513   * <b>testscript-capability</b>
11514   * <p>
11515   * Description: <b>TestScript required and validated capability</b><br>
11516   * Type: <b>string</b><br>
11517   * Path: <b>TestScript.metadata.capability.description</b><br>
11518   * </p>
11519   */
11520  public static final ca.uhn.fhir.rest.gclient.StringClientParam TESTSCRIPT_CAPABILITY = new ca.uhn.fhir.rest.gclient.StringClientParam(
11521      SP_TESTSCRIPT_CAPABILITY);
11522
11523  /**
11524   * Search parameter: <b>context-type</b>
11525   * <p>
11526   * Description: <b>A type of use context assigned to the test script</b><br>
11527   * Type: <b>token</b><br>
11528   * Path: <b>TestScript.useContext.code</b><br>
11529   * </p>
11530   */
11531  @SearchParamDefinition(name = "context-type", path = "TestScript.useContext.code", description = "A type of use context assigned to the test script", type = "token")
11532  public static final String SP_CONTEXT_TYPE = "context-type";
11533  /**
11534   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
11535   * <p>
11536   * Description: <b>A type of use context assigned to the test script</b><br>
11537   * Type: <b>token</b><br>
11538   * Path: <b>TestScript.useContext.code</b><br>
11539   * </p>
11540   */
11541  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(
11542      SP_CONTEXT_TYPE);
11543
11544  /**
11545   * Search parameter: <b>title</b>
11546   * <p>
11547   * Description: <b>The human-friendly name of the test script</b><br>
11548   * Type: <b>string</b><br>
11549   * Path: <b>TestScript.title</b><br>
11550   * </p>
11551   */
11552  @SearchParamDefinition(name = "title", path = "TestScript.title", description = "The human-friendly name of the test script", type = "string")
11553  public static final String SP_TITLE = "title";
11554  /**
11555   * <b>Fluent Client</b> search parameter constant for <b>title</b>
11556   * <p>
11557   * Description: <b>The human-friendly name of the test script</b><br>
11558   * Type: <b>string</b><br>
11559   * Path: <b>TestScript.title</b><br>
11560   * </p>
11561   */
11562  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(
11563      SP_TITLE);
11564
11565  /**
11566   * Search parameter: <b>version</b>
11567   * <p>
11568   * Description: <b>The business version of the test script</b><br>
11569   * Type: <b>token</b><br>
11570   * Path: <b>TestScript.version</b><br>
11571   * </p>
11572   */
11573  @SearchParamDefinition(name = "version", path = "TestScript.version", description = "The business version of the test script", type = "token")
11574  public static final String SP_VERSION = "version";
11575  /**
11576   * <b>Fluent Client</b> search parameter constant for <b>version</b>
11577   * <p>
11578   * Description: <b>The business version of the test script</b><br>
11579   * Type: <b>token</b><br>
11580   * Path: <b>TestScript.version</b><br>
11581   * </p>
11582   */
11583  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(
11584      SP_VERSION);
11585
11586  /**
11587   * Search parameter: <b>url</b>
11588   * <p>
11589   * Description: <b>The uri that identifies the test script</b><br>
11590   * Type: <b>uri</b><br>
11591   * Path: <b>TestScript.url</b><br>
11592   * </p>
11593   */
11594  @SearchParamDefinition(name = "url", path = "TestScript.url", description = "The uri that identifies the test script", type = "uri")
11595  public static final String SP_URL = "url";
11596  /**
11597   * <b>Fluent Client</b> search parameter constant for <b>url</b>
11598   * <p>
11599   * Description: <b>The uri that identifies the test script</b><br>
11600   * Type: <b>uri</b><br>
11601   * Path: <b>TestScript.url</b><br>
11602   * </p>
11603   */
11604  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
11605
11606  /**
11607   * Search parameter: <b>context-quantity</b>
11608   * <p>
11609   * Description: <b>A quantity- or range-valued use context assigned to the test
11610   * script</b><br>
11611   * Type: <b>quantity</b><br>
11612   * Path: <b>TestScript.useContext.valueQuantity,
11613   * TestScript.useContext.valueRange</b><br>
11614   * </p>
11615   */
11616  @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")
11617  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
11618  /**
11619   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
11620   * <p>
11621   * Description: <b>A quantity- or range-valued use context assigned to the test
11622   * script</b><br>
11623   * Type: <b>quantity</b><br>
11624   * Path: <b>TestScript.useContext.valueQuantity,
11625   * TestScript.useContext.valueRange</b><br>
11626   * </p>
11627   */
11628  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(
11629      SP_CONTEXT_QUANTITY);
11630
11631  /**
11632   * Search parameter: <b>name</b>
11633   * <p>
11634   * Description: <b>Computationally friendly name of the test script</b><br>
11635   * Type: <b>string</b><br>
11636   * Path: <b>TestScript.name</b><br>
11637   * </p>
11638   */
11639  @SearchParamDefinition(name = "name", path = "TestScript.name", description = "Computationally friendly name of the test script", type = "string")
11640  public static final String SP_NAME = "name";
11641  /**
11642   * <b>Fluent Client</b> search parameter constant for <b>name</b>
11643   * <p>
11644   * Description: <b>Computationally friendly name of the test script</b><br>
11645   * Type: <b>string</b><br>
11646   * Path: <b>TestScript.name</b><br>
11647   * </p>
11648   */
11649  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(
11650      SP_NAME);
11651
11652  /**
11653   * Search parameter: <b>context</b>
11654   * <p>
11655   * Description: <b>A use context assigned to the test script</b><br>
11656   * Type: <b>token</b><br>
11657   * Path: <b>TestScript.useContext.valueCodeableConcept</b><br>
11658   * </p>
11659   */
11660  @SearchParamDefinition(name = "context", path = "(TestScript.useContext.value as CodeableConcept)", description = "A use context assigned to the test script", type = "token")
11661  public static final String SP_CONTEXT = "context";
11662  /**
11663   * <b>Fluent Client</b> search parameter constant for <b>context</b>
11664   * <p>
11665   * Description: <b>A use context assigned to the test script</b><br>
11666   * Type: <b>token</b><br>
11667   * Path: <b>TestScript.useContext.valueCodeableConcept</b><br>
11668   * </p>
11669   */
11670  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(
11671      SP_CONTEXT);
11672
11673  /**
11674   * Search parameter: <b>publisher</b>
11675   * <p>
11676   * Description: <b>Name of the publisher of the test script</b><br>
11677   * Type: <b>string</b><br>
11678   * Path: <b>TestScript.publisher</b><br>
11679   * </p>
11680   */
11681  @SearchParamDefinition(name = "publisher", path = "TestScript.publisher", description = "Name of the publisher of the test script", type = "string")
11682  public static final String SP_PUBLISHER = "publisher";
11683  /**
11684   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
11685   * <p>
11686   * Description: <b>Name of the publisher of the test script</b><br>
11687   * Type: <b>string</b><br>
11688   * Path: <b>TestScript.publisher</b><br>
11689   * </p>
11690   */
11691  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(
11692      SP_PUBLISHER);
11693
11694  /**
11695   * Search parameter: <b>context-type-quantity</b>
11696   * <p>
11697   * Description: <b>A use context type and quantity- or range-based value
11698   * assigned to the test script</b><br>
11699   * Type: <b>composite</b><br>
11700   * Path: <b></b><br>
11701   * </p>
11702   */
11703  @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 = {
11704      "context-type", "context-quantity" })
11705  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
11706  /**
11707   * <b>Fluent Client</b> search parameter constant for
11708   * <b>context-type-quantity</b>
11709   * <p>
11710   * Description: <b>A use context type and quantity- or range-based value
11711   * assigned to the test script</b><br>
11712   * Type: <b>composite</b><br>
11713   * Path: <b></b><br>
11714   * </p>
11715   */
11716  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>(
11717      SP_CONTEXT_TYPE_QUANTITY);
11718
11719  /**
11720   * Search parameter: <b>status</b>
11721   * <p>
11722   * Description: <b>The current status of the test script</b><br>
11723   * Type: <b>token</b><br>
11724   * Path: <b>TestScript.status</b><br>
11725   * </p>
11726   */
11727  @SearchParamDefinition(name = "status", path = "TestScript.status", description = "The current status of the test script", type = "token")
11728  public static final String SP_STATUS = "status";
11729  /**
11730   * <b>Fluent Client</b> search parameter constant for <b>status</b>
11731   * <p>
11732   * Description: <b>The current status of the test script</b><br>
11733   * Type: <b>token</b><br>
11734   * Path: <b>TestScript.status</b><br>
11735   * </p>
11736   */
11737  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(
11738      SP_STATUS);
11739
11740}