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, Sep 13, 2018 09:04-0400 for FHIR v3.5.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", "rule", "ruleset", "setup", "test", "teardown"})
051public class TestScript extends MetadataResource {
052
053    public enum AssertionDirectionType {
054        /**
055         * The assertion is evaluated on the response. This is the default value.
056         */
057        RESPONSE, 
058        /**
059         * The assertion is evaluated on the request.
060         */
061        REQUEST, 
062        /**
063         * added to help the parsers with the generic types
064         */
065        NULL;
066        public static AssertionDirectionType fromCode(String codeString) throws FHIRException {
067            if (codeString == null || "".equals(codeString))
068                return null;
069        if ("response".equals(codeString))
070          return RESPONSE;
071        if ("request".equals(codeString))
072          return REQUEST;
073        if (Configuration.isAcceptInvalidEnums())
074          return null;
075        else
076          throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'");
077        }
078        public String toCode() {
079          switch (this) {
080            case RESPONSE: return "response";
081            case REQUEST: return "request";
082            default: return "?";
083          }
084        }
085        public String getSystem() {
086          switch (this) {
087            case RESPONSE: return "http://hl7.org/fhir/assert-direction-codes";
088            case REQUEST: return "http://hl7.org/fhir/assert-direction-codes";
089            default: return "?";
090          }
091        }
092        public String getDefinition() {
093          switch (this) {
094            case RESPONSE: return "The assertion is evaluated on the response. This is the default value.";
095            case REQUEST: return "The assertion is evaluated on the request.";
096            default: return "?";
097          }
098        }
099        public String getDisplay() {
100          switch (this) {
101            case RESPONSE: return "response";
102            case REQUEST: return "request";
103            default: return "?";
104          }
105        }
106    }
107
108  public static class AssertionDirectionTypeEnumFactory implements EnumFactory<AssertionDirectionType> {
109    public AssertionDirectionType fromCode(String codeString) throws IllegalArgumentException {
110      if (codeString == null || "".equals(codeString))
111            if (codeString == null || "".equals(codeString))
112                return null;
113        if ("response".equals(codeString))
114          return AssertionDirectionType.RESPONSE;
115        if ("request".equals(codeString))
116          return AssertionDirectionType.REQUEST;
117        throw new IllegalArgumentException("Unknown AssertionDirectionType code '"+codeString+"'");
118        }
119        public Enumeration<AssertionDirectionType> fromType(Base code) throws FHIRException {
120          if (code == null)
121            return null;
122          if (code.isEmpty())
123            return new Enumeration<AssertionDirectionType>(this);
124          String codeString = ((PrimitiveType) code).asStringValue();
125          if (codeString == null || "".equals(codeString))
126            return null;
127        if ("response".equals(codeString))
128          return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.RESPONSE);
129        if ("request".equals(codeString))
130          return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.REQUEST);
131        throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'");
132        }
133    public String toCode(AssertionDirectionType code) {
134      if (code == AssertionDirectionType.RESPONSE)
135        return "response";
136      if (code == AssertionDirectionType.REQUEST)
137        return "request";
138      return "?";
139      }
140    public String toSystem(AssertionDirectionType code) {
141      return code.getSystem();
142      }
143    }
144
145    public enum AssertionOperatorType {
146        /**
147         * Default value. Equals comparison.
148         */
149        EQUALS, 
150        /**
151         * Not equals comparison.
152         */
153        NOTEQUALS, 
154        /**
155         * Compare value within a known set of values.
156         */
157        IN, 
158        /**
159         * Compare value not within a known set of values.
160         */
161        NOTIN, 
162        /**
163         * Compare value to be greater than a known value.
164         */
165        GREATERTHAN, 
166        /**
167         * Compare value to be less than a known value.
168         */
169        LESSTHAN, 
170        /**
171         * Compare value is empty.
172         */
173        EMPTY, 
174        /**
175         * Compare value is not empty.
176         */
177        NOTEMPTY, 
178        /**
179         * Compare value string contains a known value.
180         */
181        CONTAINS, 
182        /**
183         * Compare value string does not contain a known value.
184         */
185        NOTCONTAINS, 
186        /**
187         * Evaluate the FHIRPath expression as a boolean condition.
188         */
189        EVAL, 
190        /**
191         * added to help the parsers with the generic types
192         */
193        NULL;
194        public static AssertionOperatorType fromCode(String codeString) throws FHIRException {
195            if (codeString == null || "".equals(codeString))
196                return null;
197        if ("equals".equals(codeString))
198          return EQUALS;
199        if ("notEquals".equals(codeString))
200          return NOTEQUALS;
201        if ("in".equals(codeString))
202          return IN;
203        if ("notIn".equals(codeString))
204          return NOTIN;
205        if ("greaterThan".equals(codeString))
206          return GREATERTHAN;
207        if ("lessThan".equals(codeString))
208          return LESSTHAN;
209        if ("empty".equals(codeString))
210          return EMPTY;
211        if ("notEmpty".equals(codeString))
212          return NOTEMPTY;
213        if ("contains".equals(codeString))
214          return CONTAINS;
215        if ("notContains".equals(codeString))
216          return NOTCONTAINS;
217        if ("eval".equals(codeString))
218          return EVAL;
219        if (Configuration.isAcceptInvalidEnums())
220          return null;
221        else
222          throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'");
223        }
224        public String toCode() {
225          switch (this) {
226            case EQUALS: return "equals";
227            case NOTEQUALS: return "notEquals";
228            case IN: return "in";
229            case NOTIN: return "notIn";
230            case GREATERTHAN: return "greaterThan";
231            case LESSTHAN: return "lessThan";
232            case EMPTY: return "empty";
233            case NOTEMPTY: return "notEmpty";
234            case CONTAINS: return "contains";
235            case NOTCONTAINS: return "notContains";
236            case EVAL: return "eval";
237            default: return "?";
238          }
239        }
240        public String getSystem() {
241          switch (this) {
242            case EQUALS: return "http://hl7.org/fhir/assert-operator-codes";
243            case NOTEQUALS: return "http://hl7.org/fhir/assert-operator-codes";
244            case IN: return "http://hl7.org/fhir/assert-operator-codes";
245            case NOTIN: return "http://hl7.org/fhir/assert-operator-codes";
246            case GREATERTHAN: return "http://hl7.org/fhir/assert-operator-codes";
247            case LESSTHAN: return "http://hl7.org/fhir/assert-operator-codes";
248            case EMPTY: return "http://hl7.org/fhir/assert-operator-codes";
249            case NOTEMPTY: return "http://hl7.org/fhir/assert-operator-codes";
250            case CONTAINS: return "http://hl7.org/fhir/assert-operator-codes";
251            case NOTCONTAINS: return "http://hl7.org/fhir/assert-operator-codes";
252            case EVAL: return "http://hl7.org/fhir/assert-operator-codes";
253            default: return "?";
254          }
255        }
256        public String getDefinition() {
257          switch (this) {
258            case EQUALS: return "Default value. Equals comparison.";
259            case NOTEQUALS: return "Not equals comparison.";
260            case IN: return "Compare value within a known set of values.";
261            case NOTIN: return "Compare value not within a known set of values.";
262            case GREATERTHAN: return "Compare value to be greater than a known value.";
263            case LESSTHAN: return "Compare value to be less than a known value.";
264            case EMPTY: return "Compare value is empty.";
265            case NOTEMPTY: return "Compare value is not empty.";
266            case CONTAINS: return "Compare value string contains a known value.";
267            case NOTCONTAINS: return "Compare value string does not contain a known value.";
268            case EVAL: return "Evaluate the FHIRPath expression as a boolean condition.";
269            default: return "?";
270          }
271        }
272        public String getDisplay() {
273          switch (this) {
274            case EQUALS: return "equals";
275            case NOTEQUALS: return "notEquals";
276            case IN: return "in";
277            case NOTIN: return "notIn";
278            case GREATERTHAN: return "greaterThan";
279            case LESSTHAN: return "lessThan";
280            case EMPTY: return "empty";
281            case NOTEMPTY: return "notEmpty";
282            case CONTAINS: return "contains";
283            case NOTCONTAINS: return "notContains";
284            case EVAL: return "evaluate";
285            default: return "?";
286          }
287        }
288    }
289
290  public static class AssertionOperatorTypeEnumFactory implements EnumFactory<AssertionOperatorType> {
291    public AssertionOperatorType fromCode(String codeString) throws IllegalArgumentException {
292      if (codeString == null || "".equals(codeString))
293            if (codeString == null || "".equals(codeString))
294                return null;
295        if ("equals".equals(codeString))
296          return AssertionOperatorType.EQUALS;
297        if ("notEquals".equals(codeString))
298          return AssertionOperatorType.NOTEQUALS;
299        if ("in".equals(codeString))
300          return AssertionOperatorType.IN;
301        if ("notIn".equals(codeString))
302          return AssertionOperatorType.NOTIN;
303        if ("greaterThan".equals(codeString))
304          return AssertionOperatorType.GREATERTHAN;
305        if ("lessThan".equals(codeString))
306          return AssertionOperatorType.LESSTHAN;
307        if ("empty".equals(codeString))
308          return AssertionOperatorType.EMPTY;
309        if ("notEmpty".equals(codeString))
310          return AssertionOperatorType.NOTEMPTY;
311        if ("contains".equals(codeString))
312          return AssertionOperatorType.CONTAINS;
313        if ("notContains".equals(codeString))
314          return AssertionOperatorType.NOTCONTAINS;
315        if ("eval".equals(codeString))
316          return AssertionOperatorType.EVAL;
317        throw new IllegalArgumentException("Unknown AssertionOperatorType code '"+codeString+"'");
318        }
319        public Enumeration<AssertionOperatorType> fromType(Base code) throws FHIRException {
320          if (code == null)
321            return null;
322          if (code.isEmpty())
323            return new Enumeration<AssertionOperatorType>(this);
324          String codeString = ((PrimitiveType) code).asStringValue();
325          if (codeString == null || "".equals(codeString))
326            return null;
327        if ("equals".equals(codeString))
328          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EQUALS);
329        if ("notEquals".equals(codeString))
330          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEQUALS);
331        if ("in".equals(codeString))
332          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.IN);
333        if ("notIn".equals(codeString))
334          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTIN);
335        if ("greaterThan".equals(codeString))
336          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.GREATERTHAN);
337        if ("lessThan".equals(codeString))
338          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.LESSTHAN);
339        if ("empty".equals(codeString))
340          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EMPTY);
341        if ("notEmpty".equals(codeString))
342          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEMPTY);
343        if ("contains".equals(codeString))
344          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.CONTAINS);
345        if ("notContains".equals(codeString))
346          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTCONTAINS);
347        if ("eval".equals(codeString))
348          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EVAL);
349        throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'");
350        }
351    public String toCode(AssertionOperatorType code) {
352      if (code == AssertionOperatorType.EQUALS)
353        return "equals";
354      if (code == AssertionOperatorType.NOTEQUALS)
355        return "notEquals";
356      if (code == AssertionOperatorType.IN)
357        return "in";
358      if (code == AssertionOperatorType.NOTIN)
359        return "notIn";
360      if (code == AssertionOperatorType.GREATERTHAN)
361        return "greaterThan";
362      if (code == AssertionOperatorType.LESSTHAN)
363        return "lessThan";
364      if (code == AssertionOperatorType.EMPTY)
365        return "empty";
366      if (code == AssertionOperatorType.NOTEMPTY)
367        return "notEmpty";
368      if (code == AssertionOperatorType.CONTAINS)
369        return "contains";
370      if (code == AssertionOperatorType.NOTCONTAINS)
371        return "notContains";
372      if (code == AssertionOperatorType.EVAL)
373        return "eval";
374      return "?";
375      }
376    public String toSystem(AssertionOperatorType code) {
377      return code.getSystem();
378      }
379    }
380
381    public enum TestScriptRequestMethodCode {
382        /**
383         * HTTP DELETE operation.
384         */
385        DELETE, 
386        /**
387         * HTTP GET operation.
388         */
389        GET, 
390        /**
391         * HTTP OPTIONS operation.
392         */
393        OPTIONS, 
394        /**
395         * HTTP PATCH operation.
396         */
397        PATCH, 
398        /**
399         * HTTP POST operation.
400         */
401        POST, 
402        /**
403         * HTTP PUT operation.
404         */
405        PUT, 
406        /**
407         * added to help the parsers with the generic types
408         */
409        NULL;
410        public static TestScriptRequestMethodCode fromCode(String codeString) throws FHIRException {
411            if (codeString == null || "".equals(codeString))
412                return null;
413        if ("delete".equals(codeString))
414          return DELETE;
415        if ("get".equals(codeString))
416          return GET;
417        if ("options".equals(codeString))
418          return OPTIONS;
419        if ("patch".equals(codeString))
420          return PATCH;
421        if ("post".equals(codeString))
422          return POST;
423        if ("put".equals(codeString))
424          return PUT;
425        if (Configuration.isAcceptInvalidEnums())
426          return null;
427        else
428          throw new FHIRException("Unknown TestScriptRequestMethodCode code '"+codeString+"'");
429        }
430        public String toCode() {
431          switch (this) {
432            case DELETE: return "delete";
433            case GET: return "get";
434            case OPTIONS: return "options";
435            case PATCH: return "patch";
436            case POST: return "post";
437            case PUT: return "put";
438            default: return "?";
439          }
440        }
441        public String getSystem() {
442          switch (this) {
443            case DELETE: return "http://hl7.org/fhir/http-operations";
444            case GET: return "http://hl7.org/fhir/http-operations";
445            case OPTIONS: return "http://hl7.org/fhir/http-operations";
446            case PATCH: return "http://hl7.org/fhir/http-operations";
447            case POST: return "http://hl7.org/fhir/http-operations";
448            case PUT: return "http://hl7.org/fhir/http-operations";
449            default: return "?";
450          }
451        }
452        public String getDefinition() {
453          switch (this) {
454            case DELETE: return "HTTP DELETE operation.";
455            case GET: return "HTTP GET operation.";
456            case OPTIONS: return "HTTP OPTIONS operation.";
457            case PATCH: return "HTTP PATCH operation.";
458            case POST: return "HTTP POST operation.";
459            case PUT: return "HTTP PUT operation.";
460            default: return "?";
461          }
462        }
463        public String getDisplay() {
464          switch (this) {
465            case DELETE: return "DELETE";
466            case GET: return "GET";
467            case OPTIONS: return "OPTIONS";
468            case PATCH: return "PATCH";
469            case POST: return "POST";
470            case PUT: return "PUT";
471            default: return "?";
472          }
473        }
474    }
475
476  public static class TestScriptRequestMethodCodeEnumFactory implements EnumFactory<TestScriptRequestMethodCode> {
477    public TestScriptRequestMethodCode fromCode(String codeString) throws IllegalArgumentException {
478      if (codeString == null || "".equals(codeString))
479            if (codeString == null || "".equals(codeString))
480                return null;
481        if ("delete".equals(codeString))
482          return TestScriptRequestMethodCode.DELETE;
483        if ("get".equals(codeString))
484          return TestScriptRequestMethodCode.GET;
485        if ("options".equals(codeString))
486          return TestScriptRequestMethodCode.OPTIONS;
487        if ("patch".equals(codeString))
488          return TestScriptRequestMethodCode.PATCH;
489        if ("post".equals(codeString))
490          return TestScriptRequestMethodCode.POST;
491        if ("put".equals(codeString))
492          return TestScriptRequestMethodCode.PUT;
493        throw new IllegalArgumentException("Unknown TestScriptRequestMethodCode code '"+codeString+"'");
494        }
495        public Enumeration<TestScriptRequestMethodCode> fromType(Base code) throws FHIRException {
496          if (code == null)
497            return null;
498          if (code.isEmpty())
499            return new Enumeration<TestScriptRequestMethodCode>(this);
500          String codeString = ((PrimitiveType) code).asStringValue();
501          if (codeString == null || "".equals(codeString))
502            return null;
503        if ("delete".equals(codeString))
504          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.DELETE);
505        if ("get".equals(codeString))
506          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.GET);
507        if ("options".equals(codeString))
508          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.OPTIONS);
509        if ("patch".equals(codeString))
510          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.PATCH);
511        if ("post".equals(codeString))
512          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.POST);
513        if ("put".equals(codeString))
514          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.PUT);
515        throw new FHIRException("Unknown TestScriptRequestMethodCode code '"+codeString+"'");
516        }
517    public String toCode(TestScriptRequestMethodCode code) {
518      if (code == TestScriptRequestMethodCode.DELETE)
519        return "delete";
520      if (code == TestScriptRequestMethodCode.GET)
521        return "get";
522      if (code == TestScriptRequestMethodCode.OPTIONS)
523        return "options";
524      if (code == TestScriptRequestMethodCode.PATCH)
525        return "patch";
526      if (code == TestScriptRequestMethodCode.POST)
527        return "post";
528      if (code == TestScriptRequestMethodCode.PUT)
529        return "put";
530      return "?";
531      }
532    public String toSystem(TestScriptRequestMethodCode code) {
533      return code.getSystem();
534      }
535    }
536
537    public enum AssertionResponseTypes {
538        /**
539         * Response code is 200.
540         */
541        OKAY, 
542        /**
543         * Response code is 201.
544         */
545        CREATED, 
546        /**
547         * Response code is 204.
548         */
549        NOCONTENT, 
550        /**
551         * Response code is 304.
552         */
553        NOTMODIFIED, 
554        /**
555         * Response code is 400.
556         */
557        BAD, 
558        /**
559         * Response code is 403.
560         */
561        FORBIDDEN, 
562        /**
563         * Response code is 404.
564         */
565        NOTFOUND, 
566        /**
567         * Response code is 405.
568         */
569        METHODNOTALLOWED, 
570        /**
571         * Response code is 409.
572         */
573        CONFLICT, 
574        /**
575         * Response code is 410.
576         */
577        GONE, 
578        /**
579         * Response code is 412.
580         */
581        PRECONDITIONFAILED, 
582        /**
583         * Response code is 422.
584         */
585        UNPROCESSABLE, 
586        /**
587         * added to help the parsers with the generic types
588         */
589        NULL;
590        public static AssertionResponseTypes fromCode(String codeString) throws FHIRException {
591            if (codeString == null || "".equals(codeString))
592                return null;
593        if ("okay".equals(codeString))
594          return OKAY;
595        if ("created".equals(codeString))
596          return CREATED;
597        if ("noContent".equals(codeString))
598          return NOCONTENT;
599        if ("notModified".equals(codeString))
600          return NOTMODIFIED;
601        if ("bad".equals(codeString))
602          return BAD;
603        if ("forbidden".equals(codeString))
604          return FORBIDDEN;
605        if ("notFound".equals(codeString))
606          return NOTFOUND;
607        if ("methodNotAllowed".equals(codeString))
608          return METHODNOTALLOWED;
609        if ("conflict".equals(codeString))
610          return CONFLICT;
611        if ("gone".equals(codeString))
612          return GONE;
613        if ("preconditionFailed".equals(codeString))
614          return PRECONDITIONFAILED;
615        if ("unprocessable".equals(codeString))
616          return UNPROCESSABLE;
617        if (Configuration.isAcceptInvalidEnums())
618          return null;
619        else
620          throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'");
621        }
622        public String toCode() {
623          switch (this) {
624            case OKAY: return "okay";
625            case CREATED: return "created";
626            case NOCONTENT: return "noContent";
627            case NOTMODIFIED: return "notModified";
628            case BAD: return "bad";
629            case FORBIDDEN: return "forbidden";
630            case NOTFOUND: return "notFound";
631            case METHODNOTALLOWED: return "methodNotAllowed";
632            case CONFLICT: return "conflict";
633            case GONE: return "gone";
634            case PRECONDITIONFAILED: return "preconditionFailed";
635            case UNPROCESSABLE: return "unprocessable";
636            default: return "?";
637          }
638        }
639        public String getSystem() {
640          switch (this) {
641            case OKAY: return "http://hl7.org/fhir/assert-response-code-types";
642            case CREATED: return "http://hl7.org/fhir/assert-response-code-types";
643            case NOCONTENT: return "http://hl7.org/fhir/assert-response-code-types";
644            case NOTMODIFIED: return "http://hl7.org/fhir/assert-response-code-types";
645            case BAD: return "http://hl7.org/fhir/assert-response-code-types";
646            case FORBIDDEN: return "http://hl7.org/fhir/assert-response-code-types";
647            case NOTFOUND: return "http://hl7.org/fhir/assert-response-code-types";
648            case METHODNOTALLOWED: return "http://hl7.org/fhir/assert-response-code-types";
649            case CONFLICT: return "http://hl7.org/fhir/assert-response-code-types";
650            case GONE: return "http://hl7.org/fhir/assert-response-code-types";
651            case PRECONDITIONFAILED: return "http://hl7.org/fhir/assert-response-code-types";
652            case UNPROCESSABLE: return "http://hl7.org/fhir/assert-response-code-types";
653            default: return "?";
654          }
655        }
656        public String getDefinition() {
657          switch (this) {
658            case OKAY: return "Response code is 200.";
659            case CREATED: return "Response code is 201.";
660            case NOCONTENT: return "Response code is 204.";
661            case NOTMODIFIED: return "Response code is 304.";
662            case BAD: return "Response code is 400.";
663            case FORBIDDEN: return "Response code is 403.";
664            case NOTFOUND: return "Response code is 404.";
665            case METHODNOTALLOWED: return "Response code is 405.";
666            case CONFLICT: return "Response code is 409.";
667            case GONE: return "Response code is 410.";
668            case PRECONDITIONFAILED: return "Response code is 412.";
669            case UNPROCESSABLE: return "Response code is 422.";
670            default: return "?";
671          }
672        }
673        public String getDisplay() {
674          switch (this) {
675            case OKAY: return "okay";
676            case CREATED: return "created";
677            case NOCONTENT: return "noContent";
678            case NOTMODIFIED: return "notModified";
679            case BAD: return "bad";
680            case FORBIDDEN: return "forbidden";
681            case NOTFOUND: return "notFound";
682            case METHODNOTALLOWED: return "methodNotAllowed";
683            case CONFLICT: return "conflict";
684            case GONE: return "gone";
685            case PRECONDITIONFAILED: return "preconditionFailed";
686            case UNPROCESSABLE: return "unprocessable";
687            default: return "?";
688          }
689        }
690    }
691
692  public static class AssertionResponseTypesEnumFactory implements EnumFactory<AssertionResponseTypes> {
693    public AssertionResponseTypes fromCode(String codeString) throws IllegalArgumentException {
694      if (codeString == null || "".equals(codeString))
695            if (codeString == null || "".equals(codeString))
696                return null;
697        if ("okay".equals(codeString))
698          return AssertionResponseTypes.OKAY;
699        if ("created".equals(codeString))
700          return AssertionResponseTypes.CREATED;
701        if ("noContent".equals(codeString))
702          return AssertionResponseTypes.NOCONTENT;
703        if ("notModified".equals(codeString))
704          return AssertionResponseTypes.NOTMODIFIED;
705        if ("bad".equals(codeString))
706          return AssertionResponseTypes.BAD;
707        if ("forbidden".equals(codeString))
708          return AssertionResponseTypes.FORBIDDEN;
709        if ("notFound".equals(codeString))
710          return AssertionResponseTypes.NOTFOUND;
711        if ("methodNotAllowed".equals(codeString))
712          return AssertionResponseTypes.METHODNOTALLOWED;
713        if ("conflict".equals(codeString))
714          return AssertionResponseTypes.CONFLICT;
715        if ("gone".equals(codeString))
716          return AssertionResponseTypes.GONE;
717        if ("preconditionFailed".equals(codeString))
718          return AssertionResponseTypes.PRECONDITIONFAILED;
719        if ("unprocessable".equals(codeString))
720          return AssertionResponseTypes.UNPROCESSABLE;
721        throw new IllegalArgumentException("Unknown AssertionResponseTypes code '"+codeString+"'");
722        }
723        public Enumeration<AssertionResponseTypes> fromType(Base code) throws FHIRException {
724          if (code == null)
725            return null;
726          if (code.isEmpty())
727            return new Enumeration<AssertionResponseTypes>(this);
728          String codeString = ((PrimitiveType) code).asStringValue();
729          if (codeString == null || "".equals(codeString))
730            return null;
731        if ("okay".equals(codeString))
732          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.OKAY);
733        if ("created".equals(codeString))
734          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CREATED);
735        if ("noContent".equals(codeString))
736          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOCONTENT);
737        if ("notModified".equals(codeString))
738          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTMODIFIED);
739        if ("bad".equals(codeString))
740          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.BAD);
741        if ("forbidden".equals(codeString))
742          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.FORBIDDEN);
743        if ("notFound".equals(codeString))
744          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTFOUND);
745        if ("methodNotAllowed".equals(codeString))
746          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.METHODNOTALLOWED);
747        if ("conflict".equals(codeString))
748          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CONFLICT);
749        if ("gone".equals(codeString))
750          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.GONE);
751        if ("preconditionFailed".equals(codeString))
752          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.PRECONDITIONFAILED);
753        if ("unprocessable".equals(codeString))
754          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.UNPROCESSABLE);
755        throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'");
756        }
757    public String toCode(AssertionResponseTypes code) {
758      if (code == AssertionResponseTypes.OKAY)
759        return "okay";
760      if (code == AssertionResponseTypes.CREATED)
761        return "created";
762      if (code == AssertionResponseTypes.NOCONTENT)
763        return "noContent";
764      if (code == AssertionResponseTypes.NOTMODIFIED)
765        return "notModified";
766      if (code == AssertionResponseTypes.BAD)
767        return "bad";
768      if (code == AssertionResponseTypes.FORBIDDEN)
769        return "forbidden";
770      if (code == AssertionResponseTypes.NOTFOUND)
771        return "notFound";
772      if (code == AssertionResponseTypes.METHODNOTALLOWED)
773        return "methodNotAllowed";
774      if (code == AssertionResponseTypes.CONFLICT)
775        return "conflict";
776      if (code == AssertionResponseTypes.GONE)
777        return "gone";
778      if (code == AssertionResponseTypes.PRECONDITIONFAILED)
779        return "preconditionFailed";
780      if (code == AssertionResponseTypes.UNPROCESSABLE)
781        return "unprocessable";
782      return "?";
783      }
784    public String toSystem(AssertionResponseTypes code) {
785      return code.getSystem();
786      }
787    }
788
789    @Block()
790    public static class TestScriptOriginComponent extends BackboneElement implements IBaseBackboneElement {
791        /**
792         * Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.
793         */
794        @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false)
795        @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." )
796        protected IntegerType index;
797
798        /**
799         * The type of origin profile the test system supports.
800         */
801        @Child(name = "profile", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false)
802        @Description(shortDefinition="FHIR-Client | FHIR-SDC-FormFiller", formalDefinition="The type of origin profile the test system supports." )
803        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-profile-origin-types")
804        protected Coding profile;
805
806        private static final long serialVersionUID = -1239935149L;
807
808    /**
809     * Constructor
810     */
811      public TestScriptOriginComponent() {
812        super();
813      }
814
815    /**
816     * Constructor
817     */
818      public TestScriptOriginComponent(IntegerType index, Coding profile) {
819        super();
820        this.index = index;
821        this.profile = profile;
822      }
823
824        /**
825         * @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
826         */
827        public IntegerType getIndexElement() { 
828          if (this.index == null)
829            if (Configuration.errorOnAutoCreate())
830              throw new Error("Attempt to auto-create TestScriptOriginComponent.index");
831            else if (Configuration.doAutoCreate())
832              this.index = new IntegerType(); // bb
833          return this.index;
834        }
835
836        public boolean hasIndexElement() { 
837          return this.index != null && !this.index.isEmpty();
838        }
839
840        public boolean hasIndex() { 
841          return this.index != null && !this.index.isEmpty();
842        }
843
844        /**
845         * @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
846         */
847        public TestScriptOriginComponent setIndexElement(IntegerType value) { 
848          this.index = value;
849          return this;
850        }
851
852        /**
853         * @return Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.
854         */
855        public int getIndex() { 
856          return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue();
857        }
858
859        /**
860         * @param value Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.
861         */
862        public TestScriptOriginComponent setIndex(int value) { 
863            if (this.index == null)
864              this.index = new IntegerType();
865            this.index.setValue(value);
866          return this;
867        }
868
869        /**
870         * @return {@link #profile} (The type of origin profile the test system supports.)
871         */
872        public Coding getProfile() { 
873          if (this.profile == null)
874            if (Configuration.errorOnAutoCreate())
875              throw new Error("Attempt to auto-create TestScriptOriginComponent.profile");
876            else if (Configuration.doAutoCreate())
877              this.profile = new Coding(); // cc
878          return this.profile;
879        }
880
881        public boolean hasProfile() { 
882          return this.profile != null && !this.profile.isEmpty();
883        }
884
885        /**
886         * @param value {@link #profile} (The type of origin profile the test system supports.)
887         */
888        public TestScriptOriginComponent setProfile(Coding value) { 
889          this.profile = value;
890          return this;
891        }
892
893        protected void listChildren(List<Property> children) {
894          super.listChildren(children);
895          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));
896          children.add(new Property("profile", "Coding", "The type of origin profile the test system supports.", 0, 1, profile));
897        }
898
899        @Override
900        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
901          switch (_hash) {
902          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);
903          case -309425751: /*profile*/  return new Property("profile", "Coding", "The type of origin profile the test system supports.", 0, 1, profile);
904          default: return super.getNamedProperty(_hash, _name, _checkValid);
905          }
906
907        }
908
909      @Override
910      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
911        switch (hash) {
912        case 100346066: /*index*/ return this.index == null ? new Base[0] : new Base[] {this.index}; // IntegerType
913        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Coding
914        default: return super.getProperty(hash, name, checkValid);
915        }
916
917      }
918
919      @Override
920      public Base setProperty(int hash, String name, Base value) throws FHIRException {
921        switch (hash) {
922        case 100346066: // index
923          this.index = castToInteger(value); // IntegerType
924          return value;
925        case -309425751: // profile
926          this.profile = castToCoding(value); // Coding
927          return value;
928        default: return super.setProperty(hash, name, value);
929        }
930
931      }
932
933      @Override
934      public Base setProperty(String name, Base value) throws FHIRException {
935        if (name.equals("index")) {
936          this.index = castToInteger(value); // IntegerType
937        } else if (name.equals("profile")) {
938          this.profile = castToCoding(value); // Coding
939        } else
940          return super.setProperty(name, value);
941        return value;
942      }
943
944      @Override
945      public Base makeProperty(int hash, String name) throws FHIRException {
946        switch (hash) {
947        case 100346066:  return getIndexElement();
948        case -309425751:  return getProfile(); 
949        default: return super.makeProperty(hash, name);
950        }
951
952      }
953
954      @Override
955      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
956        switch (hash) {
957        case 100346066: /*index*/ return new String[] {"integer"};
958        case -309425751: /*profile*/ return new String[] {"Coding"};
959        default: return super.getTypesForProperty(hash, name);
960        }
961
962      }
963
964      @Override
965      public Base addChild(String name) throws FHIRException {
966        if (name.equals("index")) {
967          throw new FHIRException("Cannot call addChild on a primitive type TestScript.index");
968        }
969        else if (name.equals("profile")) {
970          this.profile = new Coding();
971          return this.profile;
972        }
973        else
974          return super.addChild(name);
975      }
976
977      public TestScriptOriginComponent copy() {
978        TestScriptOriginComponent dst = new TestScriptOriginComponent();
979        copyValues(dst);
980        dst.index = index == null ? null : index.copy();
981        dst.profile = profile == null ? null : profile.copy();
982        return dst;
983      }
984
985      @Override
986      public boolean equalsDeep(Base other_) {
987        if (!super.equalsDeep(other_))
988          return false;
989        if (!(other_ instanceof TestScriptOriginComponent))
990          return false;
991        TestScriptOriginComponent o = (TestScriptOriginComponent) other_;
992        return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true);
993      }
994
995      @Override
996      public boolean equalsShallow(Base other_) {
997        if (!super.equalsShallow(other_))
998          return false;
999        if (!(other_ instanceof TestScriptOriginComponent))
1000          return false;
1001        TestScriptOriginComponent o = (TestScriptOriginComponent) other_;
1002        return compareValues(index, o.index, true);
1003      }
1004
1005      public boolean isEmpty() {
1006        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(index, profile);
1007      }
1008
1009  public String fhirType() {
1010    return "TestScript.origin";
1011
1012  }
1013
1014  }
1015
1016    @Block()
1017    public static class TestScriptDestinationComponent extends BackboneElement implements IBaseBackboneElement {
1018        /**
1019         * Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.
1020         */
1021        @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1022        @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." )
1023        protected IntegerType index;
1024
1025        /**
1026         * The type of destination profile the test system supports.
1027         */
1028        @Child(name = "profile", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false)
1029        @Description(shortDefinition="FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor", formalDefinition="The type of destination profile the test system supports." )
1030        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-profile-destination-types")
1031        protected Coding profile;
1032
1033        private static final long serialVersionUID = -1239935149L;
1034
1035    /**
1036     * Constructor
1037     */
1038      public TestScriptDestinationComponent() {
1039        super();
1040      }
1041
1042    /**
1043     * Constructor
1044     */
1045      public TestScriptDestinationComponent(IntegerType index, Coding profile) {
1046        super();
1047        this.index = index;
1048        this.profile = profile;
1049      }
1050
1051        /**
1052         * @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
1053         */
1054        public IntegerType getIndexElement() { 
1055          if (this.index == null)
1056            if (Configuration.errorOnAutoCreate())
1057              throw new Error("Attempt to auto-create TestScriptDestinationComponent.index");
1058            else if (Configuration.doAutoCreate())
1059              this.index = new IntegerType(); // bb
1060          return this.index;
1061        }
1062
1063        public boolean hasIndexElement() { 
1064          return this.index != null && !this.index.isEmpty();
1065        }
1066
1067        public boolean hasIndex() { 
1068          return this.index != null && !this.index.isEmpty();
1069        }
1070
1071        /**
1072         * @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
1073         */
1074        public TestScriptDestinationComponent setIndexElement(IntegerType value) { 
1075          this.index = value;
1076          return this;
1077        }
1078
1079        /**
1080         * @return Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.
1081         */
1082        public int getIndex() { 
1083          return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue();
1084        }
1085
1086        /**
1087         * @param value Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.
1088         */
1089        public TestScriptDestinationComponent setIndex(int value) { 
1090            if (this.index == null)
1091              this.index = new IntegerType();
1092            this.index.setValue(value);
1093          return this;
1094        }
1095
1096        /**
1097         * @return {@link #profile} (The type of destination profile the test system supports.)
1098         */
1099        public Coding getProfile() { 
1100          if (this.profile == null)
1101            if (Configuration.errorOnAutoCreate())
1102              throw new Error("Attempt to auto-create TestScriptDestinationComponent.profile");
1103            else if (Configuration.doAutoCreate())
1104              this.profile = new Coding(); // cc
1105          return this.profile;
1106        }
1107
1108        public boolean hasProfile() { 
1109          return this.profile != null && !this.profile.isEmpty();
1110        }
1111
1112        /**
1113         * @param value {@link #profile} (The type of destination profile the test system supports.)
1114         */
1115        public TestScriptDestinationComponent setProfile(Coding value) { 
1116          this.profile = value;
1117          return this;
1118        }
1119
1120        protected void listChildren(List<Property> children) {
1121          super.listChildren(children);
1122          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));
1123          children.add(new Property("profile", "Coding", "The type of destination profile the test system supports.", 0, 1, profile));
1124        }
1125
1126        @Override
1127        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1128          switch (_hash) {
1129          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);
1130          case -309425751: /*profile*/  return new Property("profile", "Coding", "The type of destination profile the test system supports.", 0, 1, profile);
1131          default: return super.getNamedProperty(_hash, _name, _checkValid);
1132          }
1133
1134        }
1135
1136      @Override
1137      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1138        switch (hash) {
1139        case 100346066: /*index*/ return this.index == null ? new Base[0] : new Base[] {this.index}; // IntegerType
1140        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Coding
1141        default: return super.getProperty(hash, name, checkValid);
1142        }
1143
1144      }
1145
1146      @Override
1147      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1148        switch (hash) {
1149        case 100346066: // index
1150          this.index = castToInteger(value); // IntegerType
1151          return value;
1152        case -309425751: // profile
1153          this.profile = castToCoding(value); // Coding
1154          return value;
1155        default: return super.setProperty(hash, name, value);
1156        }
1157
1158      }
1159
1160      @Override
1161      public Base setProperty(String name, Base value) throws FHIRException {
1162        if (name.equals("index")) {
1163          this.index = castToInteger(value); // IntegerType
1164        } else if (name.equals("profile")) {
1165          this.profile = castToCoding(value); // Coding
1166        } else
1167          return super.setProperty(name, value);
1168        return value;
1169      }
1170
1171      @Override
1172      public Base makeProperty(int hash, String name) throws FHIRException {
1173        switch (hash) {
1174        case 100346066:  return getIndexElement();
1175        case -309425751:  return getProfile(); 
1176        default: return super.makeProperty(hash, name);
1177        }
1178
1179      }
1180
1181      @Override
1182      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1183        switch (hash) {
1184        case 100346066: /*index*/ return new String[] {"integer"};
1185        case -309425751: /*profile*/ return new String[] {"Coding"};
1186        default: return super.getTypesForProperty(hash, name);
1187        }
1188
1189      }
1190
1191      @Override
1192      public Base addChild(String name) throws FHIRException {
1193        if (name.equals("index")) {
1194          throw new FHIRException("Cannot call addChild on a primitive type TestScript.index");
1195        }
1196        else if (name.equals("profile")) {
1197          this.profile = new Coding();
1198          return this.profile;
1199        }
1200        else
1201          return super.addChild(name);
1202      }
1203
1204      public TestScriptDestinationComponent copy() {
1205        TestScriptDestinationComponent dst = new TestScriptDestinationComponent();
1206        copyValues(dst);
1207        dst.index = index == null ? null : index.copy();
1208        dst.profile = profile == null ? null : profile.copy();
1209        return dst;
1210      }
1211
1212      @Override
1213      public boolean equalsDeep(Base other_) {
1214        if (!super.equalsDeep(other_))
1215          return false;
1216        if (!(other_ instanceof TestScriptDestinationComponent))
1217          return false;
1218        TestScriptDestinationComponent o = (TestScriptDestinationComponent) other_;
1219        return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true);
1220      }
1221
1222      @Override
1223      public boolean equalsShallow(Base other_) {
1224        if (!super.equalsShallow(other_))
1225          return false;
1226        if (!(other_ instanceof TestScriptDestinationComponent))
1227          return false;
1228        TestScriptDestinationComponent o = (TestScriptDestinationComponent) other_;
1229        return compareValues(index, o.index, true);
1230      }
1231
1232      public boolean isEmpty() {
1233        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(index, profile);
1234      }
1235
1236  public String fhirType() {
1237    return "TestScript.destination";
1238
1239  }
1240
1241  }
1242
1243    @Block()
1244    public static class TestScriptMetadataComponent extends BackboneElement implements IBaseBackboneElement {
1245        /**
1246         * A link to the FHIR specification that this test is covering.
1247         */
1248        @Child(name = "link", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1249        @Description(shortDefinition="Links to the FHIR specification", formalDefinition="A link to the FHIR specification that this test is covering." )
1250        protected List<TestScriptMetadataLinkComponent> link;
1251
1252        /**
1253         * Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.
1254         */
1255        @Child(name = "capability", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1256        @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." )
1257        protected List<TestScriptMetadataCapabilityComponent> capability;
1258
1259        private static final long serialVersionUID = 745183328L;
1260
1261    /**
1262     * Constructor
1263     */
1264      public TestScriptMetadataComponent() {
1265        super();
1266      }
1267
1268        /**
1269         * @return {@link #link} (A link to the FHIR specification that this test is covering.)
1270         */
1271        public List<TestScriptMetadataLinkComponent> getLink() { 
1272          if (this.link == null)
1273            this.link = new ArrayList<TestScriptMetadataLinkComponent>();
1274          return this.link;
1275        }
1276
1277        /**
1278         * @return Returns a reference to <code>this</code> for easy method chaining
1279         */
1280        public TestScriptMetadataComponent setLink(List<TestScriptMetadataLinkComponent> theLink) { 
1281          this.link = theLink;
1282          return this;
1283        }
1284
1285        public boolean hasLink() { 
1286          if (this.link == null)
1287            return false;
1288          for (TestScriptMetadataLinkComponent item : this.link)
1289            if (!item.isEmpty())
1290              return true;
1291          return false;
1292        }
1293
1294        public TestScriptMetadataLinkComponent addLink() { //3
1295          TestScriptMetadataLinkComponent t = new TestScriptMetadataLinkComponent();
1296          if (this.link == null)
1297            this.link = new ArrayList<TestScriptMetadataLinkComponent>();
1298          this.link.add(t);
1299          return t;
1300        }
1301
1302        public TestScriptMetadataComponent addLink(TestScriptMetadataLinkComponent t) { //3
1303          if (t == null)
1304            return this;
1305          if (this.link == null)
1306            this.link = new ArrayList<TestScriptMetadataLinkComponent>();
1307          this.link.add(t);
1308          return this;
1309        }
1310
1311        /**
1312         * @return The first repetition of repeating field {@link #link}, creating it if it does not already exist
1313         */
1314        public TestScriptMetadataLinkComponent getLinkFirstRep() { 
1315          if (getLink().isEmpty()) {
1316            addLink();
1317          }
1318          return getLink().get(0);
1319        }
1320
1321        /**
1322         * @return {@link #capability} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.)
1323         */
1324        public List<TestScriptMetadataCapabilityComponent> getCapability() { 
1325          if (this.capability == null)
1326            this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1327          return this.capability;
1328        }
1329
1330        /**
1331         * @return Returns a reference to <code>this</code> for easy method chaining
1332         */
1333        public TestScriptMetadataComponent setCapability(List<TestScriptMetadataCapabilityComponent> theCapability) { 
1334          this.capability = theCapability;
1335          return this;
1336        }
1337
1338        public boolean hasCapability() { 
1339          if (this.capability == null)
1340            return false;
1341          for (TestScriptMetadataCapabilityComponent item : this.capability)
1342            if (!item.isEmpty())
1343              return true;
1344          return false;
1345        }
1346
1347        public TestScriptMetadataCapabilityComponent addCapability() { //3
1348          TestScriptMetadataCapabilityComponent t = new TestScriptMetadataCapabilityComponent();
1349          if (this.capability == null)
1350            this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1351          this.capability.add(t);
1352          return t;
1353        }
1354
1355        public TestScriptMetadataComponent addCapability(TestScriptMetadataCapabilityComponent t) { //3
1356          if (t == null)
1357            return this;
1358          if (this.capability == null)
1359            this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1360          this.capability.add(t);
1361          return this;
1362        }
1363
1364        /**
1365         * @return The first repetition of repeating field {@link #capability}, creating it if it does not already exist
1366         */
1367        public TestScriptMetadataCapabilityComponent getCapabilityFirstRep() { 
1368          if (getCapability().isEmpty()) {
1369            addCapability();
1370          }
1371          return getCapability().get(0);
1372        }
1373
1374        protected void listChildren(List<Property> children) {
1375          super.listChildren(children);
1376          children.add(new Property("link", "", "A link to the FHIR specification that this test is covering.", 0, java.lang.Integer.MAX_VALUE, link));
1377          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));
1378        }
1379
1380        @Override
1381        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1382          switch (_hash) {
1383          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);
1384          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);
1385          default: return super.getNamedProperty(_hash, _name, _checkValid);
1386          }
1387
1388        }
1389
1390      @Override
1391      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1392        switch (hash) {
1393        case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // TestScriptMetadataLinkComponent
1394        case -783669992: /*capability*/ return this.capability == null ? new Base[0] : this.capability.toArray(new Base[this.capability.size()]); // TestScriptMetadataCapabilityComponent
1395        default: return super.getProperty(hash, name, checkValid);
1396        }
1397
1398      }
1399
1400      @Override
1401      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1402        switch (hash) {
1403        case 3321850: // link
1404          this.getLink().add((TestScriptMetadataLinkComponent) value); // TestScriptMetadataLinkComponent
1405          return value;
1406        case -783669992: // capability
1407          this.getCapability().add((TestScriptMetadataCapabilityComponent) value); // TestScriptMetadataCapabilityComponent
1408          return value;
1409        default: return super.setProperty(hash, name, value);
1410        }
1411
1412      }
1413
1414      @Override
1415      public Base setProperty(String name, Base value) throws FHIRException {
1416        if (name.equals("link")) {
1417          this.getLink().add((TestScriptMetadataLinkComponent) value);
1418        } else if (name.equals("capability")) {
1419          this.getCapability().add((TestScriptMetadataCapabilityComponent) value);
1420        } else
1421          return super.setProperty(name, value);
1422        return value;
1423      }
1424
1425      @Override
1426      public Base makeProperty(int hash, String name) throws FHIRException {
1427        switch (hash) {
1428        case 3321850:  return addLink(); 
1429        case -783669992:  return addCapability(); 
1430        default: return super.makeProperty(hash, name);
1431        }
1432
1433      }
1434
1435      @Override
1436      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1437        switch (hash) {
1438        case 3321850: /*link*/ return new String[] {};
1439        case -783669992: /*capability*/ return new String[] {};
1440        default: return super.getTypesForProperty(hash, name);
1441        }
1442
1443      }
1444
1445      @Override
1446      public Base addChild(String name) throws FHIRException {
1447        if (name.equals("link")) {
1448          return addLink();
1449        }
1450        else if (name.equals("capability")) {
1451          return addCapability();
1452        }
1453        else
1454          return super.addChild(name);
1455      }
1456
1457      public TestScriptMetadataComponent copy() {
1458        TestScriptMetadataComponent dst = new TestScriptMetadataComponent();
1459        copyValues(dst);
1460        if (link != null) {
1461          dst.link = new ArrayList<TestScriptMetadataLinkComponent>();
1462          for (TestScriptMetadataLinkComponent i : link)
1463            dst.link.add(i.copy());
1464        };
1465        if (capability != null) {
1466          dst.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1467          for (TestScriptMetadataCapabilityComponent i : capability)
1468            dst.capability.add(i.copy());
1469        };
1470        return dst;
1471      }
1472
1473      @Override
1474      public boolean equalsDeep(Base other_) {
1475        if (!super.equalsDeep(other_))
1476          return false;
1477        if (!(other_ instanceof TestScriptMetadataComponent))
1478          return false;
1479        TestScriptMetadataComponent o = (TestScriptMetadataComponent) other_;
1480        return compareDeep(link, o.link, true) && compareDeep(capability, o.capability, true);
1481      }
1482
1483      @Override
1484      public boolean equalsShallow(Base other_) {
1485        if (!super.equalsShallow(other_))
1486          return false;
1487        if (!(other_ instanceof TestScriptMetadataComponent))
1488          return false;
1489        TestScriptMetadataComponent o = (TestScriptMetadataComponent) other_;
1490        return true;
1491      }
1492
1493      public boolean isEmpty() {
1494        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(link, capability);
1495      }
1496
1497  public String fhirType() {
1498    return "TestScript.metadata";
1499
1500  }
1501
1502  }
1503
1504    @Block()
1505    public static class TestScriptMetadataLinkComponent extends BackboneElement implements IBaseBackboneElement {
1506        /**
1507         * URL to a particular requirement or feature within the FHIR specification.
1508         */
1509        @Child(name = "url", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1510        @Description(shortDefinition="URL to the specification", formalDefinition="URL to a particular requirement or feature within the FHIR specification." )
1511        protected UriType url;
1512
1513        /**
1514         * Short description of the link.
1515         */
1516        @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
1517        @Description(shortDefinition="Short description", formalDefinition="Short description of the link." )
1518        protected StringType description;
1519
1520        private static final long serialVersionUID = 213372298L;
1521
1522    /**
1523     * Constructor
1524     */
1525      public TestScriptMetadataLinkComponent() {
1526        super();
1527      }
1528
1529    /**
1530     * Constructor
1531     */
1532      public TestScriptMetadataLinkComponent(UriType url) {
1533        super();
1534        this.url = url;
1535      }
1536
1537        /**
1538         * @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
1539         */
1540        public UriType getUrlElement() { 
1541          if (this.url == null)
1542            if (Configuration.errorOnAutoCreate())
1543              throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.url");
1544            else if (Configuration.doAutoCreate())
1545              this.url = new UriType(); // bb
1546          return this.url;
1547        }
1548
1549        public boolean hasUrlElement() { 
1550          return this.url != null && !this.url.isEmpty();
1551        }
1552
1553        public boolean hasUrl() { 
1554          return this.url != null && !this.url.isEmpty();
1555        }
1556
1557        /**
1558         * @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
1559         */
1560        public TestScriptMetadataLinkComponent setUrlElement(UriType value) { 
1561          this.url = value;
1562          return this;
1563        }
1564
1565        /**
1566         * @return URL to a particular requirement or feature within the FHIR specification.
1567         */
1568        public String getUrl() { 
1569          return this.url == null ? null : this.url.getValue();
1570        }
1571
1572        /**
1573         * @param value URL to a particular requirement or feature within the FHIR specification.
1574         */
1575        public TestScriptMetadataLinkComponent setUrl(String value) { 
1576            if (this.url == null)
1577              this.url = new UriType();
1578            this.url.setValue(value);
1579          return this;
1580        }
1581
1582        /**
1583         * @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
1584         */
1585        public StringType getDescriptionElement() { 
1586          if (this.description == null)
1587            if (Configuration.errorOnAutoCreate())
1588              throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.description");
1589            else if (Configuration.doAutoCreate())
1590              this.description = new StringType(); // bb
1591          return this.description;
1592        }
1593
1594        public boolean hasDescriptionElement() { 
1595          return this.description != null && !this.description.isEmpty();
1596        }
1597
1598        public boolean hasDescription() { 
1599          return this.description != null && !this.description.isEmpty();
1600        }
1601
1602        /**
1603         * @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
1604         */
1605        public TestScriptMetadataLinkComponent setDescriptionElement(StringType value) { 
1606          this.description = value;
1607          return this;
1608        }
1609
1610        /**
1611         * @return Short description of the link.
1612         */
1613        public String getDescription() { 
1614          return this.description == null ? null : this.description.getValue();
1615        }
1616
1617        /**
1618         * @param value Short description of the link.
1619         */
1620        public TestScriptMetadataLinkComponent setDescription(String value) { 
1621          if (Utilities.noString(value))
1622            this.description = null;
1623          else {
1624            if (this.description == null)
1625              this.description = new StringType();
1626            this.description.setValue(value);
1627          }
1628          return this;
1629        }
1630
1631        protected void listChildren(List<Property> children) {
1632          super.listChildren(children);
1633          children.add(new Property("url", "uri", "URL to a particular requirement or feature within the FHIR specification.", 0, 1, url));
1634          children.add(new Property("description", "string", "Short description of the link.", 0, 1, description));
1635        }
1636
1637        @Override
1638        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1639          switch (_hash) {
1640          case 116079: /*url*/  return new Property("url", "uri", "URL to a particular requirement or feature within the FHIR specification.", 0, 1, url);
1641          case -1724546052: /*description*/  return new Property("description", "string", "Short description of the link.", 0, 1, description);
1642          default: return super.getNamedProperty(_hash, _name, _checkValid);
1643          }
1644
1645        }
1646
1647      @Override
1648      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1649        switch (hash) {
1650        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
1651        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1652        default: return super.getProperty(hash, name, checkValid);
1653        }
1654
1655      }
1656
1657      @Override
1658      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1659        switch (hash) {
1660        case 116079: // url
1661          this.url = castToUri(value); // UriType
1662          return value;
1663        case -1724546052: // description
1664          this.description = castToString(value); // StringType
1665          return value;
1666        default: return super.setProperty(hash, name, value);
1667        }
1668
1669      }
1670
1671      @Override
1672      public Base setProperty(String name, Base value) throws FHIRException {
1673        if (name.equals("url")) {
1674          this.url = castToUri(value); // UriType
1675        } else if (name.equals("description")) {
1676          this.description = castToString(value); // StringType
1677        } else
1678          return super.setProperty(name, value);
1679        return value;
1680      }
1681
1682      @Override
1683      public Base makeProperty(int hash, String name) throws FHIRException {
1684        switch (hash) {
1685        case 116079:  return getUrlElement();
1686        case -1724546052:  return getDescriptionElement();
1687        default: return super.makeProperty(hash, name);
1688        }
1689
1690      }
1691
1692      @Override
1693      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1694        switch (hash) {
1695        case 116079: /*url*/ return new String[] {"uri"};
1696        case -1724546052: /*description*/ return new String[] {"string"};
1697        default: return super.getTypesForProperty(hash, name);
1698        }
1699
1700      }
1701
1702      @Override
1703      public Base addChild(String name) throws FHIRException {
1704        if (name.equals("url")) {
1705          throw new FHIRException("Cannot call addChild on a primitive type TestScript.url");
1706        }
1707        else if (name.equals("description")) {
1708          throw new FHIRException("Cannot call addChild on a primitive type TestScript.description");
1709        }
1710        else
1711          return super.addChild(name);
1712      }
1713
1714      public TestScriptMetadataLinkComponent copy() {
1715        TestScriptMetadataLinkComponent dst = new TestScriptMetadataLinkComponent();
1716        copyValues(dst);
1717        dst.url = url == null ? null : url.copy();
1718        dst.description = description == null ? null : description.copy();
1719        return dst;
1720      }
1721
1722      @Override
1723      public boolean equalsDeep(Base other_) {
1724        if (!super.equalsDeep(other_))
1725          return false;
1726        if (!(other_ instanceof TestScriptMetadataLinkComponent))
1727          return false;
1728        TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other_;
1729        return compareDeep(url, o.url, true) && compareDeep(description, o.description, true);
1730      }
1731
1732      @Override
1733      public boolean equalsShallow(Base other_) {
1734        if (!super.equalsShallow(other_))
1735          return false;
1736        if (!(other_ instanceof TestScriptMetadataLinkComponent))
1737          return false;
1738        TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other_;
1739        return compareValues(url, o.url, true) && compareValues(description, o.description, true);
1740      }
1741
1742      public boolean isEmpty() {
1743        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, description);
1744      }
1745
1746  public String fhirType() {
1747    return "TestScript.metadata.link";
1748
1749  }
1750
1751  }
1752
1753    @Block()
1754    public static class TestScriptMetadataCapabilityComponent extends BackboneElement implements IBaseBackboneElement {
1755        /**
1756         * Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.
1757         */
1758        @Child(name = "required", type = {BooleanType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1759        @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." )
1760        protected BooleanType required;
1761
1762        /**
1763         * Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.
1764         */
1765        @Child(name = "validated", type = {BooleanType.class}, order=2, min=1, max=1, modifier=false, summary=false)
1766        @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." )
1767        protected BooleanType validated;
1768
1769        /**
1770         * Description of the capabilities that this test script is requiring the server to support.
1771         */
1772        @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
1773        @Description(shortDefinition="The expected capabilities of the server", formalDefinition="Description of the capabilities that this test script is requiring the server to support." )
1774        protected StringType description;
1775
1776        /**
1777         * Which origin server these requirements apply to.
1778         */
1779        @Child(name = "origin", type = {IntegerType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1780        @Description(shortDefinition="Which origin server these requirements apply to", formalDefinition="Which origin server these requirements apply to." )
1781        protected List<IntegerType> origin;
1782
1783        /**
1784         * Which server these requirements apply to.
1785         */
1786        @Child(name = "destination", type = {IntegerType.class}, order=5, min=0, max=1, modifier=false, summary=false)
1787        @Description(shortDefinition="Which server these requirements apply to", formalDefinition="Which server these requirements apply to." )
1788        protected IntegerType destination;
1789
1790        /**
1791         * Links to the FHIR specification that describes this interaction and the resources involved in more detail.
1792         */
1793        @Child(name = "link", type = {UriType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1794        @Description(shortDefinition="Links to the FHIR specification", formalDefinition="Links to the FHIR specification that describes this interaction and the resources involved in more detail." )
1795        protected List<UriType> link;
1796
1797        /**
1798         * 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.
1799         */
1800        @Child(name = "capabilities", type = {CanonicalType.class}, order=7, min=1, max=1, modifier=false, summary=false)
1801        @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." )
1802        protected CanonicalType capabilities;
1803
1804        private static final long serialVersionUID = -1368199288L;
1805
1806    /**
1807     * Constructor
1808     */
1809      public TestScriptMetadataCapabilityComponent() {
1810        super();
1811      }
1812
1813    /**
1814     * Constructor
1815     */
1816      public TestScriptMetadataCapabilityComponent(BooleanType required, BooleanType validated, CanonicalType capabilities) {
1817        super();
1818        this.required = required;
1819        this.validated = validated;
1820        this.capabilities = capabilities;
1821      }
1822
1823        /**
1824         * @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
1825         */
1826        public BooleanType getRequiredElement() { 
1827          if (this.required == null)
1828            if (Configuration.errorOnAutoCreate())
1829              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.required");
1830            else if (Configuration.doAutoCreate())
1831              this.required = new BooleanType(); // bb
1832          return this.required;
1833        }
1834
1835        public boolean hasRequiredElement() { 
1836          return this.required != null && !this.required.isEmpty();
1837        }
1838
1839        public boolean hasRequired() { 
1840          return this.required != null && !this.required.isEmpty();
1841        }
1842
1843        /**
1844         * @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
1845         */
1846        public TestScriptMetadataCapabilityComponent setRequiredElement(BooleanType value) { 
1847          this.required = value;
1848          return this;
1849        }
1850
1851        /**
1852         * @return Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.
1853         */
1854        public boolean getRequired() { 
1855          return this.required == null || this.required.isEmpty() ? false : this.required.getValue();
1856        }
1857
1858        /**
1859         * @param value Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.
1860         */
1861        public TestScriptMetadataCapabilityComponent setRequired(boolean value) { 
1862            if (this.required == null)
1863              this.required = new BooleanType();
1864            this.required.setValue(value);
1865          return this;
1866        }
1867
1868        /**
1869         * @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
1870         */
1871        public BooleanType getValidatedElement() { 
1872          if (this.validated == null)
1873            if (Configuration.errorOnAutoCreate())
1874              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.validated");
1875            else if (Configuration.doAutoCreate())
1876              this.validated = new BooleanType(); // bb
1877          return this.validated;
1878        }
1879
1880        public boolean hasValidatedElement() { 
1881          return this.validated != null && !this.validated.isEmpty();
1882        }
1883
1884        public boolean hasValidated() { 
1885          return this.validated != null && !this.validated.isEmpty();
1886        }
1887
1888        /**
1889         * @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
1890         */
1891        public TestScriptMetadataCapabilityComponent setValidatedElement(BooleanType value) { 
1892          this.validated = value;
1893          return this;
1894        }
1895
1896        /**
1897         * @return Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.
1898         */
1899        public boolean getValidated() { 
1900          return this.validated == null || this.validated.isEmpty() ? false : this.validated.getValue();
1901        }
1902
1903        /**
1904         * @param value Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.
1905         */
1906        public TestScriptMetadataCapabilityComponent setValidated(boolean value) { 
1907            if (this.validated == null)
1908              this.validated = new BooleanType();
1909            this.validated.setValue(value);
1910          return this;
1911        }
1912
1913        /**
1914         * @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
1915         */
1916        public StringType getDescriptionElement() { 
1917          if (this.description == null)
1918            if (Configuration.errorOnAutoCreate())
1919              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.description");
1920            else if (Configuration.doAutoCreate())
1921              this.description = new StringType(); // bb
1922          return this.description;
1923        }
1924
1925        public boolean hasDescriptionElement() { 
1926          return this.description != null && !this.description.isEmpty();
1927        }
1928
1929        public boolean hasDescription() { 
1930          return this.description != null && !this.description.isEmpty();
1931        }
1932
1933        /**
1934         * @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
1935         */
1936        public TestScriptMetadataCapabilityComponent setDescriptionElement(StringType value) { 
1937          this.description = value;
1938          return this;
1939        }
1940
1941        /**
1942         * @return Description of the capabilities that this test script is requiring the server to support.
1943         */
1944        public String getDescription() { 
1945          return this.description == null ? null : this.description.getValue();
1946        }
1947
1948        /**
1949         * @param value Description of the capabilities that this test script is requiring the server to support.
1950         */
1951        public TestScriptMetadataCapabilityComponent setDescription(String value) { 
1952          if (Utilities.noString(value))
1953            this.description = null;
1954          else {
1955            if (this.description == null)
1956              this.description = new StringType();
1957            this.description.setValue(value);
1958          }
1959          return this;
1960        }
1961
1962        /**
1963         * @return {@link #origin} (Which origin server these requirements apply to.)
1964         */
1965        public List<IntegerType> getOrigin() { 
1966          if (this.origin == null)
1967            this.origin = new ArrayList<IntegerType>();
1968          return this.origin;
1969        }
1970
1971        /**
1972         * @return Returns a reference to <code>this</code> for easy method chaining
1973         */
1974        public TestScriptMetadataCapabilityComponent setOrigin(List<IntegerType> theOrigin) { 
1975          this.origin = theOrigin;
1976          return this;
1977        }
1978
1979        public boolean hasOrigin() { 
1980          if (this.origin == null)
1981            return false;
1982          for (IntegerType item : this.origin)
1983            if (!item.isEmpty())
1984              return true;
1985          return false;
1986        }
1987
1988        /**
1989         * @return {@link #origin} (Which origin server these requirements apply to.)
1990         */
1991        public IntegerType addOriginElement() {//2 
1992          IntegerType t = new IntegerType();
1993          if (this.origin == null)
1994            this.origin = new ArrayList<IntegerType>();
1995          this.origin.add(t);
1996          return t;
1997        }
1998
1999        /**
2000         * @param value {@link #origin} (Which origin server these requirements apply to.)
2001         */
2002        public TestScriptMetadataCapabilityComponent addOrigin(int value) { //1
2003          IntegerType t = new IntegerType();
2004          t.setValue(value);
2005          if (this.origin == null)
2006            this.origin = new ArrayList<IntegerType>();
2007          this.origin.add(t);
2008          return this;
2009        }
2010
2011        /**
2012         * @param value {@link #origin} (Which origin server these requirements apply to.)
2013         */
2014        public boolean hasOrigin(int value) { 
2015          if (this.origin == null)
2016            return false;
2017          for (IntegerType v : this.origin)
2018            if (v.getValue().equals(value)) // integer
2019              return true;
2020          return false;
2021        }
2022
2023        /**
2024         * @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
2025         */
2026        public IntegerType getDestinationElement() { 
2027          if (this.destination == null)
2028            if (Configuration.errorOnAutoCreate())
2029              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.destination");
2030            else if (Configuration.doAutoCreate())
2031              this.destination = new IntegerType(); // bb
2032          return this.destination;
2033        }
2034
2035        public boolean hasDestinationElement() { 
2036          return this.destination != null && !this.destination.isEmpty();
2037        }
2038
2039        public boolean hasDestination() { 
2040          return this.destination != null && !this.destination.isEmpty();
2041        }
2042
2043        /**
2044         * @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
2045         */
2046        public TestScriptMetadataCapabilityComponent setDestinationElement(IntegerType value) { 
2047          this.destination = value;
2048          return this;
2049        }
2050
2051        /**
2052         * @return Which server these requirements apply to.
2053         */
2054        public int getDestination() { 
2055          return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue();
2056        }
2057
2058        /**
2059         * @param value Which server these requirements apply to.
2060         */
2061        public TestScriptMetadataCapabilityComponent setDestination(int value) { 
2062            if (this.destination == null)
2063              this.destination = new IntegerType();
2064            this.destination.setValue(value);
2065          return this;
2066        }
2067
2068        /**
2069         * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.)
2070         */
2071        public List<UriType> getLink() { 
2072          if (this.link == null)
2073            this.link = new ArrayList<UriType>();
2074          return this.link;
2075        }
2076
2077        /**
2078         * @return Returns a reference to <code>this</code> for easy method chaining
2079         */
2080        public TestScriptMetadataCapabilityComponent setLink(List<UriType> theLink) { 
2081          this.link = theLink;
2082          return this;
2083        }
2084
2085        public boolean hasLink() { 
2086          if (this.link == null)
2087            return false;
2088          for (UriType item : this.link)
2089            if (!item.isEmpty())
2090              return true;
2091          return false;
2092        }
2093
2094        /**
2095         * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.)
2096         */
2097        public UriType addLinkElement() {//2 
2098          UriType t = new UriType();
2099          if (this.link == null)
2100            this.link = new ArrayList<UriType>();
2101          this.link.add(t);
2102          return t;
2103        }
2104
2105        /**
2106         * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.)
2107         */
2108        public TestScriptMetadataCapabilityComponent addLink(String value) { //1
2109          UriType t = new UriType();
2110          t.setValue(value);
2111          if (this.link == null)
2112            this.link = new ArrayList<UriType>();
2113          this.link.add(t);
2114          return this;
2115        }
2116
2117        /**
2118         * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.)
2119         */
2120        public boolean hasLink(String value) { 
2121          if (this.link == null)
2122            return false;
2123          for (UriType v : this.link)
2124            if (v.getValue().equals(value)) // uri
2125              return true;
2126          return false;
2127        }
2128
2129        /**
2130         * @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
2131         */
2132        public CanonicalType getCapabilitiesElement() { 
2133          if (this.capabilities == null)
2134            if (Configuration.errorOnAutoCreate())
2135              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.capabilities");
2136            else if (Configuration.doAutoCreate())
2137              this.capabilities = new CanonicalType(); // bb
2138          return this.capabilities;
2139        }
2140
2141        public boolean hasCapabilitiesElement() { 
2142          return this.capabilities != null && !this.capabilities.isEmpty();
2143        }
2144
2145        public boolean hasCapabilities() { 
2146          return this.capabilities != null && !this.capabilities.isEmpty();
2147        }
2148
2149        /**
2150         * @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
2151         */
2152        public TestScriptMetadataCapabilityComponent setCapabilitiesElement(CanonicalType value) { 
2153          this.capabilities = value;
2154          return this;
2155        }
2156
2157        /**
2158         * @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.
2159         */
2160        public String getCapabilities() { 
2161          return this.capabilities == null ? null : this.capabilities.getValue();
2162        }
2163
2164        /**
2165         * @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.
2166         */
2167        public TestScriptMetadataCapabilityComponent setCapabilities(String value) { 
2168            if (this.capabilities == null)
2169              this.capabilities = new CanonicalType();
2170            this.capabilities.setValue(value);
2171          return this;
2172        }
2173
2174        protected void listChildren(List<Property> children) {
2175          super.listChildren(children);
2176          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));
2177          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));
2178          children.add(new Property("description", "string", "Description of the capabilities that this test script is requiring the server to support.", 0, 1, description));
2179          children.add(new Property("origin", "integer", "Which origin server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, origin));
2180          children.add(new Property("destination", "integer", "Which server these requirements apply to.", 0, 1, destination));
2181          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));
2182          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));
2183        }
2184
2185        @Override
2186        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2187          switch (_hash) {
2188          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);
2189          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);
2190          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);
2191          case -1008619738: /*origin*/  return new Property("origin", "integer", "Which origin server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, origin);
2192          case -1429847026: /*destination*/  return new Property("destination", "integer", "Which server these requirements apply to.", 0, 1, destination);
2193          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);
2194          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);
2195          default: return super.getNamedProperty(_hash, _name, _checkValid);
2196          }
2197
2198        }
2199
2200      @Override
2201      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2202        switch (hash) {
2203        case -393139297: /*required*/ return this.required == null ? new Base[0] : new Base[] {this.required}; // BooleanType
2204        case -1109784050: /*validated*/ return this.validated == null ? new Base[0] : new Base[] {this.validated}; // BooleanType
2205        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
2206        case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // IntegerType
2207        case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // IntegerType
2208        case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // UriType
2209        case -1487597642: /*capabilities*/ return this.capabilities == null ? new Base[0] : new Base[] {this.capabilities}; // CanonicalType
2210        default: return super.getProperty(hash, name, checkValid);
2211        }
2212
2213      }
2214
2215      @Override
2216      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2217        switch (hash) {
2218        case -393139297: // required
2219          this.required = castToBoolean(value); // BooleanType
2220          return value;
2221        case -1109784050: // validated
2222          this.validated = castToBoolean(value); // BooleanType
2223          return value;
2224        case -1724546052: // description
2225          this.description = castToString(value); // StringType
2226          return value;
2227        case -1008619738: // origin
2228          this.getOrigin().add(castToInteger(value)); // IntegerType
2229          return value;
2230        case -1429847026: // destination
2231          this.destination = castToInteger(value); // IntegerType
2232          return value;
2233        case 3321850: // link
2234          this.getLink().add(castToUri(value)); // UriType
2235          return value;
2236        case -1487597642: // capabilities
2237          this.capabilities = castToCanonical(value); // CanonicalType
2238          return value;
2239        default: return super.setProperty(hash, name, value);
2240        }
2241
2242      }
2243
2244      @Override
2245      public Base setProperty(String name, Base value) throws FHIRException {
2246        if (name.equals("required")) {
2247          this.required = castToBoolean(value); // BooleanType
2248        } else if (name.equals("validated")) {
2249          this.validated = castToBoolean(value); // BooleanType
2250        } else if (name.equals("description")) {
2251          this.description = castToString(value); // StringType
2252        } else if (name.equals("origin")) {
2253          this.getOrigin().add(castToInteger(value));
2254        } else if (name.equals("destination")) {
2255          this.destination = castToInteger(value); // IntegerType
2256        } else if (name.equals("link")) {
2257          this.getLink().add(castToUri(value));
2258        } else if (name.equals("capabilities")) {
2259          this.capabilities = castToCanonical(value); // CanonicalType
2260        } else
2261          return super.setProperty(name, value);
2262        return value;
2263      }
2264
2265      @Override
2266      public Base makeProperty(int hash, String name) throws FHIRException {
2267        switch (hash) {
2268        case -393139297:  return getRequiredElement();
2269        case -1109784050:  return getValidatedElement();
2270        case -1724546052:  return getDescriptionElement();
2271        case -1008619738:  return addOriginElement();
2272        case -1429847026:  return getDestinationElement();
2273        case 3321850:  return addLinkElement();
2274        case -1487597642:  return getCapabilitiesElement();
2275        default: return super.makeProperty(hash, name);
2276        }
2277
2278      }
2279
2280      @Override
2281      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2282        switch (hash) {
2283        case -393139297: /*required*/ return new String[] {"boolean"};
2284        case -1109784050: /*validated*/ return new String[] {"boolean"};
2285        case -1724546052: /*description*/ return new String[] {"string"};
2286        case -1008619738: /*origin*/ return new String[] {"integer"};
2287        case -1429847026: /*destination*/ return new String[] {"integer"};
2288        case 3321850: /*link*/ return new String[] {"uri"};
2289        case -1487597642: /*capabilities*/ return new String[] {"canonical"};
2290        default: return super.getTypesForProperty(hash, name);
2291        }
2292
2293      }
2294
2295      @Override
2296      public Base addChild(String name) throws FHIRException {
2297        if (name.equals("required")) {
2298          throw new FHIRException("Cannot call addChild on a primitive type TestScript.required");
2299        }
2300        else if (name.equals("validated")) {
2301          throw new FHIRException("Cannot call addChild on a primitive type TestScript.validated");
2302        }
2303        else if (name.equals("description")) {
2304          throw new FHIRException("Cannot call addChild on a primitive type TestScript.description");
2305        }
2306        else if (name.equals("origin")) {
2307          throw new FHIRException("Cannot call addChild on a primitive type TestScript.origin");
2308        }
2309        else if (name.equals("destination")) {
2310          throw new FHIRException("Cannot call addChild on a primitive type TestScript.destination");
2311        }
2312        else if (name.equals("link")) {
2313          throw new FHIRException("Cannot call addChild on a primitive type TestScript.link");
2314        }
2315        else if (name.equals("capabilities")) {
2316          throw new FHIRException("Cannot call addChild on a primitive type TestScript.capabilities");
2317        }
2318        else
2319          return super.addChild(name);
2320      }
2321
2322      public TestScriptMetadataCapabilityComponent copy() {
2323        TestScriptMetadataCapabilityComponent dst = new TestScriptMetadataCapabilityComponent();
2324        copyValues(dst);
2325        dst.required = required == null ? null : required.copy();
2326        dst.validated = validated == null ? null : validated.copy();
2327        dst.description = description == null ? null : description.copy();
2328        if (origin != null) {
2329          dst.origin = new ArrayList<IntegerType>();
2330          for (IntegerType i : origin)
2331            dst.origin.add(i.copy());
2332        };
2333        dst.destination = destination == null ? null : destination.copy();
2334        if (link != null) {
2335          dst.link = new ArrayList<UriType>();
2336          for (UriType i : link)
2337            dst.link.add(i.copy());
2338        };
2339        dst.capabilities = capabilities == null ? null : capabilities.copy();
2340        return dst;
2341      }
2342
2343      @Override
2344      public boolean equalsDeep(Base other_) {
2345        if (!super.equalsDeep(other_))
2346          return false;
2347        if (!(other_ instanceof TestScriptMetadataCapabilityComponent))
2348          return false;
2349        TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other_;
2350        return compareDeep(required, o.required, true) && compareDeep(validated, o.validated, true) && compareDeep(description, o.description, true)
2351           && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) && compareDeep(link, o.link, true)
2352           && compareDeep(capabilities, o.capabilities, true);
2353      }
2354
2355      @Override
2356      public boolean equalsShallow(Base other_) {
2357        if (!super.equalsShallow(other_))
2358          return false;
2359        if (!(other_ instanceof TestScriptMetadataCapabilityComponent))
2360          return false;
2361        TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other_;
2362        return compareValues(required, o.required, true) && compareValues(validated, o.validated, true) && compareValues(description, o.description, true)
2363           && compareValues(origin, o.origin, true) && compareValues(destination, o.destination, true) && compareValues(link, o.link, true)
2364          ;
2365      }
2366
2367      public boolean isEmpty() {
2368        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(required, validated, description
2369          , origin, destination, link, capabilities);
2370      }
2371
2372  public String fhirType() {
2373    return "TestScript.metadata.capability";
2374
2375  }
2376
2377  }
2378
2379    @Block()
2380    public static class TestScriptFixtureComponent extends BackboneElement implements IBaseBackboneElement {
2381        /**
2382         * 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.
2383         */
2384        @Child(name = "autocreate", type = {BooleanType.class}, order=1, min=1, max=1, modifier=false, summary=false)
2385        @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." )
2386        protected BooleanType autocreate;
2387
2388        /**
2389         * 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.
2390         */
2391        @Child(name = "autodelete", type = {BooleanType.class}, order=2, min=1, max=1, modifier=false, summary=false)
2392        @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." )
2393        protected BooleanType autodelete;
2394
2395        /**
2396         * Reference to the resource (containing the contents of the resource needed for operations).
2397         */
2398        @Child(name = "resource", type = {Reference.class}, order=3, min=0, max=1, modifier=false, summary=false)
2399        @Description(shortDefinition="Reference of the resource", formalDefinition="Reference to the resource (containing the contents of the resource needed for operations)." )
2400        protected Reference resource;
2401
2402        /**
2403         * The actual object that is the target of the reference (Reference to the resource (containing the contents of the resource needed for operations).)
2404         */
2405        protected Resource resourceTarget;
2406
2407        private static final long serialVersionUID = 1110683307L;
2408
2409    /**
2410     * Constructor
2411     */
2412      public TestScriptFixtureComponent() {
2413        super();
2414      }
2415
2416    /**
2417     * Constructor
2418     */
2419      public TestScriptFixtureComponent(BooleanType autocreate, BooleanType autodelete) {
2420        super();
2421        this.autocreate = autocreate;
2422        this.autodelete = autodelete;
2423      }
2424
2425        /**
2426         * @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
2427         */
2428        public BooleanType getAutocreateElement() { 
2429          if (this.autocreate == null)
2430            if (Configuration.errorOnAutoCreate())
2431              throw new Error("Attempt to auto-create TestScriptFixtureComponent.autocreate");
2432            else if (Configuration.doAutoCreate())
2433              this.autocreate = new BooleanType(); // bb
2434          return this.autocreate;
2435        }
2436
2437        public boolean hasAutocreateElement() { 
2438          return this.autocreate != null && !this.autocreate.isEmpty();
2439        }
2440
2441        public boolean hasAutocreate() { 
2442          return this.autocreate != null && !this.autocreate.isEmpty();
2443        }
2444
2445        /**
2446         * @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
2447         */
2448        public TestScriptFixtureComponent setAutocreateElement(BooleanType value) { 
2449          this.autocreate = value;
2450          return this;
2451        }
2452
2453        /**
2454         * @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.
2455         */
2456        public boolean getAutocreate() { 
2457          return this.autocreate == null || this.autocreate.isEmpty() ? false : this.autocreate.getValue();
2458        }
2459
2460        /**
2461         * @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.
2462         */
2463        public TestScriptFixtureComponent setAutocreate(boolean value) { 
2464            if (this.autocreate == null)
2465              this.autocreate = new BooleanType();
2466            this.autocreate.setValue(value);
2467          return this;
2468        }
2469
2470        /**
2471         * @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
2472         */
2473        public BooleanType getAutodeleteElement() { 
2474          if (this.autodelete == null)
2475            if (Configuration.errorOnAutoCreate())
2476              throw new Error("Attempt to auto-create TestScriptFixtureComponent.autodelete");
2477            else if (Configuration.doAutoCreate())
2478              this.autodelete = new BooleanType(); // bb
2479          return this.autodelete;
2480        }
2481
2482        public boolean hasAutodeleteElement() { 
2483          return this.autodelete != null && !this.autodelete.isEmpty();
2484        }
2485
2486        public boolean hasAutodelete() { 
2487          return this.autodelete != null && !this.autodelete.isEmpty();
2488        }
2489
2490        /**
2491         * @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
2492         */
2493        public TestScriptFixtureComponent setAutodeleteElement(BooleanType value) { 
2494          this.autodelete = value;
2495          return this;
2496        }
2497
2498        /**
2499         * @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.
2500         */
2501        public boolean getAutodelete() { 
2502          return this.autodelete == null || this.autodelete.isEmpty() ? false : this.autodelete.getValue();
2503        }
2504
2505        /**
2506         * @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.
2507         */
2508        public TestScriptFixtureComponent setAutodelete(boolean value) { 
2509            if (this.autodelete == null)
2510              this.autodelete = new BooleanType();
2511            this.autodelete.setValue(value);
2512          return this;
2513        }
2514
2515        /**
2516         * @return {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).)
2517         */
2518        public Reference getResource() { 
2519          if (this.resource == null)
2520            if (Configuration.errorOnAutoCreate())
2521              throw new Error("Attempt to auto-create TestScriptFixtureComponent.resource");
2522            else if (Configuration.doAutoCreate())
2523              this.resource = new Reference(); // cc
2524          return this.resource;
2525        }
2526
2527        public boolean hasResource() { 
2528          return this.resource != null && !this.resource.isEmpty();
2529        }
2530
2531        /**
2532         * @param value {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).)
2533         */
2534        public TestScriptFixtureComponent setResource(Reference value) { 
2535          this.resource = value;
2536          return this;
2537        }
2538
2539        /**
2540         * @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).)
2541         */
2542        public Resource getResourceTarget() { 
2543          return this.resourceTarget;
2544        }
2545
2546        /**
2547         * @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).)
2548         */
2549        public TestScriptFixtureComponent setResourceTarget(Resource value) { 
2550          this.resourceTarget = value;
2551          return this;
2552        }
2553
2554        protected void listChildren(List<Property> children) {
2555          super.listChildren(children);
2556          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));
2557          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));
2558          children.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the resource needed for operations).", 0, 1, resource));
2559        }
2560
2561        @Override
2562        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2563          switch (_hash) {
2564          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);
2565          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);
2566          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);
2567          default: return super.getNamedProperty(_hash, _name, _checkValid);
2568          }
2569
2570        }
2571
2572      @Override
2573      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2574        switch (hash) {
2575        case 73154411: /*autocreate*/ return this.autocreate == null ? new Base[0] : new Base[] {this.autocreate}; // BooleanType
2576        case 89990170: /*autodelete*/ return this.autodelete == null ? new Base[0] : new Base[] {this.autodelete}; // BooleanType
2577        case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference
2578        default: return super.getProperty(hash, name, checkValid);
2579        }
2580
2581      }
2582
2583      @Override
2584      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2585        switch (hash) {
2586        case 73154411: // autocreate
2587          this.autocreate = castToBoolean(value); // BooleanType
2588          return value;
2589        case 89990170: // autodelete
2590          this.autodelete = castToBoolean(value); // BooleanType
2591          return value;
2592        case -341064690: // resource
2593          this.resource = castToReference(value); // Reference
2594          return value;
2595        default: return super.setProperty(hash, name, value);
2596        }
2597
2598      }
2599
2600      @Override
2601      public Base setProperty(String name, Base value) throws FHIRException {
2602        if (name.equals("autocreate")) {
2603          this.autocreate = castToBoolean(value); // BooleanType
2604        } else if (name.equals("autodelete")) {
2605          this.autodelete = castToBoolean(value); // BooleanType
2606        } else if (name.equals("resource")) {
2607          this.resource = castToReference(value); // Reference
2608        } else
2609          return super.setProperty(name, value);
2610        return value;
2611      }
2612
2613      @Override
2614      public Base makeProperty(int hash, String name) throws FHIRException {
2615        switch (hash) {
2616        case 73154411:  return getAutocreateElement();
2617        case 89990170:  return getAutodeleteElement();
2618        case -341064690:  return getResource(); 
2619        default: return super.makeProperty(hash, name);
2620        }
2621
2622      }
2623
2624      @Override
2625      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2626        switch (hash) {
2627        case 73154411: /*autocreate*/ return new String[] {"boolean"};
2628        case 89990170: /*autodelete*/ return new String[] {"boolean"};
2629        case -341064690: /*resource*/ return new String[] {"Reference"};
2630        default: return super.getTypesForProperty(hash, name);
2631        }
2632
2633      }
2634
2635      @Override
2636      public Base addChild(String name) throws FHIRException {
2637        if (name.equals("autocreate")) {
2638          throw new FHIRException("Cannot call addChild on a primitive type TestScript.autocreate");
2639        }
2640        else if (name.equals("autodelete")) {
2641          throw new FHIRException("Cannot call addChild on a primitive type TestScript.autodelete");
2642        }
2643        else if (name.equals("resource")) {
2644          this.resource = new Reference();
2645          return this.resource;
2646        }
2647        else
2648          return super.addChild(name);
2649      }
2650
2651      public TestScriptFixtureComponent copy() {
2652        TestScriptFixtureComponent dst = new TestScriptFixtureComponent();
2653        copyValues(dst);
2654        dst.autocreate = autocreate == null ? null : autocreate.copy();
2655        dst.autodelete = autodelete == null ? null : autodelete.copy();
2656        dst.resource = resource == null ? null : resource.copy();
2657        return dst;
2658      }
2659
2660      @Override
2661      public boolean equalsDeep(Base other_) {
2662        if (!super.equalsDeep(other_))
2663          return false;
2664        if (!(other_ instanceof TestScriptFixtureComponent))
2665          return false;
2666        TestScriptFixtureComponent o = (TestScriptFixtureComponent) other_;
2667        return compareDeep(autocreate, o.autocreate, true) && compareDeep(autodelete, o.autodelete, true)
2668           && compareDeep(resource, o.resource, true);
2669      }
2670
2671      @Override
2672      public boolean equalsShallow(Base other_) {
2673        if (!super.equalsShallow(other_))
2674          return false;
2675        if (!(other_ instanceof TestScriptFixtureComponent))
2676          return false;
2677        TestScriptFixtureComponent o = (TestScriptFixtureComponent) other_;
2678        return compareValues(autocreate, o.autocreate, true) && compareValues(autodelete, o.autodelete, true)
2679          ;
2680      }
2681
2682      public boolean isEmpty() {
2683        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(autocreate, autodelete, resource
2684          );
2685      }
2686
2687  public String fhirType() {
2688    return "TestScript.fixture";
2689
2690  }
2691
2692  }
2693
2694    @Block()
2695    public static class TestScriptVariableComponent extends BackboneElement implements IBaseBackboneElement {
2696        /**
2697         * Descriptive name for this variable.
2698         */
2699        @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
2700        @Description(shortDefinition="Descriptive name for this variable", formalDefinition="Descriptive name for this variable." )
2701        protected StringType name;
2702
2703        /**
2704         * A default, hard-coded, or user-defined value for this variable.
2705         */
2706        @Child(name = "defaultValue", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
2707        @Description(shortDefinition="Default, hard-coded, or user-defined value for this variable", formalDefinition="A default, hard-coded, or user-defined value for this variable." )
2708        protected StringType defaultValue;
2709
2710        /**
2711         * A free text natural language description of the variable and its purpose.
2712         */
2713        @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
2714        @Description(shortDefinition="Natural language description of the variable", formalDefinition="A free text natural language description of the variable and its purpose." )
2715        protected StringType description;
2716
2717        /**
2718         * The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.
2719         */
2720        @Child(name = "expression", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
2721        @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." )
2722        protected StringType expression;
2723
2724        /**
2725         * Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.
2726         */
2727        @Child(name = "headerField", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
2728        @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." )
2729        protected StringType headerField;
2730
2731        /**
2732         * Displayable text string with hint help information to the user when entering a default value.
2733         */
2734        @Child(name = "hint", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false)
2735        @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." )
2736        protected StringType hint;
2737
2738        /**
2739         * XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.
2740         */
2741        @Child(name = "path", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false)
2742        @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." )
2743        protected StringType path;
2744
2745        /**
2746         * Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.
2747         */
2748        @Child(name = "sourceId", type = {IdType.class}, order=8, min=0, max=1, modifier=false, summary=false)
2749        @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." )
2750        protected IdType sourceId;
2751
2752        private static final long serialVersionUID = -1592325432L;
2753
2754    /**
2755     * Constructor
2756     */
2757      public TestScriptVariableComponent() {
2758        super();
2759      }
2760
2761    /**
2762     * Constructor
2763     */
2764      public TestScriptVariableComponent(StringType name) {
2765        super();
2766        this.name = name;
2767      }
2768
2769        /**
2770         * @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
2771         */
2772        public StringType getNameElement() { 
2773          if (this.name == null)
2774            if (Configuration.errorOnAutoCreate())
2775              throw new Error("Attempt to auto-create TestScriptVariableComponent.name");
2776            else if (Configuration.doAutoCreate())
2777              this.name = new StringType(); // bb
2778          return this.name;
2779        }
2780
2781        public boolean hasNameElement() { 
2782          return this.name != null && !this.name.isEmpty();
2783        }
2784
2785        public boolean hasName() { 
2786          return this.name != null && !this.name.isEmpty();
2787        }
2788
2789        /**
2790         * @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
2791         */
2792        public TestScriptVariableComponent setNameElement(StringType value) { 
2793          this.name = value;
2794          return this;
2795        }
2796
2797        /**
2798         * @return Descriptive name for this variable.
2799         */
2800        public String getName() { 
2801          return this.name == null ? null : this.name.getValue();
2802        }
2803
2804        /**
2805         * @param value Descriptive name for this variable.
2806         */
2807        public TestScriptVariableComponent setName(String value) { 
2808            if (this.name == null)
2809              this.name = new StringType();
2810            this.name.setValue(value);
2811          return this;
2812        }
2813
2814        /**
2815         * @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
2816         */
2817        public StringType getDefaultValueElement() { 
2818          if (this.defaultValue == null)
2819            if (Configuration.errorOnAutoCreate())
2820              throw new Error("Attempt to auto-create TestScriptVariableComponent.defaultValue");
2821            else if (Configuration.doAutoCreate())
2822              this.defaultValue = new StringType(); // bb
2823          return this.defaultValue;
2824        }
2825
2826        public boolean hasDefaultValueElement() { 
2827          return this.defaultValue != null && !this.defaultValue.isEmpty();
2828        }
2829
2830        public boolean hasDefaultValue() { 
2831          return this.defaultValue != null && !this.defaultValue.isEmpty();
2832        }
2833
2834        /**
2835         * @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
2836         */
2837        public TestScriptVariableComponent setDefaultValueElement(StringType value) { 
2838          this.defaultValue = value;
2839          return this;
2840        }
2841
2842        /**
2843         * @return A default, hard-coded, or user-defined value for this variable.
2844         */
2845        public String getDefaultValue() { 
2846          return this.defaultValue == null ? null : this.defaultValue.getValue();
2847        }
2848
2849        /**
2850         * @param value A default, hard-coded, or user-defined value for this variable.
2851         */
2852        public TestScriptVariableComponent setDefaultValue(String value) { 
2853          if (Utilities.noString(value))
2854            this.defaultValue = null;
2855          else {
2856            if (this.defaultValue == null)
2857              this.defaultValue = new StringType();
2858            this.defaultValue.setValue(value);
2859          }
2860          return this;
2861        }
2862
2863        /**
2864         * @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
2865         */
2866        public StringType getDescriptionElement() { 
2867          if (this.description == null)
2868            if (Configuration.errorOnAutoCreate())
2869              throw new Error("Attempt to auto-create TestScriptVariableComponent.description");
2870            else if (Configuration.doAutoCreate())
2871              this.description = new StringType(); // bb
2872          return this.description;
2873        }
2874
2875        public boolean hasDescriptionElement() { 
2876          return this.description != null && !this.description.isEmpty();
2877        }
2878
2879        public boolean hasDescription() { 
2880          return this.description != null && !this.description.isEmpty();
2881        }
2882
2883        /**
2884         * @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
2885         */
2886        public TestScriptVariableComponent setDescriptionElement(StringType value) { 
2887          this.description = value;
2888          return this;
2889        }
2890
2891        /**
2892         * @return A free text natural language description of the variable and its purpose.
2893         */
2894        public String getDescription() { 
2895          return this.description == null ? null : this.description.getValue();
2896        }
2897
2898        /**
2899         * @param value A free text natural language description of the variable and its purpose.
2900         */
2901        public TestScriptVariableComponent setDescription(String value) { 
2902          if (Utilities.noString(value))
2903            this.description = null;
2904          else {
2905            if (this.description == null)
2906              this.description = new StringType();
2907            this.description.setValue(value);
2908          }
2909          return this;
2910        }
2911
2912        /**
2913         * @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
2914         */
2915        public StringType getExpressionElement() { 
2916          if (this.expression == null)
2917            if (Configuration.errorOnAutoCreate())
2918              throw new Error("Attempt to auto-create TestScriptVariableComponent.expression");
2919            else if (Configuration.doAutoCreate())
2920              this.expression = new StringType(); // bb
2921          return this.expression;
2922        }
2923
2924        public boolean hasExpressionElement() { 
2925          return this.expression != null && !this.expression.isEmpty();
2926        }
2927
2928        public boolean hasExpression() { 
2929          return this.expression != null && !this.expression.isEmpty();
2930        }
2931
2932        /**
2933         * @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
2934         */
2935        public TestScriptVariableComponent setExpressionElement(StringType value) { 
2936          this.expression = value;
2937          return this;
2938        }
2939
2940        /**
2941         * @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.
2942         */
2943        public String getExpression() { 
2944          return this.expression == null ? null : this.expression.getValue();
2945        }
2946
2947        /**
2948         * @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.
2949         */
2950        public TestScriptVariableComponent setExpression(String value) { 
2951          if (Utilities.noString(value))
2952            this.expression = null;
2953          else {
2954            if (this.expression == null)
2955              this.expression = new StringType();
2956            this.expression.setValue(value);
2957          }
2958          return this;
2959        }
2960
2961        /**
2962         * @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
2963         */
2964        public StringType getHeaderFieldElement() { 
2965          if (this.headerField == null)
2966            if (Configuration.errorOnAutoCreate())
2967              throw new Error("Attempt to auto-create TestScriptVariableComponent.headerField");
2968            else if (Configuration.doAutoCreate())
2969              this.headerField = new StringType(); // bb
2970          return this.headerField;
2971        }
2972
2973        public boolean hasHeaderFieldElement() { 
2974          return this.headerField != null && !this.headerField.isEmpty();
2975        }
2976
2977        public boolean hasHeaderField() { 
2978          return this.headerField != null && !this.headerField.isEmpty();
2979        }
2980
2981        /**
2982         * @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
2983         */
2984        public TestScriptVariableComponent setHeaderFieldElement(StringType value) { 
2985          this.headerField = value;
2986          return this;
2987        }
2988
2989        /**
2990         * @return Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.
2991         */
2992        public String getHeaderField() { 
2993          return this.headerField == null ? null : this.headerField.getValue();
2994        }
2995
2996        /**
2997         * @param value Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.
2998         */
2999        public TestScriptVariableComponent setHeaderField(String value) { 
3000          if (Utilities.noString(value))
3001            this.headerField = null;
3002          else {
3003            if (this.headerField == null)
3004              this.headerField = new StringType();
3005            this.headerField.setValue(value);
3006          }
3007          return this;
3008        }
3009
3010        /**
3011         * @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
3012         */
3013        public StringType getHintElement() { 
3014          if (this.hint == null)
3015            if (Configuration.errorOnAutoCreate())
3016              throw new Error("Attempt to auto-create TestScriptVariableComponent.hint");
3017            else if (Configuration.doAutoCreate())
3018              this.hint = new StringType(); // bb
3019          return this.hint;
3020        }
3021
3022        public boolean hasHintElement() { 
3023          return this.hint != null && !this.hint.isEmpty();
3024        }
3025
3026        public boolean hasHint() { 
3027          return this.hint != null && !this.hint.isEmpty();
3028        }
3029
3030        /**
3031         * @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
3032         */
3033        public TestScriptVariableComponent setHintElement(StringType value) { 
3034          this.hint = value;
3035          return this;
3036        }
3037
3038        /**
3039         * @return Displayable text string with hint help information to the user when entering a default value.
3040         */
3041        public String getHint() { 
3042          return this.hint == null ? null : this.hint.getValue();
3043        }
3044
3045        /**
3046         * @param value Displayable text string with hint help information to the user when entering a default value.
3047         */
3048        public TestScriptVariableComponent setHint(String value) { 
3049          if (Utilities.noString(value))
3050            this.hint = null;
3051          else {
3052            if (this.hint == null)
3053              this.hint = new StringType();
3054            this.hint.setValue(value);
3055          }
3056          return this;
3057        }
3058
3059        /**
3060         * @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
3061         */
3062        public StringType getPathElement() { 
3063          if (this.path == null)
3064            if (Configuration.errorOnAutoCreate())
3065              throw new Error("Attempt to auto-create TestScriptVariableComponent.path");
3066            else if (Configuration.doAutoCreate())
3067              this.path = new StringType(); // bb
3068          return this.path;
3069        }
3070
3071        public boolean hasPathElement() { 
3072          return this.path != null && !this.path.isEmpty();
3073        }
3074
3075        public boolean hasPath() { 
3076          return this.path != null && !this.path.isEmpty();
3077        }
3078
3079        /**
3080         * @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
3081         */
3082        public TestScriptVariableComponent setPathElement(StringType value) { 
3083          this.path = value;
3084          return this;
3085        }
3086
3087        /**
3088         * @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.
3089         */
3090        public String getPath() { 
3091          return this.path == null ? null : this.path.getValue();
3092        }
3093
3094        /**
3095         * @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.
3096         */
3097        public TestScriptVariableComponent setPath(String value) { 
3098          if (Utilities.noString(value))
3099            this.path = null;
3100          else {
3101            if (this.path == null)
3102              this.path = new StringType();
3103            this.path.setValue(value);
3104          }
3105          return this;
3106        }
3107
3108        /**
3109         * @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
3110         */
3111        public IdType getSourceIdElement() { 
3112          if (this.sourceId == null)
3113            if (Configuration.errorOnAutoCreate())
3114              throw new Error("Attempt to auto-create TestScriptVariableComponent.sourceId");
3115            else if (Configuration.doAutoCreate())
3116              this.sourceId = new IdType(); // bb
3117          return this.sourceId;
3118        }
3119
3120        public boolean hasSourceIdElement() { 
3121          return this.sourceId != null && !this.sourceId.isEmpty();
3122        }
3123
3124        public boolean hasSourceId() { 
3125          return this.sourceId != null && !this.sourceId.isEmpty();
3126        }
3127
3128        /**
3129         * @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
3130         */
3131        public TestScriptVariableComponent setSourceIdElement(IdType value) { 
3132          this.sourceId = value;
3133          return this;
3134        }
3135
3136        /**
3137         * @return Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.
3138         */
3139        public String getSourceId() { 
3140          return this.sourceId == null ? null : this.sourceId.getValue();
3141        }
3142
3143        /**
3144         * @param value Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.
3145         */
3146        public TestScriptVariableComponent setSourceId(String value) { 
3147          if (Utilities.noString(value))
3148            this.sourceId = null;
3149          else {
3150            if (this.sourceId == null)
3151              this.sourceId = new IdType();
3152            this.sourceId.setValue(value);
3153          }
3154          return this;
3155        }
3156
3157        protected void listChildren(List<Property> children) {
3158          super.listChildren(children);
3159          children.add(new Property("name", "string", "Descriptive name for this variable.", 0, 1, name));
3160          children.add(new Property("defaultValue", "string", "A default, hard-coded, or user-defined value for this variable.", 0, 1, defaultValue));
3161          children.add(new Property("description", "string", "A free text natural language description of the variable and its purpose.", 0, 1, description));
3162          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));
3163          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));
3164          children.add(new Property("hint", "string", "Displayable text string with hint help information to the user when entering a default value.", 0, 1, hint));
3165          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));
3166          children.add(new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.", 0, 1, sourceId));
3167        }
3168
3169        @Override
3170        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3171          switch (_hash) {
3172          case 3373707: /*name*/  return new Property("name", "string", "Descriptive name for this variable.", 0, 1, name);
3173          case -659125328: /*defaultValue*/  return new Property("defaultValue", "string", "A default, hard-coded, or user-defined value for this variable.", 0, 1, defaultValue);
3174          case -1724546052: /*description*/  return new Property("description", "string", "A free text natural language description of the variable and its purpose.", 0, 1, description);
3175          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);
3176          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);
3177          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);
3178          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);
3179          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);
3180          default: return super.getNamedProperty(_hash, _name, _checkValid);
3181          }
3182
3183        }
3184
3185      @Override
3186      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3187        switch (hash) {
3188        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
3189        case -659125328: /*defaultValue*/ return this.defaultValue == null ? new Base[0] : new Base[] {this.defaultValue}; // StringType
3190        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
3191        case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType
3192        case 1160732269: /*headerField*/ return this.headerField == null ? new Base[0] : new Base[] {this.headerField}; // StringType
3193        case 3202695: /*hint*/ return this.hint == null ? new Base[0] : new Base[] {this.hint}; // StringType
3194        case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
3195        case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType
3196        default: return super.getProperty(hash, name, checkValid);
3197        }
3198
3199      }
3200
3201      @Override
3202      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3203        switch (hash) {
3204        case 3373707: // name
3205          this.name = castToString(value); // StringType
3206          return value;
3207        case -659125328: // defaultValue
3208          this.defaultValue = castToString(value); // StringType
3209          return value;
3210        case -1724546052: // description
3211          this.description = castToString(value); // StringType
3212          return value;
3213        case -1795452264: // expression
3214          this.expression = castToString(value); // StringType
3215          return value;
3216        case 1160732269: // headerField
3217          this.headerField = castToString(value); // StringType
3218          return value;
3219        case 3202695: // hint
3220          this.hint = castToString(value); // StringType
3221          return value;
3222        case 3433509: // path
3223          this.path = castToString(value); // StringType
3224          return value;
3225        case 1746327190: // sourceId
3226          this.sourceId = castToId(value); // IdType
3227          return value;
3228        default: return super.setProperty(hash, name, value);
3229        }
3230
3231      }
3232
3233      @Override
3234      public Base setProperty(String name, Base value) throws FHIRException {
3235        if (name.equals("name")) {
3236          this.name = castToString(value); // StringType
3237        } else if (name.equals("defaultValue")) {
3238          this.defaultValue = castToString(value); // StringType
3239        } else if (name.equals("description")) {
3240          this.description = castToString(value); // StringType
3241        } else if (name.equals("expression")) {
3242          this.expression = castToString(value); // StringType
3243        } else if (name.equals("headerField")) {
3244          this.headerField = castToString(value); // StringType
3245        } else if (name.equals("hint")) {
3246          this.hint = castToString(value); // StringType
3247        } else if (name.equals("path")) {
3248          this.path = castToString(value); // StringType
3249        } else if (name.equals("sourceId")) {
3250          this.sourceId = castToId(value); // IdType
3251        } else
3252          return super.setProperty(name, value);
3253        return value;
3254      }
3255
3256      @Override
3257      public Base makeProperty(int hash, String name) throws FHIRException {
3258        switch (hash) {
3259        case 3373707:  return getNameElement();
3260        case -659125328:  return getDefaultValueElement();
3261        case -1724546052:  return getDescriptionElement();
3262        case -1795452264:  return getExpressionElement();
3263        case 1160732269:  return getHeaderFieldElement();
3264        case 3202695:  return getHintElement();
3265        case 3433509:  return getPathElement();
3266        case 1746327190:  return getSourceIdElement();
3267        default: return super.makeProperty(hash, name);
3268        }
3269
3270      }
3271
3272      @Override
3273      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3274        switch (hash) {
3275        case 3373707: /*name*/ return new String[] {"string"};
3276        case -659125328: /*defaultValue*/ return new String[] {"string"};
3277        case -1724546052: /*description*/ return new String[] {"string"};
3278        case -1795452264: /*expression*/ return new String[] {"string"};
3279        case 1160732269: /*headerField*/ return new String[] {"string"};
3280        case 3202695: /*hint*/ return new String[] {"string"};
3281        case 3433509: /*path*/ return new String[] {"string"};
3282        case 1746327190: /*sourceId*/ return new String[] {"id"};
3283        default: return super.getTypesForProperty(hash, name);
3284        }
3285
3286      }
3287
3288      @Override
3289      public Base addChild(String name) throws FHIRException {
3290        if (name.equals("name")) {
3291          throw new FHIRException("Cannot call addChild on a primitive type TestScript.name");
3292        }
3293        else if (name.equals("defaultValue")) {
3294          throw new FHIRException("Cannot call addChild on a primitive type TestScript.defaultValue");
3295        }
3296        else if (name.equals("description")) {
3297          throw new FHIRException("Cannot call addChild on a primitive type TestScript.description");
3298        }
3299        else if (name.equals("expression")) {
3300          throw new FHIRException("Cannot call addChild on a primitive type TestScript.expression");
3301        }
3302        else if (name.equals("headerField")) {
3303          throw new FHIRException("Cannot call addChild on a primitive type TestScript.headerField");
3304        }
3305        else if (name.equals("hint")) {
3306          throw new FHIRException("Cannot call addChild on a primitive type TestScript.hint");
3307        }
3308        else if (name.equals("path")) {
3309          throw new FHIRException("Cannot call addChild on a primitive type TestScript.path");
3310        }
3311        else if (name.equals("sourceId")) {
3312          throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId");
3313        }
3314        else
3315          return super.addChild(name);
3316      }
3317
3318      public TestScriptVariableComponent copy() {
3319        TestScriptVariableComponent dst = new TestScriptVariableComponent();
3320        copyValues(dst);
3321        dst.name = name == null ? null : name.copy();
3322        dst.defaultValue = defaultValue == null ? null : defaultValue.copy();
3323        dst.description = description == null ? null : description.copy();
3324        dst.expression = expression == null ? null : expression.copy();
3325        dst.headerField = headerField == null ? null : headerField.copy();
3326        dst.hint = hint == null ? null : hint.copy();
3327        dst.path = path == null ? null : path.copy();
3328        dst.sourceId = sourceId == null ? null : sourceId.copy();
3329        return dst;
3330      }
3331
3332      @Override
3333      public boolean equalsDeep(Base other_) {
3334        if (!super.equalsDeep(other_))
3335          return false;
3336        if (!(other_ instanceof TestScriptVariableComponent))
3337          return false;
3338        TestScriptVariableComponent o = (TestScriptVariableComponent) other_;
3339        return compareDeep(name, o.name, true) && compareDeep(defaultValue, o.defaultValue, true) && compareDeep(description, o.description, true)
3340           && compareDeep(expression, o.expression, true) && compareDeep(headerField, o.headerField, true)
3341           && compareDeep(hint, o.hint, true) && compareDeep(path, o.path, true) && compareDeep(sourceId, o.sourceId, true)
3342          ;
3343      }
3344
3345      @Override
3346      public boolean equalsShallow(Base other_) {
3347        if (!super.equalsShallow(other_))
3348          return false;
3349        if (!(other_ instanceof TestScriptVariableComponent))
3350          return false;
3351        TestScriptVariableComponent o = (TestScriptVariableComponent) other_;
3352        return compareValues(name, o.name, true) && compareValues(defaultValue, o.defaultValue, true) && compareValues(description, o.description, true)
3353           && compareValues(expression, o.expression, true) && compareValues(headerField, o.headerField, true)
3354           && compareValues(hint, o.hint, true) && compareValues(path, o.path, true) && compareValues(sourceId, o.sourceId, true)
3355          ;
3356      }
3357
3358      public boolean isEmpty() {
3359        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, defaultValue, description
3360          , expression, headerField, hint, path, sourceId);
3361      }
3362
3363  public String fhirType() {
3364    return "TestScript.variable";
3365
3366  }
3367
3368  }
3369
3370    @Block()
3371    public static class TestScriptRuleComponent extends BackboneElement implements IBaseBackboneElement {
3372        /**
3373         * Reference to the resource (containing the contents of the rule needed for assertions).
3374         */
3375        @Child(name = "resource", type = {Reference.class}, order=1, min=1, max=1, modifier=false, summary=false)
3376        @Description(shortDefinition="Assert rule resource reference", formalDefinition="Reference to the resource (containing the contents of the rule needed for assertions)." )
3377        protected Reference resource;
3378
3379        /**
3380         * The actual object that is the target of the reference (Reference to the resource (containing the contents of the rule needed for assertions).)
3381         */
3382        protected Resource resourceTarget;
3383
3384        /**
3385         * Each rule template can take one or more parameters for rule evaluation.
3386         */
3387        @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3388        @Description(shortDefinition="Rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." )
3389        protected List<RuleParamComponent> param;
3390
3391        private static final long serialVersionUID = -1869267735L;
3392
3393    /**
3394     * Constructor
3395     */
3396      public TestScriptRuleComponent() {
3397        super();
3398      }
3399
3400    /**
3401     * Constructor
3402     */
3403      public TestScriptRuleComponent(Reference resource) {
3404        super();
3405        this.resource = resource;
3406      }
3407
3408        /**
3409         * @return {@link #resource} (Reference to the resource (containing the contents of the rule needed for assertions).)
3410         */
3411        public Reference getResource() { 
3412          if (this.resource == null)
3413            if (Configuration.errorOnAutoCreate())
3414              throw new Error("Attempt to auto-create TestScriptRuleComponent.resource");
3415            else if (Configuration.doAutoCreate())
3416              this.resource = new Reference(); // cc
3417          return this.resource;
3418        }
3419
3420        public boolean hasResource() { 
3421          return this.resource != null && !this.resource.isEmpty();
3422        }
3423
3424        /**
3425         * @param value {@link #resource} (Reference to the resource (containing the contents of the rule needed for assertions).)
3426         */
3427        public TestScriptRuleComponent setResource(Reference value) { 
3428          this.resource = value;
3429          return this;
3430        }
3431
3432        /**
3433         * @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 rule needed for assertions).)
3434         */
3435        public Resource getResourceTarget() { 
3436          return this.resourceTarget;
3437        }
3438
3439        /**
3440         * @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 rule needed for assertions).)
3441         */
3442        public TestScriptRuleComponent setResourceTarget(Resource value) { 
3443          this.resourceTarget = value;
3444          return this;
3445        }
3446
3447        /**
3448         * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.)
3449         */
3450        public List<RuleParamComponent> getParam() { 
3451          if (this.param == null)
3452            this.param = new ArrayList<RuleParamComponent>();
3453          return this.param;
3454        }
3455
3456        /**
3457         * @return Returns a reference to <code>this</code> for easy method chaining
3458         */
3459        public TestScriptRuleComponent setParam(List<RuleParamComponent> theParam) { 
3460          this.param = theParam;
3461          return this;
3462        }
3463
3464        public boolean hasParam() { 
3465          if (this.param == null)
3466            return false;
3467          for (RuleParamComponent item : this.param)
3468            if (!item.isEmpty())
3469              return true;
3470          return false;
3471        }
3472
3473        public RuleParamComponent addParam() { //3
3474          RuleParamComponent t = new RuleParamComponent();
3475          if (this.param == null)
3476            this.param = new ArrayList<RuleParamComponent>();
3477          this.param.add(t);
3478          return t;
3479        }
3480
3481        public TestScriptRuleComponent addParam(RuleParamComponent t) { //3
3482          if (t == null)
3483            return this;
3484          if (this.param == null)
3485            this.param = new ArrayList<RuleParamComponent>();
3486          this.param.add(t);
3487          return this;
3488        }
3489
3490        /**
3491         * @return The first repetition of repeating field {@link #param}, creating it if it does not already exist
3492         */
3493        public RuleParamComponent getParamFirstRep() { 
3494          if (getParam().isEmpty()) {
3495            addParam();
3496          }
3497          return getParam().get(0);
3498        }
3499
3500        protected void listChildren(List<Property> children) {
3501          super.listChildren(children);
3502          children.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the rule needed for assertions).", 0, 1, resource));
3503          children.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param));
3504        }
3505
3506        @Override
3507        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3508          switch (_hash) {
3509          case -341064690: /*resource*/  return new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the rule needed for assertions).", 0, 1, resource);
3510          case 106436749: /*param*/  return new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param);
3511          default: return super.getNamedProperty(_hash, _name, _checkValid);
3512          }
3513
3514        }
3515
3516      @Override
3517      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3518        switch (hash) {
3519        case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference
3520        case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // RuleParamComponent
3521        default: return super.getProperty(hash, name, checkValid);
3522        }
3523
3524      }
3525
3526      @Override
3527      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3528        switch (hash) {
3529        case -341064690: // resource
3530          this.resource = castToReference(value); // Reference
3531          return value;
3532        case 106436749: // param
3533          this.getParam().add((RuleParamComponent) value); // RuleParamComponent
3534          return value;
3535        default: return super.setProperty(hash, name, value);
3536        }
3537
3538      }
3539
3540      @Override
3541      public Base setProperty(String name, Base value) throws FHIRException {
3542        if (name.equals("resource")) {
3543          this.resource = castToReference(value); // Reference
3544        } else if (name.equals("param")) {
3545          this.getParam().add((RuleParamComponent) value);
3546        } else
3547          return super.setProperty(name, value);
3548        return value;
3549      }
3550
3551      @Override
3552      public Base makeProperty(int hash, String name) throws FHIRException {
3553        switch (hash) {
3554        case -341064690:  return getResource(); 
3555        case 106436749:  return addParam(); 
3556        default: return super.makeProperty(hash, name);
3557        }
3558
3559      }
3560
3561      @Override
3562      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3563        switch (hash) {
3564        case -341064690: /*resource*/ return new String[] {"Reference"};
3565        case 106436749: /*param*/ return new String[] {};
3566        default: return super.getTypesForProperty(hash, name);
3567        }
3568
3569      }
3570
3571      @Override
3572      public Base addChild(String name) throws FHIRException {
3573        if (name.equals("resource")) {
3574          this.resource = new Reference();
3575          return this.resource;
3576        }
3577        else if (name.equals("param")) {
3578          return addParam();
3579        }
3580        else
3581          return super.addChild(name);
3582      }
3583
3584      public TestScriptRuleComponent copy() {
3585        TestScriptRuleComponent dst = new TestScriptRuleComponent();
3586        copyValues(dst);
3587        dst.resource = resource == null ? null : resource.copy();
3588        if (param != null) {
3589          dst.param = new ArrayList<RuleParamComponent>();
3590          for (RuleParamComponent i : param)
3591            dst.param.add(i.copy());
3592        };
3593        return dst;
3594      }
3595
3596      @Override
3597      public boolean equalsDeep(Base other_) {
3598        if (!super.equalsDeep(other_))
3599          return false;
3600        if (!(other_ instanceof TestScriptRuleComponent))
3601          return false;
3602        TestScriptRuleComponent o = (TestScriptRuleComponent) other_;
3603        return compareDeep(resource, o.resource, true) && compareDeep(param, o.param, true);
3604      }
3605
3606      @Override
3607      public boolean equalsShallow(Base other_) {
3608        if (!super.equalsShallow(other_))
3609          return false;
3610        if (!(other_ instanceof TestScriptRuleComponent))
3611          return false;
3612        TestScriptRuleComponent o = (TestScriptRuleComponent) other_;
3613        return true;
3614      }
3615
3616      public boolean isEmpty() {
3617        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(resource, param);
3618      }
3619
3620  public String fhirType() {
3621    return "TestScript.rule";
3622
3623  }
3624
3625  }
3626
3627    @Block()
3628    public static class RuleParamComponent extends BackboneElement implements IBaseBackboneElement {
3629        /**
3630         * Descriptive name for this parameter that matches the external assert rule parameter name.
3631         */
3632        @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
3633        @Description(shortDefinition="Parameter name matching external assert rule parameter", formalDefinition="Descriptive name for this parameter that matches the external assert rule parameter name." )
3634        protected StringType name;
3635
3636        /**
3637         * The explicit or dynamic value for the parameter that will be passed on to the external rule template.
3638         */
3639        @Child(name = "value", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
3640        @Description(shortDefinition="Parameter value defined either explicitly or dynamically", formalDefinition="The explicit or dynamic value for the parameter that will be passed on to the external rule template." )
3641        protected StringType value;
3642
3643        private static final long serialVersionUID = 395259392L;
3644
3645    /**
3646     * Constructor
3647     */
3648      public RuleParamComponent() {
3649        super();
3650      }
3651
3652    /**
3653     * Constructor
3654     */
3655      public RuleParamComponent(StringType name) {
3656        super();
3657        this.name = name;
3658      }
3659
3660        /**
3661         * @return {@link #name} (Descriptive name for this parameter that matches the external assert rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
3662         */
3663        public StringType getNameElement() { 
3664          if (this.name == null)
3665            if (Configuration.errorOnAutoCreate())
3666              throw new Error("Attempt to auto-create RuleParamComponent.name");
3667            else if (Configuration.doAutoCreate())
3668              this.name = new StringType(); // bb
3669          return this.name;
3670        }
3671
3672        public boolean hasNameElement() { 
3673          return this.name != null && !this.name.isEmpty();
3674        }
3675
3676        public boolean hasName() { 
3677          return this.name != null && !this.name.isEmpty();
3678        }
3679
3680        /**
3681         * @param value {@link #name} (Descriptive name for this parameter that matches the external assert rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
3682         */
3683        public RuleParamComponent setNameElement(StringType value) { 
3684          this.name = value;
3685          return this;
3686        }
3687
3688        /**
3689         * @return Descriptive name for this parameter that matches the external assert rule parameter name.
3690         */
3691        public String getName() { 
3692          return this.name == null ? null : this.name.getValue();
3693        }
3694
3695        /**
3696         * @param value Descriptive name for this parameter that matches the external assert rule parameter name.
3697         */
3698        public RuleParamComponent setName(String value) { 
3699            if (this.name == null)
3700              this.name = new StringType();
3701            this.name.setValue(value);
3702          return this;
3703        }
3704
3705        /**
3706         * @return {@link #value} (The explicit or dynamic value for the parameter that will be passed on to the external rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
3707         */
3708        public StringType getValueElement() { 
3709          if (this.value == null)
3710            if (Configuration.errorOnAutoCreate())
3711              throw new Error("Attempt to auto-create RuleParamComponent.value");
3712            else if (Configuration.doAutoCreate())
3713              this.value = new StringType(); // bb
3714          return this.value;
3715        }
3716
3717        public boolean hasValueElement() { 
3718          return this.value != null && !this.value.isEmpty();
3719        }
3720
3721        public boolean hasValue() { 
3722          return this.value != null && !this.value.isEmpty();
3723        }
3724
3725        /**
3726         * @param value {@link #value} (The explicit or dynamic value for the parameter that will be passed on to the external rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
3727         */
3728        public RuleParamComponent setValueElement(StringType value) { 
3729          this.value = value;
3730          return this;
3731        }
3732
3733        /**
3734         * @return The explicit or dynamic value for the parameter that will be passed on to the external rule template.
3735         */
3736        public String getValue() { 
3737          return this.value == null ? null : this.value.getValue();
3738        }
3739
3740        /**
3741         * @param value The explicit or dynamic value for the parameter that will be passed on to the external rule template.
3742         */
3743        public RuleParamComponent setValue(String value) { 
3744          if (Utilities.noString(value))
3745            this.value = null;
3746          else {
3747            if (this.value == null)
3748              this.value = new StringType();
3749            this.value.setValue(value);
3750          }
3751          return this;
3752        }
3753
3754        protected void listChildren(List<Property> children) {
3755          super.listChildren(children);
3756          children.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert rule parameter name.", 0, 1, name));
3757          children.add(new Property("value", "string", "The explicit or dynamic value for the parameter that will be passed on to the external rule template.", 0, 1, value));
3758        }
3759
3760        @Override
3761        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3762          switch (_hash) {
3763          case 3373707: /*name*/  return new Property("name", "string", "Descriptive name for this parameter that matches the external assert rule parameter name.", 0, 1, name);
3764          case 111972721: /*value*/  return new Property("value", "string", "The explicit or dynamic value for the parameter that will be passed on to the external rule template.", 0, 1, value);
3765          default: return super.getNamedProperty(_hash, _name, _checkValid);
3766          }
3767
3768        }
3769
3770      @Override
3771      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3772        switch (hash) {
3773        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
3774        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType
3775        default: return super.getProperty(hash, name, checkValid);
3776        }
3777
3778      }
3779
3780      @Override
3781      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3782        switch (hash) {
3783        case 3373707: // name
3784          this.name = castToString(value); // StringType
3785          return value;
3786        case 111972721: // value
3787          this.value = castToString(value); // StringType
3788          return value;
3789        default: return super.setProperty(hash, name, value);
3790        }
3791
3792      }
3793
3794      @Override
3795      public Base setProperty(String name, Base value) throws FHIRException {
3796        if (name.equals("name")) {
3797          this.name = castToString(value); // StringType
3798        } else if (name.equals("value")) {
3799          this.value = castToString(value); // StringType
3800        } else
3801          return super.setProperty(name, value);
3802        return value;
3803      }
3804
3805      @Override
3806      public Base makeProperty(int hash, String name) throws FHIRException {
3807        switch (hash) {
3808        case 3373707:  return getNameElement();
3809        case 111972721:  return getValueElement();
3810        default: return super.makeProperty(hash, name);
3811        }
3812
3813      }
3814
3815      @Override
3816      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3817        switch (hash) {
3818        case 3373707: /*name*/ return new String[] {"string"};
3819        case 111972721: /*value*/ return new String[] {"string"};
3820        default: return super.getTypesForProperty(hash, name);
3821        }
3822
3823      }
3824
3825      @Override
3826      public Base addChild(String name) throws FHIRException {
3827        if (name.equals("name")) {
3828          throw new FHIRException("Cannot call addChild on a primitive type TestScript.name");
3829        }
3830        else if (name.equals("value")) {
3831          throw new FHIRException("Cannot call addChild on a primitive type TestScript.value");
3832        }
3833        else
3834          return super.addChild(name);
3835      }
3836
3837      public RuleParamComponent copy() {
3838        RuleParamComponent dst = new RuleParamComponent();
3839        copyValues(dst);
3840        dst.name = name == null ? null : name.copy();
3841        dst.value = value == null ? null : value.copy();
3842        return dst;
3843      }
3844
3845      @Override
3846      public boolean equalsDeep(Base other_) {
3847        if (!super.equalsDeep(other_))
3848          return false;
3849        if (!(other_ instanceof RuleParamComponent))
3850          return false;
3851        RuleParamComponent o = (RuleParamComponent) other_;
3852        return compareDeep(name, o.name, true) && compareDeep(value, o.value, true);
3853      }
3854
3855      @Override
3856      public boolean equalsShallow(Base other_) {
3857        if (!super.equalsShallow(other_))
3858          return false;
3859        if (!(other_ instanceof RuleParamComponent))
3860          return false;
3861        RuleParamComponent o = (RuleParamComponent) other_;
3862        return compareValues(name, o.name, true) && compareValues(value, o.value, true);
3863      }
3864
3865      public boolean isEmpty() {
3866        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value);
3867      }
3868
3869  public String fhirType() {
3870    return "TestScript.rule.param";
3871
3872  }
3873
3874  }
3875
3876    @Block()
3877    public static class TestScriptRulesetComponent extends BackboneElement implements IBaseBackboneElement {
3878        /**
3879         * Reference to the resource (containing the contents of the ruleset needed for assertions).
3880         */
3881        @Child(name = "resource", type = {Reference.class}, order=1, min=1, max=1, modifier=false, summary=false)
3882        @Description(shortDefinition="Assert ruleset resource reference", formalDefinition="Reference to the resource (containing the contents of the ruleset needed for assertions)." )
3883        protected Reference resource;
3884
3885        /**
3886         * The actual object that is the target of the reference (Reference to the resource (containing the contents of the ruleset needed for assertions).)
3887         */
3888        protected Resource resourceTarget;
3889
3890        /**
3891         * The referenced rule within the external ruleset template.
3892         */
3893        @Child(name = "rule", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3894        @Description(shortDefinition="The referenced rule within the ruleset", formalDefinition="The referenced rule within the external ruleset template." )
3895        protected List<RulesetRuleComponent> rule;
3896
3897        private static final long serialVersionUID = 1260261423L;
3898
3899    /**
3900     * Constructor
3901     */
3902      public TestScriptRulesetComponent() {
3903        super();
3904      }
3905
3906    /**
3907     * Constructor
3908     */
3909      public TestScriptRulesetComponent(Reference resource) {
3910        super();
3911        this.resource = resource;
3912      }
3913
3914        /**
3915         * @return {@link #resource} (Reference to the resource (containing the contents of the ruleset needed for assertions).)
3916         */
3917        public Reference getResource() { 
3918          if (this.resource == null)
3919            if (Configuration.errorOnAutoCreate())
3920              throw new Error("Attempt to auto-create TestScriptRulesetComponent.resource");
3921            else if (Configuration.doAutoCreate())
3922              this.resource = new Reference(); // cc
3923          return this.resource;
3924        }
3925
3926        public boolean hasResource() { 
3927          return this.resource != null && !this.resource.isEmpty();
3928        }
3929
3930        /**
3931         * @param value {@link #resource} (Reference to the resource (containing the contents of the ruleset needed for assertions).)
3932         */
3933        public TestScriptRulesetComponent setResource(Reference value) { 
3934          this.resource = value;
3935          return this;
3936        }
3937
3938        /**
3939         * @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 ruleset needed for assertions).)
3940         */
3941        public Resource getResourceTarget() { 
3942          return this.resourceTarget;
3943        }
3944
3945        /**
3946         * @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 ruleset needed for assertions).)
3947         */
3948        public TestScriptRulesetComponent setResourceTarget(Resource value) { 
3949          this.resourceTarget = value;
3950          return this;
3951        }
3952
3953        /**
3954         * @return {@link #rule} (The referenced rule within the external ruleset template.)
3955         */
3956        public List<RulesetRuleComponent> getRule() { 
3957          if (this.rule == null)
3958            this.rule = new ArrayList<RulesetRuleComponent>();
3959          return this.rule;
3960        }
3961
3962        /**
3963         * @return Returns a reference to <code>this</code> for easy method chaining
3964         */
3965        public TestScriptRulesetComponent setRule(List<RulesetRuleComponent> theRule) { 
3966          this.rule = theRule;
3967          return this;
3968        }
3969
3970        public boolean hasRule() { 
3971          if (this.rule == null)
3972            return false;
3973          for (RulesetRuleComponent item : this.rule)
3974            if (!item.isEmpty())
3975              return true;
3976          return false;
3977        }
3978
3979        public RulesetRuleComponent addRule() { //3
3980          RulesetRuleComponent t = new RulesetRuleComponent();
3981          if (this.rule == null)
3982            this.rule = new ArrayList<RulesetRuleComponent>();
3983          this.rule.add(t);
3984          return t;
3985        }
3986
3987        public TestScriptRulesetComponent addRule(RulesetRuleComponent t) { //3
3988          if (t == null)
3989            return this;
3990          if (this.rule == null)
3991            this.rule = new ArrayList<RulesetRuleComponent>();
3992          this.rule.add(t);
3993          return this;
3994        }
3995
3996        /**
3997         * @return The first repetition of repeating field {@link #rule}, creating it if it does not already exist
3998         */
3999        public RulesetRuleComponent getRuleFirstRep() { 
4000          if (getRule().isEmpty()) {
4001            addRule();
4002          }
4003          return getRule().get(0);
4004        }
4005
4006        protected void listChildren(List<Property> children) {
4007          super.listChildren(children);
4008          children.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the ruleset needed for assertions).", 0, 1, resource));
4009          children.add(new Property("rule", "", "The referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, rule));
4010        }
4011
4012        @Override
4013        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4014          switch (_hash) {
4015          case -341064690: /*resource*/  return new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the ruleset needed for assertions).", 0, 1, resource);
4016          case 3512060: /*rule*/  return new Property("rule", "", "The referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, rule);
4017          default: return super.getNamedProperty(_hash, _name, _checkValid);
4018          }
4019
4020        }
4021
4022      @Override
4023      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4024        switch (hash) {
4025        case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference
4026        case 3512060: /*rule*/ return this.rule == null ? new Base[0] : this.rule.toArray(new Base[this.rule.size()]); // RulesetRuleComponent
4027        default: return super.getProperty(hash, name, checkValid);
4028        }
4029
4030      }
4031
4032      @Override
4033      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4034        switch (hash) {
4035        case -341064690: // resource
4036          this.resource = castToReference(value); // Reference
4037          return value;
4038        case 3512060: // rule
4039          this.getRule().add((RulesetRuleComponent) value); // RulesetRuleComponent
4040          return value;
4041        default: return super.setProperty(hash, name, value);
4042        }
4043
4044      }
4045
4046      @Override
4047      public Base setProperty(String name, Base value) throws FHIRException {
4048        if (name.equals("resource")) {
4049          this.resource = castToReference(value); // Reference
4050        } else if (name.equals("rule")) {
4051          this.getRule().add((RulesetRuleComponent) value);
4052        } else
4053          return super.setProperty(name, value);
4054        return value;
4055      }
4056
4057      @Override
4058      public Base makeProperty(int hash, String name) throws FHIRException {
4059        switch (hash) {
4060        case -341064690:  return getResource(); 
4061        case 3512060:  return addRule(); 
4062        default: return super.makeProperty(hash, name);
4063        }
4064
4065      }
4066
4067      @Override
4068      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4069        switch (hash) {
4070        case -341064690: /*resource*/ return new String[] {"Reference"};
4071        case 3512060: /*rule*/ return new String[] {};
4072        default: return super.getTypesForProperty(hash, name);
4073        }
4074
4075      }
4076
4077      @Override
4078      public Base addChild(String name) throws FHIRException {
4079        if (name.equals("resource")) {
4080          this.resource = new Reference();
4081          return this.resource;
4082        }
4083        else if (name.equals("rule")) {
4084          return addRule();
4085        }
4086        else
4087          return super.addChild(name);
4088      }
4089
4090      public TestScriptRulesetComponent copy() {
4091        TestScriptRulesetComponent dst = new TestScriptRulesetComponent();
4092        copyValues(dst);
4093        dst.resource = resource == null ? null : resource.copy();
4094        if (rule != null) {
4095          dst.rule = new ArrayList<RulesetRuleComponent>();
4096          for (RulesetRuleComponent i : rule)
4097            dst.rule.add(i.copy());
4098        };
4099        return dst;
4100      }
4101
4102      @Override
4103      public boolean equalsDeep(Base other_) {
4104        if (!super.equalsDeep(other_))
4105          return false;
4106        if (!(other_ instanceof TestScriptRulesetComponent))
4107          return false;
4108        TestScriptRulesetComponent o = (TestScriptRulesetComponent) other_;
4109        return compareDeep(resource, o.resource, true) && compareDeep(rule, o.rule, true);
4110      }
4111
4112      @Override
4113      public boolean equalsShallow(Base other_) {
4114        if (!super.equalsShallow(other_))
4115          return false;
4116        if (!(other_ instanceof TestScriptRulesetComponent))
4117          return false;
4118        TestScriptRulesetComponent o = (TestScriptRulesetComponent) other_;
4119        return true;
4120      }
4121
4122      public boolean isEmpty() {
4123        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(resource, rule);
4124      }
4125
4126  public String fhirType() {
4127    return "TestScript.ruleset";
4128
4129  }
4130
4131  }
4132
4133    @Block()
4134    public static class RulesetRuleComponent extends BackboneElement implements IBaseBackboneElement {
4135        /**
4136         * Id of the referenced rule within the external ruleset template.
4137         */
4138        @Child(name = "ruleId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false)
4139        @Description(shortDefinition="Id of referenced rule within the ruleset", formalDefinition="Id of the referenced rule within the external ruleset template." )
4140        protected IdType ruleId;
4141
4142        /**
4143         * Each rule template can take one or more parameters for rule evaluation.
4144         */
4145        @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
4146        @Description(shortDefinition="Ruleset rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." )
4147        protected List<RulesetRuleParamComponent> param;
4148
4149        private static final long serialVersionUID = -1399866981L;
4150
4151    /**
4152     * Constructor
4153     */
4154      public RulesetRuleComponent() {
4155        super();
4156      }
4157
4158    /**
4159     * Constructor
4160     */
4161      public RulesetRuleComponent(IdType ruleId) {
4162        super();
4163        this.ruleId = ruleId;
4164      }
4165
4166        /**
4167         * @return {@link #ruleId} (Id of the referenced rule within the external ruleset template.). This is the underlying object with id, value and extensions. The accessor "getRuleId" gives direct access to the value
4168         */
4169        public IdType getRuleIdElement() { 
4170          if (this.ruleId == null)
4171            if (Configuration.errorOnAutoCreate())
4172              throw new Error("Attempt to auto-create RulesetRuleComponent.ruleId");
4173            else if (Configuration.doAutoCreate())
4174              this.ruleId = new IdType(); // bb
4175          return this.ruleId;
4176        }
4177
4178        public boolean hasRuleIdElement() { 
4179          return this.ruleId != null && !this.ruleId.isEmpty();
4180        }
4181
4182        public boolean hasRuleId() { 
4183          return this.ruleId != null && !this.ruleId.isEmpty();
4184        }
4185
4186        /**
4187         * @param value {@link #ruleId} (Id of the referenced rule within the external ruleset template.). This is the underlying object with id, value and extensions. The accessor "getRuleId" gives direct access to the value
4188         */
4189        public RulesetRuleComponent setRuleIdElement(IdType value) { 
4190          this.ruleId = value;
4191          return this;
4192        }
4193
4194        /**
4195         * @return Id of the referenced rule within the external ruleset template.
4196         */
4197        public String getRuleId() { 
4198          return this.ruleId == null ? null : this.ruleId.getValue();
4199        }
4200
4201        /**
4202         * @param value Id of the referenced rule within the external ruleset template.
4203         */
4204        public RulesetRuleComponent setRuleId(String value) { 
4205            if (this.ruleId == null)
4206              this.ruleId = new IdType();
4207            this.ruleId.setValue(value);
4208          return this;
4209        }
4210
4211        /**
4212         * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.)
4213         */
4214        public List<RulesetRuleParamComponent> getParam() { 
4215          if (this.param == null)
4216            this.param = new ArrayList<RulesetRuleParamComponent>();
4217          return this.param;
4218        }
4219
4220        /**
4221         * @return Returns a reference to <code>this</code> for easy method chaining
4222         */
4223        public RulesetRuleComponent setParam(List<RulesetRuleParamComponent> theParam) { 
4224          this.param = theParam;
4225          return this;
4226        }
4227
4228        public boolean hasParam() { 
4229          if (this.param == null)
4230            return false;
4231          for (RulesetRuleParamComponent item : this.param)
4232            if (!item.isEmpty())
4233              return true;
4234          return false;
4235        }
4236
4237        public RulesetRuleParamComponent addParam() { //3
4238          RulesetRuleParamComponent t = new RulesetRuleParamComponent();
4239          if (this.param == null)
4240            this.param = new ArrayList<RulesetRuleParamComponent>();
4241          this.param.add(t);
4242          return t;
4243        }
4244
4245        public RulesetRuleComponent addParam(RulesetRuleParamComponent t) { //3
4246          if (t == null)
4247            return this;
4248          if (this.param == null)
4249            this.param = new ArrayList<RulesetRuleParamComponent>();
4250          this.param.add(t);
4251          return this;
4252        }
4253
4254        /**
4255         * @return The first repetition of repeating field {@link #param}, creating it if it does not already exist
4256         */
4257        public RulesetRuleParamComponent getParamFirstRep() { 
4258          if (getParam().isEmpty()) {
4259            addParam();
4260          }
4261          return getParam().get(0);
4262        }
4263
4264        protected void listChildren(List<Property> children) {
4265          super.listChildren(children);
4266          children.add(new Property("ruleId", "id", "Id of the referenced rule within the external ruleset template.", 0, 1, ruleId));
4267          children.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param));
4268        }
4269
4270        @Override
4271        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4272          switch (_hash) {
4273          case -919875273: /*ruleId*/  return new Property("ruleId", "id", "Id of the referenced rule within the external ruleset template.", 0, 1, ruleId);
4274          case 106436749: /*param*/  return new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param);
4275          default: return super.getNamedProperty(_hash, _name, _checkValid);
4276          }
4277
4278        }
4279
4280      @Override
4281      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4282        switch (hash) {
4283        case -919875273: /*ruleId*/ return this.ruleId == null ? new Base[0] : new Base[] {this.ruleId}; // IdType
4284        case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // RulesetRuleParamComponent
4285        default: return super.getProperty(hash, name, checkValid);
4286        }
4287
4288      }
4289
4290      @Override
4291      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4292        switch (hash) {
4293        case -919875273: // ruleId
4294          this.ruleId = castToId(value); // IdType
4295          return value;
4296        case 106436749: // param
4297          this.getParam().add((RulesetRuleParamComponent) value); // RulesetRuleParamComponent
4298          return value;
4299        default: return super.setProperty(hash, name, value);
4300        }
4301
4302      }
4303
4304      @Override
4305      public Base setProperty(String name, Base value) throws FHIRException {
4306        if (name.equals("ruleId")) {
4307          this.ruleId = castToId(value); // IdType
4308        } else if (name.equals("param")) {
4309          this.getParam().add((RulesetRuleParamComponent) value);
4310        } else
4311          return super.setProperty(name, value);
4312        return value;
4313      }
4314
4315      @Override
4316      public Base makeProperty(int hash, String name) throws FHIRException {
4317        switch (hash) {
4318        case -919875273:  return getRuleIdElement();
4319        case 106436749:  return addParam(); 
4320        default: return super.makeProperty(hash, name);
4321        }
4322
4323      }
4324
4325      @Override
4326      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4327        switch (hash) {
4328        case -919875273: /*ruleId*/ return new String[] {"id"};
4329        case 106436749: /*param*/ return new String[] {};
4330        default: return super.getTypesForProperty(hash, name);
4331        }
4332
4333      }
4334
4335      @Override
4336      public Base addChild(String name) throws FHIRException {
4337        if (name.equals("ruleId")) {
4338          throw new FHIRException("Cannot call addChild on a primitive type TestScript.ruleId");
4339        }
4340        else if (name.equals("param")) {
4341          return addParam();
4342        }
4343        else
4344          return super.addChild(name);
4345      }
4346
4347      public RulesetRuleComponent copy() {
4348        RulesetRuleComponent dst = new RulesetRuleComponent();
4349        copyValues(dst);
4350        dst.ruleId = ruleId == null ? null : ruleId.copy();
4351        if (param != null) {
4352          dst.param = new ArrayList<RulesetRuleParamComponent>();
4353          for (RulesetRuleParamComponent i : param)
4354            dst.param.add(i.copy());
4355        };
4356        return dst;
4357      }
4358
4359      @Override
4360      public boolean equalsDeep(Base other_) {
4361        if (!super.equalsDeep(other_))
4362          return false;
4363        if (!(other_ instanceof RulesetRuleComponent))
4364          return false;
4365        RulesetRuleComponent o = (RulesetRuleComponent) other_;
4366        return compareDeep(ruleId, o.ruleId, true) && compareDeep(param, o.param, true);
4367      }
4368
4369      @Override
4370      public boolean equalsShallow(Base other_) {
4371        if (!super.equalsShallow(other_))
4372          return false;
4373        if (!(other_ instanceof RulesetRuleComponent))
4374          return false;
4375        RulesetRuleComponent o = (RulesetRuleComponent) other_;
4376        return compareValues(ruleId, o.ruleId, true);
4377      }
4378
4379      public boolean isEmpty() {
4380        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(ruleId, param);
4381      }
4382
4383  public String fhirType() {
4384    return "TestScript.ruleset.rule";
4385
4386  }
4387
4388  }
4389
4390    @Block()
4391    public static class RulesetRuleParamComponent extends BackboneElement implements IBaseBackboneElement {
4392        /**
4393         * Descriptive name for this parameter that matches the external assert ruleset rule parameter name.
4394         */
4395        @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
4396        @Description(shortDefinition="Parameter name matching external assert ruleset rule parameter", formalDefinition="Descriptive name for this parameter that matches the external assert ruleset rule parameter name." )
4397        protected StringType name;
4398
4399        /**
4400         * The value for the parameter that will be passed on to the external ruleset rule template.
4401         */
4402        @Child(name = "value", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
4403        @Description(shortDefinition="Parameter value defined either explicitly or dynamically", formalDefinition="The value for the parameter that will be passed on to the external ruleset rule template." )
4404        protected StringType value;
4405
4406        private static final long serialVersionUID = 395259392L;
4407
4408    /**
4409     * Constructor
4410     */
4411      public RulesetRuleParamComponent() {
4412        super();
4413      }
4414
4415    /**
4416     * Constructor
4417     */
4418      public RulesetRuleParamComponent(StringType name) {
4419        super();
4420        this.name = name;
4421      }
4422
4423        /**
4424         * @return {@link #name} (Descriptive name for this parameter that matches the external assert ruleset rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
4425         */
4426        public StringType getNameElement() { 
4427          if (this.name == null)
4428            if (Configuration.errorOnAutoCreate())
4429              throw new Error("Attempt to auto-create RulesetRuleParamComponent.name");
4430            else if (Configuration.doAutoCreate())
4431              this.name = new StringType(); // bb
4432          return this.name;
4433        }
4434
4435        public boolean hasNameElement() { 
4436          return this.name != null && !this.name.isEmpty();
4437        }
4438
4439        public boolean hasName() { 
4440          return this.name != null && !this.name.isEmpty();
4441        }
4442
4443        /**
4444         * @param value {@link #name} (Descriptive name for this parameter that matches the external assert ruleset rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
4445         */
4446        public RulesetRuleParamComponent setNameElement(StringType value) { 
4447          this.name = value;
4448          return this;
4449        }
4450
4451        /**
4452         * @return Descriptive name for this parameter that matches the external assert ruleset rule parameter name.
4453         */
4454        public String getName() { 
4455          return this.name == null ? null : this.name.getValue();
4456        }
4457
4458        /**
4459         * @param value Descriptive name for this parameter that matches the external assert ruleset rule parameter name.
4460         */
4461        public RulesetRuleParamComponent setName(String value) { 
4462            if (this.name == null)
4463              this.name = new StringType();
4464            this.name.setValue(value);
4465          return this;
4466        }
4467
4468        /**
4469         * @return {@link #value} (The value for the parameter that will be passed on to the external ruleset rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
4470         */
4471        public StringType getValueElement() { 
4472          if (this.value == null)
4473            if (Configuration.errorOnAutoCreate())
4474              throw new Error("Attempt to auto-create RulesetRuleParamComponent.value");
4475            else if (Configuration.doAutoCreate())
4476              this.value = new StringType(); // bb
4477          return this.value;
4478        }
4479
4480        public boolean hasValueElement() { 
4481          return this.value != null && !this.value.isEmpty();
4482        }
4483
4484        public boolean hasValue() { 
4485          return this.value != null && !this.value.isEmpty();
4486        }
4487
4488        /**
4489         * @param value {@link #value} (The value for the parameter that will be passed on to the external ruleset rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
4490         */
4491        public RulesetRuleParamComponent setValueElement(StringType value) { 
4492          this.value = value;
4493          return this;
4494        }
4495
4496        /**
4497         * @return The value for the parameter that will be passed on to the external ruleset rule template.
4498         */
4499        public String getValue() { 
4500          return this.value == null ? null : this.value.getValue();
4501        }
4502
4503        /**
4504         * @param value The value for the parameter that will be passed on to the external ruleset rule template.
4505         */
4506        public RulesetRuleParamComponent setValue(String value) { 
4507          if (Utilities.noString(value))
4508            this.value = null;
4509          else {
4510            if (this.value == null)
4511              this.value = new StringType();
4512            this.value.setValue(value);
4513          }
4514          return this;
4515        }
4516
4517        protected void listChildren(List<Property> children) {
4518          super.listChildren(children);
4519          children.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", 0, 1, name));
4520          children.add(new Property("value", "string", "The value for the parameter that will be passed on to the external ruleset rule template.", 0, 1, value));
4521        }
4522
4523        @Override
4524        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4525          switch (_hash) {
4526          case 3373707: /*name*/  return new Property("name", "string", "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", 0, 1, name);
4527          case 111972721: /*value*/  return new Property("value", "string", "The value for the parameter that will be passed on to the external ruleset rule template.", 0, 1, value);
4528          default: return super.getNamedProperty(_hash, _name, _checkValid);
4529          }
4530
4531        }
4532
4533      @Override
4534      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4535        switch (hash) {
4536        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
4537        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType
4538        default: return super.getProperty(hash, name, checkValid);
4539        }
4540
4541      }
4542
4543      @Override
4544      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4545        switch (hash) {
4546        case 3373707: // name
4547          this.name = castToString(value); // StringType
4548          return value;
4549        case 111972721: // value
4550          this.value = castToString(value); // StringType
4551          return value;
4552        default: return super.setProperty(hash, name, value);
4553        }
4554
4555      }
4556
4557      @Override
4558      public Base setProperty(String name, Base value) throws FHIRException {
4559        if (name.equals("name")) {
4560          this.name = castToString(value); // StringType
4561        } else if (name.equals("value")) {
4562          this.value = castToString(value); // StringType
4563        } else
4564          return super.setProperty(name, value);
4565        return value;
4566      }
4567
4568      @Override
4569      public Base makeProperty(int hash, String name) throws FHIRException {
4570        switch (hash) {
4571        case 3373707:  return getNameElement();
4572        case 111972721:  return getValueElement();
4573        default: return super.makeProperty(hash, name);
4574        }
4575
4576      }
4577
4578      @Override
4579      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4580        switch (hash) {
4581        case 3373707: /*name*/ return new String[] {"string"};
4582        case 111972721: /*value*/ return new String[] {"string"};
4583        default: return super.getTypesForProperty(hash, name);
4584        }
4585
4586      }
4587
4588      @Override
4589      public Base addChild(String name) throws FHIRException {
4590        if (name.equals("name")) {
4591          throw new FHIRException("Cannot call addChild on a primitive type TestScript.name");
4592        }
4593        else if (name.equals("value")) {
4594          throw new FHIRException("Cannot call addChild on a primitive type TestScript.value");
4595        }
4596        else
4597          return super.addChild(name);
4598      }
4599
4600      public RulesetRuleParamComponent copy() {
4601        RulesetRuleParamComponent dst = new RulesetRuleParamComponent();
4602        copyValues(dst);
4603        dst.name = name == null ? null : name.copy();
4604        dst.value = value == null ? null : value.copy();
4605        return dst;
4606      }
4607
4608      @Override
4609      public boolean equalsDeep(Base other_) {
4610        if (!super.equalsDeep(other_))
4611          return false;
4612        if (!(other_ instanceof RulesetRuleParamComponent))
4613          return false;
4614        RulesetRuleParamComponent o = (RulesetRuleParamComponent) other_;
4615        return compareDeep(name, o.name, true) && compareDeep(value, o.value, true);
4616      }
4617
4618      @Override
4619      public boolean equalsShallow(Base other_) {
4620        if (!super.equalsShallow(other_))
4621          return false;
4622        if (!(other_ instanceof RulesetRuleParamComponent))
4623          return false;
4624        RulesetRuleParamComponent o = (RulesetRuleParamComponent) other_;
4625        return compareValues(name, o.name, true) && compareValues(value, o.value, true);
4626      }
4627
4628      public boolean isEmpty() {
4629        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value);
4630      }
4631
4632  public String fhirType() {
4633    return "TestScript.ruleset.rule.param";
4634
4635  }
4636
4637  }
4638
4639    @Block()
4640    public static class TestScriptSetupComponent extends BackboneElement implements IBaseBackboneElement {
4641        /**
4642         * Action would contain either an operation or an assertion.
4643         */
4644        @Child(name = "action", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
4645        @Description(shortDefinition="A setup operation or assert to perform", formalDefinition="Action would contain either an operation or an assertion." )
4646        protected List<SetupActionComponent> action;
4647
4648        private static final long serialVersionUID = -123374486L;
4649
4650    /**
4651     * Constructor
4652     */
4653      public TestScriptSetupComponent() {
4654        super();
4655      }
4656
4657        /**
4658         * @return {@link #action} (Action would contain either an operation or an assertion.)
4659         */
4660        public List<SetupActionComponent> getAction() { 
4661          if (this.action == null)
4662            this.action = new ArrayList<SetupActionComponent>();
4663          return this.action;
4664        }
4665
4666        /**
4667         * @return Returns a reference to <code>this</code> for easy method chaining
4668         */
4669        public TestScriptSetupComponent setAction(List<SetupActionComponent> theAction) { 
4670          this.action = theAction;
4671          return this;
4672        }
4673
4674        public boolean hasAction() { 
4675          if (this.action == null)
4676            return false;
4677          for (SetupActionComponent item : this.action)
4678            if (!item.isEmpty())
4679              return true;
4680          return false;
4681        }
4682
4683        public SetupActionComponent addAction() { //3
4684          SetupActionComponent t = new SetupActionComponent();
4685          if (this.action == null)
4686            this.action = new ArrayList<SetupActionComponent>();
4687          this.action.add(t);
4688          return t;
4689        }
4690
4691        public TestScriptSetupComponent addAction(SetupActionComponent t) { //3
4692          if (t == null)
4693            return this;
4694          if (this.action == null)
4695            this.action = new ArrayList<SetupActionComponent>();
4696          this.action.add(t);
4697          return this;
4698        }
4699
4700        /**
4701         * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist
4702         */
4703        public SetupActionComponent getActionFirstRep() { 
4704          if (getAction().isEmpty()) {
4705            addAction();
4706          }
4707          return getAction().get(0);
4708        }
4709
4710        protected void listChildren(List<Property> children) {
4711          super.listChildren(children);
4712          children.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action));
4713        }
4714
4715        @Override
4716        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4717          switch (_hash) {
4718          case -1422950858: /*action*/  return new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action);
4719          default: return super.getNamedProperty(_hash, _name, _checkValid);
4720          }
4721
4722        }
4723
4724      @Override
4725      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4726        switch (hash) {
4727        case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // SetupActionComponent
4728        default: return super.getProperty(hash, name, checkValid);
4729        }
4730
4731      }
4732
4733      @Override
4734      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4735        switch (hash) {
4736        case -1422950858: // action
4737          this.getAction().add((SetupActionComponent) value); // SetupActionComponent
4738          return value;
4739        default: return super.setProperty(hash, name, value);
4740        }
4741
4742      }
4743
4744      @Override
4745      public Base setProperty(String name, Base value) throws FHIRException {
4746        if (name.equals("action")) {
4747          this.getAction().add((SetupActionComponent) value);
4748        } else
4749          return super.setProperty(name, value);
4750        return value;
4751      }
4752
4753      @Override
4754      public Base makeProperty(int hash, String name) throws FHIRException {
4755        switch (hash) {
4756        case -1422950858:  return addAction(); 
4757        default: return super.makeProperty(hash, name);
4758        }
4759
4760      }
4761
4762      @Override
4763      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4764        switch (hash) {
4765        case -1422950858: /*action*/ return new String[] {};
4766        default: return super.getTypesForProperty(hash, name);
4767        }
4768
4769      }
4770
4771      @Override
4772      public Base addChild(String name) throws FHIRException {
4773        if (name.equals("action")) {
4774          return addAction();
4775        }
4776        else
4777          return super.addChild(name);
4778      }
4779
4780      public TestScriptSetupComponent copy() {
4781        TestScriptSetupComponent dst = new TestScriptSetupComponent();
4782        copyValues(dst);
4783        if (action != null) {
4784          dst.action = new ArrayList<SetupActionComponent>();
4785          for (SetupActionComponent i : action)
4786            dst.action.add(i.copy());
4787        };
4788        return dst;
4789      }
4790
4791      @Override
4792      public boolean equalsDeep(Base other_) {
4793        if (!super.equalsDeep(other_))
4794          return false;
4795        if (!(other_ instanceof TestScriptSetupComponent))
4796          return false;
4797        TestScriptSetupComponent o = (TestScriptSetupComponent) other_;
4798        return compareDeep(action, o.action, true);
4799      }
4800
4801      @Override
4802      public boolean equalsShallow(Base other_) {
4803        if (!super.equalsShallow(other_))
4804          return false;
4805        if (!(other_ instanceof TestScriptSetupComponent))
4806          return false;
4807        TestScriptSetupComponent o = (TestScriptSetupComponent) other_;
4808        return true;
4809      }
4810
4811      public boolean isEmpty() {
4812        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(action);
4813      }
4814
4815  public String fhirType() {
4816    return "TestScript.setup";
4817
4818  }
4819
4820  }
4821
4822    @Block()
4823    public static class SetupActionComponent extends BackboneElement implements IBaseBackboneElement {
4824        /**
4825         * The operation to perform.
4826         */
4827        @Child(name = "operation", type = {}, order=1, min=0, max=1, modifier=false, summary=false)
4828        @Description(shortDefinition="The setup operation to perform", formalDefinition="The operation to perform." )
4829        protected SetupActionOperationComponent operation;
4830
4831        /**
4832         * Evaluates the results of previous operations to determine if the server under test behaves appropriately.
4833         */
4834        @Child(name = "assert", type = {}, order=2, min=0, max=1, modifier=false, summary=false)
4835        @Description(shortDefinition="The assertion to perform", formalDefinition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." )
4836        protected SetupActionAssertComponent assert_;
4837
4838        private static final long serialVersionUID = -252088305L;
4839
4840    /**
4841     * Constructor
4842     */
4843      public SetupActionComponent() {
4844        super();
4845      }
4846
4847        /**
4848         * @return {@link #operation} (The operation to perform.)
4849         */
4850        public SetupActionOperationComponent getOperation() { 
4851          if (this.operation == null)
4852            if (Configuration.errorOnAutoCreate())
4853              throw new Error("Attempt to auto-create SetupActionComponent.operation");
4854            else if (Configuration.doAutoCreate())
4855              this.operation = new SetupActionOperationComponent(); // cc
4856          return this.operation;
4857        }
4858
4859        public boolean hasOperation() { 
4860          return this.operation != null && !this.operation.isEmpty();
4861        }
4862
4863        /**
4864         * @param value {@link #operation} (The operation to perform.)
4865         */
4866        public SetupActionComponent setOperation(SetupActionOperationComponent value) { 
4867          this.operation = value;
4868          return this;
4869        }
4870
4871        /**
4872         * @return {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.)
4873         */
4874        public SetupActionAssertComponent getAssert() { 
4875          if (this.assert_ == null)
4876            if (Configuration.errorOnAutoCreate())
4877              throw new Error("Attempt to auto-create SetupActionComponent.assert_");
4878            else if (Configuration.doAutoCreate())
4879              this.assert_ = new SetupActionAssertComponent(); // cc
4880          return this.assert_;
4881        }
4882
4883        public boolean hasAssert() { 
4884          return this.assert_ != null && !this.assert_.isEmpty();
4885        }
4886
4887        /**
4888         * @param value {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.)
4889         */
4890        public SetupActionComponent setAssert(SetupActionAssertComponent value) { 
4891          this.assert_ = value;
4892          return this;
4893        }
4894
4895        protected void listChildren(List<Property> children) {
4896          super.listChildren(children);
4897          children.add(new Property("operation", "", "The operation to perform.", 0, 1, operation));
4898          children.add(new Property("assert", "", "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", 0, 1, assert_));
4899        }
4900
4901        @Override
4902        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4903          switch (_hash) {
4904          case 1662702951: /*operation*/  return new Property("operation", "", "The operation to perform.", 0, 1, operation);
4905          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_);
4906          default: return super.getNamedProperty(_hash, _name, _checkValid);
4907          }
4908
4909        }
4910
4911      @Override
4912      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4913        switch (hash) {
4914        case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent
4915        case -1408208058: /*assert*/ return this.assert_ == null ? new Base[0] : new Base[] {this.assert_}; // SetupActionAssertComponent
4916        default: return super.getProperty(hash, name, checkValid);
4917        }
4918
4919      }
4920
4921      @Override
4922      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4923        switch (hash) {
4924        case 1662702951: // operation
4925          this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
4926          return value;
4927        case -1408208058: // assert
4928          this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
4929          return value;
4930        default: return super.setProperty(hash, name, value);
4931        }
4932
4933      }
4934
4935      @Override
4936      public Base setProperty(String name, Base value) throws FHIRException {
4937        if (name.equals("operation")) {
4938          this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
4939        } else if (name.equals("assert")) {
4940          this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
4941        } else
4942          return super.setProperty(name, value);
4943        return value;
4944      }
4945
4946      @Override
4947      public Base makeProperty(int hash, String name) throws FHIRException {
4948        switch (hash) {
4949        case 1662702951:  return getOperation(); 
4950        case -1408208058:  return getAssert(); 
4951        default: return super.makeProperty(hash, name);
4952        }
4953
4954      }
4955
4956      @Override
4957      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4958        switch (hash) {
4959        case 1662702951: /*operation*/ return new String[] {};
4960        case -1408208058: /*assert*/ return new String[] {};
4961        default: return super.getTypesForProperty(hash, name);
4962        }
4963
4964      }
4965
4966      @Override
4967      public Base addChild(String name) throws FHIRException {
4968        if (name.equals("operation")) {
4969          this.operation = new SetupActionOperationComponent();
4970          return this.operation;
4971        }
4972        else if (name.equals("assert")) {
4973          this.assert_ = new SetupActionAssertComponent();
4974          return this.assert_;
4975        }
4976        else
4977          return super.addChild(name);
4978      }
4979
4980      public SetupActionComponent copy() {
4981        SetupActionComponent dst = new SetupActionComponent();
4982        copyValues(dst);
4983        dst.operation = operation == null ? null : operation.copy();
4984        dst.assert_ = assert_ == null ? null : assert_.copy();
4985        return dst;
4986      }
4987
4988      @Override
4989      public boolean equalsDeep(Base other_) {
4990        if (!super.equalsDeep(other_))
4991          return false;
4992        if (!(other_ instanceof SetupActionComponent))
4993          return false;
4994        SetupActionComponent o = (SetupActionComponent) other_;
4995        return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true);
4996      }
4997
4998      @Override
4999      public boolean equalsShallow(Base other_) {
5000        if (!super.equalsShallow(other_))
5001          return false;
5002        if (!(other_ instanceof SetupActionComponent))
5003          return false;
5004        SetupActionComponent o = (SetupActionComponent) other_;
5005        return true;
5006      }
5007
5008      public boolean isEmpty() {
5009        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation, assert_);
5010      }
5011
5012  public String fhirType() {
5013    return "TestScript.setup.action";
5014
5015  }
5016
5017  }
5018
5019    @Block()
5020    public static class SetupActionOperationComponent extends BackboneElement implements IBaseBackboneElement {
5021        /**
5022         * Server interaction or operation type.
5023         */
5024        @Child(name = "type", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=false)
5025        @Description(shortDefinition="The operation code type that will be executed", formalDefinition="Server interaction or operation type." )
5026        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-operation-codes")
5027        protected Coding type;
5028
5029        /**
5030         * The type of the resource.  See http://build.fhir.org/resourcelist.html.
5031         */
5032        @Child(name = "resource", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false)
5033        @Description(shortDefinition="Resource type", formalDefinition="The type of the resource.  See http://build.fhir.org/resourcelist.html." )
5034        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/defined-types")
5035        protected CodeType resource;
5036
5037        /**
5038         * The label would be used for tracking/logging purposes by test engines.
5039         */
5040        @Child(name = "label", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
5041        @Description(shortDefinition="Tracking/logging operation label", formalDefinition="The label would be used for tracking/logging purposes by test engines." )
5042        protected StringType label;
5043
5044        /**
5045         * The description would be used by test engines for tracking and reporting purposes.
5046         */
5047        @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
5048        @Description(shortDefinition="Tracking/reporting operation description", formalDefinition="The description would be used by test engines for tracking and reporting purposes." )
5049        protected StringType description;
5050
5051        /**
5052         * The mime-type to use for RESTful operation in the 'Accept' header.
5053         */
5054        @Child(name = "accept", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=false)
5055        @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." )
5056        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/mimetypes")
5057        protected CodeType accept;
5058
5059        /**
5060         * The mime-type to use for RESTful operation in the 'Content-Type' header.
5061         */
5062        @Child(name = "contentType", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false)
5063        @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." )
5064        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/mimetypes")
5065        protected CodeType contentType;
5066
5067        /**
5068         * The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.
5069         */
5070        @Child(name = "destination", type = {IntegerType.class}, order=7, min=0, max=1, modifier=false, summary=false)
5071        @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." )
5072        protected IntegerType destination;
5073
5074        /**
5075         * 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.
5076         */
5077        @Child(name = "encodeRequestUrl", type = {BooleanType.class}, order=8, min=1, max=1, modifier=false, summary=false)
5078        @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." )
5079        protected BooleanType encodeRequestUrl;
5080
5081        /**
5082         * The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.
5083         */
5084        @Child(name = "origin", type = {IntegerType.class}, order=9, min=0, max=1, modifier=false, summary=false)
5085        @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." )
5086        protected IntegerType origin;
5087
5088        /**
5089         * Path plus parameters after [type].  Used to set parts of the request URL explicitly.
5090         */
5091        @Child(name = "params", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false)
5092        @Description(shortDefinition="Explicitly defined path parameters", formalDefinition="Path plus parameters after [type].  Used to set parts of the request URL explicitly." )
5093        protected StringType params;
5094
5095        /**
5096         * Header elements would be used to set HTTP headers.
5097         */
5098        @Child(name = "requestHeader", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
5099        @Description(shortDefinition="Each operation can have one or more header elements", formalDefinition="Header elements would be used to set HTTP headers." )
5100        protected List<SetupActionOperationRequestHeaderComponent> requestHeader;
5101
5102        /**
5103         * The fixture id (maybe new) to map to the request.
5104         */
5105        @Child(name = "requestId", type = {IdType.class}, order=12, min=0, max=1, modifier=false, summary=false)
5106        @Description(shortDefinition="Fixture Id of mapped request", formalDefinition="The fixture id (maybe new) to map to the request." )
5107        protected IdType requestId;
5108
5109        /**
5110         * The fixture id (maybe new) to map to the response.
5111         */
5112        @Child(name = "responseId", type = {IdType.class}, order=13, min=0, max=1, modifier=false, summary=false)
5113        @Description(shortDefinition="Fixture Id of mapped response", formalDefinition="The fixture id (maybe new) to map to the response." )
5114        protected IdType responseId;
5115
5116        /**
5117         * The id of the fixture used as the body of a PUT or POST request.
5118         */
5119        @Child(name = "sourceId", type = {IdType.class}, order=14, min=0, max=1, modifier=false, summary=false)
5120        @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." )
5121        protected IdType sourceId;
5122
5123        /**
5124         * Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.
5125         */
5126        @Child(name = "targetId", type = {IdType.class}, order=15, min=0, max=1, modifier=false, summary=false)
5127        @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." )
5128        protected IdType targetId;
5129
5130        /**
5131         * Complete request URL.
5132         */
5133        @Child(name = "url", type = {StringType.class}, order=16, min=0, max=1, modifier=false, summary=false)
5134        @Description(shortDefinition="Request URL", formalDefinition="Complete request URL." )
5135        protected StringType url;
5136
5137        private static final long serialVersionUID = 1998717374L;
5138
5139    /**
5140     * Constructor
5141     */
5142      public SetupActionOperationComponent() {
5143        super();
5144      }
5145
5146    /**
5147     * Constructor
5148     */
5149      public SetupActionOperationComponent(BooleanType encodeRequestUrl) {
5150        super();
5151        this.encodeRequestUrl = encodeRequestUrl;
5152      }
5153
5154        /**
5155         * @return {@link #type} (Server interaction or operation type.)
5156         */
5157        public Coding getType() { 
5158          if (this.type == null)
5159            if (Configuration.errorOnAutoCreate())
5160              throw new Error("Attempt to auto-create SetupActionOperationComponent.type");
5161            else if (Configuration.doAutoCreate())
5162              this.type = new Coding(); // cc
5163          return this.type;
5164        }
5165
5166        public boolean hasType() { 
5167          return this.type != null && !this.type.isEmpty();
5168        }
5169
5170        /**
5171         * @param value {@link #type} (Server interaction or operation type.)
5172         */
5173        public SetupActionOperationComponent setType(Coding value) { 
5174          this.type = value;
5175          return this;
5176        }
5177
5178        /**
5179         * @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
5180         */
5181        public CodeType getResourceElement() { 
5182          if (this.resource == null)
5183            if (Configuration.errorOnAutoCreate())
5184              throw new Error("Attempt to auto-create SetupActionOperationComponent.resource");
5185            else if (Configuration.doAutoCreate())
5186              this.resource = new CodeType(); // bb
5187          return this.resource;
5188        }
5189
5190        public boolean hasResourceElement() { 
5191          return this.resource != null && !this.resource.isEmpty();
5192        }
5193
5194        public boolean hasResource() { 
5195          return this.resource != null && !this.resource.isEmpty();
5196        }
5197
5198        /**
5199         * @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
5200         */
5201        public SetupActionOperationComponent setResourceElement(CodeType value) { 
5202          this.resource = value;
5203          return this;
5204        }
5205
5206        /**
5207         * @return The type of the resource.  See http://build.fhir.org/resourcelist.html.
5208         */
5209        public String getResource() { 
5210          return this.resource == null ? null : this.resource.getValue();
5211        }
5212
5213        /**
5214         * @param value The type of the resource.  See http://build.fhir.org/resourcelist.html.
5215         */
5216        public SetupActionOperationComponent setResource(String value) { 
5217          if (Utilities.noString(value))
5218            this.resource = null;
5219          else {
5220            if (this.resource == null)
5221              this.resource = new CodeType();
5222            this.resource.setValue(value);
5223          }
5224          return this;
5225        }
5226
5227        /**
5228         * @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
5229         */
5230        public StringType getLabelElement() { 
5231          if (this.label == null)
5232            if (Configuration.errorOnAutoCreate())
5233              throw new Error("Attempt to auto-create SetupActionOperationComponent.label");
5234            else if (Configuration.doAutoCreate())
5235              this.label = new StringType(); // bb
5236          return this.label;
5237        }
5238
5239        public boolean hasLabelElement() { 
5240          return this.label != null && !this.label.isEmpty();
5241        }
5242
5243        public boolean hasLabel() { 
5244          return this.label != null && !this.label.isEmpty();
5245        }
5246
5247        /**
5248         * @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
5249         */
5250        public SetupActionOperationComponent setLabelElement(StringType value) { 
5251          this.label = value;
5252          return this;
5253        }
5254
5255        /**
5256         * @return The label would be used for tracking/logging purposes by test engines.
5257         */
5258        public String getLabel() { 
5259          return this.label == null ? null : this.label.getValue();
5260        }
5261
5262        /**
5263         * @param value The label would be used for tracking/logging purposes by test engines.
5264         */
5265        public SetupActionOperationComponent setLabel(String value) { 
5266          if (Utilities.noString(value))
5267            this.label = null;
5268          else {
5269            if (this.label == null)
5270              this.label = new StringType();
5271            this.label.setValue(value);
5272          }
5273          return this;
5274        }
5275
5276        /**
5277         * @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
5278         */
5279        public StringType getDescriptionElement() { 
5280          if (this.description == null)
5281            if (Configuration.errorOnAutoCreate())
5282              throw new Error("Attempt to auto-create SetupActionOperationComponent.description");
5283            else if (Configuration.doAutoCreate())
5284              this.description = new StringType(); // bb
5285          return this.description;
5286        }
5287
5288        public boolean hasDescriptionElement() { 
5289          return this.description != null && !this.description.isEmpty();
5290        }
5291
5292        public boolean hasDescription() { 
5293          return this.description != null && !this.description.isEmpty();
5294        }
5295
5296        /**
5297         * @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
5298         */
5299        public SetupActionOperationComponent setDescriptionElement(StringType value) { 
5300          this.description = value;
5301          return this;
5302        }
5303
5304        /**
5305         * @return The description would be used by test engines for tracking and reporting purposes.
5306         */
5307        public String getDescription() { 
5308          return this.description == null ? null : this.description.getValue();
5309        }
5310
5311        /**
5312         * @param value The description would be used by test engines for tracking and reporting purposes.
5313         */
5314        public SetupActionOperationComponent setDescription(String value) { 
5315          if (Utilities.noString(value))
5316            this.description = null;
5317          else {
5318            if (this.description == null)
5319              this.description = new StringType();
5320            this.description.setValue(value);
5321          }
5322          return this;
5323        }
5324
5325        /**
5326         * @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
5327         */
5328        public CodeType getAcceptElement() { 
5329          if (this.accept == null)
5330            if (Configuration.errorOnAutoCreate())
5331              throw new Error("Attempt to auto-create SetupActionOperationComponent.accept");
5332            else if (Configuration.doAutoCreate())
5333              this.accept = new CodeType(); // bb
5334          return this.accept;
5335        }
5336
5337        public boolean hasAcceptElement() { 
5338          return this.accept != null && !this.accept.isEmpty();
5339        }
5340
5341        public boolean hasAccept() { 
5342          return this.accept != null && !this.accept.isEmpty();
5343        }
5344
5345        /**
5346         * @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
5347         */
5348        public SetupActionOperationComponent setAcceptElement(CodeType value) { 
5349          this.accept = value;
5350          return this;
5351        }
5352
5353        /**
5354         * @return The mime-type to use for RESTful operation in the 'Accept' header.
5355         */
5356        public String getAccept() { 
5357          return this.accept == null ? null : this.accept.getValue();
5358        }
5359
5360        /**
5361         * @param value The mime-type to use for RESTful operation in the 'Accept' header.
5362         */
5363        public SetupActionOperationComponent setAccept(String value) { 
5364          if (Utilities.noString(value))
5365            this.accept = null;
5366          else {
5367            if (this.accept == null)
5368              this.accept = new CodeType();
5369            this.accept.setValue(value);
5370          }
5371          return this;
5372        }
5373
5374        /**
5375         * @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
5376         */
5377        public CodeType getContentTypeElement() { 
5378          if (this.contentType == null)
5379            if (Configuration.errorOnAutoCreate())
5380              throw new Error("Attempt to auto-create SetupActionOperationComponent.contentType");
5381            else if (Configuration.doAutoCreate())
5382              this.contentType = new CodeType(); // bb
5383          return this.contentType;
5384        }
5385
5386        public boolean hasContentTypeElement() { 
5387          return this.contentType != null && !this.contentType.isEmpty();
5388        }
5389
5390        public boolean hasContentType() { 
5391          return this.contentType != null && !this.contentType.isEmpty();
5392        }
5393
5394        /**
5395         * @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
5396         */
5397        public SetupActionOperationComponent setContentTypeElement(CodeType value) { 
5398          this.contentType = value;
5399          return this;
5400        }
5401
5402        /**
5403         * @return The mime-type to use for RESTful operation in the 'Content-Type' header.
5404         */
5405        public String getContentType() { 
5406          return this.contentType == null ? null : this.contentType.getValue();
5407        }
5408
5409        /**
5410         * @param value The mime-type to use for RESTful operation in the 'Content-Type' header.
5411         */
5412        public SetupActionOperationComponent setContentType(String value) { 
5413          if (Utilities.noString(value))
5414            this.contentType = null;
5415          else {
5416            if (this.contentType == null)
5417              this.contentType = new CodeType();
5418            this.contentType.setValue(value);
5419          }
5420          return this;
5421        }
5422
5423        /**
5424         * @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
5425         */
5426        public IntegerType getDestinationElement() { 
5427          if (this.destination == null)
5428            if (Configuration.errorOnAutoCreate())
5429              throw new Error("Attempt to auto-create SetupActionOperationComponent.destination");
5430            else if (Configuration.doAutoCreate())
5431              this.destination = new IntegerType(); // bb
5432          return this.destination;
5433        }
5434
5435        public boolean hasDestinationElement() { 
5436          return this.destination != null && !this.destination.isEmpty();
5437        }
5438
5439        public boolean hasDestination() { 
5440          return this.destination != null && !this.destination.isEmpty();
5441        }
5442
5443        /**
5444         * @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
5445         */
5446        public SetupActionOperationComponent setDestinationElement(IntegerType value) { 
5447          this.destination = value;
5448          return this;
5449        }
5450
5451        /**
5452         * @return The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.
5453         */
5454        public int getDestination() { 
5455          return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue();
5456        }
5457
5458        /**
5459         * @param value The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.
5460         */
5461        public SetupActionOperationComponent setDestination(int value) { 
5462            if (this.destination == null)
5463              this.destination = new IntegerType();
5464            this.destination.setValue(value);
5465          return this;
5466        }
5467
5468        /**
5469         * @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
5470         */
5471        public BooleanType getEncodeRequestUrlElement() { 
5472          if (this.encodeRequestUrl == null)
5473            if (Configuration.errorOnAutoCreate())
5474              throw new Error("Attempt to auto-create SetupActionOperationComponent.encodeRequestUrl");
5475            else if (Configuration.doAutoCreate())
5476              this.encodeRequestUrl = new BooleanType(); // bb
5477          return this.encodeRequestUrl;
5478        }
5479
5480        public boolean hasEncodeRequestUrlElement() { 
5481          return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty();
5482        }
5483
5484        public boolean hasEncodeRequestUrl() { 
5485          return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty();
5486        }
5487
5488        /**
5489         * @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
5490         */
5491        public SetupActionOperationComponent setEncodeRequestUrlElement(BooleanType value) { 
5492          this.encodeRequestUrl = value;
5493          return this;
5494        }
5495
5496        /**
5497         * @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.
5498         */
5499        public boolean getEncodeRequestUrl() { 
5500          return this.encodeRequestUrl == null || this.encodeRequestUrl.isEmpty() ? false : this.encodeRequestUrl.getValue();
5501        }
5502
5503        /**
5504         * @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.
5505         */
5506        public SetupActionOperationComponent setEncodeRequestUrl(boolean value) { 
5507            if (this.encodeRequestUrl == null)
5508              this.encodeRequestUrl = new BooleanType();
5509            this.encodeRequestUrl.setValue(value);
5510          return this;
5511        }
5512
5513        /**
5514         * @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
5515         */
5516        public IntegerType getOriginElement() { 
5517          if (this.origin == null)
5518            if (Configuration.errorOnAutoCreate())
5519              throw new Error("Attempt to auto-create SetupActionOperationComponent.origin");
5520            else if (Configuration.doAutoCreate())
5521              this.origin = new IntegerType(); // bb
5522          return this.origin;
5523        }
5524
5525        public boolean hasOriginElement() { 
5526          return this.origin != null && !this.origin.isEmpty();
5527        }
5528
5529        public boolean hasOrigin() { 
5530          return this.origin != null && !this.origin.isEmpty();
5531        }
5532
5533        /**
5534         * @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
5535         */
5536        public SetupActionOperationComponent setOriginElement(IntegerType value) { 
5537          this.origin = value;
5538          return this;
5539        }
5540
5541        /**
5542         * @return The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.
5543         */
5544        public int getOrigin() { 
5545          return this.origin == null || this.origin.isEmpty() ? 0 : this.origin.getValue();
5546        }
5547
5548        /**
5549         * @param value The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.
5550         */
5551        public SetupActionOperationComponent setOrigin(int value) { 
5552            if (this.origin == null)
5553              this.origin = new IntegerType();
5554            this.origin.setValue(value);
5555          return this;
5556        }
5557
5558        /**
5559         * @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
5560         */
5561        public StringType getParamsElement() { 
5562          if (this.params == null)
5563            if (Configuration.errorOnAutoCreate())
5564              throw new Error("Attempt to auto-create SetupActionOperationComponent.params");
5565            else if (Configuration.doAutoCreate())
5566              this.params = new StringType(); // bb
5567          return this.params;
5568        }
5569
5570        public boolean hasParamsElement() { 
5571          return this.params != null && !this.params.isEmpty();
5572        }
5573
5574        public boolean hasParams() { 
5575          return this.params != null && !this.params.isEmpty();
5576        }
5577
5578        /**
5579         * @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
5580         */
5581        public SetupActionOperationComponent setParamsElement(StringType value) { 
5582          this.params = value;
5583          return this;
5584        }
5585
5586        /**
5587         * @return Path plus parameters after [type].  Used to set parts of the request URL explicitly.
5588         */
5589        public String getParams() { 
5590          return this.params == null ? null : this.params.getValue();
5591        }
5592
5593        /**
5594         * @param value Path plus parameters after [type].  Used to set parts of the request URL explicitly.
5595         */
5596        public SetupActionOperationComponent setParams(String value) { 
5597          if (Utilities.noString(value))
5598            this.params = null;
5599          else {
5600            if (this.params == null)
5601              this.params = new StringType();
5602            this.params.setValue(value);
5603          }
5604          return this;
5605        }
5606
5607        /**
5608         * @return {@link #requestHeader} (Header elements would be used to set HTTP headers.)
5609         */
5610        public List<SetupActionOperationRequestHeaderComponent> getRequestHeader() { 
5611          if (this.requestHeader == null)
5612            this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
5613          return this.requestHeader;
5614        }
5615
5616        /**
5617         * @return Returns a reference to <code>this</code> for easy method chaining
5618         */
5619        public SetupActionOperationComponent setRequestHeader(List<SetupActionOperationRequestHeaderComponent> theRequestHeader) { 
5620          this.requestHeader = theRequestHeader;
5621          return this;
5622        }
5623
5624        public boolean hasRequestHeader() { 
5625          if (this.requestHeader == null)
5626            return false;
5627          for (SetupActionOperationRequestHeaderComponent item : this.requestHeader)
5628            if (!item.isEmpty())
5629              return true;
5630          return false;
5631        }
5632
5633        public SetupActionOperationRequestHeaderComponent addRequestHeader() { //3
5634          SetupActionOperationRequestHeaderComponent t = new SetupActionOperationRequestHeaderComponent();
5635          if (this.requestHeader == null)
5636            this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
5637          this.requestHeader.add(t);
5638          return t;
5639        }
5640
5641        public SetupActionOperationComponent addRequestHeader(SetupActionOperationRequestHeaderComponent t) { //3
5642          if (t == null)
5643            return this;
5644          if (this.requestHeader == null)
5645            this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
5646          this.requestHeader.add(t);
5647          return this;
5648        }
5649
5650        /**
5651         * @return The first repetition of repeating field {@link #requestHeader}, creating it if it does not already exist
5652         */
5653        public SetupActionOperationRequestHeaderComponent getRequestHeaderFirstRep() { 
5654          if (getRequestHeader().isEmpty()) {
5655            addRequestHeader();
5656          }
5657          return getRequestHeader().get(0);
5658        }
5659
5660        /**
5661         * @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
5662         */
5663        public IdType getRequestIdElement() { 
5664          if (this.requestId == null)
5665            if (Configuration.errorOnAutoCreate())
5666              throw new Error("Attempt to auto-create SetupActionOperationComponent.requestId");
5667            else if (Configuration.doAutoCreate())
5668              this.requestId = new IdType(); // bb
5669          return this.requestId;
5670        }
5671
5672        public boolean hasRequestIdElement() { 
5673          return this.requestId != null && !this.requestId.isEmpty();
5674        }
5675
5676        public boolean hasRequestId() { 
5677          return this.requestId != null && !this.requestId.isEmpty();
5678        }
5679
5680        /**
5681         * @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
5682         */
5683        public SetupActionOperationComponent setRequestIdElement(IdType value) { 
5684          this.requestId = value;
5685          return this;
5686        }
5687
5688        /**
5689         * @return The fixture id (maybe new) to map to the request.
5690         */
5691        public String getRequestId() { 
5692          return this.requestId == null ? null : this.requestId.getValue();
5693        }
5694
5695        /**
5696         * @param value The fixture id (maybe new) to map to the request.
5697         */
5698        public SetupActionOperationComponent setRequestId(String value) { 
5699          if (Utilities.noString(value))
5700            this.requestId = null;
5701          else {
5702            if (this.requestId == null)
5703              this.requestId = new IdType();
5704            this.requestId.setValue(value);
5705          }
5706          return this;
5707        }
5708
5709        /**
5710         * @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
5711         */
5712        public IdType getResponseIdElement() { 
5713          if (this.responseId == null)
5714            if (Configuration.errorOnAutoCreate())
5715              throw new Error("Attempt to auto-create SetupActionOperationComponent.responseId");
5716            else if (Configuration.doAutoCreate())
5717              this.responseId = new IdType(); // bb
5718          return this.responseId;
5719        }
5720
5721        public boolean hasResponseIdElement() { 
5722          return this.responseId != null && !this.responseId.isEmpty();
5723        }
5724
5725        public boolean hasResponseId() { 
5726          return this.responseId != null && !this.responseId.isEmpty();
5727        }
5728
5729        /**
5730         * @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
5731         */
5732        public SetupActionOperationComponent setResponseIdElement(IdType value) { 
5733          this.responseId = value;
5734          return this;
5735        }
5736
5737        /**
5738         * @return The fixture id (maybe new) to map to the response.
5739         */
5740        public String getResponseId() { 
5741          return this.responseId == null ? null : this.responseId.getValue();
5742        }
5743
5744        /**
5745         * @param value The fixture id (maybe new) to map to the response.
5746         */
5747        public SetupActionOperationComponent setResponseId(String value) { 
5748          if (Utilities.noString(value))
5749            this.responseId = null;
5750          else {
5751            if (this.responseId == null)
5752              this.responseId = new IdType();
5753            this.responseId.setValue(value);
5754          }
5755          return this;
5756        }
5757
5758        /**
5759         * @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
5760         */
5761        public IdType getSourceIdElement() { 
5762          if (this.sourceId == null)
5763            if (Configuration.errorOnAutoCreate())
5764              throw new Error("Attempt to auto-create SetupActionOperationComponent.sourceId");
5765            else if (Configuration.doAutoCreate())
5766              this.sourceId = new IdType(); // bb
5767          return this.sourceId;
5768        }
5769
5770        public boolean hasSourceIdElement() { 
5771          return this.sourceId != null && !this.sourceId.isEmpty();
5772        }
5773
5774        public boolean hasSourceId() { 
5775          return this.sourceId != null && !this.sourceId.isEmpty();
5776        }
5777
5778        /**
5779         * @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
5780         */
5781        public SetupActionOperationComponent setSourceIdElement(IdType value) { 
5782          this.sourceId = value;
5783          return this;
5784        }
5785
5786        /**
5787         * @return The id of the fixture used as the body of a PUT or POST request.
5788         */
5789        public String getSourceId() { 
5790          return this.sourceId == null ? null : this.sourceId.getValue();
5791        }
5792
5793        /**
5794         * @param value The id of the fixture used as the body of a PUT or POST request.
5795         */
5796        public SetupActionOperationComponent setSourceId(String value) { 
5797          if (Utilities.noString(value))
5798            this.sourceId = null;
5799          else {
5800            if (this.sourceId == null)
5801              this.sourceId = new IdType();
5802            this.sourceId.setValue(value);
5803          }
5804          return this;
5805        }
5806
5807        /**
5808         * @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
5809         */
5810        public IdType getTargetIdElement() { 
5811          if (this.targetId == null)
5812            if (Configuration.errorOnAutoCreate())
5813              throw new Error("Attempt to auto-create SetupActionOperationComponent.targetId");
5814            else if (Configuration.doAutoCreate())
5815              this.targetId = new IdType(); // bb
5816          return this.targetId;
5817        }
5818
5819        public boolean hasTargetIdElement() { 
5820          return this.targetId != null && !this.targetId.isEmpty();
5821        }
5822
5823        public boolean hasTargetId() { 
5824          return this.targetId != null && !this.targetId.isEmpty();
5825        }
5826
5827        /**
5828         * @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
5829         */
5830        public SetupActionOperationComponent setTargetIdElement(IdType value) { 
5831          this.targetId = value;
5832          return this;
5833        }
5834
5835        /**
5836         * @return Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.
5837         */
5838        public String getTargetId() { 
5839          return this.targetId == null ? null : this.targetId.getValue();
5840        }
5841
5842        /**
5843         * @param value Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.
5844         */
5845        public SetupActionOperationComponent setTargetId(String value) { 
5846          if (Utilities.noString(value))
5847            this.targetId = null;
5848          else {
5849            if (this.targetId == null)
5850              this.targetId = new IdType();
5851            this.targetId.setValue(value);
5852          }
5853          return this;
5854        }
5855
5856        /**
5857         * @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
5858         */
5859        public StringType getUrlElement() { 
5860          if (this.url == null)
5861            if (Configuration.errorOnAutoCreate())
5862              throw new Error("Attempt to auto-create SetupActionOperationComponent.url");
5863            else if (Configuration.doAutoCreate())
5864              this.url = new StringType(); // bb
5865          return this.url;
5866        }
5867
5868        public boolean hasUrlElement() { 
5869          return this.url != null && !this.url.isEmpty();
5870        }
5871
5872        public boolean hasUrl() { 
5873          return this.url != null && !this.url.isEmpty();
5874        }
5875
5876        /**
5877         * @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
5878         */
5879        public SetupActionOperationComponent setUrlElement(StringType value) { 
5880          this.url = value;
5881          return this;
5882        }
5883
5884        /**
5885         * @return Complete request URL.
5886         */
5887        public String getUrl() { 
5888          return this.url == null ? null : this.url.getValue();
5889        }
5890
5891        /**
5892         * @param value Complete request URL.
5893         */
5894        public SetupActionOperationComponent setUrl(String value) { 
5895          if (Utilities.noString(value))
5896            this.url = null;
5897          else {
5898            if (this.url == null)
5899              this.url = new StringType();
5900            this.url.setValue(value);
5901          }
5902          return this;
5903        }
5904
5905        protected void listChildren(List<Property> children) {
5906          super.listChildren(children);
5907          children.add(new Property("type", "Coding", "Server interaction or operation type.", 0, 1, type));
5908          children.add(new Property("resource", "code", "The type of the resource.  See http://build.fhir.org/resourcelist.html.", 0, 1, resource));
5909          children.add(new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label));
5910          children.add(new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description));
5911          children.add(new Property("accept", "code", "The mime-type to use for RESTful operation in the 'Accept' header.", 0, 1, accept));
5912          children.add(new Property("contentType", "code", "The mime-type to use for RESTful operation in the 'Content-Type' header.", 0, 1, contentType));
5913          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));
5914          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));
5915          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));
5916          children.add(new Property("params", "string", "Path plus parameters after [type].  Used to set parts of the request URL explicitly.", 0, 1, params));
5917          children.add(new Property("requestHeader", "", "Header elements would be used to set HTTP headers.", 0, java.lang.Integer.MAX_VALUE, requestHeader));
5918          children.add(new Property("requestId", "id", "The fixture id (maybe new) to map to the request.", 0, 1, requestId));
5919          children.add(new Property("responseId", "id", "The fixture id (maybe new) to map to the response.", 0, 1, responseId));
5920          children.add(new Property("sourceId", "id", "The id of the fixture used as the body of a PUT or POST request.", 0, 1, sourceId));
5921          children.add(new Property("targetId", "id", "Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.", 0, 1, targetId));
5922          children.add(new Property("url", "string", "Complete request URL.", 0, 1, url));
5923        }
5924
5925        @Override
5926        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
5927          switch (_hash) {
5928          case 3575610: /*type*/  return new Property("type", "Coding", "Server interaction or operation type.", 0, 1, type);
5929          case -341064690: /*resource*/  return new Property("resource", "code", "The type of the resource.  See http://build.fhir.org/resourcelist.html.", 0, 1, resource);
5930          case 102727412: /*label*/  return new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label);
5931          case -1724546052: /*description*/  return new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description);
5932          case -1423461112: /*accept*/  return new Property("accept", "code", "The mime-type to use for RESTful operation in the 'Accept' header.", 0, 1, accept);
5933          case -389131437: /*contentType*/  return new Property("contentType", "code", "The mime-type to use for RESTful operation in the 'Content-Type' header.", 0, 1, contentType);
5934          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);
5935          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);
5936          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);
5937          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);
5938          case 1074158076: /*requestHeader*/  return new Property("requestHeader", "", "Header elements would be used to set HTTP headers.", 0, java.lang.Integer.MAX_VALUE, requestHeader);
5939          case 693933066: /*requestId*/  return new Property("requestId", "id", "The fixture id (maybe new) to map to the request.", 0, 1, requestId);
5940          case -633138884: /*responseId*/  return new Property("responseId", "id", "The fixture id (maybe new) to map to the response.", 0, 1, responseId);
5941          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);
5942          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);
5943          case 116079: /*url*/  return new Property("url", "string", "Complete request URL.", 0, 1, url);
5944          default: return super.getNamedProperty(_hash, _name, _checkValid);
5945          }
5946
5947        }
5948
5949      @Override
5950      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
5951        switch (hash) {
5952        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding
5953        case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // CodeType
5954        case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType
5955        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
5956        case -1423461112: /*accept*/ return this.accept == null ? new Base[0] : new Base[] {this.accept}; // CodeType
5957        case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // CodeType
5958        case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // IntegerType
5959        case -1760554218: /*encodeRequestUrl*/ return this.encodeRequestUrl == null ? new Base[0] : new Base[] {this.encodeRequestUrl}; // BooleanType
5960        case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : new Base[] {this.origin}; // IntegerType
5961        case -995427962: /*params*/ return this.params == null ? new Base[0] : new Base[] {this.params}; // StringType
5962        case 1074158076: /*requestHeader*/ return this.requestHeader == null ? new Base[0] : this.requestHeader.toArray(new Base[this.requestHeader.size()]); // SetupActionOperationRequestHeaderComponent
5963        case 693933066: /*requestId*/ return this.requestId == null ? new Base[0] : new Base[] {this.requestId}; // IdType
5964        case -633138884: /*responseId*/ return this.responseId == null ? new Base[0] : new Base[] {this.responseId}; // IdType
5965        case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType
5966        case -441951604: /*targetId*/ return this.targetId == null ? new Base[0] : new Base[] {this.targetId}; // IdType
5967        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // StringType
5968        default: return super.getProperty(hash, name, checkValid);
5969        }
5970
5971      }
5972
5973      @Override
5974      public Base setProperty(int hash, String name, Base value) throws FHIRException {
5975        switch (hash) {
5976        case 3575610: // type
5977          this.type = castToCoding(value); // Coding
5978          return value;
5979        case -341064690: // resource
5980          this.resource = castToCode(value); // CodeType
5981          return value;
5982        case 102727412: // label
5983          this.label = castToString(value); // StringType
5984          return value;
5985        case -1724546052: // description
5986          this.description = castToString(value); // StringType
5987          return value;
5988        case -1423461112: // accept
5989          this.accept = castToCode(value); // CodeType
5990          return value;
5991        case -389131437: // contentType
5992          this.contentType = castToCode(value); // CodeType
5993          return value;
5994        case -1429847026: // destination
5995          this.destination = castToInteger(value); // IntegerType
5996          return value;
5997        case -1760554218: // encodeRequestUrl
5998          this.encodeRequestUrl = castToBoolean(value); // BooleanType
5999          return value;
6000        case -1008619738: // origin
6001          this.origin = castToInteger(value); // IntegerType
6002          return value;
6003        case -995427962: // params
6004          this.params = castToString(value); // StringType
6005          return value;
6006        case 1074158076: // requestHeader
6007          this.getRequestHeader().add((SetupActionOperationRequestHeaderComponent) value); // SetupActionOperationRequestHeaderComponent
6008          return value;
6009        case 693933066: // requestId
6010          this.requestId = castToId(value); // IdType
6011          return value;
6012        case -633138884: // responseId
6013          this.responseId = castToId(value); // IdType
6014          return value;
6015        case 1746327190: // sourceId
6016          this.sourceId = castToId(value); // IdType
6017          return value;
6018        case -441951604: // targetId
6019          this.targetId = castToId(value); // IdType
6020          return value;
6021        case 116079: // url
6022          this.url = castToString(value); // StringType
6023          return value;
6024        default: return super.setProperty(hash, name, value);
6025        }
6026
6027      }
6028
6029      @Override
6030      public Base setProperty(String name, Base value) throws FHIRException {
6031        if (name.equals("type")) {
6032          this.type = castToCoding(value); // Coding
6033        } else if (name.equals("resource")) {
6034          this.resource = castToCode(value); // CodeType
6035        } else if (name.equals("label")) {
6036          this.label = castToString(value); // StringType
6037        } else if (name.equals("description")) {
6038          this.description = castToString(value); // StringType
6039        } else if (name.equals("accept")) {
6040          this.accept = castToCode(value); // CodeType
6041        } else if (name.equals("contentType")) {
6042          this.contentType = castToCode(value); // CodeType
6043        } else if (name.equals("destination")) {
6044          this.destination = castToInteger(value); // IntegerType
6045        } else if (name.equals("encodeRequestUrl")) {
6046          this.encodeRequestUrl = castToBoolean(value); // BooleanType
6047        } else if (name.equals("origin")) {
6048          this.origin = castToInteger(value); // IntegerType
6049        } else if (name.equals("params")) {
6050          this.params = castToString(value); // StringType
6051        } else if (name.equals("requestHeader")) {
6052          this.getRequestHeader().add((SetupActionOperationRequestHeaderComponent) value);
6053        } else if (name.equals("requestId")) {
6054          this.requestId = castToId(value); // IdType
6055        } else if (name.equals("responseId")) {
6056          this.responseId = castToId(value); // IdType
6057        } else if (name.equals("sourceId")) {
6058          this.sourceId = castToId(value); // IdType
6059        } else if (name.equals("targetId")) {
6060          this.targetId = castToId(value); // IdType
6061        } else if (name.equals("url")) {
6062          this.url = castToString(value); // StringType
6063        } else
6064          return super.setProperty(name, value);
6065        return value;
6066      }
6067
6068      @Override
6069      public Base makeProperty(int hash, String name) throws FHIRException {
6070        switch (hash) {
6071        case 3575610:  return getType(); 
6072        case -341064690:  return getResourceElement();
6073        case 102727412:  return getLabelElement();
6074        case -1724546052:  return getDescriptionElement();
6075        case -1423461112:  return getAcceptElement();
6076        case -389131437:  return getContentTypeElement();
6077        case -1429847026:  return getDestinationElement();
6078        case -1760554218:  return getEncodeRequestUrlElement();
6079        case -1008619738:  return getOriginElement();
6080        case -995427962:  return getParamsElement();
6081        case 1074158076:  return addRequestHeader(); 
6082        case 693933066:  return getRequestIdElement();
6083        case -633138884:  return getResponseIdElement();
6084        case 1746327190:  return getSourceIdElement();
6085        case -441951604:  return getTargetIdElement();
6086        case 116079:  return getUrlElement();
6087        default: return super.makeProperty(hash, name);
6088        }
6089
6090      }
6091
6092      @Override
6093      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
6094        switch (hash) {
6095        case 3575610: /*type*/ return new String[] {"Coding"};
6096        case -341064690: /*resource*/ return new String[] {"code"};
6097        case 102727412: /*label*/ return new String[] {"string"};
6098        case -1724546052: /*description*/ return new String[] {"string"};
6099        case -1423461112: /*accept*/ return new String[] {"code"};
6100        case -389131437: /*contentType*/ return new String[] {"code"};
6101        case -1429847026: /*destination*/ return new String[] {"integer"};
6102        case -1760554218: /*encodeRequestUrl*/ return new String[] {"boolean"};
6103        case -1008619738: /*origin*/ return new String[] {"integer"};
6104        case -995427962: /*params*/ return new String[] {"string"};
6105        case 1074158076: /*requestHeader*/ return new String[] {};
6106        case 693933066: /*requestId*/ return new String[] {"id"};
6107        case -633138884: /*responseId*/ return new String[] {"id"};
6108        case 1746327190: /*sourceId*/ return new String[] {"id"};
6109        case -441951604: /*targetId*/ return new String[] {"id"};
6110        case 116079: /*url*/ return new String[] {"string"};
6111        default: return super.getTypesForProperty(hash, name);
6112        }
6113
6114      }
6115
6116      @Override
6117      public Base addChild(String name) throws FHIRException {
6118        if (name.equals("type")) {
6119          this.type = new Coding();
6120          return this.type;
6121        }
6122        else if (name.equals("resource")) {
6123          throw new FHIRException("Cannot call addChild on a primitive type TestScript.resource");
6124        }
6125        else if (name.equals("label")) {
6126          throw new FHIRException("Cannot call addChild on a primitive type TestScript.label");
6127        }
6128        else if (name.equals("description")) {
6129          throw new FHIRException("Cannot call addChild on a primitive type TestScript.description");
6130        }
6131        else if (name.equals("accept")) {
6132          throw new FHIRException("Cannot call addChild on a primitive type TestScript.accept");
6133        }
6134        else if (name.equals("contentType")) {
6135          throw new FHIRException("Cannot call addChild on a primitive type TestScript.contentType");
6136        }
6137        else if (name.equals("destination")) {
6138          throw new FHIRException("Cannot call addChild on a primitive type TestScript.destination");
6139        }
6140        else if (name.equals("encodeRequestUrl")) {
6141          throw new FHIRException("Cannot call addChild on a primitive type TestScript.encodeRequestUrl");
6142        }
6143        else if (name.equals("origin")) {
6144          throw new FHIRException("Cannot call addChild on a primitive type TestScript.origin");
6145        }
6146        else if (name.equals("params")) {
6147          throw new FHIRException("Cannot call addChild on a primitive type TestScript.params");
6148        }
6149        else if (name.equals("requestHeader")) {
6150          return addRequestHeader();
6151        }
6152        else if (name.equals("requestId")) {
6153          throw new FHIRException("Cannot call addChild on a primitive type TestScript.requestId");
6154        }
6155        else if (name.equals("responseId")) {
6156          throw new FHIRException("Cannot call addChild on a primitive type TestScript.responseId");
6157        }
6158        else if (name.equals("sourceId")) {
6159          throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId");
6160        }
6161        else if (name.equals("targetId")) {
6162          throw new FHIRException("Cannot call addChild on a primitive type TestScript.targetId");
6163        }
6164        else if (name.equals("url")) {
6165          throw new FHIRException("Cannot call addChild on a primitive type TestScript.url");
6166        }
6167        else
6168          return super.addChild(name);
6169      }
6170
6171      public SetupActionOperationComponent copy() {
6172        SetupActionOperationComponent dst = new SetupActionOperationComponent();
6173        copyValues(dst);
6174        dst.type = type == null ? null : type.copy();
6175        dst.resource = resource == null ? null : resource.copy();
6176        dst.label = label == null ? null : label.copy();
6177        dst.description = description == null ? null : description.copy();
6178        dst.accept = accept == null ? null : accept.copy();
6179        dst.contentType = contentType == null ? null : contentType.copy();
6180        dst.destination = destination == null ? null : destination.copy();
6181        dst.encodeRequestUrl = encodeRequestUrl == null ? null : encodeRequestUrl.copy();
6182        dst.origin = origin == null ? null : origin.copy();
6183        dst.params = params == null ? null : params.copy();
6184        if (requestHeader != null) {
6185          dst.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
6186          for (SetupActionOperationRequestHeaderComponent i : requestHeader)
6187            dst.requestHeader.add(i.copy());
6188        };
6189        dst.requestId = requestId == null ? null : requestId.copy();
6190        dst.responseId = responseId == null ? null : responseId.copy();
6191        dst.sourceId = sourceId == null ? null : sourceId.copy();
6192        dst.targetId = targetId == null ? null : targetId.copy();
6193        dst.url = url == null ? null : url.copy();
6194        return dst;
6195      }
6196
6197      @Override
6198      public boolean equalsDeep(Base other_) {
6199        if (!super.equalsDeep(other_))
6200          return false;
6201        if (!(other_ instanceof SetupActionOperationComponent))
6202          return false;
6203        SetupActionOperationComponent o = (SetupActionOperationComponent) other_;
6204        return compareDeep(type, o.type, true) && compareDeep(resource, o.resource, true) && compareDeep(label, o.label, true)
6205           && compareDeep(description, o.description, true) && compareDeep(accept, o.accept, true) && compareDeep(contentType, o.contentType, true)
6206           && compareDeep(destination, o.destination, true) && compareDeep(encodeRequestUrl, o.encodeRequestUrl, true)
6207           && compareDeep(origin, o.origin, true) && compareDeep(params, o.params, true) && compareDeep(requestHeader, o.requestHeader, true)
6208           && compareDeep(requestId, o.requestId, true) && compareDeep(responseId, o.responseId, true) && compareDeep(sourceId, o.sourceId, true)
6209           && compareDeep(targetId, o.targetId, true) && compareDeep(url, o.url, true);
6210      }
6211
6212      @Override
6213      public boolean equalsShallow(Base other_) {
6214        if (!super.equalsShallow(other_))
6215          return false;
6216        if (!(other_ instanceof SetupActionOperationComponent))
6217          return false;
6218        SetupActionOperationComponent o = (SetupActionOperationComponent) other_;
6219        return compareValues(resource, o.resource, true) && compareValues(label, o.label, true) && compareValues(description, o.description, true)
6220           && compareValues(accept, o.accept, true) && compareValues(contentType, o.contentType, true) && compareValues(destination, o.destination, true)
6221           && compareValues(encodeRequestUrl, o.encodeRequestUrl, true) && compareValues(origin, o.origin, true)
6222           && compareValues(params, o.params, true) && compareValues(requestId, o.requestId, true) && compareValues(responseId, o.responseId, true)
6223           && compareValues(sourceId, o.sourceId, true) && compareValues(targetId, o.targetId, true) && compareValues(url, o.url, true)
6224          ;
6225      }
6226
6227      public boolean isEmpty() {
6228        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, resource, label, description
6229          , accept, contentType, destination, encodeRequestUrl, origin, params, requestHeader
6230          , requestId, responseId, sourceId, targetId, url);
6231      }
6232
6233  public String fhirType() {
6234    return "TestScript.setup.action.operation";
6235
6236  }
6237
6238  }
6239
6240    @Block()
6241    public static class SetupActionOperationRequestHeaderComponent extends BackboneElement implements IBaseBackboneElement {
6242        /**
6243         * The HTTP header field e.g. "Accept".
6244         */
6245        @Child(name = "field", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
6246        @Description(shortDefinition="HTTP header field name", formalDefinition="The HTTP header field e.g. \"Accept\"." )
6247        protected StringType field;
6248
6249        /**
6250         * The value of the header e.g. "application/fhir+xml".
6251         */
6252        @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false)
6253        @Description(shortDefinition="HTTP headerfield value", formalDefinition="The value of the header e.g. \"application/fhir+xml\"." )
6254        protected StringType value;
6255
6256        private static final long serialVersionUID = 274395337L;
6257
6258    /**
6259     * Constructor
6260     */
6261      public SetupActionOperationRequestHeaderComponent() {
6262        super();
6263      }
6264
6265    /**
6266     * Constructor
6267     */
6268      public SetupActionOperationRequestHeaderComponent(StringType field, StringType value) {
6269        super();
6270        this.field = field;
6271        this.value = value;
6272      }
6273
6274        /**
6275         * @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
6276         */
6277        public StringType getFieldElement() { 
6278          if (this.field == null)
6279            if (Configuration.errorOnAutoCreate())
6280              throw new Error("Attempt to auto-create SetupActionOperationRequestHeaderComponent.field");
6281            else if (Configuration.doAutoCreate())
6282              this.field = new StringType(); // bb
6283          return this.field;
6284        }
6285
6286        public boolean hasFieldElement() { 
6287          return this.field != null && !this.field.isEmpty();
6288        }
6289
6290        public boolean hasField() { 
6291          return this.field != null && !this.field.isEmpty();
6292        }
6293
6294        /**
6295         * @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
6296         */
6297        public SetupActionOperationRequestHeaderComponent setFieldElement(StringType value) { 
6298          this.field = value;
6299          return this;
6300        }
6301
6302        /**
6303         * @return The HTTP header field e.g. "Accept".
6304         */
6305        public String getField() { 
6306          return this.field == null ? null : this.field.getValue();
6307        }
6308
6309        /**
6310         * @param value The HTTP header field e.g. "Accept".
6311         */
6312        public SetupActionOperationRequestHeaderComponent setField(String value) { 
6313            if (this.field == null)
6314              this.field = new StringType();
6315            this.field.setValue(value);
6316          return this;
6317        }
6318
6319        /**
6320         * @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
6321         */
6322        public StringType getValueElement() { 
6323          if (this.value == null)
6324            if (Configuration.errorOnAutoCreate())
6325              throw new Error("Attempt to auto-create SetupActionOperationRequestHeaderComponent.value");
6326            else if (Configuration.doAutoCreate())
6327              this.value = new StringType(); // bb
6328          return this.value;
6329        }
6330
6331        public boolean hasValueElement() { 
6332          return this.value != null && !this.value.isEmpty();
6333        }
6334
6335        public boolean hasValue() { 
6336          return this.value != null && !this.value.isEmpty();
6337        }
6338
6339        /**
6340         * @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
6341         */
6342        public SetupActionOperationRequestHeaderComponent setValueElement(StringType value) { 
6343          this.value = value;
6344          return this;
6345        }
6346
6347        /**
6348         * @return The value of the header e.g. "application/fhir+xml".
6349         */
6350        public String getValue() { 
6351          return this.value == null ? null : this.value.getValue();
6352        }
6353
6354        /**
6355         * @param value The value of the header e.g. "application/fhir+xml".
6356         */
6357        public SetupActionOperationRequestHeaderComponent setValue(String value) { 
6358            if (this.value == null)
6359              this.value = new StringType();
6360            this.value.setValue(value);
6361          return this;
6362        }
6363
6364        protected void listChildren(List<Property> children) {
6365          super.listChildren(children);
6366          children.add(new Property("field", "string", "The HTTP header field e.g. \"Accept\".", 0, 1, field));
6367          children.add(new Property("value", "string", "The value of the header e.g. \"application/fhir+xml\".", 0, 1, value));
6368        }
6369
6370        @Override
6371        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
6372          switch (_hash) {
6373          case 97427706: /*field*/  return new Property("field", "string", "The HTTP header field e.g. \"Accept\".", 0, 1, field);
6374          case 111972721: /*value*/  return new Property("value", "string", "The value of the header e.g. \"application/fhir+xml\".", 0, 1, value);
6375          default: return super.getNamedProperty(_hash, _name, _checkValid);
6376          }
6377
6378        }
6379
6380      @Override
6381      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
6382        switch (hash) {
6383        case 97427706: /*field*/ return this.field == null ? new Base[0] : new Base[] {this.field}; // StringType
6384        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType
6385        default: return super.getProperty(hash, name, checkValid);
6386        }
6387
6388      }
6389
6390      @Override
6391      public Base setProperty(int hash, String name, Base value) throws FHIRException {
6392        switch (hash) {
6393        case 97427706: // field
6394          this.field = castToString(value); // StringType
6395          return value;
6396        case 111972721: // value
6397          this.value = castToString(value); // StringType
6398          return value;
6399        default: return super.setProperty(hash, name, value);
6400        }
6401
6402      }
6403
6404      @Override
6405      public Base setProperty(String name, Base value) throws FHIRException {
6406        if (name.equals("field")) {
6407          this.field = castToString(value); // StringType
6408        } else if (name.equals("value")) {
6409          this.value = castToString(value); // StringType
6410        } else
6411          return super.setProperty(name, value);
6412        return value;
6413      }
6414
6415      @Override
6416      public Base makeProperty(int hash, String name) throws FHIRException {
6417        switch (hash) {
6418        case 97427706:  return getFieldElement();
6419        case 111972721:  return getValueElement();
6420        default: return super.makeProperty(hash, name);
6421        }
6422
6423      }
6424
6425      @Override
6426      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
6427        switch (hash) {
6428        case 97427706: /*field*/ return new String[] {"string"};
6429        case 111972721: /*value*/ return new String[] {"string"};
6430        default: return super.getTypesForProperty(hash, name);
6431        }
6432
6433      }
6434
6435      @Override
6436      public Base addChild(String name) throws FHIRException {
6437        if (name.equals("field")) {
6438          throw new FHIRException("Cannot call addChild on a primitive type TestScript.field");
6439        }
6440        else if (name.equals("value")) {
6441          throw new FHIRException("Cannot call addChild on a primitive type TestScript.value");
6442        }
6443        else
6444          return super.addChild(name);
6445      }
6446
6447      public SetupActionOperationRequestHeaderComponent copy() {
6448        SetupActionOperationRequestHeaderComponent dst = new SetupActionOperationRequestHeaderComponent();
6449        copyValues(dst);
6450        dst.field = field == null ? null : field.copy();
6451        dst.value = value == null ? null : value.copy();
6452        return dst;
6453      }
6454
6455      @Override
6456      public boolean equalsDeep(Base other_) {
6457        if (!super.equalsDeep(other_))
6458          return false;
6459        if (!(other_ instanceof SetupActionOperationRequestHeaderComponent))
6460          return false;
6461        SetupActionOperationRequestHeaderComponent o = (SetupActionOperationRequestHeaderComponent) other_;
6462        return compareDeep(field, o.field, true) && compareDeep(value, o.value, true);
6463      }
6464
6465      @Override
6466      public boolean equalsShallow(Base other_) {
6467        if (!super.equalsShallow(other_))
6468          return false;
6469        if (!(other_ instanceof SetupActionOperationRequestHeaderComponent))
6470          return false;
6471        SetupActionOperationRequestHeaderComponent o = (SetupActionOperationRequestHeaderComponent) other_;
6472        return compareValues(field, o.field, true) && compareValues(value, o.value, true);
6473      }
6474
6475      public boolean isEmpty() {
6476        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(field, value);
6477      }
6478
6479  public String fhirType() {
6480    return "TestScript.setup.action.operation.requestHeader";
6481
6482  }
6483
6484  }
6485
6486    @Block()
6487    public static class SetupActionAssertComponent extends BackboneElement implements IBaseBackboneElement {
6488        /**
6489         * The label would be used for tracking/logging purposes by test engines.
6490         */
6491        @Child(name = "label", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
6492        @Description(shortDefinition="Tracking/logging assertion label", formalDefinition="The label would be used for tracking/logging purposes by test engines." )
6493        protected StringType label;
6494
6495        /**
6496         * The description would be used by test engines for tracking and reporting purposes.
6497         */
6498        @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
6499        @Description(shortDefinition="Tracking/reporting assertion description", formalDefinition="The description would be used by test engines for tracking and reporting purposes." )
6500        protected StringType description;
6501
6502        /**
6503         * The direction to use for the assertion.
6504         */
6505        @Child(name = "direction", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=false)
6506        @Description(shortDefinition="response | request", formalDefinition="The direction to use for the assertion." )
6507        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/assert-direction-codes")
6508        protected Enumeration<AssertionDirectionType> direction;
6509
6510        /**
6511         * Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition.
6512         */
6513        @Child(name = "compareToSourceId", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
6514        @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." )
6515        protected StringType compareToSourceId;
6516
6517        /**
6518         * The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.
6519         */
6520        @Child(name = "compareToSourceExpression", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
6521        @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." )
6522        protected StringType compareToSourceExpression;
6523
6524        /**
6525         * XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.
6526         */
6527        @Child(name = "compareToSourcePath", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false)
6528        @Description(shortDefinition="XPath or JSONPath expression to evaluate against the source fixture", formalDefinition="XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both." )
6529        protected StringType compareToSourcePath;
6530
6531        /**
6532         * The mime-type contents to compare against the request or response message 'Content-Type' header.
6533         */
6534        @Child(name = "contentType", type = {CodeType.class}, order=7, min=0, max=1, modifier=false, summary=false)
6535        @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." )
6536        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/mimetypes")
6537        protected CodeType contentType;
6538
6539        /**
6540         * The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.
6541         */
6542        @Child(name = "expression", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false)
6543        @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." )
6544        protected StringType expression;
6545
6546        /**
6547         * The HTTP header field name e.g. 'Location'.
6548         */
6549        @Child(name = "headerField", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false)
6550        @Description(shortDefinition="HTTP header field name", formalDefinition="The HTTP header field name e.g. 'Location'." )
6551        protected StringType headerField;
6552
6553        /**
6554         * The ID of a fixture.  Asserts that the response contains at a minimum the fixture specified by minimumId.
6555         */
6556        @Child(name = "minimumId", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false)
6557        @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." )
6558        protected StringType minimumId;
6559
6560        /**
6561         * Whether or not the test execution performs validation on the bundle navigation links.
6562         */
6563        @Child(name = "navigationLinks", type = {BooleanType.class}, order=11, min=0, max=1, modifier=false, summary=false)
6564        @Description(shortDefinition="Perform validation on navigation links?", formalDefinition="Whether or not the test execution performs validation on the bundle navigation links." )
6565        protected BooleanType navigationLinks;
6566
6567        /**
6568         * The operator type defines the conditional behavior of the assert. If not defined, the default is equals.
6569         */
6570        @Child(name = "operator", type = {CodeType.class}, order=12, min=0, max=1, modifier=false, summary=false)
6571        @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." )
6572        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/assert-operator-codes")
6573        protected Enumeration<AssertionOperatorType> operator;
6574
6575        /**
6576         * The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.
6577         */
6578        @Child(name = "path", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=false)
6579        @Description(shortDefinition="XPath or JSONPath expression", formalDefinition="The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server." )
6580        protected StringType path;
6581
6582        /**
6583         * The request method or HTTP operation code to compare against that used by the client system under test.
6584         */
6585        @Child(name = "requestMethod", type = {CodeType.class}, order=14, min=0, max=1, modifier=false, summary=false)
6586        @Description(shortDefinition="delete | get | options | patch | post | put", formalDefinition="The request method or HTTP operation code to compare against that used by the client system under test." )
6587        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/http-operations")
6588        protected Enumeration<TestScriptRequestMethodCode> requestMethod;
6589
6590        /**
6591         * The value to use in a comparison against the request URL path string.
6592         */
6593        @Child(name = "requestURL", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=false)
6594        @Description(shortDefinition="Request URL comparison value", formalDefinition="The value to use in a comparison against the request URL path string." )
6595        protected StringType requestURL;
6596
6597        /**
6598         * The type of the resource.  See http://build.fhir.org/resourcelist.html.
6599         */
6600        @Child(name = "resource", type = {CodeType.class}, order=16, min=0, max=1, modifier=false, summary=false)
6601        @Description(shortDefinition="Resource type", formalDefinition="The type of the resource.  See http://build.fhir.org/resourcelist.html." )
6602        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/defined-types")
6603        protected CodeType resource;
6604
6605        /**
6606         * okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.
6607         */
6608        @Child(name = "response", type = {CodeType.class}, order=17, min=0, max=1, modifier=false, summary=false)
6609        @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." )
6610        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/assert-response-code-types")
6611        protected Enumeration<AssertionResponseTypes> response;
6612
6613        /**
6614         * The value of the HTTP response code to be tested.
6615         */
6616        @Child(name = "responseCode", type = {StringType.class}, order=18, min=0, max=1, modifier=false, summary=false)
6617        @Description(shortDefinition="HTTP response code to test", formalDefinition="The value of the HTTP response code to be tested." )
6618        protected StringType responseCode;
6619
6620        /**
6621         * The TestScript.rule this assert will evaluate.
6622         */
6623        @Child(name = "rule", type = {}, order=19, min=0, max=1, modifier=false, summary=false)
6624        @Description(shortDefinition="The reference to a TestScript.rule", formalDefinition="The TestScript.rule this assert will evaluate." )
6625        protected ActionAssertRuleComponent rule;
6626
6627        /**
6628         * The TestScript.ruleset this assert will evaluate.
6629         */
6630        @Child(name = "ruleset", type = {}, order=20, min=0, max=1, modifier=false, summary=false)
6631        @Description(shortDefinition="The reference to a TestScript.ruleset", formalDefinition="The TestScript.ruleset this assert will evaluate." )
6632        protected ActionAssertRulesetComponent ruleset;
6633
6634        /**
6635         * Fixture to evaluate the XPath/JSONPath expression or the headerField  against.
6636         */
6637        @Child(name = "sourceId", type = {IdType.class}, order=21, min=0, max=1, modifier=false, summary=false)
6638        @Description(shortDefinition="Fixture Id of source expression or headerField", formalDefinition="Fixture to evaluate the XPath/JSONPath expression or the headerField  against." )
6639        protected IdType sourceId;
6640
6641        /**
6642         * The ID of the Profile to validate against.
6643         */
6644        @Child(name = "validateProfileId", type = {IdType.class}, order=22, min=0, max=1, modifier=false, summary=false)
6645        @Description(shortDefinition="Profile Id of validation profile reference", formalDefinition="The ID of the Profile to validate against." )
6646        protected IdType validateProfileId;
6647
6648        /**
6649         * The value to compare to.
6650         */
6651        @Child(name = "value", type = {StringType.class}, order=23, min=0, max=1, modifier=false, summary=false)
6652        @Description(shortDefinition="The value to compare to", formalDefinition="The value to compare to." )
6653        protected StringType value;
6654
6655        /**
6656         * Whether or not the test execution will produce a warning only on error for this assert.
6657         */
6658        @Child(name = "warningOnly", type = {BooleanType.class}, order=24, min=1, max=1, modifier=false, summary=false)
6659        @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." )
6660        protected BooleanType warningOnly;
6661
6662        private static final long serialVersionUID = -483432060L;
6663
6664    /**
6665     * Constructor
6666     */
6667      public SetupActionAssertComponent() {
6668        super();
6669      }
6670
6671    /**
6672     * Constructor
6673     */
6674      public SetupActionAssertComponent(BooleanType warningOnly) {
6675        super();
6676        this.warningOnly = warningOnly;
6677      }
6678
6679        /**
6680         * @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
6681         */
6682        public StringType getLabelElement() { 
6683          if (this.label == null)
6684            if (Configuration.errorOnAutoCreate())
6685              throw new Error("Attempt to auto-create SetupActionAssertComponent.label");
6686            else if (Configuration.doAutoCreate())
6687              this.label = new StringType(); // bb
6688          return this.label;
6689        }
6690
6691        public boolean hasLabelElement() { 
6692          return this.label != null && !this.label.isEmpty();
6693        }
6694
6695        public boolean hasLabel() { 
6696          return this.label != null && !this.label.isEmpty();
6697        }
6698
6699        /**
6700         * @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
6701         */
6702        public SetupActionAssertComponent setLabelElement(StringType value) { 
6703          this.label = value;
6704          return this;
6705        }
6706
6707        /**
6708         * @return The label would be used for tracking/logging purposes by test engines.
6709         */
6710        public String getLabel() { 
6711          return this.label == null ? null : this.label.getValue();
6712        }
6713
6714        /**
6715         * @param value The label would be used for tracking/logging purposes by test engines.
6716         */
6717        public SetupActionAssertComponent setLabel(String value) { 
6718          if (Utilities.noString(value))
6719            this.label = null;
6720          else {
6721            if (this.label == null)
6722              this.label = new StringType();
6723            this.label.setValue(value);
6724          }
6725          return this;
6726        }
6727
6728        /**
6729         * @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
6730         */
6731        public StringType getDescriptionElement() { 
6732          if (this.description == null)
6733            if (Configuration.errorOnAutoCreate())
6734              throw new Error("Attempt to auto-create SetupActionAssertComponent.description");
6735            else if (Configuration.doAutoCreate())
6736              this.description = new StringType(); // bb
6737          return this.description;
6738        }
6739
6740        public boolean hasDescriptionElement() { 
6741          return this.description != null && !this.description.isEmpty();
6742        }
6743
6744        public boolean hasDescription() { 
6745          return this.description != null && !this.description.isEmpty();
6746        }
6747
6748        /**
6749         * @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
6750         */
6751        public SetupActionAssertComponent setDescriptionElement(StringType value) { 
6752          this.description = value;
6753          return this;
6754        }
6755
6756        /**
6757         * @return The description would be used by test engines for tracking and reporting purposes.
6758         */
6759        public String getDescription() { 
6760          return this.description == null ? null : this.description.getValue();
6761        }
6762
6763        /**
6764         * @param value The description would be used by test engines for tracking and reporting purposes.
6765         */
6766        public SetupActionAssertComponent setDescription(String value) { 
6767          if (Utilities.noString(value))
6768            this.description = null;
6769          else {
6770            if (this.description == null)
6771              this.description = new StringType();
6772            this.description.setValue(value);
6773          }
6774          return this;
6775        }
6776
6777        /**
6778         * @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
6779         */
6780        public Enumeration<AssertionDirectionType> getDirectionElement() { 
6781          if (this.direction == null)
6782            if (Configuration.errorOnAutoCreate())
6783              throw new Error("Attempt to auto-create SetupActionAssertComponent.direction");
6784            else if (Configuration.doAutoCreate())
6785              this.direction = new Enumeration<AssertionDirectionType>(new AssertionDirectionTypeEnumFactory()); // bb
6786          return this.direction;
6787        }
6788
6789        public boolean hasDirectionElement() { 
6790          return this.direction != null && !this.direction.isEmpty();
6791        }
6792
6793        public boolean hasDirection() { 
6794          return this.direction != null && !this.direction.isEmpty();
6795        }
6796
6797        /**
6798         * @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
6799         */
6800        public SetupActionAssertComponent setDirectionElement(Enumeration<AssertionDirectionType> value) { 
6801          this.direction = value;
6802          return this;
6803        }
6804
6805        /**
6806         * @return The direction to use for the assertion.
6807         */
6808        public AssertionDirectionType getDirection() { 
6809          return this.direction == null ? null : this.direction.getValue();
6810        }
6811
6812        /**
6813         * @param value The direction to use for the assertion.
6814         */
6815        public SetupActionAssertComponent setDirection(AssertionDirectionType value) { 
6816          if (value == null)
6817            this.direction = null;
6818          else {
6819            if (this.direction == null)
6820              this.direction = new Enumeration<AssertionDirectionType>(new AssertionDirectionTypeEnumFactory());
6821            this.direction.setValue(value);
6822          }
6823          return this;
6824        }
6825
6826        /**
6827         * @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
6828         */
6829        public StringType getCompareToSourceIdElement() { 
6830          if (this.compareToSourceId == null)
6831            if (Configuration.errorOnAutoCreate())
6832              throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourceId");
6833            else if (Configuration.doAutoCreate())
6834              this.compareToSourceId = new StringType(); // bb
6835          return this.compareToSourceId;
6836        }
6837
6838        public boolean hasCompareToSourceIdElement() { 
6839          return this.compareToSourceId != null && !this.compareToSourceId.isEmpty();
6840        }
6841
6842        public boolean hasCompareToSourceId() { 
6843          return this.compareToSourceId != null && !this.compareToSourceId.isEmpty();
6844        }
6845
6846        /**
6847         * @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
6848         */
6849        public SetupActionAssertComponent setCompareToSourceIdElement(StringType value) { 
6850          this.compareToSourceId = value;
6851          return this;
6852        }
6853
6854        /**
6855         * @return Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition.
6856         */
6857        public String getCompareToSourceId() { 
6858          return this.compareToSourceId == null ? null : this.compareToSourceId.getValue();
6859        }
6860
6861        /**
6862         * @param value Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition.
6863         */
6864        public SetupActionAssertComponent setCompareToSourceId(String value) { 
6865          if (Utilities.noString(value))
6866            this.compareToSourceId = null;
6867          else {
6868            if (this.compareToSourceId == null)
6869              this.compareToSourceId = new StringType();
6870            this.compareToSourceId.setValue(value);
6871          }
6872          return this;
6873        }
6874
6875        /**
6876         * @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
6877         */
6878        public StringType getCompareToSourceExpressionElement() { 
6879          if (this.compareToSourceExpression == null)
6880            if (Configuration.errorOnAutoCreate())
6881              throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourceExpression");
6882            else if (Configuration.doAutoCreate())
6883              this.compareToSourceExpression = new StringType(); // bb
6884          return this.compareToSourceExpression;
6885        }
6886
6887        public boolean hasCompareToSourceExpressionElement() { 
6888          return this.compareToSourceExpression != null && !this.compareToSourceExpression.isEmpty();
6889        }
6890
6891        public boolean hasCompareToSourceExpression() { 
6892          return this.compareToSourceExpression != null && !this.compareToSourceExpression.isEmpty();
6893        }
6894
6895        /**
6896         * @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
6897         */
6898        public SetupActionAssertComponent setCompareToSourceExpressionElement(StringType value) { 
6899          this.compareToSourceExpression = value;
6900          return this;
6901        }
6902
6903        /**
6904         * @return The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.
6905         */
6906        public String getCompareToSourceExpression() { 
6907          return this.compareToSourceExpression == null ? null : this.compareToSourceExpression.getValue();
6908        }
6909
6910        /**
6911         * @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.
6912         */
6913        public SetupActionAssertComponent setCompareToSourceExpression(String value) { 
6914          if (Utilities.noString(value))
6915            this.compareToSourceExpression = null;
6916          else {
6917            if (this.compareToSourceExpression == null)
6918              this.compareToSourceExpression = new StringType();
6919            this.compareToSourceExpression.setValue(value);
6920          }
6921          return this;
6922        }
6923
6924        /**
6925         * @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
6926         */
6927        public StringType getCompareToSourcePathElement() { 
6928          if (this.compareToSourcePath == null)
6929            if (Configuration.errorOnAutoCreate())
6930              throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourcePath");
6931            else if (Configuration.doAutoCreate())
6932              this.compareToSourcePath = new StringType(); // bb
6933          return this.compareToSourcePath;
6934        }
6935
6936        public boolean hasCompareToSourcePathElement() { 
6937          return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty();
6938        }
6939
6940        public boolean hasCompareToSourcePath() { 
6941          return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty();
6942        }
6943
6944        /**
6945         * @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
6946         */
6947        public SetupActionAssertComponent setCompareToSourcePathElement(StringType value) { 
6948          this.compareToSourcePath = value;
6949          return this;
6950        }
6951
6952        /**
6953         * @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.
6954         */
6955        public String getCompareToSourcePath() { 
6956          return this.compareToSourcePath == null ? null : this.compareToSourcePath.getValue();
6957        }
6958
6959        /**
6960         * @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.
6961         */
6962        public SetupActionAssertComponent setCompareToSourcePath(String value) { 
6963          if (Utilities.noString(value))
6964            this.compareToSourcePath = null;
6965          else {
6966            if (this.compareToSourcePath == null)
6967              this.compareToSourcePath = new StringType();
6968            this.compareToSourcePath.setValue(value);
6969          }
6970          return this;
6971        }
6972
6973        /**
6974         * @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
6975         */
6976        public CodeType getContentTypeElement() { 
6977          if (this.contentType == null)
6978            if (Configuration.errorOnAutoCreate())
6979              throw new Error("Attempt to auto-create SetupActionAssertComponent.contentType");
6980            else if (Configuration.doAutoCreate())
6981              this.contentType = new CodeType(); // bb
6982          return this.contentType;
6983        }
6984
6985        public boolean hasContentTypeElement() { 
6986          return this.contentType != null && !this.contentType.isEmpty();
6987        }
6988
6989        public boolean hasContentType() { 
6990          return this.contentType != null && !this.contentType.isEmpty();
6991        }
6992
6993        /**
6994         * @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
6995         */
6996        public SetupActionAssertComponent setContentTypeElement(CodeType value) { 
6997          this.contentType = value;
6998          return this;
6999        }
7000
7001        /**
7002         * @return The mime-type contents to compare against the request or response message 'Content-Type' header.
7003         */
7004        public String getContentType() { 
7005          return this.contentType == null ? null : this.contentType.getValue();
7006        }
7007
7008        /**
7009         * @param value The mime-type contents to compare against the request or response message 'Content-Type' header.
7010         */
7011        public SetupActionAssertComponent setContentType(String value) { 
7012          if (Utilities.noString(value))
7013            this.contentType = null;
7014          else {
7015            if (this.contentType == null)
7016              this.contentType = new CodeType();
7017            this.contentType.setValue(value);
7018          }
7019          return this;
7020        }
7021
7022        /**
7023         * @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
7024         */
7025        public StringType getExpressionElement() { 
7026          if (this.expression == null)
7027            if (Configuration.errorOnAutoCreate())
7028              throw new Error("Attempt to auto-create SetupActionAssertComponent.expression");
7029            else if (Configuration.doAutoCreate())
7030              this.expression = new StringType(); // bb
7031          return this.expression;
7032        }
7033
7034        public boolean hasExpressionElement() { 
7035          return this.expression != null && !this.expression.isEmpty();
7036        }
7037
7038        public boolean hasExpression() { 
7039          return this.expression != null && !this.expression.isEmpty();
7040        }
7041
7042        /**
7043         * @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
7044         */
7045        public SetupActionAssertComponent setExpressionElement(StringType value) { 
7046          this.expression = value;
7047          return this;
7048        }
7049
7050        /**
7051         * @return The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.
7052         */
7053        public String getExpression() { 
7054          return this.expression == null ? null : this.expression.getValue();
7055        }
7056
7057        /**
7058         * @param value The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.
7059         */
7060        public SetupActionAssertComponent setExpression(String value) { 
7061          if (Utilities.noString(value))
7062            this.expression = null;
7063          else {
7064            if (this.expression == null)
7065              this.expression = new StringType();
7066            this.expression.setValue(value);
7067          }
7068          return this;
7069        }
7070
7071        /**
7072         * @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
7073         */
7074        public StringType getHeaderFieldElement() { 
7075          if (this.headerField == null)
7076            if (Configuration.errorOnAutoCreate())
7077              throw new Error("Attempt to auto-create SetupActionAssertComponent.headerField");
7078            else if (Configuration.doAutoCreate())
7079              this.headerField = new StringType(); // bb
7080          return this.headerField;
7081        }
7082
7083        public boolean hasHeaderFieldElement() { 
7084          return this.headerField != null && !this.headerField.isEmpty();
7085        }
7086
7087        public boolean hasHeaderField() { 
7088          return this.headerField != null && !this.headerField.isEmpty();
7089        }
7090
7091        /**
7092         * @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
7093         */
7094        public SetupActionAssertComponent setHeaderFieldElement(StringType value) { 
7095          this.headerField = value;
7096          return this;
7097        }
7098
7099        /**
7100         * @return The HTTP header field name e.g. 'Location'.
7101         */
7102        public String getHeaderField() { 
7103          return this.headerField == null ? null : this.headerField.getValue();
7104        }
7105
7106        /**
7107         * @param value The HTTP header field name e.g. 'Location'.
7108         */
7109        public SetupActionAssertComponent setHeaderField(String value) { 
7110          if (Utilities.noString(value))
7111            this.headerField = null;
7112          else {
7113            if (this.headerField == null)
7114              this.headerField = new StringType();
7115            this.headerField.setValue(value);
7116          }
7117          return this;
7118        }
7119
7120        /**
7121         * @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
7122         */
7123        public StringType getMinimumIdElement() { 
7124          if (this.minimumId == null)
7125            if (Configuration.errorOnAutoCreate())
7126              throw new Error("Attempt to auto-create SetupActionAssertComponent.minimumId");
7127            else if (Configuration.doAutoCreate())
7128              this.minimumId = new StringType(); // bb
7129          return this.minimumId;
7130        }
7131
7132        public boolean hasMinimumIdElement() { 
7133          return this.minimumId != null && !this.minimumId.isEmpty();
7134        }
7135
7136        public boolean hasMinimumId() { 
7137          return this.minimumId != null && !this.minimumId.isEmpty();
7138        }
7139
7140        /**
7141         * @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
7142         */
7143        public SetupActionAssertComponent setMinimumIdElement(StringType value) { 
7144          this.minimumId = value;
7145          return this;
7146        }
7147
7148        /**
7149         * @return The ID of a fixture.  Asserts that the response contains at a minimum the fixture specified by minimumId.
7150         */
7151        public String getMinimumId() { 
7152          return this.minimumId == null ? null : this.minimumId.getValue();
7153        }
7154
7155        /**
7156         * @param value The ID of a fixture.  Asserts that the response contains at a minimum the fixture specified by minimumId.
7157         */
7158        public SetupActionAssertComponent setMinimumId(String value) { 
7159          if (Utilities.noString(value))
7160            this.minimumId = null;
7161          else {
7162            if (this.minimumId == null)
7163              this.minimumId = new StringType();
7164            this.minimumId.setValue(value);
7165          }
7166          return this;
7167        }
7168
7169        /**
7170         * @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
7171         */
7172        public BooleanType getNavigationLinksElement() { 
7173          if (this.navigationLinks == null)
7174            if (Configuration.errorOnAutoCreate())
7175              throw new Error("Attempt to auto-create SetupActionAssertComponent.navigationLinks");
7176            else if (Configuration.doAutoCreate())
7177              this.navigationLinks = new BooleanType(); // bb
7178          return this.navigationLinks;
7179        }
7180
7181        public boolean hasNavigationLinksElement() { 
7182          return this.navigationLinks != null && !this.navigationLinks.isEmpty();
7183        }
7184
7185        public boolean hasNavigationLinks() { 
7186          return this.navigationLinks != null && !this.navigationLinks.isEmpty();
7187        }
7188
7189        /**
7190         * @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
7191         */
7192        public SetupActionAssertComponent setNavigationLinksElement(BooleanType value) { 
7193          this.navigationLinks = value;
7194          return this;
7195        }
7196
7197        /**
7198         * @return Whether or not the test execution performs validation on the bundle navigation links.
7199         */
7200        public boolean getNavigationLinks() { 
7201          return this.navigationLinks == null || this.navigationLinks.isEmpty() ? false : this.navigationLinks.getValue();
7202        }
7203
7204        /**
7205         * @param value Whether or not the test execution performs validation on the bundle navigation links.
7206         */
7207        public SetupActionAssertComponent setNavigationLinks(boolean value) { 
7208            if (this.navigationLinks == null)
7209              this.navigationLinks = new BooleanType();
7210            this.navigationLinks.setValue(value);
7211          return this;
7212        }
7213
7214        /**
7215         * @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
7216         */
7217        public Enumeration<AssertionOperatorType> getOperatorElement() { 
7218          if (this.operator == null)
7219            if (Configuration.errorOnAutoCreate())
7220              throw new Error("Attempt to auto-create SetupActionAssertComponent.operator");
7221            else if (Configuration.doAutoCreate())
7222              this.operator = new Enumeration<AssertionOperatorType>(new AssertionOperatorTypeEnumFactory()); // bb
7223          return this.operator;
7224        }
7225
7226        public boolean hasOperatorElement() { 
7227          return this.operator != null && !this.operator.isEmpty();
7228        }
7229
7230        public boolean hasOperator() { 
7231          return this.operator != null && !this.operator.isEmpty();
7232        }
7233
7234        /**
7235         * @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
7236         */
7237        public SetupActionAssertComponent setOperatorElement(Enumeration<AssertionOperatorType> value) { 
7238          this.operator = value;
7239          return this;
7240        }
7241
7242        /**
7243         * @return The operator type defines the conditional behavior of the assert. If not defined, the default is equals.
7244         */
7245        public AssertionOperatorType getOperator() { 
7246          return this.operator == null ? null : this.operator.getValue();
7247        }
7248
7249        /**
7250         * @param value The operator type defines the conditional behavior of the assert. If not defined, the default is equals.
7251         */
7252        public SetupActionAssertComponent setOperator(AssertionOperatorType value) { 
7253          if (value == null)
7254            this.operator = null;
7255          else {
7256            if (this.operator == null)
7257              this.operator = new Enumeration<AssertionOperatorType>(new AssertionOperatorTypeEnumFactory());
7258            this.operator.setValue(value);
7259          }
7260          return this;
7261        }
7262
7263        /**
7264         * @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
7265         */
7266        public StringType getPathElement() { 
7267          if (this.path == null)
7268            if (Configuration.errorOnAutoCreate())
7269              throw new Error("Attempt to auto-create SetupActionAssertComponent.path");
7270            else if (Configuration.doAutoCreate())
7271              this.path = new StringType(); // bb
7272          return this.path;
7273        }
7274
7275        public boolean hasPathElement() { 
7276          return this.path != null && !this.path.isEmpty();
7277        }
7278
7279        public boolean hasPath() { 
7280          return this.path != null && !this.path.isEmpty();
7281        }
7282
7283        /**
7284         * @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
7285         */
7286        public SetupActionAssertComponent setPathElement(StringType value) { 
7287          this.path = value;
7288          return this;
7289        }
7290
7291        /**
7292         * @return The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.
7293         */
7294        public String getPath() { 
7295          return this.path == null ? null : this.path.getValue();
7296        }
7297
7298        /**
7299         * @param value The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.
7300         */
7301        public SetupActionAssertComponent setPath(String value) { 
7302          if (Utilities.noString(value))
7303            this.path = null;
7304          else {
7305            if (this.path == null)
7306              this.path = new StringType();
7307            this.path.setValue(value);
7308          }
7309          return this;
7310        }
7311
7312        /**
7313         * @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
7314         */
7315        public Enumeration<TestScriptRequestMethodCode> getRequestMethodElement() { 
7316          if (this.requestMethod == null)
7317            if (Configuration.errorOnAutoCreate())
7318              throw new Error("Attempt to auto-create SetupActionAssertComponent.requestMethod");
7319            else if (Configuration.doAutoCreate())
7320              this.requestMethod = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory()); // bb
7321          return this.requestMethod;
7322        }
7323
7324        public boolean hasRequestMethodElement() { 
7325          return this.requestMethod != null && !this.requestMethod.isEmpty();
7326        }
7327
7328        public boolean hasRequestMethod() { 
7329          return this.requestMethod != null && !this.requestMethod.isEmpty();
7330        }
7331
7332        /**
7333         * @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
7334         */
7335        public SetupActionAssertComponent setRequestMethodElement(Enumeration<TestScriptRequestMethodCode> value) { 
7336          this.requestMethod = value;
7337          return this;
7338        }
7339
7340        /**
7341         * @return The request method or HTTP operation code to compare against that used by the client system under test.
7342         */
7343        public TestScriptRequestMethodCode getRequestMethod() { 
7344          return this.requestMethod == null ? null : this.requestMethod.getValue();
7345        }
7346
7347        /**
7348         * @param value The request method or HTTP operation code to compare against that used by the client system under test.
7349         */
7350        public SetupActionAssertComponent setRequestMethod(TestScriptRequestMethodCode value) { 
7351          if (value == null)
7352            this.requestMethod = null;
7353          else {
7354            if (this.requestMethod == null)
7355              this.requestMethod = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory());
7356            this.requestMethod.setValue(value);
7357          }
7358          return this;
7359        }
7360
7361        /**
7362         * @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
7363         */
7364        public StringType getRequestURLElement() { 
7365          if (this.requestURL == null)
7366            if (Configuration.errorOnAutoCreate())
7367              throw new Error("Attempt to auto-create SetupActionAssertComponent.requestURL");
7368            else if (Configuration.doAutoCreate())
7369              this.requestURL = new StringType(); // bb
7370          return this.requestURL;
7371        }
7372
7373        public boolean hasRequestURLElement() { 
7374          return this.requestURL != null && !this.requestURL.isEmpty();
7375        }
7376
7377        public boolean hasRequestURL() { 
7378          return this.requestURL != null && !this.requestURL.isEmpty();
7379        }
7380
7381        /**
7382         * @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
7383         */
7384        public SetupActionAssertComponent setRequestURLElement(StringType value) { 
7385          this.requestURL = value;
7386          return this;
7387        }
7388
7389        /**
7390         * @return The value to use in a comparison against the request URL path string.
7391         */
7392        public String getRequestURL() { 
7393          return this.requestURL == null ? null : this.requestURL.getValue();
7394        }
7395
7396        /**
7397         * @param value The value to use in a comparison against the request URL path string.
7398         */
7399        public SetupActionAssertComponent setRequestURL(String value) { 
7400          if (Utilities.noString(value))
7401            this.requestURL = null;
7402          else {
7403            if (this.requestURL == null)
7404              this.requestURL = new StringType();
7405            this.requestURL.setValue(value);
7406          }
7407          return this;
7408        }
7409
7410        /**
7411         * @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
7412         */
7413        public CodeType getResourceElement() { 
7414          if (this.resource == null)
7415            if (Configuration.errorOnAutoCreate())
7416              throw new Error("Attempt to auto-create SetupActionAssertComponent.resource");
7417            else if (Configuration.doAutoCreate())
7418              this.resource = new CodeType(); // bb
7419          return this.resource;
7420        }
7421
7422        public boolean hasResourceElement() { 
7423          return this.resource != null && !this.resource.isEmpty();
7424        }
7425
7426        public boolean hasResource() { 
7427          return this.resource != null && !this.resource.isEmpty();
7428        }
7429
7430        /**
7431         * @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
7432         */
7433        public SetupActionAssertComponent setResourceElement(CodeType value) { 
7434          this.resource = value;
7435          return this;
7436        }
7437
7438        /**
7439         * @return The type of the resource.  See http://build.fhir.org/resourcelist.html.
7440         */
7441        public String getResource() { 
7442          return this.resource == null ? null : this.resource.getValue();
7443        }
7444
7445        /**
7446         * @param value The type of the resource.  See http://build.fhir.org/resourcelist.html.
7447         */
7448        public SetupActionAssertComponent setResource(String value) { 
7449          if (Utilities.noString(value))
7450            this.resource = null;
7451          else {
7452            if (this.resource == null)
7453              this.resource = new CodeType();
7454            this.resource.setValue(value);
7455          }
7456          return this;
7457        }
7458
7459        /**
7460         * @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
7461         */
7462        public Enumeration<AssertionResponseTypes> getResponseElement() { 
7463          if (this.response == null)
7464            if (Configuration.errorOnAutoCreate())
7465              throw new Error("Attempt to auto-create SetupActionAssertComponent.response");
7466            else if (Configuration.doAutoCreate())
7467              this.response = new Enumeration<AssertionResponseTypes>(new AssertionResponseTypesEnumFactory()); // bb
7468          return this.response;
7469        }
7470
7471        public boolean hasResponseElement() { 
7472          return this.response != null && !this.response.isEmpty();
7473        }
7474
7475        public boolean hasResponse() { 
7476          return this.response != null && !this.response.isEmpty();
7477        }
7478
7479        /**
7480         * @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
7481         */
7482        public SetupActionAssertComponent setResponseElement(Enumeration<AssertionResponseTypes> value) { 
7483          this.response = value;
7484          return this;
7485        }
7486
7487        /**
7488         * @return okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.
7489         */
7490        public AssertionResponseTypes getResponse() { 
7491          return this.response == null ? null : this.response.getValue();
7492        }
7493
7494        /**
7495         * @param value okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.
7496         */
7497        public SetupActionAssertComponent setResponse(AssertionResponseTypes value) { 
7498          if (value == null)
7499            this.response = null;
7500          else {
7501            if (this.response == null)
7502              this.response = new Enumeration<AssertionResponseTypes>(new AssertionResponseTypesEnumFactory());
7503            this.response.setValue(value);
7504          }
7505          return this;
7506        }
7507
7508        /**
7509         * @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
7510         */
7511        public StringType getResponseCodeElement() { 
7512          if (this.responseCode == null)
7513            if (Configuration.errorOnAutoCreate())
7514              throw new Error("Attempt to auto-create SetupActionAssertComponent.responseCode");
7515            else if (Configuration.doAutoCreate())
7516              this.responseCode = new StringType(); // bb
7517          return this.responseCode;
7518        }
7519
7520        public boolean hasResponseCodeElement() { 
7521          return this.responseCode != null && !this.responseCode.isEmpty();
7522        }
7523
7524        public boolean hasResponseCode() { 
7525          return this.responseCode != null && !this.responseCode.isEmpty();
7526        }
7527
7528        /**
7529         * @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
7530         */
7531        public SetupActionAssertComponent setResponseCodeElement(StringType value) { 
7532          this.responseCode = value;
7533          return this;
7534        }
7535
7536        /**
7537         * @return The value of the HTTP response code to be tested.
7538         */
7539        public String getResponseCode() { 
7540          return this.responseCode == null ? null : this.responseCode.getValue();
7541        }
7542
7543        /**
7544         * @param value The value of the HTTP response code to be tested.
7545         */
7546        public SetupActionAssertComponent setResponseCode(String value) { 
7547          if (Utilities.noString(value))
7548            this.responseCode = null;
7549          else {
7550            if (this.responseCode == null)
7551              this.responseCode = new StringType();
7552            this.responseCode.setValue(value);
7553          }
7554          return this;
7555        }
7556
7557        /**
7558         * @return {@link #rule} (The TestScript.rule this assert will evaluate.)
7559         */
7560        public ActionAssertRuleComponent getRule() { 
7561          if (this.rule == null)
7562            if (Configuration.errorOnAutoCreate())
7563              throw new Error("Attempt to auto-create SetupActionAssertComponent.rule");
7564            else if (Configuration.doAutoCreate())
7565              this.rule = new ActionAssertRuleComponent(); // cc
7566          return this.rule;
7567        }
7568
7569        public boolean hasRule() { 
7570          return this.rule != null && !this.rule.isEmpty();
7571        }
7572
7573        /**
7574         * @param value {@link #rule} (The TestScript.rule this assert will evaluate.)
7575         */
7576        public SetupActionAssertComponent setRule(ActionAssertRuleComponent value) { 
7577          this.rule = value;
7578          return this;
7579        }
7580
7581        /**
7582         * @return {@link #ruleset} (The TestScript.ruleset this assert will evaluate.)
7583         */
7584        public ActionAssertRulesetComponent getRuleset() { 
7585          if (this.ruleset == null)
7586            if (Configuration.errorOnAutoCreate())
7587              throw new Error("Attempt to auto-create SetupActionAssertComponent.ruleset");
7588            else if (Configuration.doAutoCreate())
7589              this.ruleset = new ActionAssertRulesetComponent(); // cc
7590          return this.ruleset;
7591        }
7592
7593        public boolean hasRuleset() { 
7594          return this.ruleset != null && !this.ruleset.isEmpty();
7595        }
7596
7597        /**
7598         * @param value {@link #ruleset} (The TestScript.ruleset this assert will evaluate.)
7599         */
7600        public SetupActionAssertComponent setRuleset(ActionAssertRulesetComponent value) { 
7601          this.ruleset = value;
7602          return this;
7603        }
7604
7605        /**
7606         * @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
7607         */
7608        public IdType getSourceIdElement() { 
7609          if (this.sourceId == null)
7610            if (Configuration.errorOnAutoCreate())
7611              throw new Error("Attempt to auto-create SetupActionAssertComponent.sourceId");
7612            else if (Configuration.doAutoCreate())
7613              this.sourceId = new IdType(); // bb
7614          return this.sourceId;
7615        }
7616
7617        public boolean hasSourceIdElement() { 
7618          return this.sourceId != null && !this.sourceId.isEmpty();
7619        }
7620
7621        public boolean hasSourceId() { 
7622          return this.sourceId != null && !this.sourceId.isEmpty();
7623        }
7624
7625        /**
7626         * @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
7627         */
7628        public SetupActionAssertComponent setSourceIdElement(IdType value) { 
7629          this.sourceId = value;
7630          return this;
7631        }
7632
7633        /**
7634         * @return Fixture to evaluate the XPath/JSONPath expression or the headerField  against.
7635         */
7636        public String getSourceId() { 
7637          return this.sourceId == null ? null : this.sourceId.getValue();
7638        }
7639
7640        /**
7641         * @param value Fixture to evaluate the XPath/JSONPath expression or the headerField  against.
7642         */
7643        public SetupActionAssertComponent setSourceId(String value) { 
7644          if (Utilities.noString(value))
7645            this.sourceId = null;
7646          else {
7647            if (this.sourceId == null)
7648              this.sourceId = new IdType();
7649            this.sourceId.setValue(value);
7650          }
7651          return this;
7652        }
7653
7654        /**
7655         * @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
7656         */
7657        public IdType getValidateProfileIdElement() { 
7658          if (this.validateProfileId == null)
7659            if (Configuration.errorOnAutoCreate())
7660              throw new Error("Attempt to auto-create SetupActionAssertComponent.validateProfileId");
7661            else if (Configuration.doAutoCreate())
7662              this.validateProfileId = new IdType(); // bb
7663          return this.validateProfileId;
7664        }
7665
7666        public boolean hasValidateProfileIdElement() { 
7667          return this.validateProfileId != null && !this.validateProfileId.isEmpty();
7668        }
7669
7670        public boolean hasValidateProfileId() { 
7671          return this.validateProfileId != null && !this.validateProfileId.isEmpty();
7672        }
7673
7674        /**
7675         * @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
7676         */
7677        public SetupActionAssertComponent setValidateProfileIdElement(IdType value) { 
7678          this.validateProfileId = value;
7679          return this;
7680        }
7681
7682        /**
7683         * @return The ID of the Profile to validate against.
7684         */
7685        public String getValidateProfileId() { 
7686          return this.validateProfileId == null ? null : this.validateProfileId.getValue();
7687        }
7688
7689        /**
7690         * @param value The ID of the Profile to validate against.
7691         */
7692        public SetupActionAssertComponent setValidateProfileId(String value) { 
7693          if (Utilities.noString(value))
7694            this.validateProfileId = null;
7695          else {
7696            if (this.validateProfileId == null)
7697              this.validateProfileId = new IdType();
7698            this.validateProfileId.setValue(value);
7699          }
7700          return this;
7701        }
7702
7703        /**
7704         * @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
7705         */
7706        public StringType getValueElement() { 
7707          if (this.value == null)
7708            if (Configuration.errorOnAutoCreate())
7709              throw new Error("Attempt to auto-create SetupActionAssertComponent.value");
7710            else if (Configuration.doAutoCreate())
7711              this.value = new StringType(); // bb
7712          return this.value;
7713        }
7714
7715        public boolean hasValueElement() { 
7716          return this.value != null && !this.value.isEmpty();
7717        }
7718
7719        public boolean hasValue() { 
7720          return this.value != null && !this.value.isEmpty();
7721        }
7722
7723        /**
7724         * @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
7725         */
7726        public SetupActionAssertComponent setValueElement(StringType value) { 
7727          this.value = value;
7728          return this;
7729        }
7730
7731        /**
7732         * @return The value to compare to.
7733         */
7734        public String getValue() { 
7735          return this.value == null ? null : this.value.getValue();
7736        }
7737
7738        /**
7739         * @param value The value to compare to.
7740         */
7741        public SetupActionAssertComponent setValue(String value) { 
7742          if (Utilities.noString(value))
7743            this.value = null;
7744          else {
7745            if (this.value == null)
7746              this.value = new StringType();
7747            this.value.setValue(value);
7748          }
7749          return this;
7750        }
7751
7752        /**
7753         * @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
7754         */
7755        public BooleanType getWarningOnlyElement() { 
7756          if (this.warningOnly == null)
7757            if (Configuration.errorOnAutoCreate())
7758              throw new Error("Attempt to auto-create SetupActionAssertComponent.warningOnly");
7759            else if (Configuration.doAutoCreate())
7760              this.warningOnly = new BooleanType(); // bb
7761          return this.warningOnly;
7762        }
7763
7764        public boolean hasWarningOnlyElement() { 
7765          return this.warningOnly != null && !this.warningOnly.isEmpty();
7766        }
7767
7768        public boolean hasWarningOnly() { 
7769          return this.warningOnly != null && !this.warningOnly.isEmpty();
7770        }
7771
7772        /**
7773         * @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
7774         */
7775        public SetupActionAssertComponent setWarningOnlyElement(BooleanType value) { 
7776          this.warningOnly = value;
7777          return this;
7778        }
7779
7780        /**
7781         * @return Whether or not the test execution will produce a warning only on error for this assert.
7782         */
7783        public boolean getWarningOnly() { 
7784          return this.warningOnly == null || this.warningOnly.isEmpty() ? false : this.warningOnly.getValue();
7785        }
7786
7787        /**
7788         * @param value Whether or not the test execution will produce a warning only on error for this assert.
7789         */
7790        public SetupActionAssertComponent setWarningOnly(boolean value) { 
7791            if (this.warningOnly == null)
7792              this.warningOnly = new BooleanType();
7793            this.warningOnly.setValue(value);
7794          return this;
7795        }
7796
7797        protected void listChildren(List<Property> children) {
7798          super.listChildren(children);
7799          children.add(new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label));
7800          children.add(new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description));
7801          children.add(new Property("direction", "code", "The direction to use for the assertion.", 0, 1, direction));
7802          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));
7803          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));
7804          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));
7805          children.add(new Property("contentType", "code", "The mime-type contents to compare against the request or response message 'Content-Type' header.", 0, 1, contentType));
7806          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));
7807          children.add(new Property("headerField", "string", "The HTTP header field name e.g. 'Location'.", 0, 1, headerField));
7808          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));
7809          children.add(new Property("navigationLinks", "boolean", "Whether or not the test execution performs validation on the bundle navigation links.", 0, 1, navigationLinks));
7810          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));
7811          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));
7812          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));
7813          children.add(new Property("requestURL", "string", "The value to use in a comparison against the request URL path string.", 0, 1, requestURL));
7814          children.add(new Property("resource", "code", "The type of the resource.  See http://build.fhir.org/resourcelist.html.", 0, 1, resource));
7815          children.add(new Property("response", "code", "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.", 0, 1, response));
7816          children.add(new Property("responseCode", "string", "The value of the HTTP response code to be tested.", 0, 1, responseCode));
7817          children.add(new Property("rule", "", "The TestScript.rule this assert will evaluate.", 0, 1, rule));
7818          children.add(new Property("ruleset", "", "The TestScript.ruleset this assert will evaluate.", 0, 1, ruleset));
7819          children.add(new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField  against.", 0, 1, sourceId));
7820          children.add(new Property("validateProfileId", "id", "The ID of the Profile to validate against.", 0, 1, validateProfileId));
7821          children.add(new Property("value", "string", "The value to compare to.", 0, 1, value));
7822          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));
7823        }
7824
7825        @Override
7826        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
7827          switch (_hash) {
7828          case 102727412: /*label*/  return new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label);
7829          case -1724546052: /*description*/  return new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description);
7830          case -962590849: /*direction*/  return new Property("direction", "code", "The direction to use for the assertion.", 0, 1, direction);
7831          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);
7832          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);
7833          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);
7834          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);
7835          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);
7836          case 1160732269: /*headerField*/  return new Property("headerField", "string", "The HTTP header field name e.g. 'Location'.", 0, 1, headerField);
7837          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);
7838          case 1001488901: /*navigationLinks*/  return new Property("navigationLinks", "boolean", "Whether or not the test execution performs validation on the bundle navigation links.", 0, 1, navigationLinks);
7839          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);
7840          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);
7841          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);
7842          case 37099616: /*requestURL*/  return new Property("requestURL", "string", "The value to use in a comparison against the request URL path string.", 0, 1, requestURL);
7843          case -341064690: /*resource*/  return new Property("resource", "code", "The type of the resource.  See http://build.fhir.org/resourcelist.html.", 0, 1, resource);
7844          case -340323263: /*response*/  return new Property("response", "code", "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.", 0, 1, response);
7845          case 1438723534: /*responseCode*/  return new Property("responseCode", "string", "The value of the HTTP response code to be tested.", 0, 1, responseCode);
7846          case 3512060: /*rule*/  return new Property("rule", "", "The TestScript.rule this assert will evaluate.", 0, 1, rule);
7847          case 1548678118: /*ruleset*/  return new Property("ruleset", "", "The TestScript.ruleset this assert will evaluate.", 0, 1, ruleset);
7848          case 1746327190: /*sourceId*/  return new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField  against.", 0, 1, sourceId);
7849          case 1555541038: /*validateProfileId*/  return new Property("validateProfileId", "id", "The ID of the Profile to validate against.", 0, 1, validateProfileId);
7850          case 111972721: /*value*/  return new Property("value", "string", "The value to compare to.", 0, 1, value);
7851          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);
7852          default: return super.getNamedProperty(_hash, _name, _checkValid);
7853          }
7854
7855        }
7856
7857      @Override
7858      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
7859        switch (hash) {
7860        case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType
7861        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
7862        case -962590849: /*direction*/ return this.direction == null ? new Base[0] : new Base[] {this.direction}; // Enumeration<AssertionDirectionType>
7863        case 2081856758: /*compareToSourceId*/ return this.compareToSourceId == null ? new Base[0] : new Base[] {this.compareToSourceId}; // StringType
7864        case -1415702669: /*compareToSourceExpression*/ return this.compareToSourceExpression == null ? new Base[0] : new Base[] {this.compareToSourceExpression}; // StringType
7865        case -790206144: /*compareToSourcePath*/ return this.compareToSourcePath == null ? new Base[0] : new Base[] {this.compareToSourcePath}; // StringType
7866        case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // CodeType
7867        case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType
7868        case 1160732269: /*headerField*/ return this.headerField == null ? new Base[0] : new Base[] {this.headerField}; // StringType
7869        case 818925001: /*minimumId*/ return this.minimumId == null ? new Base[0] : new Base[] {this.minimumId}; // StringType
7870        case 1001488901: /*navigationLinks*/ return this.navigationLinks == null ? new Base[0] : new Base[] {this.navigationLinks}; // BooleanType
7871        case -500553564: /*operator*/ return this.operator == null ? new Base[0] : new Base[] {this.operator}; // Enumeration<AssertionOperatorType>
7872        case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
7873        case 1217874000: /*requestMethod*/ return this.requestMethod == null ? new Base[0] : new Base[] {this.requestMethod}; // Enumeration<TestScriptRequestMethodCode>
7874        case 37099616: /*requestURL*/ return this.requestURL == null ? new Base[0] : new Base[] {this.requestURL}; // StringType
7875        case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // CodeType
7876        case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // Enumeration<AssertionResponseTypes>
7877        case 1438723534: /*responseCode*/ return this.responseCode == null ? new Base[0] : new Base[] {this.responseCode}; // StringType
7878        case 3512060: /*rule*/ return this.rule == null ? new Base[0] : new Base[] {this.rule}; // ActionAssertRuleComponent
7879        case 1548678118: /*ruleset*/ return this.ruleset == null ? new Base[0] : new Base[] {this.ruleset}; // ActionAssertRulesetComponent
7880        case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType
7881        case 1555541038: /*validateProfileId*/ return this.validateProfileId == null ? new Base[0] : new Base[] {this.validateProfileId}; // IdType
7882        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType
7883        case -481159832: /*warningOnly*/ return this.warningOnly == null ? new Base[0] : new Base[] {this.warningOnly}; // BooleanType
7884        default: return super.getProperty(hash, name, checkValid);
7885        }
7886
7887      }
7888
7889      @Override
7890      public Base setProperty(int hash, String name, Base value) throws FHIRException {
7891        switch (hash) {
7892        case 102727412: // label
7893          this.label = castToString(value); // StringType
7894          return value;
7895        case -1724546052: // description
7896          this.description = castToString(value); // StringType
7897          return value;
7898        case -962590849: // direction
7899          value = new AssertionDirectionTypeEnumFactory().fromType(castToCode(value));
7900          this.direction = (Enumeration) value; // Enumeration<AssertionDirectionType>
7901          return value;
7902        case 2081856758: // compareToSourceId
7903          this.compareToSourceId = castToString(value); // StringType
7904          return value;
7905        case -1415702669: // compareToSourceExpression
7906          this.compareToSourceExpression = castToString(value); // StringType
7907          return value;
7908        case -790206144: // compareToSourcePath
7909          this.compareToSourcePath = castToString(value); // StringType
7910          return value;
7911        case -389131437: // contentType
7912          this.contentType = castToCode(value); // CodeType
7913          return value;
7914        case -1795452264: // expression
7915          this.expression = castToString(value); // StringType
7916          return value;
7917        case 1160732269: // headerField
7918          this.headerField = castToString(value); // StringType
7919          return value;
7920        case 818925001: // minimumId
7921          this.minimumId = castToString(value); // StringType
7922          return value;
7923        case 1001488901: // navigationLinks
7924          this.navigationLinks = castToBoolean(value); // BooleanType
7925          return value;
7926        case -500553564: // operator
7927          value = new AssertionOperatorTypeEnumFactory().fromType(castToCode(value));
7928          this.operator = (Enumeration) value; // Enumeration<AssertionOperatorType>
7929          return value;
7930        case 3433509: // path
7931          this.path = castToString(value); // StringType
7932          return value;
7933        case 1217874000: // requestMethod
7934          value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value));
7935          this.requestMethod = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode>
7936          return value;
7937        case 37099616: // requestURL
7938          this.requestURL = castToString(value); // StringType
7939          return value;
7940        case -341064690: // resource
7941          this.resource = castToCode(value); // CodeType
7942          return value;
7943        case -340323263: // response
7944          value = new AssertionResponseTypesEnumFactory().fromType(castToCode(value));
7945          this.response = (Enumeration) value; // Enumeration<AssertionResponseTypes>
7946          return value;
7947        case 1438723534: // responseCode
7948          this.responseCode = castToString(value); // StringType
7949          return value;
7950        case 3512060: // rule
7951          this.rule = (ActionAssertRuleComponent) value; // ActionAssertRuleComponent
7952          return value;
7953        case 1548678118: // ruleset
7954          this.ruleset = (ActionAssertRulesetComponent) value; // ActionAssertRulesetComponent
7955          return value;
7956        case 1746327190: // sourceId
7957          this.sourceId = castToId(value); // IdType
7958          return value;
7959        case 1555541038: // validateProfileId
7960          this.validateProfileId = castToId(value); // IdType
7961          return value;
7962        case 111972721: // value
7963          this.value = castToString(value); // StringType
7964          return value;
7965        case -481159832: // warningOnly
7966          this.warningOnly = castToBoolean(value); // BooleanType
7967          return value;
7968        default: return super.setProperty(hash, name, value);
7969        }
7970
7971      }
7972
7973      @Override
7974      public Base setProperty(String name, Base value) throws FHIRException {
7975        if (name.equals("label")) {
7976          this.label = castToString(value); // StringType
7977        } else if (name.equals("description")) {
7978          this.description = castToString(value); // StringType
7979        } else if (name.equals("direction")) {
7980          value = new AssertionDirectionTypeEnumFactory().fromType(castToCode(value));
7981          this.direction = (Enumeration) value; // Enumeration<AssertionDirectionType>
7982        } else if (name.equals("compareToSourceId")) {
7983          this.compareToSourceId = castToString(value); // StringType
7984        } else if (name.equals("compareToSourceExpression")) {
7985          this.compareToSourceExpression = castToString(value); // StringType
7986        } else if (name.equals("compareToSourcePath")) {
7987          this.compareToSourcePath = castToString(value); // StringType
7988        } else if (name.equals("contentType")) {
7989          this.contentType = castToCode(value); // CodeType
7990        } else if (name.equals("expression")) {
7991          this.expression = castToString(value); // StringType
7992        } else if (name.equals("headerField")) {
7993          this.headerField = castToString(value); // StringType
7994        } else if (name.equals("minimumId")) {
7995          this.minimumId = castToString(value); // StringType
7996        } else if (name.equals("navigationLinks")) {
7997          this.navigationLinks = castToBoolean(value); // BooleanType
7998        } else if (name.equals("operator")) {
7999          value = new AssertionOperatorTypeEnumFactory().fromType(castToCode(value));
8000          this.operator = (Enumeration) value; // Enumeration<AssertionOperatorType>
8001        } else if (name.equals("path")) {
8002          this.path = castToString(value); // StringType
8003        } else if (name.equals("requestMethod")) {
8004          value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value));
8005          this.requestMethod = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode>
8006        } else if (name.equals("requestURL")) {
8007          this.requestURL = castToString(value); // StringType
8008        } else if (name.equals("resource")) {
8009          this.resource = castToCode(value); // CodeType
8010        } else if (name.equals("response")) {
8011          value = new AssertionResponseTypesEnumFactory().fromType(castToCode(value));
8012          this.response = (Enumeration) value; // Enumeration<AssertionResponseTypes>
8013        } else if (name.equals("responseCode")) {
8014          this.responseCode = castToString(value); // StringType
8015        } else if (name.equals("rule")) {
8016          this.rule = (ActionAssertRuleComponent) value; // ActionAssertRuleComponent
8017        } else if (name.equals("ruleset")) {
8018          this.ruleset = (ActionAssertRulesetComponent) value; // ActionAssertRulesetComponent
8019        } else if (name.equals("sourceId")) {
8020          this.sourceId = castToId(value); // IdType
8021        } else if (name.equals("validateProfileId")) {
8022          this.validateProfileId = castToId(value); // IdType
8023        } else if (name.equals("value")) {
8024          this.value = castToString(value); // StringType
8025        } else if (name.equals("warningOnly")) {
8026          this.warningOnly = castToBoolean(value); // BooleanType
8027        } else
8028          return super.setProperty(name, value);
8029        return value;
8030      }
8031
8032      @Override
8033      public Base makeProperty(int hash, String name) throws FHIRException {
8034        switch (hash) {
8035        case 102727412:  return getLabelElement();
8036        case -1724546052:  return getDescriptionElement();
8037        case -962590849:  return getDirectionElement();
8038        case 2081856758:  return getCompareToSourceIdElement();
8039        case -1415702669:  return getCompareToSourceExpressionElement();
8040        case -790206144:  return getCompareToSourcePathElement();
8041        case -389131437:  return getContentTypeElement();
8042        case -1795452264:  return getExpressionElement();
8043        case 1160732269:  return getHeaderFieldElement();
8044        case 818925001:  return getMinimumIdElement();
8045        case 1001488901:  return getNavigationLinksElement();
8046        case -500553564:  return getOperatorElement();
8047        case 3433509:  return getPathElement();
8048        case 1217874000:  return getRequestMethodElement();
8049        case 37099616:  return getRequestURLElement();
8050        case -341064690:  return getResourceElement();
8051        case -340323263:  return getResponseElement();
8052        case 1438723534:  return getResponseCodeElement();
8053        case 3512060:  return getRule(); 
8054        case 1548678118:  return getRuleset(); 
8055        case 1746327190:  return getSourceIdElement();
8056        case 1555541038:  return getValidateProfileIdElement();
8057        case 111972721:  return getValueElement();
8058        case -481159832:  return getWarningOnlyElement();
8059        default: return super.makeProperty(hash, name);
8060        }
8061
8062      }
8063
8064      @Override
8065      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
8066        switch (hash) {
8067        case 102727412: /*label*/ return new String[] {"string"};
8068        case -1724546052: /*description*/ return new String[] {"string"};
8069        case -962590849: /*direction*/ return new String[] {"code"};
8070        case 2081856758: /*compareToSourceId*/ return new String[] {"string"};
8071        case -1415702669: /*compareToSourceExpression*/ return new String[] {"string"};
8072        case -790206144: /*compareToSourcePath*/ return new String[] {"string"};
8073        case -389131437: /*contentType*/ return new String[] {"code"};
8074        case -1795452264: /*expression*/ return new String[] {"string"};
8075        case 1160732269: /*headerField*/ return new String[] {"string"};
8076        case 818925001: /*minimumId*/ return new String[] {"string"};
8077        case 1001488901: /*navigationLinks*/ return new String[] {"boolean"};
8078        case -500553564: /*operator*/ return new String[] {"code"};
8079        case 3433509: /*path*/ return new String[] {"string"};
8080        case 1217874000: /*requestMethod*/ return new String[] {"code"};
8081        case 37099616: /*requestURL*/ return new String[] {"string"};
8082        case -341064690: /*resource*/ return new String[] {"code"};
8083        case -340323263: /*response*/ return new String[] {"code"};
8084        case 1438723534: /*responseCode*/ return new String[] {"string"};
8085        case 3512060: /*rule*/ return new String[] {};
8086        case 1548678118: /*ruleset*/ return new String[] {};
8087        case 1746327190: /*sourceId*/ return new String[] {"id"};
8088        case 1555541038: /*validateProfileId*/ return new String[] {"id"};
8089        case 111972721: /*value*/ return new String[] {"string"};
8090        case -481159832: /*warningOnly*/ return new String[] {"boolean"};
8091        default: return super.getTypesForProperty(hash, name);
8092        }
8093
8094      }
8095
8096      @Override
8097      public Base addChild(String name) throws FHIRException {
8098        if (name.equals("label")) {
8099          throw new FHIRException("Cannot call addChild on a primitive type TestScript.label");
8100        }
8101        else if (name.equals("description")) {
8102          throw new FHIRException("Cannot call addChild on a primitive type TestScript.description");
8103        }
8104        else if (name.equals("direction")) {
8105          throw new FHIRException("Cannot call addChild on a primitive type TestScript.direction");
8106        }
8107        else if (name.equals("compareToSourceId")) {
8108          throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourceId");
8109        }
8110        else if (name.equals("compareToSourceExpression")) {
8111          throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourceExpression");
8112        }
8113        else if (name.equals("compareToSourcePath")) {
8114          throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourcePath");
8115        }
8116        else if (name.equals("contentType")) {
8117          throw new FHIRException("Cannot call addChild on a primitive type TestScript.contentType");
8118        }
8119        else if (name.equals("expression")) {
8120          throw new FHIRException("Cannot call addChild on a primitive type TestScript.expression");
8121        }
8122        else if (name.equals("headerField")) {
8123          throw new FHIRException("Cannot call addChild on a primitive type TestScript.headerField");
8124        }
8125        else if (name.equals("minimumId")) {
8126          throw new FHIRException("Cannot call addChild on a primitive type TestScript.minimumId");
8127        }
8128        else if (name.equals("navigationLinks")) {
8129          throw new FHIRException("Cannot call addChild on a primitive type TestScript.navigationLinks");
8130        }
8131        else if (name.equals("operator")) {
8132          throw new FHIRException("Cannot call addChild on a primitive type TestScript.operator");
8133        }
8134        else if (name.equals("path")) {
8135          throw new FHIRException("Cannot call addChild on a primitive type TestScript.path");
8136        }
8137        else if (name.equals("requestMethod")) {
8138          throw new FHIRException("Cannot call addChild on a primitive type TestScript.requestMethod");
8139        }
8140        else if (name.equals("requestURL")) {
8141          throw new FHIRException("Cannot call addChild on a primitive type TestScript.requestURL");
8142        }
8143        else if (name.equals("resource")) {
8144          throw new FHIRException("Cannot call addChild on a primitive type TestScript.resource");
8145        }
8146        else if (name.equals("response")) {
8147          throw new FHIRException("Cannot call addChild on a primitive type TestScript.response");
8148        }
8149        else if (name.equals("responseCode")) {
8150          throw new FHIRException("Cannot call addChild on a primitive type TestScript.responseCode");
8151        }
8152        else if (name.equals("rule")) {
8153          this.rule = new ActionAssertRuleComponent();
8154          return this.rule;
8155        }
8156        else if (name.equals("ruleset")) {
8157          this.ruleset = new ActionAssertRulesetComponent();
8158          return this.ruleset;
8159        }
8160        else if (name.equals("sourceId")) {
8161          throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId");
8162        }
8163        else if (name.equals("validateProfileId")) {
8164          throw new FHIRException("Cannot call addChild on a primitive type TestScript.validateProfileId");
8165        }
8166        else if (name.equals("value")) {
8167          throw new FHIRException("Cannot call addChild on a primitive type TestScript.value");
8168        }
8169        else if (name.equals("warningOnly")) {
8170          throw new FHIRException("Cannot call addChild on a primitive type TestScript.warningOnly");
8171        }
8172        else
8173          return super.addChild(name);
8174      }
8175
8176      public SetupActionAssertComponent copy() {
8177        SetupActionAssertComponent dst = new SetupActionAssertComponent();
8178        copyValues(dst);
8179        dst.label = label == null ? null : label.copy();
8180        dst.description = description == null ? null : description.copy();
8181        dst.direction = direction == null ? null : direction.copy();
8182        dst.compareToSourceId = compareToSourceId == null ? null : compareToSourceId.copy();
8183        dst.compareToSourceExpression = compareToSourceExpression == null ? null : compareToSourceExpression.copy();
8184        dst.compareToSourcePath = compareToSourcePath == null ? null : compareToSourcePath.copy();
8185        dst.contentType = contentType == null ? null : contentType.copy();
8186        dst.expression = expression == null ? null : expression.copy();
8187        dst.headerField = headerField == null ? null : headerField.copy();
8188        dst.minimumId = minimumId == null ? null : minimumId.copy();
8189        dst.navigationLinks = navigationLinks == null ? null : navigationLinks.copy();
8190        dst.operator = operator == null ? null : operator.copy();
8191        dst.path = path == null ? null : path.copy();
8192        dst.requestMethod = requestMethod == null ? null : requestMethod.copy();
8193        dst.requestURL = requestURL == null ? null : requestURL.copy();
8194        dst.resource = resource == null ? null : resource.copy();
8195        dst.response = response == null ? null : response.copy();
8196        dst.responseCode = responseCode == null ? null : responseCode.copy();
8197        dst.rule = rule == null ? null : rule.copy();
8198        dst.ruleset = ruleset == null ? null : ruleset.copy();
8199        dst.sourceId = sourceId == null ? null : sourceId.copy();
8200        dst.validateProfileId = validateProfileId == null ? null : validateProfileId.copy();
8201        dst.value = value == null ? null : value.copy();
8202        dst.warningOnly = warningOnly == null ? null : warningOnly.copy();
8203        return dst;
8204      }
8205
8206      @Override
8207      public boolean equalsDeep(Base other_) {
8208        if (!super.equalsDeep(other_))
8209          return false;
8210        if (!(other_ instanceof SetupActionAssertComponent))
8211          return false;
8212        SetupActionAssertComponent o = (SetupActionAssertComponent) other_;
8213        return compareDeep(label, o.label, true) && compareDeep(description, o.description, true) && compareDeep(direction, o.direction, true)
8214           && compareDeep(compareToSourceId, o.compareToSourceId, true) && compareDeep(compareToSourceExpression, o.compareToSourceExpression, true)
8215           && compareDeep(compareToSourcePath, o.compareToSourcePath, true) && compareDeep(contentType, o.contentType, true)
8216           && compareDeep(expression, o.expression, true) && compareDeep(headerField, o.headerField, true)
8217           && compareDeep(minimumId, o.minimumId, true) && compareDeep(navigationLinks, o.navigationLinks, true)
8218           && compareDeep(operator, o.operator, true) && compareDeep(path, o.path, true) && compareDeep(requestMethod, o.requestMethod, true)
8219           && compareDeep(requestURL, o.requestURL, true) && compareDeep(resource, o.resource, true) && compareDeep(response, o.response, true)
8220           && compareDeep(responseCode, o.responseCode, true) && compareDeep(rule, o.rule, true) && compareDeep(ruleset, o.ruleset, true)
8221           && compareDeep(sourceId, o.sourceId, true) && compareDeep(validateProfileId, o.validateProfileId, true)
8222           && compareDeep(value, o.value, true) && compareDeep(warningOnly, o.warningOnly, true);
8223      }
8224
8225      @Override
8226      public boolean equalsShallow(Base other_) {
8227        if (!super.equalsShallow(other_))
8228          return false;
8229        if (!(other_ instanceof SetupActionAssertComponent))
8230          return false;
8231        SetupActionAssertComponent o = (SetupActionAssertComponent) other_;
8232        return compareValues(label, o.label, true) && compareValues(description, o.description, true) && compareValues(direction, o.direction, true)
8233           && compareValues(compareToSourceId, o.compareToSourceId, true) && compareValues(compareToSourceExpression, o.compareToSourceExpression, true)
8234           && compareValues(compareToSourcePath, o.compareToSourcePath, true) && compareValues(contentType, o.contentType, true)
8235           && compareValues(expression, o.expression, true) && compareValues(headerField, o.headerField, true)
8236           && compareValues(minimumId, o.minimumId, true) && compareValues(navigationLinks, o.navigationLinks, true)
8237           && compareValues(operator, o.operator, true) && compareValues(path, o.path, true) && compareValues(requestMethod, o.requestMethod, true)
8238           && compareValues(requestURL, o.requestURL, true) && compareValues(resource, o.resource, true) && compareValues(response, o.response, true)
8239           && compareValues(responseCode, o.responseCode, true) && compareValues(sourceId, o.sourceId, true) && compareValues(validateProfileId, o.validateProfileId, true)
8240           && compareValues(value, o.value, true) && compareValues(warningOnly, o.warningOnly, true);
8241      }
8242
8243      public boolean isEmpty() {
8244        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(label, description, direction
8245          , compareToSourceId, compareToSourceExpression, compareToSourcePath, contentType, expression
8246          , headerField, minimumId, navigationLinks, operator, path, requestMethod, requestURL
8247          , resource, response, responseCode, rule, ruleset, sourceId, validateProfileId
8248          , value, warningOnly);
8249      }
8250
8251  public String fhirType() {
8252    return "TestScript.setup.action.assert";
8253
8254  }
8255
8256  }
8257
8258    @Block()
8259    public static class ActionAssertRuleComponent extends BackboneElement implements IBaseBackboneElement {
8260        /**
8261         * The TestScript.rule id value this assert will evaluate.
8262         */
8263        @Child(name = "ruleId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false)
8264        @Description(shortDefinition="Id of the TestScript.rule", formalDefinition="The TestScript.rule id value this assert will evaluate." )
8265        protected IdType ruleId;
8266
8267        /**
8268         * Each rule template can take one or more parameters for rule evaluation.
8269         */
8270        @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
8271        @Description(shortDefinition="Rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." )
8272        protected List<ActionAssertRuleParamComponent> param;
8273
8274        private static final long serialVersionUID = -1860715431L;
8275
8276    /**
8277     * Constructor
8278     */
8279      public ActionAssertRuleComponent() {
8280        super();
8281      }
8282
8283    /**
8284     * Constructor
8285     */
8286      public ActionAssertRuleComponent(IdType ruleId) {
8287        super();
8288        this.ruleId = ruleId;
8289      }
8290
8291        /**
8292         * @return {@link #ruleId} (The TestScript.rule id value this assert will evaluate.). This is the underlying object with id, value and extensions. The accessor "getRuleId" gives direct access to the value
8293         */
8294        public IdType getRuleIdElement() { 
8295          if (this.ruleId == null)
8296            if (Configuration.errorOnAutoCreate())
8297              throw new Error("Attempt to auto-create ActionAssertRuleComponent.ruleId");
8298            else if (Configuration.doAutoCreate())
8299              this.ruleId = new IdType(); // bb
8300          return this.ruleId;
8301        }
8302
8303        public boolean hasRuleIdElement() { 
8304          return this.ruleId != null && !this.ruleId.isEmpty();
8305        }
8306
8307        public boolean hasRuleId() { 
8308          return this.ruleId != null && !this.ruleId.isEmpty();
8309        }
8310
8311        /**
8312         * @param value {@link #ruleId} (The TestScript.rule id value this assert will evaluate.). This is the underlying object with id, value and extensions. The accessor "getRuleId" gives direct access to the value
8313         */
8314        public ActionAssertRuleComponent setRuleIdElement(IdType value) { 
8315          this.ruleId = value;
8316          return this;
8317        }
8318
8319        /**
8320         * @return The TestScript.rule id value this assert will evaluate.
8321         */
8322        public String getRuleId() { 
8323          return this.ruleId == null ? null : this.ruleId.getValue();
8324        }
8325
8326        /**
8327         * @param value The TestScript.rule id value this assert will evaluate.
8328         */
8329        public ActionAssertRuleComponent setRuleId(String value) { 
8330            if (this.ruleId == null)
8331              this.ruleId = new IdType();
8332            this.ruleId.setValue(value);
8333          return this;
8334        }
8335
8336        /**
8337         * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.)
8338         */
8339        public List<ActionAssertRuleParamComponent> getParam() { 
8340          if (this.param == null)
8341            this.param = new ArrayList<ActionAssertRuleParamComponent>();
8342          return this.param;
8343        }
8344
8345        /**
8346         * @return Returns a reference to <code>this</code> for easy method chaining
8347         */
8348        public ActionAssertRuleComponent setParam(List<ActionAssertRuleParamComponent> theParam) { 
8349          this.param = theParam;
8350          return this;
8351        }
8352
8353        public boolean hasParam() { 
8354          if (this.param == null)
8355            return false;
8356          for (ActionAssertRuleParamComponent item : this.param)
8357            if (!item.isEmpty())
8358              return true;
8359          return false;
8360        }
8361
8362        public ActionAssertRuleParamComponent addParam() { //3
8363          ActionAssertRuleParamComponent t = new ActionAssertRuleParamComponent();
8364          if (this.param == null)
8365            this.param = new ArrayList<ActionAssertRuleParamComponent>();
8366          this.param.add(t);
8367          return t;
8368        }
8369
8370        public ActionAssertRuleComponent addParam(ActionAssertRuleParamComponent t) { //3
8371          if (t == null)
8372            return this;
8373          if (this.param == null)
8374            this.param = new ArrayList<ActionAssertRuleParamComponent>();
8375          this.param.add(t);
8376          return this;
8377        }
8378
8379        /**
8380         * @return The first repetition of repeating field {@link #param}, creating it if it does not already exist
8381         */
8382        public ActionAssertRuleParamComponent getParamFirstRep() { 
8383          if (getParam().isEmpty()) {
8384            addParam();
8385          }
8386          return getParam().get(0);
8387        }
8388
8389        protected void listChildren(List<Property> children) {
8390          super.listChildren(children);
8391          children.add(new Property("ruleId", "id", "The TestScript.rule id value this assert will evaluate.", 0, 1, ruleId));
8392          children.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param));
8393        }
8394
8395        @Override
8396        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
8397          switch (_hash) {
8398          case -919875273: /*ruleId*/  return new Property("ruleId", "id", "The TestScript.rule id value this assert will evaluate.", 0, 1, ruleId);
8399          case 106436749: /*param*/  return new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param);
8400          default: return super.getNamedProperty(_hash, _name, _checkValid);
8401          }
8402
8403        }
8404
8405      @Override
8406      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
8407        switch (hash) {
8408        case -919875273: /*ruleId*/ return this.ruleId == null ? new Base[0] : new Base[] {this.ruleId}; // IdType
8409        case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // ActionAssertRuleParamComponent
8410        default: return super.getProperty(hash, name, checkValid);
8411        }
8412
8413      }
8414
8415      @Override
8416      public Base setProperty(int hash, String name, Base value) throws FHIRException {
8417        switch (hash) {
8418        case -919875273: // ruleId
8419          this.ruleId = castToId(value); // IdType
8420          return value;
8421        case 106436749: // param
8422          this.getParam().add((ActionAssertRuleParamComponent) value); // ActionAssertRuleParamComponent
8423          return value;
8424        default: return super.setProperty(hash, name, value);
8425        }
8426
8427      }
8428
8429      @Override
8430      public Base setProperty(String name, Base value) throws FHIRException {
8431        if (name.equals("ruleId")) {
8432          this.ruleId = castToId(value); // IdType
8433        } else if (name.equals("param")) {
8434          this.getParam().add((ActionAssertRuleParamComponent) value);
8435        } else
8436          return super.setProperty(name, value);
8437        return value;
8438      }
8439
8440      @Override
8441      public Base makeProperty(int hash, String name) throws FHIRException {
8442        switch (hash) {
8443        case -919875273:  return getRuleIdElement();
8444        case 106436749:  return addParam(); 
8445        default: return super.makeProperty(hash, name);
8446        }
8447
8448      }
8449
8450      @Override
8451      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
8452        switch (hash) {
8453        case -919875273: /*ruleId*/ return new String[] {"id"};
8454        case 106436749: /*param*/ return new String[] {};
8455        default: return super.getTypesForProperty(hash, name);
8456        }
8457
8458      }
8459
8460      @Override
8461      public Base addChild(String name) throws FHIRException {
8462        if (name.equals("ruleId")) {
8463          throw new FHIRException("Cannot call addChild on a primitive type TestScript.ruleId");
8464        }
8465        else if (name.equals("param")) {
8466          return addParam();
8467        }
8468        else
8469          return super.addChild(name);
8470      }
8471
8472      public ActionAssertRuleComponent copy() {
8473        ActionAssertRuleComponent dst = new ActionAssertRuleComponent();
8474        copyValues(dst);
8475        dst.ruleId = ruleId == null ? null : ruleId.copy();
8476        if (param != null) {
8477          dst.param = new ArrayList<ActionAssertRuleParamComponent>();
8478          for (ActionAssertRuleParamComponent i : param)
8479            dst.param.add(i.copy());
8480        };
8481        return dst;
8482      }
8483
8484      @Override
8485      public boolean equalsDeep(Base other_) {
8486        if (!super.equalsDeep(other_))
8487          return false;
8488        if (!(other_ instanceof ActionAssertRuleComponent))
8489          return false;
8490        ActionAssertRuleComponent o = (ActionAssertRuleComponent) other_;
8491        return compareDeep(ruleId, o.ruleId, true) && compareDeep(param, o.param, true);
8492      }
8493
8494      @Override
8495      public boolean equalsShallow(Base other_) {
8496        if (!super.equalsShallow(other_))
8497          return false;
8498        if (!(other_ instanceof ActionAssertRuleComponent))
8499          return false;
8500        ActionAssertRuleComponent o = (ActionAssertRuleComponent) other_;
8501        return compareValues(ruleId, o.ruleId, true);
8502      }
8503
8504      public boolean isEmpty() {
8505        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(ruleId, param);
8506      }
8507
8508  public String fhirType() {
8509    return "TestScript.setup.action.assert.rule";
8510
8511  }
8512
8513  }
8514
8515    @Block()
8516    public static class ActionAssertRuleParamComponent extends BackboneElement implements IBaseBackboneElement {
8517        /**
8518         * Descriptive name for this parameter that matches the external assert rule parameter name.
8519         */
8520        @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
8521        @Description(shortDefinition="Parameter name matching external assert rule parameter", formalDefinition="Descriptive name for this parameter that matches the external assert rule parameter name." )
8522        protected StringType name;
8523
8524        /**
8525         * The value for the parameter that will be passed on to the external rule template.
8526         */
8527        @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false)
8528        @Description(shortDefinition="Parameter value defined either explicitly or dynamically", formalDefinition="The value for the parameter that will be passed on to the external rule template." )
8529        protected StringType value;
8530
8531        private static final long serialVersionUID = 395259392L;
8532
8533    /**
8534     * Constructor
8535     */
8536      public ActionAssertRuleParamComponent() {
8537        super();
8538      }
8539
8540    /**
8541     * Constructor
8542     */
8543      public ActionAssertRuleParamComponent(StringType name, StringType value) {
8544        super();
8545        this.name = name;
8546        this.value = value;
8547      }
8548
8549        /**
8550         * @return {@link #name} (Descriptive name for this parameter that matches the external assert rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
8551         */
8552        public StringType getNameElement() { 
8553          if (this.name == null)
8554            if (Configuration.errorOnAutoCreate())
8555              throw new Error("Attempt to auto-create ActionAssertRuleParamComponent.name");
8556            else if (Configuration.doAutoCreate())
8557              this.name = new StringType(); // bb
8558          return this.name;
8559        }
8560
8561        public boolean hasNameElement() { 
8562          return this.name != null && !this.name.isEmpty();
8563        }
8564
8565        public boolean hasName() { 
8566          return this.name != null && !this.name.isEmpty();
8567        }
8568
8569        /**
8570         * @param value {@link #name} (Descriptive name for this parameter that matches the external assert rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
8571         */
8572        public ActionAssertRuleParamComponent setNameElement(StringType value) { 
8573          this.name = value;
8574          return this;
8575        }
8576
8577        /**
8578         * @return Descriptive name for this parameter that matches the external assert rule parameter name.
8579         */
8580        public String getName() { 
8581          return this.name == null ? null : this.name.getValue();
8582        }
8583
8584        /**
8585         * @param value Descriptive name for this parameter that matches the external assert rule parameter name.
8586         */
8587        public ActionAssertRuleParamComponent setName(String value) { 
8588            if (this.name == null)
8589              this.name = new StringType();
8590            this.name.setValue(value);
8591          return this;
8592        }
8593
8594        /**
8595         * @return {@link #value} (The value for the parameter that will be passed on to the external rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
8596         */
8597        public StringType getValueElement() { 
8598          if (this.value == null)
8599            if (Configuration.errorOnAutoCreate())
8600              throw new Error("Attempt to auto-create ActionAssertRuleParamComponent.value");
8601            else if (Configuration.doAutoCreate())
8602              this.value = new StringType(); // bb
8603          return this.value;
8604        }
8605
8606        public boolean hasValueElement() { 
8607          return this.value != null && !this.value.isEmpty();
8608        }
8609
8610        public boolean hasValue() { 
8611          return this.value != null && !this.value.isEmpty();
8612        }
8613
8614        /**
8615         * @param value {@link #value} (The value for the parameter that will be passed on to the external rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
8616         */
8617        public ActionAssertRuleParamComponent setValueElement(StringType value) { 
8618          this.value = value;
8619          return this;
8620        }
8621
8622        /**
8623         * @return The value for the parameter that will be passed on to the external rule template.
8624         */
8625        public String getValue() { 
8626          return this.value == null ? null : this.value.getValue();
8627        }
8628
8629        /**
8630         * @param value The value for the parameter that will be passed on to the external rule template.
8631         */
8632        public ActionAssertRuleParamComponent setValue(String value) { 
8633            if (this.value == null)
8634              this.value = new StringType();
8635            this.value.setValue(value);
8636          return this;
8637        }
8638
8639        protected void listChildren(List<Property> children) {
8640          super.listChildren(children);
8641          children.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert rule parameter name.", 0, 1, name));
8642          children.add(new Property("value", "string", "The value for the parameter that will be passed on to the external rule template.", 0, 1, value));
8643        }
8644
8645        @Override
8646        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
8647          switch (_hash) {
8648          case 3373707: /*name*/  return new Property("name", "string", "Descriptive name for this parameter that matches the external assert rule parameter name.", 0, 1, name);
8649          case 111972721: /*value*/  return new Property("value", "string", "The value for the parameter that will be passed on to the external rule template.", 0, 1, value);
8650          default: return super.getNamedProperty(_hash, _name, _checkValid);
8651          }
8652
8653        }
8654
8655      @Override
8656      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
8657        switch (hash) {
8658        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
8659        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType
8660        default: return super.getProperty(hash, name, checkValid);
8661        }
8662
8663      }
8664
8665      @Override
8666      public Base setProperty(int hash, String name, Base value) throws FHIRException {
8667        switch (hash) {
8668        case 3373707: // name
8669          this.name = castToString(value); // StringType
8670          return value;
8671        case 111972721: // value
8672          this.value = castToString(value); // StringType
8673          return value;
8674        default: return super.setProperty(hash, name, value);
8675        }
8676
8677      }
8678
8679      @Override
8680      public Base setProperty(String name, Base value) throws FHIRException {
8681        if (name.equals("name")) {
8682          this.name = castToString(value); // StringType
8683        } else if (name.equals("value")) {
8684          this.value = castToString(value); // StringType
8685        } else
8686          return super.setProperty(name, value);
8687        return value;
8688      }
8689
8690      @Override
8691      public Base makeProperty(int hash, String name) throws FHIRException {
8692        switch (hash) {
8693        case 3373707:  return getNameElement();
8694        case 111972721:  return getValueElement();
8695        default: return super.makeProperty(hash, name);
8696        }
8697
8698      }
8699
8700      @Override
8701      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
8702        switch (hash) {
8703        case 3373707: /*name*/ return new String[] {"string"};
8704        case 111972721: /*value*/ return new String[] {"string"};
8705        default: return super.getTypesForProperty(hash, name);
8706        }
8707
8708      }
8709
8710      @Override
8711      public Base addChild(String name) throws FHIRException {
8712        if (name.equals("name")) {
8713          throw new FHIRException("Cannot call addChild on a primitive type TestScript.name");
8714        }
8715        else if (name.equals("value")) {
8716          throw new FHIRException("Cannot call addChild on a primitive type TestScript.value");
8717        }
8718        else
8719          return super.addChild(name);
8720      }
8721
8722      public ActionAssertRuleParamComponent copy() {
8723        ActionAssertRuleParamComponent dst = new ActionAssertRuleParamComponent();
8724        copyValues(dst);
8725        dst.name = name == null ? null : name.copy();
8726        dst.value = value == null ? null : value.copy();
8727        return dst;
8728      }
8729
8730      @Override
8731      public boolean equalsDeep(Base other_) {
8732        if (!super.equalsDeep(other_))
8733          return false;
8734        if (!(other_ instanceof ActionAssertRuleParamComponent))
8735          return false;
8736        ActionAssertRuleParamComponent o = (ActionAssertRuleParamComponent) other_;
8737        return compareDeep(name, o.name, true) && compareDeep(value, o.value, true);
8738      }
8739
8740      @Override
8741      public boolean equalsShallow(Base other_) {
8742        if (!super.equalsShallow(other_))
8743          return false;
8744        if (!(other_ instanceof ActionAssertRuleParamComponent))
8745          return false;
8746        ActionAssertRuleParamComponent o = (ActionAssertRuleParamComponent) other_;
8747        return compareValues(name, o.name, true) && compareValues(value, o.value, true);
8748      }
8749
8750      public boolean isEmpty() {
8751        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value);
8752      }
8753
8754  public String fhirType() {
8755    return "TestScript.setup.action.assert.rule.param";
8756
8757  }
8758
8759  }
8760
8761    @Block()
8762    public static class ActionAssertRulesetComponent extends BackboneElement implements IBaseBackboneElement {
8763        /**
8764         * The TestScript.ruleset id value this assert will evaluate.
8765         */
8766        @Child(name = "rulesetId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false)
8767        @Description(shortDefinition="Id of the TestScript.ruleset", formalDefinition="The TestScript.ruleset id value this assert will evaluate." )
8768        protected IdType rulesetId;
8769
8770        /**
8771         * The referenced rule within the external ruleset template.
8772         */
8773        @Child(name = "rule", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
8774        @Description(shortDefinition="The referenced rule within the ruleset", formalDefinition="The referenced rule within the external ruleset template." )
8775        protected List<ActionAssertRulesetRuleComponent> rule;
8776
8777        private static final long serialVersionUID = -976736025L;
8778
8779    /**
8780     * Constructor
8781     */
8782      public ActionAssertRulesetComponent() {
8783        super();
8784      }
8785
8786    /**
8787     * Constructor
8788     */
8789      public ActionAssertRulesetComponent(IdType rulesetId) {
8790        super();
8791        this.rulesetId = rulesetId;
8792      }
8793
8794        /**
8795         * @return {@link #rulesetId} (The TestScript.ruleset id value this assert will evaluate.). This is the underlying object with id, value and extensions. The accessor "getRulesetId" gives direct access to the value
8796         */
8797        public IdType getRulesetIdElement() { 
8798          if (this.rulesetId == null)
8799            if (Configuration.errorOnAutoCreate())
8800              throw new Error("Attempt to auto-create ActionAssertRulesetComponent.rulesetId");
8801            else if (Configuration.doAutoCreate())
8802              this.rulesetId = new IdType(); // bb
8803          return this.rulesetId;
8804        }
8805
8806        public boolean hasRulesetIdElement() { 
8807          return this.rulesetId != null && !this.rulesetId.isEmpty();
8808        }
8809
8810        public boolean hasRulesetId() { 
8811          return this.rulesetId != null && !this.rulesetId.isEmpty();
8812        }
8813
8814        /**
8815         * @param value {@link #rulesetId} (The TestScript.ruleset id value this assert will evaluate.). This is the underlying object with id, value and extensions. The accessor "getRulesetId" gives direct access to the value
8816         */
8817        public ActionAssertRulesetComponent setRulesetIdElement(IdType value) { 
8818          this.rulesetId = value;
8819          return this;
8820        }
8821
8822        /**
8823         * @return The TestScript.ruleset id value this assert will evaluate.
8824         */
8825        public String getRulesetId() { 
8826          return this.rulesetId == null ? null : this.rulesetId.getValue();
8827        }
8828
8829        /**
8830         * @param value The TestScript.ruleset id value this assert will evaluate.
8831         */
8832        public ActionAssertRulesetComponent setRulesetId(String value) { 
8833            if (this.rulesetId == null)
8834              this.rulesetId = new IdType();
8835            this.rulesetId.setValue(value);
8836          return this;
8837        }
8838
8839        /**
8840         * @return {@link #rule} (The referenced rule within the external ruleset template.)
8841         */
8842        public List<ActionAssertRulesetRuleComponent> getRule() { 
8843          if (this.rule == null)
8844            this.rule = new ArrayList<ActionAssertRulesetRuleComponent>();
8845          return this.rule;
8846        }
8847
8848        /**
8849         * @return Returns a reference to <code>this</code> for easy method chaining
8850         */
8851        public ActionAssertRulesetComponent setRule(List<ActionAssertRulesetRuleComponent> theRule) { 
8852          this.rule = theRule;
8853          return this;
8854        }
8855
8856        public boolean hasRule() { 
8857          if (this.rule == null)
8858            return false;
8859          for (ActionAssertRulesetRuleComponent item : this.rule)
8860            if (!item.isEmpty())
8861              return true;
8862          return false;
8863        }
8864
8865        public ActionAssertRulesetRuleComponent addRule() { //3
8866          ActionAssertRulesetRuleComponent t = new ActionAssertRulesetRuleComponent();
8867          if (this.rule == null)
8868            this.rule = new ArrayList<ActionAssertRulesetRuleComponent>();
8869          this.rule.add(t);
8870          return t;
8871        }
8872
8873        public ActionAssertRulesetComponent addRule(ActionAssertRulesetRuleComponent t) { //3
8874          if (t == null)
8875            return this;
8876          if (this.rule == null)
8877            this.rule = new ArrayList<ActionAssertRulesetRuleComponent>();
8878          this.rule.add(t);
8879          return this;
8880        }
8881
8882        /**
8883         * @return The first repetition of repeating field {@link #rule}, creating it if it does not already exist
8884         */
8885        public ActionAssertRulesetRuleComponent getRuleFirstRep() { 
8886          if (getRule().isEmpty()) {
8887            addRule();
8888          }
8889          return getRule().get(0);
8890        }
8891
8892        protected void listChildren(List<Property> children) {
8893          super.listChildren(children);
8894          children.add(new Property("rulesetId", "id", "The TestScript.ruleset id value this assert will evaluate.", 0, 1, rulesetId));
8895          children.add(new Property("rule", "", "The referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, rule));
8896        }
8897
8898        @Override
8899        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
8900          switch (_hash) {
8901          case -2073977951: /*rulesetId*/  return new Property("rulesetId", "id", "The TestScript.ruleset id value this assert will evaluate.", 0, 1, rulesetId);
8902          case 3512060: /*rule*/  return new Property("rule", "", "The referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, rule);
8903          default: return super.getNamedProperty(_hash, _name, _checkValid);
8904          }
8905
8906        }
8907
8908      @Override
8909      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
8910        switch (hash) {
8911        case -2073977951: /*rulesetId*/ return this.rulesetId == null ? new Base[0] : new Base[] {this.rulesetId}; // IdType
8912        case 3512060: /*rule*/ return this.rule == null ? new Base[0] : this.rule.toArray(new Base[this.rule.size()]); // ActionAssertRulesetRuleComponent
8913        default: return super.getProperty(hash, name, checkValid);
8914        }
8915
8916      }
8917
8918      @Override
8919      public Base setProperty(int hash, String name, Base value) throws FHIRException {
8920        switch (hash) {
8921        case -2073977951: // rulesetId
8922          this.rulesetId = castToId(value); // IdType
8923          return value;
8924        case 3512060: // rule
8925          this.getRule().add((ActionAssertRulesetRuleComponent) value); // ActionAssertRulesetRuleComponent
8926          return value;
8927        default: return super.setProperty(hash, name, value);
8928        }
8929
8930      }
8931
8932      @Override
8933      public Base setProperty(String name, Base value) throws FHIRException {
8934        if (name.equals("rulesetId")) {
8935          this.rulesetId = castToId(value); // IdType
8936        } else if (name.equals("rule")) {
8937          this.getRule().add((ActionAssertRulesetRuleComponent) value);
8938        } else
8939          return super.setProperty(name, value);
8940        return value;
8941      }
8942
8943      @Override
8944      public Base makeProperty(int hash, String name) throws FHIRException {
8945        switch (hash) {
8946        case -2073977951:  return getRulesetIdElement();
8947        case 3512060:  return addRule(); 
8948        default: return super.makeProperty(hash, name);
8949        }
8950
8951      }
8952
8953      @Override
8954      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
8955        switch (hash) {
8956        case -2073977951: /*rulesetId*/ return new String[] {"id"};
8957        case 3512060: /*rule*/ return new String[] {};
8958        default: return super.getTypesForProperty(hash, name);
8959        }
8960
8961      }
8962
8963      @Override
8964      public Base addChild(String name) throws FHIRException {
8965        if (name.equals("rulesetId")) {
8966          throw new FHIRException("Cannot call addChild on a primitive type TestScript.rulesetId");
8967        }
8968        else if (name.equals("rule")) {
8969          return addRule();
8970        }
8971        else
8972          return super.addChild(name);
8973      }
8974
8975      public ActionAssertRulesetComponent copy() {
8976        ActionAssertRulesetComponent dst = new ActionAssertRulesetComponent();
8977        copyValues(dst);
8978        dst.rulesetId = rulesetId == null ? null : rulesetId.copy();
8979        if (rule != null) {
8980          dst.rule = new ArrayList<ActionAssertRulesetRuleComponent>();
8981          for (ActionAssertRulesetRuleComponent i : rule)
8982            dst.rule.add(i.copy());
8983        };
8984        return dst;
8985      }
8986
8987      @Override
8988      public boolean equalsDeep(Base other_) {
8989        if (!super.equalsDeep(other_))
8990          return false;
8991        if (!(other_ instanceof ActionAssertRulesetComponent))
8992          return false;
8993        ActionAssertRulesetComponent o = (ActionAssertRulesetComponent) other_;
8994        return compareDeep(rulesetId, o.rulesetId, true) && compareDeep(rule, o.rule, true);
8995      }
8996
8997      @Override
8998      public boolean equalsShallow(Base other_) {
8999        if (!super.equalsShallow(other_))
9000          return false;
9001        if (!(other_ instanceof ActionAssertRulesetComponent))
9002          return false;
9003        ActionAssertRulesetComponent o = (ActionAssertRulesetComponent) other_;
9004        return compareValues(rulesetId, o.rulesetId, true);
9005      }
9006
9007      public boolean isEmpty() {
9008        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(rulesetId, rule);
9009      }
9010
9011  public String fhirType() {
9012    return "TestScript.setup.action.assert.ruleset";
9013
9014  }
9015
9016  }
9017
9018    @Block()
9019    public static class ActionAssertRulesetRuleComponent extends BackboneElement implements IBaseBackboneElement {
9020        /**
9021         * Id of the referenced rule within the external ruleset template.
9022         */
9023        @Child(name = "ruleId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false)
9024        @Description(shortDefinition="Id of referenced rule within the ruleset", formalDefinition="Id of the referenced rule within the external ruleset template." )
9025        protected IdType ruleId;
9026
9027        /**
9028         * Each rule template can take one or more parameters for rule evaluation.
9029         */
9030        @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
9031        @Description(shortDefinition="Rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." )
9032        protected List<ActionAssertRulesetRuleParamComponent> param;
9033
9034        private static final long serialVersionUID = -1850698529L;
9035
9036    /**
9037     * Constructor
9038     */
9039      public ActionAssertRulesetRuleComponent() {
9040        super();
9041      }
9042
9043    /**
9044     * Constructor
9045     */
9046      public ActionAssertRulesetRuleComponent(IdType ruleId) {
9047        super();
9048        this.ruleId = ruleId;
9049      }
9050
9051        /**
9052         * @return {@link #ruleId} (Id of the referenced rule within the external ruleset template.). This is the underlying object with id, value and extensions. The accessor "getRuleId" gives direct access to the value
9053         */
9054        public IdType getRuleIdElement() { 
9055          if (this.ruleId == null)
9056            if (Configuration.errorOnAutoCreate())
9057              throw new Error("Attempt to auto-create ActionAssertRulesetRuleComponent.ruleId");
9058            else if (Configuration.doAutoCreate())
9059              this.ruleId = new IdType(); // bb
9060          return this.ruleId;
9061        }
9062
9063        public boolean hasRuleIdElement() { 
9064          return this.ruleId != null && !this.ruleId.isEmpty();
9065        }
9066
9067        public boolean hasRuleId() { 
9068          return this.ruleId != null && !this.ruleId.isEmpty();
9069        }
9070
9071        /**
9072         * @param value {@link #ruleId} (Id of the referenced rule within the external ruleset template.). This is the underlying object with id, value and extensions. The accessor "getRuleId" gives direct access to the value
9073         */
9074        public ActionAssertRulesetRuleComponent setRuleIdElement(IdType value) { 
9075          this.ruleId = value;
9076          return this;
9077        }
9078
9079        /**
9080         * @return Id of the referenced rule within the external ruleset template.
9081         */
9082        public String getRuleId() { 
9083          return this.ruleId == null ? null : this.ruleId.getValue();
9084        }
9085
9086        /**
9087         * @param value Id of the referenced rule within the external ruleset template.
9088         */
9089        public ActionAssertRulesetRuleComponent setRuleId(String value) { 
9090            if (this.ruleId == null)
9091              this.ruleId = new IdType();
9092            this.ruleId.setValue(value);
9093          return this;
9094        }
9095
9096        /**
9097         * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.)
9098         */
9099        public List<ActionAssertRulesetRuleParamComponent> getParam() { 
9100          if (this.param == null)
9101            this.param = new ArrayList<ActionAssertRulesetRuleParamComponent>();
9102          return this.param;
9103        }
9104
9105        /**
9106         * @return Returns a reference to <code>this</code> for easy method chaining
9107         */
9108        public ActionAssertRulesetRuleComponent setParam(List<ActionAssertRulesetRuleParamComponent> theParam) { 
9109          this.param = theParam;
9110          return this;
9111        }
9112
9113        public boolean hasParam() { 
9114          if (this.param == null)
9115            return false;
9116          for (ActionAssertRulesetRuleParamComponent item : this.param)
9117            if (!item.isEmpty())
9118              return true;
9119          return false;
9120        }
9121
9122        public ActionAssertRulesetRuleParamComponent addParam() { //3
9123          ActionAssertRulesetRuleParamComponent t = new ActionAssertRulesetRuleParamComponent();
9124          if (this.param == null)
9125            this.param = new ArrayList<ActionAssertRulesetRuleParamComponent>();
9126          this.param.add(t);
9127          return t;
9128        }
9129
9130        public ActionAssertRulesetRuleComponent addParam(ActionAssertRulesetRuleParamComponent t) { //3
9131          if (t == null)
9132            return this;
9133          if (this.param == null)
9134            this.param = new ArrayList<ActionAssertRulesetRuleParamComponent>();
9135          this.param.add(t);
9136          return this;
9137        }
9138
9139        /**
9140         * @return The first repetition of repeating field {@link #param}, creating it if it does not already exist
9141         */
9142        public ActionAssertRulesetRuleParamComponent getParamFirstRep() { 
9143          if (getParam().isEmpty()) {
9144            addParam();
9145          }
9146          return getParam().get(0);
9147        }
9148
9149        protected void listChildren(List<Property> children) {
9150          super.listChildren(children);
9151          children.add(new Property("ruleId", "id", "Id of the referenced rule within the external ruleset template.", 0, 1, ruleId));
9152          children.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param));
9153        }
9154
9155        @Override
9156        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
9157          switch (_hash) {
9158          case -919875273: /*ruleId*/  return new Property("ruleId", "id", "Id of the referenced rule within the external ruleset template.", 0, 1, ruleId);
9159          case 106436749: /*param*/  return new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param);
9160          default: return super.getNamedProperty(_hash, _name, _checkValid);
9161          }
9162
9163        }
9164
9165      @Override
9166      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
9167        switch (hash) {
9168        case -919875273: /*ruleId*/ return this.ruleId == null ? new Base[0] : new Base[] {this.ruleId}; // IdType
9169        case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // ActionAssertRulesetRuleParamComponent
9170        default: return super.getProperty(hash, name, checkValid);
9171        }
9172
9173      }
9174
9175      @Override
9176      public Base setProperty(int hash, String name, Base value) throws FHIRException {
9177        switch (hash) {
9178        case -919875273: // ruleId
9179          this.ruleId = castToId(value); // IdType
9180          return value;
9181        case 106436749: // param
9182          this.getParam().add((ActionAssertRulesetRuleParamComponent) value); // ActionAssertRulesetRuleParamComponent
9183          return value;
9184        default: return super.setProperty(hash, name, value);
9185        }
9186
9187      }
9188
9189      @Override
9190      public Base setProperty(String name, Base value) throws FHIRException {
9191        if (name.equals("ruleId")) {
9192          this.ruleId = castToId(value); // IdType
9193        } else if (name.equals("param")) {
9194          this.getParam().add((ActionAssertRulesetRuleParamComponent) value);
9195        } else
9196          return super.setProperty(name, value);
9197        return value;
9198      }
9199
9200      @Override
9201      public Base makeProperty(int hash, String name) throws FHIRException {
9202        switch (hash) {
9203        case -919875273:  return getRuleIdElement();
9204        case 106436749:  return addParam(); 
9205        default: return super.makeProperty(hash, name);
9206        }
9207
9208      }
9209
9210      @Override
9211      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
9212        switch (hash) {
9213        case -919875273: /*ruleId*/ return new String[] {"id"};
9214        case 106436749: /*param*/ return new String[] {};
9215        default: return super.getTypesForProperty(hash, name);
9216        }
9217
9218      }
9219
9220      @Override
9221      public Base addChild(String name) throws FHIRException {
9222        if (name.equals("ruleId")) {
9223          throw new FHIRException("Cannot call addChild on a primitive type TestScript.ruleId");
9224        }
9225        else if (name.equals("param")) {
9226          return addParam();
9227        }
9228        else
9229          return super.addChild(name);
9230      }
9231
9232      public ActionAssertRulesetRuleComponent copy() {
9233        ActionAssertRulesetRuleComponent dst = new ActionAssertRulesetRuleComponent();
9234        copyValues(dst);
9235        dst.ruleId = ruleId == null ? null : ruleId.copy();
9236        if (param != null) {
9237          dst.param = new ArrayList<ActionAssertRulesetRuleParamComponent>();
9238          for (ActionAssertRulesetRuleParamComponent i : param)
9239            dst.param.add(i.copy());
9240        };
9241        return dst;
9242      }
9243
9244      @Override
9245      public boolean equalsDeep(Base other_) {
9246        if (!super.equalsDeep(other_))
9247          return false;
9248        if (!(other_ instanceof ActionAssertRulesetRuleComponent))
9249          return false;
9250        ActionAssertRulesetRuleComponent o = (ActionAssertRulesetRuleComponent) other_;
9251        return compareDeep(ruleId, o.ruleId, true) && compareDeep(param, o.param, true);
9252      }
9253
9254      @Override
9255      public boolean equalsShallow(Base other_) {
9256        if (!super.equalsShallow(other_))
9257          return false;
9258        if (!(other_ instanceof ActionAssertRulesetRuleComponent))
9259          return false;
9260        ActionAssertRulesetRuleComponent o = (ActionAssertRulesetRuleComponent) other_;
9261        return compareValues(ruleId, o.ruleId, true);
9262      }
9263
9264      public boolean isEmpty() {
9265        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(ruleId, param);
9266      }
9267
9268  public String fhirType() {
9269    return "TestScript.setup.action.assert.ruleset.rule";
9270
9271  }
9272
9273  }
9274
9275    @Block()
9276    public static class ActionAssertRulesetRuleParamComponent extends BackboneElement implements IBaseBackboneElement {
9277        /**
9278         * Descriptive name for this parameter that matches the external assert ruleset rule parameter name.
9279         */
9280        @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
9281        @Description(shortDefinition="Parameter name matching external assert ruleset rule parameter", formalDefinition="Descriptive name for this parameter that matches the external assert ruleset rule parameter name." )
9282        protected StringType name;
9283
9284        /**
9285         * The value for the parameter that will be passed on to the external ruleset rule template.
9286         */
9287        @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false)
9288        @Description(shortDefinition="Parameter value defined either explicitly or dynamically", formalDefinition="The value for the parameter that will be passed on to the external ruleset rule template." )
9289        protected StringType value;
9290
9291        private static final long serialVersionUID = 395259392L;
9292
9293    /**
9294     * Constructor
9295     */
9296      public ActionAssertRulesetRuleParamComponent() {
9297        super();
9298      }
9299
9300    /**
9301     * Constructor
9302     */
9303      public ActionAssertRulesetRuleParamComponent(StringType name, StringType value) {
9304        super();
9305        this.name = name;
9306        this.value = value;
9307      }
9308
9309        /**
9310         * @return {@link #name} (Descriptive name for this parameter that matches the external assert ruleset rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
9311         */
9312        public StringType getNameElement() { 
9313          if (this.name == null)
9314            if (Configuration.errorOnAutoCreate())
9315              throw new Error("Attempt to auto-create ActionAssertRulesetRuleParamComponent.name");
9316            else if (Configuration.doAutoCreate())
9317              this.name = new StringType(); // bb
9318          return this.name;
9319        }
9320
9321        public boolean hasNameElement() { 
9322          return this.name != null && !this.name.isEmpty();
9323        }
9324
9325        public boolean hasName() { 
9326          return this.name != null && !this.name.isEmpty();
9327        }
9328
9329        /**
9330         * @param value {@link #name} (Descriptive name for this parameter that matches the external assert ruleset rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
9331         */
9332        public ActionAssertRulesetRuleParamComponent setNameElement(StringType value) { 
9333          this.name = value;
9334          return this;
9335        }
9336
9337        /**
9338         * @return Descriptive name for this parameter that matches the external assert ruleset rule parameter name.
9339         */
9340        public String getName() { 
9341          return this.name == null ? null : this.name.getValue();
9342        }
9343
9344        /**
9345         * @param value Descriptive name for this parameter that matches the external assert ruleset rule parameter name.
9346         */
9347        public ActionAssertRulesetRuleParamComponent setName(String value) { 
9348            if (this.name == null)
9349              this.name = new StringType();
9350            this.name.setValue(value);
9351          return this;
9352        }
9353
9354        /**
9355         * @return {@link #value} (The value for the parameter that will be passed on to the external ruleset rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
9356         */
9357        public StringType getValueElement() { 
9358          if (this.value == null)
9359            if (Configuration.errorOnAutoCreate())
9360              throw new Error("Attempt to auto-create ActionAssertRulesetRuleParamComponent.value");
9361            else if (Configuration.doAutoCreate())
9362              this.value = new StringType(); // bb
9363          return this.value;
9364        }
9365
9366        public boolean hasValueElement() { 
9367          return this.value != null && !this.value.isEmpty();
9368        }
9369
9370        public boolean hasValue() { 
9371          return this.value != null && !this.value.isEmpty();
9372        }
9373
9374        /**
9375         * @param value {@link #value} (The value for the parameter that will be passed on to the external ruleset rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
9376         */
9377        public ActionAssertRulesetRuleParamComponent setValueElement(StringType value) { 
9378          this.value = value;
9379          return this;
9380        }
9381
9382        /**
9383         * @return The value for the parameter that will be passed on to the external ruleset rule template.
9384         */
9385        public String getValue() { 
9386          return this.value == null ? null : this.value.getValue();
9387        }
9388
9389        /**
9390         * @param value The value for the parameter that will be passed on to the external ruleset rule template.
9391         */
9392        public ActionAssertRulesetRuleParamComponent setValue(String value) { 
9393            if (this.value == null)
9394              this.value = new StringType();
9395            this.value.setValue(value);
9396          return this;
9397        }
9398
9399        protected void listChildren(List<Property> children) {
9400          super.listChildren(children);
9401          children.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", 0, 1, name));
9402          children.add(new Property("value", "string", "The value for the parameter that will be passed on to the external ruleset rule template.", 0, 1, value));
9403        }
9404
9405        @Override
9406        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
9407          switch (_hash) {
9408          case 3373707: /*name*/  return new Property("name", "string", "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", 0, 1, name);
9409          case 111972721: /*value*/  return new Property("value", "string", "The value for the parameter that will be passed on to the external ruleset rule template.", 0, 1, value);
9410          default: return super.getNamedProperty(_hash, _name, _checkValid);
9411          }
9412
9413        }
9414
9415      @Override
9416      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
9417        switch (hash) {
9418        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
9419        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType
9420        default: return super.getProperty(hash, name, checkValid);
9421        }
9422
9423      }
9424
9425      @Override
9426      public Base setProperty(int hash, String name, Base value) throws FHIRException {
9427        switch (hash) {
9428        case 3373707: // name
9429          this.name = castToString(value); // StringType
9430          return value;
9431        case 111972721: // value
9432          this.value = castToString(value); // StringType
9433          return value;
9434        default: return super.setProperty(hash, name, value);
9435        }
9436
9437      }
9438
9439      @Override
9440      public Base setProperty(String name, Base value) throws FHIRException {
9441        if (name.equals("name")) {
9442          this.name = castToString(value); // StringType
9443        } else if (name.equals("value")) {
9444          this.value = castToString(value); // StringType
9445        } else
9446          return super.setProperty(name, value);
9447        return value;
9448      }
9449
9450      @Override
9451      public Base makeProperty(int hash, String name) throws FHIRException {
9452        switch (hash) {
9453        case 3373707:  return getNameElement();
9454        case 111972721:  return getValueElement();
9455        default: return super.makeProperty(hash, name);
9456        }
9457
9458      }
9459
9460      @Override
9461      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
9462        switch (hash) {
9463        case 3373707: /*name*/ return new String[] {"string"};
9464        case 111972721: /*value*/ return new String[] {"string"};
9465        default: return super.getTypesForProperty(hash, name);
9466        }
9467
9468      }
9469
9470      @Override
9471      public Base addChild(String name) throws FHIRException {
9472        if (name.equals("name")) {
9473          throw new FHIRException("Cannot call addChild on a primitive type TestScript.name");
9474        }
9475        else if (name.equals("value")) {
9476          throw new FHIRException("Cannot call addChild on a primitive type TestScript.value");
9477        }
9478        else
9479          return super.addChild(name);
9480      }
9481
9482      public ActionAssertRulesetRuleParamComponent copy() {
9483        ActionAssertRulesetRuleParamComponent dst = new ActionAssertRulesetRuleParamComponent();
9484        copyValues(dst);
9485        dst.name = name == null ? null : name.copy();
9486        dst.value = value == null ? null : value.copy();
9487        return dst;
9488      }
9489
9490      @Override
9491      public boolean equalsDeep(Base other_) {
9492        if (!super.equalsDeep(other_))
9493          return false;
9494        if (!(other_ instanceof ActionAssertRulesetRuleParamComponent))
9495          return false;
9496        ActionAssertRulesetRuleParamComponent o = (ActionAssertRulesetRuleParamComponent) other_;
9497        return compareDeep(name, o.name, true) && compareDeep(value, o.value, true);
9498      }
9499
9500      @Override
9501      public boolean equalsShallow(Base other_) {
9502        if (!super.equalsShallow(other_))
9503          return false;
9504        if (!(other_ instanceof ActionAssertRulesetRuleParamComponent))
9505          return false;
9506        ActionAssertRulesetRuleParamComponent o = (ActionAssertRulesetRuleParamComponent) other_;
9507        return compareValues(name, o.name, true) && compareValues(value, o.value, true);
9508      }
9509
9510      public boolean isEmpty() {
9511        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value);
9512      }
9513
9514  public String fhirType() {
9515    return "TestScript.setup.action.assert.ruleset.rule.param";
9516
9517  }
9518
9519  }
9520
9521    @Block()
9522    public static class TestScriptTestComponent extends BackboneElement implements IBaseBackboneElement {
9523        /**
9524         * The name of this test used for tracking/logging purposes by test engines.
9525         */
9526        @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
9527        @Description(shortDefinition="Tracking/logging name of this test", formalDefinition="The name of this test used for tracking/logging purposes by test engines." )
9528        protected StringType name;
9529
9530        /**
9531         * A short description of the test used by test engines for tracking and reporting purposes.
9532         */
9533        @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
9534        @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." )
9535        protected StringType description;
9536
9537        /**
9538         * Action would contain either an operation or an assertion.
9539         */
9540        @Child(name = "action", type = {}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
9541        @Description(shortDefinition="A test operation or assert to perform", formalDefinition="Action would contain either an operation or an assertion." )
9542        protected List<TestActionComponent> action;
9543
9544        private static final long serialVersionUID = -865006110L;
9545
9546    /**
9547     * Constructor
9548     */
9549      public TestScriptTestComponent() {
9550        super();
9551      }
9552
9553        /**
9554         * @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
9555         */
9556        public StringType getNameElement() { 
9557          if (this.name == null)
9558            if (Configuration.errorOnAutoCreate())
9559              throw new Error("Attempt to auto-create TestScriptTestComponent.name");
9560            else if (Configuration.doAutoCreate())
9561              this.name = new StringType(); // bb
9562          return this.name;
9563        }
9564
9565        public boolean hasNameElement() { 
9566          return this.name != null && !this.name.isEmpty();
9567        }
9568
9569        public boolean hasName() { 
9570          return this.name != null && !this.name.isEmpty();
9571        }
9572
9573        /**
9574         * @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
9575         */
9576        public TestScriptTestComponent setNameElement(StringType value) { 
9577          this.name = value;
9578          return this;
9579        }
9580
9581        /**
9582         * @return The name of this test used for tracking/logging purposes by test engines.
9583         */
9584        public String getName() { 
9585          return this.name == null ? null : this.name.getValue();
9586        }
9587
9588        /**
9589         * @param value The name of this test used for tracking/logging purposes by test engines.
9590         */
9591        public TestScriptTestComponent setName(String value) { 
9592          if (Utilities.noString(value))
9593            this.name = null;
9594          else {
9595            if (this.name == null)
9596              this.name = new StringType();
9597            this.name.setValue(value);
9598          }
9599          return this;
9600        }
9601
9602        /**
9603         * @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
9604         */
9605        public StringType getDescriptionElement() { 
9606          if (this.description == null)
9607            if (Configuration.errorOnAutoCreate())
9608              throw new Error("Attempt to auto-create TestScriptTestComponent.description");
9609            else if (Configuration.doAutoCreate())
9610              this.description = new StringType(); // bb
9611          return this.description;
9612        }
9613
9614        public boolean hasDescriptionElement() { 
9615          return this.description != null && !this.description.isEmpty();
9616        }
9617
9618        public boolean hasDescription() { 
9619          return this.description != null && !this.description.isEmpty();
9620        }
9621
9622        /**
9623         * @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
9624         */
9625        public TestScriptTestComponent setDescriptionElement(StringType value) { 
9626          this.description = value;
9627          return this;
9628        }
9629
9630        /**
9631         * @return A short description of the test used by test engines for tracking and reporting purposes.
9632         */
9633        public String getDescription() { 
9634          return this.description == null ? null : this.description.getValue();
9635        }
9636
9637        /**
9638         * @param value A short description of the test used by test engines for tracking and reporting purposes.
9639         */
9640        public TestScriptTestComponent setDescription(String value) { 
9641          if (Utilities.noString(value))
9642            this.description = null;
9643          else {
9644            if (this.description == null)
9645              this.description = new StringType();
9646            this.description.setValue(value);
9647          }
9648          return this;
9649        }
9650
9651        /**
9652         * @return {@link #action} (Action would contain either an operation or an assertion.)
9653         */
9654        public List<TestActionComponent> getAction() { 
9655          if (this.action == null)
9656            this.action = new ArrayList<TestActionComponent>();
9657          return this.action;
9658        }
9659
9660        /**
9661         * @return Returns a reference to <code>this</code> for easy method chaining
9662         */
9663        public TestScriptTestComponent setAction(List<TestActionComponent> theAction) { 
9664          this.action = theAction;
9665          return this;
9666        }
9667
9668        public boolean hasAction() { 
9669          if (this.action == null)
9670            return false;
9671          for (TestActionComponent item : this.action)
9672            if (!item.isEmpty())
9673              return true;
9674          return false;
9675        }
9676
9677        public TestActionComponent addAction() { //3
9678          TestActionComponent t = new TestActionComponent();
9679          if (this.action == null)
9680            this.action = new ArrayList<TestActionComponent>();
9681          this.action.add(t);
9682          return t;
9683        }
9684
9685        public TestScriptTestComponent addAction(TestActionComponent t) { //3
9686          if (t == null)
9687            return this;
9688          if (this.action == null)
9689            this.action = new ArrayList<TestActionComponent>();
9690          this.action.add(t);
9691          return this;
9692        }
9693
9694        /**
9695         * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist
9696         */
9697        public TestActionComponent getActionFirstRep() { 
9698          if (getAction().isEmpty()) {
9699            addAction();
9700          }
9701          return getAction().get(0);
9702        }
9703
9704        protected void listChildren(List<Property> children) {
9705          super.listChildren(children);
9706          children.add(new Property("name", "string", "The name of this test used for tracking/logging purposes by test engines.", 0, 1, name));
9707          children.add(new Property("description", "string", "A short description of the test used by test engines for tracking and reporting purposes.", 0, 1, description));
9708          children.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action));
9709        }
9710
9711        @Override
9712        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
9713          switch (_hash) {
9714          case 3373707: /*name*/  return new Property("name", "string", "The name of this test used for tracking/logging purposes by test engines.", 0, 1, name);
9715          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);
9716          case -1422950858: /*action*/  return new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action);
9717          default: return super.getNamedProperty(_hash, _name, _checkValid);
9718          }
9719
9720        }
9721
9722      @Override
9723      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
9724        switch (hash) {
9725        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
9726        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
9727        case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // TestActionComponent
9728        default: return super.getProperty(hash, name, checkValid);
9729        }
9730
9731      }
9732
9733      @Override
9734      public Base setProperty(int hash, String name, Base value) throws FHIRException {
9735        switch (hash) {
9736        case 3373707: // name
9737          this.name = castToString(value); // StringType
9738          return value;
9739        case -1724546052: // description
9740          this.description = castToString(value); // StringType
9741          return value;
9742        case -1422950858: // action
9743          this.getAction().add((TestActionComponent) value); // TestActionComponent
9744          return value;
9745        default: return super.setProperty(hash, name, value);
9746        }
9747
9748      }
9749
9750      @Override
9751      public Base setProperty(String name, Base value) throws FHIRException {
9752        if (name.equals("name")) {
9753          this.name = castToString(value); // StringType
9754        } else if (name.equals("description")) {
9755          this.description = castToString(value); // StringType
9756        } else if (name.equals("action")) {
9757          this.getAction().add((TestActionComponent) value);
9758        } else
9759          return super.setProperty(name, value);
9760        return value;
9761      }
9762
9763      @Override
9764      public Base makeProperty(int hash, String name) throws FHIRException {
9765        switch (hash) {
9766        case 3373707:  return getNameElement();
9767        case -1724546052:  return getDescriptionElement();
9768        case -1422950858:  return addAction(); 
9769        default: return super.makeProperty(hash, name);
9770        }
9771
9772      }
9773
9774      @Override
9775      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
9776        switch (hash) {
9777        case 3373707: /*name*/ return new String[] {"string"};
9778        case -1724546052: /*description*/ return new String[] {"string"};
9779        case -1422950858: /*action*/ return new String[] {};
9780        default: return super.getTypesForProperty(hash, name);
9781        }
9782
9783      }
9784
9785      @Override
9786      public Base addChild(String name) throws FHIRException {
9787        if (name.equals("name")) {
9788          throw new FHIRException("Cannot call addChild on a primitive type TestScript.name");
9789        }
9790        else if (name.equals("description")) {
9791          throw new FHIRException("Cannot call addChild on a primitive type TestScript.description");
9792        }
9793        else if (name.equals("action")) {
9794          return addAction();
9795        }
9796        else
9797          return super.addChild(name);
9798      }
9799
9800      public TestScriptTestComponent copy() {
9801        TestScriptTestComponent dst = new TestScriptTestComponent();
9802        copyValues(dst);
9803        dst.name = name == null ? null : name.copy();
9804        dst.description = description == null ? null : description.copy();
9805        if (action != null) {
9806          dst.action = new ArrayList<TestActionComponent>();
9807          for (TestActionComponent i : action)
9808            dst.action.add(i.copy());
9809        };
9810        return dst;
9811      }
9812
9813      @Override
9814      public boolean equalsDeep(Base other_) {
9815        if (!super.equalsDeep(other_))
9816          return false;
9817        if (!(other_ instanceof TestScriptTestComponent))
9818          return false;
9819        TestScriptTestComponent o = (TestScriptTestComponent) other_;
9820        return compareDeep(name, o.name, true) && compareDeep(description, o.description, true) && compareDeep(action, o.action, true)
9821          ;
9822      }
9823
9824      @Override
9825      public boolean equalsShallow(Base other_) {
9826        if (!super.equalsShallow(other_))
9827          return false;
9828        if (!(other_ instanceof TestScriptTestComponent))
9829          return false;
9830        TestScriptTestComponent o = (TestScriptTestComponent) other_;
9831        return compareValues(name, o.name, true) && compareValues(description, o.description, true);
9832      }
9833
9834      public boolean isEmpty() {
9835        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, description, action
9836          );
9837      }
9838
9839  public String fhirType() {
9840    return "TestScript.test";
9841
9842  }
9843
9844  }
9845
9846    @Block()
9847    public static class TestActionComponent extends BackboneElement implements IBaseBackboneElement {
9848        /**
9849         * An operation would involve a REST request to a server.
9850         */
9851        @Child(name = "operation", type = {SetupActionOperationComponent.class}, order=1, min=0, max=1, modifier=false, summary=false)
9852        @Description(shortDefinition="The setup operation to perform", formalDefinition="An operation would involve a REST request to a server." )
9853        protected SetupActionOperationComponent operation;
9854
9855        /**
9856         * Evaluates the results of previous operations to determine if the server under test behaves appropriately.
9857         */
9858        @Child(name = "assert", type = {SetupActionAssertComponent.class}, order=2, min=0, max=1, modifier=false, summary=false)
9859        @Description(shortDefinition="The setup assertion to perform", formalDefinition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." )
9860        protected SetupActionAssertComponent assert_;
9861
9862        private static final long serialVersionUID = -252088305L;
9863
9864    /**
9865     * Constructor
9866     */
9867      public TestActionComponent() {
9868        super();
9869      }
9870
9871        /**
9872         * @return {@link #operation} (An operation would involve a REST request to a server.)
9873         */
9874        public SetupActionOperationComponent getOperation() { 
9875          if (this.operation == null)
9876            if (Configuration.errorOnAutoCreate())
9877              throw new Error("Attempt to auto-create TestActionComponent.operation");
9878            else if (Configuration.doAutoCreate())
9879              this.operation = new SetupActionOperationComponent(); // cc
9880          return this.operation;
9881        }
9882
9883        public boolean hasOperation() { 
9884          return this.operation != null && !this.operation.isEmpty();
9885        }
9886
9887        /**
9888         * @param value {@link #operation} (An operation would involve a REST request to a server.)
9889         */
9890        public TestActionComponent setOperation(SetupActionOperationComponent value) { 
9891          this.operation = value;
9892          return this;
9893        }
9894
9895        /**
9896         * @return {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.)
9897         */
9898        public SetupActionAssertComponent getAssert() { 
9899          if (this.assert_ == null)
9900            if (Configuration.errorOnAutoCreate())
9901              throw new Error("Attempt to auto-create TestActionComponent.assert_");
9902            else if (Configuration.doAutoCreate())
9903              this.assert_ = new SetupActionAssertComponent(); // cc
9904          return this.assert_;
9905        }
9906
9907        public boolean hasAssert() { 
9908          return this.assert_ != null && !this.assert_.isEmpty();
9909        }
9910
9911        /**
9912         * @param value {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.)
9913         */
9914        public TestActionComponent setAssert(SetupActionAssertComponent value) { 
9915          this.assert_ = value;
9916          return this;
9917        }
9918
9919        protected void listChildren(List<Property> children) {
9920          super.listChildren(children);
9921          children.add(new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation));
9922          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_));
9923        }
9924
9925        @Override
9926        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
9927          switch (_hash) {
9928          case 1662702951: /*operation*/  return new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation);
9929          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_);
9930          default: return super.getNamedProperty(_hash, _name, _checkValid);
9931          }
9932
9933        }
9934
9935      @Override
9936      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
9937        switch (hash) {
9938        case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent
9939        case -1408208058: /*assert*/ return this.assert_ == null ? new Base[0] : new Base[] {this.assert_}; // SetupActionAssertComponent
9940        default: return super.getProperty(hash, name, checkValid);
9941        }
9942
9943      }
9944
9945      @Override
9946      public Base setProperty(int hash, String name, Base value) throws FHIRException {
9947        switch (hash) {
9948        case 1662702951: // operation
9949          this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
9950          return value;
9951        case -1408208058: // assert
9952          this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
9953          return value;
9954        default: return super.setProperty(hash, name, value);
9955        }
9956
9957      }
9958
9959      @Override
9960      public Base setProperty(String name, Base value) throws FHIRException {
9961        if (name.equals("operation")) {
9962          this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
9963        } else if (name.equals("assert")) {
9964          this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
9965        } else
9966          return super.setProperty(name, value);
9967        return value;
9968      }
9969
9970      @Override
9971      public Base makeProperty(int hash, String name) throws FHIRException {
9972        switch (hash) {
9973        case 1662702951:  return getOperation(); 
9974        case -1408208058:  return getAssert(); 
9975        default: return super.makeProperty(hash, name);
9976        }
9977
9978      }
9979
9980      @Override
9981      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
9982        switch (hash) {
9983        case 1662702951: /*operation*/ return new String[] {"@TestScript.setup.action.operation"};
9984        case -1408208058: /*assert*/ return new String[] {"@TestScript.setup.action.assert"};
9985        default: return super.getTypesForProperty(hash, name);
9986        }
9987
9988      }
9989
9990      @Override
9991      public Base addChild(String name) throws FHIRException {
9992        if (name.equals("operation")) {
9993          this.operation = new SetupActionOperationComponent();
9994          return this.operation;
9995        }
9996        else if (name.equals("assert")) {
9997          this.assert_ = new SetupActionAssertComponent();
9998          return this.assert_;
9999        }
10000        else
10001          return super.addChild(name);
10002      }
10003
10004      public TestActionComponent copy() {
10005        TestActionComponent dst = new TestActionComponent();
10006        copyValues(dst);
10007        dst.operation = operation == null ? null : operation.copy();
10008        dst.assert_ = assert_ == null ? null : assert_.copy();
10009        return dst;
10010      }
10011
10012      @Override
10013      public boolean equalsDeep(Base other_) {
10014        if (!super.equalsDeep(other_))
10015          return false;
10016        if (!(other_ instanceof TestActionComponent))
10017          return false;
10018        TestActionComponent o = (TestActionComponent) other_;
10019        return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true);
10020      }
10021
10022      @Override
10023      public boolean equalsShallow(Base other_) {
10024        if (!super.equalsShallow(other_))
10025          return false;
10026        if (!(other_ instanceof TestActionComponent))
10027          return false;
10028        TestActionComponent o = (TestActionComponent) other_;
10029        return true;
10030      }
10031
10032      public boolean isEmpty() {
10033        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation, assert_);
10034      }
10035
10036  public String fhirType() {
10037    return "TestScript.test.action";
10038
10039  }
10040
10041  }
10042
10043    @Block()
10044    public static class TestScriptTeardownComponent extends BackboneElement implements IBaseBackboneElement {
10045        /**
10046         * The teardown action will only contain an operation.
10047         */
10048        @Child(name = "action", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
10049        @Description(shortDefinition="One or more teardown operations to perform", formalDefinition="The teardown action will only contain an operation." )
10050        protected List<TeardownActionComponent> action;
10051
10052        private static final long serialVersionUID = 1168638089L;
10053
10054    /**
10055     * Constructor
10056     */
10057      public TestScriptTeardownComponent() {
10058        super();
10059      }
10060
10061        /**
10062         * @return {@link #action} (The teardown action will only contain an operation.)
10063         */
10064        public List<TeardownActionComponent> getAction() { 
10065          if (this.action == null)
10066            this.action = new ArrayList<TeardownActionComponent>();
10067          return this.action;
10068        }
10069
10070        /**
10071         * @return Returns a reference to <code>this</code> for easy method chaining
10072         */
10073        public TestScriptTeardownComponent setAction(List<TeardownActionComponent> theAction) { 
10074          this.action = theAction;
10075          return this;
10076        }
10077
10078        public boolean hasAction() { 
10079          if (this.action == null)
10080            return false;
10081          for (TeardownActionComponent item : this.action)
10082            if (!item.isEmpty())
10083              return true;
10084          return false;
10085        }
10086
10087        public TeardownActionComponent addAction() { //3
10088          TeardownActionComponent t = new TeardownActionComponent();
10089          if (this.action == null)
10090            this.action = new ArrayList<TeardownActionComponent>();
10091          this.action.add(t);
10092          return t;
10093        }
10094
10095        public TestScriptTeardownComponent addAction(TeardownActionComponent t) { //3
10096          if (t == null)
10097            return this;
10098          if (this.action == null)
10099            this.action = new ArrayList<TeardownActionComponent>();
10100          this.action.add(t);
10101          return this;
10102        }
10103
10104        /**
10105         * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist
10106         */
10107        public TeardownActionComponent getActionFirstRep() { 
10108          if (getAction().isEmpty()) {
10109            addAction();
10110          }
10111          return getAction().get(0);
10112        }
10113
10114        protected void listChildren(List<Property> children) {
10115          super.listChildren(children);
10116          children.add(new Property("action", "", "The teardown action will only contain an operation.", 0, java.lang.Integer.MAX_VALUE, action));
10117        }
10118
10119        @Override
10120        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
10121          switch (_hash) {
10122          case -1422950858: /*action*/  return new Property("action", "", "The teardown action will only contain an operation.", 0, java.lang.Integer.MAX_VALUE, action);
10123          default: return super.getNamedProperty(_hash, _name, _checkValid);
10124          }
10125
10126        }
10127
10128      @Override
10129      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
10130        switch (hash) {
10131        case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // TeardownActionComponent
10132        default: return super.getProperty(hash, name, checkValid);
10133        }
10134
10135      }
10136
10137      @Override
10138      public Base setProperty(int hash, String name, Base value) throws FHIRException {
10139        switch (hash) {
10140        case -1422950858: // action
10141          this.getAction().add((TeardownActionComponent) value); // TeardownActionComponent
10142          return value;
10143        default: return super.setProperty(hash, name, value);
10144        }
10145
10146      }
10147
10148      @Override
10149      public Base setProperty(String name, Base value) throws FHIRException {
10150        if (name.equals("action")) {
10151          this.getAction().add((TeardownActionComponent) value);
10152        } else
10153          return super.setProperty(name, value);
10154        return value;
10155      }
10156
10157      @Override
10158      public Base makeProperty(int hash, String name) throws FHIRException {
10159        switch (hash) {
10160        case -1422950858:  return addAction(); 
10161        default: return super.makeProperty(hash, name);
10162        }
10163
10164      }
10165
10166      @Override
10167      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
10168        switch (hash) {
10169        case -1422950858: /*action*/ return new String[] {};
10170        default: return super.getTypesForProperty(hash, name);
10171        }
10172
10173      }
10174
10175      @Override
10176      public Base addChild(String name) throws FHIRException {
10177        if (name.equals("action")) {
10178          return addAction();
10179        }
10180        else
10181          return super.addChild(name);
10182      }
10183
10184      public TestScriptTeardownComponent copy() {
10185        TestScriptTeardownComponent dst = new TestScriptTeardownComponent();
10186        copyValues(dst);
10187        if (action != null) {
10188          dst.action = new ArrayList<TeardownActionComponent>();
10189          for (TeardownActionComponent i : action)
10190            dst.action.add(i.copy());
10191        };
10192        return dst;
10193      }
10194
10195      @Override
10196      public boolean equalsDeep(Base other_) {
10197        if (!super.equalsDeep(other_))
10198          return false;
10199        if (!(other_ instanceof TestScriptTeardownComponent))
10200          return false;
10201        TestScriptTeardownComponent o = (TestScriptTeardownComponent) other_;
10202        return compareDeep(action, o.action, true);
10203      }
10204
10205      @Override
10206      public boolean equalsShallow(Base other_) {
10207        if (!super.equalsShallow(other_))
10208          return false;
10209        if (!(other_ instanceof TestScriptTeardownComponent))
10210          return false;
10211        TestScriptTeardownComponent o = (TestScriptTeardownComponent) other_;
10212        return true;
10213      }
10214
10215      public boolean isEmpty() {
10216        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(action);
10217      }
10218
10219  public String fhirType() {
10220    return "TestScript.teardown";
10221
10222  }
10223
10224  }
10225
10226    @Block()
10227    public static class TeardownActionComponent extends BackboneElement implements IBaseBackboneElement {
10228        /**
10229         * An operation would involve a REST request to a server.
10230         */
10231        @Child(name = "operation", type = {SetupActionOperationComponent.class}, order=1, min=1, max=1, modifier=false, summary=false)
10232        @Description(shortDefinition="The teardown operation to perform", formalDefinition="An operation would involve a REST request to a server." )
10233        protected SetupActionOperationComponent operation;
10234
10235        private static final long serialVersionUID = -1099598054L;
10236
10237    /**
10238     * Constructor
10239     */
10240      public TeardownActionComponent() {
10241        super();
10242      }
10243
10244    /**
10245     * Constructor
10246     */
10247      public TeardownActionComponent(SetupActionOperationComponent operation) {
10248        super();
10249        this.operation = operation;
10250      }
10251
10252        /**
10253         * @return {@link #operation} (An operation would involve a REST request to a server.)
10254         */
10255        public SetupActionOperationComponent getOperation() { 
10256          if (this.operation == null)
10257            if (Configuration.errorOnAutoCreate())
10258              throw new Error("Attempt to auto-create TeardownActionComponent.operation");
10259            else if (Configuration.doAutoCreate())
10260              this.operation = new SetupActionOperationComponent(); // cc
10261          return this.operation;
10262        }
10263
10264        public boolean hasOperation() { 
10265          return this.operation != null && !this.operation.isEmpty();
10266        }
10267
10268        /**
10269         * @param value {@link #operation} (An operation would involve a REST request to a server.)
10270         */
10271        public TeardownActionComponent setOperation(SetupActionOperationComponent value) { 
10272          this.operation = value;
10273          return this;
10274        }
10275
10276        protected void listChildren(List<Property> children) {
10277          super.listChildren(children);
10278          children.add(new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation));
10279        }
10280
10281        @Override
10282        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
10283          switch (_hash) {
10284          case 1662702951: /*operation*/  return new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation);
10285          default: return super.getNamedProperty(_hash, _name, _checkValid);
10286          }
10287
10288        }
10289
10290      @Override
10291      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
10292        switch (hash) {
10293        case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent
10294        default: return super.getProperty(hash, name, checkValid);
10295        }
10296
10297      }
10298
10299      @Override
10300      public Base setProperty(int hash, String name, Base value) throws FHIRException {
10301        switch (hash) {
10302        case 1662702951: // operation
10303          this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
10304          return value;
10305        default: return super.setProperty(hash, name, value);
10306        }
10307
10308      }
10309
10310      @Override
10311      public Base setProperty(String name, Base value) throws FHIRException {
10312        if (name.equals("operation")) {
10313          this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
10314        } else
10315          return super.setProperty(name, value);
10316        return value;
10317      }
10318
10319      @Override
10320      public Base makeProperty(int hash, String name) throws FHIRException {
10321        switch (hash) {
10322        case 1662702951:  return getOperation(); 
10323        default: return super.makeProperty(hash, name);
10324        }
10325
10326      }
10327
10328      @Override
10329      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
10330        switch (hash) {
10331        case 1662702951: /*operation*/ return new String[] {"@TestScript.setup.action.operation"};
10332        default: return super.getTypesForProperty(hash, name);
10333        }
10334
10335      }
10336
10337      @Override
10338      public Base addChild(String name) throws FHIRException {
10339        if (name.equals("operation")) {
10340          this.operation = new SetupActionOperationComponent();
10341          return this.operation;
10342        }
10343        else
10344          return super.addChild(name);
10345      }
10346
10347      public TeardownActionComponent copy() {
10348        TeardownActionComponent dst = new TeardownActionComponent();
10349        copyValues(dst);
10350        dst.operation = operation == null ? null : operation.copy();
10351        return dst;
10352      }
10353
10354      @Override
10355      public boolean equalsDeep(Base other_) {
10356        if (!super.equalsDeep(other_))
10357          return false;
10358        if (!(other_ instanceof TeardownActionComponent))
10359          return false;
10360        TeardownActionComponent o = (TeardownActionComponent) other_;
10361        return compareDeep(operation, o.operation, true);
10362      }
10363
10364      @Override
10365      public boolean equalsShallow(Base other_) {
10366        if (!super.equalsShallow(other_))
10367          return false;
10368        if (!(other_ instanceof TeardownActionComponent))
10369          return false;
10370        TeardownActionComponent o = (TeardownActionComponent) other_;
10371        return true;
10372      }
10373
10374      public boolean isEmpty() {
10375        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation);
10376      }
10377
10378  public String fhirType() {
10379    return "TestScript.teardown.action";
10380
10381  }
10382
10383  }
10384
10385    /**
10386     * 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.
10387     */
10388    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true)
10389    @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." )
10390    protected Identifier identifier;
10391
10392    /**
10393     * Explanation of why this test script is needed and why it has been designed as it has.
10394     */
10395    @Child(name = "purpose", type = {MarkdownType.class}, order=1, min=0, max=1, modifier=false, summary=false)
10396    @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." )
10397    protected MarkdownType purpose;
10398
10399    /**
10400     * 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.
10401     */
10402    @Child(name = "copyright", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false)
10403    @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." )
10404    protected MarkdownType copyright;
10405
10406    /**
10407     * An abstract server used in operations within this test script in the origin element.
10408     */
10409    @Child(name = "origin", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
10410    @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." )
10411    protected List<TestScriptOriginComponent> origin;
10412
10413    /**
10414     * An abstract server used in operations within this test script in the destination element.
10415     */
10416    @Child(name = "destination", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
10417    @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." )
10418    protected List<TestScriptDestinationComponent> destination;
10419
10420    /**
10421     * The required capability must exist and are assumed to function correctly on the FHIR server being tested.
10422     */
10423    @Child(name = "metadata", type = {}, order=5, min=0, max=1, modifier=false, summary=false)
10424    @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." )
10425    protected TestScriptMetadataComponent metadata;
10426
10427    /**
10428     * Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.
10429     */
10430    @Child(name = "fixture", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
10431    @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." )
10432    protected List<TestScriptFixtureComponent> fixture;
10433
10434    /**
10435     * Reference to the profile to be used for validation.
10436     */
10437    @Child(name = "profile", type = {Reference.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
10438    @Description(shortDefinition="Reference of the validation profile", formalDefinition="Reference to the profile to be used for validation." )
10439    protected List<Reference> profile;
10440    /**
10441     * The actual objects that are the target of the reference (Reference to the profile to be used for validation.)
10442     */
10443    protected List<Resource> profileTarget;
10444
10445
10446    /**
10447     * Variable is set based either on element value in response body or on header field value in the response headers.
10448     */
10449    @Child(name = "variable", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
10450    @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." )
10451    protected List<TestScriptVariableComponent> variable;
10452
10453    /**
10454     * Assert rule to be used in one or more asserts within the test script.
10455     */
10456    @Child(name = "rule", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
10457    @Description(shortDefinition="Assert rule used within the test script", formalDefinition="Assert rule to be used in one or more asserts within the test script." )
10458    protected List<TestScriptRuleComponent> rule;
10459
10460    /**
10461     * Contains one or more rules.  Offers a way to group rules so assertions could reference the group of rules and have them all applied.
10462     */
10463    @Child(name = "ruleset", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
10464    @Description(shortDefinition="Assert ruleset used within the test script", formalDefinition="Contains one or more rules.  Offers a way to group rules so assertions could reference the group of rules and have them all applied." )
10465    protected List<TestScriptRulesetComponent> ruleset;
10466
10467    /**
10468     * A series of required setup operations before tests are executed.
10469     */
10470    @Child(name = "setup", type = {}, order=11, min=0, max=1, modifier=false, summary=false)
10471    @Description(shortDefinition="A series of required setup operations before tests are executed", formalDefinition="A series of required setup operations before tests are executed." )
10472    protected TestScriptSetupComponent setup;
10473
10474    /**
10475     * A test in this script.
10476     */
10477    @Child(name = "test", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
10478    @Description(shortDefinition="A test in this script", formalDefinition="A test in this script." )
10479    protected List<TestScriptTestComponent> test;
10480
10481    /**
10482     * A series of operations required to clean up after all the tests are executed (successfully or otherwise).
10483     */
10484    @Child(name = "teardown", type = {}, order=13, min=0, max=1, modifier=false, summary=false)
10485    @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)." )
10486    protected TestScriptTeardownComponent teardown;
10487
10488    private static final long serialVersionUID = 1164952373L;
10489
10490  /**
10491   * Constructor
10492   */
10493    public TestScript() {
10494      super();
10495    }
10496
10497  /**
10498   * Constructor
10499   */
10500    public TestScript(UriType url, StringType name, Enumeration<PublicationStatus> status) {
10501      super();
10502      this.url = url;
10503      this.name = name;
10504      this.status = status;
10505    }
10506
10507    /**
10508     * @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
10509     */
10510    public UriType getUrlElement() { 
10511      if (this.url == null)
10512        if (Configuration.errorOnAutoCreate())
10513          throw new Error("Attempt to auto-create TestScript.url");
10514        else if (Configuration.doAutoCreate())
10515          this.url = new UriType(); // bb
10516      return this.url;
10517    }
10518
10519    public boolean hasUrlElement() { 
10520      return this.url != null && !this.url.isEmpty();
10521    }
10522
10523    public boolean hasUrl() { 
10524      return this.url != null && !this.url.isEmpty();
10525    }
10526
10527    /**
10528     * @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
10529     */
10530    public TestScript setUrlElement(UriType value) { 
10531      this.url = value;
10532      return this;
10533    }
10534
10535    /**
10536     * @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.
10537     */
10538    public String getUrl() { 
10539      return this.url == null ? null : this.url.getValue();
10540    }
10541
10542    /**
10543     * @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.
10544     */
10545    public TestScript setUrl(String value) { 
10546        if (this.url == null)
10547          this.url = new UriType();
10548        this.url.setValue(value);
10549      return this;
10550    }
10551
10552    /**
10553     * @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.)
10554     */
10555    public Identifier getIdentifier() { 
10556      if (this.identifier == null)
10557        if (Configuration.errorOnAutoCreate())
10558          throw new Error("Attempt to auto-create TestScript.identifier");
10559        else if (Configuration.doAutoCreate())
10560          this.identifier = new Identifier(); // cc
10561      return this.identifier;
10562    }
10563
10564    public boolean hasIdentifier() { 
10565      return this.identifier != null && !this.identifier.isEmpty();
10566    }
10567
10568    /**
10569     * @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.)
10570     */
10571    public TestScript setIdentifier(Identifier value) { 
10572      this.identifier = value;
10573      return this;
10574    }
10575
10576    /**
10577     * @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
10578     */
10579    public StringType getVersionElement() { 
10580      if (this.version == null)
10581        if (Configuration.errorOnAutoCreate())
10582          throw new Error("Attempt to auto-create TestScript.version");
10583        else if (Configuration.doAutoCreate())
10584          this.version = new StringType(); // bb
10585      return this.version;
10586    }
10587
10588    public boolean hasVersionElement() { 
10589      return this.version != null && !this.version.isEmpty();
10590    }
10591
10592    public boolean hasVersion() { 
10593      return this.version != null && !this.version.isEmpty();
10594    }
10595
10596    /**
10597     * @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
10598     */
10599    public TestScript setVersionElement(StringType value) { 
10600      this.version = value;
10601      return this;
10602    }
10603
10604    /**
10605     * @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.
10606     */
10607    public String getVersion() { 
10608      return this.version == null ? null : this.version.getValue();
10609    }
10610
10611    /**
10612     * @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.
10613     */
10614    public TestScript setVersion(String value) { 
10615      if (Utilities.noString(value))
10616        this.version = null;
10617      else {
10618        if (this.version == null)
10619          this.version = new StringType();
10620        this.version.setValue(value);
10621      }
10622      return this;
10623    }
10624
10625    /**
10626     * @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
10627     */
10628    public StringType getNameElement() { 
10629      if (this.name == null)
10630        if (Configuration.errorOnAutoCreate())
10631          throw new Error("Attempt to auto-create TestScript.name");
10632        else if (Configuration.doAutoCreate())
10633          this.name = new StringType(); // bb
10634      return this.name;
10635    }
10636
10637    public boolean hasNameElement() { 
10638      return this.name != null && !this.name.isEmpty();
10639    }
10640
10641    public boolean hasName() { 
10642      return this.name != null && !this.name.isEmpty();
10643    }
10644
10645    /**
10646     * @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
10647     */
10648    public TestScript setNameElement(StringType value) { 
10649      this.name = value;
10650      return this;
10651    }
10652
10653    /**
10654     * @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.
10655     */
10656    public String getName() { 
10657      return this.name == null ? null : this.name.getValue();
10658    }
10659
10660    /**
10661     * @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.
10662     */
10663    public TestScript setName(String value) { 
10664        if (this.name == null)
10665          this.name = new StringType();
10666        this.name.setValue(value);
10667      return this;
10668    }
10669
10670    /**
10671     * @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
10672     */
10673    public StringType getTitleElement() { 
10674      if (this.title == null)
10675        if (Configuration.errorOnAutoCreate())
10676          throw new Error("Attempt to auto-create TestScript.title");
10677        else if (Configuration.doAutoCreate())
10678          this.title = new StringType(); // bb
10679      return this.title;
10680    }
10681
10682    public boolean hasTitleElement() { 
10683      return this.title != null && !this.title.isEmpty();
10684    }
10685
10686    public boolean hasTitle() { 
10687      return this.title != null && !this.title.isEmpty();
10688    }
10689
10690    /**
10691     * @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
10692     */
10693    public TestScript setTitleElement(StringType value) { 
10694      this.title = value;
10695      return this;
10696    }
10697
10698    /**
10699     * @return A short, descriptive, user-friendly title for the test script.
10700     */
10701    public String getTitle() { 
10702      return this.title == null ? null : this.title.getValue();
10703    }
10704
10705    /**
10706     * @param value A short, descriptive, user-friendly title for the test script.
10707     */
10708    public TestScript setTitle(String value) { 
10709      if (Utilities.noString(value))
10710        this.title = null;
10711      else {
10712        if (this.title == null)
10713          this.title = new StringType();
10714        this.title.setValue(value);
10715      }
10716      return this;
10717    }
10718
10719    /**
10720     * @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
10721     */
10722    public Enumeration<PublicationStatus> getStatusElement() { 
10723      if (this.status == null)
10724        if (Configuration.errorOnAutoCreate())
10725          throw new Error("Attempt to auto-create TestScript.status");
10726        else if (Configuration.doAutoCreate())
10727          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
10728      return this.status;
10729    }
10730
10731    public boolean hasStatusElement() { 
10732      return this.status != null && !this.status.isEmpty();
10733    }
10734
10735    public boolean hasStatus() { 
10736      return this.status != null && !this.status.isEmpty();
10737    }
10738
10739    /**
10740     * @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
10741     */
10742    public TestScript setStatusElement(Enumeration<PublicationStatus> value) { 
10743      this.status = value;
10744      return this;
10745    }
10746
10747    /**
10748     * @return The status of this test script. Enables tracking the life-cycle of the content.
10749     */
10750    public PublicationStatus getStatus() { 
10751      return this.status == null ? null : this.status.getValue();
10752    }
10753
10754    /**
10755     * @param value The status of this test script. Enables tracking the life-cycle of the content.
10756     */
10757    public TestScript setStatus(PublicationStatus value) { 
10758        if (this.status == null)
10759          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
10760        this.status.setValue(value);
10761      return this;
10762    }
10763
10764    /**
10765     * @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
10766     */
10767    public BooleanType getExperimentalElement() { 
10768      if (this.experimental == null)
10769        if (Configuration.errorOnAutoCreate())
10770          throw new Error("Attempt to auto-create TestScript.experimental");
10771        else if (Configuration.doAutoCreate())
10772          this.experimental = new BooleanType(); // bb
10773      return this.experimental;
10774    }
10775
10776    public boolean hasExperimentalElement() { 
10777      return this.experimental != null && !this.experimental.isEmpty();
10778    }
10779
10780    public boolean hasExperimental() { 
10781      return this.experimental != null && !this.experimental.isEmpty();
10782    }
10783
10784    /**
10785     * @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
10786     */
10787    public TestScript setExperimentalElement(BooleanType value) { 
10788      this.experimental = value;
10789      return this;
10790    }
10791
10792    /**
10793     * @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.
10794     */
10795    public boolean getExperimental() { 
10796      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
10797    }
10798
10799    /**
10800     * @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.
10801     */
10802    public TestScript setExperimental(boolean value) { 
10803        if (this.experimental == null)
10804          this.experimental = new BooleanType();
10805        this.experimental.setValue(value);
10806      return this;
10807    }
10808
10809    /**
10810     * @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
10811     */
10812    public DateTimeType getDateElement() { 
10813      if (this.date == null)
10814        if (Configuration.errorOnAutoCreate())
10815          throw new Error("Attempt to auto-create TestScript.date");
10816        else if (Configuration.doAutoCreate())
10817          this.date = new DateTimeType(); // bb
10818      return this.date;
10819    }
10820
10821    public boolean hasDateElement() { 
10822      return this.date != null && !this.date.isEmpty();
10823    }
10824
10825    public boolean hasDate() { 
10826      return this.date != null && !this.date.isEmpty();
10827    }
10828
10829    /**
10830     * @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
10831     */
10832    public TestScript setDateElement(DateTimeType value) { 
10833      this.date = value;
10834      return this;
10835    }
10836
10837    /**
10838     * @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.
10839     */
10840    public Date getDate() { 
10841      return this.date == null ? null : this.date.getValue();
10842    }
10843
10844    /**
10845     * @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.
10846     */
10847    public TestScript setDate(Date value) { 
10848      if (value == null)
10849        this.date = null;
10850      else {
10851        if (this.date == null)
10852          this.date = new DateTimeType();
10853        this.date.setValue(value);
10854      }
10855      return this;
10856    }
10857
10858    /**
10859     * @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
10860     */
10861    public StringType getPublisherElement() { 
10862      if (this.publisher == null)
10863        if (Configuration.errorOnAutoCreate())
10864          throw new Error("Attempt to auto-create TestScript.publisher");
10865        else if (Configuration.doAutoCreate())
10866          this.publisher = new StringType(); // bb
10867      return this.publisher;
10868    }
10869
10870    public boolean hasPublisherElement() { 
10871      return this.publisher != null && !this.publisher.isEmpty();
10872    }
10873
10874    public boolean hasPublisher() { 
10875      return this.publisher != null && !this.publisher.isEmpty();
10876    }
10877
10878    /**
10879     * @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
10880     */
10881    public TestScript setPublisherElement(StringType value) { 
10882      this.publisher = value;
10883      return this;
10884    }
10885
10886    /**
10887     * @return The name of the organization or individual that published the test script.
10888     */
10889    public String getPublisher() { 
10890      return this.publisher == null ? null : this.publisher.getValue();
10891    }
10892
10893    /**
10894     * @param value The name of the organization or individual that published the test script.
10895     */
10896    public TestScript setPublisher(String value) { 
10897      if (Utilities.noString(value))
10898        this.publisher = null;
10899      else {
10900        if (this.publisher == null)
10901          this.publisher = new StringType();
10902        this.publisher.setValue(value);
10903      }
10904      return this;
10905    }
10906
10907    /**
10908     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
10909     */
10910    public List<ContactDetail> getContact() { 
10911      if (this.contact == null)
10912        this.contact = new ArrayList<ContactDetail>();
10913      return this.contact;
10914    }
10915
10916    /**
10917     * @return Returns a reference to <code>this</code> for easy method chaining
10918     */
10919    public TestScript setContact(List<ContactDetail> theContact) { 
10920      this.contact = theContact;
10921      return this;
10922    }
10923
10924    public boolean hasContact() { 
10925      if (this.contact == null)
10926        return false;
10927      for (ContactDetail item : this.contact)
10928        if (!item.isEmpty())
10929          return true;
10930      return false;
10931    }
10932
10933    public ContactDetail addContact() { //3
10934      ContactDetail t = new ContactDetail();
10935      if (this.contact == null)
10936        this.contact = new ArrayList<ContactDetail>();
10937      this.contact.add(t);
10938      return t;
10939    }
10940
10941    public TestScript addContact(ContactDetail t) { //3
10942      if (t == null)
10943        return this;
10944      if (this.contact == null)
10945        this.contact = new ArrayList<ContactDetail>();
10946      this.contact.add(t);
10947      return this;
10948    }
10949
10950    /**
10951     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
10952     */
10953    public ContactDetail getContactFirstRep() { 
10954      if (getContact().isEmpty()) {
10955        addContact();
10956      }
10957      return getContact().get(0);
10958    }
10959
10960    /**
10961     * @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
10962     */
10963    public MarkdownType getDescriptionElement() { 
10964      if (this.description == null)
10965        if (Configuration.errorOnAutoCreate())
10966          throw new Error("Attempt to auto-create TestScript.description");
10967        else if (Configuration.doAutoCreate())
10968          this.description = new MarkdownType(); // bb
10969      return this.description;
10970    }
10971
10972    public boolean hasDescriptionElement() { 
10973      return this.description != null && !this.description.isEmpty();
10974    }
10975
10976    public boolean hasDescription() { 
10977      return this.description != null && !this.description.isEmpty();
10978    }
10979
10980    /**
10981     * @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
10982     */
10983    public TestScript setDescriptionElement(MarkdownType value) { 
10984      this.description = value;
10985      return this;
10986    }
10987
10988    /**
10989     * @return A free text natural language description of the test script from a consumer's perspective.
10990     */
10991    public String getDescription() { 
10992      return this.description == null ? null : this.description.getValue();
10993    }
10994
10995    /**
10996     * @param value A free text natural language description of the test script from a consumer's perspective.
10997     */
10998    public TestScript setDescription(String value) { 
10999      if (value == null)
11000        this.description = null;
11001      else {
11002        if (this.description == null)
11003          this.description = new MarkdownType();
11004        this.description.setValue(value);
11005      }
11006      return this;
11007    }
11008
11009    /**
11010     * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate test script instances.)
11011     */
11012    public List<UsageContext> getUseContext() { 
11013      if (this.useContext == null)
11014        this.useContext = new ArrayList<UsageContext>();
11015      return this.useContext;
11016    }
11017
11018    /**
11019     * @return Returns a reference to <code>this</code> for easy method chaining
11020     */
11021    public TestScript setUseContext(List<UsageContext> theUseContext) { 
11022      this.useContext = theUseContext;
11023      return this;
11024    }
11025
11026    public boolean hasUseContext() { 
11027      if (this.useContext == null)
11028        return false;
11029      for (UsageContext item : this.useContext)
11030        if (!item.isEmpty())
11031          return true;
11032      return false;
11033    }
11034
11035    public UsageContext addUseContext() { //3
11036      UsageContext t = new UsageContext();
11037      if (this.useContext == null)
11038        this.useContext = new ArrayList<UsageContext>();
11039      this.useContext.add(t);
11040      return t;
11041    }
11042
11043    public TestScript addUseContext(UsageContext t) { //3
11044      if (t == null)
11045        return this;
11046      if (this.useContext == null)
11047        this.useContext = new ArrayList<UsageContext>();
11048      this.useContext.add(t);
11049      return this;
11050    }
11051
11052    /**
11053     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist
11054     */
11055    public UsageContext getUseContextFirstRep() { 
11056      if (getUseContext().isEmpty()) {
11057        addUseContext();
11058      }
11059      return getUseContext().get(0);
11060    }
11061
11062    /**
11063     * @return {@link #jurisdiction} (A legal or geographic region in which the test script is intended to be used.)
11064     */
11065    public List<CodeableConcept> getJurisdiction() { 
11066      if (this.jurisdiction == null)
11067        this.jurisdiction = new ArrayList<CodeableConcept>();
11068      return this.jurisdiction;
11069    }
11070
11071    /**
11072     * @return Returns a reference to <code>this</code> for easy method chaining
11073     */
11074    public TestScript setJurisdiction(List<CodeableConcept> theJurisdiction) { 
11075      this.jurisdiction = theJurisdiction;
11076      return this;
11077    }
11078
11079    public boolean hasJurisdiction() { 
11080      if (this.jurisdiction == null)
11081        return false;
11082      for (CodeableConcept item : this.jurisdiction)
11083        if (!item.isEmpty())
11084          return true;
11085      return false;
11086    }
11087
11088    public CodeableConcept addJurisdiction() { //3
11089      CodeableConcept t = new CodeableConcept();
11090      if (this.jurisdiction == null)
11091        this.jurisdiction = new ArrayList<CodeableConcept>();
11092      this.jurisdiction.add(t);
11093      return t;
11094    }
11095
11096    public TestScript addJurisdiction(CodeableConcept t) { //3
11097      if (t == null)
11098        return this;
11099      if (this.jurisdiction == null)
11100        this.jurisdiction = new ArrayList<CodeableConcept>();
11101      this.jurisdiction.add(t);
11102      return this;
11103    }
11104
11105    /**
11106     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist
11107     */
11108    public CodeableConcept getJurisdictionFirstRep() { 
11109      if (getJurisdiction().isEmpty()) {
11110        addJurisdiction();
11111      }
11112      return getJurisdiction().get(0);
11113    }
11114
11115    /**
11116     * @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
11117     */
11118    public MarkdownType getPurposeElement() { 
11119      if (this.purpose == null)
11120        if (Configuration.errorOnAutoCreate())
11121          throw new Error("Attempt to auto-create TestScript.purpose");
11122        else if (Configuration.doAutoCreate())
11123          this.purpose = new MarkdownType(); // bb
11124      return this.purpose;
11125    }
11126
11127    public boolean hasPurposeElement() { 
11128      return this.purpose != null && !this.purpose.isEmpty();
11129    }
11130
11131    public boolean hasPurpose() { 
11132      return this.purpose != null && !this.purpose.isEmpty();
11133    }
11134
11135    /**
11136     * @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
11137     */
11138    public TestScript setPurposeElement(MarkdownType value) { 
11139      this.purpose = value;
11140      return this;
11141    }
11142
11143    /**
11144     * @return Explanation of why this test script is needed and why it has been designed as it has.
11145     */
11146    public String getPurpose() { 
11147      return this.purpose == null ? null : this.purpose.getValue();
11148    }
11149
11150    /**
11151     * @param value Explanation of why this test script is needed and why it has been designed as it has.
11152     */
11153    public TestScript setPurpose(String value) { 
11154      if (value == null)
11155        this.purpose = null;
11156      else {
11157        if (this.purpose == null)
11158          this.purpose = new MarkdownType();
11159        this.purpose.setValue(value);
11160      }
11161      return this;
11162    }
11163
11164    /**
11165     * @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
11166     */
11167    public MarkdownType getCopyrightElement() { 
11168      if (this.copyright == null)
11169        if (Configuration.errorOnAutoCreate())
11170          throw new Error("Attempt to auto-create TestScript.copyright");
11171        else if (Configuration.doAutoCreate())
11172          this.copyright = new MarkdownType(); // bb
11173      return this.copyright;
11174    }
11175
11176    public boolean hasCopyrightElement() { 
11177      return this.copyright != null && !this.copyright.isEmpty();
11178    }
11179
11180    public boolean hasCopyright() { 
11181      return this.copyright != null && !this.copyright.isEmpty();
11182    }
11183
11184    /**
11185     * @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
11186     */
11187    public TestScript setCopyrightElement(MarkdownType value) { 
11188      this.copyright = value;
11189      return this;
11190    }
11191
11192    /**
11193     * @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.
11194     */
11195    public String getCopyright() { 
11196      return this.copyright == null ? null : this.copyright.getValue();
11197    }
11198
11199    /**
11200     * @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.
11201     */
11202    public TestScript setCopyright(String value) { 
11203      if (value == null)
11204        this.copyright = null;
11205      else {
11206        if (this.copyright == null)
11207          this.copyright = new MarkdownType();
11208        this.copyright.setValue(value);
11209      }
11210      return this;
11211    }
11212
11213    /**
11214     * @return {@link #origin} (An abstract server used in operations within this test script in the origin element.)
11215     */
11216    public List<TestScriptOriginComponent> getOrigin() { 
11217      if (this.origin == null)
11218        this.origin = new ArrayList<TestScriptOriginComponent>();
11219      return this.origin;
11220    }
11221
11222    /**
11223     * @return Returns a reference to <code>this</code> for easy method chaining
11224     */
11225    public TestScript setOrigin(List<TestScriptOriginComponent> theOrigin) { 
11226      this.origin = theOrigin;
11227      return this;
11228    }
11229
11230    public boolean hasOrigin() { 
11231      if (this.origin == null)
11232        return false;
11233      for (TestScriptOriginComponent item : this.origin)
11234        if (!item.isEmpty())
11235          return true;
11236      return false;
11237    }
11238
11239    public TestScriptOriginComponent addOrigin() { //3
11240      TestScriptOriginComponent t = new TestScriptOriginComponent();
11241      if (this.origin == null)
11242        this.origin = new ArrayList<TestScriptOriginComponent>();
11243      this.origin.add(t);
11244      return t;
11245    }
11246
11247    public TestScript addOrigin(TestScriptOriginComponent t) { //3
11248      if (t == null)
11249        return this;
11250      if (this.origin == null)
11251        this.origin = new ArrayList<TestScriptOriginComponent>();
11252      this.origin.add(t);
11253      return this;
11254    }
11255
11256    /**
11257     * @return The first repetition of repeating field {@link #origin}, creating it if it does not already exist
11258     */
11259    public TestScriptOriginComponent getOriginFirstRep() { 
11260      if (getOrigin().isEmpty()) {
11261        addOrigin();
11262      }
11263      return getOrigin().get(0);
11264    }
11265
11266    /**
11267     * @return {@link #destination} (An abstract server used in operations within this test script in the destination element.)
11268     */
11269    public List<TestScriptDestinationComponent> getDestination() { 
11270      if (this.destination == null)
11271        this.destination = new ArrayList<TestScriptDestinationComponent>();
11272      return this.destination;
11273    }
11274
11275    /**
11276     * @return Returns a reference to <code>this</code> for easy method chaining
11277     */
11278    public TestScript setDestination(List<TestScriptDestinationComponent> theDestination) { 
11279      this.destination = theDestination;
11280      return this;
11281    }
11282
11283    public boolean hasDestination() { 
11284      if (this.destination == null)
11285        return false;
11286      for (TestScriptDestinationComponent item : this.destination)
11287        if (!item.isEmpty())
11288          return true;
11289      return false;
11290    }
11291
11292    public TestScriptDestinationComponent addDestination() { //3
11293      TestScriptDestinationComponent t = new TestScriptDestinationComponent();
11294      if (this.destination == null)
11295        this.destination = new ArrayList<TestScriptDestinationComponent>();
11296      this.destination.add(t);
11297      return t;
11298    }
11299
11300    public TestScript addDestination(TestScriptDestinationComponent t) { //3
11301      if (t == null)
11302        return this;
11303      if (this.destination == null)
11304        this.destination = new ArrayList<TestScriptDestinationComponent>();
11305      this.destination.add(t);
11306      return this;
11307    }
11308
11309    /**
11310     * @return The first repetition of repeating field {@link #destination}, creating it if it does not already exist
11311     */
11312    public TestScriptDestinationComponent getDestinationFirstRep() { 
11313      if (getDestination().isEmpty()) {
11314        addDestination();
11315      }
11316      return getDestination().get(0);
11317    }
11318
11319    /**
11320     * @return {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.)
11321     */
11322    public TestScriptMetadataComponent getMetadata() { 
11323      if (this.metadata == null)
11324        if (Configuration.errorOnAutoCreate())
11325          throw new Error("Attempt to auto-create TestScript.metadata");
11326        else if (Configuration.doAutoCreate())
11327          this.metadata = new TestScriptMetadataComponent(); // cc
11328      return this.metadata;
11329    }
11330
11331    public boolean hasMetadata() { 
11332      return this.metadata != null && !this.metadata.isEmpty();
11333    }
11334
11335    /**
11336     * @param value {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.)
11337     */
11338    public TestScript setMetadata(TestScriptMetadataComponent value) { 
11339      this.metadata = value;
11340      return this;
11341    }
11342
11343    /**
11344     * @return {@link #fixture} (Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.)
11345     */
11346    public List<TestScriptFixtureComponent> getFixture() { 
11347      if (this.fixture == null)
11348        this.fixture = new ArrayList<TestScriptFixtureComponent>();
11349      return this.fixture;
11350    }
11351
11352    /**
11353     * @return Returns a reference to <code>this</code> for easy method chaining
11354     */
11355    public TestScript setFixture(List<TestScriptFixtureComponent> theFixture) { 
11356      this.fixture = theFixture;
11357      return this;
11358    }
11359
11360    public boolean hasFixture() { 
11361      if (this.fixture == null)
11362        return false;
11363      for (TestScriptFixtureComponent item : this.fixture)
11364        if (!item.isEmpty())
11365          return true;
11366      return false;
11367    }
11368
11369    public TestScriptFixtureComponent addFixture() { //3
11370      TestScriptFixtureComponent t = new TestScriptFixtureComponent();
11371      if (this.fixture == null)
11372        this.fixture = new ArrayList<TestScriptFixtureComponent>();
11373      this.fixture.add(t);
11374      return t;
11375    }
11376
11377    public TestScript addFixture(TestScriptFixtureComponent t) { //3
11378      if (t == null)
11379        return this;
11380      if (this.fixture == null)
11381        this.fixture = new ArrayList<TestScriptFixtureComponent>();
11382      this.fixture.add(t);
11383      return this;
11384    }
11385
11386    /**
11387     * @return The first repetition of repeating field {@link #fixture}, creating it if it does not already exist
11388     */
11389    public TestScriptFixtureComponent getFixtureFirstRep() { 
11390      if (getFixture().isEmpty()) {
11391        addFixture();
11392      }
11393      return getFixture().get(0);
11394    }
11395
11396    /**
11397     * @return {@link #profile} (Reference to the profile to be used for validation.)
11398     */
11399    public List<Reference> getProfile() { 
11400      if (this.profile == null)
11401        this.profile = new ArrayList<Reference>();
11402      return this.profile;
11403    }
11404
11405    /**
11406     * @return Returns a reference to <code>this</code> for easy method chaining
11407     */
11408    public TestScript setProfile(List<Reference> theProfile) { 
11409      this.profile = theProfile;
11410      return this;
11411    }
11412
11413    public boolean hasProfile() { 
11414      if (this.profile == null)
11415        return false;
11416      for (Reference item : this.profile)
11417        if (!item.isEmpty())
11418          return true;
11419      return false;
11420    }
11421
11422    public Reference addProfile() { //3
11423      Reference t = new Reference();
11424      if (this.profile == null)
11425        this.profile = new ArrayList<Reference>();
11426      this.profile.add(t);
11427      return t;
11428    }
11429
11430    public TestScript addProfile(Reference t) { //3
11431      if (t == null)
11432        return this;
11433      if (this.profile == null)
11434        this.profile = new ArrayList<Reference>();
11435      this.profile.add(t);
11436      return this;
11437    }
11438
11439    /**
11440     * @return The first repetition of repeating field {@link #profile}, creating it if it does not already exist
11441     */
11442    public Reference getProfileFirstRep() { 
11443      if (getProfile().isEmpty()) {
11444        addProfile();
11445      }
11446      return getProfile().get(0);
11447    }
11448
11449    /**
11450     * @deprecated Use Reference#setResource(IBaseResource) instead
11451     */
11452    @Deprecated
11453    public List<Resource> getProfileTarget() { 
11454      if (this.profileTarget == null)
11455        this.profileTarget = new ArrayList<Resource>();
11456      return this.profileTarget;
11457    }
11458
11459    /**
11460     * @return {@link #variable} (Variable is set based either on element value in response body or on header field value in the response headers.)
11461     */
11462    public List<TestScriptVariableComponent> getVariable() { 
11463      if (this.variable == null)
11464        this.variable = new ArrayList<TestScriptVariableComponent>();
11465      return this.variable;
11466    }
11467
11468    /**
11469     * @return Returns a reference to <code>this</code> for easy method chaining
11470     */
11471    public TestScript setVariable(List<TestScriptVariableComponent> theVariable) { 
11472      this.variable = theVariable;
11473      return this;
11474    }
11475
11476    public boolean hasVariable() { 
11477      if (this.variable == null)
11478        return false;
11479      for (TestScriptVariableComponent item : this.variable)
11480        if (!item.isEmpty())
11481          return true;
11482      return false;
11483    }
11484
11485    public TestScriptVariableComponent addVariable() { //3
11486      TestScriptVariableComponent t = new TestScriptVariableComponent();
11487      if (this.variable == null)
11488        this.variable = new ArrayList<TestScriptVariableComponent>();
11489      this.variable.add(t);
11490      return t;
11491    }
11492
11493    public TestScript addVariable(TestScriptVariableComponent t) { //3
11494      if (t == null)
11495        return this;
11496      if (this.variable == null)
11497        this.variable = new ArrayList<TestScriptVariableComponent>();
11498      this.variable.add(t);
11499      return this;
11500    }
11501
11502    /**
11503     * @return The first repetition of repeating field {@link #variable}, creating it if it does not already exist
11504     */
11505    public TestScriptVariableComponent getVariableFirstRep() { 
11506      if (getVariable().isEmpty()) {
11507        addVariable();
11508      }
11509      return getVariable().get(0);
11510    }
11511
11512    /**
11513     * @return {@link #rule} (Assert rule to be used in one or more asserts within the test script.)
11514     */
11515    public List<TestScriptRuleComponent> getRule() { 
11516      if (this.rule == null)
11517        this.rule = new ArrayList<TestScriptRuleComponent>();
11518      return this.rule;
11519    }
11520
11521    /**
11522     * @return Returns a reference to <code>this</code> for easy method chaining
11523     */
11524    public TestScript setRule(List<TestScriptRuleComponent> theRule) { 
11525      this.rule = theRule;
11526      return this;
11527    }
11528
11529    public boolean hasRule() { 
11530      if (this.rule == null)
11531        return false;
11532      for (TestScriptRuleComponent item : this.rule)
11533        if (!item.isEmpty())
11534          return true;
11535      return false;
11536    }
11537
11538    public TestScriptRuleComponent addRule() { //3
11539      TestScriptRuleComponent t = new TestScriptRuleComponent();
11540      if (this.rule == null)
11541        this.rule = new ArrayList<TestScriptRuleComponent>();
11542      this.rule.add(t);
11543      return t;
11544    }
11545
11546    public TestScript addRule(TestScriptRuleComponent t) { //3
11547      if (t == null)
11548        return this;
11549      if (this.rule == null)
11550        this.rule = new ArrayList<TestScriptRuleComponent>();
11551      this.rule.add(t);
11552      return this;
11553    }
11554
11555    /**
11556     * @return The first repetition of repeating field {@link #rule}, creating it if it does not already exist
11557     */
11558    public TestScriptRuleComponent getRuleFirstRep() { 
11559      if (getRule().isEmpty()) {
11560        addRule();
11561      }
11562      return getRule().get(0);
11563    }
11564
11565    /**
11566     * @return {@link #ruleset} (Contains one or more rules.  Offers a way to group rules so assertions could reference the group of rules and have them all applied.)
11567     */
11568    public List<TestScriptRulesetComponent> getRuleset() { 
11569      if (this.ruleset == null)
11570        this.ruleset = new ArrayList<TestScriptRulesetComponent>();
11571      return this.ruleset;
11572    }
11573
11574    /**
11575     * @return Returns a reference to <code>this</code> for easy method chaining
11576     */
11577    public TestScript setRuleset(List<TestScriptRulesetComponent> theRuleset) { 
11578      this.ruleset = theRuleset;
11579      return this;
11580    }
11581
11582    public boolean hasRuleset() { 
11583      if (this.ruleset == null)
11584        return false;
11585      for (TestScriptRulesetComponent item : this.ruleset)
11586        if (!item.isEmpty())
11587          return true;
11588      return false;
11589    }
11590
11591    public TestScriptRulesetComponent addRuleset() { //3
11592      TestScriptRulesetComponent t = new TestScriptRulesetComponent();
11593      if (this.ruleset == null)
11594        this.ruleset = new ArrayList<TestScriptRulesetComponent>();
11595      this.ruleset.add(t);
11596      return t;
11597    }
11598
11599    public TestScript addRuleset(TestScriptRulesetComponent t) { //3
11600      if (t == null)
11601        return this;
11602      if (this.ruleset == null)
11603        this.ruleset = new ArrayList<TestScriptRulesetComponent>();
11604      this.ruleset.add(t);
11605      return this;
11606    }
11607
11608    /**
11609     * @return The first repetition of repeating field {@link #ruleset}, creating it if it does not already exist
11610     */
11611    public TestScriptRulesetComponent getRulesetFirstRep() { 
11612      if (getRuleset().isEmpty()) {
11613        addRuleset();
11614      }
11615      return getRuleset().get(0);
11616    }
11617
11618    /**
11619     * @return {@link #setup} (A series of required setup operations before tests are executed.)
11620     */
11621    public TestScriptSetupComponent getSetup() { 
11622      if (this.setup == null)
11623        if (Configuration.errorOnAutoCreate())
11624          throw new Error("Attempt to auto-create TestScript.setup");
11625        else if (Configuration.doAutoCreate())
11626          this.setup = new TestScriptSetupComponent(); // cc
11627      return this.setup;
11628    }
11629
11630    public boolean hasSetup() { 
11631      return this.setup != null && !this.setup.isEmpty();
11632    }
11633
11634    /**
11635     * @param value {@link #setup} (A series of required setup operations before tests are executed.)
11636     */
11637    public TestScript setSetup(TestScriptSetupComponent value) { 
11638      this.setup = value;
11639      return this;
11640    }
11641
11642    /**
11643     * @return {@link #test} (A test in this script.)
11644     */
11645    public List<TestScriptTestComponent> getTest() { 
11646      if (this.test == null)
11647        this.test = new ArrayList<TestScriptTestComponent>();
11648      return this.test;
11649    }
11650
11651    /**
11652     * @return Returns a reference to <code>this</code> for easy method chaining
11653     */
11654    public TestScript setTest(List<TestScriptTestComponent> theTest) { 
11655      this.test = theTest;
11656      return this;
11657    }
11658
11659    public boolean hasTest() { 
11660      if (this.test == null)
11661        return false;
11662      for (TestScriptTestComponent item : this.test)
11663        if (!item.isEmpty())
11664          return true;
11665      return false;
11666    }
11667
11668    public TestScriptTestComponent addTest() { //3
11669      TestScriptTestComponent t = new TestScriptTestComponent();
11670      if (this.test == null)
11671        this.test = new ArrayList<TestScriptTestComponent>();
11672      this.test.add(t);
11673      return t;
11674    }
11675
11676    public TestScript addTest(TestScriptTestComponent t) { //3
11677      if (t == null)
11678        return this;
11679      if (this.test == null)
11680        this.test = new ArrayList<TestScriptTestComponent>();
11681      this.test.add(t);
11682      return this;
11683    }
11684
11685    /**
11686     * @return The first repetition of repeating field {@link #test}, creating it if it does not already exist
11687     */
11688    public TestScriptTestComponent getTestFirstRep() { 
11689      if (getTest().isEmpty()) {
11690        addTest();
11691      }
11692      return getTest().get(0);
11693    }
11694
11695    /**
11696     * @return {@link #teardown} (A series of operations required to clean up after all the tests are executed (successfully or otherwise).)
11697     */
11698    public TestScriptTeardownComponent getTeardown() { 
11699      if (this.teardown == null)
11700        if (Configuration.errorOnAutoCreate())
11701          throw new Error("Attempt to auto-create TestScript.teardown");
11702        else if (Configuration.doAutoCreate())
11703          this.teardown = new TestScriptTeardownComponent(); // cc
11704      return this.teardown;
11705    }
11706
11707    public boolean hasTeardown() { 
11708      return this.teardown != null && !this.teardown.isEmpty();
11709    }
11710
11711    /**
11712     * @param value {@link #teardown} (A series of operations required to clean up after all the tests are executed (successfully or otherwise).)
11713     */
11714    public TestScript setTeardown(TestScriptTeardownComponent value) { 
11715      this.teardown = value;
11716      return this;
11717    }
11718
11719      protected void listChildren(List<Property> children) {
11720        super.listChildren(children);
11721        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));
11722        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));
11723        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));
11724        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));
11725        children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the test script.", 0, 1, title));
11726        children.add(new Property("status", "code", "The status of this test script. Enables tracking the life-cycle of the content.", 0, 1, status));
11727        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));
11728        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));
11729        children.add(new Property("publisher", "string", "The name of the organization or individual that published the test script.", 0, 1, publisher));
11730        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));
11731        children.add(new Property("description", "markdown", "A free text natural language description of the test script from a consumer's perspective.", 0, 1, description));
11732        children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate test script instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
11733        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));
11734        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));
11735        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));
11736        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));
11737        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));
11738        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));
11739        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));
11740        children.add(new Property("profile", "Reference(Any)", "Reference to the profile to be used for validation.", 0, java.lang.Integer.MAX_VALUE, profile));
11741        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));
11742        children.add(new Property("rule", "", "Assert rule to be used in one or more asserts within the test script.", 0, java.lang.Integer.MAX_VALUE, rule));
11743        children.add(new Property("ruleset", "", "Contains one or more rules.  Offers a way to group rules so assertions could reference the group of rules and have them all applied.", 0, java.lang.Integer.MAX_VALUE, ruleset));
11744        children.add(new Property("setup", "", "A series of required setup operations before tests are executed.", 0, 1, setup));
11745        children.add(new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test));
11746        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));
11747      }
11748
11749      @Override
11750      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
11751        switch (_hash) {
11752        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);
11753        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);
11754        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);
11755        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);
11756        case 110371416: /*title*/  return new Property("title", "string", "A short, descriptive, user-friendly title for the test script.", 0, 1, title);
11757        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);
11758        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);
11759        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);
11760        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the organization or individual that published the test script.", 0, 1, publisher);
11761        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);
11762        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);
11763        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 terms may be used to assist with indexing and searching for appropriate test script instances.", 0, java.lang.Integer.MAX_VALUE, useContext);
11764        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);
11765        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);
11766        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);
11767        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);
11768        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);
11769        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);
11770        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);
11771        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);
11772        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);
11773        case 3512060: /*rule*/  return new Property("rule", "", "Assert rule to be used in one or more asserts within the test script.", 0, java.lang.Integer.MAX_VALUE, rule);
11774        case 1548678118: /*ruleset*/  return new Property("ruleset", "", "Contains one or more rules.  Offers a way to group rules so assertions could reference the group of rules and have them all applied.", 0, java.lang.Integer.MAX_VALUE, ruleset);
11775        case 109329021: /*setup*/  return new Property("setup", "", "A series of required setup operations before tests are executed.", 0, 1, setup);
11776        case 3556498: /*test*/  return new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test);
11777        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);
11778        default: return super.getNamedProperty(_hash, _name, _checkValid);
11779        }
11780
11781      }
11782
11783      @Override
11784      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
11785        switch (hash) {
11786        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
11787        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier
11788        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
11789        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
11790        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
11791        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
11792        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
11793        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
11794        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
11795        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
11796        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
11797        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
11798        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
11799        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
11800        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType
11801        case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // TestScriptOriginComponent
11802        case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : this.destination.toArray(new Base[this.destination.size()]); // TestScriptDestinationComponent
11803        case -450004177: /*metadata*/ return this.metadata == null ? new Base[0] : new Base[] {this.metadata}; // TestScriptMetadataComponent
11804        case -843449847: /*fixture*/ return this.fixture == null ? new Base[0] : this.fixture.toArray(new Base[this.fixture.size()]); // TestScriptFixtureComponent
11805        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : this.profile.toArray(new Base[this.profile.size()]); // Reference
11806        case -1249586564: /*variable*/ return this.variable == null ? new Base[0] : this.variable.toArray(new Base[this.variable.size()]); // TestScriptVariableComponent
11807        case 3512060: /*rule*/ return this.rule == null ? new Base[0] : this.rule.toArray(new Base[this.rule.size()]); // TestScriptRuleComponent
11808        case 1548678118: /*ruleset*/ return this.ruleset == null ? new Base[0] : this.ruleset.toArray(new Base[this.ruleset.size()]); // TestScriptRulesetComponent
11809        case 109329021: /*setup*/ return this.setup == null ? new Base[0] : new Base[] {this.setup}; // TestScriptSetupComponent
11810        case 3556498: /*test*/ return this.test == null ? new Base[0] : this.test.toArray(new Base[this.test.size()]); // TestScriptTestComponent
11811        case -1663474172: /*teardown*/ return this.teardown == null ? new Base[0] : new Base[] {this.teardown}; // TestScriptTeardownComponent
11812        default: return super.getProperty(hash, name, checkValid);
11813        }
11814
11815      }
11816
11817      @Override
11818      public Base setProperty(int hash, String name, Base value) throws FHIRException {
11819        switch (hash) {
11820        case 116079: // url
11821          this.url = castToUri(value); // UriType
11822          return value;
11823        case -1618432855: // identifier
11824          this.identifier = castToIdentifier(value); // Identifier
11825          return value;
11826        case 351608024: // version
11827          this.version = castToString(value); // StringType
11828          return value;
11829        case 3373707: // name
11830          this.name = castToString(value); // StringType
11831          return value;
11832        case 110371416: // title
11833          this.title = castToString(value); // StringType
11834          return value;
11835        case -892481550: // status
11836          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
11837          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
11838          return value;
11839        case -404562712: // experimental
11840          this.experimental = castToBoolean(value); // BooleanType
11841          return value;
11842        case 3076014: // date
11843          this.date = castToDateTime(value); // DateTimeType
11844          return value;
11845        case 1447404028: // publisher
11846          this.publisher = castToString(value); // StringType
11847          return value;
11848        case 951526432: // contact
11849          this.getContact().add(castToContactDetail(value)); // ContactDetail
11850          return value;
11851        case -1724546052: // description
11852          this.description = castToMarkdown(value); // MarkdownType
11853          return value;
11854        case -669707736: // useContext
11855          this.getUseContext().add(castToUsageContext(value)); // UsageContext
11856          return value;
11857        case -507075711: // jurisdiction
11858          this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept
11859          return value;
11860        case -220463842: // purpose
11861          this.purpose = castToMarkdown(value); // MarkdownType
11862          return value;
11863        case 1522889671: // copyright
11864          this.copyright = castToMarkdown(value); // MarkdownType
11865          return value;
11866        case -1008619738: // origin
11867          this.getOrigin().add((TestScriptOriginComponent) value); // TestScriptOriginComponent
11868          return value;
11869        case -1429847026: // destination
11870          this.getDestination().add((TestScriptDestinationComponent) value); // TestScriptDestinationComponent
11871          return value;
11872        case -450004177: // metadata
11873          this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent
11874          return value;
11875        case -843449847: // fixture
11876          this.getFixture().add((TestScriptFixtureComponent) value); // TestScriptFixtureComponent
11877          return value;
11878        case -309425751: // profile
11879          this.getProfile().add(castToReference(value)); // Reference
11880          return value;
11881        case -1249586564: // variable
11882          this.getVariable().add((TestScriptVariableComponent) value); // TestScriptVariableComponent
11883          return value;
11884        case 3512060: // rule
11885          this.getRule().add((TestScriptRuleComponent) value); // TestScriptRuleComponent
11886          return value;
11887        case 1548678118: // ruleset
11888          this.getRuleset().add((TestScriptRulesetComponent) value); // TestScriptRulesetComponent
11889          return value;
11890        case 109329021: // setup
11891          this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent
11892          return value;
11893        case 3556498: // test
11894          this.getTest().add((TestScriptTestComponent) value); // TestScriptTestComponent
11895          return value;
11896        case -1663474172: // teardown
11897          this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent
11898          return value;
11899        default: return super.setProperty(hash, name, value);
11900        }
11901
11902      }
11903
11904      @Override
11905      public Base setProperty(String name, Base value) throws FHIRException {
11906        if (name.equals("url")) {
11907          this.url = castToUri(value); // UriType
11908        } else if (name.equals("identifier")) {
11909          this.identifier = castToIdentifier(value); // Identifier
11910        } else if (name.equals("version")) {
11911          this.version = castToString(value); // StringType
11912        } else if (name.equals("name")) {
11913          this.name = castToString(value); // StringType
11914        } else if (name.equals("title")) {
11915          this.title = castToString(value); // StringType
11916        } else if (name.equals("status")) {
11917          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
11918          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
11919        } else if (name.equals("experimental")) {
11920          this.experimental = castToBoolean(value); // BooleanType
11921        } else if (name.equals("date")) {
11922          this.date = castToDateTime(value); // DateTimeType
11923        } else if (name.equals("publisher")) {
11924          this.publisher = castToString(value); // StringType
11925        } else if (name.equals("contact")) {
11926          this.getContact().add(castToContactDetail(value));
11927        } else if (name.equals("description")) {
11928          this.description = castToMarkdown(value); // MarkdownType
11929        } else if (name.equals("useContext")) {
11930          this.getUseContext().add(castToUsageContext(value));
11931        } else if (name.equals("jurisdiction")) {
11932          this.getJurisdiction().add(castToCodeableConcept(value));
11933        } else if (name.equals("purpose")) {
11934          this.purpose = castToMarkdown(value); // MarkdownType
11935        } else if (name.equals("copyright")) {
11936          this.copyright = castToMarkdown(value); // MarkdownType
11937        } else if (name.equals("origin")) {
11938          this.getOrigin().add((TestScriptOriginComponent) value);
11939        } else if (name.equals("destination")) {
11940          this.getDestination().add((TestScriptDestinationComponent) value);
11941        } else if (name.equals("metadata")) {
11942          this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent
11943        } else if (name.equals("fixture")) {
11944          this.getFixture().add((TestScriptFixtureComponent) value);
11945        } else if (name.equals("profile")) {
11946          this.getProfile().add(castToReference(value));
11947        } else if (name.equals("variable")) {
11948          this.getVariable().add((TestScriptVariableComponent) value);
11949        } else if (name.equals("rule")) {
11950          this.getRule().add((TestScriptRuleComponent) value);
11951        } else if (name.equals("ruleset")) {
11952          this.getRuleset().add((TestScriptRulesetComponent) value);
11953        } else if (name.equals("setup")) {
11954          this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent
11955        } else if (name.equals("test")) {
11956          this.getTest().add((TestScriptTestComponent) value);
11957        } else if (name.equals("teardown")) {
11958          this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent
11959        } else
11960          return super.setProperty(name, value);
11961        return value;
11962      }
11963
11964      @Override
11965      public Base makeProperty(int hash, String name) throws FHIRException {
11966        switch (hash) {
11967        case 116079:  return getUrlElement();
11968        case -1618432855:  return getIdentifier(); 
11969        case 351608024:  return getVersionElement();
11970        case 3373707:  return getNameElement();
11971        case 110371416:  return getTitleElement();
11972        case -892481550:  return getStatusElement();
11973        case -404562712:  return getExperimentalElement();
11974        case 3076014:  return getDateElement();
11975        case 1447404028:  return getPublisherElement();
11976        case 951526432:  return addContact(); 
11977        case -1724546052:  return getDescriptionElement();
11978        case -669707736:  return addUseContext(); 
11979        case -507075711:  return addJurisdiction(); 
11980        case -220463842:  return getPurposeElement();
11981        case 1522889671:  return getCopyrightElement();
11982        case -1008619738:  return addOrigin(); 
11983        case -1429847026:  return addDestination(); 
11984        case -450004177:  return getMetadata(); 
11985        case -843449847:  return addFixture(); 
11986        case -309425751:  return addProfile(); 
11987        case -1249586564:  return addVariable(); 
11988        case 3512060:  return addRule(); 
11989        case 1548678118:  return addRuleset(); 
11990        case 109329021:  return getSetup(); 
11991        case 3556498:  return addTest(); 
11992        case -1663474172:  return getTeardown(); 
11993        default: return super.makeProperty(hash, name);
11994        }
11995
11996      }
11997
11998      @Override
11999      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
12000        switch (hash) {
12001        case 116079: /*url*/ return new String[] {"uri"};
12002        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
12003        case 351608024: /*version*/ return new String[] {"string"};
12004        case 3373707: /*name*/ return new String[] {"string"};
12005        case 110371416: /*title*/ return new String[] {"string"};
12006        case -892481550: /*status*/ return new String[] {"code"};
12007        case -404562712: /*experimental*/ return new String[] {"boolean"};
12008        case 3076014: /*date*/ return new String[] {"dateTime"};
12009        case 1447404028: /*publisher*/ return new String[] {"string"};
12010        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
12011        case -1724546052: /*description*/ return new String[] {"markdown"};
12012        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
12013        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
12014        case -220463842: /*purpose*/ return new String[] {"markdown"};
12015        case 1522889671: /*copyright*/ return new String[] {"markdown"};
12016        case -1008619738: /*origin*/ return new String[] {};
12017        case -1429847026: /*destination*/ return new String[] {};
12018        case -450004177: /*metadata*/ return new String[] {};
12019        case -843449847: /*fixture*/ return new String[] {};
12020        case -309425751: /*profile*/ return new String[] {"Reference"};
12021        case -1249586564: /*variable*/ return new String[] {};
12022        case 3512060: /*rule*/ return new String[] {};
12023        case 1548678118: /*ruleset*/ return new String[] {};
12024        case 109329021: /*setup*/ return new String[] {};
12025        case 3556498: /*test*/ return new String[] {};
12026        case -1663474172: /*teardown*/ return new String[] {};
12027        default: return super.getTypesForProperty(hash, name);
12028        }
12029
12030      }
12031
12032      @Override
12033      public Base addChild(String name) throws FHIRException {
12034        if (name.equals("url")) {
12035          throw new FHIRException("Cannot call addChild on a primitive type TestScript.url");
12036        }
12037        else if (name.equals("identifier")) {
12038          this.identifier = new Identifier();
12039          return this.identifier;
12040        }
12041        else if (name.equals("version")) {
12042          throw new FHIRException("Cannot call addChild on a primitive type TestScript.version");
12043        }
12044        else if (name.equals("name")) {
12045          throw new FHIRException("Cannot call addChild on a primitive type TestScript.name");
12046        }
12047        else if (name.equals("title")) {
12048          throw new FHIRException("Cannot call addChild on a primitive type TestScript.title");
12049        }
12050        else if (name.equals("status")) {
12051          throw new FHIRException("Cannot call addChild on a primitive type TestScript.status");
12052        }
12053        else if (name.equals("experimental")) {
12054          throw new FHIRException("Cannot call addChild on a primitive type TestScript.experimental");
12055        }
12056        else if (name.equals("date")) {
12057          throw new FHIRException("Cannot call addChild on a primitive type TestScript.date");
12058        }
12059        else if (name.equals("publisher")) {
12060          throw new FHIRException("Cannot call addChild on a primitive type TestScript.publisher");
12061        }
12062        else if (name.equals("contact")) {
12063          return addContact();
12064        }
12065        else if (name.equals("description")) {
12066          throw new FHIRException("Cannot call addChild on a primitive type TestScript.description");
12067        }
12068        else if (name.equals("useContext")) {
12069          return addUseContext();
12070        }
12071        else if (name.equals("jurisdiction")) {
12072          return addJurisdiction();
12073        }
12074        else if (name.equals("purpose")) {
12075          throw new FHIRException("Cannot call addChild on a primitive type TestScript.purpose");
12076        }
12077        else if (name.equals("copyright")) {
12078          throw new FHIRException("Cannot call addChild on a primitive type TestScript.copyright");
12079        }
12080        else if (name.equals("origin")) {
12081          return addOrigin();
12082        }
12083        else if (name.equals("destination")) {
12084          return addDestination();
12085        }
12086        else if (name.equals("metadata")) {
12087          this.metadata = new TestScriptMetadataComponent();
12088          return this.metadata;
12089        }
12090        else if (name.equals("fixture")) {
12091          return addFixture();
12092        }
12093        else if (name.equals("profile")) {
12094          return addProfile();
12095        }
12096        else if (name.equals("variable")) {
12097          return addVariable();
12098        }
12099        else if (name.equals("rule")) {
12100          return addRule();
12101        }
12102        else if (name.equals("ruleset")) {
12103          return addRuleset();
12104        }
12105        else if (name.equals("setup")) {
12106          this.setup = new TestScriptSetupComponent();
12107          return this.setup;
12108        }
12109        else if (name.equals("test")) {
12110          return addTest();
12111        }
12112        else if (name.equals("teardown")) {
12113          this.teardown = new TestScriptTeardownComponent();
12114          return this.teardown;
12115        }
12116        else
12117          return super.addChild(name);
12118      }
12119
12120  public String fhirType() {
12121    return "TestScript";
12122
12123  }
12124
12125      public TestScript copy() {
12126        TestScript dst = new TestScript();
12127        copyValues(dst);
12128        dst.url = url == null ? null : url.copy();
12129        dst.identifier = identifier == null ? null : identifier.copy();
12130        dst.version = version == null ? null : version.copy();
12131        dst.name = name == null ? null : name.copy();
12132        dst.title = title == null ? null : title.copy();
12133        dst.status = status == null ? null : status.copy();
12134        dst.experimental = experimental == null ? null : experimental.copy();
12135        dst.date = date == null ? null : date.copy();
12136        dst.publisher = publisher == null ? null : publisher.copy();
12137        if (contact != null) {
12138          dst.contact = new ArrayList<ContactDetail>();
12139          for (ContactDetail i : contact)
12140            dst.contact.add(i.copy());
12141        };
12142        dst.description = description == null ? null : description.copy();
12143        if (useContext != null) {
12144          dst.useContext = new ArrayList<UsageContext>();
12145          for (UsageContext i : useContext)
12146            dst.useContext.add(i.copy());
12147        };
12148        if (jurisdiction != null) {
12149          dst.jurisdiction = new ArrayList<CodeableConcept>();
12150          for (CodeableConcept i : jurisdiction)
12151            dst.jurisdiction.add(i.copy());
12152        };
12153        dst.purpose = purpose == null ? null : purpose.copy();
12154        dst.copyright = copyright == null ? null : copyright.copy();
12155        if (origin != null) {
12156          dst.origin = new ArrayList<TestScriptOriginComponent>();
12157          for (TestScriptOriginComponent i : origin)
12158            dst.origin.add(i.copy());
12159        };
12160        if (destination != null) {
12161          dst.destination = new ArrayList<TestScriptDestinationComponent>();
12162          for (TestScriptDestinationComponent i : destination)
12163            dst.destination.add(i.copy());
12164        };
12165        dst.metadata = metadata == null ? null : metadata.copy();
12166        if (fixture != null) {
12167          dst.fixture = new ArrayList<TestScriptFixtureComponent>();
12168          for (TestScriptFixtureComponent i : fixture)
12169            dst.fixture.add(i.copy());
12170        };
12171        if (profile != null) {
12172          dst.profile = new ArrayList<Reference>();
12173          for (Reference i : profile)
12174            dst.profile.add(i.copy());
12175        };
12176        if (variable != null) {
12177          dst.variable = new ArrayList<TestScriptVariableComponent>();
12178          for (TestScriptVariableComponent i : variable)
12179            dst.variable.add(i.copy());
12180        };
12181        if (rule != null) {
12182          dst.rule = new ArrayList<TestScriptRuleComponent>();
12183          for (TestScriptRuleComponent i : rule)
12184            dst.rule.add(i.copy());
12185        };
12186        if (ruleset != null) {
12187          dst.ruleset = new ArrayList<TestScriptRulesetComponent>();
12188          for (TestScriptRulesetComponent i : ruleset)
12189            dst.ruleset.add(i.copy());
12190        };
12191        dst.setup = setup == null ? null : setup.copy();
12192        if (test != null) {
12193          dst.test = new ArrayList<TestScriptTestComponent>();
12194          for (TestScriptTestComponent i : test)
12195            dst.test.add(i.copy());
12196        };
12197        dst.teardown = teardown == null ? null : teardown.copy();
12198        return dst;
12199      }
12200
12201      protected TestScript typedCopy() {
12202        return copy();
12203      }
12204
12205      @Override
12206      public boolean equalsDeep(Base other_) {
12207        if (!super.equalsDeep(other_))
12208          return false;
12209        if (!(other_ instanceof TestScript))
12210          return false;
12211        TestScript o = (TestScript) other_;
12212        return compareDeep(identifier, o.identifier, true) && compareDeep(purpose, o.purpose, true) && compareDeep(copyright, o.copyright, true)
12213           && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) && compareDeep(metadata, o.metadata, true)
12214           && compareDeep(fixture, o.fixture, true) && compareDeep(profile, o.profile, true) && compareDeep(variable, o.variable, true)
12215           && compareDeep(rule, o.rule, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(setup, o.setup, true)
12216           && compareDeep(test, o.test, true) && compareDeep(teardown, o.teardown, true);
12217      }
12218
12219      @Override
12220      public boolean equalsShallow(Base other_) {
12221        if (!super.equalsShallow(other_))
12222          return false;
12223        if (!(other_ instanceof TestScript))
12224          return false;
12225        TestScript o = (TestScript) other_;
12226        return compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true);
12227      }
12228
12229      public boolean isEmpty() {
12230        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, purpose, copyright
12231          , origin, destination, metadata, fixture, profile, variable, rule, ruleset, setup
12232          , test, teardown);
12233      }
12234
12235  @Override
12236  public ResourceType getResourceType() {
12237    return ResourceType.TestScript;
12238   }
12239
12240 /**
12241   * Search parameter: <b>date</b>
12242   * <p>
12243   * Description: <b>The test script publication date</b><br>
12244   * Type: <b>date</b><br>
12245   * Path: <b>TestScript.date</b><br>
12246   * </p>
12247   */
12248  @SearchParamDefinition(name="date", path="TestScript.date", description="The test script publication date", type="date" )
12249  public static final String SP_DATE = "date";
12250 /**
12251   * <b>Fluent Client</b> search parameter constant for <b>date</b>
12252   * <p>
12253   * Description: <b>The test script publication date</b><br>
12254   * Type: <b>date</b><br>
12255   * Path: <b>TestScript.date</b><br>
12256   * </p>
12257   */
12258  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
12259
12260 /**
12261   * Search parameter: <b>identifier</b>
12262   * <p>
12263   * Description: <b>External identifier for the test script</b><br>
12264   * Type: <b>token</b><br>
12265   * Path: <b>TestScript.identifier</b><br>
12266   * </p>
12267   */
12268  @SearchParamDefinition(name="identifier", path="TestScript.identifier", description="External identifier for the test script", type="token" )
12269  public static final String SP_IDENTIFIER = "identifier";
12270 /**
12271   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
12272   * <p>
12273   * Description: <b>External identifier for the test script</b><br>
12274   * Type: <b>token</b><br>
12275   * Path: <b>TestScript.identifier</b><br>
12276   * </p>
12277   */
12278  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
12279
12280 /**
12281   * Search parameter: <b>context-type-value</b>
12282   * <p>
12283   * Description: <b>A use context type and value assigned to the test script</b><br>
12284   * Type: <b>composite</b><br>
12285   * Path: <b></b><br>
12286   * </p>
12287   */
12288  @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"} )
12289  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
12290 /**
12291   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
12292   * <p>
12293   * Description: <b>A use context type and value assigned to the test script</b><br>
12294   * Type: <b>composite</b><br>
12295   * Path: <b></b><br>
12296   * </p>
12297   */
12298  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);
12299
12300 /**
12301   * Search parameter: <b>jurisdiction</b>
12302   * <p>
12303   * Description: <b>Intended jurisdiction for the test script</b><br>
12304   * Type: <b>token</b><br>
12305   * Path: <b>TestScript.jurisdiction</b><br>
12306   * </p>
12307   */
12308  @SearchParamDefinition(name="jurisdiction", path="TestScript.jurisdiction", description="Intended jurisdiction for the test script", type="token" )
12309  public static final String SP_JURISDICTION = "jurisdiction";
12310 /**
12311   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
12312   * <p>
12313   * Description: <b>Intended jurisdiction for the test script</b><br>
12314   * Type: <b>token</b><br>
12315   * Path: <b>TestScript.jurisdiction</b><br>
12316   * </p>
12317   */
12318  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
12319
12320 /**
12321   * Search parameter: <b>description</b>
12322   * <p>
12323   * Description: <b>The description of the test script</b><br>
12324   * Type: <b>string</b><br>
12325   * Path: <b>TestScript.description</b><br>
12326   * </p>
12327   */
12328  @SearchParamDefinition(name="description", path="TestScript.description", description="The description of the test script", type="string" )
12329  public static final String SP_DESCRIPTION = "description";
12330 /**
12331   * <b>Fluent Client</b> search parameter constant for <b>description</b>
12332   * <p>
12333   * Description: <b>The description of the test script</b><br>
12334   * Type: <b>string</b><br>
12335   * Path: <b>TestScript.description</b><br>
12336   * </p>
12337   */
12338  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
12339
12340 /**
12341   * Search parameter: <b>testscript-capability</b>
12342   * <p>
12343   * Description: <b>TestScript required and validated capability</b><br>
12344   * Type: <b>string</b><br>
12345   * Path: <b>TestScript.metadata.capability.description</b><br>
12346   * </p>
12347   */
12348  @SearchParamDefinition(name="testscript-capability", path="TestScript.metadata.capability.description", description="TestScript required and validated capability", type="string" )
12349  public static final String SP_TESTSCRIPT_CAPABILITY = "testscript-capability";
12350 /**
12351   * <b>Fluent Client</b> search parameter constant for <b>testscript-capability</b>
12352   * <p>
12353   * Description: <b>TestScript required and validated capability</b><br>
12354   * Type: <b>string</b><br>
12355   * Path: <b>TestScript.metadata.capability.description</b><br>
12356   * </p>
12357   */
12358  public static final ca.uhn.fhir.rest.gclient.StringClientParam TESTSCRIPT_CAPABILITY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TESTSCRIPT_CAPABILITY);
12359
12360 /**
12361   * Search parameter: <b>context-type</b>
12362   * <p>
12363   * Description: <b>A type of use context assigned to the test script</b><br>
12364   * Type: <b>token</b><br>
12365   * Path: <b>TestScript.useContext.code</b><br>
12366   * </p>
12367   */
12368  @SearchParamDefinition(name="context-type", path="TestScript.useContext.code", description="A type of use context assigned to the test script", type="token" )
12369  public static final String SP_CONTEXT_TYPE = "context-type";
12370 /**
12371   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
12372   * <p>
12373   * Description: <b>A type of use context assigned to the test script</b><br>
12374   * Type: <b>token</b><br>
12375   * Path: <b>TestScript.useContext.code</b><br>
12376   * </p>
12377   */
12378  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE);
12379
12380 /**
12381   * Search parameter: <b>title</b>
12382   * <p>
12383   * Description: <b>The human-friendly name of the test script</b><br>
12384   * Type: <b>string</b><br>
12385   * Path: <b>TestScript.title</b><br>
12386   * </p>
12387   */
12388  @SearchParamDefinition(name="title", path="TestScript.title", description="The human-friendly name of the test script", type="string" )
12389  public static final String SP_TITLE = "title";
12390 /**
12391   * <b>Fluent Client</b> search parameter constant for <b>title</b>
12392   * <p>
12393   * Description: <b>The human-friendly name of the test script</b><br>
12394   * Type: <b>string</b><br>
12395   * Path: <b>TestScript.title</b><br>
12396   * </p>
12397   */
12398  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
12399
12400 /**
12401   * Search parameter: <b>version</b>
12402   * <p>
12403   * Description: <b>The business version of the test script</b><br>
12404   * Type: <b>token</b><br>
12405   * Path: <b>TestScript.version</b><br>
12406   * </p>
12407   */
12408  @SearchParamDefinition(name="version", path="TestScript.version", description="The business version of the test script", type="token" )
12409  public static final String SP_VERSION = "version";
12410 /**
12411   * <b>Fluent Client</b> search parameter constant for <b>version</b>
12412   * <p>
12413   * Description: <b>The business version of the test script</b><br>
12414   * Type: <b>token</b><br>
12415   * Path: <b>TestScript.version</b><br>
12416   * </p>
12417   */
12418  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
12419
12420 /**
12421   * Search parameter: <b>url</b>
12422   * <p>
12423   * Description: <b>The uri that identifies the test script</b><br>
12424   * Type: <b>uri</b><br>
12425   * Path: <b>TestScript.url</b><br>
12426   * </p>
12427   */
12428  @SearchParamDefinition(name="url", path="TestScript.url", description="The uri that identifies the test script", type="uri" )
12429  public static final String SP_URL = "url";
12430 /**
12431   * <b>Fluent Client</b> search parameter constant for <b>url</b>
12432   * <p>
12433   * Description: <b>The uri that identifies the test script</b><br>
12434   * Type: <b>uri</b><br>
12435   * Path: <b>TestScript.url</b><br>
12436   * </p>
12437   */
12438  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
12439
12440 /**
12441   * Search parameter: <b>context-quantity</b>
12442   * <p>
12443   * Description: <b>A quantity- or range-valued use context assigned to the test script</b><br>
12444   * Type: <b>quantity</b><br>
12445   * Path: <b>TestScript.useContext.valueQuantity, TestScript.useContext.valueRange</b><br>
12446   * </p>
12447   */
12448  @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" )
12449  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
12450 /**
12451   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
12452   * <p>
12453   * Description: <b>A quantity- or range-valued use context assigned to the test script</b><br>
12454   * Type: <b>quantity</b><br>
12455   * Path: <b>TestScript.useContext.valueQuantity, TestScript.useContext.valueRange</b><br>
12456   * </p>
12457   */
12458  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY);
12459
12460 /**
12461   * Search parameter: <b>name</b>
12462   * <p>
12463   * Description: <b>Computationally friendly name of the test script</b><br>
12464   * Type: <b>string</b><br>
12465   * Path: <b>TestScript.name</b><br>
12466   * </p>
12467   */
12468  @SearchParamDefinition(name="name", path="TestScript.name", description="Computationally friendly name of the test script", type="string" )
12469  public static final String SP_NAME = "name";
12470 /**
12471   * <b>Fluent Client</b> search parameter constant for <b>name</b>
12472   * <p>
12473   * Description: <b>Computationally friendly name of the test script</b><br>
12474   * Type: <b>string</b><br>
12475   * Path: <b>TestScript.name</b><br>
12476   * </p>
12477   */
12478  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
12479
12480 /**
12481   * Search parameter: <b>context</b>
12482   * <p>
12483   * Description: <b>A use context assigned to the test script</b><br>
12484   * Type: <b>token</b><br>
12485   * Path: <b>TestScript.useContext.valueCodeableConcept</b><br>
12486   * </p>
12487   */
12488  @SearchParamDefinition(name="context", path="(TestScript.useContext.value as CodeableConcept)", description="A use context assigned to the test script", type="token" )
12489  public static final String SP_CONTEXT = "context";
12490 /**
12491   * <b>Fluent Client</b> search parameter constant for <b>context</b>
12492   * <p>
12493   * Description: <b>A use context assigned to the test script</b><br>
12494   * Type: <b>token</b><br>
12495   * Path: <b>TestScript.useContext.valueCodeableConcept</b><br>
12496   * </p>
12497   */
12498  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
12499
12500 /**
12501   * Search parameter: <b>publisher</b>
12502   * <p>
12503   * Description: <b>Name of the publisher of the test script</b><br>
12504   * Type: <b>string</b><br>
12505   * Path: <b>TestScript.publisher</b><br>
12506   * </p>
12507   */
12508  @SearchParamDefinition(name="publisher", path="TestScript.publisher", description="Name of the publisher of the test script", type="string" )
12509  public static final String SP_PUBLISHER = "publisher";
12510 /**
12511   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
12512   * <p>
12513   * Description: <b>Name of the publisher of the test script</b><br>
12514   * Type: <b>string</b><br>
12515   * Path: <b>TestScript.publisher</b><br>
12516   * </p>
12517   */
12518  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
12519
12520 /**
12521   * Search parameter: <b>context-type-quantity</b>
12522   * <p>
12523   * Description: <b>A use context type and quantity- or range-based value assigned to the test script</b><br>
12524   * Type: <b>composite</b><br>
12525   * Path: <b></b><br>
12526   * </p>
12527   */
12528  @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"} )
12529  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
12530 /**
12531   * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b>
12532   * <p>
12533   * Description: <b>A use context type and quantity- or range-based value assigned to the test script</b><br>
12534   * Type: <b>composite</b><br>
12535   * Path: <b></b><br>
12536   * </p>
12537   */
12538  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);
12539
12540 /**
12541   * Search parameter: <b>status</b>
12542   * <p>
12543   * Description: <b>The current status of the test script</b><br>
12544   * Type: <b>token</b><br>
12545   * Path: <b>TestScript.status</b><br>
12546   * </p>
12547   */
12548  @SearchParamDefinition(name="status", path="TestScript.status", description="The current status of the test script", type="token" )
12549  public static final String SP_STATUS = "status";
12550 /**
12551   * <b>Fluent Client</b> search parameter constant for <b>status</b>
12552   * <p>
12553   * Description: <b>The current status of the test script</b><br>
12554   * Type: <b>token</b><br>
12555   * Path: <b>TestScript.status</b><br>
12556   * </p>
12557   */
12558  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
12559
12560
12561}
12562