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 Thu, Dec 27, 2018 10:06-0500 for FHIR v4.0.0
033
034import java.util.*;
035
036import org.hl7.fhir.utilities.Utilities;
037import org.hl7.fhir.r4.model.Enumerations.*;
038import ca.uhn.fhir.model.api.annotation.ResourceDef;
039import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
040import ca.uhn.fhir.model.api.annotation.Child;
041import ca.uhn.fhir.model.api.annotation.ChildOrder;
042import ca.uhn.fhir.model.api.annotation.Description;
043import ca.uhn.fhir.model.api.annotation.Block;
044import org.hl7.fhir.instance.model.api.*;
045import org.hl7.fhir.exceptions.FHIRException;
046/**
047 * A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.
048 */
049@ResourceDef(name="TestScript", profile="http://hl7.org/fhir/StructureDefinition/TestScript")
050@ChildOrder(names={"url", "identifier", "version", "name", "title", "status", "experimental", "date", "publisher", "contact", "description", "useContext", "jurisdiction", "purpose", "copyright", "origin", "destination", "metadata", "fixture", "profile", "variable", "setup", "test", "teardown"})
051public class TestScript extends MetadataResource {
052
053    public enum TestScriptRequestMethodCode {
054        /**
055         * HTTP DELETE operation.
056         */
057        DELETE, 
058        /**
059         * HTTP GET operation.
060         */
061        GET, 
062        /**
063         * HTTP OPTIONS operation.
064         */
065        OPTIONS, 
066        /**
067         * HTTP PATCH operation.
068         */
069        PATCH, 
070        /**
071         * HTTP POST operation.
072         */
073        POST, 
074        /**
075         * HTTP PUT operation.
076         */
077        PUT, 
078        /**
079         * HTTP HEAD operation.
080         */
081        HEAD, 
082        /**
083         * added to help the parsers with the generic types
084         */
085        NULL;
086        public static TestScriptRequestMethodCode fromCode(String codeString) throws FHIRException {
087            if (codeString == null || "".equals(codeString))
088                return null;
089        if ("delete".equals(codeString))
090          return DELETE;
091        if ("get".equals(codeString))
092          return GET;
093        if ("options".equals(codeString))
094          return OPTIONS;
095        if ("patch".equals(codeString))
096          return PATCH;
097        if ("post".equals(codeString))
098          return POST;
099        if ("put".equals(codeString))
100          return PUT;
101        if ("head".equals(codeString))
102          return HEAD;
103        if (Configuration.isAcceptInvalidEnums())
104          return null;
105        else
106          throw new FHIRException("Unknown TestScriptRequestMethodCode code '"+codeString+"'");
107        }
108        public String toCode() {
109          switch (this) {
110            case DELETE: return "delete";
111            case GET: return "get";
112            case OPTIONS: return "options";
113            case PATCH: return "patch";
114            case POST: return "post";
115            case PUT: return "put";
116            case HEAD: return "head";
117            default: return "?";
118          }
119        }
120        public String getSystem() {
121          switch (this) {
122            case DELETE: return "http://hl7.org/fhir/http-operations";
123            case GET: return "http://hl7.org/fhir/http-operations";
124            case OPTIONS: return "http://hl7.org/fhir/http-operations";
125            case PATCH: return "http://hl7.org/fhir/http-operations";
126            case POST: return "http://hl7.org/fhir/http-operations";
127            case PUT: return "http://hl7.org/fhir/http-operations";
128            case HEAD: return "http://hl7.org/fhir/http-operations";
129            default: return "?";
130          }
131        }
132        public String getDefinition() {
133          switch (this) {
134            case DELETE: return "HTTP DELETE operation.";
135            case GET: return "HTTP GET operation.";
136            case OPTIONS: return "HTTP OPTIONS operation.";
137            case PATCH: return "HTTP PATCH operation.";
138            case POST: return "HTTP POST operation.";
139            case PUT: return "HTTP PUT operation.";
140            case HEAD: return "HTTP HEAD operation.";
141            default: return "?";
142          }
143        }
144        public String getDisplay() {
145          switch (this) {
146            case DELETE: return "DELETE";
147            case GET: return "GET";
148            case OPTIONS: return "OPTIONS";
149            case PATCH: return "PATCH";
150            case POST: return "POST";
151            case PUT: return "PUT";
152            case HEAD: return "HEAD";
153            default: return "?";
154          }
155        }
156    }
157
158  public static class TestScriptRequestMethodCodeEnumFactory implements EnumFactory<TestScriptRequestMethodCode> {
159    public TestScriptRequestMethodCode fromCode(String codeString) throws IllegalArgumentException {
160      if (codeString == null || "".equals(codeString))
161            if (codeString == null || "".equals(codeString))
162                return null;
163        if ("delete".equals(codeString))
164          return TestScriptRequestMethodCode.DELETE;
165        if ("get".equals(codeString))
166          return TestScriptRequestMethodCode.GET;
167        if ("options".equals(codeString))
168          return TestScriptRequestMethodCode.OPTIONS;
169        if ("patch".equals(codeString))
170          return TestScriptRequestMethodCode.PATCH;
171        if ("post".equals(codeString))
172          return TestScriptRequestMethodCode.POST;
173        if ("put".equals(codeString))
174          return TestScriptRequestMethodCode.PUT;
175        if ("head".equals(codeString))
176          return TestScriptRequestMethodCode.HEAD;
177        throw new IllegalArgumentException("Unknown TestScriptRequestMethodCode code '"+codeString+"'");
178        }
179        public Enumeration<TestScriptRequestMethodCode> fromType(Base code) throws FHIRException {
180          if (code == null)
181            return null;
182          if (code.isEmpty())
183            return new Enumeration<TestScriptRequestMethodCode>(this);
184          String codeString = ((PrimitiveType) code).asStringValue();
185          if (codeString == null || "".equals(codeString))
186            return null;
187        if ("delete".equals(codeString))
188          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.DELETE);
189        if ("get".equals(codeString))
190          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.GET);
191        if ("options".equals(codeString))
192          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.OPTIONS);
193        if ("patch".equals(codeString))
194          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.PATCH);
195        if ("post".equals(codeString))
196          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.POST);
197        if ("put".equals(codeString))
198          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.PUT);
199        if ("head".equals(codeString))
200          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.HEAD);
201        throw new FHIRException("Unknown TestScriptRequestMethodCode code '"+codeString+"'");
202        }
203    public String toCode(TestScriptRequestMethodCode code) {
204      if (code == TestScriptRequestMethodCode.DELETE)
205        return "delete";
206      if (code == TestScriptRequestMethodCode.GET)
207        return "get";
208      if (code == TestScriptRequestMethodCode.OPTIONS)
209        return "options";
210      if (code == TestScriptRequestMethodCode.PATCH)
211        return "patch";
212      if (code == TestScriptRequestMethodCode.POST)
213        return "post";
214      if (code == TestScriptRequestMethodCode.PUT)
215        return "put";
216      if (code == TestScriptRequestMethodCode.HEAD)
217        return "head";
218      return "?";
219      }
220    public String toSystem(TestScriptRequestMethodCode code) {
221      return code.getSystem();
222      }
223    }
224
225    public enum AssertionDirectionType {
226        /**
227         * The assertion is evaluated on the response. This is the default value.
228         */
229        RESPONSE, 
230        /**
231         * The assertion is evaluated on the request.
232         */
233        REQUEST, 
234        /**
235         * added to help the parsers with the generic types
236         */
237        NULL;
238        public static AssertionDirectionType fromCode(String codeString) throws FHIRException {
239            if (codeString == null || "".equals(codeString))
240                return null;
241        if ("response".equals(codeString))
242          return RESPONSE;
243        if ("request".equals(codeString))
244          return REQUEST;
245        if (Configuration.isAcceptInvalidEnums())
246          return null;
247        else
248          throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'");
249        }
250        public String toCode() {
251          switch (this) {
252            case RESPONSE: return "response";
253            case REQUEST: return "request";
254            default: return "?";
255          }
256        }
257        public String getSystem() {
258          switch (this) {
259            case RESPONSE: return "http://hl7.org/fhir/assert-direction-codes";
260            case REQUEST: return "http://hl7.org/fhir/assert-direction-codes";
261            default: return "?";
262          }
263        }
264        public String getDefinition() {
265          switch (this) {
266            case RESPONSE: return "The assertion is evaluated on the response. This is the default value.";
267            case REQUEST: return "The assertion is evaluated on the request.";
268            default: return "?";
269          }
270        }
271        public String getDisplay() {
272          switch (this) {
273            case RESPONSE: return "response";
274            case REQUEST: return "request";
275            default: return "?";
276          }
277        }
278    }
279
280  public static class AssertionDirectionTypeEnumFactory implements EnumFactory<AssertionDirectionType> {
281    public AssertionDirectionType fromCode(String codeString) throws IllegalArgumentException {
282      if (codeString == null || "".equals(codeString))
283            if (codeString == null || "".equals(codeString))
284                return null;
285        if ("response".equals(codeString))
286          return AssertionDirectionType.RESPONSE;
287        if ("request".equals(codeString))
288          return AssertionDirectionType.REQUEST;
289        throw new IllegalArgumentException("Unknown AssertionDirectionType code '"+codeString+"'");
290        }
291        public Enumeration<AssertionDirectionType> fromType(Base code) throws FHIRException {
292          if (code == null)
293            return null;
294          if (code.isEmpty())
295            return new Enumeration<AssertionDirectionType>(this);
296          String codeString = ((PrimitiveType) code).asStringValue();
297          if (codeString == null || "".equals(codeString))
298            return null;
299        if ("response".equals(codeString))
300          return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.RESPONSE);
301        if ("request".equals(codeString))
302          return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.REQUEST);
303        throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'");
304        }
305    public String toCode(AssertionDirectionType code) {
306      if (code == AssertionDirectionType.RESPONSE)
307        return "response";
308      if (code == AssertionDirectionType.REQUEST)
309        return "request";
310      return "?";
311      }
312    public String toSystem(AssertionDirectionType code) {
313      return code.getSystem();
314      }
315    }
316
317    public enum AssertionOperatorType {
318        /**
319         * Default value. Equals comparison.
320         */
321        EQUALS, 
322        /**
323         * Not equals comparison.
324         */
325        NOTEQUALS, 
326        /**
327         * Compare value within a known set of values.
328         */
329        IN, 
330        /**
331         * Compare value not within a known set of values.
332         */
333        NOTIN, 
334        /**
335         * Compare value to be greater than a known value.
336         */
337        GREATERTHAN, 
338        /**
339         * Compare value to be less than a known value.
340         */
341        LESSTHAN, 
342        /**
343         * Compare value is empty.
344         */
345        EMPTY, 
346        /**
347         * Compare value is not empty.
348         */
349        NOTEMPTY, 
350        /**
351         * Compare value string contains a known value.
352         */
353        CONTAINS, 
354        /**
355         * Compare value string does not contain a known value.
356         */
357        NOTCONTAINS, 
358        /**
359         * Evaluate the FHIRPath expression as a boolean condition.
360         */
361        EVAL, 
362        /**
363         * added to help the parsers with the generic types
364         */
365        NULL;
366        public static AssertionOperatorType fromCode(String codeString) throws FHIRException {
367            if (codeString == null || "".equals(codeString))
368                return null;
369        if ("equals".equals(codeString))
370          return EQUALS;
371        if ("notEquals".equals(codeString))
372          return NOTEQUALS;
373        if ("in".equals(codeString))
374          return IN;
375        if ("notIn".equals(codeString))
376          return NOTIN;
377        if ("greaterThan".equals(codeString))
378          return GREATERTHAN;
379        if ("lessThan".equals(codeString))
380          return LESSTHAN;
381        if ("empty".equals(codeString))
382          return EMPTY;
383        if ("notEmpty".equals(codeString))
384          return NOTEMPTY;
385        if ("contains".equals(codeString))
386          return CONTAINS;
387        if ("notContains".equals(codeString))
388          return NOTCONTAINS;
389        if ("eval".equals(codeString))
390          return EVAL;
391        if (Configuration.isAcceptInvalidEnums())
392          return null;
393        else
394          throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'");
395        }
396        public String toCode() {
397          switch (this) {
398            case EQUALS: return "equals";
399            case NOTEQUALS: return "notEquals";
400            case IN: return "in";
401            case NOTIN: return "notIn";
402            case GREATERTHAN: return "greaterThan";
403            case LESSTHAN: return "lessThan";
404            case EMPTY: return "empty";
405            case NOTEMPTY: return "notEmpty";
406            case CONTAINS: return "contains";
407            case NOTCONTAINS: return "notContains";
408            case EVAL: return "eval";
409            default: return "?";
410          }
411        }
412        public String getSystem() {
413          switch (this) {
414            case EQUALS: return "http://hl7.org/fhir/assert-operator-codes";
415            case NOTEQUALS: return "http://hl7.org/fhir/assert-operator-codes";
416            case IN: return "http://hl7.org/fhir/assert-operator-codes";
417            case NOTIN: return "http://hl7.org/fhir/assert-operator-codes";
418            case GREATERTHAN: return "http://hl7.org/fhir/assert-operator-codes";
419            case LESSTHAN: return "http://hl7.org/fhir/assert-operator-codes";
420            case EMPTY: return "http://hl7.org/fhir/assert-operator-codes";
421            case NOTEMPTY: return "http://hl7.org/fhir/assert-operator-codes";
422            case CONTAINS: return "http://hl7.org/fhir/assert-operator-codes";
423            case NOTCONTAINS: return "http://hl7.org/fhir/assert-operator-codes";
424            case EVAL: return "http://hl7.org/fhir/assert-operator-codes";
425            default: return "?";
426          }
427        }
428        public String getDefinition() {
429          switch (this) {
430            case EQUALS: return "Default value. Equals comparison.";
431            case NOTEQUALS: return "Not equals comparison.";
432            case IN: return "Compare value within a known set of values.";
433            case NOTIN: return "Compare value not within a known set of values.";
434            case GREATERTHAN: return "Compare value to be greater than a known value.";
435            case LESSTHAN: return "Compare value to be less than a known value.";
436            case EMPTY: return "Compare value is empty.";
437            case NOTEMPTY: return "Compare value is not empty.";
438            case CONTAINS: return "Compare value string contains a known value.";
439            case NOTCONTAINS: return "Compare value string does not contain a known value.";
440            case EVAL: return "Evaluate the FHIRPath expression as a boolean condition.";
441            default: return "?";
442          }
443        }
444        public String getDisplay() {
445          switch (this) {
446            case EQUALS: return "equals";
447            case NOTEQUALS: return "notEquals";
448            case IN: return "in";
449            case NOTIN: return "notIn";
450            case GREATERTHAN: return "greaterThan";
451            case LESSTHAN: return "lessThan";
452            case EMPTY: return "empty";
453            case NOTEMPTY: return "notEmpty";
454            case CONTAINS: return "contains";
455            case NOTCONTAINS: return "notContains";
456            case EVAL: return "evaluate";
457            default: return "?";
458          }
459        }
460    }
461
462  public static class AssertionOperatorTypeEnumFactory implements EnumFactory<AssertionOperatorType> {
463    public AssertionOperatorType fromCode(String codeString) throws IllegalArgumentException {
464      if (codeString == null || "".equals(codeString))
465            if (codeString == null || "".equals(codeString))
466                return null;
467        if ("equals".equals(codeString))
468          return AssertionOperatorType.EQUALS;
469        if ("notEquals".equals(codeString))
470          return AssertionOperatorType.NOTEQUALS;
471        if ("in".equals(codeString))
472          return AssertionOperatorType.IN;
473        if ("notIn".equals(codeString))
474          return AssertionOperatorType.NOTIN;
475        if ("greaterThan".equals(codeString))
476          return AssertionOperatorType.GREATERTHAN;
477        if ("lessThan".equals(codeString))
478          return AssertionOperatorType.LESSTHAN;
479        if ("empty".equals(codeString))
480          return AssertionOperatorType.EMPTY;
481        if ("notEmpty".equals(codeString))
482          return AssertionOperatorType.NOTEMPTY;
483        if ("contains".equals(codeString))
484          return AssertionOperatorType.CONTAINS;
485        if ("notContains".equals(codeString))
486          return AssertionOperatorType.NOTCONTAINS;
487        if ("eval".equals(codeString))
488          return AssertionOperatorType.EVAL;
489        throw new IllegalArgumentException("Unknown AssertionOperatorType code '"+codeString+"'");
490        }
491        public Enumeration<AssertionOperatorType> fromType(Base code) throws FHIRException {
492          if (code == null)
493            return null;
494          if (code.isEmpty())
495            return new Enumeration<AssertionOperatorType>(this);
496          String codeString = ((PrimitiveType) code).asStringValue();
497          if (codeString == null || "".equals(codeString))
498            return null;
499        if ("equals".equals(codeString))
500          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EQUALS);
501        if ("notEquals".equals(codeString))
502          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEQUALS);
503        if ("in".equals(codeString))
504          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.IN);
505        if ("notIn".equals(codeString))
506          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTIN);
507        if ("greaterThan".equals(codeString))
508          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.GREATERTHAN);
509        if ("lessThan".equals(codeString))
510          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.LESSTHAN);
511        if ("empty".equals(codeString))
512          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EMPTY);
513        if ("notEmpty".equals(codeString))
514          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEMPTY);
515        if ("contains".equals(codeString))
516          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.CONTAINS);
517        if ("notContains".equals(codeString))
518          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTCONTAINS);
519        if ("eval".equals(codeString))
520          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EVAL);
521        throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'");
522        }
523    public String toCode(AssertionOperatorType code) {
524      if (code == AssertionOperatorType.EQUALS)
525        return "equals";
526      if (code == AssertionOperatorType.NOTEQUALS)
527        return "notEquals";
528      if (code == AssertionOperatorType.IN)
529        return "in";
530      if (code == AssertionOperatorType.NOTIN)
531        return "notIn";
532      if (code == AssertionOperatorType.GREATERTHAN)
533        return "greaterThan";
534      if (code == AssertionOperatorType.LESSTHAN)
535        return "lessThan";
536      if (code == AssertionOperatorType.EMPTY)
537        return "empty";
538      if (code == AssertionOperatorType.NOTEMPTY)
539        return "notEmpty";
540      if (code == AssertionOperatorType.CONTAINS)
541        return "contains";
542      if (code == AssertionOperatorType.NOTCONTAINS)
543        return "notContains";
544      if (code == AssertionOperatorType.EVAL)
545        return "eval";
546      return "?";
547      }
548    public String toSystem(AssertionOperatorType code) {
549      return code.getSystem();
550      }
551    }
552
553    public enum AssertionResponseTypes {
554        /**
555         * Response code is 200.
556         */
557        OKAY, 
558        /**
559         * Response code is 201.
560         */
561        CREATED, 
562        /**
563         * Response code is 204.
564         */
565        NOCONTENT, 
566        /**
567         * Response code is 304.
568         */
569        NOTMODIFIED, 
570        /**
571         * Response code is 400.
572         */
573        BAD, 
574        /**
575         * Response code is 403.
576         */
577        FORBIDDEN, 
578        /**
579         * Response code is 404.
580         */
581        NOTFOUND, 
582        /**
583         * Response code is 405.
584         */
585        METHODNOTALLOWED, 
586        /**
587         * Response code is 409.
588         */
589        CONFLICT, 
590        /**
591         * Response code is 410.
592         */
593        GONE, 
594        /**
595         * Response code is 412.
596         */
597        PRECONDITIONFAILED, 
598        /**
599         * Response code is 422.
600         */
601        UNPROCESSABLE, 
602        /**
603         * added to help the parsers with the generic types
604         */
605        NULL;
606        public static AssertionResponseTypes fromCode(String codeString) throws FHIRException {
607            if (codeString == null || "".equals(codeString))
608                return null;
609        if ("okay".equals(codeString))
610          return OKAY;
611        if ("created".equals(codeString))
612          return CREATED;
613        if ("noContent".equals(codeString))
614          return NOCONTENT;
615        if ("notModified".equals(codeString))
616          return NOTMODIFIED;
617        if ("bad".equals(codeString))
618          return BAD;
619        if ("forbidden".equals(codeString))
620          return FORBIDDEN;
621        if ("notFound".equals(codeString))
622          return NOTFOUND;
623        if ("methodNotAllowed".equals(codeString))
624          return METHODNOTALLOWED;
625        if ("conflict".equals(codeString))
626          return CONFLICT;
627        if ("gone".equals(codeString))
628          return GONE;
629        if ("preconditionFailed".equals(codeString))
630          return PRECONDITIONFAILED;
631        if ("unprocessable".equals(codeString))
632          return UNPROCESSABLE;
633        if (Configuration.isAcceptInvalidEnums())
634          return null;
635        else
636          throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'");
637        }
638        public String toCode() {
639          switch (this) {
640            case OKAY: return "okay";
641            case CREATED: return "created";
642            case NOCONTENT: return "noContent";
643            case NOTMODIFIED: return "notModified";
644            case BAD: return "bad";
645            case FORBIDDEN: return "forbidden";
646            case NOTFOUND: return "notFound";
647            case METHODNOTALLOWED: return "methodNotAllowed";
648            case CONFLICT: return "conflict";
649            case GONE: return "gone";
650            case PRECONDITIONFAILED: return "preconditionFailed";
651            case UNPROCESSABLE: return "unprocessable";
652            default: return "?";
653          }
654        }
655        public String getSystem() {
656          switch (this) {
657            case OKAY: return "http://hl7.org/fhir/assert-response-code-types";
658            case CREATED: return "http://hl7.org/fhir/assert-response-code-types";
659            case NOCONTENT: return "http://hl7.org/fhir/assert-response-code-types";
660            case NOTMODIFIED: return "http://hl7.org/fhir/assert-response-code-types";
661            case BAD: return "http://hl7.org/fhir/assert-response-code-types";
662            case FORBIDDEN: return "http://hl7.org/fhir/assert-response-code-types";
663            case NOTFOUND: return "http://hl7.org/fhir/assert-response-code-types";
664            case METHODNOTALLOWED: return "http://hl7.org/fhir/assert-response-code-types";
665            case CONFLICT: return "http://hl7.org/fhir/assert-response-code-types";
666            case GONE: return "http://hl7.org/fhir/assert-response-code-types";
667            case PRECONDITIONFAILED: return "http://hl7.org/fhir/assert-response-code-types";
668            case UNPROCESSABLE: return "http://hl7.org/fhir/assert-response-code-types";
669            default: return "?";
670          }
671        }
672        public String getDefinition() {
673          switch (this) {
674            case OKAY: return "Response code is 200.";
675            case CREATED: return "Response code is 201.";
676            case NOCONTENT: return "Response code is 204.";
677            case NOTMODIFIED: return "Response code is 304.";
678            case BAD: return "Response code is 400.";
679            case FORBIDDEN: return "Response code is 403.";
680            case NOTFOUND: return "Response code is 404.";
681            case METHODNOTALLOWED: return "Response code is 405.";
682            case CONFLICT: return "Response code is 409.";
683            case GONE: return "Response code is 410.";
684            case PRECONDITIONFAILED: return "Response code is 412.";
685            case UNPROCESSABLE: return "Response code is 422.";
686            default: return "?";
687          }
688        }
689        public String getDisplay() {
690          switch (this) {
691            case OKAY: return "okay";
692            case CREATED: return "created";
693            case NOCONTENT: return "noContent";
694            case NOTMODIFIED: return "notModified";
695            case BAD: return "bad";
696            case FORBIDDEN: return "forbidden";
697            case NOTFOUND: return "notFound";
698            case METHODNOTALLOWED: return "methodNotAllowed";
699            case CONFLICT: return "conflict";
700            case GONE: return "gone";
701            case PRECONDITIONFAILED: return "preconditionFailed";
702            case UNPROCESSABLE: return "unprocessable";
703            default: return "?";
704          }
705        }
706    }
707
708  public static class AssertionResponseTypesEnumFactory implements EnumFactory<AssertionResponseTypes> {
709    public AssertionResponseTypes fromCode(String codeString) throws IllegalArgumentException {
710      if (codeString == null || "".equals(codeString))
711            if (codeString == null || "".equals(codeString))
712                return null;
713        if ("okay".equals(codeString))
714          return AssertionResponseTypes.OKAY;
715        if ("created".equals(codeString))
716          return AssertionResponseTypes.CREATED;
717        if ("noContent".equals(codeString))
718          return AssertionResponseTypes.NOCONTENT;
719        if ("notModified".equals(codeString))
720          return AssertionResponseTypes.NOTMODIFIED;
721        if ("bad".equals(codeString))
722          return AssertionResponseTypes.BAD;
723        if ("forbidden".equals(codeString))
724          return AssertionResponseTypes.FORBIDDEN;
725        if ("notFound".equals(codeString))
726          return AssertionResponseTypes.NOTFOUND;
727        if ("methodNotAllowed".equals(codeString))
728          return AssertionResponseTypes.METHODNOTALLOWED;
729        if ("conflict".equals(codeString))
730          return AssertionResponseTypes.CONFLICT;
731        if ("gone".equals(codeString))
732          return AssertionResponseTypes.GONE;
733        if ("preconditionFailed".equals(codeString))
734          return AssertionResponseTypes.PRECONDITIONFAILED;
735        if ("unprocessable".equals(codeString))
736          return AssertionResponseTypes.UNPROCESSABLE;
737        throw new IllegalArgumentException("Unknown AssertionResponseTypes code '"+codeString+"'");
738        }
739        public Enumeration<AssertionResponseTypes> fromType(Base code) throws FHIRException {
740          if (code == null)
741            return null;
742          if (code.isEmpty())
743            return new Enumeration<AssertionResponseTypes>(this);
744          String codeString = ((PrimitiveType) code).asStringValue();
745          if (codeString == null || "".equals(codeString))
746            return null;
747        if ("okay".equals(codeString))
748          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.OKAY);
749        if ("created".equals(codeString))
750          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CREATED);
751        if ("noContent".equals(codeString))
752          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOCONTENT);
753        if ("notModified".equals(codeString))
754          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTMODIFIED);
755        if ("bad".equals(codeString))
756          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.BAD);
757        if ("forbidden".equals(codeString))
758          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.FORBIDDEN);
759        if ("notFound".equals(codeString))
760          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTFOUND);
761        if ("methodNotAllowed".equals(codeString))
762          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.METHODNOTALLOWED);
763        if ("conflict".equals(codeString))
764          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CONFLICT);
765        if ("gone".equals(codeString))
766          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.GONE);
767        if ("preconditionFailed".equals(codeString))
768          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.PRECONDITIONFAILED);
769        if ("unprocessable".equals(codeString))
770          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.UNPROCESSABLE);
771        throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'");
772        }
773    public String toCode(AssertionResponseTypes code) {
774      if (code == AssertionResponseTypes.OKAY)
775        return "okay";
776      if (code == AssertionResponseTypes.CREATED)
777        return "created";
778      if (code == AssertionResponseTypes.NOCONTENT)
779        return "noContent";
780      if (code == AssertionResponseTypes.NOTMODIFIED)
781        return "notModified";
782      if (code == AssertionResponseTypes.BAD)
783        return "bad";
784      if (code == AssertionResponseTypes.FORBIDDEN)
785        return "forbidden";
786      if (code == AssertionResponseTypes.NOTFOUND)
787        return "notFound";
788      if (code == AssertionResponseTypes.METHODNOTALLOWED)
789        return "methodNotAllowed";
790      if (code == AssertionResponseTypes.CONFLICT)
791        return "conflict";
792      if (code == AssertionResponseTypes.GONE)
793        return "gone";
794      if (code == AssertionResponseTypes.PRECONDITIONFAILED)
795        return "preconditionFailed";
796      if (code == AssertionResponseTypes.UNPROCESSABLE)
797        return "unprocessable";
798      return "?";
799      }
800    public String toSystem(AssertionResponseTypes code) {
801      return code.getSystem();
802      }
803    }
804
805    @Block()
806    public static class TestScriptOriginComponent extends BackboneElement implements IBaseBackboneElement {
807        /**
808         * Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.
809         */
810        @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false)
811        @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." )
812        protected IntegerType index;
813
814        /**
815         * The type of origin profile the test system supports.
816         */
817        @Child(name = "profile", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false)
818        @Description(shortDefinition="FHIR-Client | FHIR-SDC-FormFiller", formalDefinition="The type of origin profile the test system supports." )
819        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-profile-origin-types")
820        protected Coding profile;
821
822        private static final long serialVersionUID = -1239935149L;
823
824    /**
825     * Constructor
826     */
827      public TestScriptOriginComponent() {
828        super();
829      }
830
831    /**
832     * Constructor
833     */
834      public TestScriptOriginComponent(IntegerType index, Coding profile) {
835        super();
836        this.index = index;
837        this.profile = profile;
838      }
839
840        /**
841         * @return {@link #index} (Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value
842         */
843        public IntegerType getIndexElement() { 
844          if (this.index == null)
845            if (Configuration.errorOnAutoCreate())
846              throw new Error("Attempt to auto-create TestScriptOriginComponent.index");
847            else if (Configuration.doAutoCreate())
848              this.index = new IntegerType(); // bb
849          return this.index;
850        }
851
852        public boolean hasIndexElement() { 
853          return this.index != null && !this.index.isEmpty();
854        }
855
856        public boolean hasIndex() { 
857          return this.index != null && !this.index.isEmpty();
858        }
859
860        /**
861         * @param value {@link #index} (Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value
862         */
863        public TestScriptOriginComponent setIndexElement(IntegerType value) { 
864          this.index = value;
865          return this;
866        }
867
868        /**
869         * @return Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.
870         */
871        public int getIndex() { 
872          return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue();
873        }
874
875        /**
876         * @param value Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.
877         */
878        public TestScriptOriginComponent setIndex(int value) { 
879            if (this.index == null)
880              this.index = new IntegerType();
881            this.index.setValue(value);
882          return this;
883        }
884
885        /**
886         * @return {@link #profile} (The type of origin profile the test system supports.)
887         */
888        public Coding getProfile() { 
889          if (this.profile == null)
890            if (Configuration.errorOnAutoCreate())
891              throw new Error("Attempt to auto-create TestScriptOriginComponent.profile");
892            else if (Configuration.doAutoCreate())
893              this.profile = new Coding(); // cc
894          return this.profile;
895        }
896
897        public boolean hasProfile() { 
898          return this.profile != null && !this.profile.isEmpty();
899        }
900
901        /**
902         * @param value {@link #profile} (The type of origin profile the test system supports.)
903         */
904        public TestScriptOriginComponent setProfile(Coding value) { 
905          this.profile = value;
906          return this;
907        }
908
909        protected void listChildren(List<Property> children) {
910          super.listChildren(children);
911          children.add(new Property("index", "integer", "Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.", 0, 1, index));
912          children.add(new Property("profile", "Coding", "The type of origin profile the test system supports.", 0, 1, profile));
913        }
914
915        @Override
916        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
917          switch (_hash) {
918          case 100346066: /*index*/  return new Property("index", "integer", "Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.", 0, 1, index);
919          case -309425751: /*profile*/  return new Property("profile", "Coding", "The type of origin profile the test system supports.", 0, 1, profile);
920          default: return super.getNamedProperty(_hash, _name, _checkValid);
921          }
922
923        }
924
925      @Override
926      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
927        switch (hash) {
928        case 100346066: /*index*/ return this.index == null ? new Base[0] : new Base[] {this.index}; // IntegerType
929        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Coding
930        default: return super.getProperty(hash, name, checkValid);
931        }
932
933      }
934
935      @Override
936      public Base setProperty(int hash, String name, Base value) throws FHIRException {
937        switch (hash) {
938        case 100346066: // index
939          this.index = castToInteger(value); // IntegerType
940          return value;
941        case -309425751: // profile
942          this.profile = castToCoding(value); // Coding
943          return value;
944        default: return super.setProperty(hash, name, value);
945        }
946
947      }
948
949      @Override
950      public Base setProperty(String name, Base value) throws FHIRException {
951        if (name.equals("index")) {
952          this.index = castToInteger(value); // IntegerType
953        } else if (name.equals("profile")) {
954          this.profile = castToCoding(value); // Coding
955        } else
956          return super.setProperty(name, value);
957        return value;
958      }
959
960      @Override
961      public Base makeProperty(int hash, String name) throws FHIRException {
962        switch (hash) {
963        case 100346066:  return getIndexElement();
964        case -309425751:  return getProfile(); 
965        default: return super.makeProperty(hash, name);
966        }
967
968      }
969
970      @Override
971      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
972        switch (hash) {
973        case 100346066: /*index*/ return new String[] {"integer"};
974        case -309425751: /*profile*/ return new String[] {"Coding"};
975        default: return super.getTypesForProperty(hash, name);
976        }
977
978      }
979
980      @Override
981      public Base addChild(String name) throws FHIRException {
982        if (name.equals("index")) {
983          throw new FHIRException("Cannot call addChild on a primitive type TestScript.index");
984        }
985        else if (name.equals("profile")) {
986          this.profile = new Coding();
987          return this.profile;
988        }
989        else
990          return super.addChild(name);
991      }
992
993      public TestScriptOriginComponent copy() {
994        TestScriptOriginComponent dst = new TestScriptOriginComponent();
995        copyValues(dst);
996        dst.index = index == null ? null : index.copy();
997        dst.profile = profile == null ? null : profile.copy();
998        return dst;
999      }
1000
1001      @Override
1002      public boolean equalsDeep(Base other_) {
1003        if (!super.equalsDeep(other_))
1004          return false;
1005        if (!(other_ instanceof TestScriptOriginComponent))
1006          return false;
1007        TestScriptOriginComponent o = (TestScriptOriginComponent) other_;
1008        return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true);
1009      }
1010
1011      @Override
1012      public boolean equalsShallow(Base other_) {
1013        if (!super.equalsShallow(other_))
1014          return false;
1015        if (!(other_ instanceof TestScriptOriginComponent))
1016          return false;
1017        TestScriptOriginComponent o = (TestScriptOriginComponent) other_;
1018        return compareValues(index, o.index, true);
1019      }
1020
1021      public boolean isEmpty() {
1022        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(index, profile);
1023      }
1024
1025  public String fhirType() {
1026    return "TestScript.origin";
1027
1028  }
1029
1030  }
1031
1032    @Block()
1033    public static class TestScriptDestinationComponent extends BackboneElement implements IBaseBackboneElement {
1034        /**
1035         * Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.
1036         */
1037        @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1038        @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." )
1039        protected IntegerType index;
1040
1041        /**
1042         * The type of destination profile the test system supports.
1043         */
1044        @Child(name = "profile", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false)
1045        @Description(shortDefinition="FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor", formalDefinition="The type of destination profile the test system supports." )
1046        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-profile-destination-types")
1047        protected Coding profile;
1048
1049        private static final long serialVersionUID = -1239935149L;
1050
1051    /**
1052     * Constructor
1053     */
1054      public TestScriptDestinationComponent() {
1055        super();
1056      }
1057
1058    /**
1059     * Constructor
1060     */
1061      public TestScriptDestinationComponent(IntegerType index, Coding profile) {
1062        super();
1063        this.index = index;
1064        this.profile = profile;
1065      }
1066
1067        /**
1068         * @return {@link #index} (Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value
1069         */
1070        public IntegerType getIndexElement() { 
1071          if (this.index == null)
1072            if (Configuration.errorOnAutoCreate())
1073              throw new Error("Attempt to auto-create TestScriptDestinationComponent.index");
1074            else if (Configuration.doAutoCreate())
1075              this.index = new IntegerType(); // bb
1076          return this.index;
1077        }
1078
1079        public boolean hasIndexElement() { 
1080          return this.index != null && !this.index.isEmpty();
1081        }
1082
1083        public boolean hasIndex() { 
1084          return this.index != null && !this.index.isEmpty();
1085        }
1086
1087        /**
1088         * @param value {@link #index} (Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value
1089         */
1090        public TestScriptDestinationComponent setIndexElement(IntegerType value) { 
1091          this.index = value;
1092          return this;
1093        }
1094
1095        /**
1096         * @return Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.
1097         */
1098        public int getIndex() { 
1099          return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue();
1100        }
1101
1102        /**
1103         * @param value Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.
1104         */
1105        public TestScriptDestinationComponent setIndex(int value) { 
1106            if (this.index == null)
1107              this.index = new IntegerType();
1108            this.index.setValue(value);
1109          return this;
1110        }
1111
1112        /**
1113         * @return {@link #profile} (The type of destination profile the test system supports.)
1114         */
1115        public Coding getProfile() { 
1116          if (this.profile == null)
1117            if (Configuration.errorOnAutoCreate())
1118              throw new Error("Attempt to auto-create TestScriptDestinationComponent.profile");
1119            else if (Configuration.doAutoCreate())
1120              this.profile = new Coding(); // cc
1121          return this.profile;
1122        }
1123
1124        public boolean hasProfile() { 
1125          return this.profile != null && !this.profile.isEmpty();
1126        }
1127
1128        /**
1129         * @param value {@link #profile} (The type of destination profile the test system supports.)
1130         */
1131        public TestScriptDestinationComponent setProfile(Coding value) { 
1132          this.profile = value;
1133          return this;
1134        }
1135
1136        protected void listChildren(List<Property> children) {
1137          super.listChildren(children);
1138          children.add(new Property("index", "integer", "Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.", 0, 1, index));
1139          children.add(new Property("profile", "Coding", "The type of destination profile the test system supports.", 0, 1, profile));
1140        }
1141
1142        @Override
1143        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1144          switch (_hash) {
1145          case 100346066: /*index*/  return new Property("index", "integer", "Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.", 0, 1, index);
1146          case -309425751: /*profile*/  return new Property("profile", "Coding", "The type of destination profile the test system supports.", 0, 1, profile);
1147          default: return super.getNamedProperty(_hash, _name, _checkValid);
1148          }
1149
1150        }
1151
1152      @Override
1153      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1154        switch (hash) {
1155        case 100346066: /*index*/ return this.index == null ? new Base[0] : new Base[] {this.index}; // IntegerType
1156        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Coding
1157        default: return super.getProperty(hash, name, checkValid);
1158        }
1159
1160      }
1161
1162      @Override
1163      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1164        switch (hash) {
1165        case 100346066: // index
1166          this.index = castToInteger(value); // IntegerType
1167          return value;
1168        case -309425751: // profile
1169          this.profile = castToCoding(value); // Coding
1170          return value;
1171        default: return super.setProperty(hash, name, value);
1172        }
1173
1174      }
1175
1176      @Override
1177      public Base setProperty(String name, Base value) throws FHIRException {
1178        if (name.equals("index")) {
1179          this.index = castToInteger(value); // IntegerType
1180        } else if (name.equals("profile")) {
1181          this.profile = castToCoding(value); // Coding
1182        } else
1183          return super.setProperty(name, value);
1184        return value;
1185      }
1186
1187      @Override
1188      public Base makeProperty(int hash, String name) throws FHIRException {
1189        switch (hash) {
1190        case 100346066:  return getIndexElement();
1191        case -309425751:  return getProfile(); 
1192        default: return super.makeProperty(hash, name);
1193        }
1194
1195      }
1196
1197      @Override
1198      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1199        switch (hash) {
1200        case 100346066: /*index*/ return new String[] {"integer"};
1201        case -309425751: /*profile*/ return new String[] {"Coding"};
1202        default: return super.getTypesForProperty(hash, name);
1203        }
1204
1205      }
1206
1207      @Override
1208      public Base addChild(String name) throws FHIRException {
1209        if (name.equals("index")) {
1210          throw new FHIRException("Cannot call addChild on a primitive type TestScript.index");
1211        }
1212        else if (name.equals("profile")) {
1213          this.profile = new Coding();
1214          return this.profile;
1215        }
1216        else
1217          return super.addChild(name);
1218      }
1219
1220      public TestScriptDestinationComponent copy() {
1221        TestScriptDestinationComponent dst = new TestScriptDestinationComponent();
1222        copyValues(dst);
1223        dst.index = index == null ? null : index.copy();
1224        dst.profile = profile == null ? null : profile.copy();
1225        return dst;
1226      }
1227
1228      @Override
1229      public boolean equalsDeep(Base other_) {
1230        if (!super.equalsDeep(other_))
1231          return false;
1232        if (!(other_ instanceof TestScriptDestinationComponent))
1233          return false;
1234        TestScriptDestinationComponent o = (TestScriptDestinationComponent) other_;
1235        return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true);
1236      }
1237
1238      @Override
1239      public boolean equalsShallow(Base other_) {
1240        if (!super.equalsShallow(other_))
1241          return false;
1242        if (!(other_ instanceof TestScriptDestinationComponent))
1243          return false;
1244        TestScriptDestinationComponent o = (TestScriptDestinationComponent) other_;
1245        return compareValues(index, o.index, true);
1246      }
1247
1248      public boolean isEmpty() {
1249        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(index, profile);
1250      }
1251
1252  public String fhirType() {
1253    return "TestScript.destination";
1254
1255  }
1256
1257  }
1258
1259    @Block()
1260    public static class TestScriptMetadataComponent extends BackboneElement implements IBaseBackboneElement {
1261        /**
1262         * A link to the FHIR specification that this test is covering.
1263         */
1264        @Child(name = "link", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1265        @Description(shortDefinition="Links to the FHIR specification", formalDefinition="A link to the FHIR specification that this test is covering." )
1266        protected List<TestScriptMetadataLinkComponent> link;
1267
1268        /**
1269         * Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.
1270         */
1271        @Child(name = "capability", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1272        @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." )
1273        protected List<TestScriptMetadataCapabilityComponent> capability;
1274
1275        private static final long serialVersionUID = 745183328L;
1276
1277    /**
1278     * Constructor
1279     */
1280      public TestScriptMetadataComponent() {
1281        super();
1282      }
1283
1284        /**
1285         * @return {@link #link} (A link to the FHIR specification that this test is covering.)
1286         */
1287        public List<TestScriptMetadataLinkComponent> getLink() { 
1288          if (this.link == null)
1289            this.link = new ArrayList<TestScriptMetadataLinkComponent>();
1290          return this.link;
1291        }
1292
1293        /**
1294         * @return Returns a reference to <code>this</code> for easy method chaining
1295         */
1296        public TestScriptMetadataComponent setLink(List<TestScriptMetadataLinkComponent> theLink) { 
1297          this.link = theLink;
1298          return this;
1299        }
1300
1301        public boolean hasLink() { 
1302          if (this.link == null)
1303            return false;
1304          for (TestScriptMetadataLinkComponent item : this.link)
1305            if (!item.isEmpty())
1306              return true;
1307          return false;
1308        }
1309
1310        public TestScriptMetadataLinkComponent addLink() { //3
1311          TestScriptMetadataLinkComponent t = new TestScriptMetadataLinkComponent();
1312          if (this.link == null)
1313            this.link = new ArrayList<TestScriptMetadataLinkComponent>();
1314          this.link.add(t);
1315          return t;
1316        }
1317
1318        public TestScriptMetadataComponent addLink(TestScriptMetadataLinkComponent t) { //3
1319          if (t == null)
1320            return this;
1321          if (this.link == null)
1322            this.link = new ArrayList<TestScriptMetadataLinkComponent>();
1323          this.link.add(t);
1324          return this;
1325        }
1326
1327        /**
1328         * @return The first repetition of repeating field {@link #link}, creating it if it does not already exist
1329         */
1330        public TestScriptMetadataLinkComponent getLinkFirstRep() { 
1331          if (getLink().isEmpty()) {
1332            addLink();
1333          }
1334          return getLink().get(0);
1335        }
1336
1337        /**
1338         * @return {@link #capability} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.)
1339         */
1340        public List<TestScriptMetadataCapabilityComponent> getCapability() { 
1341          if (this.capability == null)
1342            this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1343          return this.capability;
1344        }
1345
1346        /**
1347         * @return Returns a reference to <code>this</code> for easy method chaining
1348         */
1349        public TestScriptMetadataComponent setCapability(List<TestScriptMetadataCapabilityComponent> theCapability) { 
1350          this.capability = theCapability;
1351          return this;
1352        }
1353
1354        public boolean hasCapability() { 
1355          if (this.capability == null)
1356            return false;
1357          for (TestScriptMetadataCapabilityComponent item : this.capability)
1358            if (!item.isEmpty())
1359              return true;
1360          return false;
1361        }
1362
1363        public TestScriptMetadataCapabilityComponent addCapability() { //3
1364          TestScriptMetadataCapabilityComponent t = new TestScriptMetadataCapabilityComponent();
1365          if (this.capability == null)
1366            this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1367          this.capability.add(t);
1368          return t;
1369        }
1370
1371        public TestScriptMetadataComponent addCapability(TestScriptMetadataCapabilityComponent t) { //3
1372          if (t == null)
1373            return this;
1374          if (this.capability == null)
1375            this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1376          this.capability.add(t);
1377          return this;
1378        }
1379
1380        /**
1381         * @return The first repetition of repeating field {@link #capability}, creating it if it does not already exist
1382         */
1383        public TestScriptMetadataCapabilityComponent getCapabilityFirstRep() { 
1384          if (getCapability().isEmpty()) {
1385            addCapability();
1386          }
1387          return getCapability().get(0);
1388        }
1389
1390        protected void listChildren(List<Property> children) {
1391          super.listChildren(children);
1392          children.add(new Property("link", "", "A link to the FHIR specification that this test is covering.", 0, java.lang.Integer.MAX_VALUE, link));
1393          children.add(new Property("capability", "", "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.", 0, java.lang.Integer.MAX_VALUE, capability));
1394        }
1395
1396        @Override
1397        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1398          switch (_hash) {
1399          case 3321850: /*link*/  return new Property("link", "", "A link to the FHIR specification that this test is covering.", 0, java.lang.Integer.MAX_VALUE, link);
1400          case -783669992: /*capability*/  return new Property("capability", "", "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.", 0, java.lang.Integer.MAX_VALUE, capability);
1401          default: return super.getNamedProperty(_hash, _name, _checkValid);
1402          }
1403
1404        }
1405
1406      @Override
1407      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1408        switch (hash) {
1409        case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // TestScriptMetadataLinkComponent
1410        case -783669992: /*capability*/ return this.capability == null ? new Base[0] : this.capability.toArray(new Base[this.capability.size()]); // TestScriptMetadataCapabilityComponent
1411        default: return super.getProperty(hash, name, checkValid);
1412        }
1413
1414      }
1415
1416      @Override
1417      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1418        switch (hash) {
1419        case 3321850: // link
1420          this.getLink().add((TestScriptMetadataLinkComponent) value); // TestScriptMetadataLinkComponent
1421          return value;
1422        case -783669992: // capability
1423          this.getCapability().add((TestScriptMetadataCapabilityComponent) value); // TestScriptMetadataCapabilityComponent
1424          return value;
1425        default: return super.setProperty(hash, name, value);
1426        }
1427
1428      }
1429
1430      @Override
1431      public Base setProperty(String name, Base value) throws FHIRException {
1432        if (name.equals("link")) {
1433          this.getLink().add((TestScriptMetadataLinkComponent) value);
1434        } else if (name.equals("capability")) {
1435          this.getCapability().add((TestScriptMetadataCapabilityComponent) value);
1436        } else
1437          return super.setProperty(name, value);
1438        return value;
1439      }
1440
1441      @Override
1442      public Base makeProperty(int hash, String name) throws FHIRException {
1443        switch (hash) {
1444        case 3321850:  return addLink(); 
1445        case -783669992:  return addCapability(); 
1446        default: return super.makeProperty(hash, name);
1447        }
1448
1449      }
1450
1451      @Override
1452      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1453        switch (hash) {
1454        case 3321850: /*link*/ return new String[] {};
1455        case -783669992: /*capability*/ return new String[] {};
1456        default: return super.getTypesForProperty(hash, name);
1457        }
1458
1459      }
1460
1461      @Override
1462      public Base addChild(String name) throws FHIRException {
1463        if (name.equals("link")) {
1464          return addLink();
1465        }
1466        else if (name.equals("capability")) {
1467          return addCapability();
1468        }
1469        else
1470          return super.addChild(name);
1471      }
1472
1473      public TestScriptMetadataComponent copy() {
1474        TestScriptMetadataComponent dst = new TestScriptMetadataComponent();
1475        copyValues(dst);
1476        if (link != null) {
1477          dst.link = new ArrayList<TestScriptMetadataLinkComponent>();
1478          for (TestScriptMetadataLinkComponent i : link)
1479            dst.link.add(i.copy());
1480        };
1481        if (capability != null) {
1482          dst.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1483          for (TestScriptMetadataCapabilityComponent i : capability)
1484            dst.capability.add(i.copy());
1485        };
1486        return dst;
1487      }
1488
1489      @Override
1490      public boolean equalsDeep(Base other_) {
1491        if (!super.equalsDeep(other_))
1492          return false;
1493        if (!(other_ instanceof TestScriptMetadataComponent))
1494          return false;
1495        TestScriptMetadataComponent o = (TestScriptMetadataComponent) other_;
1496        return compareDeep(link, o.link, true) && compareDeep(capability, o.capability, true);
1497      }
1498
1499      @Override
1500      public boolean equalsShallow(Base other_) {
1501        if (!super.equalsShallow(other_))
1502          return false;
1503        if (!(other_ instanceof TestScriptMetadataComponent))
1504          return false;
1505        TestScriptMetadataComponent o = (TestScriptMetadataComponent) other_;
1506        return true;
1507      }
1508
1509      public boolean isEmpty() {
1510        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(link, capability);
1511      }
1512
1513  public String fhirType() {
1514    return "TestScript.metadata";
1515
1516  }
1517
1518  }
1519
1520    @Block()
1521    public static class TestScriptMetadataLinkComponent extends BackboneElement implements IBaseBackboneElement {
1522        /**
1523         * URL to a particular requirement or feature within the FHIR specification.
1524         */
1525        @Child(name = "url", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1526        @Description(shortDefinition="URL to the specification", formalDefinition="URL to a particular requirement or feature within the FHIR specification." )
1527        protected UriType url;
1528
1529        /**
1530         * Short description of the link.
1531         */
1532        @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
1533        @Description(shortDefinition="Short description", formalDefinition="Short description of the link." )
1534        protected StringType description;
1535
1536        private static final long serialVersionUID = 213372298L;
1537
1538    /**
1539     * Constructor
1540     */
1541      public TestScriptMetadataLinkComponent() {
1542        super();
1543      }
1544
1545    /**
1546     * Constructor
1547     */
1548      public TestScriptMetadataLinkComponent(UriType url) {
1549        super();
1550        this.url = url;
1551      }
1552
1553        /**
1554         * @return {@link #url} (URL to a particular requirement or feature within the FHIR specification.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1555         */
1556        public UriType getUrlElement() { 
1557          if (this.url == null)
1558            if (Configuration.errorOnAutoCreate())
1559              throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.url");
1560            else if (Configuration.doAutoCreate())
1561              this.url = new UriType(); // bb
1562          return this.url;
1563        }
1564
1565        public boolean hasUrlElement() { 
1566          return this.url != null && !this.url.isEmpty();
1567        }
1568
1569        public boolean hasUrl() { 
1570          return this.url != null && !this.url.isEmpty();
1571        }
1572
1573        /**
1574         * @param value {@link #url} (URL to a particular requirement or feature within the FHIR specification.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1575         */
1576        public TestScriptMetadataLinkComponent setUrlElement(UriType value) { 
1577          this.url = value;
1578          return this;
1579        }
1580
1581        /**
1582         * @return URL to a particular requirement or feature within the FHIR specification.
1583         */
1584        public String getUrl() { 
1585          return this.url == null ? null : this.url.getValue();
1586        }
1587
1588        /**
1589         * @param value URL to a particular requirement or feature within the FHIR specification.
1590         */
1591        public TestScriptMetadataLinkComponent setUrl(String value) { 
1592            if (this.url == null)
1593              this.url = new UriType();
1594            this.url.setValue(value);
1595          return this;
1596        }
1597
1598        /**
1599         * @return {@link #description} (Short description of the link.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1600         */
1601        public StringType getDescriptionElement() { 
1602          if (this.description == null)
1603            if (Configuration.errorOnAutoCreate())
1604              throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.description");
1605            else if (Configuration.doAutoCreate())
1606              this.description = new StringType(); // bb
1607          return this.description;
1608        }
1609
1610        public boolean hasDescriptionElement() { 
1611          return this.description != null && !this.description.isEmpty();
1612        }
1613
1614        public boolean hasDescription() { 
1615          return this.description != null && !this.description.isEmpty();
1616        }
1617
1618        /**
1619         * @param value {@link #description} (Short description of the link.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1620         */
1621        public TestScriptMetadataLinkComponent setDescriptionElement(StringType value) { 
1622          this.description = value;
1623          return this;
1624        }
1625
1626        /**
1627         * @return Short description of the link.
1628         */
1629        public String getDescription() { 
1630          return this.description == null ? null : this.description.getValue();
1631        }
1632
1633        /**
1634         * @param value Short description of the link.
1635         */
1636        public TestScriptMetadataLinkComponent setDescription(String value) { 
1637          if (Utilities.noString(value))
1638            this.description = null;
1639          else {
1640            if (this.description == null)
1641              this.description = new StringType();
1642            this.description.setValue(value);
1643          }
1644          return this;
1645        }
1646
1647        protected void listChildren(List<Property> children) {
1648          super.listChildren(children);
1649          children.add(new Property("url", "uri", "URL to a particular requirement or feature within the FHIR specification.", 0, 1, url));
1650          children.add(new Property("description", "string", "Short description of the link.", 0, 1, description));
1651        }
1652
1653        @Override
1654        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1655          switch (_hash) {
1656          case 116079: /*url*/  return new Property("url", "uri", "URL to a particular requirement or feature within the FHIR specification.", 0, 1, url);
1657          case -1724546052: /*description*/  return new Property("description", "string", "Short description of the link.", 0, 1, description);
1658          default: return super.getNamedProperty(_hash, _name, _checkValid);
1659          }
1660
1661        }
1662
1663      @Override
1664      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1665        switch (hash) {
1666        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
1667        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1668        default: return super.getProperty(hash, name, checkValid);
1669        }
1670
1671      }
1672
1673      @Override
1674      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1675        switch (hash) {
1676        case 116079: // url
1677          this.url = castToUri(value); // UriType
1678          return value;
1679        case -1724546052: // description
1680          this.description = castToString(value); // StringType
1681          return value;
1682        default: return super.setProperty(hash, name, value);
1683        }
1684
1685      }
1686
1687      @Override
1688      public Base setProperty(String name, Base value) throws FHIRException {
1689        if (name.equals("url")) {
1690          this.url = castToUri(value); // UriType
1691        } else if (name.equals("description")) {
1692          this.description = castToString(value); // StringType
1693        } else
1694          return super.setProperty(name, value);
1695        return value;
1696      }
1697
1698      @Override
1699      public Base makeProperty(int hash, String name) throws FHIRException {
1700        switch (hash) {
1701        case 116079:  return getUrlElement();
1702        case -1724546052:  return getDescriptionElement();
1703        default: return super.makeProperty(hash, name);
1704        }
1705
1706      }
1707
1708      @Override
1709      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1710        switch (hash) {
1711        case 116079: /*url*/ return new String[] {"uri"};
1712        case -1724546052: /*description*/ return new String[] {"string"};
1713        default: return super.getTypesForProperty(hash, name);
1714        }
1715
1716      }
1717
1718      @Override
1719      public Base addChild(String name) throws FHIRException {
1720        if (name.equals("url")) {
1721          throw new FHIRException("Cannot call addChild on a primitive type TestScript.url");
1722        }
1723        else if (name.equals("description")) {
1724          throw new FHIRException("Cannot call addChild on a primitive type TestScript.description");
1725        }
1726        else
1727          return super.addChild(name);
1728      }
1729
1730      public TestScriptMetadataLinkComponent copy() {
1731        TestScriptMetadataLinkComponent dst = new TestScriptMetadataLinkComponent();
1732        copyValues(dst);
1733        dst.url = url == null ? null : url.copy();
1734        dst.description = description == null ? null : description.copy();
1735        return dst;
1736      }
1737
1738      @Override
1739      public boolean equalsDeep(Base other_) {
1740        if (!super.equalsDeep(other_))
1741          return false;
1742        if (!(other_ instanceof TestScriptMetadataLinkComponent))
1743          return false;
1744        TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other_;
1745        return compareDeep(url, o.url, true) && compareDeep(description, o.description, true);
1746      }
1747
1748      @Override
1749      public boolean equalsShallow(Base other_) {
1750        if (!super.equalsShallow(other_))
1751          return false;
1752        if (!(other_ instanceof TestScriptMetadataLinkComponent))
1753          return false;
1754        TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other_;
1755        return compareValues(url, o.url, true) && compareValues(description, o.description, true);
1756      }
1757
1758      public boolean isEmpty() {
1759        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, description);
1760      }
1761
1762  public String fhirType() {
1763    return "TestScript.metadata.link";
1764
1765  }
1766
1767  }
1768
1769    @Block()
1770    public static class TestScriptMetadataCapabilityComponent extends BackboneElement implements IBaseBackboneElement {
1771        /**
1772         * Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.
1773         */
1774        @Child(name = "required", type = {BooleanType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1775        @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." )
1776        protected BooleanType required;
1777
1778        /**
1779         * Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.
1780         */
1781        @Child(name = "validated", type = {BooleanType.class}, order=2, min=1, max=1, modifier=false, summary=false)
1782        @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." )
1783        protected BooleanType validated;
1784
1785        /**
1786         * Description of the capabilities that this test script is requiring the server to support.
1787         */
1788        @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
1789        @Description(shortDefinition="The expected capabilities of the server", formalDefinition="Description of the capabilities that this test script is requiring the server to support." )
1790        protected StringType description;
1791
1792        /**
1793         * Which origin server these requirements apply to.
1794         */
1795        @Child(name = "origin", type = {IntegerType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1796        @Description(shortDefinition="Which origin server these requirements apply to", formalDefinition="Which origin server these requirements apply to." )
1797        protected List<IntegerType> origin;
1798
1799        /**
1800         * Which server these requirements apply to.
1801         */
1802        @Child(name = "destination", type = {IntegerType.class}, order=5, min=0, max=1, modifier=false, summary=false)
1803        @Description(shortDefinition="Which server these requirements apply to", formalDefinition="Which server these requirements apply to." )
1804        protected IntegerType destination;
1805
1806        /**
1807         * Links to the FHIR specification that describes this interaction and the resources involved in more detail.
1808         */
1809        @Child(name = "link", type = {UriType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1810        @Description(shortDefinition="Links to the FHIR specification", formalDefinition="Links to the FHIR specification that describes this interaction and the resources involved in more detail." )
1811        protected List<UriType> link;
1812
1813        /**
1814         * 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.
1815         */
1816        @Child(name = "capabilities", type = {CanonicalType.class}, order=7, min=1, max=1, modifier=false, summary=false)
1817        @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." )
1818        protected CanonicalType capabilities;
1819
1820        private static final long serialVersionUID = -1368199288L;
1821
1822    /**
1823     * Constructor
1824     */
1825      public TestScriptMetadataCapabilityComponent() {
1826        super();
1827      }
1828
1829    /**
1830     * Constructor
1831     */
1832      public TestScriptMetadataCapabilityComponent(BooleanType required, BooleanType validated, CanonicalType capabilities) {
1833        super();
1834        this.required = required;
1835        this.validated = validated;
1836        this.capabilities = capabilities;
1837      }
1838
1839        /**
1840         * @return {@link #required} (Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value
1841         */
1842        public BooleanType getRequiredElement() { 
1843          if (this.required == null)
1844            if (Configuration.errorOnAutoCreate())
1845              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.required");
1846            else if (Configuration.doAutoCreate())
1847              this.required = new BooleanType(); // bb
1848          return this.required;
1849        }
1850
1851        public boolean hasRequiredElement() { 
1852          return this.required != null && !this.required.isEmpty();
1853        }
1854
1855        public boolean hasRequired() { 
1856          return this.required != null && !this.required.isEmpty();
1857        }
1858
1859        /**
1860         * @param value {@link #required} (Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value
1861         */
1862        public TestScriptMetadataCapabilityComponent setRequiredElement(BooleanType value) { 
1863          this.required = value;
1864          return this;
1865        }
1866
1867        /**
1868         * @return Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.
1869         */
1870        public boolean getRequired() { 
1871          return this.required == null || this.required.isEmpty() ? false : this.required.getValue();
1872        }
1873
1874        /**
1875         * @param value Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.
1876         */
1877        public TestScriptMetadataCapabilityComponent setRequired(boolean value) { 
1878            if (this.required == null)
1879              this.required = new BooleanType();
1880            this.required.setValue(value);
1881          return this;
1882        }
1883
1884        /**
1885         * @return {@link #validated} (Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.). This is the underlying object with id, value and extensions. The accessor "getValidated" gives direct access to the value
1886         */
1887        public BooleanType getValidatedElement() { 
1888          if (this.validated == null)
1889            if (Configuration.errorOnAutoCreate())
1890              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.validated");
1891            else if (Configuration.doAutoCreate())
1892              this.validated = new BooleanType(); // bb
1893          return this.validated;
1894        }
1895
1896        public boolean hasValidatedElement() { 
1897          return this.validated != null && !this.validated.isEmpty();
1898        }
1899
1900        public boolean hasValidated() { 
1901          return this.validated != null && !this.validated.isEmpty();
1902        }
1903
1904        /**
1905         * @param value {@link #validated} (Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.). This is the underlying object with id, value and extensions. The accessor "getValidated" gives direct access to the value
1906         */
1907        public TestScriptMetadataCapabilityComponent setValidatedElement(BooleanType value) { 
1908          this.validated = value;
1909          return this;
1910        }
1911
1912        /**
1913         * @return Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.
1914         */
1915        public boolean getValidated() { 
1916          return this.validated == null || this.validated.isEmpty() ? false : this.validated.getValue();
1917        }
1918
1919        /**
1920         * @param value Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.
1921         */
1922        public TestScriptMetadataCapabilityComponent setValidated(boolean value) { 
1923            if (this.validated == null)
1924              this.validated = new BooleanType();
1925            this.validated.setValue(value);
1926          return this;
1927        }
1928
1929        /**
1930         * @return {@link #description} (Description of the capabilities that this test script is requiring the server to support.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1931         */
1932        public StringType getDescriptionElement() { 
1933          if (this.description == null)
1934            if (Configuration.errorOnAutoCreate())
1935              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.description");
1936            else if (Configuration.doAutoCreate())
1937              this.description = new StringType(); // bb
1938          return this.description;
1939        }
1940
1941        public boolean hasDescriptionElement() { 
1942          return this.description != null && !this.description.isEmpty();
1943        }
1944
1945        public boolean hasDescription() { 
1946          return this.description != null && !this.description.isEmpty();
1947        }
1948
1949        /**
1950         * @param value {@link #description} (Description of the capabilities that this test script is requiring the server to support.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1951         */
1952        public TestScriptMetadataCapabilityComponent setDescriptionElement(StringType value) { 
1953          this.description = value;
1954          return this;
1955        }
1956
1957        /**
1958         * @return Description of the capabilities that this test script is requiring the server to support.
1959         */
1960        public String getDescription() { 
1961          return this.description == null ? null : this.description.getValue();
1962        }
1963
1964        /**
1965         * @param value Description of the capabilities that this test script is requiring the server to support.
1966         */
1967        public TestScriptMetadataCapabilityComponent setDescription(String value) { 
1968          if (Utilities.noString(value))
1969            this.description = null;
1970          else {
1971            if (this.description == null)
1972              this.description = new StringType();
1973            this.description.setValue(value);
1974          }
1975          return this;
1976        }
1977
1978        /**
1979         * @return {@link #origin} (Which origin server these requirements apply to.)
1980         */
1981        public List<IntegerType> getOrigin() { 
1982          if (this.origin == null)
1983            this.origin = new ArrayList<IntegerType>();
1984          return this.origin;
1985        }
1986
1987        /**
1988         * @return Returns a reference to <code>this</code> for easy method chaining
1989         */
1990        public TestScriptMetadataCapabilityComponent setOrigin(List<IntegerType> theOrigin) { 
1991          this.origin = theOrigin;
1992          return this;
1993        }
1994
1995        public boolean hasOrigin() { 
1996          if (this.origin == null)
1997            return false;
1998          for (IntegerType item : this.origin)
1999            if (!item.isEmpty())
2000              return true;
2001          return false;
2002        }
2003
2004        /**
2005         * @return {@link #origin} (Which origin server these requirements apply to.)
2006         */
2007        public IntegerType addOriginElement() {//2 
2008          IntegerType t = new IntegerType();
2009          if (this.origin == null)
2010            this.origin = new ArrayList<IntegerType>();
2011          this.origin.add(t);
2012          return t;
2013        }
2014
2015        /**
2016         * @param value {@link #origin} (Which origin server these requirements apply to.)
2017         */
2018        public TestScriptMetadataCapabilityComponent addOrigin(int value) { //1
2019          IntegerType t = new IntegerType();
2020          t.setValue(value);
2021          if (this.origin == null)
2022            this.origin = new ArrayList<IntegerType>();
2023          this.origin.add(t);
2024          return this;
2025        }
2026
2027        /**
2028         * @param value {@link #origin} (Which origin server these requirements apply to.)
2029         */
2030        public boolean hasOrigin(int value) { 
2031          if (this.origin == null)
2032            return false;
2033          for (IntegerType v : this.origin)
2034            if (v.getValue().equals(value)) // integer
2035              return true;
2036          return false;
2037        }
2038
2039        /**
2040         * @return {@link #destination} (Which server these requirements apply to.). This is the underlying object with id, value and extensions. The accessor "getDestination" gives direct access to the value
2041         */
2042        public IntegerType getDestinationElement() { 
2043          if (this.destination == null)
2044            if (Configuration.errorOnAutoCreate())
2045              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.destination");
2046            else if (Configuration.doAutoCreate())
2047              this.destination = new IntegerType(); // bb
2048          return this.destination;
2049        }
2050
2051        public boolean hasDestinationElement() { 
2052          return this.destination != null && !this.destination.isEmpty();
2053        }
2054
2055        public boolean hasDestination() { 
2056          return this.destination != null && !this.destination.isEmpty();
2057        }
2058
2059        /**
2060         * @param value {@link #destination} (Which server these requirements apply to.). This is the underlying object with id, value and extensions. The accessor "getDestination" gives direct access to the value
2061         */
2062        public TestScriptMetadataCapabilityComponent setDestinationElement(IntegerType value) { 
2063          this.destination = value;
2064          return this;
2065        }
2066
2067        /**
2068         * @return Which server these requirements apply to.
2069         */
2070        public int getDestination() { 
2071          return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue();
2072        }
2073
2074        /**
2075         * @param value Which server these requirements apply to.
2076         */
2077        public TestScriptMetadataCapabilityComponent setDestination(int value) { 
2078            if (this.destination == null)
2079              this.destination = new IntegerType();
2080            this.destination.setValue(value);
2081          return this;
2082        }
2083
2084        /**
2085         * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.)
2086         */
2087        public List<UriType> getLink() { 
2088          if (this.link == null)
2089            this.link = new ArrayList<UriType>();
2090          return this.link;
2091        }
2092
2093        /**
2094         * @return Returns a reference to <code>this</code> for easy method chaining
2095         */
2096        public TestScriptMetadataCapabilityComponent setLink(List<UriType> theLink) { 
2097          this.link = theLink;
2098          return this;
2099        }
2100
2101        public boolean hasLink() { 
2102          if (this.link == null)
2103            return false;
2104          for (UriType item : this.link)
2105            if (!item.isEmpty())
2106              return true;
2107          return false;
2108        }
2109
2110        /**
2111         * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.)
2112         */
2113        public UriType addLinkElement() {//2 
2114          UriType t = new UriType();
2115          if (this.link == null)
2116            this.link = new ArrayList<UriType>();
2117          this.link.add(t);
2118          return t;
2119        }
2120
2121        /**
2122         * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.)
2123         */
2124        public TestScriptMetadataCapabilityComponent addLink(String value) { //1
2125          UriType t = new UriType();
2126          t.setValue(value);
2127          if (this.link == null)
2128            this.link = new ArrayList<UriType>();
2129          this.link.add(t);
2130          return this;
2131        }
2132
2133        /**
2134         * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.)
2135         */
2136        public boolean hasLink(String value) { 
2137          if (this.link == null)
2138            return false;
2139          for (UriType v : this.link)
2140            if (v.getValue().equals(value)) // uri
2141              return true;
2142          return false;
2143        }
2144
2145        /**
2146         * @return {@link #capabilities} (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.). This is the underlying object with id, value and extensions. The accessor "getCapabilities" gives direct access to the value
2147         */
2148        public CanonicalType getCapabilitiesElement() { 
2149          if (this.capabilities == null)
2150            if (Configuration.errorOnAutoCreate())
2151              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.capabilities");
2152            else if (Configuration.doAutoCreate())
2153              this.capabilities = new CanonicalType(); // bb
2154          return this.capabilities;
2155        }
2156
2157        public boolean hasCapabilitiesElement() { 
2158          return this.capabilities != null && !this.capabilities.isEmpty();
2159        }
2160
2161        public boolean hasCapabilities() { 
2162          return this.capabilities != null && !this.capabilities.isEmpty();
2163        }
2164
2165        /**
2166         * @param value {@link #capabilities} (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.). This is the underlying object with id, value and extensions. The accessor "getCapabilities" gives direct access to the value
2167         */
2168        public TestScriptMetadataCapabilityComponent setCapabilitiesElement(CanonicalType value) { 
2169          this.capabilities = value;
2170          return this;
2171        }
2172
2173        /**
2174         * @return 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.
2175         */
2176        public String getCapabilities() { 
2177          return this.capabilities == null ? null : this.capabilities.getValue();
2178        }
2179
2180        /**
2181         * @param value 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.
2182         */
2183        public TestScriptMetadataCapabilityComponent setCapabilities(String value) { 
2184            if (this.capabilities == null)
2185              this.capabilities = new CanonicalType();
2186            this.capabilities.setValue(value);
2187          return this;
2188        }
2189
2190        protected void listChildren(List<Property> children) {
2191          super.listChildren(children);
2192          children.add(new Property("required", "boolean", "Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.", 0, 1, required));
2193          children.add(new Property("validated", "boolean", "Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.", 0, 1, validated));
2194          children.add(new Property("description", "string", "Description of the capabilities that this test script is requiring the server to support.", 0, 1, description));
2195          children.add(new Property("origin", "integer", "Which origin server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, origin));
2196          children.add(new Property("destination", "integer", "Which server these requirements apply to.", 0, 1, destination));
2197          children.add(new Property("link", "uri", "Links to the FHIR specification that describes this interaction and the resources involved in more detail.", 0, java.lang.Integer.MAX_VALUE, link));
2198          children.add(new Property("capabilities", "canonical(CapabilityStatement)", "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.", 0, 1, capabilities));
2199        }
2200
2201        @Override
2202        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2203          switch (_hash) {
2204          case -393139297: /*required*/  return new Property("required", "boolean", "Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.", 0, 1, required);
2205          case -1109784050: /*validated*/  return new Property("validated", "boolean", "Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.", 0, 1, validated);
2206          case -1724546052: /*description*/  return new Property("description", "string", "Description of the capabilities that this test script is requiring the server to support.", 0, 1, description);
2207          case -1008619738: /*origin*/  return new Property("origin", "integer", "Which origin server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, origin);
2208          case -1429847026: /*destination*/  return new Property("destination", "integer", "Which server these requirements apply to.", 0, 1, destination);
2209          case 3321850: /*link*/  return new Property("link", "uri", "Links to the FHIR specification that describes this interaction and the resources involved in more detail.", 0, java.lang.Integer.MAX_VALUE, link);
2210          case -1487597642: /*capabilities*/  return new Property("capabilities", "canonical(CapabilityStatement)", "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.", 0, 1, capabilities);
2211          default: return super.getNamedProperty(_hash, _name, _checkValid);
2212          }
2213
2214        }
2215
2216      @Override
2217      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2218        switch (hash) {
2219        case -393139297: /*required*/ return this.required == null ? new Base[0] : new Base[] {this.required}; // BooleanType
2220        case -1109784050: /*validated*/ return this.validated == null ? new Base[0] : new Base[] {this.validated}; // BooleanType
2221        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
2222        case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // IntegerType
2223        case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // IntegerType
2224        case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // UriType
2225        case -1487597642: /*capabilities*/ return this.capabilities == null ? new Base[0] : new Base[] {this.capabilities}; // CanonicalType
2226        default: return super.getProperty(hash, name, checkValid);
2227        }
2228
2229      }
2230
2231      @Override
2232      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2233        switch (hash) {
2234        case -393139297: // required
2235          this.required = castToBoolean(value); // BooleanType
2236          return value;
2237        case -1109784050: // validated
2238          this.validated = castToBoolean(value); // BooleanType
2239          return value;
2240        case -1724546052: // description
2241          this.description = castToString(value); // StringType
2242          return value;
2243        case -1008619738: // origin
2244          this.getOrigin().add(castToInteger(value)); // IntegerType
2245          return value;
2246        case -1429847026: // destination
2247          this.destination = castToInteger(value); // IntegerType
2248          return value;
2249        case 3321850: // link
2250          this.getLink().add(castToUri(value)); // UriType
2251          return value;
2252        case -1487597642: // capabilities
2253          this.capabilities = castToCanonical(value); // CanonicalType
2254          return value;
2255        default: return super.setProperty(hash, name, value);
2256        }
2257
2258      }
2259
2260      @Override
2261      public Base setProperty(String name, Base value) throws FHIRException {
2262        if (name.equals("required")) {
2263          this.required = castToBoolean(value); // BooleanType
2264        } else if (name.equals("validated")) {
2265          this.validated = castToBoolean(value); // BooleanType
2266        } else if (name.equals("description")) {
2267          this.description = castToString(value); // StringType
2268        } else if (name.equals("origin")) {
2269          this.getOrigin().add(castToInteger(value));
2270        } else if (name.equals("destination")) {
2271          this.destination = castToInteger(value); // IntegerType
2272        } else if (name.equals("link")) {
2273          this.getLink().add(castToUri(value));
2274        } else if (name.equals("capabilities")) {
2275          this.capabilities = castToCanonical(value); // CanonicalType
2276        } else
2277          return super.setProperty(name, value);
2278        return value;
2279      }
2280
2281      @Override
2282      public Base makeProperty(int hash, String name) throws FHIRException {
2283        switch (hash) {
2284        case -393139297:  return getRequiredElement();
2285        case -1109784050:  return getValidatedElement();
2286        case -1724546052:  return getDescriptionElement();
2287        case -1008619738:  return addOriginElement();
2288        case -1429847026:  return getDestinationElement();
2289        case 3321850:  return addLinkElement();
2290        case -1487597642:  return getCapabilitiesElement();
2291        default: return super.makeProperty(hash, name);
2292        }
2293
2294      }
2295
2296      @Override
2297      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2298        switch (hash) {
2299        case -393139297: /*required*/ return new String[] {"boolean"};
2300        case -1109784050: /*validated*/ return new String[] {"boolean"};
2301        case -1724546052: /*description*/ return new String[] {"string"};
2302        case -1008619738: /*origin*/ return new String[] {"integer"};
2303        case -1429847026: /*destination*/ return new String[] {"integer"};
2304        case 3321850: /*link*/ return new String[] {"uri"};
2305        case -1487597642: /*capabilities*/ return new String[] {"canonical"};
2306        default: return super.getTypesForProperty(hash, name);
2307        }
2308
2309      }
2310
2311      @Override
2312      public Base addChild(String name) throws FHIRException {
2313        if (name.equals("required")) {
2314          throw new FHIRException("Cannot call addChild on a primitive type TestScript.required");
2315        }
2316        else if (name.equals("validated")) {
2317          throw new FHIRException("Cannot call addChild on a primitive type TestScript.validated");
2318        }
2319        else if (name.equals("description")) {
2320          throw new FHIRException("Cannot call addChild on a primitive type TestScript.description");
2321        }
2322        else if (name.equals("origin")) {
2323          throw new FHIRException("Cannot call addChild on a primitive type TestScript.origin");
2324        }
2325        else if (name.equals("destination")) {
2326          throw new FHIRException("Cannot call addChild on a primitive type TestScript.destination");
2327        }
2328        else if (name.equals("link")) {
2329          throw new FHIRException("Cannot call addChild on a primitive type TestScript.link");
2330        }
2331        else if (name.equals("capabilities")) {
2332          throw new FHIRException("Cannot call addChild on a primitive type TestScript.capabilities");
2333        }
2334        else
2335          return super.addChild(name);
2336      }
2337
2338      public TestScriptMetadataCapabilityComponent copy() {
2339        TestScriptMetadataCapabilityComponent dst = new TestScriptMetadataCapabilityComponent();
2340        copyValues(dst);
2341        dst.required = required == null ? null : required.copy();
2342        dst.validated = validated == null ? null : validated.copy();
2343        dst.description = description == null ? null : description.copy();
2344        if (origin != null) {
2345          dst.origin = new ArrayList<IntegerType>();
2346          for (IntegerType i : origin)
2347            dst.origin.add(i.copy());
2348        };
2349        dst.destination = destination == null ? null : destination.copy();
2350        if (link != null) {
2351          dst.link = new ArrayList<UriType>();
2352          for (UriType i : link)
2353            dst.link.add(i.copy());
2354        };
2355        dst.capabilities = capabilities == null ? null : capabilities.copy();
2356        return dst;
2357      }
2358
2359      @Override
2360      public boolean equalsDeep(Base other_) {
2361        if (!super.equalsDeep(other_))
2362          return false;
2363        if (!(other_ instanceof TestScriptMetadataCapabilityComponent))
2364          return false;
2365        TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other_;
2366        return compareDeep(required, o.required, true) && compareDeep(validated, o.validated, true) && compareDeep(description, o.description, true)
2367           && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) && compareDeep(link, o.link, true)
2368           && compareDeep(capabilities, o.capabilities, true);
2369      }
2370
2371      @Override
2372      public boolean equalsShallow(Base other_) {
2373        if (!super.equalsShallow(other_))
2374          return false;
2375        if (!(other_ instanceof TestScriptMetadataCapabilityComponent))
2376          return false;
2377        TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other_;
2378        return compareValues(required, o.required, true) && compareValues(validated, o.validated, true) && compareValues(description, o.description, true)
2379           && compareValues(origin, o.origin, true) && compareValues(destination, o.destination, true) && compareValues(link, o.link, true)
2380          ;
2381      }
2382
2383      public boolean isEmpty() {
2384        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(required, validated, description
2385          , origin, destination, link, capabilities);
2386      }
2387
2388  public String fhirType() {
2389    return "TestScript.metadata.capability";
2390
2391  }
2392
2393  }
2394
2395    @Block()
2396    public static class TestScriptFixtureComponent extends BackboneElement implements IBaseBackboneElement {
2397        /**
2398         * 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.
2399         */
2400        @Child(name = "autocreate", type = {BooleanType.class}, order=1, min=1, max=1, modifier=false, summary=false)
2401        @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." )
2402        protected BooleanType autocreate;
2403
2404        /**
2405         * 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.
2406         */
2407        @Child(name = "autodelete", type = {BooleanType.class}, order=2, min=1, max=1, modifier=false, summary=false)
2408        @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." )
2409        protected BooleanType autodelete;
2410
2411        /**
2412         * Reference to the resource (containing the contents of the resource needed for operations).
2413         */
2414        @Child(name = "resource", type = {Reference.class}, order=3, min=0, max=1, modifier=false, summary=false)
2415        @Description(shortDefinition="Reference of the resource", formalDefinition="Reference to the resource (containing the contents of the resource needed for operations)." )
2416        protected Reference resource;
2417
2418        /**
2419         * The actual object that is the target of the reference (Reference to the resource (containing the contents of the resource needed for operations).)
2420         */
2421        protected Resource resourceTarget;
2422
2423        private static final long serialVersionUID = 1110683307L;
2424
2425    /**
2426     * Constructor
2427     */
2428      public TestScriptFixtureComponent() {
2429        super();
2430      }
2431
2432    /**
2433     * Constructor
2434     */
2435      public TestScriptFixtureComponent(BooleanType autocreate, BooleanType autodelete) {
2436        super();
2437        this.autocreate = autocreate;
2438        this.autodelete = autodelete;
2439      }
2440
2441        /**
2442         * @return {@link #autocreate} (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.). This is the underlying object with id, value and extensions. The accessor "getAutocreate" gives direct access to the value
2443         */
2444        public BooleanType getAutocreateElement() { 
2445          if (this.autocreate == null)
2446            if (Configuration.errorOnAutoCreate())
2447              throw new Error("Attempt to auto-create TestScriptFixtureComponent.autocreate");
2448            else if (Configuration.doAutoCreate())
2449              this.autocreate = new BooleanType(); // bb
2450          return this.autocreate;
2451        }
2452
2453        public boolean hasAutocreateElement() { 
2454          return this.autocreate != null && !this.autocreate.isEmpty();
2455        }
2456
2457        public boolean hasAutocreate() { 
2458          return this.autocreate != null && !this.autocreate.isEmpty();
2459        }
2460
2461        /**
2462         * @param value {@link #autocreate} (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.). This is the underlying object with id, value and extensions. The accessor "getAutocreate" gives direct access to the value
2463         */
2464        public TestScriptFixtureComponent setAutocreateElement(BooleanType value) { 
2465          this.autocreate = value;
2466          return this;
2467        }
2468
2469        /**
2470         * @return 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.
2471         */
2472        public boolean getAutocreate() { 
2473          return this.autocreate == null || this.autocreate.isEmpty() ? false : this.autocreate.getValue();
2474        }
2475
2476        /**
2477         * @param value 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.
2478         */
2479        public TestScriptFixtureComponent setAutocreate(boolean value) { 
2480            if (this.autocreate == null)
2481              this.autocreate = new BooleanType();
2482            this.autocreate.setValue(value);
2483          return this;
2484        }
2485
2486        /**
2487         * @return {@link #autodelete} (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.). This is the underlying object with id, value and extensions. The accessor "getAutodelete" gives direct access to the value
2488         */
2489        public BooleanType getAutodeleteElement() { 
2490          if (this.autodelete == null)
2491            if (Configuration.errorOnAutoCreate())
2492              throw new Error("Attempt to auto-create TestScriptFixtureComponent.autodelete");
2493            else if (Configuration.doAutoCreate())
2494              this.autodelete = new BooleanType(); // bb
2495          return this.autodelete;
2496        }
2497
2498        public boolean hasAutodeleteElement() { 
2499          return this.autodelete != null && !this.autodelete.isEmpty();
2500        }
2501
2502        public boolean hasAutodelete() { 
2503          return this.autodelete != null && !this.autodelete.isEmpty();
2504        }
2505
2506        /**
2507         * @param value {@link #autodelete} (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.). This is the underlying object with id, value and extensions. The accessor "getAutodelete" gives direct access to the value
2508         */
2509        public TestScriptFixtureComponent setAutodeleteElement(BooleanType value) { 
2510          this.autodelete = value;
2511          return this;
2512        }
2513
2514        /**
2515         * @return 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.
2516         */
2517        public boolean getAutodelete() { 
2518          return this.autodelete == null || this.autodelete.isEmpty() ? false : this.autodelete.getValue();
2519        }
2520
2521        /**
2522         * @param value 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.
2523         */
2524        public TestScriptFixtureComponent setAutodelete(boolean value) { 
2525            if (this.autodelete == null)
2526              this.autodelete = new BooleanType();
2527            this.autodelete.setValue(value);
2528          return this;
2529        }
2530
2531        /**
2532         * @return {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).)
2533         */
2534        public Reference getResource() { 
2535          if (this.resource == null)
2536            if (Configuration.errorOnAutoCreate())
2537              throw new Error("Attempt to auto-create TestScriptFixtureComponent.resource");
2538            else if (Configuration.doAutoCreate())
2539              this.resource = new Reference(); // cc
2540          return this.resource;
2541        }
2542
2543        public boolean hasResource() { 
2544          return this.resource != null && !this.resource.isEmpty();
2545        }
2546
2547        /**
2548         * @param value {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).)
2549         */
2550        public TestScriptFixtureComponent setResource(Reference value) { 
2551          this.resource = value;
2552          return this;
2553        }
2554
2555        /**
2556         * @return {@link #resource} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the resource (containing the contents of the resource needed for operations).)
2557         */
2558        public Resource getResourceTarget() { 
2559          return this.resourceTarget;
2560        }
2561
2562        /**
2563         * @param value {@link #resource} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the resource (containing the contents of the resource needed for operations).)
2564         */
2565        public TestScriptFixtureComponent setResourceTarget(Resource value) { 
2566          this.resourceTarget = value;
2567          return this;
2568        }
2569
2570        protected void listChildren(List<Property> children) {
2571          super.listChildren(children);
2572          children.add(new Property("autocreate", "boolean", "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.", 0, 1, autocreate));
2573          children.add(new Property("autodelete", "boolean", "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.", 0, 1, autodelete));
2574          children.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the resource needed for operations).", 0, 1, resource));
2575        }
2576
2577        @Override
2578        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2579          switch (_hash) {
2580          case 73154411: /*autocreate*/  return new Property("autocreate", "boolean", "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.", 0, 1, autocreate);
2581          case 89990170: /*autodelete*/  return new Property("autodelete", "boolean", "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.", 0, 1, autodelete);
2582          case -341064690: /*resource*/  return new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the resource needed for operations).", 0, 1, resource);
2583          default: return super.getNamedProperty(_hash, _name, _checkValid);
2584          }
2585
2586        }
2587
2588      @Override
2589      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2590        switch (hash) {
2591        case 73154411: /*autocreate*/ return this.autocreate == null ? new Base[0] : new Base[] {this.autocreate}; // BooleanType
2592        case 89990170: /*autodelete*/ return this.autodelete == null ? new Base[0] : new Base[] {this.autodelete}; // BooleanType
2593        case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference
2594        default: return super.getProperty(hash, name, checkValid);
2595        }
2596
2597      }
2598
2599      @Override
2600      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2601        switch (hash) {
2602        case 73154411: // autocreate
2603          this.autocreate = castToBoolean(value); // BooleanType
2604          return value;
2605        case 89990170: // autodelete
2606          this.autodelete = castToBoolean(value); // BooleanType
2607          return value;
2608        case -341064690: // resource
2609          this.resource = castToReference(value); // Reference
2610          return value;
2611        default: return super.setProperty(hash, name, value);
2612        }
2613
2614      }
2615
2616      @Override
2617      public Base setProperty(String name, Base value) throws FHIRException {
2618        if (name.equals("autocreate")) {
2619          this.autocreate = castToBoolean(value); // BooleanType
2620        } else if (name.equals("autodelete")) {
2621          this.autodelete = castToBoolean(value); // BooleanType
2622        } else if (name.equals("resource")) {
2623          this.resource = castToReference(value); // Reference
2624        } else
2625          return super.setProperty(name, value);
2626        return value;
2627      }
2628
2629      @Override
2630      public Base makeProperty(int hash, String name) throws FHIRException {
2631        switch (hash) {
2632        case 73154411:  return getAutocreateElement();
2633        case 89990170:  return getAutodeleteElement();
2634        case -341064690:  return getResource(); 
2635        default: return super.makeProperty(hash, name);
2636        }
2637
2638      }
2639
2640      @Override
2641      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2642        switch (hash) {
2643        case 73154411: /*autocreate*/ return new String[] {"boolean"};
2644        case 89990170: /*autodelete*/ return new String[] {"boolean"};
2645        case -341064690: /*resource*/ return new String[] {"Reference"};
2646        default: return super.getTypesForProperty(hash, name);
2647        }
2648
2649      }
2650
2651      @Override
2652      public Base addChild(String name) throws FHIRException {
2653        if (name.equals("autocreate")) {
2654          throw new FHIRException("Cannot call addChild on a primitive type TestScript.autocreate");
2655        }
2656        else if (name.equals("autodelete")) {
2657          throw new FHIRException("Cannot call addChild on a primitive type TestScript.autodelete");
2658        }
2659        else if (name.equals("resource")) {
2660          this.resource = new Reference();
2661          return this.resource;
2662        }
2663        else
2664          return super.addChild(name);
2665      }
2666
2667      public TestScriptFixtureComponent copy() {
2668        TestScriptFixtureComponent dst = new TestScriptFixtureComponent();
2669        copyValues(dst);
2670        dst.autocreate = autocreate == null ? null : autocreate.copy();
2671        dst.autodelete = autodelete == null ? null : autodelete.copy();
2672        dst.resource = resource == null ? null : resource.copy();
2673        return dst;
2674      }
2675
2676      @Override
2677      public boolean equalsDeep(Base other_) {
2678        if (!super.equalsDeep(other_))
2679          return false;
2680        if (!(other_ instanceof TestScriptFixtureComponent))
2681          return false;
2682        TestScriptFixtureComponent o = (TestScriptFixtureComponent) other_;
2683        return compareDeep(autocreate, o.autocreate, true) && compareDeep(autodelete, o.autodelete, true)
2684           && compareDeep(resource, o.resource, true);
2685      }
2686
2687      @Override
2688      public boolean equalsShallow(Base other_) {
2689        if (!super.equalsShallow(other_))
2690          return false;
2691        if (!(other_ instanceof TestScriptFixtureComponent))
2692          return false;
2693        TestScriptFixtureComponent o = (TestScriptFixtureComponent) other_;
2694        return compareValues(autocreate, o.autocreate, true) && compareValues(autodelete, o.autodelete, true)
2695          ;
2696      }
2697
2698      public boolean isEmpty() {
2699        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(autocreate, autodelete, resource
2700          );
2701      }
2702
2703  public String fhirType() {
2704    return "TestScript.fixture";
2705
2706  }
2707
2708  }
2709
2710    @Block()
2711    public static class TestScriptVariableComponent extends BackboneElement implements IBaseBackboneElement {
2712        /**
2713         * Descriptive name for this variable.
2714         */
2715        @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
2716        @Description(shortDefinition="Descriptive name for this variable", formalDefinition="Descriptive name for this variable." )
2717        protected StringType name;
2718
2719        /**
2720         * A default, hard-coded, or user-defined value for this variable.
2721         */
2722        @Child(name = "defaultValue", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
2723        @Description(shortDefinition="Default, hard-coded, or user-defined value for this variable", formalDefinition="A default, hard-coded, or user-defined value for this variable." )
2724        protected StringType defaultValue;
2725
2726        /**
2727         * A free text natural language description of the variable and its purpose.
2728         */
2729        @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
2730        @Description(shortDefinition="Natural language description of the variable", formalDefinition="A free text natural language description of the variable and its purpose." )
2731        protected StringType description;
2732
2733        /**
2734         * The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.
2735         */
2736        @Child(name = "expression", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
2737        @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." )
2738        protected StringType expression;
2739
2740        /**
2741         * Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.
2742         */
2743        @Child(name = "headerField", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
2744        @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." )
2745        protected StringType headerField;
2746
2747        /**
2748         * Displayable text string with hint help information to the user when entering a default value.
2749         */
2750        @Child(name = "hint", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false)
2751        @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." )
2752        protected StringType hint;
2753
2754        /**
2755         * XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.
2756         */
2757        @Child(name = "path", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false)
2758        @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." )
2759        protected StringType path;
2760
2761        /**
2762         * Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.
2763         */
2764        @Child(name = "sourceId", type = {IdType.class}, order=8, min=0, max=1, modifier=false, summary=false)
2765        @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." )
2766        protected IdType sourceId;
2767
2768        private static final long serialVersionUID = -1592325432L;
2769
2770    /**
2771     * Constructor
2772     */
2773      public TestScriptVariableComponent() {
2774        super();
2775      }
2776
2777    /**
2778     * Constructor
2779     */
2780      public TestScriptVariableComponent(StringType name) {
2781        super();
2782        this.name = name;
2783      }
2784
2785        /**
2786         * @return {@link #name} (Descriptive name for this variable.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
2787         */
2788        public StringType getNameElement() { 
2789          if (this.name == null)
2790            if (Configuration.errorOnAutoCreate())
2791              throw new Error("Attempt to auto-create TestScriptVariableComponent.name");
2792            else if (Configuration.doAutoCreate())
2793              this.name = new StringType(); // bb
2794          return this.name;
2795        }
2796
2797        public boolean hasNameElement() { 
2798          return this.name != null && !this.name.isEmpty();
2799        }
2800
2801        public boolean hasName() { 
2802          return this.name != null && !this.name.isEmpty();
2803        }
2804
2805        /**
2806         * @param value {@link #name} (Descriptive name for this variable.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
2807         */
2808        public TestScriptVariableComponent setNameElement(StringType value) { 
2809          this.name = value;
2810          return this;
2811        }
2812
2813        /**
2814         * @return Descriptive name for this variable.
2815         */
2816        public String getName() { 
2817          return this.name == null ? null : this.name.getValue();
2818        }
2819
2820        /**
2821         * @param value Descriptive name for this variable.
2822         */
2823        public TestScriptVariableComponent setName(String value) { 
2824            if (this.name == null)
2825              this.name = new StringType();
2826            this.name.setValue(value);
2827          return this;
2828        }
2829
2830        /**
2831         * @return {@link #defaultValue} (A default, hard-coded, or user-defined value for this variable.). This is the underlying object with id, value and extensions. The accessor "getDefaultValue" gives direct access to the value
2832         */
2833        public StringType getDefaultValueElement() { 
2834          if (this.defaultValue == null)
2835            if (Configuration.errorOnAutoCreate())
2836              throw new Error("Attempt to auto-create TestScriptVariableComponent.defaultValue");
2837            else if (Configuration.doAutoCreate())
2838              this.defaultValue = new StringType(); // bb
2839          return this.defaultValue;
2840        }
2841
2842        public boolean hasDefaultValueElement() { 
2843          return this.defaultValue != null && !this.defaultValue.isEmpty();
2844        }
2845
2846        public boolean hasDefaultValue() { 
2847          return this.defaultValue != null && !this.defaultValue.isEmpty();
2848        }
2849
2850        /**
2851         * @param value {@link #defaultValue} (A default, hard-coded, or user-defined value for this variable.). This is the underlying object with id, value and extensions. The accessor "getDefaultValue" gives direct access to the value
2852         */
2853        public TestScriptVariableComponent setDefaultValueElement(StringType value) { 
2854          this.defaultValue = value;
2855          return this;
2856        }
2857
2858        /**
2859         * @return A default, hard-coded, or user-defined value for this variable.
2860         */
2861        public String getDefaultValue() { 
2862          return this.defaultValue == null ? null : this.defaultValue.getValue();
2863        }
2864
2865        /**
2866         * @param value A default, hard-coded, or user-defined value for this variable.
2867         */
2868        public TestScriptVariableComponent setDefaultValue(String value) { 
2869          if (Utilities.noString(value))
2870            this.defaultValue = null;
2871          else {
2872            if (this.defaultValue == null)
2873              this.defaultValue = new StringType();
2874            this.defaultValue.setValue(value);
2875          }
2876          return this;
2877        }
2878
2879        /**
2880         * @return {@link #description} (A free text natural language description of the variable and its purpose.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2881         */
2882        public StringType getDescriptionElement() { 
2883          if (this.description == null)
2884            if (Configuration.errorOnAutoCreate())
2885              throw new Error("Attempt to auto-create TestScriptVariableComponent.description");
2886            else if (Configuration.doAutoCreate())
2887              this.description = new StringType(); // bb
2888          return this.description;
2889        }
2890
2891        public boolean hasDescriptionElement() { 
2892          return this.description != null && !this.description.isEmpty();
2893        }
2894
2895        public boolean hasDescription() { 
2896          return this.description != null && !this.description.isEmpty();
2897        }
2898
2899        /**
2900         * @param value {@link #description} (A free text natural language description of the variable and its purpose.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2901         */
2902        public TestScriptVariableComponent setDescriptionElement(StringType value) { 
2903          this.description = value;
2904          return this;
2905        }
2906
2907        /**
2908         * @return A free text natural language description of the variable and its purpose.
2909         */
2910        public String getDescription() { 
2911          return this.description == null ? null : this.description.getValue();
2912        }
2913
2914        /**
2915         * @param value A free text natural language description of the variable and its purpose.
2916         */
2917        public TestScriptVariableComponent setDescription(String value) { 
2918          if (Utilities.noString(value))
2919            this.description = null;
2920          else {
2921            if (this.description == null)
2922              this.description = new StringType();
2923            this.description.setValue(value);
2924          }
2925          return this;
2926        }
2927
2928        /**
2929         * @return {@link #expression} (The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value
2930         */
2931        public StringType getExpressionElement() { 
2932          if (this.expression == null)
2933            if (Configuration.errorOnAutoCreate())
2934              throw new Error("Attempt to auto-create TestScriptVariableComponent.expression");
2935            else if (Configuration.doAutoCreate())
2936              this.expression = new StringType(); // bb
2937          return this.expression;
2938        }
2939
2940        public boolean hasExpressionElement() { 
2941          return this.expression != null && !this.expression.isEmpty();
2942        }
2943
2944        public boolean hasExpression() { 
2945          return this.expression != null && !this.expression.isEmpty();
2946        }
2947
2948        /**
2949         * @param value {@link #expression} (The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value
2950         */
2951        public TestScriptVariableComponent setExpressionElement(StringType value) { 
2952          this.expression = value;
2953          return this;
2954        }
2955
2956        /**
2957         * @return The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.
2958         */
2959        public String getExpression() { 
2960          return this.expression == null ? null : this.expression.getValue();
2961        }
2962
2963        /**
2964         * @param value The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.
2965         */
2966        public TestScriptVariableComponent setExpression(String value) { 
2967          if (Utilities.noString(value))
2968            this.expression = null;
2969          else {
2970            if (this.expression == null)
2971              this.expression = new StringType();
2972            this.expression.setValue(value);
2973          }
2974          return this;
2975        }
2976
2977        /**
2978         * @return {@link #headerField} (Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.). This is the underlying object with id, value and extensions. The accessor "getHeaderField" gives direct access to the value
2979         */
2980        public StringType getHeaderFieldElement() { 
2981          if (this.headerField == null)
2982            if (Configuration.errorOnAutoCreate())
2983              throw new Error("Attempt to auto-create TestScriptVariableComponent.headerField");
2984            else if (Configuration.doAutoCreate())
2985              this.headerField = new StringType(); // bb
2986          return this.headerField;
2987        }
2988
2989        public boolean hasHeaderFieldElement() { 
2990          return this.headerField != null && !this.headerField.isEmpty();
2991        }
2992
2993        public boolean hasHeaderField() { 
2994          return this.headerField != null && !this.headerField.isEmpty();
2995        }
2996
2997        /**
2998         * @param value {@link #headerField} (Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.). This is the underlying object with id, value and extensions. The accessor "getHeaderField" gives direct access to the value
2999         */
3000        public TestScriptVariableComponent setHeaderFieldElement(StringType value) { 
3001          this.headerField = value;
3002          return this;
3003        }
3004
3005        /**
3006         * @return Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.
3007         */
3008        public String getHeaderField() { 
3009          return this.headerField == null ? null : this.headerField.getValue();
3010        }
3011
3012        /**
3013         * @param value Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.
3014         */
3015        public TestScriptVariableComponent setHeaderField(String value) { 
3016          if (Utilities.noString(value))
3017            this.headerField = null;
3018          else {
3019            if (this.headerField == null)
3020              this.headerField = new StringType();
3021            this.headerField.setValue(value);
3022          }
3023          return this;
3024        }
3025
3026        /**
3027         * @return {@link #hint} (Displayable text string with hint help information to the user when entering a default value.). This is the underlying object with id, value and extensions. The accessor "getHint" gives direct access to the value
3028         */
3029        public StringType getHintElement() { 
3030          if (this.hint == null)
3031            if (Configuration.errorOnAutoCreate())
3032              throw new Error("Attempt to auto-create TestScriptVariableComponent.hint");
3033            else if (Configuration.doAutoCreate())
3034              this.hint = new StringType(); // bb
3035          return this.hint;
3036        }
3037
3038        public boolean hasHintElement() { 
3039          return this.hint != null && !this.hint.isEmpty();
3040        }
3041
3042        public boolean hasHint() { 
3043          return this.hint != null && !this.hint.isEmpty();
3044        }
3045
3046        /**
3047         * @param value {@link #hint} (Displayable text string with hint help information to the user when entering a default value.). This is the underlying object with id, value and extensions. The accessor "getHint" gives direct access to the value
3048         */
3049        public TestScriptVariableComponent setHintElement(StringType value) { 
3050          this.hint = value;
3051          return this;
3052        }
3053
3054        /**
3055         * @return Displayable text string with hint help information to the user when entering a default value.
3056         */
3057        public String getHint() { 
3058          return this.hint == null ? null : this.hint.getValue();
3059        }
3060
3061        /**
3062         * @param value Displayable text string with hint help information to the user when entering a default value.
3063         */
3064        public TestScriptVariableComponent setHint(String value) { 
3065          if (Utilities.noString(value))
3066            this.hint = null;
3067          else {
3068            if (this.hint == null)
3069              this.hint = new StringType();
3070            this.hint.setValue(value);
3071          }
3072          return this;
3073        }
3074
3075        /**
3076         * @return {@link #path} (XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value
3077         */
3078        public StringType getPathElement() { 
3079          if (this.path == null)
3080            if (Configuration.errorOnAutoCreate())
3081              throw new Error("Attempt to auto-create TestScriptVariableComponent.path");
3082            else if (Configuration.doAutoCreate())
3083              this.path = new StringType(); // bb
3084          return this.path;
3085        }
3086
3087        public boolean hasPathElement() { 
3088          return this.path != null && !this.path.isEmpty();
3089        }
3090
3091        public boolean hasPath() { 
3092          return this.path != null && !this.path.isEmpty();
3093        }
3094
3095        /**
3096         * @param value {@link #path} (XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value
3097         */
3098        public TestScriptVariableComponent setPathElement(StringType value) { 
3099          this.path = value;
3100          return this;
3101        }
3102
3103        /**
3104         * @return XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.
3105         */
3106        public String getPath() { 
3107          return this.path == null ? null : this.path.getValue();
3108        }
3109
3110        /**
3111         * @param value XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.
3112         */
3113        public TestScriptVariableComponent setPath(String value) { 
3114          if (Utilities.noString(value))
3115            this.path = null;
3116          else {
3117            if (this.path == null)
3118              this.path = new StringType();
3119            this.path.setValue(value);
3120          }
3121          return this;
3122        }
3123
3124        /**
3125         * @return {@link #sourceId} (Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value
3126         */
3127        public IdType getSourceIdElement() { 
3128          if (this.sourceId == null)
3129            if (Configuration.errorOnAutoCreate())
3130              throw new Error("Attempt to auto-create TestScriptVariableComponent.sourceId");
3131            else if (Configuration.doAutoCreate())
3132              this.sourceId = new IdType(); // bb
3133          return this.sourceId;
3134        }
3135
3136        public boolean hasSourceIdElement() { 
3137          return this.sourceId != null && !this.sourceId.isEmpty();
3138        }
3139
3140        public boolean hasSourceId() { 
3141          return this.sourceId != null && !this.sourceId.isEmpty();
3142        }
3143
3144        /**
3145         * @param value {@link #sourceId} (Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value
3146         */
3147        public TestScriptVariableComponent setSourceIdElement(IdType value) { 
3148          this.sourceId = value;
3149          return this;
3150        }
3151
3152        /**
3153         * @return Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.
3154         */
3155        public String getSourceId() { 
3156          return this.sourceId == null ? null : this.sourceId.getValue();
3157        }
3158
3159        /**
3160         * @param value Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.
3161         */
3162        public TestScriptVariableComponent setSourceId(String value) { 
3163          if (Utilities.noString(value))
3164            this.sourceId = null;
3165          else {
3166            if (this.sourceId == null)
3167              this.sourceId = new IdType();
3168            this.sourceId.setValue(value);
3169          }
3170          return this;
3171        }
3172
3173        protected void listChildren(List<Property> children) {
3174          super.listChildren(children);
3175          children.add(new Property("name", "string", "Descriptive name for this variable.", 0, 1, name));
3176          children.add(new Property("defaultValue", "string", "A default, hard-coded, or user-defined value for this variable.", 0, 1, defaultValue));
3177          children.add(new Property("description", "string", "A free text natural language description of the variable and its purpose.", 0, 1, description));
3178          children.add(new Property("expression", "string", "The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.", 0, 1, expression));
3179          children.add(new Property("headerField", "string", "Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.", 0, 1, headerField));
3180          children.add(new Property("hint", "string", "Displayable text string with hint help information to the user when entering a default value.", 0, 1, hint));
3181          children.add(new Property("path", "string", "XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.", 0, 1, path));
3182          children.add(new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.", 0, 1, sourceId));
3183        }
3184
3185        @Override
3186        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3187          switch (_hash) {
3188          case 3373707: /*name*/  return new Property("name", "string", "Descriptive name for this variable.", 0, 1, name);
3189          case -659125328: /*defaultValue*/  return new Property("defaultValue", "string", "A default, hard-coded, or user-defined value for this variable.", 0, 1, defaultValue);
3190          case -1724546052: /*description*/  return new Property("description", "string", "A free text natural language description of the variable and its purpose.", 0, 1, description);
3191          case -1795452264: /*expression*/  return new Property("expression", "string", "The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.", 0, 1, expression);
3192          case 1160732269: /*headerField*/  return new Property("headerField", "string", "Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.", 0, 1, headerField);
3193          case 3202695: /*hint*/  return new Property("hint", "string", "Displayable text string with hint help information to the user when entering a default value.", 0, 1, hint);
3194          case 3433509: /*path*/  return new Property("path", "string", "XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.", 0, 1, path);
3195          case 1746327190: /*sourceId*/  return new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.", 0, 1, sourceId);
3196          default: return super.getNamedProperty(_hash, _name, _checkValid);
3197          }
3198
3199        }
3200
3201      @Override
3202      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3203        switch (hash) {
3204        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
3205        case -659125328: /*defaultValue*/ return this.defaultValue == null ? new Base[0] : new Base[] {this.defaultValue}; // StringType
3206        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
3207        case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType
3208        case 1160732269: /*headerField*/ return this.headerField == null ? new Base[0] : new Base[] {this.headerField}; // StringType
3209        case 3202695: /*hint*/ return this.hint == null ? new Base[0] : new Base[] {this.hint}; // StringType
3210        case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
3211        case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType
3212        default: return super.getProperty(hash, name, checkValid);
3213        }
3214
3215      }
3216
3217      @Override
3218      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3219        switch (hash) {
3220        case 3373707: // name
3221          this.name = castToString(value); // StringType
3222          return value;
3223        case -659125328: // defaultValue
3224          this.defaultValue = castToString(value); // StringType
3225          return value;
3226        case -1724546052: // description
3227          this.description = castToString(value); // StringType
3228          return value;
3229        case -1795452264: // expression
3230          this.expression = castToString(value); // StringType
3231          return value;
3232        case 1160732269: // headerField
3233          this.headerField = castToString(value); // StringType
3234          return value;
3235        case 3202695: // hint
3236          this.hint = castToString(value); // StringType
3237          return value;
3238        case 3433509: // path
3239          this.path = castToString(value); // StringType
3240          return value;
3241        case 1746327190: // sourceId
3242          this.sourceId = castToId(value); // IdType
3243          return value;
3244        default: return super.setProperty(hash, name, value);
3245        }
3246
3247      }
3248
3249      @Override
3250      public Base setProperty(String name, Base value) throws FHIRException {
3251        if (name.equals("name")) {
3252          this.name = castToString(value); // StringType
3253        } else if (name.equals("defaultValue")) {
3254          this.defaultValue = castToString(value); // StringType
3255        } else if (name.equals("description")) {
3256          this.description = castToString(value); // StringType
3257        } else if (name.equals("expression")) {
3258          this.expression = castToString(value); // StringType
3259        } else if (name.equals("headerField")) {
3260          this.headerField = castToString(value); // StringType
3261        } else if (name.equals("hint")) {
3262          this.hint = castToString(value); // StringType
3263        } else if (name.equals("path")) {
3264          this.path = castToString(value); // StringType
3265        } else if (name.equals("sourceId")) {
3266          this.sourceId = castToId(value); // IdType
3267        } else
3268          return super.setProperty(name, value);
3269        return value;
3270      }
3271
3272      @Override
3273      public Base makeProperty(int hash, String name) throws FHIRException {
3274        switch (hash) {
3275        case 3373707:  return getNameElement();
3276        case -659125328:  return getDefaultValueElement();
3277        case -1724546052:  return getDescriptionElement();
3278        case -1795452264:  return getExpressionElement();
3279        case 1160732269:  return getHeaderFieldElement();
3280        case 3202695:  return getHintElement();
3281        case 3433509:  return getPathElement();
3282        case 1746327190:  return getSourceIdElement();
3283        default: return super.makeProperty(hash, name);
3284        }
3285
3286      }
3287
3288      @Override
3289      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3290        switch (hash) {
3291        case 3373707: /*name*/ return new String[] {"string"};
3292        case -659125328: /*defaultValue*/ return new String[] {"string"};
3293        case -1724546052: /*description*/ return new String[] {"string"};
3294        case -1795452264: /*expression*/ return new String[] {"string"};
3295        case 1160732269: /*headerField*/ return new String[] {"string"};
3296        case 3202695: /*hint*/ return new String[] {"string"};
3297        case 3433509: /*path*/ return new String[] {"string"};
3298        case 1746327190: /*sourceId*/ return new String[] {"id"};
3299        default: return super.getTypesForProperty(hash, name);
3300        }
3301
3302      }
3303
3304      @Override
3305      public Base addChild(String name) throws FHIRException {
3306        if (name.equals("name")) {
3307          throw new FHIRException("Cannot call addChild on a primitive type TestScript.name");
3308        }
3309        else if (name.equals("defaultValue")) {
3310          throw new FHIRException("Cannot call addChild on a primitive type TestScript.defaultValue");
3311        }
3312        else if (name.equals("description")) {
3313          throw new FHIRException("Cannot call addChild on a primitive type TestScript.description");
3314        }
3315        else if (name.equals("expression")) {
3316          throw new FHIRException("Cannot call addChild on a primitive type TestScript.expression");
3317        }
3318        else if (name.equals("headerField")) {
3319          throw new FHIRException("Cannot call addChild on a primitive type TestScript.headerField");
3320        }
3321        else if (name.equals("hint")) {
3322          throw new FHIRException("Cannot call addChild on a primitive type TestScript.hint");
3323        }
3324        else if (name.equals("path")) {
3325          throw new FHIRException("Cannot call addChild on a primitive type TestScript.path");
3326        }
3327        else if (name.equals("sourceId")) {
3328          throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId");
3329        }
3330        else
3331          return super.addChild(name);
3332      }
3333
3334      public TestScriptVariableComponent copy() {
3335        TestScriptVariableComponent dst = new TestScriptVariableComponent();
3336        copyValues(dst);
3337        dst.name = name == null ? null : name.copy();
3338        dst.defaultValue = defaultValue == null ? null : defaultValue.copy();
3339        dst.description = description == null ? null : description.copy();
3340        dst.expression = expression == null ? null : expression.copy();
3341        dst.headerField = headerField == null ? null : headerField.copy();
3342        dst.hint = hint == null ? null : hint.copy();
3343        dst.path = path == null ? null : path.copy();
3344        dst.sourceId = sourceId == null ? null : sourceId.copy();
3345        return dst;
3346      }
3347
3348      @Override
3349      public boolean equalsDeep(Base other_) {
3350        if (!super.equalsDeep(other_))
3351          return false;
3352        if (!(other_ instanceof TestScriptVariableComponent))
3353          return false;
3354        TestScriptVariableComponent o = (TestScriptVariableComponent) other_;
3355        return compareDeep(name, o.name, true) && compareDeep(defaultValue, o.defaultValue, true) && compareDeep(description, o.description, true)
3356           && compareDeep(expression, o.expression, true) && compareDeep(headerField, o.headerField, true)
3357           && compareDeep(hint, o.hint, true) && compareDeep(path, o.path, true) && compareDeep(sourceId, o.sourceId, true)
3358          ;
3359      }
3360
3361      @Override
3362      public boolean equalsShallow(Base other_) {
3363        if (!super.equalsShallow(other_))
3364          return false;
3365        if (!(other_ instanceof TestScriptVariableComponent))
3366          return false;
3367        TestScriptVariableComponent o = (TestScriptVariableComponent) other_;
3368        return compareValues(name, o.name, true) && compareValues(defaultValue, o.defaultValue, true) && compareValues(description, o.description, true)
3369           && compareValues(expression, o.expression, true) && compareValues(headerField, o.headerField, true)
3370           && compareValues(hint, o.hint, true) && compareValues(path, o.path, true) && compareValues(sourceId, o.sourceId, true)
3371          ;
3372      }
3373
3374      public boolean isEmpty() {
3375        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, defaultValue, description
3376          , expression, headerField, hint, path, sourceId);
3377      }
3378
3379  public String fhirType() {
3380    return "TestScript.variable";
3381
3382  }
3383
3384  }
3385
3386    @Block()
3387    public static class TestScriptSetupComponent extends BackboneElement implements IBaseBackboneElement {
3388        /**
3389         * Action would contain either an operation or an assertion.
3390         */
3391        @Child(name = "action", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3392        @Description(shortDefinition="A setup operation or assert to perform", formalDefinition="Action would contain either an operation or an assertion." )
3393        protected List<SetupActionComponent> action;
3394
3395        private static final long serialVersionUID = -123374486L;
3396
3397    /**
3398     * Constructor
3399     */
3400      public TestScriptSetupComponent() {
3401        super();
3402      }
3403
3404        /**
3405         * @return {@link #action} (Action would contain either an operation or an assertion.)
3406         */
3407        public List<SetupActionComponent> getAction() { 
3408          if (this.action == null)
3409            this.action = new ArrayList<SetupActionComponent>();
3410          return this.action;
3411        }
3412
3413        /**
3414         * @return Returns a reference to <code>this</code> for easy method chaining
3415         */
3416        public TestScriptSetupComponent setAction(List<SetupActionComponent> theAction) { 
3417          this.action = theAction;
3418          return this;
3419        }
3420
3421        public boolean hasAction() { 
3422          if (this.action == null)
3423            return false;
3424          for (SetupActionComponent item : this.action)
3425            if (!item.isEmpty())
3426              return true;
3427          return false;
3428        }
3429
3430        public SetupActionComponent addAction() { //3
3431          SetupActionComponent t = new SetupActionComponent();
3432          if (this.action == null)
3433            this.action = new ArrayList<SetupActionComponent>();
3434          this.action.add(t);
3435          return t;
3436        }
3437
3438        public TestScriptSetupComponent addAction(SetupActionComponent t) { //3
3439          if (t == null)
3440            return this;
3441          if (this.action == null)
3442            this.action = new ArrayList<SetupActionComponent>();
3443          this.action.add(t);
3444          return this;
3445        }
3446
3447        /**
3448         * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist
3449         */
3450        public SetupActionComponent getActionFirstRep() { 
3451          if (getAction().isEmpty()) {
3452            addAction();
3453          }
3454          return getAction().get(0);
3455        }
3456
3457        protected void listChildren(List<Property> children) {
3458          super.listChildren(children);
3459          children.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action));
3460        }
3461
3462        @Override
3463        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3464          switch (_hash) {
3465          case -1422950858: /*action*/  return new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action);
3466          default: return super.getNamedProperty(_hash, _name, _checkValid);
3467          }
3468
3469        }
3470
3471      @Override
3472      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3473        switch (hash) {
3474        case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // SetupActionComponent
3475        default: return super.getProperty(hash, name, checkValid);
3476        }
3477
3478      }
3479
3480      @Override
3481      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3482        switch (hash) {
3483        case -1422950858: // action
3484          this.getAction().add((SetupActionComponent) value); // SetupActionComponent
3485          return value;
3486        default: return super.setProperty(hash, name, value);
3487        }
3488
3489      }
3490
3491      @Override
3492      public Base setProperty(String name, Base value) throws FHIRException {
3493        if (name.equals("action")) {
3494          this.getAction().add((SetupActionComponent) value);
3495        } else
3496          return super.setProperty(name, value);
3497        return value;
3498      }
3499
3500      @Override
3501      public Base makeProperty(int hash, String name) throws FHIRException {
3502        switch (hash) {
3503        case -1422950858:  return addAction(); 
3504        default: return super.makeProperty(hash, name);
3505        }
3506
3507      }
3508
3509      @Override
3510      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3511        switch (hash) {
3512        case -1422950858: /*action*/ return new String[] {};
3513        default: return super.getTypesForProperty(hash, name);
3514        }
3515
3516      }
3517
3518      @Override
3519      public Base addChild(String name) throws FHIRException {
3520        if (name.equals("action")) {
3521          return addAction();
3522        }
3523        else
3524          return super.addChild(name);
3525      }
3526
3527      public TestScriptSetupComponent copy() {
3528        TestScriptSetupComponent dst = new TestScriptSetupComponent();
3529        copyValues(dst);
3530        if (action != null) {
3531          dst.action = new ArrayList<SetupActionComponent>();
3532          for (SetupActionComponent i : action)
3533            dst.action.add(i.copy());
3534        };
3535        return dst;
3536      }
3537
3538      @Override
3539      public boolean equalsDeep(Base other_) {
3540        if (!super.equalsDeep(other_))
3541          return false;
3542        if (!(other_ instanceof TestScriptSetupComponent))
3543          return false;
3544        TestScriptSetupComponent o = (TestScriptSetupComponent) other_;
3545        return compareDeep(action, o.action, true);
3546      }
3547
3548      @Override
3549      public boolean equalsShallow(Base other_) {
3550        if (!super.equalsShallow(other_))
3551          return false;
3552        if (!(other_ instanceof TestScriptSetupComponent))
3553          return false;
3554        TestScriptSetupComponent o = (TestScriptSetupComponent) other_;
3555        return true;
3556      }
3557
3558      public boolean isEmpty() {
3559        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(action);
3560      }
3561
3562  public String fhirType() {
3563    return "TestScript.setup";
3564
3565  }
3566
3567  }
3568
3569    @Block()
3570    public static class SetupActionComponent extends BackboneElement implements IBaseBackboneElement {
3571        /**
3572         * The operation to perform.
3573         */
3574        @Child(name = "operation", type = {}, order=1, min=0, max=1, modifier=false, summary=false)
3575        @Description(shortDefinition="The setup operation to perform", formalDefinition="The operation to perform." )
3576        protected SetupActionOperationComponent operation;
3577
3578        /**
3579         * Evaluates the results of previous operations to determine if the server under test behaves appropriately.
3580         */
3581        @Child(name = "assert", type = {}, order=2, min=0, max=1, modifier=false, summary=false)
3582        @Description(shortDefinition="The assertion to perform", formalDefinition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." )
3583        protected SetupActionAssertComponent assert_;
3584
3585        private static final long serialVersionUID = -252088305L;
3586
3587    /**
3588     * Constructor
3589     */
3590      public SetupActionComponent() {
3591        super();
3592      }
3593
3594        /**
3595         * @return {@link #operation} (The operation to perform.)
3596         */
3597        public SetupActionOperationComponent getOperation() { 
3598          if (this.operation == null)
3599            if (Configuration.errorOnAutoCreate())
3600              throw new Error("Attempt to auto-create SetupActionComponent.operation");
3601            else if (Configuration.doAutoCreate())
3602              this.operation = new SetupActionOperationComponent(); // cc
3603          return this.operation;
3604        }
3605
3606        public boolean hasOperation() { 
3607          return this.operation != null && !this.operation.isEmpty();
3608        }
3609
3610        /**
3611         * @param value {@link #operation} (The operation to perform.)
3612         */
3613        public SetupActionComponent setOperation(SetupActionOperationComponent value) { 
3614          this.operation = value;
3615          return this;
3616        }
3617
3618        /**
3619         * @return {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.)
3620         */
3621        public SetupActionAssertComponent getAssert() { 
3622          if (this.assert_ == null)
3623            if (Configuration.errorOnAutoCreate())
3624              throw new Error("Attempt to auto-create SetupActionComponent.assert_");
3625            else if (Configuration.doAutoCreate())
3626              this.assert_ = new SetupActionAssertComponent(); // cc
3627          return this.assert_;
3628        }
3629
3630        public boolean hasAssert() { 
3631          return this.assert_ != null && !this.assert_.isEmpty();
3632        }
3633
3634        /**
3635         * @param value {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.)
3636         */
3637        public SetupActionComponent setAssert(SetupActionAssertComponent value) { 
3638          this.assert_ = value;
3639          return this;
3640        }
3641
3642        protected void listChildren(List<Property> children) {
3643          super.listChildren(children);
3644          children.add(new Property("operation", "", "The operation to perform.", 0, 1, operation));
3645          children.add(new Property("assert", "", "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", 0, 1, assert_));
3646        }
3647
3648        @Override
3649        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3650          switch (_hash) {
3651          case 1662702951: /*operation*/  return new Property("operation", "", "The operation to perform.", 0, 1, operation);
3652          case -1408208058: /*assert*/  return new Property("assert", "", "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", 0, 1, assert_);
3653          default: return super.getNamedProperty(_hash, _name, _checkValid);
3654          }
3655
3656        }
3657
3658      @Override
3659      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3660        switch (hash) {
3661        case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent
3662        case -1408208058: /*assert*/ return this.assert_ == null ? new Base[0] : new Base[] {this.assert_}; // SetupActionAssertComponent
3663        default: return super.getProperty(hash, name, checkValid);
3664        }
3665
3666      }
3667
3668      @Override
3669      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3670        switch (hash) {
3671        case 1662702951: // operation
3672          this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
3673          return value;
3674        case -1408208058: // assert
3675          this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
3676          return value;
3677        default: return super.setProperty(hash, name, value);
3678        }
3679
3680      }
3681
3682      @Override
3683      public Base setProperty(String name, Base value) throws FHIRException {
3684        if (name.equals("operation")) {
3685          this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
3686        } else if (name.equals("assert")) {
3687          this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
3688        } else
3689          return super.setProperty(name, value);
3690        return value;
3691      }
3692
3693      @Override
3694      public Base makeProperty(int hash, String name) throws FHIRException {
3695        switch (hash) {
3696        case 1662702951:  return getOperation(); 
3697        case -1408208058:  return getAssert(); 
3698        default: return super.makeProperty(hash, name);
3699        }
3700
3701      }
3702
3703      @Override
3704      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3705        switch (hash) {
3706        case 1662702951: /*operation*/ return new String[] {};
3707        case -1408208058: /*assert*/ return new String[] {};
3708        default: return super.getTypesForProperty(hash, name);
3709        }
3710
3711      }
3712
3713      @Override
3714      public Base addChild(String name) throws FHIRException {
3715        if (name.equals("operation")) {
3716          this.operation = new SetupActionOperationComponent();
3717          return this.operation;
3718        }
3719        else if (name.equals("assert")) {
3720          this.assert_ = new SetupActionAssertComponent();
3721          return this.assert_;
3722        }
3723        else
3724          return super.addChild(name);
3725      }
3726
3727      public SetupActionComponent copy() {
3728        SetupActionComponent dst = new SetupActionComponent();
3729        copyValues(dst);
3730        dst.operation = operation == null ? null : operation.copy();
3731        dst.assert_ = assert_ == null ? null : assert_.copy();
3732        return dst;
3733      }
3734
3735      @Override
3736      public boolean equalsDeep(Base other_) {
3737        if (!super.equalsDeep(other_))
3738          return false;
3739        if (!(other_ instanceof SetupActionComponent))
3740          return false;
3741        SetupActionComponent o = (SetupActionComponent) other_;
3742        return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true);
3743      }
3744
3745      @Override
3746      public boolean equalsShallow(Base other_) {
3747        if (!super.equalsShallow(other_))
3748          return false;
3749        if (!(other_ instanceof SetupActionComponent))
3750          return false;
3751        SetupActionComponent o = (SetupActionComponent) other_;
3752        return true;
3753      }
3754
3755      public boolean isEmpty() {
3756        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation, assert_);
3757      }
3758
3759  public String fhirType() {
3760    return "TestScript.setup.action";
3761
3762  }
3763
3764  }
3765
3766    @Block()
3767    public static class SetupActionOperationComponent extends BackboneElement implements IBaseBackboneElement {
3768        /**
3769         * Server interaction or operation type.
3770         */
3771        @Child(name = "type", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=false)
3772        @Description(shortDefinition="The operation code type that will be executed", formalDefinition="Server interaction or operation type." )
3773        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-operation-codes")
3774        protected Coding type;
3775
3776        /**
3777         * The type of the resource.  See http://build.fhir.org/resourcelist.html.
3778         */
3779        @Child(name = "resource", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false)
3780        @Description(shortDefinition="Resource type", formalDefinition="The type of the resource.  See http://build.fhir.org/resourcelist.html." )
3781        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/defined-types")
3782        protected CodeType resource;
3783
3784        /**
3785         * The label would be used for tracking/logging purposes by test engines.
3786         */
3787        @Child(name = "label", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
3788        @Description(shortDefinition="Tracking/logging operation label", formalDefinition="The label would be used for tracking/logging purposes by test engines." )
3789        protected StringType label;
3790
3791        /**
3792         * The description would be used by test engines for tracking and reporting purposes.
3793         */
3794        @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
3795        @Description(shortDefinition="Tracking/reporting operation description", formalDefinition="The description would be used by test engines for tracking and reporting purposes." )
3796        protected StringType description;
3797
3798        /**
3799         * The mime-type to use for RESTful operation in the 'Accept' header.
3800         */
3801        @Child(name = "accept", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=false)
3802        @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." )
3803        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/mimetypes")
3804        protected CodeType accept;
3805
3806        /**
3807         * The mime-type to use for RESTful operation in the 'Content-Type' header.
3808         */
3809        @Child(name = "contentType", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false)
3810        @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." )
3811        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/mimetypes")
3812        protected CodeType contentType;
3813
3814        /**
3815         * The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.
3816         */
3817        @Child(name = "destination", type = {IntegerType.class}, order=7, min=0, max=1, modifier=false, summary=false)
3818        @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." )
3819        protected IntegerType destination;
3820
3821        /**
3822         * 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.
3823         */
3824        @Child(name = "encodeRequestUrl", type = {BooleanType.class}, order=8, min=1, max=1, modifier=false, summary=false)
3825        @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." )
3826        protected BooleanType encodeRequestUrl;
3827
3828        /**
3829         * The HTTP method the test engine MUST use for this operation regardless of any other operation details.
3830         */
3831        @Child(name = "method", type = {CodeType.class}, order=9, min=0, max=1, modifier=false, summary=false)
3832        @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." )
3833        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/http-operations")
3834        protected Enumeration<TestScriptRequestMethodCode> method;
3835
3836        /**
3837         * The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.
3838         */
3839        @Child(name = "origin", type = {IntegerType.class}, order=10, min=0, max=1, modifier=false, summary=false)
3840        @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." )
3841        protected IntegerType origin;
3842
3843        /**
3844         * Path plus parameters after [type].  Used to set parts of the request URL explicitly.
3845         */
3846        @Child(name = "params", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=false)
3847        @Description(shortDefinition="Explicitly defined path parameters", formalDefinition="Path plus parameters after [type].  Used to set parts of the request URL explicitly." )
3848        protected StringType params;
3849
3850        /**
3851         * Header elements would be used to set HTTP headers.
3852         */
3853        @Child(name = "requestHeader", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3854        @Description(shortDefinition="Each operation can have one or more header elements", formalDefinition="Header elements would be used to set HTTP headers." )
3855        protected List<SetupActionOperationRequestHeaderComponent> requestHeader;
3856
3857        /**
3858         * The fixture id (maybe new) to map to the request.
3859         */
3860        @Child(name = "requestId", type = {IdType.class}, order=13, min=0, max=1, modifier=false, summary=false)
3861        @Description(shortDefinition="Fixture Id of mapped request", formalDefinition="The fixture id (maybe new) to map to the request." )
3862        protected IdType requestId;
3863
3864        /**
3865         * The fixture id (maybe new) to map to the response.
3866         */
3867        @Child(name = "responseId", type = {IdType.class}, order=14, min=0, max=1, modifier=false, summary=false)
3868        @Description(shortDefinition="Fixture Id of mapped response", formalDefinition="The fixture id (maybe new) to map to the response." )
3869        protected IdType responseId;
3870
3871        /**
3872         * The id of the fixture used as the body of a PUT or POST request.
3873         */
3874        @Child(name = "sourceId", type = {IdType.class}, order=15, min=0, max=1, modifier=false, summary=false)
3875        @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." )
3876        protected IdType sourceId;
3877
3878        /**
3879         * Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.
3880         */
3881        @Child(name = "targetId", type = {IdType.class}, order=16, min=0, max=1, modifier=false, summary=false)
3882        @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." )
3883        protected IdType targetId;
3884
3885        /**
3886         * Complete request URL.
3887         */
3888        @Child(name = "url", type = {StringType.class}, order=17, min=0, max=1, modifier=false, summary=false)
3889        @Description(shortDefinition="Request URL", formalDefinition="Complete request URL." )
3890        protected StringType url;
3891
3892        private static final long serialVersionUID = 300050202L;
3893
3894    /**
3895     * Constructor
3896     */
3897      public SetupActionOperationComponent() {
3898        super();
3899      }
3900
3901    /**
3902     * Constructor
3903     */
3904      public SetupActionOperationComponent(BooleanType encodeRequestUrl) {
3905        super();
3906        this.encodeRequestUrl = encodeRequestUrl;
3907      }
3908
3909        /**
3910         * @return {@link #type} (Server interaction or operation type.)
3911         */
3912        public Coding getType() { 
3913          if (this.type == null)
3914            if (Configuration.errorOnAutoCreate())
3915              throw new Error("Attempt to auto-create SetupActionOperationComponent.type");
3916            else if (Configuration.doAutoCreate())
3917              this.type = new Coding(); // cc
3918          return this.type;
3919        }
3920
3921        public boolean hasType() { 
3922          return this.type != null && !this.type.isEmpty();
3923        }
3924
3925        /**
3926         * @param value {@link #type} (Server interaction or operation type.)
3927         */
3928        public SetupActionOperationComponent setType(Coding value) { 
3929          this.type = value;
3930          return this;
3931        }
3932
3933        /**
3934         * @return {@link #resource} (The type of the resource.  See http://build.fhir.org/resourcelist.html.). This is the underlying object with id, value and extensions. The accessor "getResource" gives direct access to the value
3935         */
3936        public CodeType getResourceElement() { 
3937          if (this.resource == null)
3938            if (Configuration.errorOnAutoCreate())
3939              throw new Error("Attempt to auto-create SetupActionOperationComponent.resource");
3940            else if (Configuration.doAutoCreate())
3941              this.resource = new CodeType(); // bb
3942          return this.resource;
3943        }
3944
3945        public boolean hasResourceElement() { 
3946          return this.resource != null && !this.resource.isEmpty();
3947        }
3948
3949        public boolean hasResource() { 
3950          return this.resource != null && !this.resource.isEmpty();
3951        }
3952
3953        /**
3954         * @param value {@link #resource} (The type of the resource.  See http://build.fhir.org/resourcelist.html.). This is the underlying object with id, value and extensions. The accessor "getResource" gives direct access to the value
3955         */
3956        public SetupActionOperationComponent setResourceElement(CodeType value) { 
3957          this.resource = value;
3958          return this;
3959        }
3960
3961        /**
3962         * @return The type of the resource.  See http://build.fhir.org/resourcelist.html.
3963         */
3964        public String getResource() { 
3965          return this.resource == null ? null : this.resource.getValue();
3966        }
3967
3968        /**
3969         * @param value The type of the resource.  See http://build.fhir.org/resourcelist.html.
3970         */
3971        public SetupActionOperationComponent setResource(String value) { 
3972          if (Utilities.noString(value))
3973            this.resource = null;
3974          else {
3975            if (this.resource == null)
3976              this.resource = new CodeType();
3977            this.resource.setValue(value);
3978          }
3979          return this;
3980        }
3981
3982        /**
3983         * @return {@link #label} (The label would be used for tracking/logging purposes by test engines.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value
3984         */
3985        public StringType getLabelElement() { 
3986          if (this.label == null)
3987            if (Configuration.errorOnAutoCreate())
3988              throw new Error("Attempt to auto-create SetupActionOperationComponent.label");
3989            else if (Configuration.doAutoCreate())
3990              this.label = new StringType(); // bb
3991          return this.label;
3992        }
3993
3994        public boolean hasLabelElement() { 
3995          return this.label != null && !this.label.isEmpty();
3996        }
3997
3998        public boolean hasLabel() { 
3999          return this.label != null && !this.label.isEmpty();
4000        }
4001
4002        /**
4003         * @param value {@link #label} (The label would be used for tracking/logging purposes by test engines.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value
4004         */
4005        public SetupActionOperationComponent setLabelElement(StringType value) { 
4006          this.label = value;
4007          return this;
4008        }
4009
4010        /**
4011         * @return The label would be used for tracking/logging purposes by test engines.
4012         */
4013        public String getLabel() { 
4014          return this.label == null ? null : this.label.getValue();
4015        }
4016
4017        /**
4018         * @param value The label would be used for tracking/logging purposes by test engines.
4019         */
4020        public SetupActionOperationComponent setLabel(String value) { 
4021          if (Utilities.noString(value))
4022            this.label = null;
4023          else {
4024            if (this.label == null)
4025              this.label = new StringType();
4026            this.label.setValue(value);
4027          }
4028          return this;
4029        }
4030
4031        /**
4032         * @return {@link #description} (The description would be used by test engines for tracking and reporting purposes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
4033         */
4034        public StringType getDescriptionElement() { 
4035          if (this.description == null)
4036            if (Configuration.errorOnAutoCreate())
4037              throw new Error("Attempt to auto-create SetupActionOperationComponent.description");
4038            else if (Configuration.doAutoCreate())
4039              this.description = new StringType(); // bb
4040          return this.description;
4041        }
4042
4043        public boolean hasDescriptionElement() { 
4044          return this.description != null && !this.description.isEmpty();
4045        }
4046
4047        public boolean hasDescription() { 
4048          return this.description != null && !this.description.isEmpty();
4049        }
4050
4051        /**
4052         * @param value {@link #description} (The description would be used by test engines for tracking and reporting purposes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
4053         */
4054        public SetupActionOperationComponent setDescriptionElement(StringType value) { 
4055          this.description = value;
4056          return this;
4057        }
4058
4059        /**
4060         * @return The description would be used by test engines for tracking and reporting purposes.
4061         */
4062        public String getDescription() { 
4063          return this.description == null ? null : this.description.getValue();
4064        }
4065
4066        /**
4067         * @param value The description would be used by test engines for tracking and reporting purposes.
4068         */
4069        public SetupActionOperationComponent setDescription(String value) { 
4070          if (Utilities.noString(value))
4071            this.description = null;
4072          else {
4073            if (this.description == null)
4074              this.description = new StringType();
4075            this.description.setValue(value);
4076          }
4077          return this;
4078        }
4079
4080        /**
4081         * @return {@link #accept} (The mime-type to use for RESTful operation in the 'Accept' header.). This is the underlying object with id, value and extensions. The accessor "getAccept" gives direct access to the value
4082         */
4083        public CodeType getAcceptElement() { 
4084          if (this.accept == null)
4085            if (Configuration.errorOnAutoCreate())
4086              throw new Error("Attempt to auto-create SetupActionOperationComponent.accept");
4087            else if (Configuration.doAutoCreate())
4088              this.accept = new CodeType(); // bb
4089          return this.accept;
4090        }
4091
4092        public boolean hasAcceptElement() { 
4093          return this.accept != null && !this.accept.isEmpty();
4094        }
4095
4096        public boolean hasAccept() { 
4097          return this.accept != null && !this.accept.isEmpty();
4098        }
4099
4100        /**
4101         * @param value {@link #accept} (The mime-type to use for RESTful operation in the 'Accept' header.). This is the underlying object with id, value and extensions. The accessor "getAccept" gives direct access to the value
4102         */
4103        public SetupActionOperationComponent setAcceptElement(CodeType value) { 
4104          this.accept = value;
4105          return this;
4106        }
4107
4108        /**
4109         * @return The mime-type to use for RESTful operation in the 'Accept' header.
4110         */
4111        public String getAccept() { 
4112          return this.accept == null ? null : this.accept.getValue();
4113        }
4114
4115        /**
4116         * @param value The mime-type to use for RESTful operation in the 'Accept' header.
4117         */
4118        public SetupActionOperationComponent setAccept(String value) { 
4119          if (Utilities.noString(value))
4120            this.accept = null;
4121          else {
4122            if (this.accept == null)
4123              this.accept = new CodeType();
4124            this.accept.setValue(value);
4125          }
4126          return this;
4127        }
4128
4129        /**
4130         * @return {@link #contentType} (The mime-type to use for RESTful operation in the 'Content-Type' header.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value
4131         */
4132        public CodeType getContentTypeElement() { 
4133          if (this.contentType == null)
4134            if (Configuration.errorOnAutoCreate())
4135              throw new Error("Attempt to auto-create SetupActionOperationComponent.contentType");
4136            else if (Configuration.doAutoCreate())
4137              this.contentType = new CodeType(); // bb
4138          return this.contentType;
4139        }
4140
4141        public boolean hasContentTypeElement() { 
4142          return this.contentType != null && !this.contentType.isEmpty();
4143        }
4144
4145        public boolean hasContentType() { 
4146          return this.contentType != null && !this.contentType.isEmpty();
4147        }
4148
4149        /**
4150         * @param value {@link #contentType} (The mime-type to use for RESTful operation in the 'Content-Type' header.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value
4151         */
4152        public SetupActionOperationComponent setContentTypeElement(CodeType value) { 
4153          this.contentType = value;
4154          return this;
4155        }
4156
4157        /**
4158         * @return The mime-type to use for RESTful operation in the 'Content-Type' header.
4159         */
4160        public String getContentType() { 
4161          return this.contentType == null ? null : this.contentType.getValue();
4162        }
4163
4164        /**
4165         * @param value The mime-type to use for RESTful operation in the 'Content-Type' header.
4166         */
4167        public SetupActionOperationComponent setContentType(String value) { 
4168          if (Utilities.noString(value))
4169            this.contentType = null;
4170          else {
4171            if (this.contentType == null)
4172              this.contentType = new CodeType();
4173            this.contentType.setValue(value);
4174          }
4175          return this;
4176        }
4177
4178        /**
4179         * @return {@link #destination} (The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.). This is the underlying object with id, value and extensions. The accessor "getDestination" gives direct access to the value
4180         */
4181        public IntegerType getDestinationElement() { 
4182          if (this.destination == null)
4183            if (Configuration.errorOnAutoCreate())
4184              throw new Error("Attempt to auto-create SetupActionOperationComponent.destination");
4185            else if (Configuration.doAutoCreate())
4186              this.destination = new IntegerType(); // bb
4187          return this.destination;
4188        }
4189
4190        public boolean hasDestinationElement() { 
4191          return this.destination != null && !this.destination.isEmpty();
4192        }
4193
4194        public boolean hasDestination() { 
4195          return this.destination != null && !this.destination.isEmpty();
4196        }
4197
4198        /**
4199         * @param value {@link #destination} (The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.). This is the underlying object with id, value and extensions. The accessor "getDestination" gives direct access to the value
4200         */
4201        public SetupActionOperationComponent setDestinationElement(IntegerType value) { 
4202          this.destination = value;
4203          return this;
4204        }
4205
4206        /**
4207         * @return The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.
4208         */
4209        public int getDestination() { 
4210          return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue();
4211        }
4212
4213        /**
4214         * @param value The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.
4215         */
4216        public SetupActionOperationComponent setDestination(int value) { 
4217            if (this.destination == null)
4218              this.destination = new IntegerType();
4219            this.destination.setValue(value);
4220          return this;
4221        }
4222
4223        /**
4224         * @return {@link #encodeRequestUrl} (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.). This is the underlying object with id, value and extensions. The accessor "getEncodeRequestUrl" gives direct access to the value
4225         */
4226        public BooleanType getEncodeRequestUrlElement() { 
4227          if (this.encodeRequestUrl == null)
4228            if (Configuration.errorOnAutoCreate())
4229              throw new Error("Attempt to auto-create SetupActionOperationComponent.encodeRequestUrl");
4230            else if (Configuration.doAutoCreate())
4231              this.encodeRequestUrl = new BooleanType(); // bb
4232          return this.encodeRequestUrl;
4233        }
4234
4235        public boolean hasEncodeRequestUrlElement() { 
4236          return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty();
4237        }
4238
4239        public boolean hasEncodeRequestUrl() { 
4240          return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty();
4241        }
4242
4243        /**
4244         * @param value {@link #encodeRequestUrl} (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.). This is the underlying object with id, value and extensions. The accessor "getEncodeRequestUrl" gives direct access to the value
4245         */
4246        public SetupActionOperationComponent setEncodeRequestUrlElement(BooleanType value) { 
4247          this.encodeRequestUrl = value;
4248          return this;
4249        }
4250
4251        /**
4252         * @return 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.
4253         */
4254        public boolean getEncodeRequestUrl() { 
4255          return this.encodeRequestUrl == null || this.encodeRequestUrl.isEmpty() ? false : this.encodeRequestUrl.getValue();
4256        }
4257
4258        /**
4259         * @param value 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.
4260         */
4261        public SetupActionOperationComponent setEncodeRequestUrl(boolean value) { 
4262            if (this.encodeRequestUrl == null)
4263              this.encodeRequestUrl = new BooleanType();
4264            this.encodeRequestUrl.setValue(value);
4265          return this;
4266        }
4267
4268        /**
4269         * @return {@link #method} (The HTTP method the test engine MUST use for this operation regardless of any other operation details.). This is the underlying object with id, value and extensions. The accessor "getMethod" gives direct access to the value
4270         */
4271        public Enumeration<TestScriptRequestMethodCode> getMethodElement() { 
4272          if (this.method == null)
4273            if (Configuration.errorOnAutoCreate())
4274              throw new Error("Attempt to auto-create SetupActionOperationComponent.method");
4275            else if (Configuration.doAutoCreate())
4276              this.method = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory()); // bb
4277          return this.method;
4278        }
4279
4280        public boolean hasMethodElement() { 
4281          return this.method != null && !this.method.isEmpty();
4282        }
4283
4284        public boolean hasMethod() { 
4285          return this.method != null && !this.method.isEmpty();
4286        }
4287
4288        /**
4289         * @param value {@link #method} (The HTTP method the test engine MUST use for this operation regardless of any other operation details.). This is the underlying object with id, value and extensions. The accessor "getMethod" gives direct access to the value
4290         */
4291        public SetupActionOperationComponent setMethodElement(Enumeration<TestScriptRequestMethodCode> value) { 
4292          this.method = value;
4293          return this;
4294        }
4295
4296        /**
4297         * @return The HTTP method the test engine MUST use for this operation regardless of any other operation details.
4298         */
4299        public TestScriptRequestMethodCode getMethod() { 
4300          return this.method == null ? null : this.method.getValue();
4301        }
4302
4303        /**
4304         * @param value The HTTP method the test engine MUST use for this operation regardless of any other operation details.
4305         */
4306        public SetupActionOperationComponent setMethod(TestScriptRequestMethodCode value) { 
4307          if (value == null)
4308            this.method = null;
4309          else {
4310            if (this.method == null)
4311              this.method = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory());
4312            this.method.setValue(value);
4313          }
4314          return this;
4315        }
4316
4317        /**
4318         * @return {@link #origin} (The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.). This is the underlying object with id, value and extensions. The accessor "getOrigin" gives direct access to the value
4319         */
4320        public IntegerType getOriginElement() { 
4321          if (this.origin == null)
4322            if (Configuration.errorOnAutoCreate())
4323              throw new Error("Attempt to auto-create SetupActionOperationComponent.origin");
4324            else if (Configuration.doAutoCreate())
4325              this.origin = new IntegerType(); // bb
4326          return this.origin;
4327        }
4328
4329        public boolean hasOriginElement() { 
4330          return this.origin != null && !this.origin.isEmpty();
4331        }
4332
4333        public boolean hasOrigin() { 
4334          return this.origin != null && !this.origin.isEmpty();
4335        }
4336
4337        /**
4338         * @param value {@link #origin} (The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.). This is the underlying object with id, value and extensions. The accessor "getOrigin" gives direct access to the value
4339         */
4340        public SetupActionOperationComponent setOriginElement(IntegerType value) { 
4341          this.origin = value;
4342          return this;
4343        }
4344
4345        /**
4346         * @return The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.
4347         */
4348        public int getOrigin() { 
4349          return this.origin == null || this.origin.isEmpty() ? 0 : this.origin.getValue();
4350        }
4351
4352        /**
4353         * @param value The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.
4354         */
4355        public SetupActionOperationComponent setOrigin(int value) { 
4356            if (this.origin == null)
4357              this.origin = new IntegerType();
4358            this.origin.setValue(value);
4359          return this;
4360        }
4361
4362        /**
4363         * @return {@link #params} (Path plus parameters after [type].  Used to set parts of the request URL explicitly.). This is the underlying object with id, value and extensions. The accessor "getParams" gives direct access to the value
4364         */
4365        public StringType getParamsElement() { 
4366          if (this.params == null)
4367            if (Configuration.errorOnAutoCreate())
4368              throw new Error("Attempt to auto-create SetupActionOperationComponent.params");
4369            else if (Configuration.doAutoCreate())
4370              this.params = new StringType(); // bb
4371          return this.params;
4372        }
4373
4374        public boolean hasParamsElement() { 
4375          return this.params != null && !this.params.isEmpty();
4376        }
4377
4378        public boolean hasParams() { 
4379          return this.params != null && !this.params.isEmpty();
4380        }
4381
4382        /**
4383         * @param value {@link #params} (Path plus parameters after [type].  Used to set parts of the request URL explicitly.). This is the underlying object with id, value and extensions. The accessor "getParams" gives direct access to the value
4384         */
4385        public SetupActionOperationComponent setParamsElement(StringType value) { 
4386          this.params = value;
4387          return this;
4388        }
4389
4390        /**
4391         * @return Path plus parameters after [type].  Used to set parts of the request URL explicitly.
4392         */
4393        public String getParams() { 
4394          return this.params == null ? null : this.params.getValue();
4395        }
4396
4397        /**
4398         * @param value Path plus parameters after [type].  Used to set parts of the request URL explicitly.
4399         */
4400        public SetupActionOperationComponent setParams(String value) { 
4401          if (Utilities.noString(value))
4402            this.params = null;
4403          else {
4404            if (this.params == null)
4405              this.params = new StringType();
4406            this.params.setValue(value);
4407          }
4408          return this;
4409        }
4410
4411        /**
4412         * @return {@link #requestHeader} (Header elements would be used to set HTTP headers.)
4413         */
4414        public List<SetupActionOperationRequestHeaderComponent> getRequestHeader() { 
4415          if (this.requestHeader == null)
4416            this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
4417          return this.requestHeader;
4418        }
4419
4420        /**
4421         * @return Returns a reference to <code>this</code> for easy method chaining
4422         */
4423        public SetupActionOperationComponent setRequestHeader(List<SetupActionOperationRequestHeaderComponent> theRequestHeader) { 
4424          this.requestHeader = theRequestHeader;
4425          return this;
4426        }
4427
4428        public boolean hasRequestHeader() { 
4429          if (this.requestHeader == null)
4430            return false;
4431          for (SetupActionOperationRequestHeaderComponent item : this.requestHeader)
4432            if (!item.isEmpty())
4433              return true;
4434          return false;
4435        }
4436
4437        public SetupActionOperationRequestHeaderComponent addRequestHeader() { //3
4438          SetupActionOperationRequestHeaderComponent t = new SetupActionOperationRequestHeaderComponent();
4439          if (this.requestHeader == null)
4440            this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
4441          this.requestHeader.add(t);
4442          return t;
4443        }
4444
4445        public SetupActionOperationComponent addRequestHeader(SetupActionOperationRequestHeaderComponent t) { //3
4446          if (t == null)
4447            return this;
4448          if (this.requestHeader == null)
4449            this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
4450          this.requestHeader.add(t);
4451          return this;
4452        }
4453
4454        /**
4455         * @return The first repetition of repeating field {@link #requestHeader}, creating it if it does not already exist
4456         */
4457        public SetupActionOperationRequestHeaderComponent getRequestHeaderFirstRep() { 
4458          if (getRequestHeader().isEmpty()) {
4459            addRequestHeader();
4460          }
4461          return getRequestHeader().get(0);
4462        }
4463
4464        /**
4465         * @return {@link #requestId} (The fixture id (maybe new) to map to the request.). This is the underlying object with id, value and extensions. The accessor "getRequestId" gives direct access to the value
4466         */
4467        public IdType getRequestIdElement() { 
4468          if (this.requestId == null)
4469            if (Configuration.errorOnAutoCreate())
4470              throw new Error("Attempt to auto-create SetupActionOperationComponent.requestId");
4471            else if (Configuration.doAutoCreate())
4472              this.requestId = new IdType(); // bb
4473          return this.requestId;
4474        }
4475
4476        public boolean hasRequestIdElement() { 
4477          return this.requestId != null && !this.requestId.isEmpty();
4478        }
4479
4480        public boolean hasRequestId() { 
4481          return this.requestId != null && !this.requestId.isEmpty();
4482        }
4483
4484        /**
4485         * @param value {@link #requestId} (The fixture id (maybe new) to map to the request.). This is the underlying object with id, value and extensions. The accessor "getRequestId" gives direct access to the value
4486         */
4487        public SetupActionOperationComponent setRequestIdElement(IdType value) { 
4488          this.requestId = value;
4489          return this;
4490        }
4491
4492        /**
4493         * @return The fixture id (maybe new) to map to the request.
4494         */
4495        public String getRequestId() { 
4496          return this.requestId == null ? null : this.requestId.getValue();
4497        }
4498
4499        /**
4500         * @param value The fixture id (maybe new) to map to the request.
4501         */
4502        public SetupActionOperationComponent setRequestId(String value) { 
4503          if (Utilities.noString(value))
4504            this.requestId = null;
4505          else {
4506            if (this.requestId == null)
4507              this.requestId = new IdType();
4508            this.requestId.setValue(value);
4509          }
4510          return this;
4511        }
4512
4513        /**
4514         * @return {@link #responseId} (The fixture id (maybe new) to map to the response.). This is the underlying object with id, value and extensions. The accessor "getResponseId" gives direct access to the value
4515         */
4516        public IdType getResponseIdElement() { 
4517          if (this.responseId == null)
4518            if (Configuration.errorOnAutoCreate())
4519              throw new Error("Attempt to auto-create SetupActionOperationComponent.responseId");
4520            else if (Configuration.doAutoCreate())
4521              this.responseId = new IdType(); // bb
4522          return this.responseId;
4523        }
4524
4525        public boolean hasResponseIdElement() { 
4526          return this.responseId != null && !this.responseId.isEmpty();
4527        }
4528
4529        public boolean hasResponseId() { 
4530          return this.responseId != null && !this.responseId.isEmpty();
4531        }
4532
4533        /**
4534         * @param value {@link #responseId} (The fixture id (maybe new) to map to the response.). This is the underlying object with id, value and extensions. The accessor "getResponseId" gives direct access to the value
4535         */
4536        public SetupActionOperationComponent setResponseIdElement(IdType value) { 
4537          this.responseId = value;
4538          return this;
4539        }
4540
4541        /**
4542         * @return The fixture id (maybe new) to map to the response.
4543         */
4544        public String getResponseId() { 
4545          return this.responseId == null ? null : this.responseId.getValue();
4546        }
4547
4548        /**
4549         * @param value The fixture id (maybe new) to map to the response.
4550         */
4551        public SetupActionOperationComponent setResponseId(String value) { 
4552          if (Utilities.noString(value))
4553            this.responseId = null;
4554          else {
4555            if (this.responseId == null)
4556              this.responseId = new IdType();
4557            this.responseId.setValue(value);
4558          }
4559          return this;
4560        }
4561
4562        /**
4563         * @return {@link #sourceId} (The id of the fixture used as the body of a PUT or POST request.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value
4564         */
4565        public IdType getSourceIdElement() { 
4566          if (this.sourceId == null)
4567            if (Configuration.errorOnAutoCreate())
4568              throw new Error("Attempt to auto-create SetupActionOperationComponent.sourceId");
4569            else if (Configuration.doAutoCreate())
4570              this.sourceId = new IdType(); // bb
4571          return this.sourceId;
4572        }
4573
4574        public boolean hasSourceIdElement() { 
4575          return this.sourceId != null && !this.sourceId.isEmpty();
4576        }
4577
4578        public boolean hasSourceId() { 
4579          return this.sourceId != null && !this.sourceId.isEmpty();
4580        }
4581
4582        /**
4583         * @param value {@link #sourceId} (The id of the fixture used as the body of a PUT or POST request.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value
4584         */
4585        public SetupActionOperationComponent setSourceIdElement(IdType value) { 
4586          this.sourceId = value;
4587          return this;
4588        }
4589
4590        /**
4591         * @return The id of the fixture used as the body of a PUT or POST request.
4592         */
4593        public String getSourceId() { 
4594          return this.sourceId == null ? null : this.sourceId.getValue();
4595        }
4596
4597        /**
4598         * @param value The id of the fixture used as the body of a PUT or POST request.
4599         */
4600        public SetupActionOperationComponent setSourceId(String value) { 
4601          if (Utilities.noString(value))
4602            this.sourceId = null;
4603          else {
4604            if (this.sourceId == null)
4605              this.sourceId = new IdType();
4606            this.sourceId.setValue(value);
4607          }
4608          return this;
4609        }
4610
4611        /**
4612         * @return {@link #targetId} (Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.). This is the underlying object with id, value and extensions. The accessor "getTargetId" gives direct access to the value
4613         */
4614        public IdType getTargetIdElement() { 
4615          if (this.targetId == null)
4616            if (Configuration.errorOnAutoCreate())
4617              throw new Error("Attempt to auto-create SetupActionOperationComponent.targetId");
4618            else if (Configuration.doAutoCreate())
4619              this.targetId = new IdType(); // bb
4620          return this.targetId;
4621        }
4622
4623        public boolean hasTargetIdElement() { 
4624          return this.targetId != null && !this.targetId.isEmpty();
4625        }
4626
4627        public boolean hasTargetId() { 
4628          return this.targetId != null && !this.targetId.isEmpty();
4629        }
4630
4631        /**
4632         * @param value {@link #targetId} (Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.). This is the underlying object with id, value and extensions. The accessor "getTargetId" gives direct access to the value
4633         */
4634        public SetupActionOperationComponent setTargetIdElement(IdType value) { 
4635          this.targetId = value;
4636          return this;
4637        }
4638
4639        /**
4640         * @return Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.
4641         */
4642        public String getTargetId() { 
4643          return this.targetId == null ? null : this.targetId.getValue();
4644        }
4645
4646        /**
4647         * @param value Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.
4648         */
4649        public SetupActionOperationComponent setTargetId(String value) { 
4650          if (Utilities.noString(value))
4651            this.targetId = null;
4652          else {
4653            if (this.targetId == null)
4654              this.targetId = new IdType();
4655            this.targetId.setValue(value);
4656          }
4657          return this;
4658        }
4659
4660        /**
4661         * @return {@link #url} (Complete request URL.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
4662         */
4663        public StringType getUrlElement() { 
4664          if (this.url == null)
4665            if (Configuration.errorOnAutoCreate())
4666              throw new Error("Attempt to auto-create SetupActionOperationComponent.url");
4667            else if (Configuration.doAutoCreate())
4668              this.url = new StringType(); // bb
4669          return this.url;
4670        }
4671
4672        public boolean hasUrlElement() { 
4673          return this.url != null && !this.url.isEmpty();
4674        }
4675
4676        public boolean hasUrl() { 
4677          return this.url != null && !this.url.isEmpty();
4678        }
4679
4680        /**
4681         * @param value {@link #url} (Complete request URL.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
4682         */
4683        public SetupActionOperationComponent setUrlElement(StringType value) { 
4684          this.url = value;
4685          return this;
4686        }
4687
4688        /**
4689         * @return Complete request URL.
4690         */
4691        public String getUrl() { 
4692          return this.url == null ? null : this.url.getValue();
4693        }
4694
4695        /**
4696         * @param value Complete request URL.
4697         */
4698        public SetupActionOperationComponent setUrl(String value) { 
4699          if (Utilities.noString(value))
4700            this.url = null;
4701          else {
4702            if (this.url == null)
4703              this.url = new StringType();
4704            this.url.setValue(value);
4705          }
4706          return this;
4707        }
4708
4709        protected void listChildren(List<Property> children) {
4710          super.listChildren(children);
4711          children.add(new Property("type", "Coding", "Server interaction or operation type.", 0, 1, type));
4712          children.add(new Property("resource", "code", "The type of the resource.  See http://build.fhir.org/resourcelist.html.", 0, 1, resource));
4713          children.add(new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label));
4714          children.add(new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description));
4715          children.add(new Property("accept", "code", "The mime-type to use for RESTful operation in the 'Accept' header.", 0, 1, accept));
4716          children.add(new Property("contentType", "code", "The mime-type to use for RESTful operation in the 'Content-Type' header.", 0, 1, contentType));
4717          children.add(new Property("destination", "integer", "The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.", 0, 1, destination));
4718          children.add(new Property("encodeRequestUrl", "boolean", "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.", 0, 1, encodeRequestUrl));
4719          children.add(new Property("method", "code", "The HTTP method the test engine MUST use for this operation regardless of any other operation details.", 0, 1, method));
4720          children.add(new Property("origin", "integer", "The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.", 0, 1, origin));
4721          children.add(new Property("params", "string", "Path plus parameters after [type].  Used to set parts of the request URL explicitly.", 0, 1, params));
4722          children.add(new Property("requestHeader", "", "Header elements would be used to set HTTP headers.", 0, java.lang.Integer.MAX_VALUE, requestHeader));
4723          children.add(new Property("requestId", "id", "The fixture id (maybe new) to map to the request.", 0, 1, requestId));
4724          children.add(new Property("responseId", "id", "The fixture id (maybe new) to map to the response.", 0, 1, responseId));
4725          children.add(new Property("sourceId", "id", "The id of the fixture used as the body of a PUT or POST request.", 0, 1, sourceId));
4726          children.add(new Property("targetId", "id", "Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.", 0, 1, targetId));
4727          children.add(new Property("url", "string", "Complete request URL.", 0, 1, url));
4728        }
4729
4730        @Override
4731        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4732          switch (_hash) {
4733          case 3575610: /*type*/  return new Property("type", "Coding", "Server interaction or operation type.", 0, 1, type);
4734          case -341064690: /*resource*/  return new Property("resource", "code", "The type of the resource.  See http://build.fhir.org/resourcelist.html.", 0, 1, resource);
4735          case 102727412: /*label*/  return new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label);
4736          case -1724546052: /*description*/  return new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description);
4737          case -1423461112: /*accept*/  return new Property("accept", "code", "The mime-type to use for RESTful operation in the 'Accept' header.", 0, 1, accept);
4738          case -389131437: /*contentType*/  return new Property("contentType", "code", "The mime-type to use for RESTful operation in the 'Content-Type' header.", 0, 1, contentType);
4739          case -1429847026: /*destination*/  return new Property("destination", "integer", "The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.", 0, 1, destination);
4740          case -1760554218: /*encodeRequestUrl*/  return new Property("encodeRequestUrl", "boolean", "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.", 0, 1, encodeRequestUrl);
4741          case -1077554975: /*method*/  return new Property("method", "code", "The HTTP method the test engine MUST use for this operation regardless of any other operation details.", 0, 1, method);
4742          case -1008619738: /*origin*/  return new Property("origin", "integer", "The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.", 0, 1, origin);
4743          case -995427962: /*params*/  return new Property("params", "string", "Path plus parameters after [type].  Used to set parts of the request URL explicitly.", 0, 1, params);
4744          case 1074158076: /*requestHeader*/  return new Property("requestHeader", "", "Header elements would be used to set HTTP headers.", 0, java.lang.Integer.MAX_VALUE, requestHeader);
4745          case 693933066: /*requestId*/  return new Property("requestId", "id", "The fixture id (maybe new) to map to the request.", 0, 1, requestId);
4746          case -633138884: /*responseId*/  return new Property("responseId", "id", "The fixture id (maybe new) to map to the response.", 0, 1, responseId);
4747          case 1746327190: /*sourceId*/  return new Property("sourceId", "id", "The id of the fixture used as the body of a PUT or POST request.", 0, 1, sourceId);
4748          case -441951604: /*targetId*/  return new Property("targetId", "id", "Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.", 0, 1, targetId);
4749          case 116079: /*url*/  return new Property("url", "string", "Complete request URL.", 0, 1, url);
4750          default: return super.getNamedProperty(_hash, _name, _checkValid);
4751          }
4752
4753        }
4754
4755      @Override
4756      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4757        switch (hash) {
4758        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding
4759        case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // CodeType
4760        case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType
4761        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
4762        case -1423461112: /*accept*/ return this.accept == null ? new Base[0] : new Base[] {this.accept}; // CodeType
4763        case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // CodeType
4764        case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // IntegerType
4765        case -1760554218: /*encodeRequestUrl*/ return this.encodeRequestUrl == null ? new Base[0] : new Base[] {this.encodeRequestUrl}; // BooleanType
4766        case -1077554975: /*method*/ return this.method == null ? new Base[0] : new Base[] {this.method}; // Enumeration<TestScriptRequestMethodCode>
4767        case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : new Base[] {this.origin}; // IntegerType
4768        case -995427962: /*params*/ return this.params == null ? new Base[0] : new Base[] {this.params}; // StringType
4769        case 1074158076: /*requestHeader*/ return this.requestHeader == null ? new Base[0] : this.requestHeader.toArray(new Base[this.requestHeader.size()]); // SetupActionOperationRequestHeaderComponent
4770        case 693933066: /*requestId*/ return this.requestId == null ? new Base[0] : new Base[] {this.requestId}; // IdType
4771        case -633138884: /*responseId*/ return this.responseId == null ? new Base[0] : new Base[] {this.responseId}; // IdType
4772        case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType
4773        case -441951604: /*targetId*/ return this.targetId == null ? new Base[0] : new Base[] {this.targetId}; // IdType
4774        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // StringType
4775        default: return super.getProperty(hash, name, checkValid);
4776        }
4777
4778      }
4779
4780      @Override
4781      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4782        switch (hash) {
4783        case 3575610: // type
4784          this.type = castToCoding(value); // Coding
4785          return value;
4786        case -341064690: // resource
4787          this.resource = castToCode(value); // CodeType
4788          return value;
4789        case 102727412: // label
4790          this.label = castToString(value); // StringType
4791          return value;
4792        case -1724546052: // description
4793          this.description = castToString(value); // StringType
4794          return value;
4795        case -1423461112: // accept
4796          this.accept = castToCode(value); // CodeType
4797          return value;
4798        case -389131437: // contentType
4799          this.contentType = castToCode(value); // CodeType
4800          return value;
4801        case -1429847026: // destination
4802          this.destination = castToInteger(value); // IntegerType
4803          return value;
4804        case -1760554218: // encodeRequestUrl
4805          this.encodeRequestUrl = castToBoolean(value); // BooleanType
4806          return value;
4807        case -1077554975: // method
4808          value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value));
4809          this.method = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode>
4810          return value;
4811        case -1008619738: // origin
4812          this.origin = castToInteger(value); // IntegerType
4813          return value;
4814        case -995427962: // params
4815          this.params = castToString(value); // StringType
4816          return value;
4817        case 1074158076: // requestHeader
4818          this.getRequestHeader().add((SetupActionOperationRequestHeaderComponent) value); // SetupActionOperationRequestHeaderComponent
4819          return value;
4820        case 693933066: // requestId
4821          this.requestId = castToId(value); // IdType
4822          return value;
4823        case -633138884: // responseId
4824          this.responseId = castToId(value); // IdType
4825          return value;
4826        case 1746327190: // sourceId
4827          this.sourceId = castToId(value); // IdType
4828          return value;
4829        case -441951604: // targetId
4830          this.targetId = castToId(value); // IdType
4831          return value;
4832        case 116079: // url
4833          this.url = castToString(value); // StringType
4834          return value;
4835        default: return super.setProperty(hash, name, value);
4836        }
4837
4838      }
4839
4840      @Override
4841      public Base setProperty(String name, Base value) throws FHIRException {
4842        if (name.equals("type")) {
4843          this.type = castToCoding(value); // Coding
4844        } else if (name.equals("resource")) {
4845          this.resource = castToCode(value); // CodeType
4846        } else if (name.equals("label")) {
4847          this.label = castToString(value); // StringType
4848        } else if (name.equals("description")) {
4849          this.description = castToString(value); // StringType
4850        } else if (name.equals("accept")) {
4851          this.accept = castToCode(value); // CodeType
4852        } else if (name.equals("contentType")) {
4853          this.contentType = castToCode(value); // CodeType
4854        } else if (name.equals("destination")) {
4855          this.destination = castToInteger(value); // IntegerType
4856        } else if (name.equals("encodeRequestUrl")) {
4857          this.encodeRequestUrl = castToBoolean(value); // BooleanType
4858        } else if (name.equals("method")) {
4859          value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value));
4860          this.method = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode>
4861        } else if (name.equals("origin")) {
4862          this.origin = castToInteger(value); // IntegerType
4863        } else if (name.equals("params")) {
4864          this.params = castToString(value); // StringType
4865        } else if (name.equals("requestHeader")) {
4866          this.getRequestHeader().add((SetupActionOperationRequestHeaderComponent) value);
4867        } else if (name.equals("requestId")) {
4868          this.requestId = castToId(value); // IdType
4869        } else if (name.equals("responseId")) {
4870          this.responseId = castToId(value); // IdType
4871        } else if (name.equals("sourceId")) {
4872          this.sourceId = castToId(value); // IdType
4873        } else if (name.equals("targetId")) {
4874          this.targetId = castToId(value); // IdType
4875        } else if (name.equals("url")) {
4876          this.url = castToString(value); // StringType
4877        } else
4878          return super.setProperty(name, value);
4879        return value;
4880      }
4881
4882      @Override
4883      public Base makeProperty(int hash, String name) throws FHIRException {
4884        switch (hash) {
4885        case 3575610:  return getType(); 
4886        case -341064690:  return getResourceElement();
4887        case 102727412:  return getLabelElement();
4888        case -1724546052:  return getDescriptionElement();
4889        case -1423461112:  return getAcceptElement();
4890        case -389131437:  return getContentTypeElement();
4891        case -1429847026:  return getDestinationElement();
4892        case -1760554218:  return getEncodeRequestUrlElement();
4893        case -1077554975:  return getMethodElement();
4894        case -1008619738:  return getOriginElement();
4895        case -995427962:  return getParamsElement();
4896        case 1074158076:  return addRequestHeader(); 
4897        case 693933066:  return getRequestIdElement();
4898        case -633138884:  return getResponseIdElement();
4899        case 1746327190:  return getSourceIdElement();
4900        case -441951604:  return getTargetIdElement();
4901        case 116079:  return getUrlElement();
4902        default: return super.makeProperty(hash, name);
4903        }
4904
4905      }
4906
4907      @Override
4908      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4909        switch (hash) {
4910        case 3575610: /*type*/ return new String[] {"Coding"};
4911        case -341064690: /*resource*/ return new String[] {"code"};
4912        case 102727412: /*label*/ return new String[] {"string"};
4913        case -1724546052: /*description*/ return new String[] {"string"};
4914        case -1423461112: /*accept*/ return new String[] {"code"};
4915        case -389131437: /*contentType*/ return new String[] {"code"};
4916        case -1429847026: /*destination*/ return new String[] {"integer"};
4917        case -1760554218: /*encodeRequestUrl*/ return new String[] {"boolean"};
4918        case -1077554975: /*method*/ return new String[] {"code"};
4919        case -1008619738: /*origin*/ return new String[] {"integer"};
4920        case -995427962: /*params*/ return new String[] {"string"};
4921        case 1074158076: /*requestHeader*/ return new String[] {};
4922        case 693933066: /*requestId*/ return new String[] {"id"};
4923        case -633138884: /*responseId*/ return new String[] {"id"};
4924        case 1746327190: /*sourceId*/ return new String[] {"id"};
4925        case -441951604: /*targetId*/ return new String[] {"id"};
4926        case 116079: /*url*/ return new String[] {"string"};
4927        default: return super.getTypesForProperty(hash, name);
4928        }
4929
4930      }
4931
4932      @Override
4933      public Base addChild(String name) throws FHIRException {
4934        if (name.equals("type")) {
4935          this.type = new Coding();
4936          return this.type;
4937        }
4938        else if (name.equals("resource")) {
4939          throw new FHIRException("Cannot call addChild on a primitive type TestScript.resource");
4940        }
4941        else if (name.equals("label")) {
4942          throw new FHIRException("Cannot call addChild on a primitive type TestScript.label");
4943        }
4944        else if (name.equals("description")) {
4945          throw new FHIRException("Cannot call addChild on a primitive type TestScript.description");
4946        }
4947        else if (name.equals("accept")) {
4948          throw new FHIRException("Cannot call addChild on a primitive type TestScript.accept");
4949        }
4950        else if (name.equals("contentType")) {
4951          throw new FHIRException("Cannot call addChild on a primitive type TestScript.contentType");
4952        }
4953        else if (name.equals("destination")) {
4954          throw new FHIRException("Cannot call addChild on a primitive type TestScript.destination");
4955        }
4956        else if (name.equals("encodeRequestUrl")) {
4957          throw new FHIRException("Cannot call addChild on a primitive type TestScript.encodeRequestUrl");
4958        }
4959        else if (name.equals("method")) {
4960          throw new FHIRException("Cannot call addChild on a primitive type TestScript.method");
4961        }
4962        else if (name.equals("origin")) {
4963          throw new FHIRException("Cannot call addChild on a primitive type TestScript.origin");
4964        }
4965        else if (name.equals("params")) {
4966          throw new FHIRException("Cannot call addChild on a primitive type TestScript.params");
4967        }
4968        else if (name.equals("requestHeader")) {
4969          return addRequestHeader();
4970        }
4971        else if (name.equals("requestId")) {
4972          throw new FHIRException("Cannot call addChild on a primitive type TestScript.requestId");
4973        }
4974        else if (name.equals("responseId")) {
4975          throw new FHIRException("Cannot call addChild on a primitive type TestScript.responseId");
4976        }
4977        else if (name.equals("sourceId")) {
4978          throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId");
4979        }
4980        else if (name.equals("targetId")) {
4981          throw new FHIRException("Cannot call addChild on a primitive type TestScript.targetId");
4982        }
4983        else if (name.equals("url")) {
4984          throw new FHIRException("Cannot call addChild on a primitive type TestScript.url");
4985        }
4986        else
4987          return super.addChild(name);
4988      }
4989
4990      public SetupActionOperationComponent copy() {
4991        SetupActionOperationComponent dst = new SetupActionOperationComponent();
4992        copyValues(dst);
4993        dst.type = type == null ? null : type.copy();
4994        dst.resource = resource == null ? null : resource.copy();
4995        dst.label = label == null ? null : label.copy();
4996        dst.description = description == null ? null : description.copy();
4997        dst.accept = accept == null ? null : accept.copy();
4998        dst.contentType = contentType == null ? null : contentType.copy();
4999        dst.destination = destination == null ? null : destination.copy();
5000        dst.encodeRequestUrl = encodeRequestUrl == null ? null : encodeRequestUrl.copy();
5001        dst.method = method == null ? null : method.copy();
5002        dst.origin = origin == null ? null : origin.copy();
5003        dst.params = params == null ? null : params.copy();
5004        if (requestHeader != null) {
5005          dst.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
5006          for (SetupActionOperationRequestHeaderComponent i : requestHeader)
5007            dst.requestHeader.add(i.copy());
5008        };
5009        dst.requestId = requestId == null ? null : requestId.copy();
5010        dst.responseId = responseId == null ? null : responseId.copy();
5011        dst.sourceId = sourceId == null ? null : sourceId.copy();
5012        dst.targetId = targetId == null ? null : targetId.copy();
5013        dst.url = url == null ? null : url.copy();
5014        return dst;
5015      }
5016
5017      @Override
5018      public boolean equalsDeep(Base other_) {
5019        if (!super.equalsDeep(other_))
5020          return false;
5021        if (!(other_ instanceof SetupActionOperationComponent))
5022          return false;
5023        SetupActionOperationComponent o = (SetupActionOperationComponent) other_;
5024        return compareDeep(type, o.type, true) && compareDeep(resource, o.resource, true) && compareDeep(label, o.label, true)
5025           && compareDeep(description, o.description, true) && compareDeep(accept, o.accept, true) && compareDeep(contentType, o.contentType, true)
5026           && compareDeep(destination, o.destination, true) && compareDeep(encodeRequestUrl, o.encodeRequestUrl, true)
5027           && compareDeep(method, o.method, true) && compareDeep(origin, o.origin, true) && compareDeep(params, o.params, true)
5028           && compareDeep(requestHeader, o.requestHeader, true) && compareDeep(requestId, o.requestId, true)
5029           && compareDeep(responseId, o.responseId, true) && compareDeep(sourceId, o.sourceId, true) && compareDeep(targetId, o.targetId, true)
5030           && compareDeep(url, o.url, true);
5031      }
5032
5033      @Override
5034      public boolean equalsShallow(Base other_) {
5035        if (!super.equalsShallow(other_))
5036          return false;
5037        if (!(other_ instanceof SetupActionOperationComponent))
5038          return false;
5039        SetupActionOperationComponent o = (SetupActionOperationComponent) other_;
5040        return compareValues(resource, o.resource, true) && compareValues(label, o.label, true) && compareValues(description, o.description, true)
5041           && compareValues(accept, o.accept, true) && compareValues(contentType, o.contentType, true) && compareValues(destination, o.destination, true)
5042           && compareValues(encodeRequestUrl, o.encodeRequestUrl, true) && compareValues(method, o.method, true)
5043           && compareValues(origin, o.origin, true) && compareValues(params, o.params, true) && compareValues(requestId, o.requestId, true)
5044           && compareValues(responseId, o.responseId, true) && compareValues(sourceId, o.sourceId, true) && compareValues(targetId, o.targetId, true)
5045           && compareValues(url, o.url, true);
5046      }
5047
5048      public boolean isEmpty() {
5049        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, resource, label, description
5050          , accept, contentType, destination, encodeRequestUrl, method, origin, params, requestHeader
5051          , requestId, responseId, sourceId, targetId, url);
5052      }
5053
5054  public String fhirType() {
5055    return "TestScript.setup.action.operation";
5056
5057  }
5058
5059  }
5060
5061    @Block()
5062    public static class SetupActionOperationRequestHeaderComponent extends BackboneElement implements IBaseBackboneElement {
5063        /**
5064         * The HTTP header field e.g. "Accept".
5065         */
5066        @Child(name = "field", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
5067        @Description(shortDefinition="HTTP header field name", formalDefinition="The HTTP header field e.g. \"Accept\"." )
5068        protected StringType field;
5069
5070        /**
5071         * The value of the header e.g. "application/fhir+xml".
5072         */
5073        @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false)
5074        @Description(shortDefinition="HTTP headerfield value", formalDefinition="The value of the header e.g. \"application/fhir+xml\"." )
5075        protected StringType value;
5076
5077        private static final long serialVersionUID = 274395337L;
5078
5079    /**
5080     * Constructor
5081     */
5082      public SetupActionOperationRequestHeaderComponent() {
5083        super();
5084      }
5085
5086    /**
5087     * Constructor
5088     */
5089      public SetupActionOperationRequestHeaderComponent(StringType field, StringType value) {
5090        super();
5091        this.field = field;
5092        this.value = value;
5093      }
5094
5095        /**
5096         * @return {@link #field} (The HTTP header field e.g. "Accept".). This is the underlying object with id, value and extensions. The accessor "getField" gives direct access to the value
5097         */
5098        public StringType getFieldElement() { 
5099          if (this.field == null)
5100            if (Configuration.errorOnAutoCreate())
5101              throw new Error("Attempt to auto-create SetupActionOperationRequestHeaderComponent.field");
5102            else if (Configuration.doAutoCreate())
5103              this.field = new StringType(); // bb
5104          return this.field;
5105        }
5106
5107        public boolean hasFieldElement() { 
5108          return this.field != null && !this.field.isEmpty();
5109        }
5110
5111        public boolean hasField() { 
5112          return this.field != null && !this.field.isEmpty();
5113        }
5114
5115        /**
5116         * @param value {@link #field} (The HTTP header field e.g. "Accept".). This is the underlying object with id, value and extensions. The accessor "getField" gives direct access to the value
5117         */
5118        public SetupActionOperationRequestHeaderComponent setFieldElement(StringType value) { 
5119          this.field = value;
5120          return this;
5121        }
5122
5123        /**
5124         * @return The HTTP header field e.g. "Accept".
5125         */
5126        public String getField() { 
5127          return this.field == null ? null : this.field.getValue();
5128        }
5129
5130        /**
5131         * @param value The HTTP header field e.g. "Accept".
5132         */
5133        public SetupActionOperationRequestHeaderComponent setField(String value) { 
5134            if (this.field == null)
5135              this.field = new StringType();
5136            this.field.setValue(value);
5137          return this;
5138        }
5139
5140        /**
5141         * @return {@link #value} (The value of the header e.g. "application/fhir+xml".). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
5142         */
5143        public StringType getValueElement() { 
5144          if (this.value == null)
5145            if (Configuration.errorOnAutoCreate())
5146              throw new Error("Attempt to auto-create SetupActionOperationRequestHeaderComponent.value");
5147            else if (Configuration.doAutoCreate())
5148              this.value = new StringType(); // bb
5149          return this.value;
5150        }
5151
5152        public boolean hasValueElement() { 
5153          return this.value != null && !this.value.isEmpty();
5154        }
5155
5156        public boolean hasValue() { 
5157          return this.value != null && !this.value.isEmpty();
5158        }
5159
5160        /**
5161         * @param value {@link #value} (The value of the header e.g. "application/fhir+xml".). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
5162         */
5163        public SetupActionOperationRequestHeaderComponent setValueElement(StringType value) { 
5164          this.value = value;
5165          return this;
5166        }
5167
5168        /**
5169         * @return The value of the header e.g. "application/fhir+xml".
5170         */
5171        public String getValue() { 
5172          return this.value == null ? null : this.value.getValue();
5173        }
5174
5175        /**
5176         * @param value The value of the header e.g. "application/fhir+xml".
5177         */
5178        public SetupActionOperationRequestHeaderComponent setValue(String value) { 
5179            if (this.value == null)
5180              this.value = new StringType();
5181            this.value.setValue(value);
5182          return this;
5183        }
5184
5185        protected void listChildren(List<Property> children) {
5186          super.listChildren(children);
5187          children.add(new Property("field", "string", "The HTTP header field e.g. \"Accept\".", 0, 1, field));
5188          children.add(new Property("value", "string", "The value of the header e.g. \"application/fhir+xml\".", 0, 1, value));
5189        }
5190
5191        @Override
5192        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
5193          switch (_hash) {
5194          case 97427706: /*field*/  return new Property("field", "string", "The HTTP header field e.g. \"Accept\".", 0, 1, field);
5195          case 111972721: /*value*/  return new Property("value", "string", "The value of the header e.g. \"application/fhir+xml\".", 0, 1, value);
5196          default: return super.getNamedProperty(_hash, _name, _checkValid);
5197          }
5198
5199        }
5200
5201      @Override
5202      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
5203        switch (hash) {
5204        case 97427706: /*field*/ return this.field == null ? new Base[0] : new Base[] {this.field}; // StringType
5205        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType
5206        default: return super.getProperty(hash, name, checkValid);
5207        }
5208
5209      }
5210
5211      @Override
5212      public Base setProperty(int hash, String name, Base value) throws FHIRException {
5213        switch (hash) {
5214        case 97427706: // field
5215          this.field = castToString(value); // StringType
5216          return value;
5217        case 111972721: // value
5218          this.value = castToString(value); // StringType
5219          return value;
5220        default: return super.setProperty(hash, name, value);
5221        }
5222
5223      }
5224
5225      @Override
5226      public Base setProperty(String name, Base value) throws FHIRException {
5227        if (name.equals("field")) {
5228          this.field = castToString(value); // StringType
5229        } else if (name.equals("value")) {
5230          this.value = castToString(value); // StringType
5231        } else
5232          return super.setProperty(name, value);
5233        return value;
5234      }
5235
5236      @Override
5237      public Base makeProperty(int hash, String name) throws FHIRException {
5238        switch (hash) {
5239        case 97427706:  return getFieldElement();
5240        case 111972721:  return getValueElement();
5241        default: return super.makeProperty(hash, name);
5242        }
5243
5244      }
5245
5246      @Override
5247      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
5248        switch (hash) {
5249        case 97427706: /*field*/ return new String[] {"string"};
5250        case 111972721: /*value*/ return new String[] {"string"};
5251        default: return super.getTypesForProperty(hash, name);
5252        }
5253
5254      }
5255
5256      @Override
5257      public Base addChild(String name) throws FHIRException {
5258        if (name.equals("field")) {
5259          throw new FHIRException("Cannot call addChild on a primitive type TestScript.field");
5260        }
5261        else if (name.equals("value")) {
5262          throw new FHIRException("Cannot call addChild on a primitive type TestScript.value");
5263        }
5264        else
5265          return super.addChild(name);
5266      }
5267
5268      public SetupActionOperationRequestHeaderComponent copy() {
5269        SetupActionOperationRequestHeaderComponent dst = new SetupActionOperationRequestHeaderComponent();
5270        copyValues(dst);
5271        dst.field = field == null ? null : field.copy();
5272        dst.value = value == null ? null : value.copy();
5273        return dst;
5274      }
5275
5276      @Override
5277      public boolean equalsDeep(Base other_) {
5278        if (!super.equalsDeep(other_))
5279          return false;
5280        if (!(other_ instanceof SetupActionOperationRequestHeaderComponent))
5281          return false;
5282        SetupActionOperationRequestHeaderComponent o = (SetupActionOperationRequestHeaderComponent) other_;
5283        return compareDeep(field, o.field, true) && compareDeep(value, o.value, true);
5284      }
5285
5286      @Override
5287      public boolean equalsShallow(Base other_) {
5288        if (!super.equalsShallow(other_))
5289          return false;
5290        if (!(other_ instanceof SetupActionOperationRequestHeaderComponent))
5291          return false;
5292        SetupActionOperationRequestHeaderComponent o = (SetupActionOperationRequestHeaderComponent) other_;
5293        return compareValues(field, o.field, true) && compareValues(value, o.value, true);
5294      }
5295
5296      public boolean isEmpty() {
5297        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(field, value);
5298      }
5299
5300  public String fhirType() {
5301    return "TestScript.setup.action.operation.requestHeader";
5302
5303  }
5304
5305  }
5306
5307    @Block()
5308    public static class SetupActionAssertComponent extends BackboneElement implements IBaseBackboneElement {
5309        /**
5310         * The label would be used for tracking/logging purposes by test engines.
5311         */
5312        @Child(name = "label", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
5313        @Description(shortDefinition="Tracking/logging assertion label", formalDefinition="The label would be used for tracking/logging purposes by test engines." )
5314        protected StringType label;
5315
5316        /**
5317         * The description would be used by test engines for tracking and reporting purposes.
5318         */
5319        @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
5320        @Description(shortDefinition="Tracking/reporting assertion description", formalDefinition="The description would be used by test engines for tracking and reporting purposes." )
5321        protected StringType description;
5322
5323        /**
5324         * The direction to use for the assertion.
5325         */
5326        @Child(name = "direction", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=false)
5327        @Description(shortDefinition="response | request", formalDefinition="The direction to use for the assertion." )
5328        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/assert-direction-codes")
5329        protected Enumeration<AssertionDirectionType> direction;
5330
5331        /**
5332         * Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition.
5333         */
5334        @Child(name = "compareToSourceId", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
5335        @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." )
5336        protected StringType compareToSourceId;
5337
5338        /**
5339         * The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.
5340         */
5341        @Child(name = "compareToSourceExpression", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
5342        @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." )
5343        protected StringType compareToSourceExpression;
5344
5345        /**
5346         * XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.
5347         */
5348        @Child(name = "compareToSourcePath", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false)
5349        @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." )
5350        protected StringType compareToSourcePath;
5351
5352        /**
5353         * The mime-type contents to compare against the request or response message 'Content-Type' header.
5354         */
5355        @Child(name = "contentType", type = {CodeType.class}, order=7, min=0, max=1, modifier=false, summary=false)
5356        @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." )
5357        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/mimetypes")
5358        protected CodeType contentType;
5359
5360        /**
5361         * The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.
5362         */
5363        @Child(name = "expression", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false)
5364        @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." )
5365        protected StringType expression;
5366
5367        /**
5368         * The HTTP header field name e.g. 'Location'.
5369         */
5370        @Child(name = "headerField", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false)
5371        @Description(shortDefinition="HTTP header field name", formalDefinition="The HTTP header field name e.g. 'Location'." )
5372        protected StringType headerField;
5373
5374        /**
5375         * The ID of a fixture.  Asserts that the response contains at a minimum the fixture specified by minimumId.
5376         */
5377        @Child(name = "minimumId", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false)
5378        @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." )
5379        protected StringType minimumId;
5380
5381        /**
5382         * Whether or not the test execution performs validation on the bundle navigation links.
5383         */
5384        @Child(name = "navigationLinks", type = {BooleanType.class}, order=11, min=0, max=1, modifier=false, summary=false)
5385        @Description(shortDefinition="Perform validation on navigation links?", formalDefinition="Whether or not the test execution performs validation on the bundle navigation links." )
5386        protected BooleanType navigationLinks;
5387
5388        /**
5389         * The operator type defines the conditional behavior of the assert. If not defined, the default is equals.
5390         */
5391        @Child(name = "operator", type = {CodeType.class}, order=12, min=0, max=1, modifier=false, summary=false)
5392        @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." )
5393        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/assert-operator-codes")
5394        protected Enumeration<AssertionOperatorType> operator;
5395
5396        /**
5397         * The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.
5398         */
5399        @Child(name = "path", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=false)
5400        @Description(shortDefinition="XPath or JSONPath expression", formalDefinition="The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server." )
5401        protected StringType path;
5402
5403        /**
5404         * The request method or HTTP operation code to compare against that used by the client system under test.
5405         */
5406        @Child(name = "requestMethod", type = {CodeType.class}, order=14, min=0, max=1, modifier=false, summary=false)
5407        @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." )
5408        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/http-operations")
5409        protected Enumeration<TestScriptRequestMethodCode> requestMethod;
5410
5411        /**
5412         * The value to use in a comparison against the request URL path string.
5413         */
5414        @Child(name = "requestURL", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=false)
5415        @Description(shortDefinition="Request URL comparison value", formalDefinition="The value to use in a comparison against the request URL path string." )
5416        protected StringType requestURL;
5417
5418        /**
5419         * The type of the resource.  See http://build.fhir.org/resourcelist.html.
5420         */
5421        @Child(name = "resource", type = {CodeType.class}, order=16, min=0, max=1, modifier=false, summary=false)
5422        @Description(shortDefinition="Resource type", formalDefinition="The type of the resource.  See http://build.fhir.org/resourcelist.html." )
5423        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/defined-types")
5424        protected CodeType resource;
5425
5426        /**
5427         * okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.
5428         */
5429        @Child(name = "response", type = {CodeType.class}, order=17, min=0, max=1, modifier=false, summary=false)
5430        @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." )
5431        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/assert-response-code-types")
5432        protected Enumeration<AssertionResponseTypes> response;
5433
5434        /**
5435         * The value of the HTTP response code to be tested.
5436         */
5437        @Child(name = "responseCode", type = {StringType.class}, order=18, min=0, max=1, modifier=false, summary=false)
5438        @Description(shortDefinition="HTTP response code to test", formalDefinition="The value of the HTTP response code to be tested." )
5439        protected StringType responseCode;
5440
5441        /**
5442         * Fixture to evaluate the XPath/JSONPath expression or the headerField  against.
5443         */
5444        @Child(name = "sourceId", type = {IdType.class}, order=19, min=0, max=1, modifier=false, summary=false)
5445        @Description(shortDefinition="Fixture Id of source expression or headerField", formalDefinition="Fixture to evaluate the XPath/JSONPath expression or the headerField  against." )
5446        protected IdType sourceId;
5447
5448        /**
5449         * The ID of the Profile to validate against.
5450         */
5451        @Child(name = "validateProfileId", type = {IdType.class}, order=20, min=0, max=1, modifier=false, summary=false)
5452        @Description(shortDefinition="Profile Id of validation profile reference", formalDefinition="The ID of the Profile to validate against." )
5453        protected IdType validateProfileId;
5454
5455        /**
5456         * The value to compare to.
5457         */
5458        @Child(name = "value", type = {StringType.class}, order=21, min=0, max=1, modifier=false, summary=false)
5459        @Description(shortDefinition="The value to compare to", formalDefinition="The value to compare to." )
5460        protected StringType value;
5461
5462        /**
5463         * Whether or not the test execution will produce a warning only on error for this assert.
5464         */
5465        @Child(name = "warningOnly", type = {BooleanType.class}, order=22, min=1, max=1, modifier=false, summary=false)
5466        @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." )
5467        protected BooleanType warningOnly;
5468
5469        private static final long serialVersionUID = -1086518778L;
5470
5471    /**
5472     * Constructor
5473     */
5474      public SetupActionAssertComponent() {
5475        super();
5476      }
5477
5478    /**
5479     * Constructor
5480     */
5481      public SetupActionAssertComponent(BooleanType warningOnly) {
5482        super();
5483        this.warningOnly = warningOnly;
5484      }
5485
5486        /**
5487         * @return {@link #label} (The label would be used for tracking/logging purposes by test engines.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value
5488         */
5489        public StringType getLabelElement() { 
5490          if (this.label == null)
5491            if (Configuration.errorOnAutoCreate())
5492              throw new Error("Attempt to auto-create SetupActionAssertComponent.label");
5493            else if (Configuration.doAutoCreate())
5494              this.label = new StringType(); // bb
5495          return this.label;
5496        }
5497
5498        public boolean hasLabelElement() { 
5499          return this.label != null && !this.label.isEmpty();
5500        }
5501
5502        public boolean hasLabel() { 
5503          return this.label != null && !this.label.isEmpty();
5504        }
5505
5506        /**
5507         * @param value {@link #label} (The label would be used for tracking/logging purposes by test engines.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value
5508         */
5509        public SetupActionAssertComponent setLabelElement(StringType value) { 
5510          this.label = value;
5511          return this;
5512        }
5513
5514        /**
5515         * @return The label would be used for tracking/logging purposes by test engines.
5516         */
5517        public String getLabel() { 
5518          return this.label == null ? null : this.label.getValue();
5519        }
5520
5521        /**
5522         * @param value The label would be used for tracking/logging purposes by test engines.
5523         */
5524        public SetupActionAssertComponent setLabel(String value) { 
5525          if (Utilities.noString(value))
5526            this.label = null;
5527          else {
5528            if (this.label == null)
5529              this.label = new StringType();
5530            this.label.setValue(value);
5531          }
5532          return this;
5533        }
5534
5535        /**
5536         * @return {@link #description} (The description would be used by test engines for tracking and reporting purposes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
5537         */
5538        public StringType getDescriptionElement() { 
5539          if (this.description == null)
5540            if (Configuration.errorOnAutoCreate())
5541              throw new Error("Attempt to auto-create SetupActionAssertComponent.description");
5542            else if (Configuration.doAutoCreate())
5543              this.description = new StringType(); // bb
5544          return this.description;
5545        }
5546
5547        public boolean hasDescriptionElement() { 
5548          return this.description != null && !this.description.isEmpty();
5549        }
5550
5551        public boolean hasDescription() { 
5552          return this.description != null && !this.description.isEmpty();
5553        }
5554
5555        /**
5556         * @param value {@link #description} (The description would be used by test engines for tracking and reporting purposes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
5557         */
5558        public SetupActionAssertComponent setDescriptionElement(StringType value) { 
5559          this.description = value;
5560          return this;
5561        }
5562
5563        /**
5564         * @return The description would be used by test engines for tracking and reporting purposes.
5565         */
5566        public String getDescription() { 
5567          return this.description == null ? null : this.description.getValue();
5568        }
5569
5570        /**
5571         * @param value The description would be used by test engines for tracking and reporting purposes.
5572         */
5573        public SetupActionAssertComponent setDescription(String value) { 
5574          if (Utilities.noString(value))
5575            this.description = null;
5576          else {
5577            if (this.description == null)
5578              this.description = new StringType();
5579            this.description.setValue(value);
5580          }
5581          return this;
5582        }
5583
5584        /**
5585         * @return {@link #direction} (The direction to use for the assertion.). This is the underlying object with id, value and extensions. The accessor "getDirection" gives direct access to the value
5586         */
5587        public Enumeration<AssertionDirectionType> getDirectionElement() { 
5588          if (this.direction == null)
5589            if (Configuration.errorOnAutoCreate())
5590              throw new Error("Attempt to auto-create SetupActionAssertComponent.direction");
5591            else if (Configuration.doAutoCreate())
5592              this.direction = new Enumeration<AssertionDirectionType>(new AssertionDirectionTypeEnumFactory()); // bb
5593          return this.direction;
5594        }
5595
5596        public boolean hasDirectionElement() { 
5597          return this.direction != null && !this.direction.isEmpty();
5598        }
5599
5600        public boolean hasDirection() { 
5601          return this.direction != null && !this.direction.isEmpty();
5602        }
5603
5604        /**
5605         * @param value {@link #direction} (The direction to use for the assertion.). This is the underlying object with id, value and extensions. The accessor "getDirection" gives direct access to the value
5606         */
5607        public SetupActionAssertComponent setDirectionElement(Enumeration<AssertionDirectionType> value) { 
5608          this.direction = value;
5609          return this;
5610        }
5611
5612        /**
5613         * @return The direction to use for the assertion.
5614         */
5615        public AssertionDirectionType getDirection() { 
5616          return this.direction == null ? null : this.direction.getValue();
5617        }
5618
5619        /**
5620         * @param value The direction to use for the assertion.
5621         */
5622        public SetupActionAssertComponent setDirection(AssertionDirectionType value) { 
5623          if (value == null)
5624            this.direction = null;
5625          else {
5626            if (this.direction == null)
5627              this.direction = new Enumeration<AssertionDirectionType>(new AssertionDirectionTypeEnumFactory());
5628            this.direction.setValue(value);
5629          }
5630          return this;
5631        }
5632
5633        /**
5634         * @return {@link #compareToSourceId} (Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition.). This is the underlying object with id, value and extensions. The accessor "getCompareToSourceId" gives direct access to the value
5635         */
5636        public StringType getCompareToSourceIdElement() { 
5637          if (this.compareToSourceId == null)
5638            if (Configuration.errorOnAutoCreate())
5639              throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourceId");
5640            else if (Configuration.doAutoCreate())
5641              this.compareToSourceId = new StringType(); // bb
5642          return this.compareToSourceId;
5643        }
5644
5645        public boolean hasCompareToSourceIdElement() { 
5646          return this.compareToSourceId != null && !this.compareToSourceId.isEmpty();
5647        }
5648
5649        public boolean hasCompareToSourceId() { 
5650          return this.compareToSourceId != null && !this.compareToSourceId.isEmpty();
5651        }
5652
5653        /**
5654         * @param value {@link #compareToSourceId} (Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition.). This is the underlying object with id, value and extensions. The accessor "getCompareToSourceId" gives direct access to the value
5655         */
5656        public SetupActionAssertComponent setCompareToSourceIdElement(StringType value) { 
5657          this.compareToSourceId = value;
5658          return this;
5659        }
5660
5661        /**
5662         * @return Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition.
5663         */
5664        public String getCompareToSourceId() { 
5665          return this.compareToSourceId == null ? null : this.compareToSourceId.getValue();
5666        }
5667
5668        /**
5669         * @param value Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition.
5670         */
5671        public SetupActionAssertComponent setCompareToSourceId(String value) { 
5672          if (Utilities.noString(value))
5673            this.compareToSourceId = null;
5674          else {
5675            if (this.compareToSourceId == null)
5676              this.compareToSourceId = new StringType();
5677            this.compareToSourceId.setValue(value);
5678          }
5679          return this;
5680        }
5681
5682        /**
5683         * @return {@link #compareToSourceExpression} (The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.). This is the underlying object with id, value and extensions. The accessor "getCompareToSourceExpression" gives direct access to the value
5684         */
5685        public StringType getCompareToSourceExpressionElement() { 
5686          if (this.compareToSourceExpression == null)
5687            if (Configuration.errorOnAutoCreate())
5688              throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourceExpression");
5689            else if (Configuration.doAutoCreate())
5690              this.compareToSourceExpression = new StringType(); // bb
5691          return this.compareToSourceExpression;
5692        }
5693
5694        public boolean hasCompareToSourceExpressionElement() { 
5695          return this.compareToSourceExpression != null && !this.compareToSourceExpression.isEmpty();
5696        }
5697
5698        public boolean hasCompareToSourceExpression() { 
5699          return this.compareToSourceExpression != null && !this.compareToSourceExpression.isEmpty();
5700        }
5701
5702        /**
5703         * @param value {@link #compareToSourceExpression} (The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.). This is the underlying object with id, value and extensions. The accessor "getCompareToSourceExpression" gives direct access to the value
5704         */
5705        public SetupActionAssertComponent setCompareToSourceExpressionElement(StringType value) { 
5706          this.compareToSourceExpression = value;
5707          return this;
5708        }
5709
5710        /**
5711         * @return The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.
5712         */
5713        public String getCompareToSourceExpression() { 
5714          return this.compareToSourceExpression == null ? null : this.compareToSourceExpression.getValue();
5715        }
5716
5717        /**
5718         * @param value The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.
5719         */
5720        public SetupActionAssertComponent setCompareToSourceExpression(String value) { 
5721          if (Utilities.noString(value))
5722            this.compareToSourceExpression = null;
5723          else {
5724            if (this.compareToSourceExpression == null)
5725              this.compareToSourceExpression = new StringType();
5726            this.compareToSourceExpression.setValue(value);
5727          }
5728          return this;
5729        }
5730
5731        /**
5732         * @return {@link #compareToSourcePath} (XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.). This is the underlying object with id, value and extensions. The accessor "getCompareToSourcePath" gives direct access to the value
5733         */
5734        public StringType getCompareToSourcePathElement() { 
5735          if (this.compareToSourcePath == null)
5736            if (Configuration.errorOnAutoCreate())
5737              throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourcePath");
5738            else if (Configuration.doAutoCreate())
5739              this.compareToSourcePath = new StringType(); // bb
5740          return this.compareToSourcePath;
5741        }
5742
5743        public boolean hasCompareToSourcePathElement() { 
5744          return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty();
5745        }
5746
5747        public boolean hasCompareToSourcePath() { 
5748          return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty();
5749        }
5750
5751        /**
5752         * @param value {@link #compareToSourcePath} (XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.). This is the underlying object with id, value and extensions. The accessor "getCompareToSourcePath" gives direct access to the value
5753         */
5754        public SetupActionAssertComponent setCompareToSourcePathElement(StringType value) { 
5755          this.compareToSourcePath = value;
5756          return this;
5757        }
5758
5759        /**
5760         * @return XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.
5761         */
5762        public String getCompareToSourcePath() { 
5763          return this.compareToSourcePath == null ? null : this.compareToSourcePath.getValue();
5764        }
5765
5766        /**
5767         * @param value XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.
5768         */
5769        public SetupActionAssertComponent setCompareToSourcePath(String value) { 
5770          if (Utilities.noString(value))
5771            this.compareToSourcePath = null;
5772          else {
5773            if (this.compareToSourcePath == null)
5774              this.compareToSourcePath = new StringType();
5775            this.compareToSourcePath.setValue(value);
5776          }
5777          return this;
5778        }
5779
5780        /**
5781         * @return {@link #contentType} (The mime-type contents to compare against the request or response message 'Content-Type' header.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value
5782         */
5783        public CodeType getContentTypeElement() { 
5784          if (this.contentType == null)
5785            if (Configuration.errorOnAutoCreate())
5786              throw new Error("Attempt to auto-create SetupActionAssertComponent.contentType");
5787            else if (Configuration.doAutoCreate())
5788              this.contentType = new CodeType(); // bb
5789          return this.contentType;
5790        }
5791
5792        public boolean hasContentTypeElement() { 
5793          return this.contentType != null && !this.contentType.isEmpty();
5794        }
5795
5796        public boolean hasContentType() { 
5797          return this.contentType != null && !this.contentType.isEmpty();
5798        }
5799
5800        /**
5801         * @param value {@link #contentType} (The mime-type contents to compare against the request or response message 'Content-Type' header.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value
5802         */
5803        public SetupActionAssertComponent setContentTypeElement(CodeType value) { 
5804          this.contentType = value;
5805          return this;
5806        }
5807
5808        /**
5809         * @return The mime-type contents to compare against the request or response message 'Content-Type' header.
5810         */
5811        public String getContentType() { 
5812          return this.contentType == null ? null : this.contentType.getValue();
5813        }
5814
5815        /**
5816         * @param value The mime-type contents to compare against the request or response message 'Content-Type' header.
5817         */
5818        public SetupActionAssertComponent setContentType(String value) { 
5819          if (Utilities.noString(value))
5820            this.contentType = null;
5821          else {
5822            if (this.contentType == null)
5823              this.contentType = new CodeType();
5824            this.contentType.setValue(value);
5825          }
5826          return this;
5827        }
5828
5829        /**
5830         * @return {@link #expression} (The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value
5831         */
5832        public StringType getExpressionElement() { 
5833          if (this.expression == null)
5834            if (Configuration.errorOnAutoCreate())
5835              throw new Error("Attempt to auto-create SetupActionAssertComponent.expression");
5836            else if (Configuration.doAutoCreate())
5837              this.expression = new StringType(); // bb
5838          return this.expression;
5839        }
5840
5841        public boolean hasExpressionElement() { 
5842          return this.expression != null && !this.expression.isEmpty();
5843        }
5844
5845        public boolean hasExpression() { 
5846          return this.expression != null && !this.expression.isEmpty();
5847        }
5848
5849        /**
5850         * @param value {@link #expression} (The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value
5851         */
5852        public SetupActionAssertComponent setExpressionElement(StringType value) { 
5853          this.expression = value;
5854          return this;
5855        }
5856
5857        /**
5858         * @return The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.
5859         */
5860        public String getExpression() { 
5861          return this.expression == null ? null : this.expression.getValue();
5862        }
5863
5864        /**
5865         * @param value The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.
5866         */
5867        public SetupActionAssertComponent setExpression(String value) { 
5868          if (Utilities.noString(value))
5869            this.expression = null;
5870          else {
5871            if (this.expression == null)
5872              this.expression = new StringType();
5873            this.expression.setValue(value);
5874          }
5875          return this;
5876        }
5877
5878        /**
5879         * @return {@link #headerField} (The HTTP header field name e.g. 'Location'.). This is the underlying object with id, value and extensions. The accessor "getHeaderField" gives direct access to the value
5880         */
5881        public StringType getHeaderFieldElement() { 
5882          if (this.headerField == null)
5883            if (Configuration.errorOnAutoCreate())
5884              throw new Error("Attempt to auto-create SetupActionAssertComponent.headerField");
5885            else if (Configuration.doAutoCreate())
5886              this.headerField = new StringType(); // bb
5887          return this.headerField;
5888        }
5889
5890        public boolean hasHeaderFieldElement() { 
5891          return this.headerField != null && !this.headerField.isEmpty();
5892        }
5893
5894        public boolean hasHeaderField() { 
5895          return this.headerField != null && !this.headerField.isEmpty();
5896        }
5897
5898        /**
5899         * @param value {@link #headerField} (The HTTP header field name e.g. 'Location'.). This is the underlying object with id, value and extensions. The accessor "getHeaderField" gives direct access to the value
5900         */
5901        public SetupActionAssertComponent setHeaderFieldElement(StringType value) { 
5902          this.headerField = value;
5903          return this;
5904        }
5905
5906        /**
5907         * @return The HTTP header field name e.g. 'Location'.
5908         */
5909        public String getHeaderField() { 
5910          return this.headerField == null ? null : this.headerField.getValue();
5911        }
5912
5913        /**
5914         * @param value The HTTP header field name e.g. 'Location'.
5915         */
5916        public SetupActionAssertComponent setHeaderField(String value) { 
5917          if (Utilities.noString(value))
5918            this.headerField = null;
5919          else {
5920            if (this.headerField == null)
5921              this.headerField = new StringType();
5922            this.headerField.setValue(value);
5923          }
5924          return this;
5925        }
5926
5927        /**
5928         * @return {@link #minimumId} (The ID of a fixture.  Asserts that the response contains at a minimum the fixture specified by minimumId.). This is the underlying object with id, value and extensions. The accessor "getMinimumId" gives direct access to the value
5929         */
5930        public StringType getMinimumIdElement() { 
5931          if (this.minimumId == null)
5932            if (Configuration.errorOnAutoCreate())
5933              throw new Error("Attempt to auto-create SetupActionAssertComponent.minimumId");
5934            else if (Configuration.doAutoCreate())
5935              this.minimumId = new StringType(); // bb
5936          return this.minimumId;
5937        }
5938
5939        public boolean hasMinimumIdElement() { 
5940          return this.minimumId != null && !this.minimumId.isEmpty();
5941        }
5942
5943        public boolean hasMinimumId() { 
5944          return this.minimumId != null && !this.minimumId.isEmpty();
5945        }
5946
5947        /**
5948         * @param value {@link #minimumId} (The ID of a fixture.  Asserts that the response contains at a minimum the fixture specified by minimumId.). This is the underlying object with id, value and extensions. The accessor "getMinimumId" gives direct access to the value
5949         */
5950        public SetupActionAssertComponent setMinimumIdElement(StringType value) { 
5951          this.minimumId = value;
5952          return this;
5953        }
5954
5955        /**
5956         * @return The ID of a fixture.  Asserts that the response contains at a minimum the fixture specified by minimumId.
5957         */
5958        public String getMinimumId() { 
5959          return this.minimumId == null ? null : this.minimumId.getValue();
5960        }
5961
5962        /**
5963         * @param value The ID of a fixture.  Asserts that the response contains at a minimum the fixture specified by minimumId.
5964         */
5965        public SetupActionAssertComponent setMinimumId(String value) { 
5966          if (Utilities.noString(value))
5967            this.minimumId = null;
5968          else {
5969            if (this.minimumId == null)
5970              this.minimumId = new StringType();
5971            this.minimumId.setValue(value);
5972          }
5973          return this;
5974        }
5975
5976        /**
5977         * @return {@link #navigationLinks} (Whether or not the test execution performs validation on the bundle navigation links.). This is the underlying object with id, value and extensions. The accessor "getNavigationLinks" gives direct access to the value
5978         */
5979        public BooleanType getNavigationLinksElement() { 
5980          if (this.navigationLinks == null)
5981            if (Configuration.errorOnAutoCreate())
5982              throw new Error("Attempt to auto-create SetupActionAssertComponent.navigationLinks");
5983            else if (Configuration.doAutoCreate())
5984              this.navigationLinks = new BooleanType(); // bb
5985          return this.navigationLinks;
5986        }
5987
5988        public boolean hasNavigationLinksElement() { 
5989          return this.navigationLinks != null && !this.navigationLinks.isEmpty();
5990        }
5991
5992        public boolean hasNavigationLinks() { 
5993          return this.navigationLinks != null && !this.navigationLinks.isEmpty();
5994        }
5995
5996        /**
5997         * @param value {@link #navigationLinks} (Whether or not the test execution performs validation on the bundle navigation links.). This is the underlying object with id, value and extensions. The accessor "getNavigationLinks" gives direct access to the value
5998         */
5999        public SetupActionAssertComponent setNavigationLinksElement(BooleanType value) { 
6000          this.navigationLinks = value;
6001          return this;
6002        }
6003
6004        /**
6005         * @return Whether or not the test execution performs validation on the bundle navigation links.
6006         */
6007        public boolean getNavigationLinks() { 
6008          return this.navigationLinks == null || this.navigationLinks.isEmpty() ? false : this.navigationLinks.getValue();
6009        }
6010
6011        /**
6012         * @param value Whether or not the test execution performs validation on the bundle navigation links.
6013         */
6014        public SetupActionAssertComponent setNavigationLinks(boolean value) { 
6015            if (this.navigationLinks == null)
6016              this.navigationLinks = new BooleanType();
6017            this.navigationLinks.setValue(value);
6018          return this;
6019        }
6020
6021        /**
6022         * @return {@link #operator} (The operator type defines the conditional behavior of the assert. If not defined, the default is equals.). This is the underlying object with id, value and extensions. The accessor "getOperator" gives direct access to the value
6023         */
6024        public Enumeration<AssertionOperatorType> getOperatorElement() { 
6025          if (this.operator == null)
6026            if (Configuration.errorOnAutoCreate())
6027              throw new Error("Attempt to auto-create SetupActionAssertComponent.operator");
6028            else if (Configuration.doAutoCreate())
6029              this.operator = new Enumeration<AssertionOperatorType>(new AssertionOperatorTypeEnumFactory()); // bb
6030          return this.operator;
6031        }
6032
6033        public boolean hasOperatorElement() { 
6034          return this.operator != null && !this.operator.isEmpty();
6035        }
6036
6037        public boolean hasOperator() { 
6038          return this.operator != null && !this.operator.isEmpty();
6039        }
6040
6041        /**
6042         * @param value {@link #operator} (The operator type defines the conditional behavior of the assert. If not defined, the default is equals.). This is the underlying object with id, value and extensions. The accessor "getOperator" gives direct access to the value
6043         */
6044        public SetupActionAssertComponent setOperatorElement(Enumeration<AssertionOperatorType> value) { 
6045          this.operator = value;
6046          return this;
6047        }
6048
6049        /**
6050         * @return The operator type defines the conditional behavior of the assert. If not defined, the default is equals.
6051         */
6052        public AssertionOperatorType getOperator() { 
6053          return this.operator == null ? null : this.operator.getValue();
6054        }
6055
6056        /**
6057         * @param value The operator type defines the conditional behavior of the assert. If not defined, the default is equals.
6058         */
6059        public SetupActionAssertComponent setOperator(AssertionOperatorType value) { 
6060          if (value == null)
6061            this.operator = null;
6062          else {
6063            if (this.operator == null)
6064              this.operator = new Enumeration<AssertionOperatorType>(new AssertionOperatorTypeEnumFactory());
6065            this.operator.setValue(value);
6066          }
6067          return this;
6068        }
6069
6070        /**
6071         * @return {@link #path} (The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value
6072         */
6073        public StringType getPathElement() { 
6074          if (this.path == null)
6075            if (Configuration.errorOnAutoCreate())
6076              throw new Error("Attempt to auto-create SetupActionAssertComponent.path");
6077            else if (Configuration.doAutoCreate())
6078              this.path = new StringType(); // bb
6079          return this.path;
6080        }
6081
6082        public boolean hasPathElement() { 
6083          return this.path != null && !this.path.isEmpty();
6084        }
6085
6086        public boolean hasPath() { 
6087          return this.path != null && !this.path.isEmpty();
6088        }
6089
6090        /**
6091         * @param value {@link #path} (The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value
6092         */
6093        public SetupActionAssertComponent setPathElement(StringType value) { 
6094          this.path = value;
6095          return this;
6096        }
6097
6098        /**
6099         * @return The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.
6100         */
6101        public String getPath() { 
6102          return this.path == null ? null : this.path.getValue();
6103        }
6104
6105        /**
6106         * @param value The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.
6107         */
6108        public SetupActionAssertComponent setPath(String value) { 
6109          if (Utilities.noString(value))
6110            this.path = null;
6111          else {
6112            if (this.path == null)
6113              this.path = new StringType();
6114            this.path.setValue(value);
6115          }
6116          return this;
6117        }
6118
6119        /**
6120         * @return {@link #requestMethod} (The request method or HTTP operation code to compare against that used by the client system under test.). This is the underlying object with id, value and extensions. The accessor "getRequestMethod" gives direct access to the value
6121         */
6122        public Enumeration<TestScriptRequestMethodCode> getRequestMethodElement() { 
6123          if (this.requestMethod == null)
6124            if (Configuration.errorOnAutoCreate())
6125              throw new Error("Attempt to auto-create SetupActionAssertComponent.requestMethod");
6126            else if (Configuration.doAutoCreate())
6127              this.requestMethod = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory()); // bb
6128          return this.requestMethod;
6129        }
6130
6131        public boolean hasRequestMethodElement() { 
6132          return this.requestMethod != null && !this.requestMethod.isEmpty();
6133        }
6134
6135        public boolean hasRequestMethod() { 
6136          return this.requestMethod != null && !this.requestMethod.isEmpty();
6137        }
6138
6139        /**
6140         * @param value {@link #requestMethod} (The request method or HTTP operation code to compare against that used by the client system under test.). This is the underlying object with id, value and extensions. The accessor "getRequestMethod" gives direct access to the value
6141         */
6142        public SetupActionAssertComponent setRequestMethodElement(Enumeration<TestScriptRequestMethodCode> value) { 
6143          this.requestMethod = value;
6144          return this;
6145        }
6146
6147        /**
6148         * @return The request method or HTTP operation code to compare against that used by the client system under test.
6149         */
6150        public TestScriptRequestMethodCode getRequestMethod() { 
6151          return this.requestMethod == null ? null : this.requestMethod.getValue();
6152        }
6153
6154        /**
6155         * @param value The request method or HTTP operation code to compare against that used by the client system under test.
6156         */
6157        public SetupActionAssertComponent setRequestMethod(TestScriptRequestMethodCode value) { 
6158          if (value == null)
6159            this.requestMethod = null;
6160          else {
6161            if (this.requestMethod == null)
6162              this.requestMethod = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory());
6163            this.requestMethod.setValue(value);
6164          }
6165          return this;
6166        }
6167
6168        /**
6169         * @return {@link #requestURL} (The value to use in a comparison against the request URL path string.). This is the underlying object with id, value and extensions. The accessor "getRequestURL" gives direct access to the value
6170         */
6171        public StringType getRequestURLElement() { 
6172          if (this.requestURL == null)
6173            if (Configuration.errorOnAutoCreate())
6174              throw new Error("Attempt to auto-create SetupActionAssertComponent.requestURL");
6175            else if (Configuration.doAutoCreate())
6176              this.requestURL = new StringType(); // bb
6177          return this.requestURL;
6178        }
6179
6180        public boolean hasRequestURLElement() { 
6181          return this.requestURL != null && !this.requestURL.isEmpty();
6182        }
6183
6184        public boolean hasRequestURL() { 
6185          return this.requestURL != null && !this.requestURL.isEmpty();
6186        }
6187
6188        /**
6189         * @param value {@link #requestURL} (The value to use in a comparison against the request URL path string.). This is the underlying object with id, value and extensions. The accessor "getRequestURL" gives direct access to the value
6190         */
6191        public SetupActionAssertComponent setRequestURLElement(StringType value) { 
6192          this.requestURL = value;
6193          return this;
6194        }
6195
6196        /**
6197         * @return The value to use in a comparison against the request URL path string.
6198         */
6199        public String getRequestURL() { 
6200          return this.requestURL == null ? null : this.requestURL.getValue();
6201        }
6202
6203        /**
6204         * @param value The value to use in a comparison against the request URL path string.
6205         */
6206        public SetupActionAssertComponent setRequestURL(String value) { 
6207          if (Utilities.noString(value))
6208            this.requestURL = null;
6209          else {
6210            if (this.requestURL == null)
6211              this.requestURL = new StringType();
6212            this.requestURL.setValue(value);
6213          }
6214          return this;
6215        }
6216
6217        /**
6218         * @return {@link #resource} (The type of the resource.  See http://build.fhir.org/resourcelist.html.). This is the underlying object with id, value and extensions. The accessor "getResource" gives direct access to the value
6219         */
6220        public CodeType getResourceElement() { 
6221          if (this.resource == null)
6222            if (Configuration.errorOnAutoCreate())
6223              throw new Error("Attempt to auto-create SetupActionAssertComponent.resource");
6224            else if (Configuration.doAutoCreate())
6225              this.resource = new CodeType(); // bb
6226          return this.resource;
6227        }
6228
6229        public boolean hasResourceElement() { 
6230          return this.resource != null && !this.resource.isEmpty();
6231        }
6232
6233        public boolean hasResource() { 
6234          return this.resource != null && !this.resource.isEmpty();
6235        }
6236
6237        /**
6238         * @param value {@link #resource} (The type of the resource.  See http://build.fhir.org/resourcelist.html.). This is the underlying object with id, value and extensions. The accessor "getResource" gives direct access to the value
6239         */
6240        public SetupActionAssertComponent setResourceElement(CodeType value) { 
6241          this.resource = value;
6242          return this;
6243        }
6244
6245        /**
6246         * @return The type of the resource.  See http://build.fhir.org/resourcelist.html.
6247         */
6248        public String getResource() { 
6249          return this.resource == null ? null : this.resource.getValue();
6250        }
6251
6252        /**
6253         * @param value The type of the resource.  See http://build.fhir.org/resourcelist.html.
6254         */
6255        public SetupActionAssertComponent setResource(String value) { 
6256          if (Utilities.noString(value))
6257            this.resource = null;
6258          else {
6259            if (this.resource == null)
6260              this.resource = new CodeType();
6261            this.resource.setValue(value);
6262          }
6263          return this;
6264        }
6265
6266        /**
6267         * @return {@link #response} (okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.). This is the underlying object with id, value and extensions. The accessor "getResponse" gives direct access to the value
6268         */
6269        public Enumeration<AssertionResponseTypes> getResponseElement() { 
6270          if (this.response == null)
6271            if (Configuration.errorOnAutoCreate())
6272              throw new Error("Attempt to auto-create SetupActionAssertComponent.response");
6273            else if (Configuration.doAutoCreate())
6274              this.response = new Enumeration<AssertionResponseTypes>(new AssertionResponseTypesEnumFactory()); // bb
6275          return this.response;
6276        }
6277
6278        public boolean hasResponseElement() { 
6279          return this.response != null && !this.response.isEmpty();
6280        }
6281
6282        public boolean hasResponse() { 
6283          return this.response != null && !this.response.isEmpty();
6284        }
6285
6286        /**
6287         * @param value {@link #response} (okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.). This is the underlying object with id, value and extensions. The accessor "getResponse" gives direct access to the value
6288         */
6289        public SetupActionAssertComponent setResponseElement(Enumeration<AssertionResponseTypes> value) { 
6290          this.response = value;
6291          return this;
6292        }
6293
6294        /**
6295         * @return okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.
6296         */
6297        public AssertionResponseTypes getResponse() { 
6298          return this.response == null ? null : this.response.getValue();
6299        }
6300
6301        /**
6302         * @param value okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.
6303         */
6304        public SetupActionAssertComponent setResponse(AssertionResponseTypes value) { 
6305          if (value == null)
6306            this.response = null;
6307          else {
6308            if (this.response == null)
6309              this.response = new Enumeration<AssertionResponseTypes>(new AssertionResponseTypesEnumFactory());
6310            this.response.setValue(value);
6311          }
6312          return this;
6313        }
6314
6315        /**
6316         * @return {@link #responseCode} (The value of the HTTP response code to be tested.). This is the underlying object with id, value and extensions. The accessor "getResponseCode" gives direct access to the value
6317         */
6318        public StringType getResponseCodeElement() { 
6319          if (this.responseCode == null)
6320            if (Configuration.errorOnAutoCreate())
6321              throw new Error("Attempt to auto-create SetupActionAssertComponent.responseCode");
6322            else if (Configuration.doAutoCreate())
6323              this.responseCode = new StringType(); // bb
6324          return this.responseCode;
6325        }
6326
6327        public boolean hasResponseCodeElement() { 
6328          return this.responseCode != null && !this.responseCode.isEmpty();
6329        }
6330
6331        public boolean hasResponseCode() { 
6332          return this.responseCode != null && !this.responseCode.isEmpty();
6333        }
6334
6335        /**
6336         * @param value {@link #responseCode} (The value of the HTTP response code to be tested.). This is the underlying object with id, value and extensions. The accessor "getResponseCode" gives direct access to the value
6337         */
6338        public SetupActionAssertComponent setResponseCodeElement(StringType value) { 
6339          this.responseCode = value;
6340          return this;
6341        }
6342
6343        /**
6344         * @return The value of the HTTP response code to be tested.
6345         */
6346        public String getResponseCode() { 
6347          return this.responseCode == null ? null : this.responseCode.getValue();
6348        }
6349
6350        /**
6351         * @param value The value of the HTTP response code to be tested.
6352         */
6353        public SetupActionAssertComponent setResponseCode(String value) { 
6354          if (Utilities.noString(value))
6355            this.responseCode = null;
6356          else {
6357            if (this.responseCode == null)
6358              this.responseCode = new StringType();
6359            this.responseCode.setValue(value);
6360          }
6361          return this;
6362        }
6363
6364        /**
6365         * @return {@link #sourceId} (Fixture to evaluate the XPath/JSONPath expression or the headerField  against.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value
6366         */
6367        public IdType getSourceIdElement() { 
6368          if (this.sourceId == null)
6369            if (Configuration.errorOnAutoCreate())
6370              throw new Error("Attempt to auto-create SetupActionAssertComponent.sourceId");
6371            else if (Configuration.doAutoCreate())
6372              this.sourceId = new IdType(); // bb
6373          return this.sourceId;
6374        }
6375
6376        public boolean hasSourceIdElement() { 
6377          return this.sourceId != null && !this.sourceId.isEmpty();
6378        }
6379
6380        public boolean hasSourceId() { 
6381          return this.sourceId != null && !this.sourceId.isEmpty();
6382        }
6383
6384        /**
6385         * @param value {@link #sourceId} (Fixture to evaluate the XPath/JSONPath expression or the headerField  against.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value
6386         */
6387        public SetupActionAssertComponent setSourceIdElement(IdType value) { 
6388          this.sourceId = value;
6389          return this;
6390        }
6391
6392        /**
6393         * @return Fixture to evaluate the XPath/JSONPath expression or the headerField  against.
6394         */
6395        public String getSourceId() { 
6396          return this.sourceId == null ? null : this.sourceId.getValue();
6397        }
6398
6399        /**
6400         * @param value Fixture to evaluate the XPath/JSONPath expression or the headerField  against.
6401         */
6402        public SetupActionAssertComponent setSourceId(String value) { 
6403          if (Utilities.noString(value))
6404            this.sourceId = null;
6405          else {
6406            if (this.sourceId == null)
6407              this.sourceId = new IdType();
6408            this.sourceId.setValue(value);
6409          }
6410          return this;
6411        }
6412
6413        /**
6414         * @return {@link #validateProfileId} (The ID of the Profile to validate against.). This is the underlying object with id, value and extensions. The accessor "getValidateProfileId" gives direct access to the value
6415         */
6416        public IdType getValidateProfileIdElement() { 
6417          if (this.validateProfileId == null)
6418            if (Configuration.errorOnAutoCreate())
6419              throw new Error("Attempt to auto-create SetupActionAssertComponent.validateProfileId");
6420            else if (Configuration.doAutoCreate())
6421              this.validateProfileId = new IdType(); // bb
6422          return this.validateProfileId;
6423        }
6424
6425        public boolean hasValidateProfileIdElement() { 
6426          return this.validateProfileId != null && !this.validateProfileId.isEmpty();
6427        }
6428
6429        public boolean hasValidateProfileId() { 
6430          return this.validateProfileId != null && !this.validateProfileId.isEmpty();
6431        }
6432
6433        /**
6434         * @param value {@link #validateProfileId} (The ID of the Profile to validate against.). This is the underlying object with id, value and extensions. The accessor "getValidateProfileId" gives direct access to the value
6435         */
6436        public SetupActionAssertComponent setValidateProfileIdElement(IdType value) { 
6437          this.validateProfileId = value;
6438          return this;
6439        }
6440
6441        /**
6442         * @return The ID of the Profile to validate against.
6443         */
6444        public String getValidateProfileId() { 
6445          return this.validateProfileId == null ? null : this.validateProfileId.getValue();
6446        }
6447
6448        /**
6449         * @param value The ID of the Profile to validate against.
6450         */
6451        public SetupActionAssertComponent setValidateProfileId(String value) { 
6452          if (Utilities.noString(value))
6453            this.validateProfileId = null;
6454          else {
6455            if (this.validateProfileId == null)
6456              this.validateProfileId = new IdType();
6457            this.validateProfileId.setValue(value);
6458          }
6459          return this;
6460        }
6461
6462        /**
6463         * @return {@link #value} (The value to compare to.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
6464         */
6465        public StringType getValueElement() { 
6466          if (this.value == null)
6467            if (Configuration.errorOnAutoCreate())
6468              throw new Error("Attempt to auto-create SetupActionAssertComponent.value");
6469            else if (Configuration.doAutoCreate())
6470              this.value = new StringType(); // bb
6471          return this.value;
6472        }
6473
6474        public boolean hasValueElement() { 
6475          return this.value != null && !this.value.isEmpty();
6476        }
6477
6478        public boolean hasValue() { 
6479          return this.value != null && !this.value.isEmpty();
6480        }
6481
6482        /**
6483         * @param value {@link #value} (The value to compare to.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
6484         */
6485        public SetupActionAssertComponent setValueElement(StringType value) { 
6486          this.value = value;
6487          return this;
6488        }
6489
6490        /**
6491         * @return The value to compare to.
6492         */
6493        public String getValue() { 
6494          return this.value == null ? null : this.value.getValue();
6495        }
6496
6497        /**
6498         * @param value The value to compare to.
6499         */
6500        public SetupActionAssertComponent setValue(String value) { 
6501          if (Utilities.noString(value))
6502            this.value = null;
6503          else {
6504            if (this.value == null)
6505              this.value = new StringType();
6506            this.value.setValue(value);
6507          }
6508          return this;
6509        }
6510
6511        /**
6512         * @return {@link #warningOnly} (Whether or not the test execution will produce a warning only on error for this assert.). This is the underlying object with id, value and extensions. The accessor "getWarningOnly" gives direct access to the value
6513         */
6514        public BooleanType getWarningOnlyElement() { 
6515          if (this.warningOnly == null)
6516            if (Configuration.errorOnAutoCreate())
6517              throw new Error("Attempt to auto-create SetupActionAssertComponent.warningOnly");
6518            else if (Configuration.doAutoCreate())
6519              this.warningOnly = new BooleanType(); // bb
6520          return this.warningOnly;
6521        }
6522
6523        public boolean hasWarningOnlyElement() { 
6524          return this.warningOnly != null && !this.warningOnly.isEmpty();
6525        }
6526
6527        public boolean hasWarningOnly() { 
6528          return this.warningOnly != null && !this.warningOnly.isEmpty();
6529        }
6530
6531        /**
6532         * @param value {@link #warningOnly} (Whether or not the test execution will produce a warning only on error for this assert.). This is the underlying object with id, value and extensions. The accessor "getWarningOnly" gives direct access to the value
6533         */
6534        public SetupActionAssertComponent setWarningOnlyElement(BooleanType value) { 
6535          this.warningOnly = value;
6536          return this;
6537        }
6538
6539        /**
6540         * @return Whether or not the test execution will produce a warning only on error for this assert.
6541         */
6542        public boolean getWarningOnly() { 
6543          return this.warningOnly == null || this.warningOnly.isEmpty() ? false : this.warningOnly.getValue();
6544        }
6545
6546        /**
6547         * @param value Whether or not the test execution will produce a warning only on error for this assert.
6548         */
6549        public SetupActionAssertComponent setWarningOnly(boolean value) { 
6550            if (this.warningOnly == null)
6551              this.warningOnly = new BooleanType();
6552            this.warningOnly.setValue(value);
6553          return this;
6554        }
6555
6556        protected void listChildren(List<Property> children) {
6557          super.listChildren(children);
6558          children.add(new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label));
6559          children.add(new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description));
6560          children.add(new Property("direction", "code", "The direction to use for the assertion.", 0, 1, direction));
6561          children.add(new Property("compareToSourceId", "string", "Id of the source fixture used as the contents to be evaluated by either the \"source/expression\" or \"sourceId/path\" definition.", 0, 1, compareToSourceId));
6562          children.add(new Property("compareToSourceExpression", "string", "The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.", 0, 1, compareToSourceExpression));
6563          children.add(new Property("compareToSourcePath", "string", "XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.", 0, 1, compareToSourcePath));
6564          children.add(new Property("contentType", "code", "The mime-type contents to compare against the request or response message 'Content-Type' header.", 0, 1, contentType));
6565          children.add(new Property("expression", "string", "The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.", 0, 1, expression));
6566          children.add(new Property("headerField", "string", "The HTTP header field name e.g. 'Location'.", 0, 1, headerField));
6567          children.add(new Property("minimumId", "string", "The ID of a fixture.  Asserts that the response contains at a minimum the fixture specified by minimumId.", 0, 1, minimumId));
6568          children.add(new Property("navigationLinks", "boolean", "Whether or not the test execution performs validation on the bundle navigation links.", 0, 1, navigationLinks));
6569          children.add(new Property("operator", "code", "The operator type defines the conditional behavior of the assert. If not defined, the default is equals.", 0, 1, operator));
6570          children.add(new Property("path", "string", "The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.", 0, 1, path));
6571          children.add(new Property("requestMethod", "code", "The request method or HTTP operation code to compare against that used by the client system under test.", 0, 1, requestMethod));
6572          children.add(new Property("requestURL", "string", "The value to use in a comparison against the request URL path string.", 0, 1, requestURL));
6573          children.add(new Property("resource", "code", "The type of the resource.  See http://build.fhir.org/resourcelist.html.", 0, 1, resource));
6574          children.add(new Property("response", "code", "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.", 0, 1, response));
6575          children.add(new Property("responseCode", "string", "The value of the HTTP response code to be tested.", 0, 1, responseCode));
6576          children.add(new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField  against.", 0, 1, sourceId));
6577          children.add(new Property("validateProfileId", "id", "The ID of the Profile to validate against.", 0, 1, validateProfileId));
6578          children.add(new Property("value", "string", "The value to compare to.", 0, 1, value));
6579          children.add(new Property("warningOnly", "boolean", "Whether or not the test execution will produce a warning only on error for this assert.", 0, 1, warningOnly));
6580        }
6581
6582        @Override
6583        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
6584          switch (_hash) {
6585          case 102727412: /*label*/  return new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label);
6586          case -1724546052: /*description*/  return new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description);
6587          case -962590849: /*direction*/  return new Property("direction", "code", "The direction to use for the assertion.", 0, 1, direction);
6588          case 2081856758: /*compareToSourceId*/  return new Property("compareToSourceId", "string", "Id of the source fixture used as the contents to be evaluated by either the \"source/expression\" or \"sourceId/path\" definition.", 0, 1, compareToSourceId);
6589          case -1415702669: /*compareToSourceExpression*/  return new Property("compareToSourceExpression", "string", "The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.", 0, 1, compareToSourceExpression);
6590          case -790206144: /*compareToSourcePath*/  return new Property("compareToSourcePath", "string", "XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.", 0, 1, compareToSourcePath);
6591          case -389131437: /*contentType*/  return new Property("contentType", "code", "The mime-type contents to compare against the request or response message 'Content-Type' header.", 0, 1, contentType);
6592          case -1795452264: /*expression*/  return new Property("expression", "string", "The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.", 0, 1, expression);
6593          case 1160732269: /*headerField*/  return new Property("headerField", "string", "The HTTP header field name e.g. 'Location'.", 0, 1, headerField);
6594          case 818925001: /*minimumId*/  return new Property("minimumId", "string", "The ID of a fixture.  Asserts that the response contains at a minimum the fixture specified by minimumId.", 0, 1, minimumId);
6595          case 1001488901: /*navigationLinks*/  return new Property("navigationLinks", "boolean", "Whether or not the test execution performs validation on the bundle navigation links.", 0, 1, navigationLinks);
6596          case -500553564: /*operator*/  return new Property("operator", "code", "The operator type defines the conditional behavior of the assert. If not defined, the default is equals.", 0, 1, operator);
6597          case 3433509: /*path*/  return new Property("path", "string", "The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.", 0, 1, path);
6598          case 1217874000: /*requestMethod*/  return new Property("requestMethod", "code", "The request method or HTTP operation code to compare against that used by the client system under test.", 0, 1, requestMethod);
6599          case 37099616: /*requestURL*/  return new Property("requestURL", "string", "The value to use in a comparison against the request URL path string.", 0, 1, requestURL);
6600          case -341064690: /*resource*/  return new Property("resource", "code", "The type of the resource.  See http://build.fhir.org/resourcelist.html.", 0, 1, resource);
6601          case -340323263: /*response*/  return new Property("response", "code", "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.", 0, 1, response);
6602          case 1438723534: /*responseCode*/  return new Property("responseCode", "string", "The value of the HTTP response code to be tested.", 0, 1, responseCode);
6603          case 1746327190: /*sourceId*/  return new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField  against.", 0, 1, sourceId);
6604          case 1555541038: /*validateProfileId*/  return new Property("validateProfileId", "id", "The ID of the Profile to validate against.", 0, 1, validateProfileId);
6605          case 111972721: /*value*/  return new Property("value", "string", "The value to compare to.", 0, 1, value);
6606          case -481159832: /*warningOnly*/  return new Property("warningOnly", "boolean", "Whether or not the test execution will produce a warning only on error for this assert.", 0, 1, warningOnly);
6607          default: return super.getNamedProperty(_hash, _name, _checkValid);
6608          }
6609
6610        }
6611
6612      @Override
6613      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
6614        switch (hash) {
6615        case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType
6616        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
6617        case -962590849: /*direction*/ return this.direction == null ? new Base[0] : new Base[] {this.direction}; // Enumeration<AssertionDirectionType>
6618        case 2081856758: /*compareToSourceId*/ return this.compareToSourceId == null ? new Base[0] : new Base[] {this.compareToSourceId}; // StringType
6619        case -1415702669: /*compareToSourceExpression*/ return this.compareToSourceExpression == null ? new Base[0] : new Base[] {this.compareToSourceExpression}; // StringType
6620        case -790206144: /*compareToSourcePath*/ return this.compareToSourcePath == null ? new Base[0] : new Base[] {this.compareToSourcePath}; // StringType
6621        case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // CodeType
6622        case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType
6623        case 1160732269: /*headerField*/ return this.headerField == null ? new Base[0] : new Base[] {this.headerField}; // StringType
6624        case 818925001: /*minimumId*/ return this.minimumId == null ? new Base[0] : new Base[] {this.minimumId}; // StringType
6625        case 1001488901: /*navigationLinks*/ return this.navigationLinks == null ? new Base[0] : new Base[] {this.navigationLinks}; // BooleanType
6626        case -500553564: /*operator*/ return this.operator == null ? new Base[0] : new Base[] {this.operator}; // Enumeration<AssertionOperatorType>
6627        case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
6628        case 1217874000: /*requestMethod*/ return this.requestMethod == null ? new Base[0] : new Base[] {this.requestMethod}; // Enumeration<TestScriptRequestMethodCode>
6629        case 37099616: /*requestURL*/ return this.requestURL == null ? new Base[0] : new Base[] {this.requestURL}; // StringType
6630        case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // CodeType
6631        case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // Enumeration<AssertionResponseTypes>
6632        case 1438723534: /*responseCode*/ return this.responseCode == null ? new Base[0] : new Base[] {this.responseCode}; // StringType
6633        case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType
6634        case 1555541038: /*validateProfileId*/ return this.validateProfileId == null ? new Base[0] : new Base[] {this.validateProfileId}; // IdType
6635        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType
6636        case -481159832: /*warningOnly*/ return this.warningOnly == null ? new Base[0] : new Base[] {this.warningOnly}; // BooleanType
6637        default: return super.getProperty(hash, name, checkValid);
6638        }
6639
6640      }
6641
6642      @Override
6643      public Base setProperty(int hash, String name, Base value) throws FHIRException {
6644        switch (hash) {
6645        case 102727412: // label
6646          this.label = castToString(value); // StringType
6647          return value;
6648        case -1724546052: // description
6649          this.description = castToString(value); // StringType
6650          return value;
6651        case -962590849: // direction
6652          value = new AssertionDirectionTypeEnumFactory().fromType(castToCode(value));
6653          this.direction = (Enumeration) value; // Enumeration<AssertionDirectionType>
6654          return value;
6655        case 2081856758: // compareToSourceId
6656          this.compareToSourceId = castToString(value); // StringType
6657          return value;
6658        case -1415702669: // compareToSourceExpression
6659          this.compareToSourceExpression = castToString(value); // StringType
6660          return value;
6661        case -790206144: // compareToSourcePath
6662          this.compareToSourcePath = castToString(value); // StringType
6663          return value;
6664        case -389131437: // contentType
6665          this.contentType = castToCode(value); // CodeType
6666          return value;
6667        case -1795452264: // expression
6668          this.expression = castToString(value); // StringType
6669          return value;
6670        case 1160732269: // headerField
6671          this.headerField = castToString(value); // StringType
6672          return value;
6673        case 818925001: // minimumId
6674          this.minimumId = castToString(value); // StringType
6675          return value;
6676        case 1001488901: // navigationLinks
6677          this.navigationLinks = castToBoolean(value); // BooleanType
6678          return value;
6679        case -500553564: // operator
6680          value = new AssertionOperatorTypeEnumFactory().fromType(castToCode(value));
6681          this.operator = (Enumeration) value; // Enumeration<AssertionOperatorType>
6682          return value;
6683        case 3433509: // path
6684          this.path = castToString(value); // StringType
6685          return value;
6686        case 1217874000: // requestMethod
6687          value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value));
6688          this.requestMethod = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode>
6689          return value;
6690        case 37099616: // requestURL
6691          this.requestURL = castToString(value); // StringType
6692          return value;
6693        case -341064690: // resource
6694          this.resource = castToCode(value); // CodeType
6695          return value;
6696        case -340323263: // response
6697          value = new AssertionResponseTypesEnumFactory().fromType(castToCode(value));
6698          this.response = (Enumeration) value; // Enumeration<AssertionResponseTypes>
6699          return value;
6700        case 1438723534: // responseCode
6701          this.responseCode = castToString(value); // StringType
6702          return value;
6703        case 1746327190: // sourceId
6704          this.sourceId = castToId(value); // IdType
6705          return value;
6706        case 1555541038: // validateProfileId
6707          this.validateProfileId = castToId(value); // IdType
6708          return value;
6709        case 111972721: // value
6710          this.value = castToString(value); // StringType
6711          return value;
6712        case -481159832: // warningOnly
6713          this.warningOnly = castToBoolean(value); // BooleanType
6714          return value;
6715        default: return super.setProperty(hash, name, value);
6716        }
6717
6718      }
6719
6720      @Override
6721      public Base setProperty(String name, Base value) throws FHIRException {
6722        if (name.equals("label")) {
6723          this.label = castToString(value); // StringType
6724        } else if (name.equals("description")) {
6725          this.description = castToString(value); // StringType
6726        } else if (name.equals("direction")) {
6727          value = new AssertionDirectionTypeEnumFactory().fromType(castToCode(value));
6728          this.direction = (Enumeration) value; // Enumeration<AssertionDirectionType>
6729        } else if (name.equals("compareToSourceId")) {
6730          this.compareToSourceId = castToString(value); // StringType
6731        } else if (name.equals("compareToSourceExpression")) {
6732          this.compareToSourceExpression = castToString(value); // StringType
6733        } else if (name.equals("compareToSourcePath")) {
6734          this.compareToSourcePath = castToString(value); // StringType
6735        } else if (name.equals("contentType")) {
6736          this.contentType = castToCode(value); // CodeType
6737        } else if (name.equals("expression")) {
6738          this.expression = castToString(value); // StringType
6739        } else if (name.equals("headerField")) {
6740          this.headerField = castToString(value); // StringType
6741        } else if (name.equals("minimumId")) {
6742          this.minimumId = castToString(value); // StringType
6743        } else if (name.equals("navigationLinks")) {
6744          this.navigationLinks = castToBoolean(value); // BooleanType
6745        } else if (name.equals("operator")) {
6746          value = new AssertionOperatorTypeEnumFactory().fromType(castToCode(value));
6747          this.operator = (Enumeration) value; // Enumeration<AssertionOperatorType>
6748        } else if (name.equals("path")) {
6749          this.path = castToString(value); // StringType
6750        } else if (name.equals("requestMethod")) {
6751          value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value));
6752          this.requestMethod = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode>
6753        } else if (name.equals("requestURL")) {
6754          this.requestURL = castToString(value); // StringType
6755        } else if (name.equals("resource")) {
6756          this.resource = castToCode(value); // CodeType
6757        } else if (name.equals("response")) {
6758          value = new AssertionResponseTypesEnumFactory().fromType(castToCode(value));
6759          this.response = (Enumeration) value; // Enumeration<AssertionResponseTypes>
6760        } else if (name.equals("responseCode")) {
6761          this.responseCode = castToString(value); // StringType
6762        } else if (name.equals("sourceId")) {
6763          this.sourceId = castToId(value); // IdType
6764        } else if (name.equals("validateProfileId")) {
6765          this.validateProfileId = castToId(value); // IdType
6766        } else if (name.equals("value")) {
6767          this.value = castToString(value); // StringType
6768        } else if (name.equals("warningOnly")) {
6769          this.warningOnly = castToBoolean(value); // BooleanType
6770        } else
6771          return super.setProperty(name, value);
6772        return value;
6773      }
6774
6775      @Override
6776      public Base makeProperty(int hash, String name) throws FHIRException {
6777        switch (hash) {
6778        case 102727412:  return getLabelElement();
6779        case -1724546052:  return getDescriptionElement();
6780        case -962590849:  return getDirectionElement();
6781        case 2081856758:  return getCompareToSourceIdElement();
6782        case -1415702669:  return getCompareToSourceExpressionElement();
6783        case -790206144:  return getCompareToSourcePathElement();
6784        case -389131437:  return getContentTypeElement();
6785        case -1795452264:  return getExpressionElement();
6786        case 1160732269:  return getHeaderFieldElement();
6787        case 818925001:  return getMinimumIdElement();
6788        case 1001488901:  return getNavigationLinksElement();
6789        case -500553564:  return getOperatorElement();
6790        case 3433509:  return getPathElement();
6791        case 1217874000:  return getRequestMethodElement();
6792        case 37099616:  return getRequestURLElement();
6793        case -341064690:  return getResourceElement();
6794        case -340323263:  return getResponseElement();
6795        case 1438723534:  return getResponseCodeElement();
6796        case 1746327190:  return getSourceIdElement();
6797        case 1555541038:  return getValidateProfileIdElement();
6798        case 111972721:  return getValueElement();
6799        case -481159832:  return getWarningOnlyElement();
6800        default: return super.makeProperty(hash, name);
6801        }
6802
6803      }
6804
6805      @Override
6806      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
6807        switch (hash) {
6808        case 102727412: /*label*/ return new String[] {"string"};
6809        case -1724546052: /*description*/ return new String[] {"string"};
6810        case -962590849: /*direction*/ return new String[] {"code"};
6811        case 2081856758: /*compareToSourceId*/ return new String[] {"string"};
6812        case -1415702669: /*compareToSourceExpression*/ return new String[] {"string"};
6813        case -790206144: /*compareToSourcePath*/ return new String[] {"string"};
6814        case -389131437: /*contentType*/ return new String[] {"code"};
6815        case -1795452264: /*expression*/ return new String[] {"string"};
6816        case 1160732269: /*headerField*/ return new String[] {"string"};
6817        case 818925001: /*minimumId*/ return new String[] {"string"};
6818        case 1001488901: /*navigationLinks*/ return new String[] {"boolean"};
6819        case -500553564: /*operator*/ return new String[] {"code"};
6820        case 3433509: /*path*/ return new String[] {"string"};
6821        case 1217874000: /*requestMethod*/ return new String[] {"code"};
6822        case 37099616: /*requestURL*/ return new String[] {"string"};
6823        case -341064690: /*resource*/ return new String[] {"code"};
6824        case -340323263: /*response*/ return new String[] {"code"};
6825        case 1438723534: /*responseCode*/ return new String[] {"string"};
6826        case 1746327190: /*sourceId*/ return new String[] {"id"};
6827        case 1555541038: /*validateProfileId*/ return new String[] {"id"};
6828        case 111972721: /*value*/ return new String[] {"string"};
6829        case -481159832: /*warningOnly*/ return new String[] {"boolean"};
6830        default: return super.getTypesForProperty(hash, name);
6831        }
6832
6833      }
6834
6835      @Override
6836      public Base addChild(String name) throws FHIRException {
6837        if (name.equals("label")) {
6838          throw new FHIRException("Cannot call addChild on a primitive type TestScript.label");
6839        }
6840        else if (name.equals("description")) {
6841          throw new FHIRException("Cannot call addChild on a primitive type TestScript.description");
6842        }
6843        else if (name.equals("direction")) {
6844          throw new FHIRException("Cannot call addChild on a primitive type TestScript.direction");
6845        }
6846        else if (name.equals("compareToSourceId")) {
6847          throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourceId");
6848        }
6849        else if (name.equals("compareToSourceExpression")) {
6850          throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourceExpression");
6851        }
6852        else if (name.equals("compareToSourcePath")) {
6853          throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourcePath");
6854        }
6855        else if (name.equals("contentType")) {
6856          throw new FHIRException("Cannot call addChild on a primitive type TestScript.contentType");
6857        }
6858        else if (name.equals("expression")) {
6859          throw new FHIRException("Cannot call addChild on a primitive type TestScript.expression");
6860        }
6861        else if (name.equals("headerField")) {
6862          throw new FHIRException("Cannot call addChild on a primitive type TestScript.headerField");
6863        }
6864        else if (name.equals("minimumId")) {
6865          throw new FHIRException("Cannot call addChild on a primitive type TestScript.minimumId");
6866        }
6867        else if (name.equals("navigationLinks")) {
6868          throw new FHIRException("Cannot call addChild on a primitive type TestScript.navigationLinks");
6869        }
6870        else if (name.equals("operator")) {
6871          throw new FHIRException("Cannot call addChild on a primitive type TestScript.operator");
6872        }
6873        else if (name.equals("path")) {
6874          throw new FHIRException("Cannot call addChild on a primitive type TestScript.path");
6875        }
6876        else if (name.equals("requestMethod")) {
6877          throw new FHIRException("Cannot call addChild on a primitive type TestScript.requestMethod");
6878        }
6879        else if (name.equals("requestURL")) {
6880          throw new FHIRException("Cannot call addChild on a primitive type TestScript.requestURL");
6881        }
6882        else if (name.equals("resource")) {
6883          throw new FHIRException("Cannot call addChild on a primitive type TestScript.resource");
6884        }
6885        else if (name.equals("response")) {
6886          throw new FHIRException("Cannot call addChild on a primitive type TestScript.response");
6887        }
6888        else if (name.equals("responseCode")) {
6889          throw new FHIRException("Cannot call addChild on a primitive type TestScript.responseCode");
6890        }
6891        else if (name.equals("sourceId")) {
6892          throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId");
6893        }
6894        else if (name.equals("validateProfileId")) {
6895          throw new FHIRException("Cannot call addChild on a primitive type TestScript.validateProfileId");
6896        }
6897        else if (name.equals("value")) {
6898          throw new FHIRException("Cannot call addChild on a primitive type TestScript.value");
6899        }
6900        else if (name.equals("warningOnly")) {
6901          throw new FHIRException("Cannot call addChild on a primitive type TestScript.warningOnly");
6902        }
6903        else
6904          return super.addChild(name);
6905      }
6906
6907      public SetupActionAssertComponent copy() {
6908        SetupActionAssertComponent dst = new SetupActionAssertComponent();
6909        copyValues(dst);
6910        dst.label = label == null ? null : label.copy();
6911        dst.description = description == null ? null : description.copy();
6912        dst.direction = direction == null ? null : direction.copy();
6913        dst.compareToSourceId = compareToSourceId == null ? null : compareToSourceId.copy();
6914        dst.compareToSourceExpression = compareToSourceExpression == null ? null : compareToSourceExpression.copy();
6915        dst.compareToSourcePath = compareToSourcePath == null ? null : compareToSourcePath.copy();
6916        dst.contentType = contentType == null ? null : contentType.copy();
6917        dst.expression = expression == null ? null : expression.copy();
6918        dst.headerField = headerField == null ? null : headerField.copy();
6919        dst.minimumId = minimumId == null ? null : minimumId.copy();
6920        dst.navigationLinks = navigationLinks == null ? null : navigationLinks.copy();
6921        dst.operator = operator == null ? null : operator.copy();
6922        dst.path = path == null ? null : path.copy();
6923        dst.requestMethod = requestMethod == null ? null : requestMethod.copy();
6924        dst.requestURL = requestURL == null ? null : requestURL.copy();
6925        dst.resource = resource == null ? null : resource.copy();
6926        dst.response = response == null ? null : response.copy();
6927        dst.responseCode = responseCode == null ? null : responseCode.copy();
6928        dst.sourceId = sourceId == null ? null : sourceId.copy();
6929        dst.validateProfileId = validateProfileId == null ? null : validateProfileId.copy();
6930        dst.value = value == null ? null : value.copy();
6931        dst.warningOnly = warningOnly == null ? null : warningOnly.copy();
6932        return dst;
6933      }
6934
6935      @Override
6936      public boolean equalsDeep(Base other_) {
6937        if (!super.equalsDeep(other_))
6938          return false;
6939        if (!(other_ instanceof SetupActionAssertComponent))
6940          return false;
6941        SetupActionAssertComponent o = (SetupActionAssertComponent) other_;
6942        return compareDeep(label, o.label, true) && compareDeep(description, o.description, true) && compareDeep(direction, o.direction, true)
6943           && compareDeep(compareToSourceId, o.compareToSourceId, true) && compareDeep(compareToSourceExpression, o.compareToSourceExpression, true)
6944           && compareDeep(compareToSourcePath, o.compareToSourcePath, true) && compareDeep(contentType, o.contentType, true)
6945           && compareDeep(expression, o.expression, true) && compareDeep(headerField, o.headerField, true)
6946           && compareDeep(minimumId, o.minimumId, true) && compareDeep(navigationLinks, o.navigationLinks, true)
6947           && compareDeep(operator, o.operator, true) && compareDeep(path, o.path, true) && compareDeep(requestMethod, o.requestMethod, true)
6948           && compareDeep(requestURL, o.requestURL, true) && compareDeep(resource, o.resource, true) && compareDeep(response, o.response, true)
6949           && compareDeep(responseCode, o.responseCode, true) && compareDeep(sourceId, o.sourceId, true) && compareDeep(validateProfileId, o.validateProfileId, true)
6950           && compareDeep(value, o.value, true) && compareDeep(warningOnly, o.warningOnly, true);
6951      }
6952
6953      @Override
6954      public boolean equalsShallow(Base other_) {
6955        if (!super.equalsShallow(other_))
6956          return false;
6957        if (!(other_ instanceof SetupActionAssertComponent))
6958          return false;
6959        SetupActionAssertComponent o = (SetupActionAssertComponent) other_;
6960        return compareValues(label, o.label, true) && compareValues(description, o.description, true) && compareValues(direction, o.direction, true)
6961           && compareValues(compareToSourceId, o.compareToSourceId, true) && compareValues(compareToSourceExpression, o.compareToSourceExpression, true)
6962           && compareValues(compareToSourcePath, o.compareToSourcePath, true) && compareValues(contentType, o.contentType, true)
6963           && compareValues(expression, o.expression, true) && compareValues(headerField, o.headerField, true)
6964           && compareValues(minimumId, o.minimumId, true) && compareValues(navigationLinks, o.navigationLinks, true)
6965           && compareValues(operator, o.operator, true) && compareValues(path, o.path, true) && compareValues(requestMethod, o.requestMethod, true)
6966           && compareValues(requestURL, o.requestURL, true) && compareValues(resource, o.resource, true) && compareValues(response, o.response, true)
6967           && compareValues(responseCode, o.responseCode, true) && compareValues(sourceId, o.sourceId, true) && compareValues(validateProfileId, o.validateProfileId, true)
6968           && compareValues(value, o.value, true) && compareValues(warningOnly, o.warningOnly, true);
6969      }
6970
6971      public boolean isEmpty() {
6972        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(label, description, direction
6973          , compareToSourceId, compareToSourceExpression, compareToSourcePath, contentType, expression
6974          , headerField, minimumId, navigationLinks, operator, path, requestMethod, requestURL
6975          , resource, response, responseCode, sourceId, validateProfileId, value, warningOnly
6976          );
6977      }
6978
6979  public String fhirType() {
6980    return "TestScript.setup.action.assert";
6981
6982  }
6983
6984  }
6985
6986    @Block()
6987    public static class TestScriptTestComponent extends BackboneElement implements IBaseBackboneElement {
6988        /**
6989         * The name of this test used for tracking/logging purposes by test engines.
6990         */
6991        @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
6992        @Description(shortDefinition="Tracking/logging name of this test", formalDefinition="The name of this test used for tracking/logging purposes by test engines." )
6993        protected StringType name;
6994
6995        /**
6996         * A short description of the test used by test engines for tracking and reporting purposes.
6997         */
6998        @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
6999        @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." )
7000        protected StringType description;
7001
7002        /**
7003         * Action would contain either an operation or an assertion.
7004         */
7005        @Child(name = "action", type = {}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
7006        @Description(shortDefinition="A test operation or assert to perform", formalDefinition="Action would contain either an operation or an assertion." )
7007        protected List<TestActionComponent> action;
7008
7009        private static final long serialVersionUID = -865006110L;
7010
7011    /**
7012     * Constructor
7013     */
7014      public TestScriptTestComponent() {
7015        super();
7016      }
7017
7018        /**
7019         * @return {@link #name} (The name of this test used for tracking/logging purposes by test engines.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
7020         */
7021        public StringType getNameElement() { 
7022          if (this.name == null)
7023            if (Configuration.errorOnAutoCreate())
7024              throw new Error("Attempt to auto-create TestScriptTestComponent.name");
7025            else if (Configuration.doAutoCreate())
7026              this.name = new StringType(); // bb
7027          return this.name;
7028        }
7029
7030        public boolean hasNameElement() { 
7031          return this.name != null && !this.name.isEmpty();
7032        }
7033
7034        public boolean hasName() { 
7035          return this.name != null && !this.name.isEmpty();
7036        }
7037
7038        /**
7039         * @param value {@link #name} (The name of this test used for tracking/logging purposes by test engines.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
7040         */
7041        public TestScriptTestComponent setNameElement(StringType value) { 
7042          this.name = value;
7043          return this;
7044        }
7045
7046        /**
7047         * @return The name of this test used for tracking/logging purposes by test engines.
7048         */
7049        public String getName() { 
7050          return this.name == null ? null : this.name.getValue();
7051        }
7052
7053        /**
7054         * @param value The name of this test used for tracking/logging purposes by test engines.
7055         */
7056        public TestScriptTestComponent setName(String value) { 
7057          if (Utilities.noString(value))
7058            this.name = null;
7059          else {
7060            if (this.name == null)
7061              this.name = new StringType();
7062            this.name.setValue(value);
7063          }
7064          return this;
7065        }
7066
7067        /**
7068         * @return {@link #description} (A short description of the test used by test engines for tracking and reporting purposes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
7069         */
7070        public StringType getDescriptionElement() { 
7071          if (this.description == null)
7072            if (Configuration.errorOnAutoCreate())
7073              throw new Error("Attempt to auto-create TestScriptTestComponent.description");
7074            else if (Configuration.doAutoCreate())
7075              this.description = new StringType(); // bb
7076          return this.description;
7077        }
7078
7079        public boolean hasDescriptionElement() { 
7080          return this.description != null && !this.description.isEmpty();
7081        }
7082
7083        public boolean hasDescription() { 
7084          return this.description != null && !this.description.isEmpty();
7085        }
7086
7087        /**
7088         * @param value {@link #description} (A short description of the test used by test engines for tracking and reporting purposes.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
7089         */
7090        public TestScriptTestComponent setDescriptionElement(StringType value) { 
7091          this.description = value;
7092          return this;
7093        }
7094
7095        /**
7096         * @return A short description of the test used by test engines for tracking and reporting purposes.
7097         */
7098        public String getDescription() { 
7099          return this.description == null ? null : this.description.getValue();
7100        }
7101
7102        /**
7103         * @param value A short description of the test used by test engines for tracking and reporting purposes.
7104         */
7105        public TestScriptTestComponent setDescription(String value) { 
7106          if (Utilities.noString(value))
7107            this.description = null;
7108          else {
7109            if (this.description == null)
7110              this.description = new StringType();
7111            this.description.setValue(value);
7112          }
7113          return this;
7114        }
7115
7116        /**
7117         * @return {@link #action} (Action would contain either an operation or an assertion.)
7118         */
7119        public List<TestActionComponent> getAction() { 
7120          if (this.action == null)
7121            this.action = new ArrayList<TestActionComponent>();
7122          return this.action;
7123        }
7124
7125        /**
7126         * @return Returns a reference to <code>this</code> for easy method chaining
7127         */
7128        public TestScriptTestComponent setAction(List<TestActionComponent> theAction) { 
7129          this.action = theAction;
7130          return this;
7131        }
7132
7133        public boolean hasAction() { 
7134          if (this.action == null)
7135            return false;
7136          for (TestActionComponent item : this.action)
7137            if (!item.isEmpty())
7138              return true;
7139          return false;
7140        }
7141
7142        public TestActionComponent addAction() { //3
7143          TestActionComponent t = new TestActionComponent();
7144          if (this.action == null)
7145            this.action = new ArrayList<TestActionComponent>();
7146          this.action.add(t);
7147          return t;
7148        }
7149
7150        public TestScriptTestComponent addAction(TestActionComponent t) { //3
7151          if (t == null)
7152            return this;
7153          if (this.action == null)
7154            this.action = new ArrayList<TestActionComponent>();
7155          this.action.add(t);
7156          return this;
7157        }
7158
7159        /**
7160         * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist
7161         */
7162        public TestActionComponent getActionFirstRep() { 
7163          if (getAction().isEmpty()) {
7164            addAction();
7165          }
7166          return getAction().get(0);
7167        }
7168
7169        protected void listChildren(List<Property> children) {
7170          super.listChildren(children);
7171          children.add(new Property("name", "string", "The name of this test used for tracking/logging purposes by test engines.", 0, 1, name));
7172          children.add(new Property("description", "string", "A short description of the test used by test engines for tracking and reporting purposes.", 0, 1, description));
7173          children.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action));
7174        }
7175
7176        @Override
7177        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
7178          switch (_hash) {
7179          case 3373707: /*name*/  return new Property("name", "string", "The name of this test used for tracking/logging purposes by test engines.", 0, 1, name);
7180          case -1724546052: /*description*/  return new Property("description", "string", "A short description of the test used by test engines for tracking and reporting purposes.", 0, 1, description);
7181          case -1422950858: /*action*/  return new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action);
7182          default: return super.getNamedProperty(_hash, _name, _checkValid);
7183          }
7184
7185        }
7186
7187      @Override
7188      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
7189        switch (hash) {
7190        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
7191        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
7192        case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // TestActionComponent
7193        default: return super.getProperty(hash, name, checkValid);
7194        }
7195
7196      }
7197
7198      @Override
7199      public Base setProperty(int hash, String name, Base value) throws FHIRException {
7200        switch (hash) {
7201        case 3373707: // name
7202          this.name = castToString(value); // StringType
7203          return value;
7204        case -1724546052: // description
7205          this.description = castToString(value); // StringType
7206          return value;
7207        case -1422950858: // action
7208          this.getAction().add((TestActionComponent) value); // TestActionComponent
7209          return value;
7210        default: return super.setProperty(hash, name, value);
7211        }
7212
7213      }
7214
7215      @Override
7216      public Base setProperty(String name, Base value) throws FHIRException {
7217        if (name.equals("name")) {
7218          this.name = castToString(value); // StringType
7219        } else if (name.equals("description")) {
7220          this.description = castToString(value); // StringType
7221        } else if (name.equals("action")) {
7222          this.getAction().add((TestActionComponent) value);
7223        } else
7224          return super.setProperty(name, value);
7225        return value;
7226      }
7227
7228      @Override
7229      public Base makeProperty(int hash, String name) throws FHIRException {
7230        switch (hash) {
7231        case 3373707:  return getNameElement();
7232        case -1724546052:  return getDescriptionElement();
7233        case -1422950858:  return addAction(); 
7234        default: return super.makeProperty(hash, name);
7235        }
7236
7237      }
7238
7239      @Override
7240      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
7241        switch (hash) {
7242        case 3373707: /*name*/ return new String[] {"string"};
7243        case -1724546052: /*description*/ return new String[] {"string"};
7244        case -1422950858: /*action*/ return new String[] {};
7245        default: return super.getTypesForProperty(hash, name);
7246        }
7247
7248      }
7249
7250      @Override
7251      public Base addChild(String name) throws FHIRException {
7252        if (name.equals("name")) {
7253          throw new FHIRException("Cannot call addChild on a primitive type TestScript.name");
7254        }
7255        else if (name.equals("description")) {
7256          throw new FHIRException("Cannot call addChild on a primitive type TestScript.description");
7257        }
7258        else if (name.equals("action")) {
7259          return addAction();
7260        }
7261        else
7262          return super.addChild(name);
7263      }
7264
7265      public TestScriptTestComponent copy() {
7266        TestScriptTestComponent dst = new TestScriptTestComponent();
7267        copyValues(dst);
7268        dst.name = name == null ? null : name.copy();
7269        dst.description = description == null ? null : description.copy();
7270        if (action != null) {
7271          dst.action = new ArrayList<TestActionComponent>();
7272          for (TestActionComponent i : action)
7273            dst.action.add(i.copy());
7274        };
7275        return dst;
7276      }
7277
7278      @Override
7279      public boolean equalsDeep(Base other_) {
7280        if (!super.equalsDeep(other_))
7281          return false;
7282        if (!(other_ instanceof TestScriptTestComponent))
7283          return false;
7284        TestScriptTestComponent o = (TestScriptTestComponent) other_;
7285        return compareDeep(name, o.name, true) && compareDeep(description, o.description, true) && compareDeep(action, o.action, true)
7286          ;
7287      }
7288
7289      @Override
7290      public boolean equalsShallow(Base other_) {
7291        if (!super.equalsShallow(other_))
7292          return false;
7293        if (!(other_ instanceof TestScriptTestComponent))
7294          return false;
7295        TestScriptTestComponent o = (TestScriptTestComponent) other_;
7296        return compareValues(name, o.name, true) && compareValues(description, o.description, true);
7297      }
7298
7299      public boolean isEmpty() {
7300        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, description, action
7301          );
7302      }
7303
7304  public String fhirType() {
7305    return "TestScript.test";
7306
7307  }
7308
7309  }
7310
7311    @Block()
7312    public static class TestActionComponent extends BackboneElement implements IBaseBackboneElement {
7313        /**
7314         * An operation would involve a REST request to a server.
7315         */
7316        @Child(name = "operation", type = {SetupActionOperationComponent.class}, order=1, min=0, max=1, modifier=false, summary=false)
7317        @Description(shortDefinition="The setup operation to perform", formalDefinition="An operation would involve a REST request to a server." )
7318        protected SetupActionOperationComponent operation;
7319
7320        /**
7321         * Evaluates the results of previous operations to determine if the server under test behaves appropriately.
7322         */
7323        @Child(name = "assert", type = {SetupActionAssertComponent.class}, order=2, min=0, max=1, modifier=false, summary=false)
7324        @Description(shortDefinition="The setup assertion to perform", formalDefinition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." )
7325        protected SetupActionAssertComponent assert_;
7326
7327        private static final long serialVersionUID = -252088305L;
7328
7329    /**
7330     * Constructor
7331     */
7332      public TestActionComponent() {
7333        super();
7334      }
7335
7336        /**
7337         * @return {@link #operation} (An operation would involve a REST request to a server.)
7338         */
7339        public SetupActionOperationComponent getOperation() { 
7340          if (this.operation == null)
7341            if (Configuration.errorOnAutoCreate())
7342              throw new Error("Attempt to auto-create TestActionComponent.operation");
7343            else if (Configuration.doAutoCreate())
7344              this.operation = new SetupActionOperationComponent(); // cc
7345          return this.operation;
7346        }
7347
7348        public boolean hasOperation() { 
7349          return this.operation != null && !this.operation.isEmpty();
7350        }
7351
7352        /**
7353         * @param value {@link #operation} (An operation would involve a REST request to a server.)
7354         */
7355        public TestActionComponent setOperation(SetupActionOperationComponent value) { 
7356          this.operation = value;
7357          return this;
7358        }
7359
7360        /**
7361         * @return {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.)
7362         */
7363        public SetupActionAssertComponent getAssert() { 
7364          if (this.assert_ == null)
7365            if (Configuration.errorOnAutoCreate())
7366              throw new Error("Attempt to auto-create TestActionComponent.assert_");
7367            else if (Configuration.doAutoCreate())
7368              this.assert_ = new SetupActionAssertComponent(); // cc
7369          return this.assert_;
7370        }
7371
7372        public boolean hasAssert() { 
7373          return this.assert_ != null && !this.assert_.isEmpty();
7374        }
7375
7376        /**
7377         * @param value {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.)
7378         */
7379        public TestActionComponent setAssert(SetupActionAssertComponent value) { 
7380          this.assert_ = value;
7381          return this;
7382        }
7383
7384        protected void listChildren(List<Property> children) {
7385          super.listChildren(children);
7386          children.add(new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation));
7387          children.add(new Property("assert", "@TestScript.setup.action.assert", "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", 0, 1, assert_));
7388        }
7389
7390        @Override
7391        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
7392          switch (_hash) {
7393          case 1662702951: /*operation*/  return new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation);
7394          case -1408208058: /*assert*/  return new Property("assert", "@TestScript.setup.action.assert", "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", 0, 1, assert_);
7395          default: return super.getNamedProperty(_hash, _name, _checkValid);
7396          }
7397
7398        }
7399
7400      @Override
7401      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
7402        switch (hash) {
7403        case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent
7404        case -1408208058: /*assert*/ return this.assert_ == null ? new Base[0] : new Base[] {this.assert_}; // SetupActionAssertComponent
7405        default: return super.getProperty(hash, name, checkValid);
7406        }
7407
7408      }
7409
7410      @Override
7411      public Base setProperty(int hash, String name, Base value) throws FHIRException {
7412        switch (hash) {
7413        case 1662702951: // operation
7414          this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
7415          return value;
7416        case -1408208058: // assert
7417          this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
7418          return value;
7419        default: return super.setProperty(hash, name, value);
7420        }
7421
7422      }
7423
7424      @Override
7425      public Base setProperty(String name, Base value) throws FHIRException {
7426        if (name.equals("operation")) {
7427          this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
7428        } else if (name.equals("assert")) {
7429          this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
7430        } else
7431          return super.setProperty(name, value);
7432        return value;
7433      }
7434
7435      @Override
7436      public Base makeProperty(int hash, String name) throws FHIRException {
7437        switch (hash) {
7438        case 1662702951:  return getOperation(); 
7439        case -1408208058:  return getAssert(); 
7440        default: return super.makeProperty(hash, name);
7441        }
7442
7443      }
7444
7445      @Override
7446      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
7447        switch (hash) {
7448        case 1662702951: /*operation*/ return new String[] {"@TestScript.setup.action.operation"};
7449        case -1408208058: /*assert*/ return new String[] {"@TestScript.setup.action.assert"};
7450        default: return super.getTypesForProperty(hash, name);
7451        }
7452
7453      }
7454
7455      @Override
7456      public Base addChild(String name) throws FHIRException {
7457        if (name.equals("operation")) {
7458          this.operation = new SetupActionOperationComponent();
7459          return this.operation;
7460        }
7461        else if (name.equals("assert")) {
7462          this.assert_ = new SetupActionAssertComponent();
7463          return this.assert_;
7464        }
7465        else
7466          return super.addChild(name);
7467      }
7468
7469      public TestActionComponent copy() {
7470        TestActionComponent dst = new TestActionComponent();
7471        copyValues(dst);
7472        dst.operation = operation == null ? null : operation.copy();
7473        dst.assert_ = assert_ == null ? null : assert_.copy();
7474        return dst;
7475      }
7476
7477      @Override
7478      public boolean equalsDeep(Base other_) {
7479        if (!super.equalsDeep(other_))
7480          return false;
7481        if (!(other_ instanceof TestActionComponent))
7482          return false;
7483        TestActionComponent o = (TestActionComponent) other_;
7484        return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true);
7485      }
7486
7487      @Override
7488      public boolean equalsShallow(Base other_) {
7489        if (!super.equalsShallow(other_))
7490          return false;
7491        if (!(other_ instanceof TestActionComponent))
7492          return false;
7493        TestActionComponent o = (TestActionComponent) other_;
7494        return true;
7495      }
7496
7497      public boolean isEmpty() {
7498        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation, assert_);
7499      }
7500
7501  public String fhirType() {
7502    return "TestScript.test.action";
7503
7504  }
7505
7506  }
7507
7508    @Block()
7509    public static class TestScriptTeardownComponent extends BackboneElement implements IBaseBackboneElement {
7510        /**
7511         * The teardown action will only contain an operation.
7512         */
7513        @Child(name = "action", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
7514        @Description(shortDefinition="One or more teardown operations to perform", formalDefinition="The teardown action will only contain an operation." )
7515        protected List<TeardownActionComponent> action;
7516
7517        private static final long serialVersionUID = 1168638089L;
7518
7519    /**
7520     * Constructor
7521     */
7522      public TestScriptTeardownComponent() {
7523        super();
7524      }
7525
7526        /**
7527         * @return {@link #action} (The teardown action will only contain an operation.)
7528         */
7529        public List<TeardownActionComponent> getAction() { 
7530          if (this.action == null)
7531            this.action = new ArrayList<TeardownActionComponent>();
7532          return this.action;
7533        }
7534
7535        /**
7536         * @return Returns a reference to <code>this</code> for easy method chaining
7537         */
7538        public TestScriptTeardownComponent setAction(List<TeardownActionComponent> theAction) { 
7539          this.action = theAction;
7540          return this;
7541        }
7542
7543        public boolean hasAction() { 
7544          if (this.action == null)
7545            return false;
7546          for (TeardownActionComponent item : this.action)
7547            if (!item.isEmpty())
7548              return true;
7549          return false;
7550        }
7551
7552        public TeardownActionComponent addAction() { //3
7553          TeardownActionComponent t = new TeardownActionComponent();
7554          if (this.action == null)
7555            this.action = new ArrayList<TeardownActionComponent>();
7556          this.action.add(t);
7557          return t;
7558        }
7559
7560        public TestScriptTeardownComponent addAction(TeardownActionComponent t) { //3
7561          if (t == null)
7562            return this;
7563          if (this.action == null)
7564            this.action = new ArrayList<TeardownActionComponent>();
7565          this.action.add(t);
7566          return this;
7567        }
7568
7569        /**
7570         * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist
7571         */
7572        public TeardownActionComponent getActionFirstRep() { 
7573          if (getAction().isEmpty()) {
7574            addAction();
7575          }
7576          return getAction().get(0);
7577        }
7578
7579        protected void listChildren(List<Property> children) {
7580          super.listChildren(children);
7581          children.add(new Property("action", "", "The teardown action will only contain an operation.", 0, java.lang.Integer.MAX_VALUE, action));
7582        }
7583
7584        @Override
7585        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
7586          switch (_hash) {
7587          case -1422950858: /*action*/  return new Property("action", "", "The teardown action will only contain an operation.", 0, java.lang.Integer.MAX_VALUE, action);
7588          default: return super.getNamedProperty(_hash, _name, _checkValid);
7589          }
7590
7591        }
7592
7593      @Override
7594      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
7595        switch (hash) {
7596        case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // TeardownActionComponent
7597        default: return super.getProperty(hash, name, checkValid);
7598        }
7599
7600      }
7601
7602      @Override
7603      public Base setProperty(int hash, String name, Base value) throws FHIRException {
7604        switch (hash) {
7605        case -1422950858: // action
7606          this.getAction().add((TeardownActionComponent) value); // TeardownActionComponent
7607          return value;
7608        default: return super.setProperty(hash, name, value);
7609        }
7610
7611      }
7612
7613      @Override
7614      public Base setProperty(String name, Base value) throws FHIRException {
7615        if (name.equals("action")) {
7616          this.getAction().add((TeardownActionComponent) value);
7617        } else
7618          return super.setProperty(name, value);
7619        return value;
7620      }
7621
7622      @Override
7623      public Base makeProperty(int hash, String name) throws FHIRException {
7624        switch (hash) {
7625        case -1422950858:  return addAction(); 
7626        default: return super.makeProperty(hash, name);
7627        }
7628
7629      }
7630
7631      @Override
7632      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
7633        switch (hash) {
7634        case -1422950858: /*action*/ return new String[] {};
7635        default: return super.getTypesForProperty(hash, name);
7636        }
7637
7638      }
7639
7640      @Override
7641      public Base addChild(String name) throws FHIRException {
7642        if (name.equals("action")) {
7643          return addAction();
7644        }
7645        else
7646          return super.addChild(name);
7647      }
7648
7649      public TestScriptTeardownComponent copy() {
7650        TestScriptTeardownComponent dst = new TestScriptTeardownComponent();
7651        copyValues(dst);
7652        if (action != null) {
7653          dst.action = new ArrayList<TeardownActionComponent>();
7654          for (TeardownActionComponent i : action)
7655            dst.action.add(i.copy());
7656        };
7657        return dst;
7658      }
7659
7660      @Override
7661      public boolean equalsDeep(Base other_) {
7662        if (!super.equalsDeep(other_))
7663          return false;
7664        if (!(other_ instanceof TestScriptTeardownComponent))
7665          return false;
7666        TestScriptTeardownComponent o = (TestScriptTeardownComponent) other_;
7667        return compareDeep(action, o.action, true);
7668      }
7669
7670      @Override
7671      public boolean equalsShallow(Base other_) {
7672        if (!super.equalsShallow(other_))
7673          return false;
7674        if (!(other_ instanceof TestScriptTeardownComponent))
7675          return false;
7676        TestScriptTeardownComponent o = (TestScriptTeardownComponent) other_;
7677        return true;
7678      }
7679
7680      public boolean isEmpty() {
7681        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(action);
7682      }
7683
7684  public String fhirType() {
7685    return "TestScript.teardown";
7686
7687  }
7688
7689  }
7690
7691    @Block()
7692    public static class TeardownActionComponent extends BackboneElement implements IBaseBackboneElement {
7693        /**
7694         * An operation would involve a REST request to a server.
7695         */
7696        @Child(name = "operation", type = {SetupActionOperationComponent.class}, order=1, min=1, max=1, modifier=false, summary=false)
7697        @Description(shortDefinition="The teardown operation to perform", formalDefinition="An operation would involve a REST request to a server." )
7698        protected SetupActionOperationComponent operation;
7699
7700        private static final long serialVersionUID = -1099598054L;
7701
7702    /**
7703     * Constructor
7704     */
7705      public TeardownActionComponent() {
7706        super();
7707      }
7708
7709    /**
7710     * Constructor
7711     */
7712      public TeardownActionComponent(SetupActionOperationComponent operation) {
7713        super();
7714        this.operation = operation;
7715      }
7716
7717        /**
7718         * @return {@link #operation} (An operation would involve a REST request to a server.)
7719         */
7720        public SetupActionOperationComponent getOperation() { 
7721          if (this.operation == null)
7722            if (Configuration.errorOnAutoCreate())
7723              throw new Error("Attempt to auto-create TeardownActionComponent.operation");
7724            else if (Configuration.doAutoCreate())
7725              this.operation = new SetupActionOperationComponent(); // cc
7726          return this.operation;
7727        }
7728
7729        public boolean hasOperation() { 
7730          return this.operation != null && !this.operation.isEmpty();
7731        }
7732
7733        /**
7734         * @param value {@link #operation} (An operation would involve a REST request to a server.)
7735         */
7736        public TeardownActionComponent setOperation(SetupActionOperationComponent value) { 
7737          this.operation = value;
7738          return this;
7739        }
7740
7741        protected void listChildren(List<Property> children) {
7742          super.listChildren(children);
7743          children.add(new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation));
7744        }
7745
7746        @Override
7747        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
7748          switch (_hash) {
7749          case 1662702951: /*operation*/  return new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation);
7750          default: return super.getNamedProperty(_hash, _name, _checkValid);
7751          }
7752
7753        }
7754
7755      @Override
7756      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
7757        switch (hash) {
7758        case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent
7759        default: return super.getProperty(hash, name, checkValid);
7760        }
7761
7762      }
7763
7764      @Override
7765      public Base setProperty(int hash, String name, Base value) throws FHIRException {
7766        switch (hash) {
7767        case 1662702951: // operation
7768          this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
7769          return value;
7770        default: return super.setProperty(hash, name, value);
7771        }
7772
7773      }
7774
7775      @Override
7776      public Base setProperty(String name, Base value) throws FHIRException {
7777        if (name.equals("operation")) {
7778          this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
7779        } else
7780          return super.setProperty(name, value);
7781        return value;
7782      }
7783
7784      @Override
7785      public Base makeProperty(int hash, String name) throws FHIRException {
7786        switch (hash) {
7787        case 1662702951:  return getOperation(); 
7788        default: return super.makeProperty(hash, name);
7789        }
7790
7791      }
7792
7793      @Override
7794      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
7795        switch (hash) {
7796        case 1662702951: /*operation*/ return new String[] {"@TestScript.setup.action.operation"};
7797        default: return super.getTypesForProperty(hash, name);
7798        }
7799
7800      }
7801
7802      @Override
7803      public Base addChild(String name) throws FHIRException {
7804        if (name.equals("operation")) {
7805          this.operation = new SetupActionOperationComponent();
7806          return this.operation;
7807        }
7808        else
7809          return super.addChild(name);
7810      }
7811
7812      public TeardownActionComponent copy() {
7813        TeardownActionComponent dst = new TeardownActionComponent();
7814        copyValues(dst);
7815        dst.operation = operation == null ? null : operation.copy();
7816        return dst;
7817      }
7818
7819      @Override
7820      public boolean equalsDeep(Base other_) {
7821        if (!super.equalsDeep(other_))
7822          return false;
7823        if (!(other_ instanceof TeardownActionComponent))
7824          return false;
7825        TeardownActionComponent o = (TeardownActionComponent) other_;
7826        return compareDeep(operation, o.operation, true);
7827      }
7828
7829      @Override
7830      public boolean equalsShallow(Base other_) {
7831        if (!super.equalsShallow(other_))
7832          return false;
7833        if (!(other_ instanceof TeardownActionComponent))
7834          return false;
7835        TeardownActionComponent o = (TeardownActionComponent) other_;
7836        return true;
7837      }
7838
7839      public boolean isEmpty() {
7840        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation);
7841      }
7842
7843  public String fhirType() {
7844    return "TestScript.teardown.action";
7845
7846  }
7847
7848  }
7849
7850    /**
7851     * 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.
7852     */
7853    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true)
7854    @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." )
7855    protected Identifier identifier;
7856
7857    /**
7858     * Explanation of why this test script is needed and why it has been designed as it has.
7859     */
7860    @Child(name = "purpose", type = {MarkdownType.class}, order=1, min=0, max=1, modifier=false, summary=false)
7861    @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." )
7862    protected MarkdownType purpose;
7863
7864    /**
7865     * 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.
7866     */
7867    @Child(name = "copyright", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false)
7868    @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." )
7869    protected MarkdownType copyright;
7870
7871    /**
7872     * An abstract server used in operations within this test script in the origin element.
7873     */
7874    @Child(name = "origin", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
7875    @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." )
7876    protected List<TestScriptOriginComponent> origin;
7877
7878    /**
7879     * An abstract server used in operations within this test script in the destination element.
7880     */
7881    @Child(name = "destination", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
7882    @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." )
7883    protected List<TestScriptDestinationComponent> destination;
7884
7885    /**
7886     * The required capability must exist and are assumed to function correctly on the FHIR server being tested.
7887     */
7888    @Child(name = "metadata", type = {}, order=5, min=0, max=1, modifier=false, summary=false)
7889    @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." )
7890    protected TestScriptMetadataComponent metadata;
7891
7892    /**
7893     * Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.
7894     */
7895    @Child(name = "fixture", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
7896    @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." )
7897    protected List<TestScriptFixtureComponent> fixture;
7898
7899    /**
7900     * Reference to the profile to be used for validation.
7901     */
7902    @Child(name = "profile", type = {Reference.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
7903    @Description(shortDefinition="Reference of the validation profile", formalDefinition="Reference to the profile to be used for validation." )
7904    protected List<Reference> profile;
7905    /**
7906     * The actual objects that are the target of the reference (Reference to the profile to be used for validation.)
7907     */
7908    protected List<Resource> profileTarget;
7909
7910
7911    /**
7912     * Variable is set based either on element value in response body or on header field value in the response headers.
7913     */
7914    @Child(name = "variable", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
7915    @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." )
7916    protected List<TestScriptVariableComponent> variable;
7917
7918    /**
7919     * A series of required setup operations before tests are executed.
7920     */
7921    @Child(name = "setup", type = {}, order=9, min=0, max=1, modifier=false, summary=false)
7922    @Description(shortDefinition="A series of required setup operations before tests are executed", formalDefinition="A series of required setup operations before tests are executed." )
7923    protected TestScriptSetupComponent setup;
7924
7925    /**
7926     * A test in this script.
7927     */
7928    @Child(name = "test", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
7929    @Description(shortDefinition="A test in this script", formalDefinition="A test in this script." )
7930    protected List<TestScriptTestComponent> test;
7931
7932    /**
7933     * A series of operations required to clean up after all the tests are executed (successfully or otherwise).
7934     */
7935    @Child(name = "teardown", type = {}, order=11, min=0, max=1, modifier=false, summary=false)
7936    @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)." )
7937    protected TestScriptTeardownComponent teardown;
7938
7939    private static final long serialVersionUID = -1433230137L;
7940
7941  /**
7942   * Constructor
7943   */
7944    public TestScript() {
7945      super();
7946    }
7947
7948  /**
7949   * Constructor
7950   */
7951    public TestScript(UriType url, StringType name, Enumeration<PublicationStatus> status) {
7952      super();
7953      this.url = url;
7954      this.name = name;
7955      this.status = status;
7956    }
7957
7958    /**
7959     * @return {@link #url} (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.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
7960     */
7961    public UriType getUrlElement() { 
7962      if (this.url == null)
7963        if (Configuration.errorOnAutoCreate())
7964          throw new Error("Attempt to auto-create TestScript.url");
7965        else if (Configuration.doAutoCreate())
7966          this.url = new UriType(); // bb
7967      return this.url;
7968    }
7969
7970    public boolean hasUrlElement() { 
7971      return this.url != null && !this.url.isEmpty();
7972    }
7973
7974    public boolean hasUrl() { 
7975      return this.url != null && !this.url.isEmpty();
7976    }
7977
7978    /**
7979     * @param value {@link #url} (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.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
7980     */
7981    public TestScript setUrlElement(UriType value) { 
7982      this.url = value;
7983      return this;
7984    }
7985
7986    /**
7987     * @return 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.
7988     */
7989    public String getUrl() { 
7990      return this.url == null ? null : this.url.getValue();
7991    }
7992
7993    /**
7994     * @param value 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.
7995     */
7996    public TestScript setUrl(String value) { 
7997        if (this.url == null)
7998          this.url = new UriType();
7999        this.url.setValue(value);
8000      return this;
8001    }
8002
8003    /**
8004     * @return {@link #identifier} (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.)
8005     */
8006    public Identifier getIdentifier() { 
8007      if (this.identifier == null)
8008        if (Configuration.errorOnAutoCreate())
8009          throw new Error("Attempt to auto-create TestScript.identifier");
8010        else if (Configuration.doAutoCreate())
8011          this.identifier = new Identifier(); // cc
8012      return this.identifier;
8013    }
8014
8015    public boolean hasIdentifier() { 
8016      return this.identifier != null && !this.identifier.isEmpty();
8017    }
8018
8019    /**
8020     * @param value {@link #identifier} (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.)
8021     */
8022    public TestScript setIdentifier(Identifier value) { 
8023      this.identifier = value;
8024      return this;
8025    }
8026
8027    /**
8028     * @return {@link #version} (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.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
8029     */
8030    public StringType getVersionElement() { 
8031      if (this.version == null)
8032        if (Configuration.errorOnAutoCreate())
8033          throw new Error("Attempt to auto-create TestScript.version");
8034        else if (Configuration.doAutoCreate())
8035          this.version = new StringType(); // bb
8036      return this.version;
8037    }
8038
8039    public boolean hasVersionElement() { 
8040      return this.version != null && !this.version.isEmpty();
8041    }
8042
8043    public boolean hasVersion() { 
8044      return this.version != null && !this.version.isEmpty();
8045    }
8046
8047    /**
8048     * @param value {@link #version} (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.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
8049     */
8050    public TestScript setVersionElement(StringType value) { 
8051      this.version = value;
8052      return this;
8053    }
8054
8055    /**
8056     * @return 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.
8057     */
8058    public String getVersion() { 
8059      return this.version == null ? null : this.version.getValue();
8060    }
8061
8062    /**
8063     * @param value 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.
8064     */
8065    public TestScript setVersion(String value) { 
8066      if (Utilities.noString(value))
8067        this.version = null;
8068      else {
8069        if (this.version == null)
8070          this.version = new StringType();
8071        this.version.setValue(value);
8072      }
8073      return this;
8074    }
8075
8076    /**
8077     * @return {@link #name} (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.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
8078     */
8079    public StringType getNameElement() { 
8080      if (this.name == null)
8081        if (Configuration.errorOnAutoCreate())
8082          throw new Error("Attempt to auto-create TestScript.name");
8083        else if (Configuration.doAutoCreate())
8084          this.name = new StringType(); // bb
8085      return this.name;
8086    }
8087
8088    public boolean hasNameElement() { 
8089      return this.name != null && !this.name.isEmpty();
8090    }
8091
8092    public boolean hasName() { 
8093      return this.name != null && !this.name.isEmpty();
8094    }
8095
8096    /**
8097     * @param value {@link #name} (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.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
8098     */
8099    public TestScript setNameElement(StringType value) { 
8100      this.name = value;
8101      return this;
8102    }
8103
8104    /**
8105     * @return 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.
8106     */
8107    public String getName() { 
8108      return this.name == null ? null : this.name.getValue();
8109    }
8110
8111    /**
8112     * @param value 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.
8113     */
8114    public TestScript setName(String value) { 
8115        if (this.name == null)
8116          this.name = new StringType();
8117        this.name.setValue(value);
8118      return this;
8119    }
8120
8121    /**
8122     * @return {@link #title} (A short, descriptive, user-friendly title for the test script.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
8123     */
8124    public StringType getTitleElement() { 
8125      if (this.title == null)
8126        if (Configuration.errorOnAutoCreate())
8127          throw new Error("Attempt to auto-create TestScript.title");
8128        else if (Configuration.doAutoCreate())
8129          this.title = new StringType(); // bb
8130      return this.title;
8131    }
8132
8133    public boolean hasTitleElement() { 
8134      return this.title != null && !this.title.isEmpty();
8135    }
8136
8137    public boolean hasTitle() { 
8138      return this.title != null && !this.title.isEmpty();
8139    }
8140
8141    /**
8142     * @param value {@link #title} (A short, descriptive, user-friendly title for the test script.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
8143     */
8144    public TestScript setTitleElement(StringType value) { 
8145      this.title = value;
8146      return this;
8147    }
8148
8149    /**
8150     * @return A short, descriptive, user-friendly title for the test script.
8151     */
8152    public String getTitle() { 
8153      return this.title == null ? null : this.title.getValue();
8154    }
8155
8156    /**
8157     * @param value A short, descriptive, user-friendly title for the test script.
8158     */
8159    public TestScript setTitle(String value) { 
8160      if (Utilities.noString(value))
8161        this.title = null;
8162      else {
8163        if (this.title == null)
8164          this.title = new StringType();
8165        this.title.setValue(value);
8166      }
8167      return this;
8168    }
8169
8170    /**
8171     * @return {@link #status} (The status of this test script. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
8172     */
8173    public Enumeration<PublicationStatus> getStatusElement() { 
8174      if (this.status == null)
8175        if (Configuration.errorOnAutoCreate())
8176          throw new Error("Attempt to auto-create TestScript.status");
8177        else if (Configuration.doAutoCreate())
8178          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
8179      return this.status;
8180    }
8181
8182    public boolean hasStatusElement() { 
8183      return this.status != null && !this.status.isEmpty();
8184    }
8185
8186    public boolean hasStatus() { 
8187      return this.status != null && !this.status.isEmpty();
8188    }
8189
8190    /**
8191     * @param value {@link #status} (The status of this test script. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
8192     */
8193    public TestScript setStatusElement(Enumeration<PublicationStatus> value) { 
8194      this.status = value;
8195      return this;
8196    }
8197
8198    /**
8199     * @return The status of this test script. Enables tracking the life-cycle of the content.
8200     */
8201    public PublicationStatus getStatus() { 
8202      return this.status == null ? null : this.status.getValue();
8203    }
8204
8205    /**
8206     * @param value The status of this test script. Enables tracking the life-cycle of the content.
8207     */
8208    public TestScript setStatus(PublicationStatus value) { 
8209        if (this.status == null)
8210          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
8211        this.status.setValue(value);
8212      return this;
8213    }
8214
8215    /**
8216     * @return {@link #experimental} (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.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
8217     */
8218    public BooleanType getExperimentalElement() { 
8219      if (this.experimental == null)
8220        if (Configuration.errorOnAutoCreate())
8221          throw new Error("Attempt to auto-create TestScript.experimental");
8222        else if (Configuration.doAutoCreate())
8223          this.experimental = new BooleanType(); // bb
8224      return this.experimental;
8225    }
8226
8227    public boolean hasExperimentalElement() { 
8228      return this.experimental != null && !this.experimental.isEmpty();
8229    }
8230
8231    public boolean hasExperimental() { 
8232      return this.experimental != null && !this.experimental.isEmpty();
8233    }
8234
8235    /**
8236     * @param value {@link #experimental} (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.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
8237     */
8238    public TestScript setExperimentalElement(BooleanType value) { 
8239      this.experimental = value;
8240      return this;
8241    }
8242
8243    /**
8244     * @return 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.
8245     */
8246    public boolean getExperimental() { 
8247      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
8248    }
8249
8250    /**
8251     * @param value 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.
8252     */
8253    public TestScript setExperimental(boolean value) { 
8254        if (this.experimental == null)
8255          this.experimental = new BooleanType();
8256        this.experimental.setValue(value);
8257      return this;
8258    }
8259
8260    /**
8261     * @return {@link #date} (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.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
8262     */
8263    public DateTimeType getDateElement() { 
8264      if (this.date == null)
8265        if (Configuration.errorOnAutoCreate())
8266          throw new Error("Attempt to auto-create TestScript.date");
8267        else if (Configuration.doAutoCreate())
8268          this.date = new DateTimeType(); // bb
8269      return this.date;
8270    }
8271
8272    public boolean hasDateElement() { 
8273      return this.date != null && !this.date.isEmpty();
8274    }
8275
8276    public boolean hasDate() { 
8277      return this.date != null && !this.date.isEmpty();
8278    }
8279
8280    /**
8281     * @param value {@link #date} (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.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
8282     */
8283    public TestScript setDateElement(DateTimeType value) { 
8284      this.date = value;
8285      return this;
8286    }
8287
8288    /**
8289     * @return 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.
8290     */
8291    public Date getDate() { 
8292      return this.date == null ? null : this.date.getValue();
8293    }
8294
8295    /**
8296     * @param value 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.
8297     */
8298    public TestScript setDate(Date value) { 
8299      if (value == null)
8300        this.date = null;
8301      else {
8302        if (this.date == null)
8303          this.date = new DateTimeType();
8304        this.date.setValue(value);
8305      }
8306      return this;
8307    }
8308
8309    /**
8310     * @return {@link #publisher} (The name of the organization or individual that published the test script.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
8311     */
8312    public StringType getPublisherElement() { 
8313      if (this.publisher == null)
8314        if (Configuration.errorOnAutoCreate())
8315          throw new Error("Attempt to auto-create TestScript.publisher");
8316        else if (Configuration.doAutoCreate())
8317          this.publisher = new StringType(); // bb
8318      return this.publisher;
8319    }
8320
8321    public boolean hasPublisherElement() { 
8322      return this.publisher != null && !this.publisher.isEmpty();
8323    }
8324
8325    public boolean hasPublisher() { 
8326      return this.publisher != null && !this.publisher.isEmpty();
8327    }
8328
8329    /**
8330     * @param value {@link #publisher} (The name of the organization or individual that published the test script.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
8331     */
8332    public TestScript setPublisherElement(StringType value) { 
8333      this.publisher = value;
8334      return this;
8335    }
8336
8337    /**
8338     * @return The name of the organization or individual that published the test script.
8339     */
8340    public String getPublisher() { 
8341      return this.publisher == null ? null : this.publisher.getValue();
8342    }
8343
8344    /**
8345     * @param value The name of the organization or individual that published the test script.
8346     */
8347    public TestScript setPublisher(String value) { 
8348      if (Utilities.noString(value))
8349        this.publisher = null;
8350      else {
8351        if (this.publisher == null)
8352          this.publisher = new StringType();
8353        this.publisher.setValue(value);
8354      }
8355      return this;
8356    }
8357
8358    /**
8359     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
8360     */
8361    public List<ContactDetail> getContact() { 
8362      if (this.contact == null)
8363        this.contact = new ArrayList<ContactDetail>();
8364      return this.contact;
8365    }
8366
8367    /**
8368     * @return Returns a reference to <code>this</code> for easy method chaining
8369     */
8370    public TestScript setContact(List<ContactDetail> theContact) { 
8371      this.contact = theContact;
8372      return this;
8373    }
8374
8375    public boolean hasContact() { 
8376      if (this.contact == null)
8377        return false;
8378      for (ContactDetail item : this.contact)
8379        if (!item.isEmpty())
8380          return true;
8381      return false;
8382    }
8383
8384    public ContactDetail addContact() { //3
8385      ContactDetail t = new ContactDetail();
8386      if (this.contact == null)
8387        this.contact = new ArrayList<ContactDetail>();
8388      this.contact.add(t);
8389      return t;
8390    }
8391
8392    public TestScript addContact(ContactDetail t) { //3
8393      if (t == null)
8394        return this;
8395      if (this.contact == null)
8396        this.contact = new ArrayList<ContactDetail>();
8397      this.contact.add(t);
8398      return this;
8399    }
8400
8401    /**
8402     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
8403     */
8404    public ContactDetail getContactFirstRep() { 
8405      if (getContact().isEmpty()) {
8406        addContact();
8407      }
8408      return getContact().get(0);
8409    }
8410
8411    /**
8412     * @return {@link #description} (A free text natural language description of the test script from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
8413     */
8414    public MarkdownType getDescriptionElement() { 
8415      if (this.description == null)
8416        if (Configuration.errorOnAutoCreate())
8417          throw new Error("Attempt to auto-create TestScript.description");
8418        else if (Configuration.doAutoCreate())
8419          this.description = new MarkdownType(); // bb
8420      return this.description;
8421    }
8422
8423    public boolean hasDescriptionElement() { 
8424      return this.description != null && !this.description.isEmpty();
8425    }
8426
8427    public boolean hasDescription() { 
8428      return this.description != null && !this.description.isEmpty();
8429    }
8430
8431    /**
8432     * @param value {@link #description} (A free text natural language description of the test script from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
8433     */
8434    public TestScript setDescriptionElement(MarkdownType value) { 
8435      this.description = value;
8436      return this;
8437    }
8438
8439    /**
8440     * @return A free text natural language description of the test script from a consumer's perspective.
8441     */
8442    public String getDescription() { 
8443      return this.description == null ? null : this.description.getValue();
8444    }
8445
8446    /**
8447     * @param value A free text natural language description of the test script from a consumer's perspective.
8448     */
8449    public TestScript setDescription(String value) { 
8450      if (value == null)
8451        this.description = null;
8452      else {
8453        if (this.description == null)
8454          this.description = new MarkdownType();
8455        this.description.setValue(value);
8456      }
8457      return this;
8458    }
8459
8460    /**
8461     * @return {@link #useContext} (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.)
8462     */
8463    public List<UsageContext> getUseContext() { 
8464      if (this.useContext == null)
8465        this.useContext = new ArrayList<UsageContext>();
8466      return this.useContext;
8467    }
8468
8469    /**
8470     * @return Returns a reference to <code>this</code> for easy method chaining
8471     */
8472    public TestScript setUseContext(List<UsageContext> theUseContext) { 
8473      this.useContext = theUseContext;
8474      return this;
8475    }
8476
8477    public boolean hasUseContext() { 
8478      if (this.useContext == null)
8479        return false;
8480      for (UsageContext item : this.useContext)
8481        if (!item.isEmpty())
8482          return true;
8483      return false;
8484    }
8485
8486    public UsageContext addUseContext() { //3
8487      UsageContext t = new UsageContext();
8488      if (this.useContext == null)
8489        this.useContext = new ArrayList<UsageContext>();
8490      this.useContext.add(t);
8491      return t;
8492    }
8493
8494    public TestScript addUseContext(UsageContext t) { //3
8495      if (t == null)
8496        return this;
8497      if (this.useContext == null)
8498        this.useContext = new ArrayList<UsageContext>();
8499      this.useContext.add(t);
8500      return this;
8501    }
8502
8503    /**
8504     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist
8505     */
8506    public UsageContext getUseContextFirstRep() { 
8507      if (getUseContext().isEmpty()) {
8508        addUseContext();
8509      }
8510      return getUseContext().get(0);
8511    }
8512
8513    /**
8514     * @return {@link #jurisdiction} (A legal or geographic region in which the test script is intended to be used.)
8515     */
8516    public List<CodeableConcept> getJurisdiction() { 
8517      if (this.jurisdiction == null)
8518        this.jurisdiction = new ArrayList<CodeableConcept>();
8519      return this.jurisdiction;
8520    }
8521
8522    /**
8523     * @return Returns a reference to <code>this</code> for easy method chaining
8524     */
8525    public TestScript setJurisdiction(List<CodeableConcept> theJurisdiction) { 
8526      this.jurisdiction = theJurisdiction;
8527      return this;
8528    }
8529
8530    public boolean hasJurisdiction() { 
8531      if (this.jurisdiction == null)
8532        return false;
8533      for (CodeableConcept item : this.jurisdiction)
8534        if (!item.isEmpty())
8535          return true;
8536      return false;
8537    }
8538
8539    public CodeableConcept addJurisdiction() { //3
8540      CodeableConcept t = new CodeableConcept();
8541      if (this.jurisdiction == null)
8542        this.jurisdiction = new ArrayList<CodeableConcept>();
8543      this.jurisdiction.add(t);
8544      return t;
8545    }
8546
8547    public TestScript addJurisdiction(CodeableConcept t) { //3
8548      if (t == null)
8549        return this;
8550      if (this.jurisdiction == null)
8551        this.jurisdiction = new ArrayList<CodeableConcept>();
8552      this.jurisdiction.add(t);
8553      return this;
8554    }
8555
8556    /**
8557     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist
8558     */
8559    public CodeableConcept getJurisdictionFirstRep() { 
8560      if (getJurisdiction().isEmpty()) {
8561        addJurisdiction();
8562      }
8563      return getJurisdiction().get(0);
8564    }
8565
8566    /**
8567     * @return {@link #purpose} (Explanation of why this test script is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
8568     */
8569    public MarkdownType getPurposeElement() { 
8570      if (this.purpose == null)
8571        if (Configuration.errorOnAutoCreate())
8572          throw new Error("Attempt to auto-create TestScript.purpose");
8573        else if (Configuration.doAutoCreate())
8574          this.purpose = new MarkdownType(); // bb
8575      return this.purpose;
8576    }
8577
8578    public boolean hasPurposeElement() { 
8579      return this.purpose != null && !this.purpose.isEmpty();
8580    }
8581
8582    public boolean hasPurpose() { 
8583      return this.purpose != null && !this.purpose.isEmpty();
8584    }
8585
8586    /**
8587     * @param value {@link #purpose} (Explanation of why this test script is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
8588     */
8589    public TestScript setPurposeElement(MarkdownType value) { 
8590      this.purpose = value;
8591      return this;
8592    }
8593
8594    /**
8595     * @return Explanation of why this test script is needed and why it has been designed as it has.
8596     */
8597    public String getPurpose() { 
8598      return this.purpose == null ? null : this.purpose.getValue();
8599    }
8600
8601    /**
8602     * @param value Explanation of why this test script is needed and why it has been designed as it has.
8603     */
8604    public TestScript setPurpose(String value) { 
8605      if (value == null)
8606        this.purpose = null;
8607      else {
8608        if (this.purpose == null)
8609          this.purpose = new MarkdownType();
8610        this.purpose.setValue(value);
8611      }
8612      return this;
8613    }
8614
8615    /**
8616     * @return {@link #copyright} (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.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
8617     */
8618    public MarkdownType getCopyrightElement() { 
8619      if (this.copyright == null)
8620        if (Configuration.errorOnAutoCreate())
8621          throw new Error("Attempt to auto-create TestScript.copyright");
8622        else if (Configuration.doAutoCreate())
8623          this.copyright = new MarkdownType(); // bb
8624      return this.copyright;
8625    }
8626
8627    public boolean hasCopyrightElement() { 
8628      return this.copyright != null && !this.copyright.isEmpty();
8629    }
8630
8631    public boolean hasCopyright() { 
8632      return this.copyright != null && !this.copyright.isEmpty();
8633    }
8634
8635    /**
8636     * @param value {@link #copyright} (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.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
8637     */
8638    public TestScript setCopyrightElement(MarkdownType value) { 
8639      this.copyright = value;
8640      return this;
8641    }
8642
8643    /**
8644     * @return 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.
8645     */
8646    public String getCopyright() { 
8647      return this.copyright == null ? null : this.copyright.getValue();
8648    }
8649
8650    /**
8651     * @param value 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.
8652     */
8653    public TestScript setCopyright(String value) { 
8654      if (value == null)
8655        this.copyright = null;
8656      else {
8657        if (this.copyright == null)
8658          this.copyright = new MarkdownType();
8659        this.copyright.setValue(value);
8660      }
8661      return this;
8662    }
8663
8664    /**
8665     * @return {@link #origin} (An abstract server used in operations within this test script in the origin element.)
8666     */
8667    public List<TestScriptOriginComponent> getOrigin() { 
8668      if (this.origin == null)
8669        this.origin = new ArrayList<TestScriptOriginComponent>();
8670      return this.origin;
8671    }
8672
8673    /**
8674     * @return Returns a reference to <code>this</code> for easy method chaining
8675     */
8676    public TestScript setOrigin(List<TestScriptOriginComponent> theOrigin) { 
8677      this.origin = theOrigin;
8678      return this;
8679    }
8680
8681    public boolean hasOrigin() { 
8682      if (this.origin == null)
8683        return false;
8684      for (TestScriptOriginComponent item : this.origin)
8685        if (!item.isEmpty())
8686          return true;
8687      return false;
8688    }
8689
8690    public TestScriptOriginComponent addOrigin() { //3
8691      TestScriptOriginComponent t = new TestScriptOriginComponent();
8692      if (this.origin == null)
8693        this.origin = new ArrayList<TestScriptOriginComponent>();
8694      this.origin.add(t);
8695      return t;
8696    }
8697
8698    public TestScript addOrigin(TestScriptOriginComponent t) { //3
8699      if (t == null)
8700        return this;
8701      if (this.origin == null)
8702        this.origin = new ArrayList<TestScriptOriginComponent>();
8703      this.origin.add(t);
8704      return this;
8705    }
8706
8707    /**
8708     * @return The first repetition of repeating field {@link #origin}, creating it if it does not already exist
8709     */
8710    public TestScriptOriginComponent getOriginFirstRep() { 
8711      if (getOrigin().isEmpty()) {
8712        addOrigin();
8713      }
8714      return getOrigin().get(0);
8715    }
8716
8717    /**
8718     * @return {@link #destination} (An abstract server used in operations within this test script in the destination element.)
8719     */
8720    public List<TestScriptDestinationComponent> getDestination() { 
8721      if (this.destination == null)
8722        this.destination = new ArrayList<TestScriptDestinationComponent>();
8723      return this.destination;
8724    }
8725
8726    /**
8727     * @return Returns a reference to <code>this</code> for easy method chaining
8728     */
8729    public TestScript setDestination(List<TestScriptDestinationComponent> theDestination) { 
8730      this.destination = theDestination;
8731      return this;
8732    }
8733
8734    public boolean hasDestination() { 
8735      if (this.destination == null)
8736        return false;
8737      for (TestScriptDestinationComponent item : this.destination)
8738        if (!item.isEmpty())
8739          return true;
8740      return false;
8741    }
8742
8743    public TestScriptDestinationComponent addDestination() { //3
8744      TestScriptDestinationComponent t = new TestScriptDestinationComponent();
8745      if (this.destination == null)
8746        this.destination = new ArrayList<TestScriptDestinationComponent>();
8747      this.destination.add(t);
8748      return t;
8749    }
8750
8751    public TestScript addDestination(TestScriptDestinationComponent t) { //3
8752      if (t == null)
8753        return this;
8754      if (this.destination == null)
8755        this.destination = new ArrayList<TestScriptDestinationComponent>();
8756      this.destination.add(t);
8757      return this;
8758    }
8759
8760    /**
8761     * @return The first repetition of repeating field {@link #destination}, creating it if it does not already exist
8762     */
8763    public TestScriptDestinationComponent getDestinationFirstRep() { 
8764      if (getDestination().isEmpty()) {
8765        addDestination();
8766      }
8767      return getDestination().get(0);
8768    }
8769
8770    /**
8771     * @return {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.)
8772     */
8773    public TestScriptMetadataComponent getMetadata() { 
8774      if (this.metadata == null)
8775        if (Configuration.errorOnAutoCreate())
8776          throw new Error("Attempt to auto-create TestScript.metadata");
8777        else if (Configuration.doAutoCreate())
8778          this.metadata = new TestScriptMetadataComponent(); // cc
8779      return this.metadata;
8780    }
8781
8782    public boolean hasMetadata() { 
8783      return this.metadata != null && !this.metadata.isEmpty();
8784    }
8785
8786    /**
8787     * @param value {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.)
8788     */
8789    public TestScript setMetadata(TestScriptMetadataComponent value) { 
8790      this.metadata = value;
8791      return this;
8792    }
8793
8794    /**
8795     * @return {@link #fixture} (Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.)
8796     */
8797    public List<TestScriptFixtureComponent> getFixture() { 
8798      if (this.fixture == null)
8799        this.fixture = new ArrayList<TestScriptFixtureComponent>();
8800      return this.fixture;
8801    }
8802
8803    /**
8804     * @return Returns a reference to <code>this</code> for easy method chaining
8805     */
8806    public TestScript setFixture(List<TestScriptFixtureComponent> theFixture) { 
8807      this.fixture = theFixture;
8808      return this;
8809    }
8810
8811    public boolean hasFixture() { 
8812      if (this.fixture == null)
8813        return false;
8814      for (TestScriptFixtureComponent item : this.fixture)
8815        if (!item.isEmpty())
8816          return true;
8817      return false;
8818    }
8819
8820    public TestScriptFixtureComponent addFixture() { //3
8821      TestScriptFixtureComponent t = new TestScriptFixtureComponent();
8822      if (this.fixture == null)
8823        this.fixture = new ArrayList<TestScriptFixtureComponent>();
8824      this.fixture.add(t);
8825      return t;
8826    }
8827
8828    public TestScript addFixture(TestScriptFixtureComponent t) { //3
8829      if (t == null)
8830        return this;
8831      if (this.fixture == null)
8832        this.fixture = new ArrayList<TestScriptFixtureComponent>();
8833      this.fixture.add(t);
8834      return this;
8835    }
8836
8837    /**
8838     * @return The first repetition of repeating field {@link #fixture}, creating it if it does not already exist
8839     */
8840    public TestScriptFixtureComponent getFixtureFirstRep() { 
8841      if (getFixture().isEmpty()) {
8842        addFixture();
8843      }
8844      return getFixture().get(0);
8845    }
8846
8847    /**
8848     * @return {@link #profile} (Reference to the profile to be used for validation.)
8849     */
8850    public List<Reference> getProfile() { 
8851      if (this.profile == null)
8852        this.profile = new ArrayList<Reference>();
8853      return this.profile;
8854    }
8855
8856    /**
8857     * @return Returns a reference to <code>this</code> for easy method chaining
8858     */
8859    public TestScript setProfile(List<Reference> theProfile) { 
8860      this.profile = theProfile;
8861      return this;
8862    }
8863
8864    public boolean hasProfile() { 
8865      if (this.profile == null)
8866        return false;
8867      for (Reference item : this.profile)
8868        if (!item.isEmpty())
8869          return true;
8870      return false;
8871    }
8872
8873    public Reference addProfile() { //3
8874      Reference t = new Reference();
8875      if (this.profile == null)
8876        this.profile = new ArrayList<Reference>();
8877      this.profile.add(t);
8878      return t;
8879    }
8880
8881    public TestScript addProfile(Reference t) { //3
8882      if (t == null)
8883        return this;
8884      if (this.profile == null)
8885        this.profile = new ArrayList<Reference>();
8886      this.profile.add(t);
8887      return this;
8888    }
8889
8890    /**
8891     * @return The first repetition of repeating field {@link #profile}, creating it if it does not already exist
8892     */
8893    public Reference getProfileFirstRep() { 
8894      if (getProfile().isEmpty()) {
8895        addProfile();
8896      }
8897      return getProfile().get(0);
8898    }
8899
8900    /**
8901     * @deprecated Use Reference#setResource(IBaseResource) instead
8902     */
8903    @Deprecated
8904    public List<Resource> getProfileTarget() { 
8905      if (this.profileTarget == null)
8906        this.profileTarget = new ArrayList<Resource>();
8907      return this.profileTarget;
8908    }
8909
8910    /**
8911     * @return {@link #variable} (Variable is set based either on element value in response body or on header field value in the response headers.)
8912     */
8913    public List<TestScriptVariableComponent> getVariable() { 
8914      if (this.variable == null)
8915        this.variable = new ArrayList<TestScriptVariableComponent>();
8916      return this.variable;
8917    }
8918
8919    /**
8920     * @return Returns a reference to <code>this</code> for easy method chaining
8921     */
8922    public TestScript setVariable(List<TestScriptVariableComponent> theVariable) { 
8923      this.variable = theVariable;
8924      return this;
8925    }
8926
8927    public boolean hasVariable() { 
8928      if (this.variable == null)
8929        return false;
8930      for (TestScriptVariableComponent item : this.variable)
8931        if (!item.isEmpty())
8932          return true;
8933      return false;
8934    }
8935
8936    public TestScriptVariableComponent addVariable() { //3
8937      TestScriptVariableComponent t = new TestScriptVariableComponent();
8938      if (this.variable == null)
8939        this.variable = new ArrayList<TestScriptVariableComponent>();
8940      this.variable.add(t);
8941      return t;
8942    }
8943
8944    public TestScript addVariable(TestScriptVariableComponent t) { //3
8945      if (t == null)
8946        return this;
8947      if (this.variable == null)
8948        this.variable = new ArrayList<TestScriptVariableComponent>();
8949      this.variable.add(t);
8950      return this;
8951    }
8952
8953    /**
8954     * @return The first repetition of repeating field {@link #variable}, creating it if it does not already exist
8955     */
8956    public TestScriptVariableComponent getVariableFirstRep() { 
8957      if (getVariable().isEmpty()) {
8958        addVariable();
8959      }
8960      return getVariable().get(0);
8961    }
8962
8963    /**
8964     * @return {@link #setup} (A series of required setup operations before tests are executed.)
8965     */
8966    public TestScriptSetupComponent getSetup() { 
8967      if (this.setup == null)
8968        if (Configuration.errorOnAutoCreate())
8969          throw new Error("Attempt to auto-create TestScript.setup");
8970        else if (Configuration.doAutoCreate())
8971          this.setup = new TestScriptSetupComponent(); // cc
8972      return this.setup;
8973    }
8974
8975    public boolean hasSetup() { 
8976      return this.setup != null && !this.setup.isEmpty();
8977    }
8978
8979    /**
8980     * @param value {@link #setup} (A series of required setup operations before tests are executed.)
8981     */
8982    public TestScript setSetup(TestScriptSetupComponent value) { 
8983      this.setup = value;
8984      return this;
8985    }
8986
8987    /**
8988     * @return {@link #test} (A test in this script.)
8989     */
8990    public List<TestScriptTestComponent> getTest() { 
8991      if (this.test == null)
8992        this.test = new ArrayList<TestScriptTestComponent>();
8993      return this.test;
8994    }
8995
8996    /**
8997     * @return Returns a reference to <code>this</code> for easy method chaining
8998     */
8999    public TestScript setTest(List<TestScriptTestComponent> theTest) { 
9000      this.test = theTest;
9001      return this;
9002    }
9003
9004    public boolean hasTest() { 
9005      if (this.test == null)
9006        return false;
9007      for (TestScriptTestComponent item : this.test)
9008        if (!item.isEmpty())
9009          return true;
9010      return false;
9011    }
9012
9013    public TestScriptTestComponent addTest() { //3
9014      TestScriptTestComponent t = new TestScriptTestComponent();
9015      if (this.test == null)
9016        this.test = new ArrayList<TestScriptTestComponent>();
9017      this.test.add(t);
9018      return t;
9019    }
9020
9021    public TestScript addTest(TestScriptTestComponent t) { //3
9022      if (t == null)
9023        return this;
9024      if (this.test == null)
9025        this.test = new ArrayList<TestScriptTestComponent>();
9026      this.test.add(t);
9027      return this;
9028    }
9029
9030    /**
9031     * @return The first repetition of repeating field {@link #test}, creating it if it does not already exist
9032     */
9033    public TestScriptTestComponent getTestFirstRep() { 
9034      if (getTest().isEmpty()) {
9035        addTest();
9036      }
9037      return getTest().get(0);
9038    }
9039
9040    /**
9041     * @return {@link #teardown} (A series of operations required to clean up after all the tests are executed (successfully or otherwise).)
9042     */
9043    public TestScriptTeardownComponent getTeardown() { 
9044      if (this.teardown == null)
9045        if (Configuration.errorOnAutoCreate())
9046          throw new Error("Attempt to auto-create TestScript.teardown");
9047        else if (Configuration.doAutoCreate())
9048          this.teardown = new TestScriptTeardownComponent(); // cc
9049      return this.teardown;
9050    }
9051
9052    public boolean hasTeardown() { 
9053      return this.teardown != null && !this.teardown.isEmpty();
9054    }
9055
9056    /**
9057     * @param value {@link #teardown} (A series of operations required to clean up after all the tests are executed (successfully or otherwise).)
9058     */
9059    public TestScript setTeardown(TestScriptTeardownComponent value) { 
9060      this.teardown = value;
9061      return this;
9062    }
9063
9064      protected void listChildren(List<Property> children) {
9065        super.listChildren(children);
9066        children.add(new Property("url", "uri", "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.", 0, 1, url));
9067        children.add(new Property("identifier", "Identifier", "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.", 0, 1, identifier));
9068        children.add(new Property("version", "string", "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.", 0, 1, version));
9069        children.add(new Property("name", "string", "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.", 0, 1, name));
9070        children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the test script.", 0, 1, title));
9071        children.add(new Property("status", "code", "The status of this test script. Enables tracking the life-cycle of the content.", 0, 1, status));
9072        children.add(new Property("experimental", "boolean", "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.", 0, 1, experimental));
9073        children.add(new Property("date", "dateTime", "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.", 0, 1, date));
9074        children.add(new Property("publisher", "string", "The name of the organization or individual that published the test script.", 0, 1, publisher));
9075        children.add(new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact));
9076        children.add(new Property("description", "markdown", "A free text natural language description of the test script from a consumer's perspective.", 0, 1, description));
9077        children.add(new Property("useContext", "UsageContext", "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.", 0, java.lang.Integer.MAX_VALUE, useContext));
9078        children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the test script is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction));
9079        children.add(new Property("purpose", "markdown", "Explanation of why this test script is needed and why it has been designed as it has.", 0, 1, purpose));
9080        children.add(new Property("copyright", "markdown", "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.", 0, 1, copyright));
9081        children.add(new Property("origin", "", "An abstract server used in operations within this test script in the origin element.", 0, java.lang.Integer.MAX_VALUE, origin));
9082        children.add(new Property("destination", "", "An abstract server used in operations within this test script in the destination element.", 0, java.lang.Integer.MAX_VALUE, destination));
9083        children.add(new Property("metadata", "", "The required capability must exist and are assumed to function correctly on the FHIR server being tested.", 0, 1, metadata));
9084        children.add(new Property("fixture", "", "Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.", 0, java.lang.Integer.MAX_VALUE, fixture));
9085        children.add(new Property("profile", "Reference(Any)", "Reference to the profile to be used for validation.", 0, java.lang.Integer.MAX_VALUE, profile));
9086        children.add(new Property("variable", "", "Variable is set based either on element value in response body or on header field value in the response headers.", 0, java.lang.Integer.MAX_VALUE, variable));
9087        children.add(new Property("setup", "", "A series of required setup operations before tests are executed.", 0, 1, setup));
9088        children.add(new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test));
9089        children.add(new Property("teardown", "", "A series of operations required to clean up after all the tests are executed (successfully or otherwise).", 0, 1, teardown));
9090      }
9091
9092      @Override
9093      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
9094        switch (_hash) {
9095        case 116079: /*url*/  return new Property("url", "uri", "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.", 0, 1, url);
9096        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "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.", 0, 1, identifier);
9097        case 351608024: /*version*/  return new Property("version", "string", "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.", 0, 1, version);
9098        case 3373707: /*name*/  return new Property("name", "string", "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.", 0, 1, name);
9099        case 110371416: /*title*/  return new Property("title", "string", "A short, descriptive, user-friendly title for the test script.", 0, 1, title);
9100        case -892481550: /*status*/  return new Property("status", "code", "The status of this test script. Enables tracking the life-cycle of the content.", 0, 1, status);
9101        case -404562712: /*experimental*/  return new Property("experimental", "boolean", "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.", 0, 1, experimental);
9102        case 3076014: /*date*/  return new Property("date", "dateTime", "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.", 0, 1, date);
9103        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the organization or individual that published the test script.", 0, 1, publisher);
9104        case 951526432: /*contact*/  return new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact);
9105        case -1724546052: /*description*/  return new Property("description", "markdown", "A free text natural language description of the test script from a consumer's perspective.", 0, 1, description);
9106        case -669707736: /*useContext*/  return new Property("useContext", "UsageContext", "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.", 0, java.lang.Integer.MAX_VALUE, useContext);
9107        case -507075711: /*jurisdiction*/  return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the test script is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction);
9108        case -220463842: /*purpose*/  return new Property("purpose", "markdown", "Explanation of why this test script is needed and why it has been designed as it has.", 0, 1, purpose);
9109        case 1522889671: /*copyright*/  return new Property("copyright", "markdown", "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.", 0, 1, copyright);
9110        case -1008619738: /*origin*/  return new Property("origin", "", "An abstract server used in operations within this test script in the origin element.", 0, java.lang.Integer.MAX_VALUE, origin);
9111        case -1429847026: /*destination*/  return new Property("destination", "", "An abstract server used in operations within this test script in the destination element.", 0, java.lang.Integer.MAX_VALUE, destination);
9112        case -450004177: /*metadata*/  return new Property("metadata", "", "The required capability must exist and are assumed to function correctly on the FHIR server being tested.", 0, 1, metadata);
9113        case -843449847: /*fixture*/  return new Property("fixture", "", "Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.", 0, java.lang.Integer.MAX_VALUE, fixture);
9114        case -309425751: /*profile*/  return new Property("profile", "Reference(Any)", "Reference to the profile to be used for validation.", 0, java.lang.Integer.MAX_VALUE, profile);
9115        case -1249586564: /*variable*/  return new Property("variable", "", "Variable is set based either on element value in response body or on header field value in the response headers.", 0, java.lang.Integer.MAX_VALUE, variable);
9116        case 109329021: /*setup*/  return new Property("setup", "", "A series of required setup operations before tests are executed.", 0, 1, setup);
9117        case 3556498: /*test*/  return new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test);
9118        case -1663474172: /*teardown*/  return new Property("teardown", "", "A series of operations required to clean up after all the tests are executed (successfully or otherwise).", 0, 1, teardown);
9119        default: return super.getNamedProperty(_hash, _name, _checkValid);
9120        }
9121
9122      }
9123
9124      @Override
9125      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
9126        switch (hash) {
9127        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
9128        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier
9129        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
9130        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
9131        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
9132        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
9133        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
9134        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
9135        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
9136        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
9137        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
9138        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
9139        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
9140        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
9141        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType
9142        case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // TestScriptOriginComponent
9143        case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : this.destination.toArray(new Base[this.destination.size()]); // TestScriptDestinationComponent
9144        case -450004177: /*metadata*/ return this.metadata == null ? new Base[0] : new Base[] {this.metadata}; // TestScriptMetadataComponent
9145        case -843449847: /*fixture*/ return this.fixture == null ? new Base[0] : this.fixture.toArray(new Base[this.fixture.size()]); // TestScriptFixtureComponent
9146        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : this.profile.toArray(new Base[this.profile.size()]); // Reference
9147        case -1249586564: /*variable*/ return this.variable == null ? new Base[0] : this.variable.toArray(new Base[this.variable.size()]); // TestScriptVariableComponent
9148        case 109329021: /*setup*/ return this.setup == null ? new Base[0] : new Base[] {this.setup}; // TestScriptSetupComponent
9149        case 3556498: /*test*/ return this.test == null ? new Base[0] : this.test.toArray(new Base[this.test.size()]); // TestScriptTestComponent
9150        case -1663474172: /*teardown*/ return this.teardown == null ? new Base[0] : new Base[] {this.teardown}; // TestScriptTeardownComponent
9151        default: return super.getProperty(hash, name, checkValid);
9152        }
9153
9154      }
9155
9156      @Override
9157      public Base setProperty(int hash, String name, Base value) throws FHIRException {
9158        switch (hash) {
9159        case 116079: // url
9160          this.url = castToUri(value); // UriType
9161          return value;
9162        case -1618432855: // identifier
9163          this.identifier = castToIdentifier(value); // Identifier
9164          return value;
9165        case 351608024: // version
9166          this.version = castToString(value); // StringType
9167          return value;
9168        case 3373707: // name
9169          this.name = castToString(value); // StringType
9170          return value;
9171        case 110371416: // title
9172          this.title = castToString(value); // StringType
9173          return value;
9174        case -892481550: // status
9175          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
9176          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
9177          return value;
9178        case -404562712: // experimental
9179          this.experimental = castToBoolean(value); // BooleanType
9180          return value;
9181        case 3076014: // date
9182          this.date = castToDateTime(value); // DateTimeType
9183          return value;
9184        case 1447404028: // publisher
9185          this.publisher = castToString(value); // StringType
9186          return value;
9187        case 951526432: // contact
9188          this.getContact().add(castToContactDetail(value)); // ContactDetail
9189          return value;
9190        case -1724546052: // description
9191          this.description = castToMarkdown(value); // MarkdownType
9192          return value;
9193        case -669707736: // useContext
9194          this.getUseContext().add(castToUsageContext(value)); // UsageContext
9195          return value;
9196        case -507075711: // jurisdiction
9197          this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept
9198          return value;
9199        case -220463842: // purpose
9200          this.purpose = castToMarkdown(value); // MarkdownType
9201          return value;
9202        case 1522889671: // copyright
9203          this.copyright = castToMarkdown(value); // MarkdownType
9204          return value;
9205        case -1008619738: // origin
9206          this.getOrigin().add((TestScriptOriginComponent) value); // TestScriptOriginComponent
9207          return value;
9208        case -1429847026: // destination
9209          this.getDestination().add((TestScriptDestinationComponent) value); // TestScriptDestinationComponent
9210          return value;
9211        case -450004177: // metadata
9212          this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent
9213          return value;
9214        case -843449847: // fixture
9215          this.getFixture().add((TestScriptFixtureComponent) value); // TestScriptFixtureComponent
9216          return value;
9217        case -309425751: // profile
9218          this.getProfile().add(castToReference(value)); // Reference
9219          return value;
9220        case -1249586564: // variable
9221          this.getVariable().add((TestScriptVariableComponent) value); // TestScriptVariableComponent
9222          return value;
9223        case 109329021: // setup
9224          this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent
9225          return value;
9226        case 3556498: // test
9227          this.getTest().add((TestScriptTestComponent) value); // TestScriptTestComponent
9228          return value;
9229        case -1663474172: // teardown
9230          this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent
9231          return value;
9232        default: return super.setProperty(hash, name, value);
9233        }
9234
9235      }
9236
9237      @Override
9238      public Base setProperty(String name, Base value) throws FHIRException {
9239        if (name.equals("url")) {
9240          this.url = castToUri(value); // UriType
9241        } else if (name.equals("identifier")) {
9242          this.identifier = castToIdentifier(value); // Identifier
9243        } else if (name.equals("version")) {
9244          this.version = castToString(value); // StringType
9245        } else if (name.equals("name")) {
9246          this.name = castToString(value); // StringType
9247        } else if (name.equals("title")) {
9248          this.title = castToString(value); // StringType
9249        } else if (name.equals("status")) {
9250          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
9251          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
9252        } else if (name.equals("experimental")) {
9253          this.experimental = castToBoolean(value); // BooleanType
9254        } else if (name.equals("date")) {
9255          this.date = castToDateTime(value); // DateTimeType
9256        } else if (name.equals("publisher")) {
9257          this.publisher = castToString(value); // StringType
9258        } else if (name.equals("contact")) {
9259          this.getContact().add(castToContactDetail(value));
9260        } else if (name.equals("description")) {
9261          this.description = castToMarkdown(value); // MarkdownType
9262        } else if (name.equals("useContext")) {
9263          this.getUseContext().add(castToUsageContext(value));
9264        } else if (name.equals("jurisdiction")) {
9265          this.getJurisdiction().add(castToCodeableConcept(value));
9266        } else if (name.equals("purpose")) {
9267          this.purpose = castToMarkdown(value); // MarkdownType
9268        } else if (name.equals("copyright")) {
9269          this.copyright = castToMarkdown(value); // MarkdownType
9270        } else if (name.equals("origin")) {
9271          this.getOrigin().add((TestScriptOriginComponent) value);
9272        } else if (name.equals("destination")) {
9273          this.getDestination().add((TestScriptDestinationComponent) value);
9274        } else if (name.equals("metadata")) {
9275          this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent
9276        } else if (name.equals("fixture")) {
9277          this.getFixture().add((TestScriptFixtureComponent) value);
9278        } else if (name.equals("profile")) {
9279          this.getProfile().add(castToReference(value));
9280        } else if (name.equals("variable")) {
9281          this.getVariable().add((TestScriptVariableComponent) value);
9282        } else if (name.equals("setup")) {
9283          this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent
9284        } else if (name.equals("test")) {
9285          this.getTest().add((TestScriptTestComponent) value);
9286        } else if (name.equals("teardown")) {
9287          this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent
9288        } else
9289          return super.setProperty(name, value);
9290        return value;
9291      }
9292
9293      @Override
9294      public Base makeProperty(int hash, String name) throws FHIRException {
9295        switch (hash) {
9296        case 116079:  return getUrlElement();
9297        case -1618432855:  return getIdentifier(); 
9298        case 351608024:  return getVersionElement();
9299        case 3373707:  return getNameElement();
9300        case 110371416:  return getTitleElement();
9301        case -892481550:  return getStatusElement();
9302        case -404562712:  return getExperimentalElement();
9303        case 3076014:  return getDateElement();
9304        case 1447404028:  return getPublisherElement();
9305        case 951526432:  return addContact(); 
9306        case -1724546052:  return getDescriptionElement();
9307        case -669707736:  return addUseContext(); 
9308        case -507075711:  return addJurisdiction(); 
9309        case -220463842:  return getPurposeElement();
9310        case 1522889671:  return getCopyrightElement();
9311        case -1008619738:  return addOrigin(); 
9312        case -1429847026:  return addDestination(); 
9313        case -450004177:  return getMetadata(); 
9314        case -843449847:  return addFixture(); 
9315        case -309425751:  return addProfile(); 
9316        case -1249586564:  return addVariable(); 
9317        case 109329021:  return getSetup(); 
9318        case 3556498:  return addTest(); 
9319        case -1663474172:  return getTeardown(); 
9320        default: return super.makeProperty(hash, name);
9321        }
9322
9323      }
9324
9325      @Override
9326      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
9327        switch (hash) {
9328        case 116079: /*url*/ return new String[] {"uri"};
9329        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
9330        case 351608024: /*version*/ return new String[] {"string"};
9331        case 3373707: /*name*/ return new String[] {"string"};
9332        case 110371416: /*title*/ return new String[] {"string"};
9333        case -892481550: /*status*/ return new String[] {"code"};
9334        case -404562712: /*experimental*/ return new String[] {"boolean"};
9335        case 3076014: /*date*/ return new String[] {"dateTime"};
9336        case 1447404028: /*publisher*/ return new String[] {"string"};
9337        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
9338        case -1724546052: /*description*/ return new String[] {"markdown"};
9339        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
9340        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
9341        case -220463842: /*purpose*/ return new String[] {"markdown"};
9342        case 1522889671: /*copyright*/ return new String[] {"markdown"};
9343        case -1008619738: /*origin*/ return new String[] {};
9344        case -1429847026: /*destination*/ return new String[] {};
9345        case -450004177: /*metadata*/ return new String[] {};
9346        case -843449847: /*fixture*/ return new String[] {};
9347        case -309425751: /*profile*/ return new String[] {"Reference"};
9348        case -1249586564: /*variable*/ return new String[] {};
9349        case 109329021: /*setup*/ return new String[] {};
9350        case 3556498: /*test*/ return new String[] {};
9351        case -1663474172: /*teardown*/ return new String[] {};
9352        default: return super.getTypesForProperty(hash, name);
9353        }
9354
9355      }
9356
9357      @Override
9358      public Base addChild(String name) throws FHIRException {
9359        if (name.equals("url")) {
9360          throw new FHIRException("Cannot call addChild on a primitive type TestScript.url");
9361        }
9362        else if (name.equals("identifier")) {
9363          this.identifier = new Identifier();
9364          return this.identifier;
9365        }
9366        else if (name.equals("version")) {
9367          throw new FHIRException("Cannot call addChild on a primitive type TestScript.version");
9368        }
9369        else if (name.equals("name")) {
9370          throw new FHIRException("Cannot call addChild on a primitive type TestScript.name");
9371        }
9372        else if (name.equals("title")) {
9373          throw new FHIRException("Cannot call addChild on a primitive type TestScript.title");
9374        }
9375        else if (name.equals("status")) {
9376          throw new FHIRException("Cannot call addChild on a primitive type TestScript.status");
9377        }
9378        else if (name.equals("experimental")) {
9379          throw new FHIRException("Cannot call addChild on a primitive type TestScript.experimental");
9380        }
9381        else if (name.equals("date")) {
9382          throw new FHIRException("Cannot call addChild on a primitive type TestScript.date");
9383        }
9384        else if (name.equals("publisher")) {
9385          throw new FHIRException("Cannot call addChild on a primitive type TestScript.publisher");
9386        }
9387        else if (name.equals("contact")) {
9388          return addContact();
9389        }
9390        else if (name.equals("description")) {
9391          throw new FHIRException("Cannot call addChild on a primitive type TestScript.description");
9392        }
9393        else if (name.equals("useContext")) {
9394          return addUseContext();
9395        }
9396        else if (name.equals("jurisdiction")) {
9397          return addJurisdiction();
9398        }
9399        else if (name.equals("purpose")) {
9400          throw new FHIRException("Cannot call addChild on a primitive type TestScript.purpose");
9401        }
9402        else if (name.equals("copyright")) {
9403          throw new FHIRException("Cannot call addChild on a primitive type TestScript.copyright");
9404        }
9405        else if (name.equals("origin")) {
9406          return addOrigin();
9407        }
9408        else if (name.equals("destination")) {
9409          return addDestination();
9410        }
9411        else if (name.equals("metadata")) {
9412          this.metadata = new TestScriptMetadataComponent();
9413          return this.metadata;
9414        }
9415        else if (name.equals("fixture")) {
9416          return addFixture();
9417        }
9418        else if (name.equals("profile")) {
9419          return addProfile();
9420        }
9421        else if (name.equals("variable")) {
9422          return addVariable();
9423        }
9424        else if (name.equals("setup")) {
9425          this.setup = new TestScriptSetupComponent();
9426          return this.setup;
9427        }
9428        else if (name.equals("test")) {
9429          return addTest();
9430        }
9431        else if (name.equals("teardown")) {
9432          this.teardown = new TestScriptTeardownComponent();
9433          return this.teardown;
9434        }
9435        else
9436          return super.addChild(name);
9437      }
9438
9439  public String fhirType() {
9440    return "TestScript";
9441
9442  }
9443
9444      public TestScript copy() {
9445        TestScript dst = new TestScript();
9446        copyValues(dst);
9447        dst.url = url == null ? null : url.copy();
9448        dst.identifier = identifier == null ? null : identifier.copy();
9449        dst.version = version == null ? null : version.copy();
9450        dst.name = name == null ? null : name.copy();
9451        dst.title = title == null ? null : title.copy();
9452        dst.status = status == null ? null : status.copy();
9453        dst.experimental = experimental == null ? null : experimental.copy();
9454        dst.date = date == null ? null : date.copy();
9455        dst.publisher = publisher == null ? null : publisher.copy();
9456        if (contact != null) {
9457          dst.contact = new ArrayList<ContactDetail>();
9458          for (ContactDetail i : contact)
9459            dst.contact.add(i.copy());
9460        };
9461        dst.description = description == null ? null : description.copy();
9462        if (useContext != null) {
9463          dst.useContext = new ArrayList<UsageContext>();
9464          for (UsageContext i : useContext)
9465            dst.useContext.add(i.copy());
9466        };
9467        if (jurisdiction != null) {
9468          dst.jurisdiction = new ArrayList<CodeableConcept>();
9469          for (CodeableConcept i : jurisdiction)
9470            dst.jurisdiction.add(i.copy());
9471        };
9472        dst.purpose = purpose == null ? null : purpose.copy();
9473        dst.copyright = copyright == null ? null : copyright.copy();
9474        if (origin != null) {
9475          dst.origin = new ArrayList<TestScriptOriginComponent>();
9476          for (TestScriptOriginComponent i : origin)
9477            dst.origin.add(i.copy());
9478        };
9479        if (destination != null) {
9480          dst.destination = new ArrayList<TestScriptDestinationComponent>();
9481          for (TestScriptDestinationComponent i : destination)
9482            dst.destination.add(i.copy());
9483        };
9484        dst.metadata = metadata == null ? null : metadata.copy();
9485        if (fixture != null) {
9486          dst.fixture = new ArrayList<TestScriptFixtureComponent>();
9487          for (TestScriptFixtureComponent i : fixture)
9488            dst.fixture.add(i.copy());
9489        };
9490        if (profile != null) {
9491          dst.profile = new ArrayList<Reference>();
9492          for (Reference i : profile)
9493            dst.profile.add(i.copy());
9494        };
9495        if (variable != null) {
9496          dst.variable = new ArrayList<TestScriptVariableComponent>();
9497          for (TestScriptVariableComponent i : variable)
9498            dst.variable.add(i.copy());
9499        };
9500        dst.setup = setup == null ? null : setup.copy();
9501        if (test != null) {
9502          dst.test = new ArrayList<TestScriptTestComponent>();
9503          for (TestScriptTestComponent i : test)
9504            dst.test.add(i.copy());
9505        };
9506        dst.teardown = teardown == null ? null : teardown.copy();
9507        return dst;
9508      }
9509
9510      protected TestScript typedCopy() {
9511        return copy();
9512      }
9513
9514      @Override
9515      public boolean equalsDeep(Base other_) {
9516        if (!super.equalsDeep(other_))
9517          return false;
9518        if (!(other_ instanceof TestScript))
9519          return false;
9520        TestScript o = (TestScript) other_;
9521        return compareDeep(identifier, o.identifier, true) && compareDeep(purpose, o.purpose, true) && compareDeep(copyright, o.copyright, true)
9522           && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) && compareDeep(metadata, o.metadata, true)
9523           && compareDeep(fixture, o.fixture, true) && compareDeep(profile, o.profile, true) && compareDeep(variable, o.variable, true)
9524           && compareDeep(setup, o.setup, true) && compareDeep(test, o.test, true) && compareDeep(teardown, o.teardown, true)
9525          ;
9526      }
9527
9528      @Override
9529      public boolean equalsShallow(Base other_) {
9530        if (!super.equalsShallow(other_))
9531          return false;
9532        if (!(other_ instanceof TestScript))
9533          return false;
9534        TestScript o = (TestScript) other_;
9535        return compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true);
9536      }
9537
9538      public boolean isEmpty() {
9539        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, purpose, copyright
9540          , origin, destination, metadata, fixture, profile, variable, setup, test, teardown
9541          );
9542      }
9543
9544  @Override
9545  public ResourceType getResourceType() {
9546    return ResourceType.TestScript;
9547   }
9548
9549 /**
9550   * Search parameter: <b>date</b>
9551   * <p>
9552   * Description: <b>The test script publication date</b><br>
9553   * Type: <b>date</b><br>
9554   * Path: <b>TestScript.date</b><br>
9555   * </p>
9556   */
9557  @SearchParamDefinition(name="date", path="TestScript.date", description="The test script publication date", type="date" )
9558  public static final String SP_DATE = "date";
9559 /**
9560   * <b>Fluent Client</b> search parameter constant for <b>date</b>
9561   * <p>
9562   * Description: <b>The test script publication date</b><br>
9563   * Type: <b>date</b><br>
9564   * Path: <b>TestScript.date</b><br>
9565   * </p>
9566   */
9567  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
9568
9569 /**
9570   * Search parameter: <b>identifier</b>
9571   * <p>
9572   * Description: <b>External identifier for the test script</b><br>
9573   * Type: <b>token</b><br>
9574   * Path: <b>TestScript.identifier</b><br>
9575   * </p>
9576   */
9577  @SearchParamDefinition(name="identifier", path="TestScript.identifier", description="External identifier for the test script", type="token" )
9578  public static final String SP_IDENTIFIER = "identifier";
9579 /**
9580   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
9581   * <p>
9582   * Description: <b>External identifier for the test script</b><br>
9583   * Type: <b>token</b><br>
9584   * Path: <b>TestScript.identifier</b><br>
9585   * </p>
9586   */
9587  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
9588
9589 /**
9590   * Search parameter: <b>context-type-value</b>
9591   * <p>
9592   * Description: <b>A use context type and value assigned to the test script</b><br>
9593   * Type: <b>composite</b><br>
9594   * Path: <b></b><br>
9595   * </p>
9596   */
9597  @SearchParamDefinition(name="context-type-value", path="TestScript.useContext", description="A use context type and value assigned to the test script", type="composite", compositeOf={"context-type", "context"} )
9598  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
9599 /**
9600   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
9601   * <p>
9602   * Description: <b>A use context type and value assigned to the test script</b><br>
9603   * Type: <b>composite</b><br>
9604   * Path: <b></b><br>
9605   * </p>
9606   */
9607  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>(SP_CONTEXT_TYPE_VALUE);
9608
9609 /**
9610   * Search parameter: <b>jurisdiction</b>
9611   * <p>
9612   * Description: <b>Intended jurisdiction for the test script</b><br>
9613   * Type: <b>token</b><br>
9614   * Path: <b>TestScript.jurisdiction</b><br>
9615   * </p>
9616   */
9617  @SearchParamDefinition(name="jurisdiction", path="TestScript.jurisdiction", description="Intended jurisdiction for the test script", type="token" )
9618  public static final String SP_JURISDICTION = "jurisdiction";
9619 /**
9620   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
9621   * <p>
9622   * Description: <b>Intended jurisdiction for the test script</b><br>
9623   * Type: <b>token</b><br>
9624   * Path: <b>TestScript.jurisdiction</b><br>
9625   * </p>
9626   */
9627  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
9628
9629 /**
9630   * Search parameter: <b>description</b>
9631   * <p>
9632   * Description: <b>The description of the test script</b><br>
9633   * Type: <b>string</b><br>
9634   * Path: <b>TestScript.description</b><br>
9635   * </p>
9636   */
9637  @SearchParamDefinition(name="description", path="TestScript.description", description="The description of the test script", type="string" )
9638  public static final String SP_DESCRIPTION = "description";
9639 /**
9640   * <b>Fluent Client</b> search parameter constant for <b>description</b>
9641   * <p>
9642   * Description: <b>The description of the test script</b><br>
9643   * Type: <b>string</b><br>
9644   * Path: <b>TestScript.description</b><br>
9645   * </p>
9646   */
9647  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
9648
9649 /**
9650   * Search parameter: <b>testscript-capability</b>
9651   * <p>
9652   * Description: <b>TestScript required and validated capability</b><br>
9653   * Type: <b>string</b><br>
9654   * Path: <b>TestScript.metadata.capability.description</b><br>
9655   * </p>
9656   */
9657  @SearchParamDefinition(name="testscript-capability", path="TestScript.metadata.capability.description", description="TestScript required and validated capability", type="string" )
9658  public static final String SP_TESTSCRIPT_CAPABILITY = "testscript-capability";
9659 /**
9660   * <b>Fluent Client</b> search parameter constant for <b>testscript-capability</b>
9661   * <p>
9662   * Description: <b>TestScript required and validated capability</b><br>
9663   * Type: <b>string</b><br>
9664   * Path: <b>TestScript.metadata.capability.description</b><br>
9665   * </p>
9666   */
9667  public static final ca.uhn.fhir.rest.gclient.StringClientParam TESTSCRIPT_CAPABILITY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TESTSCRIPT_CAPABILITY);
9668
9669 /**
9670   * Search parameter: <b>context-type</b>
9671   * <p>
9672   * Description: <b>A type of use context assigned to the test script</b><br>
9673   * Type: <b>token</b><br>
9674   * Path: <b>TestScript.useContext.code</b><br>
9675   * </p>
9676   */
9677  @SearchParamDefinition(name="context-type", path="TestScript.useContext.code", description="A type of use context assigned to the test script", type="token" )
9678  public static final String SP_CONTEXT_TYPE = "context-type";
9679 /**
9680   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
9681   * <p>
9682   * Description: <b>A type of use context assigned to the test script</b><br>
9683   * Type: <b>token</b><br>
9684   * Path: <b>TestScript.useContext.code</b><br>
9685   * </p>
9686   */
9687  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE);
9688
9689 /**
9690   * Search parameter: <b>title</b>
9691   * <p>
9692   * Description: <b>The human-friendly name of the test script</b><br>
9693   * Type: <b>string</b><br>
9694   * Path: <b>TestScript.title</b><br>
9695   * </p>
9696   */
9697  @SearchParamDefinition(name="title", path="TestScript.title", description="The human-friendly name of the test script", type="string" )
9698  public static final String SP_TITLE = "title";
9699 /**
9700   * <b>Fluent Client</b> search parameter constant for <b>title</b>
9701   * <p>
9702   * Description: <b>The human-friendly name of the test script</b><br>
9703   * Type: <b>string</b><br>
9704   * Path: <b>TestScript.title</b><br>
9705   * </p>
9706   */
9707  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
9708
9709 /**
9710   * Search parameter: <b>version</b>
9711   * <p>
9712   * Description: <b>The business version of the test script</b><br>
9713   * Type: <b>token</b><br>
9714   * Path: <b>TestScript.version</b><br>
9715   * </p>
9716   */
9717  @SearchParamDefinition(name="version", path="TestScript.version", description="The business version of the test script", type="token" )
9718  public static final String SP_VERSION = "version";
9719 /**
9720   * <b>Fluent Client</b> search parameter constant for <b>version</b>
9721   * <p>
9722   * Description: <b>The business version of the test script</b><br>
9723   * Type: <b>token</b><br>
9724   * Path: <b>TestScript.version</b><br>
9725   * </p>
9726   */
9727  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
9728
9729 /**
9730   * Search parameter: <b>url</b>
9731   * <p>
9732   * Description: <b>The uri that identifies the test script</b><br>
9733   * Type: <b>uri</b><br>
9734   * Path: <b>TestScript.url</b><br>
9735   * </p>
9736   */
9737  @SearchParamDefinition(name="url", path="TestScript.url", description="The uri that identifies the test script", type="uri" )
9738  public static final String SP_URL = "url";
9739 /**
9740   * <b>Fluent Client</b> search parameter constant for <b>url</b>
9741   * <p>
9742   * Description: <b>The uri that identifies the test script</b><br>
9743   * Type: <b>uri</b><br>
9744   * Path: <b>TestScript.url</b><br>
9745   * </p>
9746   */
9747  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
9748
9749 /**
9750   * Search parameter: <b>context-quantity</b>
9751   * <p>
9752   * Description: <b>A quantity- or range-valued use context assigned to the test script</b><br>
9753   * Type: <b>quantity</b><br>
9754   * Path: <b>TestScript.useContext.valueQuantity, TestScript.useContext.valueRange</b><br>
9755   * </p>
9756   */
9757  @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" )
9758  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
9759 /**
9760   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
9761   * <p>
9762   * Description: <b>A quantity- or range-valued use context assigned to the test script</b><br>
9763   * Type: <b>quantity</b><br>
9764   * Path: <b>TestScript.useContext.valueQuantity, TestScript.useContext.valueRange</b><br>
9765   * </p>
9766   */
9767  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY);
9768
9769 /**
9770   * Search parameter: <b>name</b>
9771   * <p>
9772   * Description: <b>Computationally friendly name of the test script</b><br>
9773   * Type: <b>string</b><br>
9774   * Path: <b>TestScript.name</b><br>
9775   * </p>
9776   */
9777  @SearchParamDefinition(name="name", path="TestScript.name", description="Computationally friendly name of the test script", type="string" )
9778  public static final String SP_NAME = "name";
9779 /**
9780   * <b>Fluent Client</b> search parameter constant for <b>name</b>
9781   * <p>
9782   * Description: <b>Computationally friendly name of the test script</b><br>
9783   * Type: <b>string</b><br>
9784   * Path: <b>TestScript.name</b><br>
9785   * </p>
9786   */
9787  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
9788
9789 /**
9790   * Search parameter: <b>context</b>
9791   * <p>
9792   * Description: <b>A use context assigned to the test script</b><br>
9793   * Type: <b>token</b><br>
9794   * Path: <b>TestScript.useContext.valueCodeableConcept</b><br>
9795   * </p>
9796   */
9797  @SearchParamDefinition(name="context", path="(TestScript.useContext.value as CodeableConcept)", description="A use context assigned to the test script", type="token" )
9798  public static final String SP_CONTEXT = "context";
9799 /**
9800   * <b>Fluent Client</b> search parameter constant for <b>context</b>
9801   * <p>
9802   * Description: <b>A use context assigned to the test script</b><br>
9803   * Type: <b>token</b><br>
9804   * Path: <b>TestScript.useContext.valueCodeableConcept</b><br>
9805   * </p>
9806   */
9807  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
9808
9809 /**
9810   * Search parameter: <b>publisher</b>
9811   * <p>
9812   * Description: <b>Name of the publisher of the test script</b><br>
9813   * Type: <b>string</b><br>
9814   * Path: <b>TestScript.publisher</b><br>
9815   * </p>
9816   */
9817  @SearchParamDefinition(name="publisher", path="TestScript.publisher", description="Name of the publisher of the test script", type="string" )
9818  public static final String SP_PUBLISHER = "publisher";
9819 /**
9820   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
9821   * <p>
9822   * Description: <b>Name of the publisher of the test script</b><br>
9823   * Type: <b>string</b><br>
9824   * Path: <b>TestScript.publisher</b><br>
9825   * </p>
9826   */
9827  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
9828
9829 /**
9830   * Search parameter: <b>context-type-quantity</b>
9831   * <p>
9832   * Description: <b>A use context type and quantity- or range-based value assigned to the test script</b><br>
9833   * Type: <b>composite</b><br>
9834   * Path: <b></b><br>
9835   * </p>
9836   */
9837  @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={"context-type", "context-quantity"} )
9838  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
9839 /**
9840   * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b>
9841   * <p>
9842   * Description: <b>A use context type and quantity- or range-based value assigned to the test script</b><br>
9843   * Type: <b>composite</b><br>
9844   * Path: <b></b><br>
9845   * </p>
9846   */
9847  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>(SP_CONTEXT_TYPE_QUANTITY);
9848
9849 /**
9850   * Search parameter: <b>status</b>
9851   * <p>
9852   * Description: <b>The current status of the test script</b><br>
9853   * Type: <b>token</b><br>
9854   * Path: <b>TestScript.status</b><br>
9855   * </p>
9856   */
9857  @SearchParamDefinition(name="status", path="TestScript.status", description="The current status of the test script", type="token" )
9858  public static final String SP_STATUS = "status";
9859 /**
9860   * <b>Fluent Client</b> search parameter constant for <b>status</b>
9861   * <p>
9862   * Description: <b>The current status of the test script</b><br>
9863   * Type: <b>token</b><br>
9864   * Path: <b>TestScript.status</b><br>
9865   * </p>
9866   */
9867  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
9868
9869
9870}
9871