001package org.hl7.fhir.dstu3.model;
002
003
004
005/*
006  Copyright (c) 2011+, HL7, Inc.
007  All rights reserved.
008  
009  Redistribution and use in source and binary forms, with or without modification, 
010  are permitted provided that the following conditions are met:
011  
012   * Redistributions of source code must retain the above copyright notice, this 
013     list of conditions and the following disclaimer.
014   * Redistributions in binary form must reproduce the above copyright notice, 
015     this list of conditions and the following disclaimer in the documentation 
016     and/or other materials provided with the distribution.
017   * Neither the name of HL7 nor the names of its contributors may be used to 
018     endorse or promote products derived from this software without specific 
019     prior written permission.
020  
021  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
022  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
023  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
024  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
025  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
026  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
027  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
028  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
029  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
030  POSSIBILITY OF SUCH DAMAGE.
031  
032*/
033
034// Generated on Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.x
035import java.util.ArrayList;
036import java.util.Date;
037import java.util.List;
038
039import org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus;
040import org.hl7.fhir.dstu3.model.Enumerations.PublicationStatusEnumFactory;
041import org.hl7.fhir.exceptions.FHIRException;
042import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
043import org.hl7.fhir.utilities.Utilities;
044
045import ca.uhn.fhir.model.api.annotation.Block;
046import ca.uhn.fhir.model.api.annotation.Child;
047import ca.uhn.fhir.model.api.annotation.ChildOrder;
048import ca.uhn.fhir.model.api.annotation.Description;
049import ca.uhn.fhir.model.api.annotation.ResourceDef;
050import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
051/**
052 * A structured set of tests against a FHIR server implementation to determine compliance against the FHIR specification.
053 */
054@ResourceDef(name="TestScript", profile="http://hl7.org/fhir/Profile/TestScript")
055@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"})
056public class TestScript extends MetadataResource {
057
058    public enum ContentType {
059        /**
060         * XML content-type corresponding to the application/fhir+xml mime-type.
061         */
062        XML, 
063        /**
064         * JSON content-type corresponding to the application/fhir+json mime-type.
065         */
066        JSON, 
067        /**
068         * RDF content-type corresponding to the text/turtle mime-type.
069         */
070        TTL, 
071        /**
072         * Prevent the use of the corresponding http header.
073         */
074        NONE, 
075        /**
076         * added to help the parsers with the generic types
077         */
078        NULL;
079        public static ContentType fromCode(String codeString) throws FHIRException {
080            if (codeString == null || "".equals(codeString))
081                return null;
082        if ("xml".equals(codeString))
083          return XML;
084        if ("json".equals(codeString))
085          return JSON;
086        if ("ttl".equals(codeString))
087          return TTL;
088        if ("none".equals(codeString))
089          return NONE;
090        if (Configuration.isAcceptInvalidEnums())
091          return null;
092        else
093          throw new FHIRException("Unknown ContentType code '"+codeString+"'");
094        }
095        public String toCode() {
096          switch (this) {
097            case XML: return "xml";
098            case JSON: return "json";
099            case TTL: return "ttl";
100            case NONE: return "none";
101            case NULL: return null;
102            default: return "?";
103          }
104        }
105        public String getSystem() {
106          switch (this) {
107            case XML: return "http://hl7.org/fhir/content-type";
108            case JSON: return "http://hl7.org/fhir/content-type";
109            case TTL: return "http://hl7.org/fhir/content-type";
110            case NONE: return "http://hl7.org/fhir/content-type";
111            case NULL: return null;
112            default: return "?";
113          }
114        }
115        public String getDefinition() {
116          switch (this) {
117            case XML: return "XML content-type corresponding to the application/fhir+xml mime-type.";
118            case JSON: return "JSON content-type corresponding to the application/fhir+json mime-type.";
119            case TTL: return "RDF content-type corresponding to the text/turtle mime-type.";
120            case NONE: return "Prevent the use of the corresponding http header.";
121            case NULL: return null;
122            default: return "?";
123          }
124        }
125        public String getDisplay() {
126          switch (this) {
127            case XML: return "xml";
128            case JSON: return "json";
129            case TTL: return "ttl";
130            case NONE: return "none";
131            case NULL: return null;
132            default: return "?";
133          }
134        }
135    }
136
137  public static class ContentTypeEnumFactory implements EnumFactory<ContentType> {
138    public ContentType fromCode(String codeString) throws IllegalArgumentException {
139      if (codeString == null || "".equals(codeString))
140            if (codeString == null || "".equals(codeString))
141                return null;
142        if ("xml".equals(codeString))
143          return ContentType.XML;
144        if ("json".equals(codeString))
145          return ContentType.JSON;
146        if ("ttl".equals(codeString))
147          return ContentType.TTL;
148        if ("none".equals(codeString))
149          return ContentType.NONE;
150        throw new IllegalArgumentException("Unknown ContentType code '"+codeString+"'");
151        }
152        public Enumeration<ContentType> fromType(PrimitiveType<?> code) throws FHIRException {
153          if (code == null)
154            return null;
155          if (code.isEmpty())
156            return new Enumeration<ContentType>(this);
157          String codeString = code.asStringValue();
158          if (codeString == null || "".equals(codeString))
159            return null;
160        if ("xml".equals(codeString))
161          return new Enumeration<ContentType>(this, ContentType.XML);
162        if ("json".equals(codeString))
163          return new Enumeration<ContentType>(this, ContentType.JSON);
164        if ("ttl".equals(codeString))
165          return new Enumeration<ContentType>(this, ContentType.TTL);
166        if ("none".equals(codeString))
167          return new Enumeration<ContentType>(this, ContentType.NONE);
168        throw new FHIRException("Unknown ContentType code '"+codeString+"'");
169        }
170    public String toCode(ContentType code) {
171      if (code == ContentType.XML)
172        return "xml";
173      if (code == ContentType.JSON)
174        return "json";
175      if (code == ContentType.TTL)
176        return "ttl";
177      if (code == ContentType.NONE)
178        return "none";
179      return "?";
180      }
181    public String toSystem(ContentType code) {
182      return code.getSystem();
183      }
184    }
185
186    public enum AssertionDirectionType {
187        /**
188         * The assertion is evaluated on the response. This is the default value.
189         */
190        RESPONSE, 
191        /**
192         * The assertion is evaluated on the request.
193         */
194        REQUEST, 
195        /**
196         * added to help the parsers with the generic types
197         */
198        NULL;
199        public static AssertionDirectionType fromCode(String codeString) throws FHIRException {
200            if (codeString == null || "".equals(codeString))
201                return null;
202        if ("response".equals(codeString))
203          return RESPONSE;
204        if ("request".equals(codeString))
205          return REQUEST;
206        if (Configuration.isAcceptInvalidEnums())
207          return null;
208        else
209          throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'");
210        }
211        public String toCode() {
212          switch (this) {
213            case RESPONSE: return "response";
214            case REQUEST: return "request";
215            case NULL: return null;
216            default: return "?";
217          }
218        }
219        public String getSystem() {
220          switch (this) {
221            case RESPONSE: return "http://hl7.org/fhir/assert-direction-codes";
222            case REQUEST: return "http://hl7.org/fhir/assert-direction-codes";
223            case NULL: return null;
224            default: return "?";
225          }
226        }
227        public String getDefinition() {
228          switch (this) {
229            case RESPONSE: return "The assertion is evaluated on the response. This is the default value.";
230            case REQUEST: return "The assertion is evaluated on the request.";
231            case NULL: return null;
232            default: return "?";
233          }
234        }
235        public String getDisplay() {
236          switch (this) {
237            case RESPONSE: return "response";
238            case REQUEST: return "request";
239            case NULL: return null;
240            default: return "?";
241          }
242        }
243    }
244
245  public static class AssertionDirectionTypeEnumFactory implements EnumFactory<AssertionDirectionType> {
246    public AssertionDirectionType fromCode(String codeString) throws IllegalArgumentException {
247      if (codeString == null || "".equals(codeString))
248            if (codeString == null || "".equals(codeString))
249                return null;
250        if ("response".equals(codeString))
251          return AssertionDirectionType.RESPONSE;
252        if ("request".equals(codeString))
253          return AssertionDirectionType.REQUEST;
254        throw new IllegalArgumentException("Unknown AssertionDirectionType code '"+codeString+"'");
255        }
256        public Enumeration<AssertionDirectionType> fromType(PrimitiveType<?> code) throws FHIRException {
257          if (code == null)
258            return null;
259          if (code.isEmpty())
260            return new Enumeration<AssertionDirectionType>(this);
261          String codeString = code.asStringValue();
262          if (codeString == null || "".equals(codeString))
263            return null;
264        if ("response".equals(codeString))
265          return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.RESPONSE);
266        if ("request".equals(codeString))
267          return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.REQUEST);
268        throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'");
269        }
270    public String toCode(AssertionDirectionType code) {
271      if (code == AssertionDirectionType.RESPONSE)
272        return "response";
273      if (code == AssertionDirectionType.REQUEST)
274        return "request";
275      return "?";
276      }
277    public String toSystem(AssertionDirectionType code) {
278      return code.getSystem();
279      }
280    }
281
282    public enum AssertionOperatorType {
283        /**
284         * Default value. Equals comparison.
285         */
286        EQUALS, 
287        /**
288         * Not equals comparison.
289         */
290        NOTEQUALS, 
291        /**
292         * Compare value within a known set of values.
293         */
294        IN, 
295        /**
296         * Compare value not within a known set of values.
297         */
298        NOTIN, 
299        /**
300         * Compare value to be greater than a known value.
301         */
302        GREATERTHAN, 
303        /**
304         * Compare value to be less than a known value.
305         */
306        LESSTHAN, 
307        /**
308         * Compare value is empty.
309         */
310        EMPTY, 
311        /**
312         * Compare value is not empty.
313         */
314        NOTEMPTY, 
315        /**
316         * Compare value string contains a known value.
317         */
318        CONTAINS, 
319        /**
320         * Compare value string does not contain a known value.
321         */
322        NOTCONTAINS, 
323        /**
324         * Evaluate the fluentpath expression as a boolean condition.
325         */
326        EVAL, 
327        /**
328         * added to help the parsers with the generic types
329         */
330        NULL;
331        public static AssertionOperatorType fromCode(String codeString) throws FHIRException {
332            if (codeString == null || "".equals(codeString))
333                return null;
334        if ("equals".equals(codeString))
335          return EQUALS;
336        if ("notEquals".equals(codeString))
337          return NOTEQUALS;
338        if ("in".equals(codeString))
339          return IN;
340        if ("notIn".equals(codeString))
341          return NOTIN;
342        if ("greaterThan".equals(codeString))
343          return GREATERTHAN;
344        if ("lessThan".equals(codeString))
345          return LESSTHAN;
346        if ("empty".equals(codeString))
347          return EMPTY;
348        if ("notEmpty".equals(codeString))
349          return NOTEMPTY;
350        if ("contains".equals(codeString))
351          return CONTAINS;
352        if ("notContains".equals(codeString))
353          return NOTCONTAINS;
354        if ("eval".equals(codeString))
355          return EVAL;
356        if (Configuration.isAcceptInvalidEnums())
357          return null;
358        else
359          throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'");
360        }
361        public String toCode() {
362          switch (this) {
363            case EQUALS: return "equals";
364            case NOTEQUALS: return "notEquals";
365            case IN: return "in";
366            case NOTIN: return "notIn";
367            case GREATERTHAN: return "greaterThan";
368            case LESSTHAN: return "lessThan";
369            case EMPTY: return "empty";
370            case NOTEMPTY: return "notEmpty";
371            case CONTAINS: return "contains";
372            case NOTCONTAINS: return "notContains";
373            case EVAL: return "eval";
374            case NULL: return null;
375            default: return "?";
376          }
377        }
378        public String getSystem() {
379          switch (this) {
380            case EQUALS: return "http://hl7.org/fhir/assert-operator-codes";
381            case NOTEQUALS: return "http://hl7.org/fhir/assert-operator-codes";
382            case IN: return "http://hl7.org/fhir/assert-operator-codes";
383            case NOTIN: return "http://hl7.org/fhir/assert-operator-codes";
384            case GREATERTHAN: return "http://hl7.org/fhir/assert-operator-codes";
385            case LESSTHAN: return "http://hl7.org/fhir/assert-operator-codes";
386            case EMPTY: return "http://hl7.org/fhir/assert-operator-codes";
387            case NOTEMPTY: return "http://hl7.org/fhir/assert-operator-codes";
388            case CONTAINS: return "http://hl7.org/fhir/assert-operator-codes";
389            case NOTCONTAINS: return "http://hl7.org/fhir/assert-operator-codes";
390            case EVAL: return "http://hl7.org/fhir/assert-operator-codes";
391            case NULL: return null;
392            default: return "?";
393          }
394        }
395        public String getDefinition() {
396          switch (this) {
397            case EQUALS: return "Default value. Equals comparison.";
398            case NOTEQUALS: return "Not equals comparison.";
399            case IN: return "Compare value within a known set of values.";
400            case NOTIN: return "Compare value not within a known set of values.";
401            case GREATERTHAN: return "Compare value to be greater than a known value.";
402            case LESSTHAN: return "Compare value to be less than a known value.";
403            case EMPTY: return "Compare value is empty.";
404            case NOTEMPTY: return "Compare value is not empty.";
405            case CONTAINS: return "Compare value string contains a known value.";
406            case NOTCONTAINS: return "Compare value string does not contain a known value.";
407            case EVAL: return "Evaluate the fluentpath expression as a boolean condition.";
408            case NULL: return null;
409            default: return "?";
410          }
411        }
412        public String getDisplay() {
413          switch (this) {
414            case EQUALS: return "equals";
415            case NOTEQUALS: return "notEquals";
416            case IN: return "in";
417            case NOTIN: return "notIn";
418            case GREATERTHAN: return "greaterThan";
419            case LESSTHAN: return "lessThan";
420            case EMPTY: return "empty";
421            case NOTEMPTY: return "notEmpty";
422            case CONTAINS: return "contains";
423            case NOTCONTAINS: return "notContains";
424            case EVAL: return "evaluate";
425            case NULL: return null;
426            default: return "?";
427          }
428        }
429    }
430
431  public static class AssertionOperatorTypeEnumFactory implements EnumFactory<AssertionOperatorType> {
432    public AssertionOperatorType fromCode(String codeString) throws IllegalArgumentException {
433      if (codeString == null || "".equals(codeString))
434            if (codeString == null || "".equals(codeString))
435                return null;
436        if ("equals".equals(codeString))
437          return AssertionOperatorType.EQUALS;
438        if ("notEquals".equals(codeString))
439          return AssertionOperatorType.NOTEQUALS;
440        if ("in".equals(codeString))
441          return AssertionOperatorType.IN;
442        if ("notIn".equals(codeString))
443          return AssertionOperatorType.NOTIN;
444        if ("greaterThan".equals(codeString))
445          return AssertionOperatorType.GREATERTHAN;
446        if ("lessThan".equals(codeString))
447          return AssertionOperatorType.LESSTHAN;
448        if ("empty".equals(codeString))
449          return AssertionOperatorType.EMPTY;
450        if ("notEmpty".equals(codeString))
451          return AssertionOperatorType.NOTEMPTY;
452        if ("contains".equals(codeString))
453          return AssertionOperatorType.CONTAINS;
454        if ("notContains".equals(codeString))
455          return AssertionOperatorType.NOTCONTAINS;
456        if ("eval".equals(codeString))
457          return AssertionOperatorType.EVAL;
458        throw new IllegalArgumentException("Unknown AssertionOperatorType code '"+codeString+"'");
459        }
460        public Enumeration<AssertionOperatorType> fromType(PrimitiveType<?> code) throws FHIRException {
461          if (code == null)
462            return null;
463          if (code.isEmpty())
464            return new Enumeration<AssertionOperatorType>(this);
465          String codeString = code.asStringValue();
466          if (codeString == null || "".equals(codeString))
467            return null;
468        if ("equals".equals(codeString))
469          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EQUALS);
470        if ("notEquals".equals(codeString))
471          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEQUALS);
472        if ("in".equals(codeString))
473          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.IN);
474        if ("notIn".equals(codeString))
475          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTIN);
476        if ("greaterThan".equals(codeString))
477          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.GREATERTHAN);
478        if ("lessThan".equals(codeString))
479          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.LESSTHAN);
480        if ("empty".equals(codeString))
481          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EMPTY);
482        if ("notEmpty".equals(codeString))
483          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEMPTY);
484        if ("contains".equals(codeString))
485          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.CONTAINS);
486        if ("notContains".equals(codeString))
487          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTCONTAINS);
488        if ("eval".equals(codeString))
489          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EVAL);
490        throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'");
491        }
492    public String toCode(AssertionOperatorType code) {
493      if (code == AssertionOperatorType.EQUALS)
494        return "equals";
495      if (code == AssertionOperatorType.NOTEQUALS)
496        return "notEquals";
497      if (code == AssertionOperatorType.IN)
498        return "in";
499      if (code == AssertionOperatorType.NOTIN)
500        return "notIn";
501      if (code == AssertionOperatorType.GREATERTHAN)
502        return "greaterThan";
503      if (code == AssertionOperatorType.LESSTHAN)
504        return "lessThan";
505      if (code == AssertionOperatorType.EMPTY)
506        return "empty";
507      if (code == AssertionOperatorType.NOTEMPTY)
508        return "notEmpty";
509      if (code == AssertionOperatorType.CONTAINS)
510        return "contains";
511      if (code == AssertionOperatorType.NOTCONTAINS)
512        return "notContains";
513      if (code == AssertionOperatorType.EVAL)
514        return "eval";
515      return "?";
516      }
517    public String toSystem(AssertionOperatorType code) {
518      return code.getSystem();
519      }
520    }
521
522    public enum TestScriptRequestMethodCode {
523        /**
524         * HTTP DELETE operation
525         */
526        DELETE, 
527        /**
528         * HTTP GET operation
529         */
530        GET, 
531        /**
532         * HTTP OPTIONS operation
533         */
534        OPTIONS, 
535        /**
536         * HTTP PATCH operation
537         */
538        PATCH, 
539        /**
540         * HTTP POST operation
541         */
542        POST, 
543        /**
544         * HTTP PUT operation
545         */
546        PUT, 
547        /**
548         * added to help the parsers with the generic types
549         */
550        NULL;
551        public static TestScriptRequestMethodCode fromCode(String codeString) throws FHIRException {
552            if (codeString == null || "".equals(codeString))
553                return null;
554        if ("delete".equals(codeString))
555          return DELETE;
556        if ("get".equals(codeString))
557          return GET;
558        if ("options".equals(codeString))
559          return OPTIONS;
560        if ("patch".equals(codeString))
561          return PATCH;
562        if ("post".equals(codeString))
563          return POST;
564        if ("put".equals(codeString))
565          return PUT;
566        if (Configuration.isAcceptInvalidEnums())
567          return null;
568        else
569          throw new FHIRException("Unknown TestScriptRequestMethodCode code '"+codeString+"'");
570        }
571        public String toCode() {
572          switch (this) {
573            case DELETE: return "delete";
574            case GET: return "get";
575            case OPTIONS: return "options";
576            case PATCH: return "patch";
577            case POST: return "post";
578            case PUT: return "put";
579            case NULL: return null;
580            default: return "?";
581          }
582        }
583        public String getSystem() {
584          switch (this) {
585            case DELETE: return "http://hl7.org/fhir/http-operations";
586            case GET: return "http://hl7.org/fhir/http-operations";
587            case OPTIONS: return "http://hl7.org/fhir/http-operations";
588            case PATCH: return "http://hl7.org/fhir/http-operations";
589            case POST: return "http://hl7.org/fhir/http-operations";
590            case PUT: return "http://hl7.org/fhir/http-operations";
591            case NULL: return null;
592            default: return "?";
593          }
594        }
595        public String getDefinition() {
596          switch (this) {
597            case DELETE: return "HTTP DELETE operation";
598            case GET: return "HTTP GET operation";
599            case OPTIONS: return "HTTP OPTIONS operation";
600            case PATCH: return "HTTP PATCH operation";
601            case POST: return "HTTP POST operation";
602            case PUT: return "HTTP PUT operation";
603            case NULL: return null;
604            default: return "?";
605          }
606        }
607        public String getDisplay() {
608          switch (this) {
609            case DELETE: return "DELETE";
610            case GET: return "GET";
611            case OPTIONS: return "OPTIONS";
612            case PATCH: return "PATCH";
613            case POST: return "POST";
614            case PUT: return "PUT";
615            case NULL: return null;
616            default: return "?";
617          }
618        }
619    }
620
621  public static class TestScriptRequestMethodCodeEnumFactory implements EnumFactory<TestScriptRequestMethodCode> {
622    public TestScriptRequestMethodCode fromCode(String codeString) throws IllegalArgumentException {
623      if (codeString == null || "".equals(codeString))
624            if (codeString == null || "".equals(codeString))
625                return null;
626        if ("delete".equals(codeString))
627          return TestScriptRequestMethodCode.DELETE;
628        if ("get".equals(codeString))
629          return TestScriptRequestMethodCode.GET;
630        if ("options".equals(codeString))
631          return TestScriptRequestMethodCode.OPTIONS;
632        if ("patch".equals(codeString))
633          return TestScriptRequestMethodCode.PATCH;
634        if ("post".equals(codeString))
635          return TestScriptRequestMethodCode.POST;
636        if ("put".equals(codeString))
637          return TestScriptRequestMethodCode.PUT;
638        throw new IllegalArgumentException("Unknown TestScriptRequestMethodCode code '"+codeString+"'");
639        }
640        public Enumeration<TestScriptRequestMethodCode> fromType(PrimitiveType<?> code) throws FHIRException {
641          if (code == null)
642            return null;
643          if (code.isEmpty())
644            return new Enumeration<TestScriptRequestMethodCode>(this);
645          String codeString = code.asStringValue();
646          if (codeString == null || "".equals(codeString))
647            return null;
648        if ("delete".equals(codeString))
649          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.DELETE);
650        if ("get".equals(codeString))
651          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.GET);
652        if ("options".equals(codeString))
653          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.OPTIONS);
654        if ("patch".equals(codeString))
655          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.PATCH);
656        if ("post".equals(codeString))
657          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.POST);
658        if ("put".equals(codeString))
659          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.PUT);
660        throw new FHIRException("Unknown TestScriptRequestMethodCode code '"+codeString+"'");
661        }
662    public String toCode(TestScriptRequestMethodCode code) {
663      if (code == TestScriptRequestMethodCode.DELETE)
664        return "delete";
665      if (code == TestScriptRequestMethodCode.GET)
666        return "get";
667      if (code == TestScriptRequestMethodCode.OPTIONS)
668        return "options";
669      if (code == TestScriptRequestMethodCode.PATCH)
670        return "patch";
671      if (code == TestScriptRequestMethodCode.POST)
672        return "post";
673      if (code == TestScriptRequestMethodCode.PUT)
674        return "put";
675      return "?";
676      }
677    public String toSystem(TestScriptRequestMethodCode code) {
678      return code.getSystem();
679      }
680    }
681
682    public enum AssertionResponseTypes {
683        /**
684         * Response code is 200.
685         */
686        OKAY, 
687        /**
688         * Response code is 201.
689         */
690        CREATED, 
691        /**
692         * Response code is 204.
693         */
694        NOCONTENT, 
695        /**
696         * Response code is 304.
697         */
698        NOTMODIFIED, 
699        /**
700         * Response code is 400.
701         */
702        BAD, 
703        /**
704         * Response code is 403.
705         */
706        FORBIDDEN, 
707        /**
708         * Response code is 404.
709         */
710        NOTFOUND, 
711        /**
712         * Response code is 405.
713         */
714        METHODNOTALLOWED, 
715        /**
716         * Response code is 409.
717         */
718        CONFLICT, 
719        /**
720         * Response code is 410.
721         */
722        GONE, 
723        /**
724         * Response code is 412.
725         */
726        PRECONDITIONFAILED, 
727        /**
728         * Response code is 422.
729         */
730        UNPROCESSABLE, 
731        /**
732         * added to help the parsers with the generic types
733         */
734        NULL;
735        public static AssertionResponseTypes fromCode(String codeString) throws FHIRException {
736            if (codeString == null || "".equals(codeString))
737                return null;
738        if ("okay".equals(codeString))
739          return OKAY;
740        if ("created".equals(codeString))
741          return CREATED;
742        if ("noContent".equals(codeString))
743          return NOCONTENT;
744        if ("notModified".equals(codeString))
745          return NOTMODIFIED;
746        if ("bad".equals(codeString))
747          return BAD;
748        if ("forbidden".equals(codeString))
749          return FORBIDDEN;
750        if ("notFound".equals(codeString))
751          return NOTFOUND;
752        if ("methodNotAllowed".equals(codeString))
753          return METHODNOTALLOWED;
754        if ("conflict".equals(codeString))
755          return CONFLICT;
756        if ("gone".equals(codeString))
757          return GONE;
758        if ("preconditionFailed".equals(codeString))
759          return PRECONDITIONFAILED;
760        if ("unprocessable".equals(codeString))
761          return UNPROCESSABLE;
762        if (Configuration.isAcceptInvalidEnums())
763          return null;
764        else
765          throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'");
766        }
767        public String toCode() {
768          switch (this) {
769            case OKAY: return "okay";
770            case CREATED: return "created";
771            case NOCONTENT: return "noContent";
772            case NOTMODIFIED: return "notModified";
773            case BAD: return "bad";
774            case FORBIDDEN: return "forbidden";
775            case NOTFOUND: return "notFound";
776            case METHODNOTALLOWED: return "methodNotAllowed";
777            case CONFLICT: return "conflict";
778            case GONE: return "gone";
779            case PRECONDITIONFAILED: return "preconditionFailed";
780            case UNPROCESSABLE: return "unprocessable";
781            case NULL: return null;
782            default: return "?";
783          }
784        }
785        public String getSystem() {
786          switch (this) {
787            case OKAY: return "http://hl7.org/fhir/assert-response-code-types";
788            case CREATED: return "http://hl7.org/fhir/assert-response-code-types";
789            case NOCONTENT: return "http://hl7.org/fhir/assert-response-code-types";
790            case NOTMODIFIED: return "http://hl7.org/fhir/assert-response-code-types";
791            case BAD: return "http://hl7.org/fhir/assert-response-code-types";
792            case FORBIDDEN: return "http://hl7.org/fhir/assert-response-code-types";
793            case NOTFOUND: return "http://hl7.org/fhir/assert-response-code-types";
794            case METHODNOTALLOWED: return "http://hl7.org/fhir/assert-response-code-types";
795            case CONFLICT: return "http://hl7.org/fhir/assert-response-code-types";
796            case GONE: return "http://hl7.org/fhir/assert-response-code-types";
797            case PRECONDITIONFAILED: return "http://hl7.org/fhir/assert-response-code-types";
798            case UNPROCESSABLE: return "http://hl7.org/fhir/assert-response-code-types";
799            case NULL: return null;
800            default: return "?";
801          }
802        }
803        public String getDefinition() {
804          switch (this) {
805            case OKAY: return "Response code is 200.";
806            case CREATED: return "Response code is 201.";
807            case NOCONTENT: return "Response code is 204.";
808            case NOTMODIFIED: return "Response code is 304.";
809            case BAD: return "Response code is 400.";
810            case FORBIDDEN: return "Response code is 403.";
811            case NOTFOUND: return "Response code is 404.";
812            case METHODNOTALLOWED: return "Response code is 405.";
813            case CONFLICT: return "Response code is 409.";
814            case GONE: return "Response code is 410.";
815            case PRECONDITIONFAILED: return "Response code is 412.";
816            case UNPROCESSABLE: return "Response code is 422.";
817            case NULL: return null;
818            default: return "?";
819          }
820        }
821        public String getDisplay() {
822          switch (this) {
823            case OKAY: return "okay";
824            case CREATED: return "created";
825            case NOCONTENT: return "noContent";
826            case NOTMODIFIED: return "notModified";
827            case BAD: return "bad";
828            case FORBIDDEN: return "forbidden";
829            case NOTFOUND: return "notFound";
830            case METHODNOTALLOWED: return "methodNotAllowed";
831            case CONFLICT: return "conflict";
832            case GONE: return "gone";
833            case PRECONDITIONFAILED: return "preconditionFailed";
834            case UNPROCESSABLE: return "unprocessable";
835            case NULL: return null;
836            default: return "?";
837          }
838        }
839    }
840
841  public static class AssertionResponseTypesEnumFactory implements EnumFactory<AssertionResponseTypes> {
842    public AssertionResponseTypes fromCode(String codeString) throws IllegalArgumentException {
843      if (codeString == null || "".equals(codeString))
844            if (codeString == null || "".equals(codeString))
845                return null;
846        if ("okay".equals(codeString))
847          return AssertionResponseTypes.OKAY;
848        if ("created".equals(codeString))
849          return AssertionResponseTypes.CREATED;
850        if ("noContent".equals(codeString))
851          return AssertionResponseTypes.NOCONTENT;
852        if ("notModified".equals(codeString))
853          return AssertionResponseTypes.NOTMODIFIED;
854        if ("bad".equals(codeString))
855          return AssertionResponseTypes.BAD;
856        if ("forbidden".equals(codeString))
857          return AssertionResponseTypes.FORBIDDEN;
858        if ("notFound".equals(codeString))
859          return AssertionResponseTypes.NOTFOUND;
860        if ("methodNotAllowed".equals(codeString))
861          return AssertionResponseTypes.METHODNOTALLOWED;
862        if ("conflict".equals(codeString))
863          return AssertionResponseTypes.CONFLICT;
864        if ("gone".equals(codeString))
865          return AssertionResponseTypes.GONE;
866        if ("preconditionFailed".equals(codeString))
867          return AssertionResponseTypes.PRECONDITIONFAILED;
868        if ("unprocessable".equals(codeString))
869          return AssertionResponseTypes.UNPROCESSABLE;
870        throw new IllegalArgumentException("Unknown AssertionResponseTypes code '"+codeString+"'");
871        }
872        public Enumeration<AssertionResponseTypes> fromType(PrimitiveType<?> code) throws FHIRException {
873          if (code == null)
874            return null;
875          if (code.isEmpty())
876            return new Enumeration<AssertionResponseTypes>(this);
877          String codeString = code.asStringValue();
878          if (codeString == null || "".equals(codeString))
879            return null;
880        if ("okay".equals(codeString))
881          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.OKAY);
882        if ("created".equals(codeString))
883          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CREATED);
884        if ("noContent".equals(codeString))
885          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOCONTENT);
886        if ("notModified".equals(codeString))
887          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTMODIFIED);
888        if ("bad".equals(codeString))
889          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.BAD);
890        if ("forbidden".equals(codeString))
891          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.FORBIDDEN);
892        if ("notFound".equals(codeString))
893          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTFOUND);
894        if ("methodNotAllowed".equals(codeString))
895          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.METHODNOTALLOWED);
896        if ("conflict".equals(codeString))
897          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CONFLICT);
898        if ("gone".equals(codeString))
899          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.GONE);
900        if ("preconditionFailed".equals(codeString))
901          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.PRECONDITIONFAILED);
902        if ("unprocessable".equals(codeString))
903          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.UNPROCESSABLE);
904        throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'");
905        }
906    public String toCode(AssertionResponseTypes code) {
907      if (code == AssertionResponseTypes.OKAY)
908        return "okay";
909      if (code == AssertionResponseTypes.CREATED)
910        return "created";
911      if (code == AssertionResponseTypes.NOCONTENT)
912        return "noContent";
913      if (code == AssertionResponseTypes.NOTMODIFIED)
914        return "notModified";
915      if (code == AssertionResponseTypes.BAD)
916        return "bad";
917      if (code == AssertionResponseTypes.FORBIDDEN)
918        return "forbidden";
919      if (code == AssertionResponseTypes.NOTFOUND)
920        return "notFound";
921      if (code == AssertionResponseTypes.METHODNOTALLOWED)
922        return "methodNotAllowed";
923      if (code == AssertionResponseTypes.CONFLICT)
924        return "conflict";
925      if (code == AssertionResponseTypes.GONE)
926        return "gone";
927      if (code == AssertionResponseTypes.PRECONDITIONFAILED)
928        return "preconditionFailed";
929      if (code == AssertionResponseTypes.UNPROCESSABLE)
930        return "unprocessable";
931      return "?";
932      }
933    public String toSystem(AssertionResponseTypes code) {
934      return code.getSystem();
935      }
936    }
937
938    @Block()
939    public static class TestScriptOriginComponent extends BackboneElement implements IBaseBackboneElement {
940        /**
941         * Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.
942         */
943        @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false)
944        @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." )
945        protected IntegerType index;
946
947        /**
948         * The type of origin profile the test system supports.
949         */
950        @Child(name = "profile", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false)
951        @Description(shortDefinition="FHIR-Client | FHIR-SDC-FormFiller", formalDefinition="The type of origin profile the test system supports." )
952        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-profile-origin-types")
953        protected Coding profile;
954
955        private static final long serialVersionUID = -1239935149L;
956
957    /**
958     * Constructor
959     */
960      public TestScriptOriginComponent() {
961        super();
962      }
963
964    /**
965     * Constructor
966     */
967      public TestScriptOriginComponent(IntegerType index, Coding profile) {
968        super();
969        this.index = index;
970        this.profile = profile;
971      }
972
973        /**
974         * @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
975         */
976        public IntegerType getIndexElement() { 
977          if (this.index == null)
978            if (Configuration.errorOnAutoCreate())
979              throw new Error("Attempt to auto-create TestScriptOriginComponent.index");
980            else if (Configuration.doAutoCreate())
981              this.index = new IntegerType(); // bb
982          return this.index;
983        }
984
985        public boolean hasIndexElement() { 
986          return this.index != null && !this.index.isEmpty();
987        }
988
989        public boolean hasIndex() { 
990          return this.index != null && !this.index.isEmpty();
991        }
992
993        /**
994         * @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
995         */
996        public TestScriptOriginComponent setIndexElement(IntegerType value) { 
997          this.index = value;
998          return this;
999        }
1000
1001        /**
1002         * @return Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.
1003         */
1004        public int getIndex() { 
1005          return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue();
1006        }
1007
1008        /**
1009         * @param value Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.
1010         */
1011        public TestScriptOriginComponent setIndex(int value) { 
1012            if (this.index == null)
1013              this.index = new IntegerType();
1014            this.index.setValue(value);
1015          return this;
1016        }
1017
1018        /**
1019         * @return {@link #profile} (The type of origin profile the test system supports.)
1020         */
1021        public Coding getProfile() { 
1022          if (this.profile == null)
1023            if (Configuration.errorOnAutoCreate())
1024              throw new Error("Attempt to auto-create TestScriptOriginComponent.profile");
1025            else if (Configuration.doAutoCreate())
1026              this.profile = new Coding(); // cc
1027          return this.profile;
1028        }
1029
1030        public boolean hasProfile() { 
1031          return this.profile != null && !this.profile.isEmpty();
1032        }
1033
1034        /**
1035         * @param value {@link #profile} (The type of origin profile the test system supports.)
1036         */
1037        public TestScriptOriginComponent setProfile(Coding value)  { 
1038          this.profile = value;
1039          return this;
1040        }
1041
1042        protected void listChildren(List<Property> children) {
1043          super.listChildren(children);
1044          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));
1045          children.add(new Property("profile", "Coding", "The type of origin profile the test system supports.", 0, 1, profile));
1046        }
1047
1048        @Override
1049        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1050          switch (_hash) {
1051          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);
1052          case -309425751: /*profile*/  return new Property("profile", "Coding", "The type of origin profile the test system supports.", 0, 1, profile);
1053          default: return super.getNamedProperty(_hash, _name, _checkValid);
1054          }
1055
1056        }
1057
1058      @Override
1059      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1060        switch (hash) {
1061        case 100346066: /*index*/ return this.index == null ? new Base[0] : new Base[] {this.index}; // IntegerType
1062        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Coding
1063        default: return super.getProperty(hash, name, checkValid);
1064        }
1065
1066      }
1067
1068      @Override
1069      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1070        switch (hash) {
1071        case 100346066: // index
1072          this.index = castToInteger(value); // IntegerType
1073          return value;
1074        case -309425751: // profile
1075          this.profile = castToCoding(value); // Coding
1076          return value;
1077        default: return super.setProperty(hash, name, value);
1078        }
1079
1080      }
1081
1082      @Override
1083      public Base setProperty(String name, Base value) throws FHIRException {
1084        if (name.equals("index")) {
1085          this.index = castToInteger(value); // IntegerType
1086        } else if (name.equals("profile")) {
1087          this.profile = castToCoding(value); // Coding
1088        } else
1089          return super.setProperty(name, value);
1090        return value;
1091      }
1092
1093      @Override
1094      public Base makeProperty(int hash, String name) throws FHIRException {
1095        switch (hash) {
1096        case 100346066:  return getIndexElement();
1097        case -309425751:  return getProfile(); 
1098        default: return super.makeProperty(hash, name);
1099        }
1100
1101      }
1102
1103      @Override
1104      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1105        switch (hash) {
1106        case 100346066: /*index*/ return new String[] {"integer"};
1107        case -309425751: /*profile*/ return new String[] {"Coding"};
1108        default: return super.getTypesForProperty(hash, name);
1109        }
1110
1111      }
1112
1113      @Override
1114      public Base addChild(String name) throws FHIRException {
1115        if (name.equals("index")) {
1116          throw new FHIRException("Cannot call addChild on a singleton property TestScript.index");
1117        }
1118        else if (name.equals("profile")) {
1119          this.profile = new Coding();
1120          return this.profile;
1121        }
1122        else
1123          return super.addChild(name);
1124      }
1125
1126      public TestScriptOriginComponent copy() {
1127        TestScriptOriginComponent dst = new TestScriptOriginComponent();
1128        copyValues(dst);
1129        dst.index = index == null ? null : index.copy();
1130        dst.profile = profile == null ? null : profile.copy();
1131        return dst;
1132      }
1133
1134      @Override
1135      public boolean equalsDeep(Base other_) {
1136        if (!super.equalsDeep(other_))
1137          return false;
1138        if (!(other_ instanceof TestScriptOriginComponent))
1139          return false;
1140        TestScriptOriginComponent o = (TestScriptOriginComponent) other_;
1141        return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true);
1142      }
1143
1144      @Override
1145      public boolean equalsShallow(Base other_) {
1146        if (!super.equalsShallow(other_))
1147          return false;
1148        if (!(other_ instanceof TestScriptOriginComponent))
1149          return false;
1150        TestScriptOriginComponent o = (TestScriptOriginComponent) other_;
1151        return compareValues(index, o.index, true);
1152      }
1153
1154      public boolean isEmpty() {
1155        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(index, profile);
1156      }
1157
1158  public String fhirType() {
1159    return "TestScript.origin";
1160
1161  }
1162
1163  }
1164
1165    @Block()
1166    public static class TestScriptDestinationComponent extends BackboneElement implements IBaseBackboneElement {
1167        /**
1168         * Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.
1169         */
1170        @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1171        @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." )
1172        protected IntegerType index;
1173
1174        /**
1175         * The type of destination profile the test system supports.
1176         */
1177        @Child(name = "profile", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false)
1178        @Description(shortDefinition="FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor", formalDefinition="The type of destination profile the test system supports." )
1179        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-profile-destination-types")
1180        protected Coding profile;
1181
1182        private static final long serialVersionUID = -1239935149L;
1183
1184    /**
1185     * Constructor
1186     */
1187      public TestScriptDestinationComponent() {
1188        super();
1189      }
1190
1191    /**
1192     * Constructor
1193     */
1194      public TestScriptDestinationComponent(IntegerType index, Coding profile) {
1195        super();
1196        this.index = index;
1197        this.profile = profile;
1198      }
1199
1200        /**
1201         * @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
1202         */
1203        public IntegerType getIndexElement() { 
1204          if (this.index == null)
1205            if (Configuration.errorOnAutoCreate())
1206              throw new Error("Attempt to auto-create TestScriptDestinationComponent.index");
1207            else if (Configuration.doAutoCreate())
1208              this.index = new IntegerType(); // bb
1209          return this.index;
1210        }
1211
1212        public boolean hasIndexElement() { 
1213          return this.index != null && !this.index.isEmpty();
1214        }
1215
1216        public boolean hasIndex() { 
1217          return this.index != null && !this.index.isEmpty();
1218        }
1219
1220        /**
1221         * @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
1222         */
1223        public TestScriptDestinationComponent setIndexElement(IntegerType value) { 
1224          this.index = value;
1225          return this;
1226        }
1227
1228        /**
1229         * @return Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.
1230         */
1231        public int getIndex() { 
1232          return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue();
1233        }
1234
1235        /**
1236         * @param value Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.
1237         */
1238        public TestScriptDestinationComponent setIndex(int value) { 
1239            if (this.index == null)
1240              this.index = new IntegerType();
1241            this.index.setValue(value);
1242          return this;
1243        }
1244
1245        /**
1246         * @return {@link #profile} (The type of destination profile the test system supports.)
1247         */
1248        public Coding getProfile() { 
1249          if (this.profile == null)
1250            if (Configuration.errorOnAutoCreate())
1251              throw new Error("Attempt to auto-create TestScriptDestinationComponent.profile");
1252            else if (Configuration.doAutoCreate())
1253              this.profile = new Coding(); // cc
1254          return this.profile;
1255        }
1256
1257        public boolean hasProfile() { 
1258          return this.profile != null && !this.profile.isEmpty();
1259        }
1260
1261        /**
1262         * @param value {@link #profile} (The type of destination profile the test system supports.)
1263         */
1264        public TestScriptDestinationComponent setProfile(Coding value)  { 
1265          this.profile = value;
1266          return this;
1267        }
1268
1269        protected void listChildren(List<Property> children) {
1270          super.listChildren(children);
1271          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));
1272          children.add(new Property("profile", "Coding", "The type of destination profile the test system supports.", 0, 1, profile));
1273        }
1274
1275        @Override
1276        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1277          switch (_hash) {
1278          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);
1279          case -309425751: /*profile*/  return new Property("profile", "Coding", "The type of destination profile the test system supports.", 0, 1, profile);
1280          default: return super.getNamedProperty(_hash, _name, _checkValid);
1281          }
1282
1283        }
1284
1285      @Override
1286      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1287        switch (hash) {
1288        case 100346066: /*index*/ return this.index == null ? new Base[0] : new Base[] {this.index}; // IntegerType
1289        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Coding
1290        default: return super.getProperty(hash, name, checkValid);
1291        }
1292
1293      }
1294
1295      @Override
1296      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1297        switch (hash) {
1298        case 100346066: // index
1299          this.index = castToInteger(value); // IntegerType
1300          return value;
1301        case -309425751: // profile
1302          this.profile = castToCoding(value); // Coding
1303          return value;
1304        default: return super.setProperty(hash, name, value);
1305        }
1306
1307      }
1308
1309      @Override
1310      public Base setProperty(String name, Base value) throws FHIRException {
1311        if (name.equals("index")) {
1312          this.index = castToInteger(value); // IntegerType
1313        } else if (name.equals("profile")) {
1314          this.profile = castToCoding(value); // Coding
1315        } else
1316          return super.setProperty(name, value);
1317        return value;
1318      }
1319
1320      @Override
1321      public Base makeProperty(int hash, String name) throws FHIRException {
1322        switch (hash) {
1323        case 100346066:  return getIndexElement();
1324        case -309425751:  return getProfile(); 
1325        default: return super.makeProperty(hash, name);
1326        }
1327
1328      }
1329
1330      @Override
1331      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1332        switch (hash) {
1333        case 100346066: /*index*/ return new String[] {"integer"};
1334        case -309425751: /*profile*/ return new String[] {"Coding"};
1335        default: return super.getTypesForProperty(hash, name);
1336        }
1337
1338      }
1339
1340      @Override
1341      public Base addChild(String name) throws FHIRException {
1342        if (name.equals("index")) {
1343          throw new FHIRException("Cannot call addChild on a singleton property TestScript.index");
1344        }
1345        else if (name.equals("profile")) {
1346          this.profile = new Coding();
1347          return this.profile;
1348        }
1349        else
1350          return super.addChild(name);
1351      }
1352
1353      public TestScriptDestinationComponent copy() {
1354        TestScriptDestinationComponent dst = new TestScriptDestinationComponent();
1355        copyValues(dst);
1356        dst.index = index == null ? null : index.copy();
1357        dst.profile = profile == null ? null : profile.copy();
1358        return dst;
1359      }
1360
1361      @Override
1362      public boolean equalsDeep(Base other_) {
1363        if (!super.equalsDeep(other_))
1364          return false;
1365        if (!(other_ instanceof TestScriptDestinationComponent))
1366          return false;
1367        TestScriptDestinationComponent o = (TestScriptDestinationComponent) other_;
1368        return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true);
1369      }
1370
1371      @Override
1372      public boolean equalsShallow(Base other_) {
1373        if (!super.equalsShallow(other_))
1374          return false;
1375        if (!(other_ instanceof TestScriptDestinationComponent))
1376          return false;
1377        TestScriptDestinationComponent o = (TestScriptDestinationComponent) other_;
1378        return compareValues(index, o.index, true);
1379      }
1380
1381      public boolean isEmpty() {
1382        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(index, profile);
1383      }
1384
1385  public String fhirType() {
1386    return "TestScript.destination";
1387
1388  }
1389
1390  }
1391
1392    @Block()
1393    public static class TestScriptMetadataComponent extends BackboneElement implements IBaseBackboneElement {
1394        /**
1395         * A link to the FHIR specification that this test is covering.
1396         */
1397        @Child(name = "link", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1398        @Description(shortDefinition="Links to the FHIR specification", formalDefinition="A link to the FHIR specification that this test is covering." )
1399        protected List<TestScriptMetadataLinkComponent> link;
1400
1401        /**
1402         * Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.
1403         */
1404        @Child(name = "capability", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1405        @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." )
1406        protected List<TestScriptMetadataCapabilityComponent> capability;
1407
1408        private static final long serialVersionUID = 745183328L;
1409
1410    /**
1411     * Constructor
1412     */
1413      public TestScriptMetadataComponent() {
1414        super();
1415      }
1416
1417        /**
1418         * @return {@link #link} (A link to the FHIR specification that this test is covering.)
1419         */
1420        public List<TestScriptMetadataLinkComponent> getLink() { 
1421          if (this.link == null)
1422            this.link = new ArrayList<TestScriptMetadataLinkComponent>();
1423          return this.link;
1424        }
1425
1426        /**
1427         * @return Returns a reference to <code>this</code> for easy method chaining
1428         */
1429        public TestScriptMetadataComponent setLink(List<TestScriptMetadataLinkComponent> theLink) { 
1430          this.link = theLink;
1431          return this;
1432        }
1433
1434        public boolean hasLink() { 
1435          if (this.link == null)
1436            return false;
1437          for (TestScriptMetadataLinkComponent item : this.link)
1438            if (!item.isEmpty())
1439              return true;
1440          return false;
1441        }
1442
1443        public TestScriptMetadataLinkComponent addLink() { //3
1444          TestScriptMetadataLinkComponent t = new TestScriptMetadataLinkComponent();
1445          if (this.link == null)
1446            this.link = new ArrayList<TestScriptMetadataLinkComponent>();
1447          this.link.add(t);
1448          return t;
1449        }
1450
1451        public TestScriptMetadataComponent addLink(TestScriptMetadataLinkComponent t) { //3
1452          if (t == null)
1453            return this;
1454          if (this.link == null)
1455            this.link = new ArrayList<TestScriptMetadataLinkComponent>();
1456          this.link.add(t);
1457          return this;
1458        }
1459
1460        /**
1461         * @return The first repetition of repeating field {@link #link}, creating it if it does not already exist
1462         */
1463        public TestScriptMetadataLinkComponent getLinkFirstRep() { 
1464          if (getLink().isEmpty()) {
1465            addLink();
1466          }
1467          return getLink().get(0);
1468        }
1469
1470        /**
1471         * @return {@link #capability} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.)
1472         */
1473        public List<TestScriptMetadataCapabilityComponent> getCapability() { 
1474          if (this.capability == null)
1475            this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1476          return this.capability;
1477        }
1478
1479        /**
1480         * @return Returns a reference to <code>this</code> for easy method chaining
1481         */
1482        public TestScriptMetadataComponent setCapability(List<TestScriptMetadataCapabilityComponent> theCapability) { 
1483          this.capability = theCapability;
1484          return this;
1485        }
1486
1487        public boolean hasCapability() { 
1488          if (this.capability == null)
1489            return false;
1490          for (TestScriptMetadataCapabilityComponent item : this.capability)
1491            if (!item.isEmpty())
1492              return true;
1493          return false;
1494        }
1495
1496        public TestScriptMetadataCapabilityComponent addCapability() { //3
1497          TestScriptMetadataCapabilityComponent t = new TestScriptMetadataCapabilityComponent();
1498          if (this.capability == null)
1499            this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1500          this.capability.add(t);
1501          return t;
1502        }
1503
1504        public TestScriptMetadataComponent addCapability(TestScriptMetadataCapabilityComponent t) { //3
1505          if (t == null)
1506            return this;
1507          if (this.capability == null)
1508            this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1509          this.capability.add(t);
1510          return this;
1511        }
1512
1513        /**
1514         * @return The first repetition of repeating field {@link #capability}, creating it if it does not already exist
1515         */
1516        public TestScriptMetadataCapabilityComponent getCapabilityFirstRep() { 
1517          if (getCapability().isEmpty()) {
1518            addCapability();
1519          }
1520          return getCapability().get(0);
1521        }
1522
1523        protected void listChildren(List<Property> children) {
1524          super.listChildren(children);
1525          children.add(new Property("link", "", "A link to the FHIR specification that this test is covering.", 0, java.lang.Integer.MAX_VALUE, link));
1526          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));
1527        }
1528
1529        @Override
1530        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1531          switch (_hash) {
1532          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);
1533          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);
1534          default: return super.getNamedProperty(_hash, _name, _checkValid);
1535          }
1536
1537        }
1538
1539      @Override
1540      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1541        switch (hash) {
1542        case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // TestScriptMetadataLinkComponent
1543        case -783669992: /*capability*/ return this.capability == null ? new Base[0] : this.capability.toArray(new Base[this.capability.size()]); // TestScriptMetadataCapabilityComponent
1544        default: return super.getProperty(hash, name, checkValid);
1545        }
1546
1547      }
1548
1549      @Override
1550      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1551        switch (hash) {
1552        case 3321850: // link
1553          this.getLink().add((TestScriptMetadataLinkComponent) value); // TestScriptMetadataLinkComponent
1554          return value;
1555        case -783669992: // capability
1556          this.getCapability().add((TestScriptMetadataCapabilityComponent) value); // TestScriptMetadataCapabilityComponent
1557          return value;
1558        default: return super.setProperty(hash, name, value);
1559        }
1560
1561      }
1562
1563      @Override
1564      public Base setProperty(String name, Base value) throws FHIRException {
1565        if (name.equals("link")) {
1566          this.getLink().add((TestScriptMetadataLinkComponent) value);
1567        } else if (name.equals("capability")) {
1568          this.getCapability().add((TestScriptMetadataCapabilityComponent) value);
1569        } else
1570          return super.setProperty(name, value);
1571        return value;
1572      }
1573
1574      @Override
1575      public Base makeProperty(int hash, String name) throws FHIRException {
1576        switch (hash) {
1577        case 3321850:  return addLink(); 
1578        case -783669992:  return addCapability(); 
1579        default: return super.makeProperty(hash, name);
1580        }
1581
1582      }
1583
1584      @Override
1585      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1586        switch (hash) {
1587        case 3321850: /*link*/ return new String[] {};
1588        case -783669992: /*capability*/ return new String[] {};
1589        default: return super.getTypesForProperty(hash, name);
1590        }
1591
1592      }
1593
1594      @Override
1595      public Base addChild(String name) throws FHIRException {
1596        if (name.equals("link")) {
1597          return addLink();
1598        }
1599        else if (name.equals("capability")) {
1600          return addCapability();
1601        }
1602        else
1603          return super.addChild(name);
1604      }
1605
1606      public TestScriptMetadataComponent copy() {
1607        TestScriptMetadataComponent dst = new TestScriptMetadataComponent();
1608        copyValues(dst);
1609        if (link != null) {
1610          dst.link = new ArrayList<TestScriptMetadataLinkComponent>();
1611          for (TestScriptMetadataLinkComponent i : link)
1612            dst.link.add(i.copy());
1613        };
1614        if (capability != null) {
1615          dst.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1616          for (TestScriptMetadataCapabilityComponent i : capability)
1617            dst.capability.add(i.copy());
1618        };
1619        return dst;
1620      }
1621
1622      @Override
1623      public boolean equalsDeep(Base other_) {
1624        if (!super.equalsDeep(other_))
1625          return false;
1626        if (!(other_ instanceof TestScriptMetadataComponent))
1627          return false;
1628        TestScriptMetadataComponent o = (TestScriptMetadataComponent) other_;
1629        return compareDeep(link, o.link, true) && compareDeep(capability, o.capability, true);
1630      }
1631
1632      @Override
1633      public boolean equalsShallow(Base other_) {
1634        if (!super.equalsShallow(other_))
1635          return false;
1636        if (!(other_ instanceof TestScriptMetadataComponent))
1637          return false;
1638        TestScriptMetadataComponent o = (TestScriptMetadataComponent) other_;
1639        return true;
1640      }
1641
1642      public boolean isEmpty() {
1643        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(link, capability);
1644      }
1645
1646  public String fhirType() {
1647    return "TestScript.metadata";
1648
1649  }
1650
1651  }
1652
1653    @Block()
1654    public static class TestScriptMetadataLinkComponent extends BackboneElement implements IBaseBackboneElement {
1655        /**
1656         * URL to a particular requirement or feature within the FHIR specification.
1657         */
1658        @Child(name = "url", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1659        @Description(shortDefinition="URL to the specification", formalDefinition="URL to a particular requirement or feature within the FHIR specification." )
1660        protected UriType url;
1661
1662        /**
1663         * Short description of the link.
1664         */
1665        @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
1666        @Description(shortDefinition="Short description", formalDefinition="Short description of the link." )
1667        protected StringType description;
1668
1669        private static final long serialVersionUID = 213372298L;
1670
1671    /**
1672     * Constructor
1673     */
1674      public TestScriptMetadataLinkComponent() {
1675        super();
1676      }
1677
1678    /**
1679     * Constructor
1680     */
1681      public TestScriptMetadataLinkComponent(UriType url) {
1682        super();
1683        this.url = url;
1684      }
1685
1686        /**
1687         * @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
1688         */
1689        public UriType getUrlElement() { 
1690          if (this.url == null)
1691            if (Configuration.errorOnAutoCreate())
1692              throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.url");
1693            else if (Configuration.doAutoCreate())
1694              this.url = new UriType(); // bb
1695          return this.url;
1696        }
1697
1698        public boolean hasUrlElement() { 
1699          return this.url != null && !this.url.isEmpty();
1700        }
1701
1702        public boolean hasUrl() { 
1703          return this.url != null && !this.url.isEmpty();
1704        }
1705
1706        /**
1707         * @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
1708         */
1709        public TestScriptMetadataLinkComponent setUrlElement(UriType value) { 
1710          this.url = value;
1711          return this;
1712        }
1713
1714        /**
1715         * @return URL to a particular requirement or feature within the FHIR specification.
1716         */
1717        public String getUrl() { 
1718          return this.url == null ? null : this.url.getValue();
1719        }
1720
1721        /**
1722         * @param value URL to a particular requirement or feature within the FHIR specification.
1723         */
1724        public TestScriptMetadataLinkComponent setUrl(String value) { 
1725            if (this.url == null)
1726              this.url = new UriType();
1727            this.url.setValue(value);
1728          return this;
1729        }
1730
1731        /**
1732         * @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
1733         */
1734        public StringType getDescriptionElement() { 
1735          if (this.description == null)
1736            if (Configuration.errorOnAutoCreate())
1737              throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.description");
1738            else if (Configuration.doAutoCreate())
1739              this.description = new StringType(); // bb
1740          return this.description;
1741        }
1742
1743        public boolean hasDescriptionElement() { 
1744          return this.description != null && !this.description.isEmpty();
1745        }
1746
1747        public boolean hasDescription() { 
1748          return this.description != null && !this.description.isEmpty();
1749        }
1750
1751        /**
1752         * @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
1753         */
1754        public TestScriptMetadataLinkComponent setDescriptionElement(StringType value) { 
1755          this.description = value;
1756          return this;
1757        }
1758
1759        /**
1760         * @return Short description of the link.
1761         */
1762        public String getDescription() { 
1763          return this.description == null ? null : this.description.getValue();
1764        }
1765
1766        /**
1767         * @param value Short description of the link.
1768         */
1769        public TestScriptMetadataLinkComponent setDescription(String value) { 
1770          if (Utilities.noString(value))
1771            this.description = null;
1772          else {
1773            if (this.description == null)
1774              this.description = new StringType();
1775            this.description.setValue(value);
1776          }
1777          return this;
1778        }
1779
1780        protected void listChildren(List<Property> children) {
1781          super.listChildren(children);
1782          children.add(new Property("url", "uri", "URL to a particular requirement or feature within the FHIR specification.", 0, 1, url));
1783          children.add(new Property("description", "string", "Short description of the link.", 0, 1, description));
1784        }
1785
1786        @Override
1787        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1788          switch (_hash) {
1789          case 116079: /*url*/  return new Property("url", "uri", "URL to a particular requirement or feature within the FHIR specification.", 0, 1, url);
1790          case -1724546052: /*description*/  return new Property("description", "string", "Short description of the link.", 0, 1, description);
1791          default: return super.getNamedProperty(_hash, _name, _checkValid);
1792          }
1793
1794        }
1795
1796      @Override
1797      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1798        switch (hash) {
1799        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
1800        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1801        default: return super.getProperty(hash, name, checkValid);
1802        }
1803
1804      }
1805
1806      @Override
1807      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1808        switch (hash) {
1809        case 116079: // url
1810          this.url = castToUri(value); // UriType
1811          return value;
1812        case -1724546052: // description
1813          this.description = castToString(value); // StringType
1814          return value;
1815        default: return super.setProperty(hash, name, value);
1816        }
1817
1818      }
1819
1820      @Override
1821      public Base setProperty(String name, Base value) throws FHIRException {
1822        if (name.equals("url")) {
1823          this.url = castToUri(value); // UriType
1824        } else if (name.equals("description")) {
1825          this.description = castToString(value); // StringType
1826        } else
1827          return super.setProperty(name, value);
1828        return value;
1829      }
1830
1831      @Override
1832      public Base makeProperty(int hash, String name) throws FHIRException {
1833        switch (hash) {
1834        case 116079:  return getUrlElement();
1835        case -1724546052:  return getDescriptionElement();
1836        default: return super.makeProperty(hash, name);
1837        }
1838
1839      }
1840
1841      @Override
1842      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1843        switch (hash) {
1844        case 116079: /*url*/ return new String[] {"uri"};
1845        case -1724546052: /*description*/ return new String[] {"string"};
1846        default: return super.getTypesForProperty(hash, name);
1847        }
1848
1849      }
1850
1851      @Override
1852      public Base addChild(String name) throws FHIRException {
1853        if (name.equals("url")) {
1854          throw new FHIRException("Cannot call addChild on a singleton property TestScript.url");
1855        }
1856        else if (name.equals("description")) {
1857          throw new FHIRException("Cannot call addChild on a singleton property TestScript.description");
1858        }
1859        else
1860          return super.addChild(name);
1861      }
1862
1863      public TestScriptMetadataLinkComponent copy() {
1864        TestScriptMetadataLinkComponent dst = new TestScriptMetadataLinkComponent();
1865        copyValues(dst);
1866        dst.url = url == null ? null : url.copy();
1867        dst.description = description == null ? null : description.copy();
1868        return dst;
1869      }
1870
1871      @Override
1872      public boolean equalsDeep(Base other_) {
1873        if (!super.equalsDeep(other_))
1874          return false;
1875        if (!(other_ instanceof TestScriptMetadataLinkComponent))
1876          return false;
1877        TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other_;
1878        return compareDeep(url, o.url, true) && compareDeep(description, o.description, true);
1879      }
1880
1881      @Override
1882      public boolean equalsShallow(Base other_) {
1883        if (!super.equalsShallow(other_))
1884          return false;
1885        if (!(other_ instanceof TestScriptMetadataLinkComponent))
1886          return false;
1887        TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other_;
1888        return compareValues(url, o.url, true) && compareValues(description, o.description, true);
1889      }
1890
1891      public boolean isEmpty() {
1892        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, description);
1893      }
1894
1895  public String fhirType() {
1896    return "TestScript.metadata.link";
1897
1898  }
1899
1900  }
1901
1902    @Block()
1903    public static class TestScriptMetadataCapabilityComponent extends BackboneElement implements IBaseBackboneElement {
1904        /**
1905         * Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.
1906         */
1907        @Child(name = "required", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false)
1908        @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." )
1909        protected BooleanType required;
1910
1911        /**
1912         * Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.
1913         */
1914        @Child(name = "validated", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false)
1915        @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." )
1916        protected BooleanType validated;
1917
1918        /**
1919         * Description of the capabilities that this test script is requiring the server to support.
1920         */
1921        @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
1922        @Description(shortDefinition="The expected capabilities of the server", formalDefinition="Description of the capabilities that this test script is requiring the server to support." )
1923        protected StringType description;
1924
1925        /**
1926         * Which origin server these requirements apply to.
1927         */
1928        @Child(name = "origin", type = {IntegerType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1929        @Description(shortDefinition="Which origin server these requirements apply to", formalDefinition="Which origin server these requirements apply to." )
1930        protected List<IntegerType> origin;
1931
1932        /**
1933         * Which server these requirements apply to.
1934         */
1935        @Child(name = "destination", type = {IntegerType.class}, order=5, min=0, max=1, modifier=false, summary=false)
1936        @Description(shortDefinition="Which server these requirements apply to", formalDefinition="Which server these requirements apply to." )
1937        protected IntegerType destination;
1938
1939        /**
1940         * Links to the FHIR specification that describes this interaction and the resources involved in more detail.
1941         */
1942        @Child(name = "link", type = {UriType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1943        @Description(shortDefinition="Links to the FHIR specification", formalDefinition="Links to the FHIR specification that describes this interaction and the resources involved in more detail." )
1944        protected List<UriType> link;
1945
1946        /**
1947         * 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.
1948         */
1949        @Child(name = "capabilities", type = {CapabilityStatement.class}, order=7, min=1, max=1, modifier=false, summary=false)
1950        @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." )
1951        protected Reference capabilities;
1952
1953        /**
1954         * The actual object that is the target of the reference (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.)
1955         */
1956        protected CapabilityStatement capabilitiesTarget;
1957
1958        private static final long serialVersionUID = -106110735L;
1959
1960    /**
1961     * Constructor
1962     */
1963      public TestScriptMetadataCapabilityComponent() {
1964        super();
1965      }
1966
1967    /**
1968     * Constructor
1969     */
1970      public TestScriptMetadataCapabilityComponent(Reference capabilities) {
1971        super();
1972        this.capabilities = capabilities;
1973      }
1974
1975        /**
1976         * @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
1977         */
1978        public BooleanType getRequiredElement() { 
1979          if (this.required == null)
1980            if (Configuration.errorOnAutoCreate())
1981              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.required");
1982            else if (Configuration.doAutoCreate())
1983              this.required = new BooleanType(); // bb
1984          return this.required;
1985        }
1986
1987        public boolean hasRequiredElement() { 
1988          return this.required != null && !this.required.isEmpty();
1989        }
1990
1991        public boolean hasRequired() { 
1992          return this.required != null && !this.required.isEmpty();
1993        }
1994
1995        /**
1996         * @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
1997         */
1998        public TestScriptMetadataCapabilityComponent setRequiredElement(BooleanType value) { 
1999          this.required = value;
2000          return this;
2001        }
2002
2003        /**
2004         * @return Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.
2005         */
2006        public boolean getRequired() { 
2007          return this.required == null || this.required.isEmpty() ? false : this.required.getValue();
2008        }
2009
2010        /**
2011         * @param value Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.
2012         */
2013        public TestScriptMetadataCapabilityComponent setRequired(boolean value) { 
2014            if (this.required == null)
2015              this.required = new BooleanType();
2016            this.required.setValue(value);
2017          return this;
2018        }
2019
2020        /**
2021         * @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
2022         */
2023        public BooleanType getValidatedElement() { 
2024          if (this.validated == null)
2025            if (Configuration.errorOnAutoCreate())
2026              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.validated");
2027            else if (Configuration.doAutoCreate())
2028              this.validated = new BooleanType(); // bb
2029          return this.validated;
2030        }
2031
2032        public boolean hasValidatedElement() { 
2033          return this.validated != null && !this.validated.isEmpty();
2034        }
2035
2036        public boolean hasValidated() { 
2037          return this.validated != null && !this.validated.isEmpty();
2038        }
2039
2040        /**
2041         * @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
2042         */
2043        public TestScriptMetadataCapabilityComponent setValidatedElement(BooleanType value) { 
2044          this.validated = value;
2045          return this;
2046        }
2047
2048        /**
2049         * @return Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.
2050         */
2051        public boolean getValidated() { 
2052          return this.validated == null || this.validated.isEmpty() ? false : this.validated.getValue();
2053        }
2054
2055        /**
2056         * @param value Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.
2057         */
2058        public TestScriptMetadataCapabilityComponent setValidated(boolean value) { 
2059            if (this.validated == null)
2060              this.validated = new BooleanType();
2061            this.validated.setValue(value);
2062          return this;
2063        }
2064
2065        /**
2066         * @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
2067         */
2068        public StringType getDescriptionElement() { 
2069          if (this.description == null)
2070            if (Configuration.errorOnAutoCreate())
2071              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.description");
2072            else if (Configuration.doAutoCreate())
2073              this.description = new StringType(); // bb
2074          return this.description;
2075        }
2076
2077        public boolean hasDescriptionElement() { 
2078          return this.description != null && !this.description.isEmpty();
2079        }
2080
2081        public boolean hasDescription() { 
2082          return this.description != null && !this.description.isEmpty();
2083        }
2084
2085        /**
2086         * @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
2087         */
2088        public TestScriptMetadataCapabilityComponent setDescriptionElement(StringType value) { 
2089          this.description = value;
2090          return this;
2091        }
2092
2093        /**
2094         * @return Description of the capabilities that this test script is requiring the server to support.
2095         */
2096        public String getDescription() { 
2097          return this.description == null ? null : this.description.getValue();
2098        }
2099
2100        /**
2101         * @param value Description of the capabilities that this test script is requiring the server to support.
2102         */
2103        public TestScriptMetadataCapabilityComponent setDescription(String value) { 
2104          if (Utilities.noString(value))
2105            this.description = null;
2106          else {
2107            if (this.description == null)
2108              this.description = new StringType();
2109            this.description.setValue(value);
2110          }
2111          return this;
2112        }
2113
2114        /**
2115         * @return {@link #origin} (Which origin server these requirements apply to.)
2116         */
2117        public List<IntegerType> getOrigin() { 
2118          if (this.origin == null)
2119            this.origin = new ArrayList<IntegerType>();
2120          return this.origin;
2121        }
2122
2123        /**
2124         * @return Returns a reference to <code>this</code> for easy method chaining
2125         */
2126        public TestScriptMetadataCapabilityComponent setOrigin(List<IntegerType> theOrigin) { 
2127          this.origin = theOrigin;
2128          return this;
2129        }
2130
2131        public boolean hasOrigin() { 
2132          if (this.origin == null)
2133            return false;
2134          for (IntegerType item : this.origin)
2135            if (!item.isEmpty())
2136              return true;
2137          return false;
2138        }
2139
2140        /**
2141         * @return {@link #origin} (Which origin server these requirements apply to.)
2142         */
2143        public IntegerType addOriginElement() {//2 
2144          IntegerType t = new IntegerType();
2145          if (this.origin == null)
2146            this.origin = new ArrayList<IntegerType>();
2147          this.origin.add(t);
2148          return t;
2149        }
2150
2151        /**
2152         * @param value {@link #origin} (Which origin server these requirements apply to.)
2153         */
2154        public TestScriptMetadataCapabilityComponent addOrigin(int value) { //1
2155          IntegerType t = new IntegerType();
2156          t.setValue(value);
2157          if (this.origin == null)
2158            this.origin = new ArrayList<IntegerType>();
2159          this.origin.add(t);
2160          return this;
2161        }
2162
2163        /**
2164         * @param value {@link #origin} (Which origin server these requirements apply to.)
2165         */
2166        public boolean hasOrigin(int value) { 
2167          if (this.origin == null)
2168            return false;
2169          for (IntegerType v : this.origin)
2170            if (v.getValue().equals(value)) // integer
2171              return true;
2172          return false;
2173        }
2174
2175        /**
2176         * @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
2177         */
2178        public IntegerType getDestinationElement() { 
2179          if (this.destination == null)
2180            if (Configuration.errorOnAutoCreate())
2181              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.destination");
2182            else if (Configuration.doAutoCreate())
2183              this.destination = new IntegerType(); // bb
2184          return this.destination;
2185        }
2186
2187        public boolean hasDestinationElement() { 
2188          return this.destination != null && !this.destination.isEmpty();
2189        }
2190
2191        public boolean hasDestination() { 
2192          return this.destination != null && !this.destination.isEmpty();
2193        }
2194
2195        /**
2196         * @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
2197         */
2198        public TestScriptMetadataCapabilityComponent setDestinationElement(IntegerType value) { 
2199          this.destination = value;
2200          return this;
2201        }
2202
2203        /**
2204         * @return Which server these requirements apply to.
2205         */
2206        public int getDestination() { 
2207          return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue();
2208        }
2209
2210        /**
2211         * @param value Which server these requirements apply to.
2212         */
2213        public TestScriptMetadataCapabilityComponent setDestination(int value) { 
2214            if (this.destination == null)
2215              this.destination = new IntegerType();
2216            this.destination.setValue(value);
2217          return this;
2218        }
2219
2220        /**
2221         * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.)
2222         */
2223        public List<UriType> getLink() { 
2224          if (this.link == null)
2225            this.link = new ArrayList<UriType>();
2226          return this.link;
2227        }
2228
2229        /**
2230         * @return Returns a reference to <code>this</code> for easy method chaining
2231         */
2232        public TestScriptMetadataCapabilityComponent setLink(List<UriType> theLink) { 
2233          this.link = theLink;
2234          return this;
2235        }
2236
2237        public boolean hasLink() { 
2238          if (this.link == null)
2239            return false;
2240          for (UriType item : this.link)
2241            if (!item.isEmpty())
2242              return true;
2243          return false;
2244        }
2245
2246        /**
2247         * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.)
2248         */
2249        public UriType addLinkElement() {//2 
2250          UriType t = new UriType();
2251          if (this.link == null)
2252            this.link = new ArrayList<UriType>();
2253          this.link.add(t);
2254          return t;
2255        }
2256
2257        /**
2258         * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.)
2259         */
2260        public TestScriptMetadataCapabilityComponent addLink(String value) { //1
2261          UriType t = new UriType();
2262          t.setValue(value);
2263          if (this.link == null)
2264            this.link = new ArrayList<UriType>();
2265          this.link.add(t);
2266          return this;
2267        }
2268
2269        /**
2270         * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.)
2271         */
2272        public boolean hasLink(String value) { 
2273          if (this.link == null)
2274            return false;
2275          for (UriType v : this.link)
2276            if (v.getValue().equals(value)) // uri
2277              return true;
2278          return false;
2279        }
2280
2281        /**
2282         * @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.)
2283         */
2284        public Reference getCapabilities() { 
2285          if (this.capabilities == null)
2286            if (Configuration.errorOnAutoCreate())
2287              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.capabilities");
2288            else if (Configuration.doAutoCreate())
2289              this.capabilities = new Reference(); // cc
2290          return this.capabilities;
2291        }
2292
2293        public boolean hasCapabilities() { 
2294          return this.capabilities != null && !this.capabilities.isEmpty();
2295        }
2296
2297        /**
2298         * @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.)
2299         */
2300        public TestScriptMetadataCapabilityComponent setCapabilities(Reference value)  { 
2301          this.capabilities = value;
2302          return this;
2303        }
2304
2305        /**
2306         * @return {@link #capabilities} 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. (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.)
2307         */
2308        public CapabilityStatement getCapabilitiesTarget() { 
2309          if (this.capabilitiesTarget == null)
2310            if (Configuration.errorOnAutoCreate())
2311              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.capabilities");
2312            else if (Configuration.doAutoCreate())
2313              this.capabilitiesTarget = new CapabilityStatement(); // aa
2314          return this.capabilitiesTarget;
2315        }
2316
2317        /**
2318         * @param value {@link #capabilities} 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. (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.)
2319         */
2320        public TestScriptMetadataCapabilityComponent setCapabilitiesTarget(CapabilityStatement value) { 
2321          this.capabilitiesTarget = value;
2322          return this;
2323        }
2324
2325        protected void listChildren(List<Property> children) {
2326          super.listChildren(children);
2327          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));
2328          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));
2329          children.add(new Property("description", "string", "Description of the capabilities that this test script is requiring the server to support.", 0, 1, description));
2330          children.add(new Property("origin", "integer", "Which origin server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, origin));
2331          children.add(new Property("destination", "integer", "Which server these requirements apply to.", 0, 1, destination));
2332          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));
2333          children.add(new Property("capabilities", "Reference(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));
2334        }
2335
2336        @Override
2337        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2338          switch (_hash) {
2339          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);
2340          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);
2341          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);
2342          case -1008619738: /*origin*/  return new Property("origin", "integer", "Which origin server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, origin);
2343          case -1429847026: /*destination*/  return new Property("destination", "integer", "Which server these requirements apply to.", 0, 1, destination);
2344          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);
2345          case -1487597642: /*capabilities*/  return new Property("capabilities", "Reference(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);
2346          default: return super.getNamedProperty(_hash, _name, _checkValid);
2347          }
2348
2349        }
2350
2351      @Override
2352      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2353        switch (hash) {
2354        case -393139297: /*required*/ return this.required == null ? new Base[0] : new Base[] {this.required}; // BooleanType
2355        case -1109784050: /*validated*/ return this.validated == null ? new Base[0] : new Base[] {this.validated}; // BooleanType
2356        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
2357        case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // IntegerType
2358        case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // IntegerType
2359        case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // UriType
2360        case -1487597642: /*capabilities*/ return this.capabilities == null ? new Base[0] : new Base[] {this.capabilities}; // Reference
2361        default: return super.getProperty(hash, name, checkValid);
2362        }
2363
2364      }
2365
2366      @Override
2367      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2368        switch (hash) {
2369        case -393139297: // required
2370          this.required = castToBoolean(value); // BooleanType
2371          return value;
2372        case -1109784050: // validated
2373          this.validated = castToBoolean(value); // BooleanType
2374          return value;
2375        case -1724546052: // description
2376          this.description = castToString(value); // StringType
2377          return value;
2378        case -1008619738: // origin
2379          this.getOrigin().add(castToInteger(value)); // IntegerType
2380          return value;
2381        case -1429847026: // destination
2382          this.destination = castToInteger(value); // IntegerType
2383          return value;
2384        case 3321850: // link
2385          this.getLink().add(castToUri(value)); // UriType
2386          return value;
2387        case -1487597642: // capabilities
2388          this.capabilities = castToReference(value); // Reference
2389          return value;
2390        default: return super.setProperty(hash, name, value);
2391        }
2392
2393      }
2394
2395      @Override
2396      public Base setProperty(String name, Base value) throws FHIRException {
2397        if (name.equals("required")) {
2398          this.required = castToBoolean(value); // BooleanType
2399        } else if (name.equals("validated")) {
2400          this.validated = castToBoolean(value); // BooleanType
2401        } else if (name.equals("description")) {
2402          this.description = castToString(value); // StringType
2403        } else if (name.equals("origin")) {
2404          this.getOrigin().add(castToInteger(value));
2405        } else if (name.equals("destination")) {
2406          this.destination = castToInteger(value); // IntegerType
2407        } else if (name.equals("link")) {
2408          this.getLink().add(castToUri(value));
2409        } else if (name.equals("capabilities")) {
2410          this.capabilities = castToReference(value); // Reference
2411        } else
2412          return super.setProperty(name, value);
2413        return value;
2414      }
2415
2416      @Override
2417      public Base makeProperty(int hash, String name) throws FHIRException {
2418        switch (hash) {
2419        case -393139297:  return getRequiredElement();
2420        case -1109784050:  return getValidatedElement();
2421        case -1724546052:  return getDescriptionElement();
2422        case -1008619738:  return addOriginElement();
2423        case -1429847026:  return getDestinationElement();
2424        case 3321850:  return addLinkElement();
2425        case -1487597642:  return getCapabilities(); 
2426        default: return super.makeProperty(hash, name);
2427        }
2428
2429      }
2430
2431      @Override
2432      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2433        switch (hash) {
2434        case -393139297: /*required*/ return new String[] {"boolean"};
2435        case -1109784050: /*validated*/ return new String[] {"boolean"};
2436        case -1724546052: /*description*/ return new String[] {"string"};
2437        case -1008619738: /*origin*/ return new String[] {"integer"};
2438        case -1429847026: /*destination*/ return new String[] {"integer"};
2439        case 3321850: /*link*/ return new String[] {"uri"};
2440        case -1487597642: /*capabilities*/ return new String[] {"Reference"};
2441        default: return super.getTypesForProperty(hash, name);
2442        }
2443
2444      }
2445
2446      @Override
2447      public Base addChild(String name) throws FHIRException {
2448        if (name.equals("required")) {
2449          throw new FHIRException("Cannot call addChild on a singleton property TestScript.required");
2450        }
2451        else if (name.equals("validated")) {
2452          throw new FHIRException("Cannot call addChild on a singleton property TestScript.validated");
2453        }
2454        else if (name.equals("description")) {
2455          throw new FHIRException("Cannot call addChild on a singleton property TestScript.description");
2456        }
2457        else if (name.equals("origin")) {
2458          throw new FHIRException("Cannot call addChild on a singleton property TestScript.origin");
2459        }
2460        else if (name.equals("destination")) {
2461          throw new FHIRException("Cannot call addChild on a singleton property TestScript.destination");
2462        }
2463        else if (name.equals("link")) {
2464          throw new FHIRException("Cannot call addChild on a singleton property TestScript.link");
2465        }
2466        else if (name.equals("capabilities")) {
2467          this.capabilities = new Reference();
2468          return this.capabilities;
2469        }
2470        else
2471          return super.addChild(name);
2472      }
2473
2474      public TestScriptMetadataCapabilityComponent copy() {
2475        TestScriptMetadataCapabilityComponent dst = new TestScriptMetadataCapabilityComponent();
2476        copyValues(dst);
2477        dst.required = required == null ? null : required.copy();
2478        dst.validated = validated == null ? null : validated.copy();
2479        dst.description = description == null ? null : description.copy();
2480        if (origin != null) {
2481          dst.origin = new ArrayList<IntegerType>();
2482          for (IntegerType i : origin)
2483            dst.origin.add(i.copy());
2484        };
2485        dst.destination = destination == null ? null : destination.copy();
2486        if (link != null) {
2487          dst.link = new ArrayList<UriType>();
2488          for (UriType i : link)
2489            dst.link.add(i.copy());
2490        };
2491        dst.capabilities = capabilities == null ? null : capabilities.copy();
2492        return dst;
2493      }
2494
2495      @Override
2496      public boolean equalsDeep(Base other_) {
2497        if (!super.equalsDeep(other_))
2498          return false;
2499        if (!(other_ instanceof TestScriptMetadataCapabilityComponent))
2500          return false;
2501        TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other_;
2502        return compareDeep(required, o.required, true) && compareDeep(validated, o.validated, true) && compareDeep(description, o.description, true)
2503           && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) && compareDeep(link, o.link, true)
2504           && compareDeep(capabilities, o.capabilities, true);
2505      }
2506
2507      @Override
2508      public boolean equalsShallow(Base other_) {
2509        if (!super.equalsShallow(other_))
2510          return false;
2511        if (!(other_ instanceof TestScriptMetadataCapabilityComponent))
2512          return false;
2513        TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other_;
2514        return compareValues(required, o.required, true) && compareValues(validated, o.validated, true) && compareValues(description, o.description, true)
2515           && compareValues(origin, o.origin, true) && compareValues(destination, o.destination, true) && compareValues(link, o.link, true)
2516          ;
2517      }
2518
2519      public boolean isEmpty() {
2520        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(required, validated, description
2521          , origin, destination, link, capabilities);
2522      }
2523
2524  public String fhirType() {
2525    return "TestScript.metadata.capability";
2526
2527  }
2528
2529  }
2530
2531    @Block()
2532    public static class TestScriptFixtureComponent extends BackboneElement implements IBaseBackboneElement {
2533        /**
2534         * 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.
2535         */
2536        @Child(name = "autocreate", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false)
2537        @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." )
2538        protected BooleanType autocreate;
2539
2540        /**
2541         * 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.
2542         */
2543        @Child(name = "autodelete", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false)
2544        @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." )
2545        protected BooleanType autodelete;
2546
2547        /**
2548         * Reference to the resource (containing the contents of the resource needed for operations).
2549         */
2550        @Child(name = "resource", type = {Reference.class}, order=3, min=0, max=1, modifier=false, summary=false)
2551        @Description(shortDefinition="Reference of the resource", formalDefinition="Reference to the resource (containing the contents of the resource needed for operations)." )
2552        protected Reference resource;
2553
2554        /**
2555         * The actual object that is the target of the reference (Reference to the resource (containing the contents of the resource needed for operations).)
2556         */
2557        protected Resource resourceTarget;
2558
2559        private static final long serialVersionUID = 1110683307L;
2560
2561    /**
2562     * Constructor
2563     */
2564      public TestScriptFixtureComponent() {
2565        super();
2566      }
2567
2568        /**
2569         * @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
2570         */
2571        public BooleanType getAutocreateElement() { 
2572          if (this.autocreate == null)
2573            if (Configuration.errorOnAutoCreate())
2574              throw new Error("Attempt to auto-create TestScriptFixtureComponent.autocreate");
2575            else if (Configuration.doAutoCreate())
2576              this.autocreate = new BooleanType(); // bb
2577          return this.autocreate;
2578        }
2579
2580        public boolean hasAutocreateElement() { 
2581          return this.autocreate != null && !this.autocreate.isEmpty();
2582        }
2583
2584        public boolean hasAutocreate() { 
2585          return this.autocreate != null && !this.autocreate.isEmpty();
2586        }
2587
2588        /**
2589         * @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
2590         */
2591        public TestScriptFixtureComponent setAutocreateElement(BooleanType value) { 
2592          this.autocreate = value;
2593          return this;
2594        }
2595
2596        /**
2597         * @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.
2598         */
2599        public boolean getAutocreate() { 
2600          return this.autocreate == null || this.autocreate.isEmpty() ? false : this.autocreate.getValue();
2601        }
2602
2603        /**
2604         * @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.
2605         */
2606        public TestScriptFixtureComponent setAutocreate(boolean value) { 
2607            if (this.autocreate == null)
2608              this.autocreate = new BooleanType();
2609            this.autocreate.setValue(value);
2610          return this;
2611        }
2612
2613        /**
2614         * @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
2615         */
2616        public BooleanType getAutodeleteElement() { 
2617          if (this.autodelete == null)
2618            if (Configuration.errorOnAutoCreate())
2619              throw new Error("Attempt to auto-create TestScriptFixtureComponent.autodelete");
2620            else if (Configuration.doAutoCreate())
2621              this.autodelete = new BooleanType(); // bb
2622          return this.autodelete;
2623        }
2624
2625        public boolean hasAutodeleteElement() { 
2626          return this.autodelete != null && !this.autodelete.isEmpty();
2627        }
2628
2629        public boolean hasAutodelete() { 
2630          return this.autodelete != null && !this.autodelete.isEmpty();
2631        }
2632
2633        /**
2634         * @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
2635         */
2636        public TestScriptFixtureComponent setAutodeleteElement(BooleanType value) { 
2637          this.autodelete = value;
2638          return this;
2639        }
2640
2641        /**
2642         * @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.
2643         */
2644        public boolean getAutodelete() { 
2645          return this.autodelete == null || this.autodelete.isEmpty() ? false : this.autodelete.getValue();
2646        }
2647
2648        /**
2649         * @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.
2650         */
2651        public TestScriptFixtureComponent setAutodelete(boolean value) { 
2652            if (this.autodelete == null)
2653              this.autodelete = new BooleanType();
2654            this.autodelete.setValue(value);
2655          return this;
2656        }
2657
2658        /**
2659         * @return {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).)
2660         */
2661        public Reference getResource() { 
2662          if (this.resource == null)
2663            if (Configuration.errorOnAutoCreate())
2664              throw new Error("Attempt to auto-create TestScriptFixtureComponent.resource");
2665            else if (Configuration.doAutoCreate())
2666              this.resource = new Reference(); // cc
2667          return this.resource;
2668        }
2669
2670        public boolean hasResource() { 
2671          return this.resource != null && !this.resource.isEmpty();
2672        }
2673
2674        /**
2675         * @param value {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).)
2676         */
2677        public TestScriptFixtureComponent setResource(Reference value)  { 
2678          this.resource = value;
2679          return this;
2680        }
2681
2682        /**
2683         * @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).)
2684         */
2685        public Resource getResourceTarget() { 
2686          return this.resourceTarget;
2687        }
2688
2689        /**
2690         * @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).)
2691         */
2692        public TestScriptFixtureComponent setResourceTarget(Resource value) { 
2693          this.resourceTarget = value;
2694          return this;
2695        }
2696
2697        protected void listChildren(List<Property> children) {
2698          super.listChildren(children);
2699          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));
2700          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));
2701          children.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the resource needed for operations).", 0, 1, resource));
2702        }
2703
2704        @Override
2705        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2706          switch (_hash) {
2707          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);
2708          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);
2709          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);
2710          default: return super.getNamedProperty(_hash, _name, _checkValid);
2711          }
2712
2713        }
2714
2715      @Override
2716      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2717        switch (hash) {
2718        case 73154411: /*autocreate*/ return this.autocreate == null ? new Base[0] : new Base[] {this.autocreate}; // BooleanType
2719        case 89990170: /*autodelete*/ return this.autodelete == null ? new Base[0] : new Base[] {this.autodelete}; // BooleanType
2720        case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference
2721        default: return super.getProperty(hash, name, checkValid);
2722        }
2723
2724      }
2725
2726      @Override
2727      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2728        switch (hash) {
2729        case 73154411: // autocreate
2730          this.autocreate = castToBoolean(value); // BooleanType
2731          return value;
2732        case 89990170: // autodelete
2733          this.autodelete = castToBoolean(value); // BooleanType
2734          return value;
2735        case -341064690: // resource
2736          this.resource = castToReference(value); // Reference
2737          return value;
2738        default: return super.setProperty(hash, name, value);
2739        }
2740
2741      }
2742
2743      @Override
2744      public Base setProperty(String name, Base value) throws FHIRException {
2745        if (name.equals("autocreate")) {
2746          this.autocreate = castToBoolean(value); // BooleanType
2747        } else if (name.equals("autodelete")) {
2748          this.autodelete = castToBoolean(value); // BooleanType
2749        } else if (name.equals("resource")) {
2750          this.resource = castToReference(value); // Reference
2751        } else
2752          return super.setProperty(name, value);
2753        return value;
2754      }
2755
2756      @Override
2757      public Base makeProperty(int hash, String name) throws FHIRException {
2758        switch (hash) {
2759        case 73154411:  return getAutocreateElement();
2760        case 89990170:  return getAutodeleteElement();
2761        case -341064690:  return getResource(); 
2762        default: return super.makeProperty(hash, name);
2763        }
2764
2765      }
2766
2767      @Override
2768      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2769        switch (hash) {
2770        case 73154411: /*autocreate*/ return new String[] {"boolean"};
2771        case 89990170: /*autodelete*/ return new String[] {"boolean"};
2772        case -341064690: /*resource*/ return new String[] {"Reference"};
2773        default: return super.getTypesForProperty(hash, name);
2774        }
2775
2776      }
2777
2778      @Override
2779      public Base addChild(String name) throws FHIRException {
2780        if (name.equals("autocreate")) {
2781          throw new FHIRException("Cannot call addChild on a singleton property TestScript.autocreate");
2782        }
2783        else if (name.equals("autodelete")) {
2784          throw new FHIRException("Cannot call addChild on a singleton property TestScript.autodelete");
2785        }
2786        else if (name.equals("resource")) {
2787          this.resource = new Reference();
2788          return this.resource;
2789        }
2790        else
2791          return super.addChild(name);
2792      }
2793
2794      public TestScriptFixtureComponent copy() {
2795        TestScriptFixtureComponent dst = new TestScriptFixtureComponent();
2796        copyValues(dst);
2797        dst.autocreate = autocreate == null ? null : autocreate.copy();
2798        dst.autodelete = autodelete == null ? null : autodelete.copy();
2799        dst.resource = resource == null ? null : resource.copy();
2800        return dst;
2801      }
2802
2803      @Override
2804      public boolean equalsDeep(Base other_) {
2805        if (!super.equalsDeep(other_))
2806          return false;
2807        if (!(other_ instanceof TestScriptFixtureComponent))
2808          return false;
2809        TestScriptFixtureComponent o = (TestScriptFixtureComponent) other_;
2810        return compareDeep(autocreate, o.autocreate, true) && compareDeep(autodelete, o.autodelete, true)
2811           && compareDeep(resource, o.resource, true);
2812      }
2813
2814      @Override
2815      public boolean equalsShallow(Base other_) {
2816        if (!super.equalsShallow(other_))
2817          return false;
2818        if (!(other_ instanceof TestScriptFixtureComponent))
2819          return false;
2820        TestScriptFixtureComponent o = (TestScriptFixtureComponent) other_;
2821        return compareValues(autocreate, o.autocreate, true) && compareValues(autodelete, o.autodelete, true)
2822          ;
2823      }
2824
2825      public boolean isEmpty() {
2826        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(autocreate, autodelete, resource
2827          );
2828      }
2829
2830  public String fhirType() {
2831    return "TestScript.fixture";
2832
2833  }
2834
2835  }
2836
2837    @Block()
2838    public static class TestScriptVariableComponent extends BackboneElement implements IBaseBackboneElement {
2839        /**
2840         * Descriptive name for this variable.
2841         */
2842        @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
2843        @Description(shortDefinition="Descriptive name for this variable", formalDefinition="Descriptive name for this variable." )
2844        protected StringType name;
2845
2846        /**
2847         * A default, hard-coded, or user-defined value for this variable.
2848         */
2849        @Child(name = "defaultValue", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
2850        @Description(shortDefinition="Default, hard-coded, or user-defined value for this variable", formalDefinition="A default, hard-coded, or user-defined value for this variable." )
2851        protected StringType defaultValue;
2852
2853        /**
2854         * A free text natural language description of the variable and its purpose.
2855         */
2856        @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
2857        @Description(shortDefinition="Natural language description of the variable", formalDefinition="A free text natural language description of the variable and its purpose." )
2858        protected StringType description;
2859
2860        /**
2861         * The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.
2862         */
2863        @Child(name = "expression", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
2864        @Description(shortDefinition="The fluentpath expression against the fixture body", formalDefinition="The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified." )
2865        protected StringType expression;
2866
2867        /**
2868         * Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.
2869         */
2870        @Child(name = "headerField", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
2871        @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." )
2872        protected StringType headerField;
2873
2874        /**
2875         * Displayable text string with hint help information to the user when entering a default value.
2876         */
2877        @Child(name = "hint", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false)
2878        @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." )
2879        protected StringType hint;
2880
2881        /**
2882         * XPath or JSONPath to evaluate against the fixture body.  When variables are defined, only one of either expression, headerField or path must be specified.
2883         */
2884        @Child(name = "path", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false)
2885        @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." )
2886        protected StringType path;
2887
2888        /**
2889         * Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.
2890         */
2891        @Child(name = "sourceId", type = {IdType.class}, order=8, min=0, max=1, modifier=false, summary=false)
2892        @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." )
2893        protected IdType sourceId;
2894
2895        private static final long serialVersionUID = -1592325432L;
2896
2897    /**
2898     * Constructor
2899     */
2900      public TestScriptVariableComponent() {
2901        super();
2902      }
2903
2904    /**
2905     * Constructor
2906     */
2907      public TestScriptVariableComponent(StringType name) {
2908        super();
2909        this.name = name;
2910      }
2911
2912        /**
2913         * @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
2914         */
2915        public StringType getNameElement() { 
2916          if (this.name == null)
2917            if (Configuration.errorOnAutoCreate())
2918              throw new Error("Attempt to auto-create TestScriptVariableComponent.name");
2919            else if (Configuration.doAutoCreate())
2920              this.name = new StringType(); // bb
2921          return this.name;
2922        }
2923
2924        public boolean hasNameElement() { 
2925          return this.name != null && !this.name.isEmpty();
2926        }
2927
2928        public boolean hasName() { 
2929          return this.name != null && !this.name.isEmpty();
2930        }
2931
2932        /**
2933         * @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
2934         */
2935        public TestScriptVariableComponent setNameElement(StringType value) { 
2936          this.name = value;
2937          return this;
2938        }
2939
2940        /**
2941         * @return Descriptive name for this variable.
2942         */
2943        public String getName() { 
2944          return this.name == null ? null : this.name.getValue();
2945        }
2946
2947        /**
2948         * @param value Descriptive name for this variable.
2949         */
2950        public TestScriptVariableComponent setName(String value) { 
2951            if (this.name == null)
2952              this.name = new StringType();
2953            this.name.setValue(value);
2954          return this;
2955        }
2956
2957        /**
2958         * @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
2959         */
2960        public StringType getDefaultValueElement() { 
2961          if (this.defaultValue == null)
2962            if (Configuration.errorOnAutoCreate())
2963              throw new Error("Attempt to auto-create TestScriptVariableComponent.defaultValue");
2964            else if (Configuration.doAutoCreate())
2965              this.defaultValue = new StringType(); // bb
2966          return this.defaultValue;
2967        }
2968
2969        public boolean hasDefaultValueElement() { 
2970          return this.defaultValue != null && !this.defaultValue.isEmpty();
2971        }
2972
2973        public boolean hasDefaultValue() { 
2974          return this.defaultValue != null && !this.defaultValue.isEmpty();
2975        }
2976
2977        /**
2978         * @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
2979         */
2980        public TestScriptVariableComponent setDefaultValueElement(StringType value) { 
2981          this.defaultValue = value;
2982          return this;
2983        }
2984
2985        /**
2986         * @return A default, hard-coded, or user-defined value for this variable.
2987         */
2988        public String getDefaultValue() { 
2989          return this.defaultValue == null ? null : this.defaultValue.getValue();
2990        }
2991
2992        /**
2993         * @param value A default, hard-coded, or user-defined value for this variable.
2994         */
2995        public TestScriptVariableComponent setDefaultValue(String value) { 
2996          if (Utilities.noString(value))
2997            this.defaultValue = null;
2998          else {
2999            if (this.defaultValue == null)
3000              this.defaultValue = new StringType();
3001            this.defaultValue.setValue(value);
3002          }
3003          return this;
3004        }
3005
3006        /**
3007         * @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
3008         */
3009        public StringType getDescriptionElement() { 
3010          if (this.description == null)
3011            if (Configuration.errorOnAutoCreate())
3012              throw new Error("Attempt to auto-create TestScriptVariableComponent.description");
3013            else if (Configuration.doAutoCreate())
3014              this.description = new StringType(); // bb
3015          return this.description;
3016        }
3017
3018        public boolean hasDescriptionElement() { 
3019          return this.description != null && !this.description.isEmpty();
3020        }
3021
3022        public boolean hasDescription() { 
3023          return this.description != null && !this.description.isEmpty();
3024        }
3025
3026        /**
3027         * @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
3028         */
3029        public TestScriptVariableComponent setDescriptionElement(StringType value) { 
3030          this.description = value;
3031          return this;
3032        }
3033
3034        /**
3035         * @return A free text natural language description of the variable and its purpose.
3036         */
3037        public String getDescription() { 
3038          return this.description == null ? null : this.description.getValue();
3039        }
3040
3041        /**
3042         * @param value A free text natural language description of the variable and its purpose.
3043         */
3044        public TestScriptVariableComponent setDescription(String value) { 
3045          if (Utilities.noString(value))
3046            this.description = null;
3047          else {
3048            if (this.description == null)
3049              this.description = new StringType();
3050            this.description.setValue(value);
3051          }
3052          return this;
3053        }
3054
3055        /**
3056         * @return {@link #expression} (The fluentpath 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
3057         */
3058        public StringType getExpressionElement() { 
3059          if (this.expression == null)
3060            if (Configuration.errorOnAutoCreate())
3061              throw new Error("Attempt to auto-create TestScriptVariableComponent.expression");
3062            else if (Configuration.doAutoCreate())
3063              this.expression = new StringType(); // bb
3064          return this.expression;
3065        }
3066
3067        public boolean hasExpressionElement() { 
3068          return this.expression != null && !this.expression.isEmpty();
3069        }
3070
3071        public boolean hasExpression() { 
3072          return this.expression != null && !this.expression.isEmpty();
3073        }
3074
3075        /**
3076         * @param value {@link #expression} (The fluentpath 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
3077         */
3078        public TestScriptVariableComponent setExpressionElement(StringType value) { 
3079          this.expression = value;
3080          return this;
3081        }
3082
3083        /**
3084         * @return The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.
3085         */
3086        public String getExpression() { 
3087          return this.expression == null ? null : this.expression.getValue();
3088        }
3089
3090        /**
3091         * @param value The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.
3092         */
3093        public TestScriptVariableComponent setExpression(String value) { 
3094          if (Utilities.noString(value))
3095            this.expression = null;
3096          else {
3097            if (this.expression == null)
3098              this.expression = new StringType();
3099            this.expression.setValue(value);
3100          }
3101          return this;
3102        }
3103
3104        /**
3105         * @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
3106         */
3107        public StringType getHeaderFieldElement() { 
3108          if (this.headerField == null)
3109            if (Configuration.errorOnAutoCreate())
3110              throw new Error("Attempt to auto-create TestScriptVariableComponent.headerField");
3111            else if (Configuration.doAutoCreate())
3112              this.headerField = new StringType(); // bb
3113          return this.headerField;
3114        }
3115
3116        public boolean hasHeaderFieldElement() { 
3117          return this.headerField != null && !this.headerField.isEmpty();
3118        }
3119
3120        public boolean hasHeaderField() { 
3121          return this.headerField != null && !this.headerField.isEmpty();
3122        }
3123
3124        /**
3125         * @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
3126         */
3127        public TestScriptVariableComponent setHeaderFieldElement(StringType value) { 
3128          this.headerField = value;
3129          return this;
3130        }
3131
3132        /**
3133         * @return Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.
3134         */
3135        public String getHeaderField() { 
3136          return this.headerField == null ? null : this.headerField.getValue();
3137        }
3138
3139        /**
3140         * @param value Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.
3141         */
3142        public TestScriptVariableComponent setHeaderField(String value) { 
3143          if (Utilities.noString(value))
3144            this.headerField = null;
3145          else {
3146            if (this.headerField == null)
3147              this.headerField = new StringType();
3148            this.headerField.setValue(value);
3149          }
3150          return this;
3151        }
3152
3153        /**
3154         * @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
3155         */
3156        public StringType getHintElement() { 
3157          if (this.hint == null)
3158            if (Configuration.errorOnAutoCreate())
3159              throw new Error("Attempt to auto-create TestScriptVariableComponent.hint");
3160            else if (Configuration.doAutoCreate())
3161              this.hint = new StringType(); // bb
3162          return this.hint;
3163        }
3164
3165        public boolean hasHintElement() { 
3166          return this.hint != null && !this.hint.isEmpty();
3167        }
3168
3169        public boolean hasHint() { 
3170          return this.hint != null && !this.hint.isEmpty();
3171        }
3172
3173        /**
3174         * @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
3175         */
3176        public TestScriptVariableComponent setHintElement(StringType value) { 
3177          this.hint = value;
3178          return this;
3179        }
3180
3181        /**
3182         * @return Displayable text string with hint help information to the user when entering a default value.
3183         */
3184        public String getHint() { 
3185          return this.hint == null ? null : this.hint.getValue();
3186        }
3187
3188        /**
3189         * @param value Displayable text string with hint help information to the user when entering a default value.
3190         */
3191        public TestScriptVariableComponent setHint(String value) { 
3192          if (Utilities.noString(value))
3193            this.hint = null;
3194          else {
3195            if (this.hint == null)
3196              this.hint = new StringType();
3197            this.hint.setValue(value);
3198          }
3199          return this;
3200        }
3201
3202        /**
3203         * @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
3204         */
3205        public StringType getPathElement() { 
3206          if (this.path == null)
3207            if (Configuration.errorOnAutoCreate())
3208              throw new Error("Attempt to auto-create TestScriptVariableComponent.path");
3209            else if (Configuration.doAutoCreate())
3210              this.path = new StringType(); // bb
3211          return this.path;
3212        }
3213
3214        public boolean hasPathElement() { 
3215          return this.path != null && !this.path.isEmpty();
3216        }
3217
3218        public boolean hasPath() { 
3219          return this.path != null && !this.path.isEmpty();
3220        }
3221
3222        /**
3223         * @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
3224         */
3225        public TestScriptVariableComponent setPathElement(StringType value) { 
3226          this.path = value;
3227          return this;
3228        }
3229
3230        /**
3231         * @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.
3232         */
3233        public String getPath() { 
3234          return this.path == null ? null : this.path.getValue();
3235        }
3236
3237        /**
3238         * @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.
3239         */
3240        public TestScriptVariableComponent setPath(String value) { 
3241          if (Utilities.noString(value))
3242            this.path = null;
3243          else {
3244            if (this.path == null)
3245              this.path = new StringType();
3246            this.path.setValue(value);
3247          }
3248          return this;
3249        }
3250
3251        /**
3252         * @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
3253         */
3254        public IdType getSourceIdElement() { 
3255          if (this.sourceId == null)
3256            if (Configuration.errorOnAutoCreate())
3257              throw new Error("Attempt to auto-create TestScriptVariableComponent.sourceId");
3258            else if (Configuration.doAutoCreate())
3259              this.sourceId = new IdType(); // bb
3260          return this.sourceId;
3261        }
3262
3263        public boolean hasSourceIdElement() { 
3264          return this.sourceId != null && !this.sourceId.isEmpty();
3265        }
3266
3267        public boolean hasSourceId() { 
3268          return this.sourceId != null && !this.sourceId.isEmpty();
3269        }
3270
3271        /**
3272         * @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
3273         */
3274        public TestScriptVariableComponent setSourceIdElement(IdType value) { 
3275          this.sourceId = value;
3276          return this;
3277        }
3278
3279        /**
3280         * @return Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.
3281         */
3282        public String getSourceId() { 
3283          return this.sourceId == null ? null : this.sourceId.getValue();
3284        }
3285
3286        /**
3287         * @param value Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.
3288         */
3289        public TestScriptVariableComponent setSourceId(String value) { 
3290          if (Utilities.noString(value))
3291            this.sourceId = null;
3292          else {
3293            if (this.sourceId == null)
3294              this.sourceId = new IdType();
3295            this.sourceId.setValue(value);
3296          }
3297          return this;
3298        }
3299
3300        protected void listChildren(List<Property> children) {
3301          super.listChildren(children);
3302          children.add(new Property("name", "string", "Descriptive name for this variable.", 0, 1, name));
3303          children.add(new Property("defaultValue", "string", "A default, hard-coded, or user-defined value for this variable.", 0, 1, defaultValue));
3304          children.add(new Property("description", "string", "A free text natural language description of the variable and its purpose.", 0, 1, description));
3305          children.add(new Property("expression", "string", "The fluentpath 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));
3306          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));
3307          children.add(new Property("hint", "string", "Displayable text string with hint help information to the user when entering a default value.", 0, 1, hint));
3308          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));
3309          children.add(new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField  against within this variable.", 0, 1, sourceId));
3310        }
3311
3312        @Override
3313        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3314          switch (_hash) {
3315          case 3373707: /*name*/  return new Property("name", "string", "Descriptive name for this variable.", 0, 1, name);
3316          case -659125328: /*defaultValue*/  return new Property("defaultValue", "string", "A default, hard-coded, or user-defined value for this variable.", 0, 1, defaultValue);
3317          case -1724546052: /*description*/  return new Property("description", "string", "A free text natural language description of the variable and its purpose.", 0, 1, description);
3318          case -1795452264: /*expression*/  return new Property("expression", "string", "The fluentpath 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);
3319          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);
3320          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);
3321          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);
3322          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);
3323          default: return super.getNamedProperty(_hash, _name, _checkValid);
3324          }
3325
3326        }
3327
3328      @Override
3329      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3330        switch (hash) {
3331        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
3332        case -659125328: /*defaultValue*/ return this.defaultValue == null ? new Base[0] : new Base[] {this.defaultValue}; // StringType
3333        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
3334        case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType
3335        case 1160732269: /*headerField*/ return this.headerField == null ? new Base[0] : new Base[] {this.headerField}; // StringType
3336        case 3202695: /*hint*/ return this.hint == null ? new Base[0] : new Base[] {this.hint}; // StringType
3337        case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
3338        case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType
3339        default: return super.getProperty(hash, name, checkValid);
3340        }
3341
3342      }
3343
3344      @Override
3345      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3346        switch (hash) {
3347        case 3373707: // name
3348          this.name = castToString(value); // StringType
3349          return value;
3350        case -659125328: // defaultValue
3351          this.defaultValue = castToString(value); // StringType
3352          return value;
3353        case -1724546052: // description
3354          this.description = castToString(value); // StringType
3355          return value;
3356        case -1795452264: // expression
3357          this.expression = castToString(value); // StringType
3358          return value;
3359        case 1160732269: // headerField
3360          this.headerField = castToString(value); // StringType
3361          return value;
3362        case 3202695: // hint
3363          this.hint = castToString(value); // StringType
3364          return value;
3365        case 3433509: // path
3366          this.path = castToString(value); // StringType
3367          return value;
3368        case 1746327190: // sourceId
3369          this.sourceId = castToId(value); // IdType
3370          return value;
3371        default: return super.setProperty(hash, name, value);
3372        }
3373
3374      }
3375
3376      @Override
3377      public Base setProperty(String name, Base value) throws FHIRException {
3378        if (name.equals("name")) {
3379          this.name = castToString(value); // StringType
3380        } else if (name.equals("defaultValue")) {
3381          this.defaultValue = castToString(value); // StringType
3382        } else if (name.equals("description")) {
3383          this.description = castToString(value); // StringType
3384        } else if (name.equals("expression")) {
3385          this.expression = castToString(value); // StringType
3386        } else if (name.equals("headerField")) {
3387          this.headerField = castToString(value); // StringType
3388        } else if (name.equals("hint")) {
3389          this.hint = castToString(value); // StringType
3390        } else if (name.equals("path")) {
3391          this.path = castToString(value); // StringType
3392        } else if (name.equals("sourceId")) {
3393          this.sourceId = castToId(value); // IdType
3394        } else
3395          return super.setProperty(name, value);
3396        return value;
3397      }
3398
3399      @Override
3400      public Base makeProperty(int hash, String name) throws FHIRException {
3401        switch (hash) {
3402        case 3373707:  return getNameElement();
3403        case -659125328:  return getDefaultValueElement();
3404        case -1724546052:  return getDescriptionElement();
3405        case -1795452264:  return getExpressionElement();
3406        case 1160732269:  return getHeaderFieldElement();
3407        case 3202695:  return getHintElement();
3408        case 3433509:  return getPathElement();
3409        case 1746327190:  return getSourceIdElement();
3410        default: return super.makeProperty(hash, name);
3411        }
3412
3413      }
3414
3415      @Override
3416      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3417        switch (hash) {
3418        case 3373707: /*name*/ return new String[] {"string"};
3419        case -659125328: /*defaultValue*/ return new String[] {"string"};
3420        case -1724546052: /*description*/ return new String[] {"string"};
3421        case -1795452264: /*expression*/ return new String[] {"string"};
3422        case 1160732269: /*headerField*/ return new String[] {"string"};
3423        case 3202695: /*hint*/ return new String[] {"string"};
3424        case 3433509: /*path*/ return new String[] {"string"};
3425        case 1746327190: /*sourceId*/ return new String[] {"id"};
3426        default: return super.getTypesForProperty(hash, name);
3427        }
3428
3429      }
3430
3431      @Override
3432      public Base addChild(String name) throws FHIRException {
3433        if (name.equals("name")) {
3434          throw new FHIRException("Cannot call addChild on a singleton property TestScript.name");
3435        }
3436        else if (name.equals("defaultValue")) {
3437          throw new FHIRException("Cannot call addChild on a singleton property TestScript.defaultValue");
3438        }
3439        else if (name.equals("description")) {
3440          throw new FHIRException("Cannot call addChild on a singleton property TestScript.description");
3441        }
3442        else if (name.equals("expression")) {
3443          throw new FHIRException("Cannot call addChild on a singleton property TestScript.expression");
3444        }
3445        else if (name.equals("headerField")) {
3446          throw new FHIRException("Cannot call addChild on a singleton property TestScript.headerField");
3447        }
3448        else if (name.equals("hint")) {
3449          throw new FHIRException("Cannot call addChild on a singleton property TestScript.hint");
3450        }
3451        else if (name.equals("path")) {
3452          throw new FHIRException("Cannot call addChild on a singleton property TestScript.path");
3453        }
3454        else if (name.equals("sourceId")) {
3455          throw new FHIRException("Cannot call addChild on a singleton property TestScript.sourceId");
3456        }
3457        else
3458          return super.addChild(name);
3459      }
3460
3461      public TestScriptVariableComponent copy() {
3462        TestScriptVariableComponent dst = new TestScriptVariableComponent();
3463        copyValues(dst);
3464        dst.name = name == null ? null : name.copy();
3465        dst.defaultValue = defaultValue == null ? null : defaultValue.copy();
3466        dst.description = description == null ? null : description.copy();
3467        dst.expression = expression == null ? null : expression.copy();
3468        dst.headerField = headerField == null ? null : headerField.copy();
3469        dst.hint = hint == null ? null : hint.copy();
3470        dst.path = path == null ? null : path.copy();
3471        dst.sourceId = sourceId == null ? null : sourceId.copy();
3472        return dst;
3473      }
3474
3475      @Override
3476      public boolean equalsDeep(Base other_) {
3477        if (!super.equalsDeep(other_))
3478          return false;
3479        if (!(other_ instanceof TestScriptVariableComponent))
3480          return false;
3481        TestScriptVariableComponent o = (TestScriptVariableComponent) other_;
3482        return compareDeep(name, o.name, true) && compareDeep(defaultValue, o.defaultValue, true) && compareDeep(description, o.description, true)
3483           && compareDeep(expression, o.expression, true) && compareDeep(headerField, o.headerField, true)
3484           && compareDeep(hint, o.hint, true) && compareDeep(path, o.path, true) && compareDeep(sourceId, o.sourceId, true)
3485          ;
3486      }
3487
3488      @Override
3489      public boolean equalsShallow(Base other_) {
3490        if (!super.equalsShallow(other_))
3491          return false;
3492        if (!(other_ instanceof TestScriptVariableComponent))
3493          return false;
3494        TestScriptVariableComponent o = (TestScriptVariableComponent) other_;
3495        return compareValues(name, o.name, true) && compareValues(defaultValue, o.defaultValue, true) && compareValues(description, o.description, true)
3496           && compareValues(expression, o.expression, true) && compareValues(headerField, o.headerField, true)
3497           && compareValues(hint, o.hint, true) && compareValues(path, o.path, true) && compareValues(sourceId, o.sourceId, true)
3498          ;
3499      }
3500
3501      public boolean isEmpty() {
3502        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, defaultValue, description
3503          , expression, headerField, hint, path, sourceId);
3504      }
3505
3506  public String fhirType() {
3507    return "TestScript.variable";
3508
3509  }
3510
3511  }
3512
3513    @Block()
3514    public static class TestScriptRuleComponent extends BackboneElement implements IBaseBackboneElement {
3515        /**
3516         * Reference to the resource (containing the contents of the rule needed for assertions).
3517         */
3518        @Child(name = "resource", type = {Reference.class}, order=1, min=1, max=1, modifier=false, summary=false)
3519        @Description(shortDefinition="Assert rule resource reference", formalDefinition="Reference to the resource (containing the contents of the rule needed for assertions)." )
3520        protected Reference resource;
3521
3522        /**
3523         * The actual object that is the target of the reference (Reference to the resource (containing the contents of the rule needed for assertions).)
3524         */
3525        protected Resource resourceTarget;
3526
3527        /**
3528         * Each rule template can take one or more parameters for rule evaluation.
3529         */
3530        @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3531        @Description(shortDefinition="Rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." )
3532        protected List<RuleParamComponent> param;
3533
3534        private static final long serialVersionUID = -1869267735L;
3535
3536    /**
3537     * Constructor
3538     */
3539      public TestScriptRuleComponent() {
3540        super();
3541      }
3542
3543    /**
3544     * Constructor
3545     */
3546      public TestScriptRuleComponent(Reference resource) {
3547        super();
3548        this.resource = resource;
3549      }
3550
3551        /**
3552         * @return {@link #resource} (Reference to the resource (containing the contents of the rule needed for assertions).)
3553         */
3554        public Reference getResource() { 
3555          if (this.resource == null)
3556            if (Configuration.errorOnAutoCreate())
3557              throw new Error("Attempt to auto-create TestScriptRuleComponent.resource");
3558            else if (Configuration.doAutoCreate())
3559              this.resource = new Reference(); // cc
3560          return this.resource;
3561        }
3562
3563        public boolean hasResource() { 
3564          return this.resource != null && !this.resource.isEmpty();
3565        }
3566
3567        /**
3568         * @param value {@link #resource} (Reference to the resource (containing the contents of the rule needed for assertions).)
3569         */
3570        public TestScriptRuleComponent setResource(Reference value)  { 
3571          this.resource = value;
3572          return this;
3573        }
3574
3575        /**
3576         * @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).)
3577         */
3578        public Resource getResourceTarget() { 
3579          return this.resourceTarget;
3580        }
3581
3582        /**
3583         * @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).)
3584         */
3585        public TestScriptRuleComponent setResourceTarget(Resource value) { 
3586          this.resourceTarget = value;
3587          return this;
3588        }
3589
3590        /**
3591         * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.)
3592         */
3593        public List<RuleParamComponent> getParam() { 
3594          if (this.param == null)
3595            this.param = new ArrayList<RuleParamComponent>();
3596          return this.param;
3597        }
3598
3599        /**
3600         * @return Returns a reference to <code>this</code> for easy method chaining
3601         */
3602        public TestScriptRuleComponent setParam(List<RuleParamComponent> theParam) { 
3603          this.param = theParam;
3604          return this;
3605        }
3606
3607        public boolean hasParam() { 
3608          if (this.param == null)
3609            return false;
3610          for (RuleParamComponent item : this.param)
3611            if (!item.isEmpty())
3612              return true;
3613          return false;
3614        }
3615
3616        public RuleParamComponent addParam() { //3
3617          RuleParamComponent t = new RuleParamComponent();
3618          if (this.param == null)
3619            this.param = new ArrayList<RuleParamComponent>();
3620          this.param.add(t);
3621          return t;
3622        }
3623
3624        public TestScriptRuleComponent addParam(RuleParamComponent t) { //3
3625          if (t == null)
3626            return this;
3627          if (this.param == null)
3628            this.param = new ArrayList<RuleParamComponent>();
3629          this.param.add(t);
3630          return this;
3631        }
3632
3633        /**
3634         * @return The first repetition of repeating field {@link #param}, creating it if it does not already exist
3635         */
3636        public RuleParamComponent getParamFirstRep() { 
3637          if (getParam().isEmpty()) {
3638            addParam();
3639          }
3640          return getParam().get(0);
3641        }
3642
3643        protected void listChildren(List<Property> children) {
3644          super.listChildren(children);
3645          children.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the rule needed for assertions).", 0, 1, resource));
3646          children.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param));
3647        }
3648
3649        @Override
3650        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3651          switch (_hash) {
3652          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);
3653          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);
3654          default: return super.getNamedProperty(_hash, _name, _checkValid);
3655          }
3656
3657        }
3658
3659      @Override
3660      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3661        switch (hash) {
3662        case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference
3663        case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // RuleParamComponent
3664        default: return super.getProperty(hash, name, checkValid);
3665        }
3666
3667      }
3668
3669      @Override
3670      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3671        switch (hash) {
3672        case -341064690: // resource
3673          this.resource = castToReference(value); // Reference
3674          return value;
3675        case 106436749: // param
3676          this.getParam().add((RuleParamComponent) value); // RuleParamComponent
3677          return value;
3678        default: return super.setProperty(hash, name, value);
3679        }
3680
3681      }
3682
3683      @Override
3684      public Base setProperty(String name, Base value) throws FHIRException {
3685        if (name.equals("resource")) {
3686          this.resource = castToReference(value); // Reference
3687        } else if (name.equals("param")) {
3688          this.getParam().add((RuleParamComponent) value);
3689        } else
3690          return super.setProperty(name, value);
3691        return value;
3692      }
3693
3694      @Override
3695      public Base makeProperty(int hash, String name) throws FHIRException {
3696        switch (hash) {
3697        case -341064690:  return getResource(); 
3698        case 106436749:  return addParam(); 
3699        default: return super.makeProperty(hash, name);
3700        }
3701
3702      }
3703
3704      @Override
3705      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3706        switch (hash) {
3707        case -341064690: /*resource*/ return new String[] {"Reference"};
3708        case 106436749: /*param*/ return new String[] {};
3709        default: return super.getTypesForProperty(hash, name);
3710        }
3711
3712      }
3713
3714      @Override
3715      public Base addChild(String name) throws FHIRException {
3716        if (name.equals("resource")) {
3717          this.resource = new Reference();
3718          return this.resource;
3719        }
3720        else if (name.equals("param")) {
3721          return addParam();
3722        }
3723        else
3724          return super.addChild(name);
3725      }
3726
3727      public TestScriptRuleComponent copy() {
3728        TestScriptRuleComponent dst = new TestScriptRuleComponent();
3729        copyValues(dst);
3730        dst.resource = resource == null ? null : resource.copy();
3731        if (param != null) {
3732          dst.param = new ArrayList<RuleParamComponent>();
3733          for (RuleParamComponent i : param)
3734            dst.param.add(i.copy());
3735        };
3736        return dst;
3737      }
3738
3739      @Override
3740      public boolean equalsDeep(Base other_) {
3741        if (!super.equalsDeep(other_))
3742          return false;
3743        if (!(other_ instanceof TestScriptRuleComponent))
3744          return false;
3745        TestScriptRuleComponent o = (TestScriptRuleComponent) other_;
3746        return compareDeep(resource, o.resource, true) && compareDeep(param, o.param, true);
3747      }
3748
3749      @Override
3750      public boolean equalsShallow(Base other_) {
3751        if (!super.equalsShallow(other_))
3752          return false;
3753        if (!(other_ instanceof TestScriptRuleComponent))
3754          return false;
3755        TestScriptRuleComponent o = (TestScriptRuleComponent) other_;
3756        return true;
3757      }
3758
3759      public boolean isEmpty() {
3760        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(resource, param);
3761      }
3762
3763  public String fhirType() {
3764    return "TestScript.rule";
3765
3766  }
3767
3768  }
3769
3770    @Block()
3771    public static class RuleParamComponent extends BackboneElement implements IBaseBackboneElement {
3772        /**
3773         * Descriptive name for this parameter that matches the external assert rule parameter name.
3774         */
3775        @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
3776        @Description(shortDefinition="Parameter name matching external assert rule parameter", formalDefinition="Descriptive name for this parameter that matches the external assert rule parameter name." )
3777        protected StringType name;
3778
3779        /**
3780         * The explicit or dynamic value for the parameter that will be passed on to the external rule template.
3781         */
3782        @Child(name = "value", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
3783        @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." )
3784        protected StringType value;
3785
3786        private static final long serialVersionUID = 395259392L;
3787
3788    /**
3789     * Constructor
3790     */
3791      public RuleParamComponent() {
3792        super();
3793      }
3794
3795    /**
3796     * Constructor
3797     */
3798      public RuleParamComponent(StringType name) {
3799        super();
3800        this.name = name;
3801      }
3802
3803        /**
3804         * @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
3805         */
3806        public StringType getNameElement() { 
3807          if (this.name == null)
3808            if (Configuration.errorOnAutoCreate())
3809              throw new Error("Attempt to auto-create RuleParamComponent.name");
3810            else if (Configuration.doAutoCreate())
3811              this.name = new StringType(); // bb
3812          return this.name;
3813        }
3814
3815        public boolean hasNameElement() { 
3816          return this.name != null && !this.name.isEmpty();
3817        }
3818
3819        public boolean hasName() { 
3820          return this.name != null && !this.name.isEmpty();
3821        }
3822
3823        /**
3824         * @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
3825         */
3826        public RuleParamComponent setNameElement(StringType value) { 
3827          this.name = value;
3828          return this;
3829        }
3830
3831        /**
3832         * @return Descriptive name for this parameter that matches the external assert rule parameter name.
3833         */
3834        public String getName() { 
3835          return this.name == null ? null : this.name.getValue();
3836        }
3837
3838        /**
3839         * @param value Descriptive name for this parameter that matches the external assert rule parameter name.
3840         */
3841        public RuleParamComponent setName(String value) { 
3842            if (this.name == null)
3843              this.name = new StringType();
3844            this.name.setValue(value);
3845          return this;
3846        }
3847
3848        /**
3849         * @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
3850         */
3851        public StringType getValueElement() { 
3852          if (this.value == null)
3853            if (Configuration.errorOnAutoCreate())
3854              throw new Error("Attempt to auto-create RuleParamComponent.value");
3855            else if (Configuration.doAutoCreate())
3856              this.value = new StringType(); // bb
3857          return this.value;
3858        }
3859
3860        public boolean hasValueElement() { 
3861          return this.value != null && !this.value.isEmpty();
3862        }
3863
3864        public boolean hasValue() { 
3865          return this.value != null && !this.value.isEmpty();
3866        }
3867
3868        /**
3869         * @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
3870         */
3871        public RuleParamComponent setValueElement(StringType value) { 
3872          this.value = value;
3873          return this;
3874        }
3875
3876        /**
3877         * @return The explicit or dynamic value for the parameter that will be passed on to the external rule template.
3878         */
3879        public String getValue() { 
3880          return this.value == null ? null : this.value.getValue();
3881        }
3882
3883        /**
3884         * @param value The explicit or dynamic value for the parameter that will be passed on to the external rule template.
3885         */
3886        public RuleParamComponent setValue(String value) { 
3887          if (Utilities.noString(value))
3888            this.value = null;
3889          else {
3890            if (this.value == null)
3891              this.value = new StringType();
3892            this.value.setValue(value);
3893          }
3894          return this;
3895        }
3896
3897        protected void listChildren(List<Property> children) {
3898          super.listChildren(children);
3899          children.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert rule parameter name.", 0, 1, name));
3900          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));
3901        }
3902
3903        @Override
3904        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3905          switch (_hash) {
3906          case 3373707: /*name*/  return new Property("name", "string", "Descriptive name for this parameter that matches the external assert rule parameter name.", 0, 1, name);
3907          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);
3908          default: return super.getNamedProperty(_hash, _name, _checkValid);
3909          }
3910
3911        }
3912
3913      @Override
3914      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3915        switch (hash) {
3916        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
3917        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType
3918        default: return super.getProperty(hash, name, checkValid);
3919        }
3920
3921      }
3922
3923      @Override
3924      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3925        switch (hash) {
3926        case 3373707: // name
3927          this.name = castToString(value); // StringType
3928          return value;
3929        case 111972721: // value
3930          this.value = castToString(value); // StringType
3931          return value;
3932        default: return super.setProperty(hash, name, value);
3933        }
3934
3935      }
3936
3937      @Override
3938      public Base setProperty(String name, Base value) throws FHIRException {
3939        if (name.equals("name")) {
3940          this.name = castToString(value); // StringType
3941        } else if (name.equals("value")) {
3942          this.value = castToString(value); // StringType
3943        } else
3944          return super.setProperty(name, value);
3945        return value;
3946      }
3947
3948      @Override
3949      public Base makeProperty(int hash, String name) throws FHIRException {
3950        switch (hash) {
3951        case 3373707:  return getNameElement();
3952        case 111972721:  return getValueElement();
3953        default: return super.makeProperty(hash, name);
3954        }
3955
3956      }
3957
3958      @Override
3959      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3960        switch (hash) {
3961        case 3373707: /*name*/ return new String[] {"string"};
3962        case 111972721: /*value*/ return new String[] {"string"};
3963        default: return super.getTypesForProperty(hash, name);
3964        }
3965
3966      }
3967
3968      @Override
3969      public Base addChild(String name) throws FHIRException {
3970        if (name.equals("name")) {
3971          throw new FHIRException("Cannot call addChild on a singleton property TestScript.name");
3972        }
3973        else if (name.equals("value")) {
3974          throw new FHIRException("Cannot call addChild on a singleton property TestScript.value");
3975        }
3976        else
3977          return super.addChild(name);
3978      }
3979
3980      public RuleParamComponent copy() {
3981        RuleParamComponent dst = new RuleParamComponent();
3982        copyValues(dst);
3983        dst.name = name == null ? null : name.copy();
3984        dst.value = value == null ? null : value.copy();
3985        return dst;
3986      }
3987
3988      @Override
3989      public boolean equalsDeep(Base other_) {
3990        if (!super.equalsDeep(other_))
3991          return false;
3992        if (!(other_ instanceof RuleParamComponent))
3993          return false;
3994        RuleParamComponent o = (RuleParamComponent) other_;
3995        return compareDeep(name, o.name, true) && compareDeep(value, o.value, true);
3996      }
3997
3998      @Override
3999      public boolean equalsShallow(Base other_) {
4000        if (!super.equalsShallow(other_))
4001          return false;
4002        if (!(other_ instanceof RuleParamComponent))
4003          return false;
4004        RuleParamComponent o = (RuleParamComponent) other_;
4005        return compareValues(name, o.name, true) && compareValues(value, o.value, true);
4006      }
4007
4008      public boolean isEmpty() {
4009        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value);
4010      }
4011
4012  public String fhirType() {
4013    return "TestScript.rule.param";
4014
4015  }
4016
4017  }
4018
4019    @Block()
4020    public static class TestScriptRulesetComponent extends BackboneElement implements IBaseBackboneElement {
4021        /**
4022         * Reference to the resource (containing the contents of the ruleset needed for assertions).
4023         */
4024        @Child(name = "resource", type = {Reference.class}, order=1, min=1, max=1, modifier=false, summary=false)
4025        @Description(shortDefinition="Assert ruleset resource reference", formalDefinition="Reference to the resource (containing the contents of the ruleset needed for assertions)." )
4026        protected Reference resource;
4027
4028        /**
4029         * The actual object that is the target of the reference (Reference to the resource (containing the contents of the ruleset needed for assertions).)
4030         */
4031        protected Resource resourceTarget;
4032
4033        /**
4034         * The referenced rule within the external ruleset template.
4035         */
4036        @Child(name = "rule", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
4037        @Description(shortDefinition="The referenced rule within the ruleset", formalDefinition="The referenced rule within the external ruleset template." )
4038        protected List<RulesetRuleComponent> rule;
4039
4040        private static final long serialVersionUID = 1260261423L;
4041
4042    /**
4043     * Constructor
4044     */
4045      public TestScriptRulesetComponent() {
4046        super();
4047      }
4048
4049    /**
4050     * Constructor
4051     */
4052      public TestScriptRulesetComponent(Reference resource) {
4053        super();
4054        this.resource = resource;
4055      }
4056
4057        /**
4058         * @return {@link #resource} (Reference to the resource (containing the contents of the ruleset needed for assertions).)
4059         */
4060        public Reference getResource() { 
4061          if (this.resource == null)
4062            if (Configuration.errorOnAutoCreate())
4063              throw new Error("Attempt to auto-create TestScriptRulesetComponent.resource");
4064            else if (Configuration.doAutoCreate())
4065              this.resource = new Reference(); // cc
4066          return this.resource;
4067        }
4068
4069        public boolean hasResource() { 
4070          return this.resource != null && !this.resource.isEmpty();
4071        }
4072
4073        /**
4074         * @param value {@link #resource} (Reference to the resource (containing the contents of the ruleset needed for assertions).)
4075         */
4076        public TestScriptRulesetComponent setResource(Reference value)  { 
4077          this.resource = value;
4078          return this;
4079        }
4080
4081        /**
4082         * @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).)
4083         */
4084        public Resource getResourceTarget() { 
4085          return this.resourceTarget;
4086        }
4087
4088        /**
4089         * @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).)
4090         */
4091        public TestScriptRulesetComponent setResourceTarget(Resource value) { 
4092          this.resourceTarget = value;
4093          return this;
4094        }
4095
4096        /**
4097         * @return {@link #rule} (The referenced rule within the external ruleset template.)
4098         */
4099        public List<RulesetRuleComponent> getRule() { 
4100          if (this.rule == null)
4101            this.rule = new ArrayList<RulesetRuleComponent>();
4102          return this.rule;
4103        }
4104
4105        /**
4106         * @return Returns a reference to <code>this</code> for easy method chaining
4107         */
4108        public TestScriptRulesetComponent setRule(List<RulesetRuleComponent> theRule) { 
4109          this.rule = theRule;
4110          return this;
4111        }
4112
4113        public boolean hasRule() { 
4114          if (this.rule == null)
4115            return false;
4116          for (RulesetRuleComponent item : this.rule)
4117            if (!item.isEmpty())
4118              return true;
4119          return false;
4120        }
4121
4122        public RulesetRuleComponent addRule() { //3
4123          RulesetRuleComponent t = new RulesetRuleComponent();
4124          if (this.rule == null)
4125            this.rule = new ArrayList<RulesetRuleComponent>();
4126          this.rule.add(t);
4127          return t;
4128        }
4129
4130        public TestScriptRulesetComponent addRule(RulesetRuleComponent t) { //3
4131          if (t == null)
4132            return this;
4133          if (this.rule == null)
4134            this.rule = new ArrayList<RulesetRuleComponent>();
4135          this.rule.add(t);
4136          return this;
4137        }
4138
4139        /**
4140         * @return The first repetition of repeating field {@link #rule}, creating it if it does not already exist
4141         */
4142        public RulesetRuleComponent getRuleFirstRep() { 
4143          if (getRule().isEmpty()) {
4144            addRule();
4145          }
4146          return getRule().get(0);
4147        }
4148
4149        protected void listChildren(List<Property> children) {
4150          super.listChildren(children);
4151          children.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the ruleset needed for assertions).", 0, 1, resource));
4152          children.add(new Property("rule", "", "The referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, rule));
4153        }
4154
4155        @Override
4156        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4157          switch (_hash) {
4158          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);
4159          case 3512060: /*rule*/  return new Property("rule", "", "The referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, rule);
4160          default: return super.getNamedProperty(_hash, _name, _checkValid);
4161          }
4162
4163        }
4164
4165      @Override
4166      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4167        switch (hash) {
4168        case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference
4169        case 3512060: /*rule*/ return this.rule == null ? new Base[0] : this.rule.toArray(new Base[this.rule.size()]); // RulesetRuleComponent
4170        default: return super.getProperty(hash, name, checkValid);
4171        }
4172
4173      }
4174
4175      @Override
4176      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4177        switch (hash) {
4178        case -341064690: // resource
4179          this.resource = castToReference(value); // Reference
4180          return value;
4181        case 3512060: // rule
4182          this.getRule().add((RulesetRuleComponent) value); // RulesetRuleComponent
4183          return value;
4184        default: return super.setProperty(hash, name, value);
4185        }
4186
4187      }
4188
4189      @Override
4190      public Base setProperty(String name, Base value) throws FHIRException {
4191        if (name.equals("resource")) {
4192          this.resource = castToReference(value); // Reference
4193        } else if (name.equals("rule")) {
4194          this.getRule().add((RulesetRuleComponent) value);
4195        } else
4196          return super.setProperty(name, value);
4197        return value;
4198      }
4199
4200      @Override
4201      public Base makeProperty(int hash, String name) throws FHIRException {
4202        switch (hash) {
4203        case -341064690:  return getResource(); 
4204        case 3512060:  return addRule(); 
4205        default: return super.makeProperty(hash, name);
4206        }
4207
4208      }
4209
4210      @Override
4211      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4212        switch (hash) {
4213        case -341064690: /*resource*/ return new String[] {"Reference"};
4214        case 3512060: /*rule*/ return new String[] {};
4215        default: return super.getTypesForProperty(hash, name);
4216        }
4217
4218      }
4219
4220      @Override
4221      public Base addChild(String name) throws FHIRException {
4222        if (name.equals("resource")) {
4223          this.resource = new Reference();
4224          return this.resource;
4225        }
4226        else if (name.equals("rule")) {
4227          return addRule();
4228        }
4229        else
4230          return super.addChild(name);
4231      }
4232
4233      public TestScriptRulesetComponent copy() {
4234        TestScriptRulesetComponent dst = new TestScriptRulesetComponent();
4235        copyValues(dst);
4236        dst.resource = resource == null ? null : resource.copy();
4237        if (rule != null) {
4238          dst.rule = new ArrayList<RulesetRuleComponent>();
4239          for (RulesetRuleComponent i : rule)
4240            dst.rule.add(i.copy());
4241        };
4242        return dst;
4243      }
4244
4245      @Override
4246      public boolean equalsDeep(Base other_) {
4247        if (!super.equalsDeep(other_))
4248          return false;
4249        if (!(other_ instanceof TestScriptRulesetComponent))
4250          return false;
4251        TestScriptRulesetComponent o = (TestScriptRulesetComponent) other_;
4252        return compareDeep(resource, o.resource, true) && compareDeep(rule, o.rule, true);
4253      }
4254
4255      @Override
4256      public boolean equalsShallow(Base other_) {
4257        if (!super.equalsShallow(other_))
4258          return false;
4259        if (!(other_ instanceof TestScriptRulesetComponent))
4260          return false;
4261        TestScriptRulesetComponent o = (TestScriptRulesetComponent) other_;
4262        return true;
4263      }
4264
4265      public boolean isEmpty() {
4266        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(resource, rule);
4267      }
4268
4269  public String fhirType() {
4270    return "TestScript.ruleset";
4271
4272  }
4273
4274  }
4275
4276    @Block()
4277    public static class RulesetRuleComponent extends BackboneElement implements IBaseBackboneElement {
4278        /**
4279         * Id of the referenced rule within the external ruleset template.
4280         */
4281        @Child(name = "ruleId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false)
4282        @Description(shortDefinition="Id of referenced rule within the ruleset", formalDefinition="Id of the referenced rule within the external ruleset template." )
4283        protected IdType ruleId;
4284
4285        /**
4286         * Each rule template can take one or more parameters for rule evaluation.
4287         */
4288        @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
4289        @Description(shortDefinition="Ruleset rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." )
4290        protected List<RulesetRuleParamComponent> param;
4291
4292        private static final long serialVersionUID = -1399866981L;
4293
4294    /**
4295     * Constructor
4296     */
4297      public RulesetRuleComponent() {
4298        super();
4299      }
4300
4301    /**
4302     * Constructor
4303     */
4304      public RulesetRuleComponent(IdType ruleId) {
4305        super();
4306        this.ruleId = ruleId;
4307      }
4308
4309        /**
4310         * @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
4311         */
4312        public IdType getRuleIdElement() { 
4313          if (this.ruleId == null)
4314            if (Configuration.errorOnAutoCreate())
4315              throw new Error("Attempt to auto-create RulesetRuleComponent.ruleId");
4316            else if (Configuration.doAutoCreate())
4317              this.ruleId = new IdType(); // bb
4318          return this.ruleId;
4319        }
4320
4321        public boolean hasRuleIdElement() { 
4322          return this.ruleId != null && !this.ruleId.isEmpty();
4323        }
4324
4325        public boolean hasRuleId() { 
4326          return this.ruleId != null && !this.ruleId.isEmpty();
4327        }
4328
4329        /**
4330         * @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
4331         */
4332        public RulesetRuleComponent setRuleIdElement(IdType value) { 
4333          this.ruleId = value;
4334          return this;
4335        }
4336
4337        /**
4338         * @return Id of the referenced rule within the external ruleset template.
4339         */
4340        public String getRuleId() { 
4341          return this.ruleId == null ? null : this.ruleId.getValue();
4342        }
4343
4344        /**
4345         * @param value Id of the referenced rule within the external ruleset template.
4346         */
4347        public RulesetRuleComponent setRuleId(String value) { 
4348            if (this.ruleId == null)
4349              this.ruleId = new IdType();
4350            this.ruleId.setValue(value);
4351          return this;
4352        }
4353
4354        /**
4355         * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.)
4356         */
4357        public List<RulesetRuleParamComponent> getParam() { 
4358          if (this.param == null)
4359            this.param = new ArrayList<RulesetRuleParamComponent>();
4360          return this.param;
4361        }
4362
4363        /**
4364         * @return Returns a reference to <code>this</code> for easy method chaining
4365         */
4366        public RulesetRuleComponent setParam(List<RulesetRuleParamComponent> theParam) { 
4367          this.param = theParam;
4368          return this;
4369        }
4370
4371        public boolean hasParam() { 
4372          if (this.param == null)
4373            return false;
4374          for (RulesetRuleParamComponent item : this.param)
4375            if (!item.isEmpty())
4376              return true;
4377          return false;
4378        }
4379
4380        public RulesetRuleParamComponent addParam() { //3
4381          RulesetRuleParamComponent t = new RulesetRuleParamComponent();
4382          if (this.param == null)
4383            this.param = new ArrayList<RulesetRuleParamComponent>();
4384          this.param.add(t);
4385          return t;
4386        }
4387
4388        public RulesetRuleComponent addParam(RulesetRuleParamComponent t) { //3
4389          if (t == null)
4390            return this;
4391          if (this.param == null)
4392            this.param = new ArrayList<RulesetRuleParamComponent>();
4393          this.param.add(t);
4394          return this;
4395        }
4396
4397        /**
4398         * @return The first repetition of repeating field {@link #param}, creating it if it does not already exist
4399         */
4400        public RulesetRuleParamComponent getParamFirstRep() { 
4401          if (getParam().isEmpty()) {
4402            addParam();
4403          }
4404          return getParam().get(0);
4405        }
4406
4407        protected void listChildren(List<Property> children) {
4408          super.listChildren(children);
4409          children.add(new Property("ruleId", "id", "Id of the referenced rule within the external ruleset template.", 0, 1, ruleId));
4410          children.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param));
4411        }
4412
4413        @Override
4414        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4415          switch (_hash) {
4416          case -919875273: /*ruleId*/  return new Property("ruleId", "id", "Id of the referenced rule within the external ruleset template.", 0, 1, ruleId);
4417          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);
4418          default: return super.getNamedProperty(_hash, _name, _checkValid);
4419          }
4420
4421        }
4422
4423      @Override
4424      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4425        switch (hash) {
4426        case -919875273: /*ruleId*/ return this.ruleId == null ? new Base[0] : new Base[] {this.ruleId}; // IdType
4427        case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // RulesetRuleParamComponent
4428        default: return super.getProperty(hash, name, checkValid);
4429        }
4430
4431      }
4432
4433      @Override
4434      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4435        switch (hash) {
4436        case -919875273: // ruleId
4437          this.ruleId = castToId(value); // IdType
4438          return value;
4439        case 106436749: // param
4440          this.getParam().add((RulesetRuleParamComponent) value); // RulesetRuleParamComponent
4441          return value;
4442        default: return super.setProperty(hash, name, value);
4443        }
4444
4445      }
4446
4447      @Override
4448      public Base setProperty(String name, Base value) throws FHIRException {
4449        if (name.equals("ruleId")) {
4450          this.ruleId = castToId(value); // IdType
4451        } else if (name.equals("param")) {
4452          this.getParam().add((RulesetRuleParamComponent) value);
4453        } else
4454          return super.setProperty(name, value);
4455        return value;
4456      }
4457
4458      @Override
4459      public Base makeProperty(int hash, String name) throws FHIRException {
4460        switch (hash) {
4461        case -919875273:  return getRuleIdElement();
4462        case 106436749:  return addParam(); 
4463        default: return super.makeProperty(hash, name);
4464        }
4465
4466      }
4467
4468      @Override
4469      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4470        switch (hash) {
4471        case -919875273: /*ruleId*/ return new String[] {"id"};
4472        case 106436749: /*param*/ return new String[] {};
4473        default: return super.getTypesForProperty(hash, name);
4474        }
4475
4476      }
4477
4478      @Override
4479      public Base addChild(String name) throws FHIRException {
4480        if (name.equals("ruleId")) {
4481          throw new FHIRException("Cannot call addChild on a singleton property TestScript.ruleId");
4482        }
4483        else if (name.equals("param")) {
4484          return addParam();
4485        }
4486        else
4487          return super.addChild(name);
4488      }
4489
4490      public RulesetRuleComponent copy() {
4491        RulesetRuleComponent dst = new RulesetRuleComponent();
4492        copyValues(dst);
4493        dst.ruleId = ruleId == null ? null : ruleId.copy();
4494        if (param != null) {
4495          dst.param = new ArrayList<RulesetRuleParamComponent>();
4496          for (RulesetRuleParamComponent i : param)
4497            dst.param.add(i.copy());
4498        };
4499        return dst;
4500      }
4501
4502      @Override
4503      public boolean equalsDeep(Base other_) {
4504        if (!super.equalsDeep(other_))
4505          return false;
4506        if (!(other_ instanceof RulesetRuleComponent))
4507          return false;
4508        RulesetRuleComponent o = (RulesetRuleComponent) other_;
4509        return compareDeep(ruleId, o.ruleId, true) && compareDeep(param, o.param, true);
4510      }
4511
4512      @Override
4513      public boolean equalsShallow(Base other_) {
4514        if (!super.equalsShallow(other_))
4515          return false;
4516        if (!(other_ instanceof RulesetRuleComponent))
4517          return false;
4518        RulesetRuleComponent o = (RulesetRuleComponent) other_;
4519        return compareValues(ruleId, o.ruleId, true);
4520      }
4521
4522      public boolean isEmpty() {
4523        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(ruleId, param);
4524      }
4525
4526  public String fhirType() {
4527    return "TestScript.ruleset.rule";
4528
4529  }
4530
4531  }
4532
4533    @Block()
4534    public static class RulesetRuleParamComponent extends BackboneElement implements IBaseBackboneElement {
4535        /**
4536         * Descriptive name for this parameter that matches the external assert ruleset rule parameter name.
4537         */
4538        @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
4539        @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." )
4540        protected StringType name;
4541
4542        /**
4543         * The value for the parameter that will be passed on to the external ruleset rule template.
4544         */
4545        @Child(name = "value", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
4546        @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." )
4547        protected StringType value;
4548
4549        private static final long serialVersionUID = 395259392L;
4550
4551    /**
4552     * Constructor
4553     */
4554      public RulesetRuleParamComponent() {
4555        super();
4556      }
4557
4558    /**
4559     * Constructor
4560     */
4561      public RulesetRuleParamComponent(StringType name) {
4562        super();
4563        this.name = name;
4564      }
4565
4566        /**
4567         * @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
4568         */
4569        public StringType getNameElement() { 
4570          if (this.name == null)
4571            if (Configuration.errorOnAutoCreate())
4572              throw new Error("Attempt to auto-create RulesetRuleParamComponent.name");
4573            else if (Configuration.doAutoCreate())
4574              this.name = new StringType(); // bb
4575          return this.name;
4576        }
4577
4578        public boolean hasNameElement() { 
4579          return this.name != null && !this.name.isEmpty();
4580        }
4581
4582        public boolean hasName() { 
4583          return this.name != null && !this.name.isEmpty();
4584        }
4585
4586        /**
4587         * @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
4588         */
4589        public RulesetRuleParamComponent setNameElement(StringType value) { 
4590          this.name = value;
4591          return this;
4592        }
4593
4594        /**
4595         * @return Descriptive name for this parameter that matches the external assert ruleset rule parameter name.
4596         */
4597        public String getName() { 
4598          return this.name == null ? null : this.name.getValue();
4599        }
4600
4601        /**
4602         * @param value Descriptive name for this parameter that matches the external assert ruleset rule parameter name.
4603         */
4604        public RulesetRuleParamComponent setName(String value) { 
4605            if (this.name == null)
4606              this.name = new StringType();
4607            this.name.setValue(value);
4608          return this;
4609        }
4610
4611        /**
4612         * @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
4613         */
4614        public StringType getValueElement() { 
4615          if (this.value == null)
4616            if (Configuration.errorOnAutoCreate())
4617              throw new Error("Attempt to auto-create RulesetRuleParamComponent.value");
4618            else if (Configuration.doAutoCreate())
4619              this.value = new StringType(); // bb
4620          return this.value;
4621        }
4622
4623        public boolean hasValueElement() { 
4624          return this.value != null && !this.value.isEmpty();
4625        }
4626
4627        public boolean hasValue() { 
4628          return this.value != null && !this.value.isEmpty();
4629        }
4630
4631        /**
4632         * @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
4633         */
4634        public RulesetRuleParamComponent setValueElement(StringType value) { 
4635          this.value = value;
4636          return this;
4637        }
4638
4639        /**
4640         * @return The value for the parameter that will be passed on to the external ruleset rule template.
4641         */
4642        public String getValue() { 
4643          return this.value == null ? null : this.value.getValue();
4644        }
4645
4646        /**
4647         * @param value The value for the parameter that will be passed on to the external ruleset rule template.
4648         */
4649        public RulesetRuleParamComponent setValue(String value) { 
4650          if (Utilities.noString(value))
4651            this.value = null;
4652          else {
4653            if (this.value == null)
4654              this.value = new StringType();
4655            this.value.setValue(value);
4656          }
4657          return this;
4658        }
4659
4660        protected void listChildren(List<Property> children) {
4661          super.listChildren(children);
4662          children.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", 0, 1, name));
4663          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));
4664        }
4665
4666        @Override
4667        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4668          switch (_hash) {
4669          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);
4670          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);
4671          default: return super.getNamedProperty(_hash, _name, _checkValid);
4672          }
4673
4674        }
4675
4676      @Override
4677      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4678        switch (hash) {
4679        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
4680        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType
4681        default: return super.getProperty(hash, name, checkValid);
4682        }
4683
4684      }
4685
4686      @Override
4687      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4688        switch (hash) {
4689        case 3373707: // name
4690          this.name = castToString(value); // StringType
4691          return value;
4692        case 111972721: // value
4693          this.value = castToString(value); // StringType
4694          return value;
4695        default: return super.setProperty(hash, name, value);
4696        }
4697
4698      }
4699
4700      @Override
4701      public Base setProperty(String name, Base value) throws FHIRException {
4702        if (name.equals("name")) {
4703          this.name = castToString(value); // StringType
4704        } else if (name.equals("value")) {
4705          this.value = castToString(value); // StringType
4706        } else
4707          return super.setProperty(name, value);
4708        return value;
4709      }
4710
4711      @Override
4712      public Base makeProperty(int hash, String name) throws FHIRException {
4713        switch (hash) {
4714        case 3373707:  return getNameElement();
4715        case 111972721:  return getValueElement();
4716        default: return super.makeProperty(hash, name);
4717        }
4718
4719      }
4720
4721      @Override
4722      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4723        switch (hash) {
4724        case 3373707: /*name*/ return new String[] {"string"};
4725        case 111972721: /*value*/ return new String[] {"string"};
4726        default: return super.getTypesForProperty(hash, name);
4727        }
4728
4729      }
4730
4731      @Override
4732      public Base addChild(String name) throws FHIRException {
4733        if (name.equals("name")) {
4734          throw new FHIRException("Cannot call addChild on a singleton property TestScript.name");
4735        }
4736        else if (name.equals("value")) {
4737          throw new FHIRException("Cannot call addChild on a singleton property TestScript.value");
4738        }
4739        else
4740          return super.addChild(name);
4741      }
4742
4743      public RulesetRuleParamComponent copy() {
4744        RulesetRuleParamComponent dst = new RulesetRuleParamComponent();
4745        copyValues(dst);
4746        dst.name = name == null ? null : name.copy();
4747        dst.value = value == null ? null : value.copy();
4748        return dst;
4749      }
4750
4751      @Override
4752      public boolean equalsDeep(Base other_) {
4753        if (!super.equalsDeep(other_))
4754          return false;
4755        if (!(other_ instanceof RulesetRuleParamComponent))
4756          return false;
4757        RulesetRuleParamComponent o = (RulesetRuleParamComponent) other_;
4758        return compareDeep(name, o.name, true) && compareDeep(value, o.value, true);
4759      }
4760
4761      @Override
4762      public boolean equalsShallow(Base other_) {
4763        if (!super.equalsShallow(other_))
4764          return false;
4765        if (!(other_ instanceof RulesetRuleParamComponent))
4766          return false;
4767        RulesetRuleParamComponent o = (RulesetRuleParamComponent) other_;
4768        return compareValues(name, o.name, true) && compareValues(value, o.value, true);
4769      }
4770
4771      public boolean isEmpty() {
4772        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value);
4773      }
4774
4775  public String fhirType() {
4776    return "TestScript.ruleset.rule.param";
4777
4778  }
4779
4780  }
4781
4782    @Block()
4783    public static class TestScriptSetupComponent extends BackboneElement implements IBaseBackboneElement {
4784        /**
4785         * Action would contain either an operation or an assertion.
4786         */
4787        @Child(name = "action", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
4788        @Description(shortDefinition="A setup operation or assert to perform", formalDefinition="Action would contain either an operation or an assertion." )
4789        protected List<SetupActionComponent> action;
4790
4791        private static final long serialVersionUID = -123374486L;
4792
4793    /**
4794     * Constructor
4795     */
4796      public TestScriptSetupComponent() {
4797        super();
4798      }
4799
4800        /**
4801         * @return {@link #action} (Action would contain either an operation or an assertion.)
4802         */
4803        public List<SetupActionComponent> getAction() { 
4804          if (this.action == null)
4805            this.action = new ArrayList<SetupActionComponent>();
4806          return this.action;
4807        }
4808
4809        /**
4810         * @return Returns a reference to <code>this</code> for easy method chaining
4811         */
4812        public TestScriptSetupComponent setAction(List<SetupActionComponent> theAction) { 
4813          this.action = theAction;
4814          return this;
4815        }
4816
4817        public boolean hasAction() { 
4818          if (this.action == null)
4819            return false;
4820          for (SetupActionComponent item : this.action)
4821            if (!item.isEmpty())
4822              return true;
4823          return false;
4824        }
4825
4826        public SetupActionComponent addAction() { //3
4827          SetupActionComponent t = new SetupActionComponent();
4828          if (this.action == null)
4829            this.action = new ArrayList<SetupActionComponent>();
4830          this.action.add(t);
4831          return t;
4832        }
4833
4834        public TestScriptSetupComponent addAction(SetupActionComponent t) { //3
4835          if (t == null)
4836            return this;
4837          if (this.action == null)
4838            this.action = new ArrayList<SetupActionComponent>();
4839          this.action.add(t);
4840          return this;
4841        }
4842
4843        /**
4844         * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist
4845         */
4846        public SetupActionComponent getActionFirstRep() { 
4847          if (getAction().isEmpty()) {
4848            addAction();
4849          }
4850          return getAction().get(0);
4851        }
4852
4853        protected void listChildren(List<Property> children) {
4854          super.listChildren(children);
4855          children.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action));
4856        }
4857
4858        @Override
4859        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4860          switch (_hash) {
4861          case -1422950858: /*action*/  return new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action);
4862          default: return super.getNamedProperty(_hash, _name, _checkValid);
4863          }
4864
4865        }
4866
4867      @Override
4868      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4869        switch (hash) {
4870        case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // SetupActionComponent
4871        default: return super.getProperty(hash, name, checkValid);
4872        }
4873
4874      }
4875
4876      @Override
4877      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4878        switch (hash) {
4879        case -1422950858: // action
4880          this.getAction().add((SetupActionComponent) value); // SetupActionComponent
4881          return value;
4882        default: return super.setProperty(hash, name, value);
4883        }
4884
4885      }
4886
4887      @Override
4888      public Base setProperty(String name, Base value) throws FHIRException {
4889        if (name.equals("action")) {
4890          this.getAction().add((SetupActionComponent) value);
4891        } else
4892          return super.setProperty(name, value);
4893        return value;
4894      }
4895
4896      @Override
4897      public Base makeProperty(int hash, String name) throws FHIRException {
4898        switch (hash) {
4899        case -1422950858:  return addAction(); 
4900        default: return super.makeProperty(hash, name);
4901        }
4902
4903      }
4904
4905      @Override
4906      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4907        switch (hash) {
4908        case -1422950858: /*action*/ return new String[] {};
4909        default: return super.getTypesForProperty(hash, name);
4910        }
4911
4912      }
4913
4914      @Override
4915      public Base addChild(String name) throws FHIRException {
4916        if (name.equals("action")) {
4917          return addAction();
4918        }
4919        else
4920          return super.addChild(name);
4921      }
4922
4923      public TestScriptSetupComponent copy() {
4924        TestScriptSetupComponent dst = new TestScriptSetupComponent();
4925        copyValues(dst);
4926        if (action != null) {
4927          dst.action = new ArrayList<SetupActionComponent>();
4928          for (SetupActionComponent i : action)
4929            dst.action.add(i.copy());
4930        };
4931        return dst;
4932      }
4933
4934      @Override
4935      public boolean equalsDeep(Base other_) {
4936        if (!super.equalsDeep(other_))
4937          return false;
4938        if (!(other_ instanceof TestScriptSetupComponent))
4939          return false;
4940        TestScriptSetupComponent o = (TestScriptSetupComponent) other_;
4941        return compareDeep(action, o.action, true);
4942      }
4943
4944      @Override
4945      public boolean equalsShallow(Base other_) {
4946        if (!super.equalsShallow(other_))
4947          return false;
4948        if (!(other_ instanceof TestScriptSetupComponent))
4949          return false;
4950        TestScriptSetupComponent o = (TestScriptSetupComponent) other_;
4951        return true;
4952      }
4953
4954      public boolean isEmpty() {
4955        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(action);
4956      }
4957
4958  public String fhirType() {
4959    return "TestScript.setup";
4960
4961  }
4962
4963  }
4964
4965    @Block()
4966    public static class SetupActionComponent extends BackboneElement implements IBaseBackboneElement {
4967        /**
4968         * The operation to perform.
4969         */
4970        @Child(name = "operation", type = {}, order=1, min=0, max=1, modifier=false, summary=false)
4971        @Description(shortDefinition="The setup operation to perform", formalDefinition="The operation to perform." )
4972        protected SetupActionOperationComponent operation;
4973
4974        /**
4975         * Evaluates the results of previous operations to determine if the server under test behaves appropriately.
4976         */
4977        @Child(name = "assert", type = {}, order=2, min=0, max=1, modifier=false, summary=false)
4978        @Description(shortDefinition="The assertion to perform", formalDefinition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." )
4979        protected SetupActionAssertComponent assert_;
4980
4981        private static final long serialVersionUID = -252088305L;
4982
4983    /**
4984     * Constructor
4985     */
4986      public SetupActionComponent() {
4987        super();
4988      }
4989
4990        /**
4991         * @return {@link #operation} (The operation to perform.)
4992         */
4993        public SetupActionOperationComponent getOperation() { 
4994          if (this.operation == null)
4995            if (Configuration.errorOnAutoCreate())
4996              throw new Error("Attempt to auto-create SetupActionComponent.operation");
4997            else if (Configuration.doAutoCreate())
4998              this.operation = new SetupActionOperationComponent(); // cc
4999          return this.operation;
5000        }
5001
5002        public boolean hasOperation() { 
5003          return this.operation != null && !this.operation.isEmpty();
5004        }
5005
5006        /**
5007         * @param value {@link #operation} (The operation to perform.)
5008         */
5009        public SetupActionComponent setOperation(SetupActionOperationComponent value)  { 
5010          this.operation = value;
5011          return this;
5012        }
5013
5014        /**
5015         * @return {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.)
5016         */
5017        public SetupActionAssertComponent getAssert() { 
5018          if (this.assert_ == null)
5019            if (Configuration.errorOnAutoCreate())
5020              throw new Error("Attempt to auto-create SetupActionComponent.assert_");
5021            else if (Configuration.doAutoCreate())
5022              this.assert_ = new SetupActionAssertComponent(); // cc
5023          return this.assert_;
5024        }
5025
5026        public boolean hasAssert() { 
5027          return this.assert_ != null && !this.assert_.isEmpty();
5028        }
5029
5030        /**
5031         * @param value {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.)
5032         */
5033        public SetupActionComponent setAssert(SetupActionAssertComponent value)  { 
5034          this.assert_ = value;
5035          return this;
5036        }
5037
5038        protected void listChildren(List<Property> children) {
5039          super.listChildren(children);
5040          children.add(new Property("operation", "", "The operation to perform.", 0, 1, operation));
5041          children.add(new Property("assert", "", "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", 0, 1, assert_));
5042        }
5043
5044        @Override
5045        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
5046          switch (_hash) {
5047          case 1662702951: /*operation*/  return new Property("operation", "", "The operation to perform.", 0, 1, operation);
5048          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_);
5049          default: return super.getNamedProperty(_hash, _name, _checkValid);
5050          }
5051
5052        }
5053
5054      @Override
5055      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
5056        switch (hash) {
5057        case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent
5058        case -1408208058: /*assert*/ return this.assert_ == null ? new Base[0] : new Base[] {this.assert_}; // SetupActionAssertComponent
5059        default: return super.getProperty(hash, name, checkValid);
5060        }
5061
5062      }
5063
5064      @Override
5065      public Base setProperty(int hash, String name, Base value) throws FHIRException {
5066        switch (hash) {
5067        case 1662702951: // operation
5068          this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
5069          return value;
5070        case -1408208058: // assert
5071          this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
5072          return value;
5073        default: return super.setProperty(hash, name, value);
5074        }
5075
5076      }
5077
5078      @Override
5079      public Base setProperty(String name, Base value) throws FHIRException {
5080        if (name.equals("operation")) {
5081          this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
5082        } else if (name.equals("assert")) {
5083          this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
5084        } else
5085          return super.setProperty(name, value);
5086        return value;
5087      }
5088
5089      @Override
5090      public Base makeProperty(int hash, String name) throws FHIRException {
5091        switch (hash) {
5092        case 1662702951:  return getOperation(); 
5093        case -1408208058:  return getAssert(); 
5094        default: return super.makeProperty(hash, name);
5095        }
5096
5097      }
5098
5099      @Override
5100      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
5101        switch (hash) {
5102        case 1662702951: /*operation*/ return new String[] {};
5103        case -1408208058: /*assert*/ return new String[] {};
5104        default: return super.getTypesForProperty(hash, name);
5105        }
5106
5107      }
5108
5109      @Override
5110      public Base addChild(String name) throws FHIRException {
5111        if (name.equals("operation")) {
5112          this.operation = new SetupActionOperationComponent();
5113          return this.operation;
5114        }
5115        else if (name.equals("assert")) {
5116          this.assert_ = new SetupActionAssertComponent();
5117          return this.assert_;
5118        }
5119        else
5120          return super.addChild(name);
5121      }
5122
5123      public SetupActionComponent copy() {
5124        SetupActionComponent dst = new SetupActionComponent();
5125        copyValues(dst);
5126        dst.operation = operation == null ? null : operation.copy();
5127        dst.assert_ = assert_ == null ? null : assert_.copy();
5128        return dst;
5129      }
5130
5131      @Override
5132      public boolean equalsDeep(Base other_) {
5133        if (!super.equalsDeep(other_))
5134          return false;
5135        if (!(other_ instanceof SetupActionComponent))
5136          return false;
5137        SetupActionComponent o = (SetupActionComponent) other_;
5138        return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true);
5139      }
5140
5141      @Override
5142      public boolean equalsShallow(Base other_) {
5143        if (!super.equalsShallow(other_))
5144          return false;
5145        if (!(other_ instanceof SetupActionComponent))
5146          return false;
5147        SetupActionComponent o = (SetupActionComponent) other_;
5148        return true;
5149      }
5150
5151      public boolean isEmpty() {
5152        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation, assert_);
5153      }
5154
5155  public String fhirType() {
5156    return "TestScript.setup.action";
5157
5158  }
5159
5160  }
5161
5162    @Block()
5163    public static class SetupActionOperationComponent extends BackboneElement implements IBaseBackboneElement {
5164        /**
5165         * Server interaction or operation type.
5166         */
5167        @Child(name = "type", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=false)
5168        @Description(shortDefinition="The operation code type that will be executed", formalDefinition="Server interaction or operation type." )
5169        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-operation-codes")
5170        protected Coding type;
5171
5172        /**
5173         * The type of the resource.  See http://build.fhir.org/resourcelist.html.
5174         */
5175        @Child(name = "resource", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false)
5176        @Description(shortDefinition="Resource type", formalDefinition="The type of the resource.  See http://build.fhir.org/resourcelist.html." )
5177        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/defined-types")
5178        protected CodeType resource;
5179
5180        /**
5181         * The label would be used for tracking/logging purposes by test engines.
5182         */
5183        @Child(name = "label", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
5184        @Description(shortDefinition="Tracking/logging operation label", formalDefinition="The label would be used for tracking/logging purposes by test engines." )
5185        protected StringType label;
5186
5187        /**
5188         * The description would be used by test engines for tracking and reporting purposes.
5189         */
5190        @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
5191        @Description(shortDefinition="Tracking/reporting operation description", formalDefinition="The description would be used by test engines for tracking and reporting purposes." )
5192        protected StringType description;
5193
5194        /**
5195         * The content-type or mime-type to use for RESTful operation in the 'Accept' header.
5196         */
5197        @Child(name = "accept", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=false)
5198        @Description(shortDefinition="xml | json | ttl | none", formalDefinition="The content-type or mime-type to use for RESTful operation in the 'Accept' header." )
5199        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/content-type")
5200        protected Enumeration<ContentType> accept;
5201
5202        /**
5203         * The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.
5204         */
5205        @Child(name = "contentType", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false)
5206        @Description(shortDefinition="xml | json | ttl | none", formalDefinition="The content-type or mime-type to use for RESTful operation in the 'Content-Type' header." )
5207        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/content-type")
5208        protected Enumeration<ContentType> contentType;
5209
5210        /**
5211         * The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.
5212         */
5213        @Child(name = "destination", type = {IntegerType.class}, order=7, min=0, max=1, modifier=false, summary=false)
5214        @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." )
5215        protected IntegerType destination;
5216
5217        /**
5218         * 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.
5219         */
5220        @Child(name = "encodeRequestUrl", type = {BooleanType.class}, order=8, min=0, max=1, modifier=false, summary=false)
5221        @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." )
5222        protected BooleanType encodeRequestUrl;
5223
5224        /**
5225         * The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.
5226         */
5227        @Child(name = "origin", type = {IntegerType.class}, order=9, min=0, max=1, modifier=false, summary=false)
5228        @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." )
5229        protected IntegerType origin;
5230
5231        /**
5232         * Path plus parameters after [type].  Used to set parts of the request URL explicitly.
5233         */
5234        @Child(name = "params", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false)
5235        @Description(shortDefinition="Explicitly defined path parameters", formalDefinition="Path plus parameters after [type].  Used to set parts of the request URL explicitly." )
5236        protected StringType params;
5237
5238        /**
5239         * Header elements would be used to set HTTP headers.
5240         */
5241        @Child(name = "requestHeader", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
5242        @Description(shortDefinition="Each operation can have one or more header elements", formalDefinition="Header elements would be used to set HTTP headers." )
5243        protected List<SetupActionOperationRequestHeaderComponent> requestHeader;
5244
5245        /**
5246         * The fixture id (maybe new) to map to the request.
5247         */
5248        @Child(name = "requestId", type = {IdType.class}, order=12, min=0, max=1, modifier=false, summary=false)
5249        @Description(shortDefinition="Fixture Id of mapped request", formalDefinition="The fixture id (maybe new) to map to the request." )
5250        protected IdType requestId;
5251
5252        /**
5253         * The fixture id (maybe new) to map to the response.
5254         */
5255        @Child(name = "responseId", type = {IdType.class}, order=13, min=0, max=1, modifier=false, summary=false)
5256        @Description(shortDefinition="Fixture Id of mapped response", formalDefinition="The fixture id (maybe new) to map to the response." )
5257        protected IdType responseId;
5258
5259        /**
5260         * The id of the fixture used as the body of a PUT or POST request.
5261         */
5262        @Child(name = "sourceId", type = {IdType.class}, order=14, min=0, max=1, modifier=false, summary=false)
5263        @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." )
5264        protected IdType sourceId;
5265
5266        /**
5267         * Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.
5268         */
5269        @Child(name = "targetId", type = {IdType.class}, order=15, min=0, max=1, modifier=false, summary=false)
5270        @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." )
5271        protected IdType targetId;
5272
5273        /**
5274         * Complete request URL.
5275         */
5276        @Child(name = "url", type = {StringType.class}, order=16, min=0, max=1, modifier=false, summary=false)
5277        @Description(shortDefinition="Request URL", formalDefinition="Complete request URL." )
5278        protected StringType url;
5279
5280        private static final long serialVersionUID = -488909648L;
5281
5282    /**
5283     * Constructor
5284     */
5285      public SetupActionOperationComponent() {
5286        super();
5287      }
5288
5289        /**
5290         * @return {@link #type} (Server interaction or operation type.)
5291         */
5292        public Coding getType() { 
5293          if (this.type == null)
5294            if (Configuration.errorOnAutoCreate())
5295              throw new Error("Attempt to auto-create SetupActionOperationComponent.type");
5296            else if (Configuration.doAutoCreate())
5297              this.type = new Coding(); // cc
5298          return this.type;
5299        }
5300
5301        public boolean hasType() { 
5302          return this.type != null && !this.type.isEmpty();
5303        }
5304
5305        /**
5306         * @param value {@link #type} (Server interaction or operation type.)
5307         */
5308        public SetupActionOperationComponent setType(Coding value)  { 
5309          this.type = value;
5310          return this;
5311        }
5312
5313        /**
5314         * @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
5315         */
5316        public CodeType getResourceElement() { 
5317          if (this.resource == null)
5318            if (Configuration.errorOnAutoCreate())
5319              throw new Error("Attempt to auto-create SetupActionOperationComponent.resource");
5320            else if (Configuration.doAutoCreate())
5321              this.resource = new CodeType(); // bb
5322          return this.resource;
5323        }
5324
5325        public boolean hasResourceElement() { 
5326          return this.resource != null && !this.resource.isEmpty();
5327        }
5328
5329        public boolean hasResource() { 
5330          return this.resource != null && !this.resource.isEmpty();
5331        }
5332
5333        /**
5334         * @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
5335         */
5336        public SetupActionOperationComponent setResourceElement(CodeType value) { 
5337          this.resource = value;
5338          return this;
5339        }
5340
5341        /**
5342         * @return The type of the resource.  See http://build.fhir.org/resourcelist.html.
5343         */
5344        public String getResource() { 
5345          return this.resource == null ? null : this.resource.getValue();
5346        }
5347
5348        /**
5349         * @param value The type of the resource.  See http://build.fhir.org/resourcelist.html.
5350         */
5351        public SetupActionOperationComponent setResource(String value) { 
5352          if (Utilities.noString(value))
5353            this.resource = null;
5354          else {
5355            if (this.resource == null)
5356              this.resource = new CodeType();
5357            this.resource.setValue(value);
5358          }
5359          return this;
5360        }
5361
5362        /**
5363         * @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
5364         */
5365        public StringType getLabelElement() { 
5366          if (this.label == null)
5367            if (Configuration.errorOnAutoCreate())
5368              throw new Error("Attempt to auto-create SetupActionOperationComponent.label");
5369            else if (Configuration.doAutoCreate())
5370              this.label = new StringType(); // bb
5371          return this.label;
5372        }
5373
5374        public boolean hasLabelElement() { 
5375          return this.label != null && !this.label.isEmpty();
5376        }
5377
5378        public boolean hasLabel() { 
5379          return this.label != null && !this.label.isEmpty();
5380        }
5381
5382        /**
5383         * @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
5384         */
5385        public SetupActionOperationComponent setLabelElement(StringType value) { 
5386          this.label = value;
5387          return this;
5388        }
5389
5390        /**
5391         * @return The label would be used for tracking/logging purposes by test engines.
5392         */
5393        public String getLabel() { 
5394          return this.label == null ? null : this.label.getValue();
5395        }
5396
5397        /**
5398         * @param value The label would be used for tracking/logging purposes by test engines.
5399         */
5400        public SetupActionOperationComponent setLabel(String value) { 
5401          if (Utilities.noString(value))
5402            this.label = null;
5403          else {
5404            if (this.label == null)
5405              this.label = new StringType();
5406            this.label.setValue(value);
5407          }
5408          return this;
5409        }
5410
5411        /**
5412         * @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
5413         */
5414        public StringType getDescriptionElement() { 
5415          if (this.description == null)
5416            if (Configuration.errorOnAutoCreate())
5417              throw new Error("Attempt to auto-create SetupActionOperationComponent.description");
5418            else if (Configuration.doAutoCreate())
5419              this.description = new StringType(); // bb
5420          return this.description;
5421        }
5422
5423        public boolean hasDescriptionElement() { 
5424          return this.description != null && !this.description.isEmpty();
5425        }
5426
5427        public boolean hasDescription() { 
5428          return this.description != null && !this.description.isEmpty();
5429        }
5430
5431        /**
5432         * @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
5433         */
5434        public SetupActionOperationComponent setDescriptionElement(StringType value) { 
5435          this.description = value;
5436          return this;
5437        }
5438
5439        /**
5440         * @return The description would be used by test engines for tracking and reporting purposes.
5441         */
5442        public String getDescription() { 
5443          return this.description == null ? null : this.description.getValue();
5444        }
5445
5446        /**
5447         * @param value The description would be used by test engines for tracking and reporting purposes.
5448         */
5449        public SetupActionOperationComponent setDescription(String value) { 
5450          if (Utilities.noString(value))
5451            this.description = null;
5452          else {
5453            if (this.description == null)
5454              this.description = new StringType();
5455            this.description.setValue(value);
5456          }
5457          return this;
5458        }
5459
5460        /**
5461         * @return {@link #accept} (The content-type or 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
5462         */
5463        public Enumeration<ContentType> getAcceptElement() { 
5464          if (this.accept == null)
5465            if (Configuration.errorOnAutoCreate())
5466              throw new Error("Attempt to auto-create SetupActionOperationComponent.accept");
5467            else if (Configuration.doAutoCreate())
5468              this.accept = new Enumeration<ContentType>(new ContentTypeEnumFactory()); // bb
5469          return this.accept;
5470        }
5471
5472        public boolean hasAcceptElement() { 
5473          return this.accept != null && !this.accept.isEmpty();
5474        }
5475
5476        public boolean hasAccept() { 
5477          return this.accept != null && !this.accept.isEmpty();
5478        }
5479
5480        /**
5481         * @param value {@link #accept} (The content-type or 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
5482         */
5483        public SetupActionOperationComponent setAcceptElement(Enumeration<ContentType> value) { 
5484          this.accept = value;
5485          return this;
5486        }
5487
5488        /**
5489         * @return The content-type or mime-type to use for RESTful operation in the 'Accept' header.
5490         */
5491        public ContentType getAccept() { 
5492          return this.accept == null ? null : this.accept.getValue();
5493        }
5494
5495        /**
5496         * @param value The content-type or mime-type to use for RESTful operation in the 'Accept' header.
5497         */
5498        public SetupActionOperationComponent setAccept(ContentType value) { 
5499          if (value == null)
5500            this.accept = null;
5501          else {
5502            if (this.accept == null)
5503              this.accept = new Enumeration<ContentType>(new ContentTypeEnumFactory());
5504            this.accept.setValue(value);
5505          }
5506          return this;
5507        }
5508
5509        /**
5510         * @return {@link #contentType} (The content-type or 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
5511         */
5512        public Enumeration<ContentType> getContentTypeElement() { 
5513          if (this.contentType == null)
5514            if (Configuration.errorOnAutoCreate())
5515              throw new Error("Attempt to auto-create SetupActionOperationComponent.contentType");
5516            else if (Configuration.doAutoCreate())
5517              this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory()); // bb
5518          return this.contentType;
5519        }
5520
5521        public boolean hasContentTypeElement() { 
5522          return this.contentType != null && !this.contentType.isEmpty();
5523        }
5524
5525        public boolean hasContentType() { 
5526          return this.contentType != null && !this.contentType.isEmpty();
5527        }
5528
5529        /**
5530         * @param value {@link #contentType} (The content-type or 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
5531         */
5532        public SetupActionOperationComponent setContentTypeElement(Enumeration<ContentType> value) { 
5533          this.contentType = value;
5534          return this;
5535        }
5536
5537        /**
5538         * @return The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.
5539         */
5540        public ContentType getContentType() { 
5541          return this.contentType == null ? null : this.contentType.getValue();
5542        }
5543
5544        /**
5545         * @param value The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.
5546         */
5547        public SetupActionOperationComponent setContentType(ContentType value) { 
5548          if (value == null)
5549            this.contentType = null;
5550          else {
5551            if (this.contentType == null)
5552              this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory());
5553            this.contentType.setValue(value);
5554          }
5555          return this;
5556        }
5557
5558        /**
5559         * @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
5560         */
5561        public IntegerType getDestinationElement() { 
5562          if (this.destination == null)
5563            if (Configuration.errorOnAutoCreate())
5564              throw new Error("Attempt to auto-create SetupActionOperationComponent.destination");
5565            else if (Configuration.doAutoCreate())
5566              this.destination = new IntegerType(); // bb
5567          return this.destination;
5568        }
5569
5570        public boolean hasDestinationElement() { 
5571          return this.destination != null && !this.destination.isEmpty();
5572        }
5573
5574        public boolean hasDestination() { 
5575          return this.destination != null && !this.destination.isEmpty();
5576        }
5577
5578        /**
5579         * @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
5580         */
5581        public SetupActionOperationComponent setDestinationElement(IntegerType value) { 
5582          this.destination = value;
5583          return this;
5584        }
5585
5586        /**
5587         * @return The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.
5588         */
5589        public int getDestination() { 
5590          return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue();
5591        }
5592
5593        /**
5594         * @param value The server where the request message is destined for.  Must be one of the server numbers listed in TestScript.destination section.
5595         */
5596        public SetupActionOperationComponent setDestination(int value) { 
5597            if (this.destination == null)
5598              this.destination = new IntegerType();
5599            this.destination.setValue(value);
5600          return this;
5601        }
5602
5603        /**
5604         * @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
5605         */
5606        public BooleanType getEncodeRequestUrlElement() { 
5607          if (this.encodeRequestUrl == null)
5608            if (Configuration.errorOnAutoCreate())
5609              throw new Error("Attempt to auto-create SetupActionOperationComponent.encodeRequestUrl");
5610            else if (Configuration.doAutoCreate())
5611              this.encodeRequestUrl = new BooleanType(); // bb
5612          return this.encodeRequestUrl;
5613        }
5614
5615        public boolean hasEncodeRequestUrlElement() { 
5616          return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty();
5617        }
5618
5619        public boolean hasEncodeRequestUrl() { 
5620          return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty();
5621        }
5622
5623        /**
5624         * @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
5625         */
5626        public SetupActionOperationComponent setEncodeRequestUrlElement(BooleanType value) { 
5627          this.encodeRequestUrl = value;
5628          return this;
5629        }
5630
5631        /**
5632         * @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.
5633         */
5634        public boolean getEncodeRequestUrl() { 
5635          return this.encodeRequestUrl == null || this.encodeRequestUrl.isEmpty() ? false : this.encodeRequestUrl.getValue();
5636        }
5637
5638        /**
5639         * @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.
5640         */
5641        public SetupActionOperationComponent setEncodeRequestUrl(boolean value) { 
5642            if (this.encodeRequestUrl == null)
5643              this.encodeRequestUrl = new BooleanType();
5644            this.encodeRequestUrl.setValue(value);
5645          return this;
5646        }
5647
5648        /**
5649         * @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
5650         */
5651        public IntegerType getOriginElement() { 
5652          if (this.origin == null)
5653            if (Configuration.errorOnAutoCreate())
5654              throw new Error("Attempt to auto-create SetupActionOperationComponent.origin");
5655            else if (Configuration.doAutoCreate())
5656              this.origin = new IntegerType(); // bb
5657          return this.origin;
5658        }
5659
5660        public boolean hasOriginElement() { 
5661          return this.origin != null && !this.origin.isEmpty();
5662        }
5663
5664        public boolean hasOrigin() { 
5665          return this.origin != null && !this.origin.isEmpty();
5666        }
5667
5668        /**
5669         * @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
5670         */
5671        public SetupActionOperationComponent setOriginElement(IntegerType value) { 
5672          this.origin = value;
5673          return this;
5674        }
5675
5676        /**
5677         * @return The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.
5678         */
5679        public int getOrigin() { 
5680          return this.origin == null || this.origin.isEmpty() ? 0 : this.origin.getValue();
5681        }
5682
5683        /**
5684         * @param value The server where the request message originates from.  Must be one of the server numbers listed in TestScript.origin section.
5685         */
5686        public SetupActionOperationComponent setOrigin(int value) { 
5687            if (this.origin == null)
5688              this.origin = new IntegerType();
5689            this.origin.setValue(value);
5690          return this;
5691        }
5692
5693        /**
5694         * @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
5695         */
5696        public StringType getParamsElement() { 
5697          if (this.params == null)
5698            if (Configuration.errorOnAutoCreate())
5699              throw new Error("Attempt to auto-create SetupActionOperationComponent.params");
5700            else if (Configuration.doAutoCreate())
5701              this.params = new StringType(); // bb
5702          return this.params;
5703        }
5704
5705        public boolean hasParamsElement() { 
5706          return this.params != null && !this.params.isEmpty();
5707        }
5708
5709        public boolean hasParams() { 
5710          return this.params != null && !this.params.isEmpty();
5711        }
5712
5713        /**
5714         * @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
5715         */
5716        public SetupActionOperationComponent setParamsElement(StringType value) { 
5717          this.params = value;
5718          return this;
5719        }
5720
5721        /**
5722         * @return Path plus parameters after [type].  Used to set parts of the request URL explicitly.
5723         */
5724        public String getParams() { 
5725          return this.params == null ? null : this.params.getValue();
5726        }
5727
5728        /**
5729         * @param value Path plus parameters after [type].  Used to set parts of the request URL explicitly.
5730         */
5731        public SetupActionOperationComponent setParams(String value) { 
5732          if (Utilities.noString(value))
5733            this.params = null;
5734          else {
5735            if (this.params == null)
5736              this.params = new StringType();
5737            this.params.setValue(value);
5738          }
5739          return this;
5740        }
5741
5742        /**
5743         * @return {@link #requestHeader} (Header elements would be used to set HTTP headers.)
5744         */
5745        public List<SetupActionOperationRequestHeaderComponent> getRequestHeader() { 
5746          if (this.requestHeader == null)
5747            this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
5748          return this.requestHeader;
5749        }
5750
5751        /**
5752         * @return Returns a reference to <code>this</code> for easy method chaining
5753         */
5754        public SetupActionOperationComponent setRequestHeader(List<SetupActionOperationRequestHeaderComponent> theRequestHeader) { 
5755          this.requestHeader = theRequestHeader;
5756          return this;
5757        }
5758
5759        public boolean hasRequestHeader() { 
5760          if (this.requestHeader == null)
5761            return false;
5762          for (SetupActionOperationRequestHeaderComponent item : this.requestHeader)
5763            if (!item.isEmpty())
5764              return true;
5765          return false;
5766        }
5767
5768        public SetupActionOperationRequestHeaderComponent addRequestHeader() { //3
5769          SetupActionOperationRequestHeaderComponent t = new SetupActionOperationRequestHeaderComponent();
5770          if (this.requestHeader == null)
5771            this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
5772          this.requestHeader.add(t);
5773          return t;
5774        }
5775
5776        public SetupActionOperationComponent addRequestHeader(SetupActionOperationRequestHeaderComponent t) { //3
5777          if (t == null)
5778            return this;
5779          if (this.requestHeader == null)
5780            this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
5781          this.requestHeader.add(t);
5782          return this;
5783        }
5784
5785        /**
5786         * @return The first repetition of repeating field {@link #requestHeader}, creating it if it does not already exist
5787         */
5788        public SetupActionOperationRequestHeaderComponent getRequestHeaderFirstRep() { 
5789          if (getRequestHeader().isEmpty()) {
5790            addRequestHeader();
5791          }
5792          return getRequestHeader().get(0);
5793        }
5794
5795        /**
5796         * @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
5797         */
5798        public IdType getRequestIdElement() { 
5799          if (this.requestId == null)
5800            if (Configuration.errorOnAutoCreate())
5801              throw new Error("Attempt to auto-create SetupActionOperationComponent.requestId");
5802            else if (Configuration.doAutoCreate())
5803              this.requestId = new IdType(); // bb
5804          return this.requestId;
5805        }
5806
5807        public boolean hasRequestIdElement() { 
5808          return this.requestId != null && !this.requestId.isEmpty();
5809        }
5810
5811        public boolean hasRequestId() { 
5812          return this.requestId != null && !this.requestId.isEmpty();
5813        }
5814
5815        /**
5816         * @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
5817         */
5818        public SetupActionOperationComponent setRequestIdElement(IdType value) { 
5819          this.requestId = value;
5820          return this;
5821        }
5822
5823        /**
5824         * @return The fixture id (maybe new) to map to the request.
5825         */
5826        public String getRequestId() { 
5827          return this.requestId == null ? null : this.requestId.getValue();
5828        }
5829
5830        /**
5831         * @param value The fixture id (maybe new) to map to the request.
5832         */
5833        public SetupActionOperationComponent setRequestId(String value) { 
5834          if (Utilities.noString(value))
5835            this.requestId = null;
5836          else {
5837            if (this.requestId == null)
5838              this.requestId = new IdType();
5839            this.requestId.setValue(value);
5840          }
5841          return this;
5842        }
5843
5844        /**
5845         * @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
5846         */
5847        public IdType getResponseIdElement() { 
5848          if (this.responseId == null)
5849            if (Configuration.errorOnAutoCreate())
5850              throw new Error("Attempt to auto-create SetupActionOperationComponent.responseId");
5851            else if (Configuration.doAutoCreate())
5852              this.responseId = new IdType(); // bb
5853          return this.responseId;
5854        }
5855
5856        public boolean hasResponseIdElement() { 
5857          return this.responseId != null && !this.responseId.isEmpty();
5858        }
5859
5860        public boolean hasResponseId() { 
5861          return this.responseId != null && !this.responseId.isEmpty();
5862        }
5863
5864        /**
5865         * @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
5866         */
5867        public SetupActionOperationComponent setResponseIdElement(IdType value) { 
5868          this.responseId = value;
5869          return this;
5870        }
5871
5872        /**
5873         * @return The fixture id (maybe new) to map to the response.
5874         */
5875        public String getResponseId() { 
5876          return this.responseId == null ? null : this.responseId.getValue();
5877        }
5878
5879        /**
5880         * @param value The fixture id (maybe new) to map to the response.
5881         */
5882        public SetupActionOperationComponent setResponseId(String value) { 
5883          if (Utilities.noString(value))
5884            this.responseId = null;
5885          else {
5886            if (this.responseId == null)
5887              this.responseId = new IdType();
5888            this.responseId.setValue(value);
5889          }
5890          return this;
5891        }
5892
5893        /**
5894         * @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
5895         */
5896        public IdType getSourceIdElement() { 
5897          if (this.sourceId == null)
5898            if (Configuration.errorOnAutoCreate())
5899              throw new Error("Attempt to auto-create SetupActionOperationComponent.sourceId");
5900            else if (Configuration.doAutoCreate())
5901              this.sourceId = new IdType(); // bb
5902          return this.sourceId;
5903        }
5904
5905        public boolean hasSourceIdElement() { 
5906          return this.sourceId != null && !this.sourceId.isEmpty();
5907        }
5908
5909        public boolean hasSourceId() { 
5910          return this.sourceId != null && !this.sourceId.isEmpty();
5911        }
5912
5913        /**
5914         * @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
5915         */
5916        public SetupActionOperationComponent setSourceIdElement(IdType value) { 
5917          this.sourceId = value;
5918          return this;
5919        }
5920
5921        /**
5922         * @return The id of the fixture used as the body of a PUT or POST request.
5923         */
5924        public String getSourceId() { 
5925          return this.sourceId == null ? null : this.sourceId.getValue();
5926        }
5927
5928        /**
5929         * @param value The id of the fixture used as the body of a PUT or POST request.
5930         */
5931        public SetupActionOperationComponent setSourceId(String value) { 
5932          if (Utilities.noString(value))
5933            this.sourceId = null;
5934          else {
5935            if (this.sourceId == null)
5936              this.sourceId = new IdType();
5937            this.sourceId.setValue(value);
5938          }
5939          return this;
5940        }
5941
5942        /**
5943         * @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
5944         */
5945        public IdType getTargetIdElement() { 
5946          if (this.targetId == null)
5947            if (Configuration.errorOnAutoCreate())
5948              throw new Error("Attempt to auto-create SetupActionOperationComponent.targetId");
5949            else if (Configuration.doAutoCreate())
5950              this.targetId = new IdType(); // bb
5951          return this.targetId;
5952        }
5953
5954        public boolean hasTargetIdElement() { 
5955          return this.targetId != null && !this.targetId.isEmpty();
5956        }
5957
5958        public boolean hasTargetId() { 
5959          return this.targetId != null && !this.targetId.isEmpty();
5960        }
5961
5962        /**
5963         * @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
5964         */
5965        public SetupActionOperationComponent setTargetIdElement(IdType value) { 
5966          this.targetId = value;
5967          return this;
5968        }
5969
5970        /**
5971         * @return Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.
5972         */
5973        public String getTargetId() { 
5974          return this.targetId == null ? null : this.targetId.getValue();
5975        }
5976
5977        /**
5978         * @param value Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.
5979         */
5980        public SetupActionOperationComponent setTargetId(String value) { 
5981          if (Utilities.noString(value))
5982            this.targetId = null;
5983          else {
5984            if (this.targetId == null)
5985              this.targetId = new IdType();
5986            this.targetId.setValue(value);
5987          }
5988          return this;
5989        }
5990
5991        /**
5992         * @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
5993         */
5994        public StringType getUrlElement() { 
5995          if (this.url == null)
5996            if (Configuration.errorOnAutoCreate())
5997              throw new Error("Attempt to auto-create SetupActionOperationComponent.url");
5998            else if (Configuration.doAutoCreate())
5999              this.url = new StringType(); // bb
6000          return this.url;
6001        }
6002
6003        public boolean hasUrlElement() { 
6004          return this.url != null && !this.url.isEmpty();
6005        }
6006
6007        public boolean hasUrl() { 
6008          return this.url != null && !this.url.isEmpty();
6009        }
6010
6011        /**
6012         * @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
6013         */
6014        public SetupActionOperationComponent setUrlElement(StringType value) { 
6015          this.url = value;
6016          return this;
6017        }
6018
6019        /**
6020         * @return Complete request URL.
6021         */
6022        public String getUrl() { 
6023          return this.url == null ? null : this.url.getValue();
6024        }
6025
6026        /**
6027         * @param value Complete request URL.
6028         */
6029        public SetupActionOperationComponent setUrl(String value) { 
6030          if (Utilities.noString(value))
6031            this.url = null;
6032          else {
6033            if (this.url == null)
6034              this.url = new StringType();
6035            this.url.setValue(value);
6036          }
6037          return this;
6038        }
6039
6040        protected void listChildren(List<Property> children) {
6041          super.listChildren(children);
6042          children.add(new Property("type", "Coding", "Server interaction or operation type.", 0, 1, type));
6043          children.add(new Property("resource", "code", "The type of the resource.  See http://build.fhir.org/resourcelist.html.", 0, 1, resource));
6044          children.add(new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label));
6045          children.add(new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description));
6046          children.add(new Property("accept", "code", "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", 0, 1, accept));
6047          children.add(new Property("contentType", "code", "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", 0, 1, contentType));
6048          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));
6049          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));
6050          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));
6051          children.add(new Property("params", "string", "Path plus parameters after [type].  Used to set parts of the request URL explicitly.", 0, 1, params));
6052          children.add(new Property("requestHeader", "", "Header elements would be used to set HTTP headers.", 0, java.lang.Integer.MAX_VALUE, requestHeader));
6053          children.add(new Property("requestId", "id", "The fixture id (maybe new) to map to the request.", 0, 1, requestId));
6054          children.add(new Property("responseId", "id", "The fixture id (maybe new) to map to the response.", 0, 1, responseId));
6055          children.add(new Property("sourceId", "id", "The id of the fixture used as the body of a PUT or POST request.", 0, 1, sourceId));
6056          children.add(new Property("targetId", "id", "Id of fixture used for extracting the [id],  [type], and [vid] for GET requests.", 0, 1, targetId));
6057          children.add(new Property("url", "string", "Complete request URL.", 0, 1, url));
6058        }
6059
6060        @Override
6061        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
6062          switch (_hash) {
6063          case 3575610: /*type*/  return new Property("type", "Coding", "Server interaction or operation type.", 0, 1, type);
6064          case -341064690: /*resource*/  return new Property("resource", "code", "The type of the resource.  See http://build.fhir.org/resourcelist.html.", 0, 1, resource);
6065          case 102727412: /*label*/  return new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label);
6066          case -1724546052: /*description*/  return new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description);
6067          case -1423461112: /*accept*/  return new Property("accept", "code", "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", 0, 1, accept);
6068          case -389131437: /*contentType*/  return new Property("contentType", "code", "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", 0, 1, contentType);
6069          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);
6070          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);
6071          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);
6072          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);
6073          case 1074158076: /*requestHeader*/  return new Property("requestHeader", "", "Header elements would be used to set HTTP headers.", 0, java.lang.Integer.MAX_VALUE, requestHeader);
6074          case 693933066: /*requestId*/  return new Property("requestId", "id", "The fixture id (maybe new) to map to the request.", 0, 1, requestId);
6075          case -633138884: /*responseId*/  return new Property("responseId", "id", "The fixture id (maybe new) to map to the response.", 0, 1, responseId);
6076          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);
6077          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);
6078          case 116079: /*url*/  return new Property("url", "string", "Complete request URL.", 0, 1, url);
6079          default: return super.getNamedProperty(_hash, _name, _checkValid);
6080          }
6081
6082        }
6083
6084      @Override
6085      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
6086        switch (hash) {
6087        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding
6088        case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // CodeType
6089        case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType
6090        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
6091        case -1423461112: /*accept*/ return this.accept == null ? new Base[0] : new Base[] {this.accept}; // Enumeration<ContentType>
6092        case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // Enumeration<ContentType>
6093        case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // IntegerType
6094        case -1760554218: /*encodeRequestUrl*/ return this.encodeRequestUrl == null ? new Base[0] : new Base[] {this.encodeRequestUrl}; // BooleanType
6095        case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : new Base[] {this.origin}; // IntegerType
6096        case -995427962: /*params*/ return this.params == null ? new Base[0] : new Base[] {this.params}; // StringType
6097        case 1074158076: /*requestHeader*/ return this.requestHeader == null ? new Base[0] : this.requestHeader.toArray(new Base[this.requestHeader.size()]); // SetupActionOperationRequestHeaderComponent
6098        case 693933066: /*requestId*/ return this.requestId == null ? new Base[0] : new Base[] {this.requestId}; // IdType
6099        case -633138884: /*responseId*/ return this.responseId == null ? new Base[0] : new Base[] {this.responseId}; // IdType
6100        case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType
6101        case -441951604: /*targetId*/ return this.targetId == null ? new Base[0] : new Base[] {this.targetId}; // IdType
6102        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // StringType
6103        default: return super.getProperty(hash, name, checkValid);
6104        }
6105
6106      }
6107
6108      @Override
6109      public Base setProperty(int hash, String name, Base value) throws FHIRException {
6110        switch (hash) {
6111        case 3575610: // type
6112          this.type = castToCoding(value); // Coding
6113          return value;
6114        case -341064690: // resource
6115          this.resource = castToCode(value); // CodeType
6116          return value;
6117        case 102727412: // label
6118          this.label = castToString(value); // StringType
6119          return value;
6120        case -1724546052: // description
6121          this.description = castToString(value); // StringType
6122          return value;
6123        case -1423461112: // accept
6124          value = new ContentTypeEnumFactory().fromType(castToCode(value));
6125          this.accept = (Enumeration) value; // Enumeration<ContentType>
6126          return value;
6127        case -389131437: // contentType
6128          value = new ContentTypeEnumFactory().fromType(castToCode(value));
6129          this.contentType = (Enumeration) value; // Enumeration<ContentType>
6130          return value;
6131        case -1429847026: // destination
6132          this.destination = castToInteger(value); // IntegerType
6133          return value;
6134        case -1760554218: // encodeRequestUrl
6135          this.encodeRequestUrl = castToBoolean(value); // BooleanType
6136          return value;
6137        case -1008619738: // origin
6138          this.origin = castToInteger(value); // IntegerType
6139          return value;
6140        case -995427962: // params
6141          this.params = castToString(value); // StringType
6142          return value;
6143        case 1074158076: // requestHeader
6144          this.getRequestHeader().add((SetupActionOperationRequestHeaderComponent) value); // SetupActionOperationRequestHeaderComponent
6145          return value;
6146        case 693933066: // requestId
6147          this.requestId = castToId(value); // IdType
6148          return value;
6149        case -633138884: // responseId
6150          this.responseId = castToId(value); // IdType
6151          return value;
6152        case 1746327190: // sourceId
6153          this.sourceId = castToId(value); // IdType
6154          return value;
6155        case -441951604: // targetId
6156          this.targetId = castToId(value); // IdType
6157          return value;
6158        case 116079: // url
6159          this.url = castToString(value); // StringType
6160          return value;
6161        default: return super.setProperty(hash, name, value);
6162        }
6163
6164      }
6165
6166      @Override
6167      public Base setProperty(String name, Base value) throws FHIRException {
6168        if (name.equals("type")) {
6169          this.type = castToCoding(value); // Coding
6170        } else if (name.equals("resource")) {
6171          this.resource = castToCode(value); // CodeType
6172        } else if (name.equals("label")) {
6173          this.label = castToString(value); // StringType
6174        } else if (name.equals("description")) {
6175          this.description = castToString(value); // StringType
6176        } else if (name.equals("accept")) {
6177          value = new ContentTypeEnumFactory().fromType(castToCode(value));
6178          this.accept = (Enumeration) value; // Enumeration<ContentType>
6179        } else if (name.equals("contentType")) {
6180          value = new ContentTypeEnumFactory().fromType(castToCode(value));
6181          this.contentType = (Enumeration) value; // Enumeration<ContentType>
6182        } else if (name.equals("destination")) {
6183          this.destination = castToInteger(value); // IntegerType
6184        } else if (name.equals("encodeRequestUrl")) {
6185          this.encodeRequestUrl = castToBoolean(value); // BooleanType
6186        } else if (name.equals("origin")) {
6187          this.origin = castToInteger(value); // IntegerType
6188        } else if (name.equals("params")) {
6189          this.params = castToString(value); // StringType
6190        } else if (name.equals("requestHeader")) {
6191          this.getRequestHeader().add((SetupActionOperationRequestHeaderComponent) value);
6192        } else if (name.equals("requestId")) {
6193          this.requestId = castToId(value); // IdType
6194        } else if (name.equals("responseId")) {
6195          this.responseId = castToId(value); // IdType
6196        } else if (name.equals("sourceId")) {
6197          this.sourceId = castToId(value); // IdType
6198        } else if (name.equals("targetId")) {
6199          this.targetId = castToId(value); // IdType
6200        } else if (name.equals("url")) {
6201          this.url = castToString(value); // StringType
6202        } else
6203          return super.setProperty(name, value);
6204        return value;
6205      }
6206
6207      @Override
6208      public Base makeProperty(int hash, String name) throws FHIRException {
6209        switch (hash) {
6210        case 3575610:  return getType(); 
6211        case -341064690:  return getResourceElement();
6212        case 102727412:  return getLabelElement();
6213        case -1724546052:  return getDescriptionElement();
6214        case -1423461112:  return getAcceptElement();
6215        case -389131437:  return getContentTypeElement();
6216        case -1429847026:  return getDestinationElement();
6217        case -1760554218:  return getEncodeRequestUrlElement();
6218        case -1008619738:  return getOriginElement();
6219        case -995427962:  return getParamsElement();
6220        case 1074158076:  return addRequestHeader(); 
6221        case 693933066:  return getRequestIdElement();
6222        case -633138884:  return getResponseIdElement();
6223        case 1746327190:  return getSourceIdElement();
6224        case -441951604:  return getTargetIdElement();
6225        case 116079:  return getUrlElement();
6226        default: return super.makeProperty(hash, name);
6227        }
6228
6229      }
6230
6231      @Override
6232      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
6233        switch (hash) {
6234        case 3575610: /*type*/ return new String[] {"Coding"};
6235        case -341064690: /*resource*/ return new String[] {"code"};
6236        case 102727412: /*label*/ return new String[] {"string"};
6237        case -1724546052: /*description*/ return new String[] {"string"};
6238        case -1423461112: /*accept*/ return new String[] {"code"};
6239        case -389131437: /*contentType*/ return new String[] {"code"};
6240        case -1429847026: /*destination*/ return new String[] {"integer"};
6241        case -1760554218: /*encodeRequestUrl*/ return new String[] {"boolean"};
6242        case -1008619738: /*origin*/ return new String[] {"integer"};
6243        case -995427962: /*params*/ return new String[] {"string"};
6244        case 1074158076: /*requestHeader*/ return new String[] {};
6245        case 693933066: /*requestId*/ return new String[] {"id"};
6246        case -633138884: /*responseId*/ return new String[] {"id"};
6247        case 1746327190: /*sourceId*/ return new String[] {"id"};
6248        case -441951604: /*targetId*/ return new String[] {"id"};
6249        case 116079: /*url*/ return new String[] {"string"};
6250        default: return super.getTypesForProperty(hash, name);
6251        }
6252
6253      }
6254
6255      @Override
6256      public Base addChild(String name) throws FHIRException {
6257        if (name.equals("type")) {
6258          this.type = new Coding();
6259          return this.type;
6260        }
6261        else if (name.equals("resource")) {
6262          throw new FHIRException("Cannot call addChild on a singleton property TestScript.resource");
6263        }
6264        else if (name.equals("label")) {
6265          throw new FHIRException("Cannot call addChild on a singleton property TestScript.label");
6266        }
6267        else if (name.equals("description")) {
6268          throw new FHIRException("Cannot call addChild on a singleton property TestScript.description");
6269        }
6270        else if (name.equals("accept")) {
6271          throw new FHIRException("Cannot call addChild on a singleton property TestScript.accept");
6272        }
6273        else if (name.equals("contentType")) {
6274          throw new FHIRException("Cannot call addChild on a singleton property TestScript.contentType");
6275        }
6276        else if (name.equals("destination")) {
6277          throw new FHIRException("Cannot call addChild on a singleton property TestScript.destination");
6278        }
6279        else if (name.equals("encodeRequestUrl")) {
6280          throw new FHIRException("Cannot call addChild on a singleton property TestScript.encodeRequestUrl");
6281        }
6282        else if (name.equals("origin")) {
6283          throw new FHIRException("Cannot call addChild on a singleton property TestScript.origin");
6284        }
6285        else if (name.equals("params")) {
6286          throw new FHIRException("Cannot call addChild on a singleton property TestScript.params");
6287        }
6288        else if (name.equals("requestHeader")) {
6289          return addRequestHeader();
6290        }
6291        else if (name.equals("requestId")) {
6292          throw new FHIRException("Cannot call addChild on a singleton property TestScript.requestId");
6293        }
6294        else if (name.equals("responseId")) {
6295          throw new FHIRException("Cannot call addChild on a singleton property TestScript.responseId");
6296        }
6297        else if (name.equals("sourceId")) {
6298          throw new FHIRException("Cannot call addChild on a singleton property TestScript.sourceId");
6299        }
6300        else if (name.equals("targetId")) {
6301          throw new FHIRException("Cannot call addChild on a singleton property TestScript.targetId");
6302        }
6303        else if (name.equals("url")) {
6304          throw new FHIRException("Cannot call addChild on a singleton property TestScript.url");
6305        }
6306        else
6307          return super.addChild(name);
6308      }
6309
6310      public SetupActionOperationComponent copy() {
6311        SetupActionOperationComponent dst = new SetupActionOperationComponent();
6312        copyValues(dst);
6313        dst.type = type == null ? null : type.copy();
6314        dst.resource = resource == null ? null : resource.copy();
6315        dst.label = label == null ? null : label.copy();
6316        dst.description = description == null ? null : description.copy();
6317        dst.accept = accept == null ? null : accept.copy();
6318        dst.contentType = contentType == null ? null : contentType.copy();
6319        dst.destination = destination == null ? null : destination.copy();
6320        dst.encodeRequestUrl = encodeRequestUrl == null ? null : encodeRequestUrl.copy();
6321        dst.origin = origin == null ? null : origin.copy();
6322        dst.params = params == null ? null : params.copy();
6323        if (requestHeader != null) {
6324          dst.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>();
6325          for (SetupActionOperationRequestHeaderComponent i : requestHeader)
6326            dst.requestHeader.add(i.copy());
6327        };
6328        dst.requestId = requestId == null ? null : requestId.copy();
6329        dst.responseId = responseId == null ? null : responseId.copy();
6330        dst.sourceId = sourceId == null ? null : sourceId.copy();
6331        dst.targetId = targetId == null ? null : targetId.copy();
6332        dst.url = url == null ? null : url.copy();
6333        return dst;
6334      }
6335
6336      @Override
6337      public boolean equalsDeep(Base other_) {
6338        if (!super.equalsDeep(other_))
6339          return false;
6340        if (!(other_ instanceof SetupActionOperationComponent))
6341          return false;
6342        SetupActionOperationComponent o = (SetupActionOperationComponent) other_;
6343        return compareDeep(type, o.type, true) && compareDeep(resource, o.resource, true) && compareDeep(label, o.label, true)
6344           && compareDeep(description, o.description, true) && compareDeep(accept, o.accept, true) && compareDeep(contentType, o.contentType, true)
6345           && compareDeep(destination, o.destination, true) && compareDeep(encodeRequestUrl, o.encodeRequestUrl, true)
6346           && compareDeep(origin, o.origin, true) && compareDeep(params, o.params, true) && compareDeep(requestHeader, o.requestHeader, true)
6347           && compareDeep(requestId, o.requestId, true) && compareDeep(responseId, o.responseId, true) && compareDeep(sourceId, o.sourceId, true)
6348           && compareDeep(targetId, o.targetId, true) && compareDeep(url, o.url, true);
6349      }
6350
6351      @Override
6352      public boolean equalsShallow(Base other_) {
6353        if (!super.equalsShallow(other_))
6354          return false;
6355        if (!(other_ instanceof SetupActionOperationComponent))
6356          return false;
6357        SetupActionOperationComponent o = (SetupActionOperationComponent) other_;
6358        return compareValues(resource, o.resource, true) && compareValues(label, o.label, true) && compareValues(description, o.description, true)
6359           && compareValues(accept, o.accept, true) && compareValues(contentType, o.contentType, true) && compareValues(destination, o.destination, true)
6360           && compareValues(encodeRequestUrl, o.encodeRequestUrl, true) && compareValues(origin, o.origin, true)
6361           && compareValues(params, o.params, true) && compareValues(requestId, o.requestId, true) && compareValues(responseId, o.responseId, true)
6362           && compareValues(sourceId, o.sourceId, true) && compareValues(targetId, o.targetId, true) && compareValues(url, o.url, true)
6363          ;
6364      }
6365
6366      public boolean isEmpty() {
6367        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, resource, label, description
6368          , accept, contentType, destination, encodeRequestUrl, origin, params, requestHeader
6369          , requestId, responseId, sourceId, targetId, url);
6370      }
6371
6372  public String fhirType() {
6373    return "TestScript.setup.action.operation";
6374
6375  }
6376
6377  }
6378
6379    @Block()
6380    public static class SetupActionOperationRequestHeaderComponent extends BackboneElement implements IBaseBackboneElement {
6381        /**
6382         * The HTTP header field e.g. "Accept".
6383         */
6384        @Child(name = "field", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
6385        @Description(shortDefinition="HTTP header field name", formalDefinition="The HTTP header field e.g. \"Accept\"." )
6386        protected StringType field;
6387
6388        /**
6389         * The value of the header e.g. "application/fhir+xml".
6390         */
6391        @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false)
6392        @Description(shortDefinition="HTTP headerfield value", formalDefinition="The value of the header e.g. \"application/fhir+xml\"." )
6393        protected StringType value;
6394
6395        private static final long serialVersionUID = 274395337L;
6396
6397    /**
6398     * Constructor
6399     */
6400      public SetupActionOperationRequestHeaderComponent() {
6401        super();
6402      }
6403
6404    /**
6405     * Constructor
6406     */
6407      public SetupActionOperationRequestHeaderComponent(StringType field, StringType value) {
6408        super();
6409        this.field = field;
6410        this.value = value;
6411      }
6412
6413        /**
6414         * @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
6415         */
6416        public StringType getFieldElement() { 
6417          if (this.field == null)
6418            if (Configuration.errorOnAutoCreate())
6419              throw new Error("Attempt to auto-create SetupActionOperationRequestHeaderComponent.field");
6420            else if (Configuration.doAutoCreate())
6421              this.field = new StringType(); // bb
6422          return this.field;
6423        }
6424
6425        public boolean hasFieldElement() { 
6426          return this.field != null && !this.field.isEmpty();
6427        }
6428
6429        public boolean hasField() { 
6430          return this.field != null && !this.field.isEmpty();
6431        }
6432
6433        /**
6434         * @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
6435         */
6436        public SetupActionOperationRequestHeaderComponent setFieldElement(StringType value) { 
6437          this.field = value;
6438          return this;
6439        }
6440
6441        /**
6442         * @return The HTTP header field e.g. "Accept".
6443         */
6444        public String getField() { 
6445          return this.field == null ? null : this.field.getValue();
6446        }
6447
6448        /**
6449         * @param value The HTTP header field e.g. "Accept".
6450         */
6451        public SetupActionOperationRequestHeaderComponent setField(String value) { 
6452            if (this.field == null)
6453              this.field = new StringType();
6454            this.field.setValue(value);
6455          return this;
6456        }
6457
6458        /**
6459         * @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
6460         */
6461        public StringType getValueElement() { 
6462          if (this.value == null)
6463            if (Configuration.errorOnAutoCreate())
6464              throw new Error("Attempt to auto-create SetupActionOperationRequestHeaderComponent.value");
6465            else if (Configuration.doAutoCreate())
6466              this.value = new StringType(); // bb
6467          return this.value;
6468        }
6469
6470        public boolean hasValueElement() { 
6471          return this.value != null && !this.value.isEmpty();
6472        }
6473
6474        public boolean hasValue() { 
6475          return this.value != null && !this.value.isEmpty();
6476        }
6477
6478        /**
6479         * @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
6480         */
6481        public SetupActionOperationRequestHeaderComponent setValueElement(StringType value) { 
6482          this.value = value;
6483          return this;
6484        }
6485
6486        /**
6487         * @return The value of the header e.g. "application/fhir+xml".
6488         */
6489        public String getValue() { 
6490          return this.value == null ? null : this.value.getValue();
6491        }
6492
6493        /**
6494         * @param value The value of the header e.g. "application/fhir+xml".
6495         */
6496        public SetupActionOperationRequestHeaderComponent setValue(String value) { 
6497            if (this.value == null)
6498              this.value = new StringType();
6499            this.value.setValue(value);
6500          return this;
6501        }
6502
6503        protected void listChildren(List<Property> children) {
6504          super.listChildren(children);
6505          children.add(new Property("field", "string", "The HTTP header field e.g. \"Accept\".", 0, 1, field));
6506          children.add(new Property("value", "string", "The value of the header e.g. \"application/fhir+xml\".", 0, 1, value));
6507        }
6508
6509        @Override
6510        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
6511          switch (_hash) {
6512          case 97427706: /*field*/  return new Property("field", "string", "The HTTP header field e.g. \"Accept\".", 0, 1, field);
6513          case 111972721: /*value*/  return new Property("value", "string", "The value of the header e.g. \"application/fhir+xml\".", 0, 1, value);
6514          default: return super.getNamedProperty(_hash, _name, _checkValid);
6515          }
6516
6517        }
6518
6519      @Override
6520      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
6521        switch (hash) {
6522        case 97427706: /*field*/ return this.field == null ? new Base[0] : new Base[] {this.field}; // StringType
6523        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType
6524        default: return super.getProperty(hash, name, checkValid);
6525        }
6526
6527      }
6528
6529      @Override
6530      public Base setProperty(int hash, String name, Base value) throws FHIRException {
6531        switch (hash) {
6532        case 97427706: // field
6533          this.field = castToString(value); // StringType
6534          return value;
6535        case 111972721: // value
6536          this.value = castToString(value); // StringType
6537          return value;
6538        default: return super.setProperty(hash, name, value);
6539        }
6540
6541      }
6542
6543      @Override
6544      public Base setProperty(String name, Base value) throws FHIRException {
6545        if (name.equals("field")) {
6546          this.field = castToString(value); // StringType
6547        } else if (name.equals("value")) {
6548          this.value = castToString(value); // StringType
6549        } else
6550          return super.setProperty(name, value);
6551        return value;
6552      }
6553
6554      @Override
6555      public Base makeProperty(int hash, String name) throws FHIRException {
6556        switch (hash) {
6557        case 97427706:  return getFieldElement();
6558        case 111972721:  return getValueElement();
6559        default: return super.makeProperty(hash, name);
6560        }
6561
6562      }
6563
6564      @Override
6565      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
6566        switch (hash) {
6567        case 97427706: /*field*/ return new String[] {"string"};
6568        case 111972721: /*value*/ return new String[] {"string"};
6569        default: return super.getTypesForProperty(hash, name);
6570        }
6571
6572      }
6573
6574      @Override
6575      public Base addChild(String name) throws FHIRException {
6576        if (name.equals("field")) {
6577          throw new FHIRException("Cannot call addChild on a singleton property TestScript.field");
6578        }
6579        else if (name.equals("value")) {
6580          throw new FHIRException("Cannot call addChild on a singleton property TestScript.value");
6581        }
6582        else
6583          return super.addChild(name);
6584      }
6585
6586      public SetupActionOperationRequestHeaderComponent copy() {
6587        SetupActionOperationRequestHeaderComponent dst = new SetupActionOperationRequestHeaderComponent();
6588        copyValues(dst);
6589        dst.field = field == null ? null : field.copy();
6590        dst.value = value == null ? null : value.copy();
6591        return dst;
6592      }
6593
6594      @Override
6595      public boolean equalsDeep(Base other_) {
6596        if (!super.equalsDeep(other_))
6597          return false;
6598        if (!(other_ instanceof SetupActionOperationRequestHeaderComponent))
6599          return false;
6600        SetupActionOperationRequestHeaderComponent o = (SetupActionOperationRequestHeaderComponent) other_;
6601        return compareDeep(field, o.field, true) && compareDeep(value, o.value, true);
6602      }
6603
6604      @Override
6605      public boolean equalsShallow(Base other_) {
6606        if (!super.equalsShallow(other_))
6607          return false;
6608        if (!(other_ instanceof SetupActionOperationRequestHeaderComponent))
6609          return false;
6610        SetupActionOperationRequestHeaderComponent o = (SetupActionOperationRequestHeaderComponent) other_;
6611        return compareValues(field, o.field, true) && compareValues(value, o.value, true);
6612      }
6613
6614      public boolean isEmpty() {
6615        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(field, value);
6616      }
6617
6618  public String fhirType() {
6619    return "TestScript.setup.action.operation.requestHeader";
6620
6621  }
6622
6623  }
6624
6625    @Block()
6626    public static class SetupActionAssertComponent extends BackboneElement implements IBaseBackboneElement {
6627        /**
6628         * The label would be used for tracking/logging purposes by test engines.
6629         */
6630        @Child(name = "label", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
6631        @Description(shortDefinition="Tracking/logging assertion label", formalDefinition="The label would be used for tracking/logging purposes by test engines." )
6632        protected StringType label;
6633
6634        /**
6635         * The description would be used by test engines for tracking and reporting purposes.
6636         */
6637        @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
6638        @Description(shortDefinition="Tracking/reporting assertion description", formalDefinition="The description would be used by test engines for tracking and reporting purposes." )
6639        protected StringType description;
6640
6641        /**
6642         * The direction to use for the assertion.
6643         */
6644        @Child(name = "direction", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=false)
6645        @Description(shortDefinition="response | request", formalDefinition="The direction to use for the assertion." )
6646        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/assert-direction-codes")
6647        protected Enumeration<AssertionDirectionType> direction;
6648
6649        /**
6650         * Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition.
6651         */
6652        @Child(name = "compareToSourceId", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
6653        @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." )
6654        protected StringType compareToSourceId;
6655
6656        /**
6657         * The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.
6658         */
6659        @Child(name = "compareToSourceExpression", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
6660        @Description(shortDefinition="The fluentpath expression to evaluate against the source fixture", formalDefinition="The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both." )
6661        protected StringType compareToSourceExpression;
6662
6663        /**
6664         * XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.
6665         */
6666        @Child(name = "compareToSourcePath", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false)
6667        @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." )
6668        protected StringType compareToSourcePath;
6669
6670        /**
6671         * The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.
6672         */
6673        @Child(name = "contentType", type = {CodeType.class}, order=7, min=0, max=1, modifier=false, summary=false)
6674        @Description(shortDefinition="xml | json | ttl | none", formalDefinition="The content-type or mime-type to use for RESTful operation in the 'Content-Type' header." )
6675        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/content-type")
6676        protected Enumeration<ContentType> contentType;
6677
6678        /**
6679         * The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.
6680         */
6681        @Child(name = "expression", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false)
6682        @Description(shortDefinition="The fluentpath expression to be evaluated", formalDefinition="The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload." )
6683        protected StringType expression;
6684
6685        /**
6686         * The HTTP header field name e.g. 'Location'.
6687         */
6688        @Child(name = "headerField", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false)
6689        @Description(shortDefinition="HTTP header field name", formalDefinition="The HTTP header field name e.g. 'Location'." )
6690        protected StringType headerField;
6691
6692        /**
6693         * The ID of a fixture.  Asserts that the response contains at a minimum the fixture specified by minimumId.
6694         */
6695        @Child(name = "minimumId", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false)
6696        @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." )
6697        protected StringType minimumId;
6698
6699        /**
6700         * Whether or not the test execution performs validation on the bundle navigation links.
6701         */
6702        @Child(name = "navigationLinks", type = {BooleanType.class}, order=11, min=0, max=1, modifier=false, summary=false)
6703        @Description(shortDefinition="Perform validation on navigation links?", formalDefinition="Whether or not the test execution performs validation on the bundle navigation links." )
6704        protected BooleanType navigationLinks;
6705
6706        /**
6707         * The operator type defines the conditional behavior of the assert. If not defined, the default is equals.
6708         */
6709        @Child(name = "operator", type = {CodeType.class}, order=12, min=0, max=1, modifier=false, summary=false)
6710        @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." )
6711        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/assert-operator-codes")
6712        protected Enumeration<AssertionOperatorType> operator;
6713
6714        /**
6715         * The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.
6716         */
6717        @Child(name = "path", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=false)
6718        @Description(shortDefinition="XPath or JSONPath expression", formalDefinition="The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server." )
6719        protected StringType path;
6720
6721        /**
6722         * The request method or HTTP operation code to compare against that used by the client system under test.
6723         */
6724        @Child(name = "requestMethod", type = {CodeType.class}, order=14, min=0, max=1, modifier=false, summary=false)
6725        @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." )
6726        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/http-operations")
6727        protected Enumeration<TestScriptRequestMethodCode> requestMethod;
6728
6729        /**
6730         * The value to use in a comparison against the request URL path string.
6731         */
6732        @Child(name = "requestURL", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=false)
6733        @Description(shortDefinition="Request URL comparison value", formalDefinition="The value to use in a comparison against the request URL path string." )
6734        protected StringType requestURL;
6735
6736        /**
6737         * The type of the resource.  See http://build.fhir.org/resourcelist.html.
6738         */
6739        @Child(name = "resource", type = {CodeType.class}, order=16, min=0, max=1, modifier=false, summary=false)
6740        @Description(shortDefinition="Resource type", formalDefinition="The type of the resource.  See http://build.fhir.org/resourcelist.html." )
6741        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/defined-types")
6742        protected CodeType resource;
6743
6744        /**
6745         * okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.
6746         */
6747        @Child(name = "response", type = {CodeType.class}, order=17, min=0, max=1, modifier=false, summary=false)
6748        @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." )
6749        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/assert-response-code-types")
6750        protected Enumeration<AssertionResponseTypes> response;
6751
6752        /**
6753         * The value of the HTTP response code to be tested.
6754         */
6755        @Child(name = "responseCode", type = {StringType.class}, order=18, min=0, max=1, modifier=false, summary=false)
6756        @Description(shortDefinition="HTTP response code to test", formalDefinition="The value of the HTTP response code to be tested." )
6757        protected StringType responseCode;
6758
6759        /**
6760         * The TestScript.rule this assert will evaluate.
6761         */
6762        @Child(name = "rule", type = {}, order=19, min=0, max=1, modifier=false, summary=false)
6763        @Description(shortDefinition="The reference to a TestScript.rule", formalDefinition="The TestScript.rule this assert will evaluate." )
6764        protected ActionAssertRuleComponent rule;
6765
6766        /**
6767         * The TestScript.ruleset this assert will evaluate.
6768         */
6769        @Child(name = "ruleset", type = {}, order=20, min=0, max=1, modifier=false, summary=false)
6770        @Description(shortDefinition="The reference to a TestScript.ruleset", formalDefinition="The TestScript.ruleset this assert will evaluate." )
6771        protected ActionAssertRulesetComponent ruleset;
6772
6773        /**
6774         * Fixture to evaluate the XPath/JSONPath expression or the headerField  against.
6775         */
6776        @Child(name = "sourceId", type = {IdType.class}, order=21, min=0, max=1, modifier=false, summary=false)
6777        @Description(shortDefinition="Fixture Id of source expression or headerField", formalDefinition="Fixture to evaluate the XPath/JSONPath expression or the headerField  against." )
6778        protected IdType sourceId;
6779
6780        /**
6781         * The ID of the Profile to validate against.
6782         */
6783        @Child(name = "validateProfileId", type = {IdType.class}, order=22, min=0, max=1, modifier=false, summary=false)
6784        @Description(shortDefinition="Profile Id of validation profile reference", formalDefinition="The ID of the Profile to validate against." )
6785        protected IdType validateProfileId;
6786
6787        /**
6788         * The value to compare to.
6789         */
6790        @Child(name = "value", type = {StringType.class}, order=23, min=0, max=1, modifier=false, summary=false)
6791        @Description(shortDefinition="The value to compare to", formalDefinition="The value to compare to." )
6792        protected StringType value;
6793
6794        /**
6795         * Whether or not the test execution will produce a warning only on error for this assert.
6796         */
6797        @Child(name = "warningOnly", type = {BooleanType.class}, order=24, min=0, max=1, modifier=false, summary=false)
6798        @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." )
6799        protected BooleanType warningOnly;
6800
6801        private static final long serialVersionUID = 171718507L;
6802
6803    /**
6804     * Constructor
6805     */
6806      public SetupActionAssertComponent() {
6807        super();
6808      }
6809
6810        /**
6811         * @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
6812         */
6813        public StringType getLabelElement() { 
6814          if (this.label == null)
6815            if (Configuration.errorOnAutoCreate())
6816              throw new Error("Attempt to auto-create SetupActionAssertComponent.label");
6817            else if (Configuration.doAutoCreate())
6818              this.label = new StringType(); // bb
6819          return this.label;
6820        }
6821
6822        public boolean hasLabelElement() { 
6823          return this.label != null && !this.label.isEmpty();
6824        }
6825
6826        public boolean hasLabel() { 
6827          return this.label != null && !this.label.isEmpty();
6828        }
6829
6830        /**
6831         * @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
6832         */
6833        public SetupActionAssertComponent setLabelElement(StringType value) { 
6834          this.label = value;
6835          return this;
6836        }
6837
6838        /**
6839         * @return The label would be used for tracking/logging purposes by test engines.
6840         */
6841        public String getLabel() { 
6842          return this.label == null ? null : this.label.getValue();
6843        }
6844
6845        /**
6846         * @param value The label would be used for tracking/logging purposes by test engines.
6847         */
6848        public SetupActionAssertComponent setLabel(String value) { 
6849          if (Utilities.noString(value))
6850            this.label = null;
6851          else {
6852            if (this.label == null)
6853              this.label = new StringType();
6854            this.label.setValue(value);
6855          }
6856          return this;
6857        }
6858
6859        /**
6860         * @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
6861         */
6862        public StringType getDescriptionElement() { 
6863          if (this.description == null)
6864            if (Configuration.errorOnAutoCreate())
6865              throw new Error("Attempt to auto-create SetupActionAssertComponent.description");
6866            else if (Configuration.doAutoCreate())
6867              this.description = new StringType(); // bb
6868          return this.description;
6869        }
6870
6871        public boolean hasDescriptionElement() { 
6872          return this.description != null && !this.description.isEmpty();
6873        }
6874
6875        public boolean hasDescription() { 
6876          return this.description != null && !this.description.isEmpty();
6877        }
6878
6879        /**
6880         * @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
6881         */
6882        public SetupActionAssertComponent setDescriptionElement(StringType value) { 
6883          this.description = value;
6884          return this;
6885        }
6886
6887        /**
6888         * @return The description would be used by test engines for tracking and reporting purposes.
6889         */
6890        public String getDescription() { 
6891          return this.description == null ? null : this.description.getValue();
6892        }
6893
6894        /**
6895         * @param value The description would be used by test engines for tracking and reporting purposes.
6896         */
6897        public SetupActionAssertComponent setDescription(String value) { 
6898          if (Utilities.noString(value))
6899            this.description = null;
6900          else {
6901            if (this.description == null)
6902              this.description = new StringType();
6903            this.description.setValue(value);
6904          }
6905          return this;
6906        }
6907
6908        /**
6909         * @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
6910         */
6911        public Enumeration<AssertionDirectionType> getDirectionElement() { 
6912          if (this.direction == null)
6913            if (Configuration.errorOnAutoCreate())
6914              throw new Error("Attempt to auto-create SetupActionAssertComponent.direction");
6915            else if (Configuration.doAutoCreate())
6916              this.direction = new Enumeration<AssertionDirectionType>(new AssertionDirectionTypeEnumFactory()); // bb
6917          return this.direction;
6918        }
6919
6920        public boolean hasDirectionElement() { 
6921          return this.direction != null && !this.direction.isEmpty();
6922        }
6923
6924        public boolean hasDirection() { 
6925          return this.direction != null && !this.direction.isEmpty();
6926        }
6927
6928        /**
6929         * @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
6930         */
6931        public SetupActionAssertComponent setDirectionElement(Enumeration<AssertionDirectionType> value) { 
6932          this.direction = value;
6933          return this;
6934        }
6935
6936        /**
6937         * @return The direction to use for the assertion.
6938         */
6939        public AssertionDirectionType getDirection() { 
6940          return this.direction == null ? null : this.direction.getValue();
6941        }
6942
6943        /**
6944         * @param value The direction to use for the assertion.
6945         */
6946        public SetupActionAssertComponent setDirection(AssertionDirectionType value) { 
6947          if (value == null)
6948            this.direction = null;
6949          else {
6950            if (this.direction == null)
6951              this.direction = new Enumeration<AssertionDirectionType>(new AssertionDirectionTypeEnumFactory());
6952            this.direction.setValue(value);
6953          }
6954          return this;
6955        }
6956
6957        /**
6958         * @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
6959         */
6960        public StringType getCompareToSourceIdElement() { 
6961          if (this.compareToSourceId == null)
6962            if (Configuration.errorOnAutoCreate())
6963              throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourceId");
6964            else if (Configuration.doAutoCreate())
6965              this.compareToSourceId = new StringType(); // bb
6966          return this.compareToSourceId;
6967        }
6968
6969        public boolean hasCompareToSourceIdElement() { 
6970          return this.compareToSourceId != null && !this.compareToSourceId.isEmpty();
6971        }
6972
6973        public boolean hasCompareToSourceId() { 
6974          return this.compareToSourceId != null && !this.compareToSourceId.isEmpty();
6975        }
6976
6977        /**
6978         * @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
6979         */
6980        public SetupActionAssertComponent setCompareToSourceIdElement(StringType value) { 
6981          this.compareToSourceId = value;
6982          return this;
6983        }
6984
6985        /**
6986         * @return Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition.
6987         */
6988        public String getCompareToSourceId() { 
6989          return this.compareToSourceId == null ? null : this.compareToSourceId.getValue();
6990        }
6991
6992        /**
6993         * @param value Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition.
6994         */
6995        public SetupActionAssertComponent setCompareToSourceId(String value) { 
6996          if (Utilities.noString(value))
6997            this.compareToSourceId = null;
6998          else {
6999            if (this.compareToSourceId == null)
7000              this.compareToSourceId = new StringType();
7001            this.compareToSourceId.setValue(value);
7002          }
7003          return this;
7004        }
7005
7006        /**
7007         * @return {@link #compareToSourceExpression} (The fluentpath 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
7008         */
7009        public StringType getCompareToSourceExpressionElement() { 
7010          if (this.compareToSourceExpression == null)
7011            if (Configuration.errorOnAutoCreate())
7012              throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourceExpression");
7013            else if (Configuration.doAutoCreate())
7014              this.compareToSourceExpression = new StringType(); // bb
7015          return this.compareToSourceExpression;
7016        }
7017
7018        public boolean hasCompareToSourceExpressionElement() { 
7019          return this.compareToSourceExpression != null && !this.compareToSourceExpression.isEmpty();
7020        }
7021
7022        public boolean hasCompareToSourceExpression() { 
7023          return this.compareToSourceExpression != null && !this.compareToSourceExpression.isEmpty();
7024        }
7025
7026        /**
7027         * @param value {@link #compareToSourceExpression} (The fluentpath 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
7028         */
7029        public SetupActionAssertComponent setCompareToSourceExpressionElement(StringType value) { 
7030          this.compareToSourceExpression = value;
7031          return this;
7032        }
7033
7034        /**
7035         * @return The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.
7036         */
7037        public String getCompareToSourceExpression() { 
7038          return this.compareToSourceExpression == null ? null : this.compareToSourceExpression.getValue();
7039        }
7040
7041        /**
7042         * @param value The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.
7043         */
7044        public SetupActionAssertComponent setCompareToSourceExpression(String value) { 
7045          if (Utilities.noString(value))
7046            this.compareToSourceExpression = null;
7047          else {
7048            if (this.compareToSourceExpression == null)
7049              this.compareToSourceExpression = new StringType();
7050            this.compareToSourceExpression.setValue(value);
7051          }
7052          return this;
7053        }
7054
7055        /**
7056         * @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
7057         */
7058        public StringType getCompareToSourcePathElement() { 
7059          if (this.compareToSourcePath == null)
7060            if (Configuration.errorOnAutoCreate())
7061              throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourcePath");
7062            else if (Configuration.doAutoCreate())
7063              this.compareToSourcePath = new StringType(); // bb
7064          return this.compareToSourcePath;
7065        }
7066
7067        public boolean hasCompareToSourcePathElement() { 
7068          return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty();
7069        }
7070
7071        public boolean hasCompareToSourcePath() { 
7072          return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty();
7073        }
7074
7075        /**
7076         * @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
7077         */
7078        public SetupActionAssertComponent setCompareToSourcePathElement(StringType value) { 
7079          this.compareToSourcePath = value;
7080          return this;
7081        }
7082
7083        /**
7084         * @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.
7085         */
7086        public String getCompareToSourcePath() { 
7087          return this.compareToSourcePath == null ? null : this.compareToSourcePath.getValue();
7088        }
7089
7090        /**
7091         * @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.
7092         */
7093        public SetupActionAssertComponent setCompareToSourcePath(String value) { 
7094          if (Utilities.noString(value))
7095            this.compareToSourcePath = null;
7096          else {
7097            if (this.compareToSourcePath == null)
7098              this.compareToSourcePath = new StringType();
7099            this.compareToSourcePath.setValue(value);
7100          }
7101          return this;
7102        }
7103
7104        /**
7105         * @return {@link #contentType} (The content-type or 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
7106         */
7107        public Enumeration<ContentType> getContentTypeElement() { 
7108          if (this.contentType == null)
7109            if (Configuration.errorOnAutoCreate())
7110              throw new Error("Attempt to auto-create SetupActionAssertComponent.contentType");
7111            else if (Configuration.doAutoCreate())
7112              this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory()); // bb
7113          return this.contentType;
7114        }
7115
7116        public boolean hasContentTypeElement() { 
7117          return this.contentType != null && !this.contentType.isEmpty();
7118        }
7119
7120        public boolean hasContentType() { 
7121          return this.contentType != null && !this.contentType.isEmpty();
7122        }
7123
7124        /**
7125         * @param value {@link #contentType} (The content-type or 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
7126         */
7127        public SetupActionAssertComponent setContentTypeElement(Enumeration<ContentType> value) { 
7128          this.contentType = value;
7129          return this;
7130        }
7131
7132        /**
7133         * @return The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.
7134         */
7135        public ContentType getContentType() { 
7136          return this.contentType == null ? null : this.contentType.getValue();
7137        }
7138
7139        /**
7140         * @param value The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.
7141         */
7142        public SetupActionAssertComponent setContentType(ContentType value) { 
7143          if (value == null)
7144            this.contentType = null;
7145          else {
7146            if (this.contentType == null)
7147              this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory());
7148            this.contentType.setValue(value);
7149          }
7150          return this;
7151        }
7152
7153        /**
7154         * @return {@link #expression} (The fluentpath 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
7155         */
7156        public StringType getExpressionElement() { 
7157          if (this.expression == null)
7158            if (Configuration.errorOnAutoCreate())
7159              throw new Error("Attempt to auto-create SetupActionAssertComponent.expression");
7160            else if (Configuration.doAutoCreate())
7161              this.expression = new StringType(); // bb
7162          return this.expression;
7163        }
7164
7165        public boolean hasExpressionElement() { 
7166          return this.expression != null && !this.expression.isEmpty();
7167        }
7168
7169        public boolean hasExpression() { 
7170          return this.expression != null && !this.expression.isEmpty();
7171        }
7172
7173        /**
7174         * @param value {@link #expression} (The fluentpath 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
7175         */
7176        public SetupActionAssertComponent setExpressionElement(StringType value) { 
7177          this.expression = value;
7178          return this;
7179        }
7180
7181        /**
7182         * @return The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.
7183         */
7184        public String getExpression() { 
7185          return this.expression == null ? null : this.expression.getValue();
7186        }
7187
7188        /**
7189         * @param value The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.
7190         */
7191        public SetupActionAssertComponent setExpression(String value) { 
7192          if (Utilities.noString(value))
7193            this.expression = null;
7194          else {
7195            if (this.expression == null)
7196              this.expression = new StringType();
7197            this.expression.setValue(value);
7198          }
7199          return this;
7200        }
7201
7202        /**
7203         * @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
7204         */
7205        public StringType getHeaderFieldElement() { 
7206          if (this.headerField == null)
7207            if (Configuration.errorOnAutoCreate())
7208              throw new Error("Attempt to auto-create SetupActionAssertComponent.headerField");
7209            else if (Configuration.doAutoCreate())
7210              this.headerField = new StringType(); // bb
7211          return this.headerField;
7212        }
7213
7214        public boolean hasHeaderFieldElement() { 
7215          return this.headerField != null && !this.headerField.isEmpty();
7216        }
7217
7218        public boolean hasHeaderField() { 
7219          return this.headerField != null && !this.headerField.isEmpty();
7220        }
7221
7222        /**
7223         * @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
7224         */
7225        public SetupActionAssertComponent setHeaderFieldElement(StringType value) { 
7226          this.headerField = value;
7227          return this;
7228        }
7229
7230        /**
7231         * @return The HTTP header field name e.g. 'Location'.
7232         */
7233        public String getHeaderField() { 
7234          return this.headerField == null ? null : this.headerField.getValue();
7235        }
7236
7237        /**
7238         * @param value The HTTP header field name e.g. 'Location'.
7239         */
7240        public SetupActionAssertComponent setHeaderField(String value) { 
7241          if (Utilities.noString(value))
7242            this.headerField = null;
7243          else {
7244            if (this.headerField == null)
7245              this.headerField = new StringType();
7246            this.headerField.setValue(value);
7247          }
7248          return this;
7249        }
7250
7251        /**
7252         * @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
7253         */
7254        public StringType getMinimumIdElement() { 
7255          if (this.minimumId == null)
7256            if (Configuration.errorOnAutoCreate())
7257              throw new Error("Attempt to auto-create SetupActionAssertComponent.minimumId");
7258            else if (Configuration.doAutoCreate())
7259              this.minimumId = new StringType(); // bb
7260          return this.minimumId;
7261        }
7262
7263        public boolean hasMinimumIdElement() { 
7264          return this.minimumId != null && !this.minimumId.isEmpty();
7265        }
7266
7267        public boolean hasMinimumId() { 
7268          return this.minimumId != null && !this.minimumId.isEmpty();
7269        }
7270
7271        /**
7272         * @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
7273         */
7274        public SetupActionAssertComponent setMinimumIdElement(StringType value) { 
7275          this.minimumId = value;
7276          return this;
7277        }
7278
7279        /**
7280         * @return The ID of a fixture.  Asserts that the response contains at a minimum the fixture specified by minimumId.
7281         */
7282        public String getMinimumId() { 
7283          return this.minimumId == null ? null : this.minimumId.getValue();
7284        }
7285
7286        /**
7287         * @param value The ID of a fixture.  Asserts that the response contains at a minimum the fixture specified by minimumId.
7288         */
7289        public SetupActionAssertComponent setMinimumId(String value) { 
7290          if (Utilities.noString(value))
7291            this.minimumId = null;
7292          else {
7293            if (this.minimumId == null)
7294              this.minimumId = new StringType();
7295            this.minimumId.setValue(value);
7296          }
7297          return this;
7298        }
7299
7300        /**
7301         * @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
7302         */
7303        public BooleanType getNavigationLinksElement() { 
7304          if (this.navigationLinks == null)
7305            if (Configuration.errorOnAutoCreate())
7306              throw new Error("Attempt to auto-create SetupActionAssertComponent.navigationLinks");
7307            else if (Configuration.doAutoCreate())
7308              this.navigationLinks = new BooleanType(); // bb
7309          return this.navigationLinks;
7310        }
7311
7312        public boolean hasNavigationLinksElement() { 
7313          return this.navigationLinks != null && !this.navigationLinks.isEmpty();
7314        }
7315
7316        public boolean hasNavigationLinks() { 
7317          return this.navigationLinks != null && !this.navigationLinks.isEmpty();
7318        }
7319
7320        /**
7321         * @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
7322         */
7323        public SetupActionAssertComponent setNavigationLinksElement(BooleanType value) { 
7324          this.navigationLinks = value;
7325          return this;
7326        }
7327
7328        /**
7329         * @return Whether or not the test execution performs validation on the bundle navigation links.
7330         */
7331        public boolean getNavigationLinks() { 
7332          return this.navigationLinks == null || this.navigationLinks.isEmpty() ? false : this.navigationLinks.getValue();
7333        }
7334
7335        /**
7336         * @param value Whether or not the test execution performs validation on the bundle navigation links.
7337         */
7338        public SetupActionAssertComponent setNavigationLinks(boolean value) { 
7339            if (this.navigationLinks == null)
7340              this.navigationLinks = new BooleanType();
7341            this.navigationLinks.setValue(value);
7342          return this;
7343        }
7344
7345        /**
7346         * @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
7347         */
7348        public Enumeration<AssertionOperatorType> getOperatorElement() { 
7349          if (this.operator == null)
7350            if (Configuration.errorOnAutoCreate())
7351              throw new Error("Attempt to auto-create SetupActionAssertComponent.operator");
7352            else if (Configuration.doAutoCreate())
7353              this.operator = new Enumeration<AssertionOperatorType>(new AssertionOperatorTypeEnumFactory()); // bb
7354          return this.operator;
7355        }
7356
7357        public boolean hasOperatorElement() { 
7358          return this.operator != null && !this.operator.isEmpty();
7359        }
7360
7361        public boolean hasOperator() { 
7362          return this.operator != null && !this.operator.isEmpty();
7363        }
7364
7365        /**
7366         * @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
7367         */
7368        public SetupActionAssertComponent setOperatorElement(Enumeration<AssertionOperatorType> value) { 
7369          this.operator = value;
7370          return this;
7371        }
7372
7373        /**
7374         * @return The operator type defines the conditional behavior of the assert. If not defined, the default is equals.
7375         */
7376        public AssertionOperatorType getOperator() { 
7377          return this.operator == null ? null : this.operator.getValue();
7378        }
7379
7380        /**
7381         * @param value The operator type defines the conditional behavior of the assert. If not defined, the default is equals.
7382         */
7383        public SetupActionAssertComponent setOperator(AssertionOperatorType value) { 
7384          if (value == null)
7385            this.operator = null;
7386          else {
7387            if (this.operator == null)
7388              this.operator = new Enumeration<AssertionOperatorType>(new AssertionOperatorTypeEnumFactory());
7389            this.operator.setValue(value);
7390          }
7391          return this;
7392        }
7393
7394        /**
7395         * @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
7396         */
7397        public StringType getPathElement() { 
7398          if (this.path == null)
7399            if (Configuration.errorOnAutoCreate())
7400              throw new Error("Attempt to auto-create SetupActionAssertComponent.path");
7401            else if (Configuration.doAutoCreate())
7402              this.path = new StringType(); // bb
7403          return this.path;
7404        }
7405
7406        public boolean hasPathElement() { 
7407          return this.path != null && !this.path.isEmpty();
7408        }
7409
7410        public boolean hasPath() { 
7411          return this.path != null && !this.path.isEmpty();
7412        }
7413
7414        /**
7415         * @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
7416         */
7417        public SetupActionAssertComponent setPathElement(StringType value) { 
7418          this.path = value;
7419          return this;
7420        }
7421
7422        /**
7423         * @return The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.
7424         */
7425        public String getPath() { 
7426          return this.path == null ? null : this.path.getValue();
7427        }
7428
7429        /**
7430         * @param value The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.
7431         */
7432        public SetupActionAssertComponent setPath(String value) { 
7433          if (Utilities.noString(value))
7434            this.path = null;
7435          else {
7436            if (this.path == null)
7437              this.path = new StringType();
7438            this.path.setValue(value);
7439          }
7440          return this;
7441        }
7442
7443        /**
7444         * @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
7445         */
7446        public Enumeration<TestScriptRequestMethodCode> getRequestMethodElement() { 
7447          if (this.requestMethod == null)
7448            if (Configuration.errorOnAutoCreate())
7449              throw new Error("Attempt to auto-create SetupActionAssertComponent.requestMethod");
7450            else if (Configuration.doAutoCreate())
7451              this.requestMethod = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory()); // bb
7452          return this.requestMethod;
7453        }
7454
7455        public boolean hasRequestMethodElement() { 
7456          return this.requestMethod != null && !this.requestMethod.isEmpty();
7457        }
7458
7459        public boolean hasRequestMethod() { 
7460          return this.requestMethod != null && !this.requestMethod.isEmpty();
7461        }
7462
7463        /**
7464         * @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
7465         */
7466        public SetupActionAssertComponent setRequestMethodElement(Enumeration<TestScriptRequestMethodCode> value) { 
7467          this.requestMethod = value;
7468          return this;
7469        }
7470
7471        /**
7472         * @return The request method or HTTP operation code to compare against that used by the client system under test.
7473         */
7474        public TestScriptRequestMethodCode getRequestMethod() { 
7475          return this.requestMethod == null ? null : this.requestMethod.getValue();
7476        }
7477
7478        /**
7479         * @param value The request method or HTTP operation code to compare against that used by the client system under test.
7480         */
7481        public SetupActionAssertComponent setRequestMethod(TestScriptRequestMethodCode value) { 
7482          if (value == null)
7483            this.requestMethod = null;
7484          else {
7485            if (this.requestMethod == null)
7486              this.requestMethod = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory());
7487            this.requestMethod.setValue(value);
7488          }
7489          return this;
7490        }
7491
7492        /**
7493         * @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
7494         */
7495        public StringType getRequestURLElement() { 
7496          if (this.requestURL == null)
7497            if (Configuration.errorOnAutoCreate())
7498              throw new Error("Attempt to auto-create SetupActionAssertComponent.requestURL");
7499            else if (Configuration.doAutoCreate())
7500              this.requestURL = new StringType(); // bb
7501          return this.requestURL;
7502        }
7503
7504        public boolean hasRequestURLElement() { 
7505          return this.requestURL != null && !this.requestURL.isEmpty();
7506        }
7507
7508        public boolean hasRequestURL() { 
7509          return this.requestURL != null && !this.requestURL.isEmpty();
7510        }
7511
7512        /**
7513         * @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
7514         */
7515        public SetupActionAssertComponent setRequestURLElement(StringType value) { 
7516          this.requestURL = value;
7517          return this;
7518        }
7519
7520        /**
7521         * @return The value to use in a comparison against the request URL path string.
7522         */
7523        public String getRequestURL() { 
7524          return this.requestURL == null ? null : this.requestURL.getValue();
7525        }
7526
7527        /**
7528         * @param value The value to use in a comparison against the request URL path string.
7529         */
7530        public SetupActionAssertComponent setRequestURL(String value) { 
7531          if (Utilities.noString(value))
7532            this.requestURL = null;
7533          else {
7534            if (this.requestURL == null)
7535              this.requestURL = new StringType();
7536            this.requestURL.setValue(value);
7537          }
7538          return this;
7539        }
7540
7541        /**
7542         * @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
7543         */
7544        public CodeType getResourceElement() { 
7545          if (this.resource == null)
7546            if (Configuration.errorOnAutoCreate())
7547              throw new Error("Attempt to auto-create SetupActionAssertComponent.resource");
7548            else if (Configuration.doAutoCreate())
7549              this.resource = new CodeType(); // bb
7550          return this.resource;
7551        }
7552
7553        public boolean hasResourceElement() { 
7554          return this.resource != null && !this.resource.isEmpty();
7555        }
7556
7557        public boolean hasResource() { 
7558          return this.resource != null && !this.resource.isEmpty();
7559        }
7560
7561        /**
7562         * @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
7563         */
7564        public SetupActionAssertComponent setResourceElement(CodeType value) { 
7565          this.resource = value;
7566          return this;
7567        }
7568
7569        /**
7570         * @return The type of the resource.  See http://build.fhir.org/resourcelist.html.
7571         */
7572        public String getResource() { 
7573          return this.resource == null ? null : this.resource.getValue();
7574        }
7575
7576        /**
7577         * @param value The type of the resource.  See http://build.fhir.org/resourcelist.html.
7578         */
7579        public SetupActionAssertComponent setResource(String value) { 
7580          if (Utilities.noString(value))
7581            this.resource = null;
7582          else {
7583            if (this.resource == null)
7584              this.resource = new CodeType();
7585            this.resource.setValue(value);
7586          }
7587          return this;
7588        }
7589
7590        /**
7591         * @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
7592         */
7593        public Enumeration<AssertionResponseTypes> getResponseElement() { 
7594          if (this.response == null)
7595            if (Configuration.errorOnAutoCreate())
7596              throw new Error("Attempt to auto-create SetupActionAssertComponent.response");
7597            else if (Configuration.doAutoCreate())
7598              this.response = new Enumeration<AssertionResponseTypes>(new AssertionResponseTypesEnumFactory()); // bb
7599          return this.response;
7600        }
7601
7602        public boolean hasResponseElement() { 
7603          return this.response != null && !this.response.isEmpty();
7604        }
7605
7606        public boolean hasResponse() { 
7607          return this.response != null && !this.response.isEmpty();
7608        }
7609
7610        /**
7611         * @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
7612         */
7613        public SetupActionAssertComponent setResponseElement(Enumeration<AssertionResponseTypes> value) { 
7614          this.response = value;
7615          return this;
7616        }
7617
7618        /**
7619         * @return okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.
7620         */
7621        public AssertionResponseTypes getResponse() { 
7622          return this.response == null ? null : this.response.getValue();
7623        }
7624
7625        /**
7626         * @param value okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.
7627         */
7628        public SetupActionAssertComponent setResponse(AssertionResponseTypes value) { 
7629          if (value == null)
7630            this.response = null;
7631          else {
7632            if (this.response == null)
7633              this.response = new Enumeration<AssertionResponseTypes>(new AssertionResponseTypesEnumFactory());
7634            this.response.setValue(value);
7635          }
7636          return this;
7637        }
7638
7639        /**
7640         * @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
7641         */
7642        public StringType getResponseCodeElement() { 
7643          if (this.responseCode == null)
7644            if (Configuration.errorOnAutoCreate())
7645              throw new Error("Attempt to auto-create SetupActionAssertComponent.responseCode");
7646            else if (Configuration.doAutoCreate())
7647              this.responseCode = new StringType(); // bb
7648          return this.responseCode;
7649        }
7650
7651        public boolean hasResponseCodeElement() { 
7652          return this.responseCode != null && !this.responseCode.isEmpty();
7653        }
7654
7655        public boolean hasResponseCode() { 
7656          return this.responseCode != null && !this.responseCode.isEmpty();
7657        }
7658
7659        /**
7660         * @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
7661         */
7662        public SetupActionAssertComponent setResponseCodeElement(StringType value) { 
7663          this.responseCode = value;
7664          return this;
7665        }
7666
7667        /**
7668         * @return The value of the HTTP response code to be tested.
7669         */
7670        public String getResponseCode() { 
7671          return this.responseCode == null ? null : this.responseCode.getValue();
7672        }
7673
7674        /**
7675         * @param value The value of the HTTP response code to be tested.
7676         */
7677        public SetupActionAssertComponent setResponseCode(String value) { 
7678          if (Utilities.noString(value))
7679            this.responseCode = null;
7680          else {
7681            if (this.responseCode == null)
7682              this.responseCode = new StringType();
7683            this.responseCode.setValue(value);
7684          }
7685          return this;
7686        }
7687
7688        /**
7689         * @return {@link #rule} (The TestScript.rule this assert will evaluate.)
7690         */
7691        public ActionAssertRuleComponent getRule() { 
7692          if (this.rule == null)
7693            if (Configuration.errorOnAutoCreate())
7694              throw new Error("Attempt to auto-create SetupActionAssertComponent.rule");
7695            else if (Configuration.doAutoCreate())
7696              this.rule = new ActionAssertRuleComponent(); // cc
7697          return this.rule;
7698        }
7699
7700        public boolean hasRule() { 
7701          return this.rule != null && !this.rule.isEmpty();
7702        }
7703
7704        /**
7705         * @param value {@link #rule} (The TestScript.rule this assert will evaluate.)
7706         */
7707        public SetupActionAssertComponent setRule(ActionAssertRuleComponent value)  { 
7708          this.rule = value;
7709          return this;
7710        }
7711
7712        /**
7713         * @return {@link #ruleset} (The TestScript.ruleset this assert will evaluate.)
7714         */
7715        public ActionAssertRulesetComponent getRuleset() { 
7716          if (this.ruleset == null)
7717            if (Configuration.errorOnAutoCreate())
7718              throw new Error("Attempt to auto-create SetupActionAssertComponent.ruleset");
7719            else if (Configuration.doAutoCreate())
7720              this.ruleset = new ActionAssertRulesetComponent(); // cc
7721          return this.ruleset;
7722        }
7723
7724        public boolean hasRuleset() { 
7725          return this.ruleset != null && !this.ruleset.isEmpty();
7726        }
7727
7728        /**
7729         * @param value {@link #ruleset} (The TestScript.ruleset this assert will evaluate.)
7730         */
7731        public SetupActionAssertComponent setRuleset(ActionAssertRulesetComponent value)  { 
7732          this.ruleset = value;
7733          return this;
7734        }
7735
7736        /**
7737         * @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
7738         */
7739        public IdType getSourceIdElement() { 
7740          if (this.sourceId == null)
7741            if (Configuration.errorOnAutoCreate())
7742              throw new Error("Attempt to auto-create SetupActionAssertComponent.sourceId");
7743            else if (Configuration.doAutoCreate())
7744              this.sourceId = new IdType(); // bb
7745          return this.sourceId;
7746        }
7747
7748        public boolean hasSourceIdElement() { 
7749          return this.sourceId != null && !this.sourceId.isEmpty();
7750        }
7751
7752        public boolean hasSourceId() { 
7753          return this.sourceId != null && !this.sourceId.isEmpty();
7754        }
7755
7756        /**
7757         * @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
7758         */
7759        public SetupActionAssertComponent setSourceIdElement(IdType value) { 
7760          this.sourceId = value;
7761          return this;
7762        }
7763
7764        /**
7765         * @return Fixture to evaluate the XPath/JSONPath expression or the headerField  against.
7766         */
7767        public String getSourceId() { 
7768          return this.sourceId == null ? null : this.sourceId.getValue();
7769        }
7770
7771        /**
7772         * @param value Fixture to evaluate the XPath/JSONPath expression or the headerField  against.
7773         */
7774        public SetupActionAssertComponent setSourceId(String value) { 
7775          if (Utilities.noString(value))
7776            this.sourceId = null;
7777          else {
7778            if (this.sourceId == null)
7779              this.sourceId = new IdType();
7780            this.sourceId.setValue(value);
7781          }
7782          return this;
7783        }
7784
7785        /**
7786         * @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
7787         */
7788        public IdType getValidateProfileIdElement() { 
7789          if (this.validateProfileId == null)
7790            if (Configuration.errorOnAutoCreate())
7791              throw new Error("Attempt to auto-create SetupActionAssertComponent.validateProfileId");
7792            else if (Configuration.doAutoCreate())
7793              this.validateProfileId = new IdType(); // bb
7794          return this.validateProfileId;
7795        }
7796
7797        public boolean hasValidateProfileIdElement() { 
7798          return this.validateProfileId != null && !this.validateProfileId.isEmpty();
7799        }
7800
7801        public boolean hasValidateProfileId() { 
7802          return this.validateProfileId != null && !this.validateProfileId.isEmpty();
7803        }
7804
7805        /**
7806         * @param value {@link #validateProfileId} (The ID of the Profile to validate against.). This is the underlying object with id, value and extensions. The accessor "getValidateProfileId" gives direct access to the value
7807         */
7808        public SetupActionAssertComponent setValidateProfileIdElement(IdType value) { 
7809          this.validateProfileId = value;
7810          return this;
7811        }
7812
7813        /**
7814         * @return The ID of the Profile to validate against.
7815         */
7816        public String getValidateProfileId() { 
7817          return this.validateProfileId == null ? null : this.validateProfileId.getValue();
7818        }
7819
7820        /**
7821         * @param value The ID of the Profile to validate against.
7822         */
7823        public SetupActionAssertComponent setValidateProfileId(String value) { 
7824          if (Utilities.noString(value))
7825            this.validateProfileId = null;
7826          else {
7827            if (this.validateProfileId == null)
7828              this.validateProfileId = new IdType();
7829            this.validateProfileId.setValue(value);
7830          }
7831          return this;
7832        }
7833
7834        /**
7835         * @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
7836         */
7837        public StringType getValueElement() { 
7838          if (this.value == null)
7839            if (Configuration.errorOnAutoCreate())
7840              throw new Error("Attempt to auto-create SetupActionAssertComponent.value");
7841            else if (Configuration.doAutoCreate())
7842              this.value = new StringType(); // bb
7843          return this.value;
7844        }
7845
7846        public boolean hasValueElement() { 
7847          return this.value != null && !this.value.isEmpty();
7848        }
7849
7850        public boolean hasValue() { 
7851          return this.value != null && !this.value.isEmpty();
7852        }
7853
7854        /**
7855         * @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
7856         */
7857        public SetupActionAssertComponent setValueElement(StringType value) { 
7858          this.value = value;
7859          return this;
7860        }
7861
7862        /**
7863         * @return The value to compare to.
7864         */
7865        public String getValue() { 
7866          return this.value == null ? null : this.value.getValue();
7867        }
7868
7869        /**
7870         * @param value The value to compare to.
7871         */
7872        public SetupActionAssertComponent setValue(String value) { 
7873          if (Utilities.noString(value))
7874            this.value = null;
7875          else {
7876            if (this.value == null)
7877              this.value = new StringType();
7878            this.value.setValue(value);
7879          }
7880          return this;
7881        }
7882
7883        /**
7884         * @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
7885         */
7886        public BooleanType getWarningOnlyElement() { 
7887          if (this.warningOnly == null)
7888            if (Configuration.errorOnAutoCreate())
7889              throw new Error("Attempt to auto-create SetupActionAssertComponent.warningOnly");
7890            else if (Configuration.doAutoCreate())
7891              this.warningOnly = new BooleanType(); // bb
7892          return this.warningOnly;
7893        }
7894
7895        public boolean hasWarningOnlyElement() { 
7896          return this.warningOnly != null && !this.warningOnly.isEmpty();
7897        }
7898
7899        public boolean hasWarningOnly() { 
7900          return this.warningOnly != null && !this.warningOnly.isEmpty();
7901        }
7902
7903        /**
7904         * @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
7905         */
7906        public SetupActionAssertComponent setWarningOnlyElement(BooleanType value) { 
7907          this.warningOnly = value;
7908          return this;
7909        }
7910
7911        /**
7912         * @return Whether or not the test execution will produce a warning only on error for this assert.
7913         */
7914        public boolean getWarningOnly() { 
7915          return this.warningOnly == null || this.warningOnly.isEmpty() ? false : this.warningOnly.getValue();
7916        }
7917
7918        /**
7919         * @param value Whether or not the test execution will produce a warning only on error for this assert.
7920         */
7921        public SetupActionAssertComponent setWarningOnly(boolean value) { 
7922            if (this.warningOnly == null)
7923              this.warningOnly = new BooleanType();
7924            this.warningOnly.setValue(value);
7925          return this;
7926        }
7927
7928        protected void listChildren(List<Property> children) {
7929          super.listChildren(children);
7930          children.add(new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label));
7931          children.add(new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description));
7932          children.add(new Property("direction", "code", "The direction to use for the assertion.", 0, 1, direction));
7933          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));
7934          children.add(new Property("compareToSourceExpression", "string", "The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.", 0, 1, compareToSourceExpression));
7935          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));
7936          children.add(new Property("contentType", "code", "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", 0, 1, contentType));
7937          children.add(new Property("expression", "string", "The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.", 0, 1, expression));
7938          children.add(new Property("headerField", "string", "The HTTP header field name e.g. 'Location'.", 0, 1, headerField));
7939          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));
7940          children.add(new Property("navigationLinks", "boolean", "Whether or not the test execution performs validation on the bundle navigation links.", 0, 1, navigationLinks));
7941          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));
7942          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));
7943          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));
7944          children.add(new Property("requestURL", "string", "The value to use in a comparison against the request URL path string.", 0, 1, requestURL));
7945          children.add(new Property("resource", "code", "The type of the resource.  See http://build.fhir.org/resourcelist.html.", 0, 1, resource));
7946          children.add(new Property("response", "code", "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.", 0, 1, response));
7947          children.add(new Property("responseCode", "string", "The value of the HTTP response code to be tested.", 0, 1, responseCode));
7948          children.add(new Property("rule", "", "The TestScript.rule this assert will evaluate.", 0, 1, rule));
7949          children.add(new Property("ruleset", "", "The TestScript.ruleset this assert will evaluate.", 0, 1, ruleset));
7950          children.add(new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField  against.", 0, 1, sourceId));
7951          children.add(new Property("validateProfileId", "id", "The ID of the Profile to validate against.", 0, 1, validateProfileId));
7952          children.add(new Property("value", "string", "The value to compare to.", 0, 1, value));
7953          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));
7954        }
7955
7956        @Override
7957        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
7958          switch (_hash) {
7959          case 102727412: /*label*/  return new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label);
7960          case -1724546052: /*description*/  return new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description);
7961          case -962590849: /*direction*/  return new Property("direction", "code", "The direction to use for the assertion.", 0, 1, direction);
7962          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);
7963          case -1415702669: /*compareToSourceExpression*/  return new Property("compareToSourceExpression", "string", "The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.", 0, 1, compareToSourceExpression);
7964          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);
7965          case -389131437: /*contentType*/  return new Property("contentType", "code", "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", 0, 1, contentType);
7966          case -1795452264: /*expression*/  return new Property("expression", "string", "The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.", 0, 1, expression);
7967          case 1160732269: /*headerField*/  return new Property("headerField", "string", "The HTTP header field name e.g. 'Location'.", 0, 1, headerField);
7968          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);
7969          case 1001488901: /*navigationLinks*/  return new Property("navigationLinks", "boolean", "Whether or not the test execution performs validation on the bundle navigation links.", 0, 1, navigationLinks);
7970          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);
7971          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);
7972          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);
7973          case 37099616: /*requestURL*/  return new Property("requestURL", "string", "The value to use in a comparison against the request URL path string.", 0, 1, requestURL);
7974          case -341064690: /*resource*/  return new Property("resource", "code", "The type of the resource.  See http://build.fhir.org/resourcelist.html.", 0, 1, resource);
7975          case -340323263: /*response*/  return new Property("response", "code", "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.", 0, 1, response);
7976          case 1438723534: /*responseCode*/  return new Property("responseCode", "string", "The value of the HTTP response code to be tested.", 0, 1, responseCode);
7977          case 3512060: /*rule*/  return new Property("rule", "", "The TestScript.rule this assert will evaluate.", 0, 1, rule);
7978          case 1548678118: /*ruleset*/  return new Property("ruleset", "", "The TestScript.ruleset this assert will evaluate.", 0, 1, ruleset);
7979          case 1746327190: /*sourceId*/  return new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField  against.", 0, 1, sourceId);
7980          case 1555541038: /*validateProfileId*/  return new Property("validateProfileId", "id", "The ID of the Profile to validate against.", 0, 1, validateProfileId);
7981          case 111972721: /*value*/  return new Property("value", "string", "The value to compare to.", 0, 1, value);
7982          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);
7983          default: return super.getNamedProperty(_hash, _name, _checkValid);
7984          }
7985
7986        }
7987
7988      @Override
7989      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
7990        switch (hash) {
7991        case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType
7992        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
7993        case -962590849: /*direction*/ return this.direction == null ? new Base[0] : new Base[] {this.direction}; // Enumeration<AssertionDirectionType>
7994        case 2081856758: /*compareToSourceId*/ return this.compareToSourceId == null ? new Base[0] : new Base[] {this.compareToSourceId}; // StringType
7995        case -1415702669: /*compareToSourceExpression*/ return this.compareToSourceExpression == null ? new Base[0] : new Base[] {this.compareToSourceExpression}; // StringType
7996        case -790206144: /*compareToSourcePath*/ return this.compareToSourcePath == null ? new Base[0] : new Base[] {this.compareToSourcePath}; // StringType
7997        case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // Enumeration<ContentType>
7998        case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType
7999        case 1160732269: /*headerField*/ return this.headerField == null ? new Base[0] : new Base[] {this.headerField}; // StringType
8000        case 818925001: /*minimumId*/ return this.minimumId == null ? new Base[0] : new Base[] {this.minimumId}; // StringType
8001        case 1001488901: /*navigationLinks*/ return this.navigationLinks == null ? new Base[0] : new Base[] {this.navigationLinks}; // BooleanType
8002        case -500553564: /*operator*/ return this.operator == null ? new Base[0] : new Base[] {this.operator}; // Enumeration<AssertionOperatorType>
8003        case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
8004        case 1217874000: /*requestMethod*/ return this.requestMethod == null ? new Base[0] : new Base[] {this.requestMethod}; // Enumeration<TestScriptRequestMethodCode>
8005        case 37099616: /*requestURL*/ return this.requestURL == null ? new Base[0] : new Base[] {this.requestURL}; // StringType
8006        case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // CodeType
8007        case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // Enumeration<AssertionResponseTypes>
8008        case 1438723534: /*responseCode*/ return this.responseCode == null ? new Base[0] : new Base[] {this.responseCode}; // StringType
8009        case 3512060: /*rule*/ return this.rule == null ? new Base[0] : new Base[] {this.rule}; // ActionAssertRuleComponent
8010        case 1548678118: /*ruleset*/ return this.ruleset == null ? new Base[0] : new Base[] {this.ruleset}; // ActionAssertRulesetComponent
8011        case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType
8012        case 1555541038: /*validateProfileId*/ return this.validateProfileId == null ? new Base[0] : new Base[] {this.validateProfileId}; // IdType
8013        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType
8014        case -481159832: /*warningOnly*/ return this.warningOnly == null ? new Base[0] : new Base[] {this.warningOnly}; // BooleanType
8015        default: return super.getProperty(hash, name, checkValid);
8016        }
8017
8018      }
8019
8020      @Override
8021      public Base setProperty(int hash, String name, Base value) throws FHIRException {
8022        switch (hash) {
8023        case 102727412: // label
8024          this.label = castToString(value); // StringType
8025          return value;
8026        case -1724546052: // description
8027          this.description = castToString(value); // StringType
8028          return value;
8029        case -962590849: // direction
8030          value = new AssertionDirectionTypeEnumFactory().fromType(castToCode(value));
8031          this.direction = (Enumeration) value; // Enumeration<AssertionDirectionType>
8032          return value;
8033        case 2081856758: // compareToSourceId
8034          this.compareToSourceId = castToString(value); // StringType
8035          return value;
8036        case -1415702669: // compareToSourceExpression
8037          this.compareToSourceExpression = castToString(value); // StringType
8038          return value;
8039        case -790206144: // compareToSourcePath
8040          this.compareToSourcePath = castToString(value); // StringType
8041          return value;
8042        case -389131437: // contentType
8043          value = new ContentTypeEnumFactory().fromType(castToCode(value));
8044          this.contentType = (Enumeration) value; // Enumeration<ContentType>
8045          return value;
8046        case -1795452264: // expression
8047          this.expression = castToString(value); // StringType
8048          return value;
8049        case 1160732269: // headerField
8050          this.headerField = castToString(value); // StringType
8051          return value;
8052        case 818925001: // minimumId
8053          this.minimumId = castToString(value); // StringType
8054          return value;
8055        case 1001488901: // navigationLinks
8056          this.navigationLinks = castToBoolean(value); // BooleanType
8057          return value;
8058        case -500553564: // operator
8059          value = new AssertionOperatorTypeEnumFactory().fromType(castToCode(value));
8060          this.operator = (Enumeration) value; // Enumeration<AssertionOperatorType>
8061          return value;
8062        case 3433509: // path
8063          this.path = castToString(value); // StringType
8064          return value;
8065        case 1217874000: // requestMethod
8066          value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value));
8067          this.requestMethod = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode>
8068          return value;
8069        case 37099616: // requestURL
8070          this.requestURL = castToString(value); // StringType
8071          return value;
8072        case -341064690: // resource
8073          this.resource = castToCode(value); // CodeType
8074          return value;
8075        case -340323263: // response
8076          value = new AssertionResponseTypesEnumFactory().fromType(castToCode(value));
8077          this.response = (Enumeration) value; // Enumeration<AssertionResponseTypes>
8078          return value;
8079        case 1438723534: // responseCode
8080          this.responseCode = castToString(value); // StringType
8081          return value;
8082        case 3512060: // rule
8083          this.rule = (ActionAssertRuleComponent) value; // ActionAssertRuleComponent
8084          return value;
8085        case 1548678118: // ruleset
8086          this.ruleset = (ActionAssertRulesetComponent) value; // ActionAssertRulesetComponent
8087          return value;
8088        case 1746327190: // sourceId
8089          this.sourceId = castToId(value); // IdType
8090          return value;
8091        case 1555541038: // validateProfileId
8092          this.validateProfileId = castToId(value); // IdType
8093          return value;
8094        case 111972721: // value
8095          this.value = castToString(value); // StringType
8096          return value;
8097        case -481159832: // warningOnly
8098          this.warningOnly = castToBoolean(value); // BooleanType
8099          return value;
8100        default: return super.setProperty(hash, name, value);
8101        }
8102
8103      }
8104
8105      @Override
8106      public Base setProperty(String name, Base value) throws FHIRException {
8107        if (name.equals("label")) {
8108          this.label = castToString(value); // StringType
8109        } else if (name.equals("description")) {
8110          this.description = castToString(value); // StringType
8111        } else if (name.equals("direction")) {
8112          value = new AssertionDirectionTypeEnumFactory().fromType(castToCode(value));
8113          this.direction = (Enumeration) value; // Enumeration<AssertionDirectionType>
8114        } else if (name.equals("compareToSourceId")) {
8115          this.compareToSourceId = castToString(value); // StringType
8116        } else if (name.equals("compareToSourceExpression")) {
8117          this.compareToSourceExpression = castToString(value); // StringType
8118        } else if (name.equals("compareToSourcePath")) {
8119          this.compareToSourcePath = castToString(value); // StringType
8120        } else if (name.equals("contentType")) {
8121          value = new ContentTypeEnumFactory().fromType(castToCode(value));
8122          this.contentType = (Enumeration) value; // Enumeration<ContentType>
8123        } else if (name.equals("expression")) {
8124          this.expression = castToString(value); // StringType
8125        } else if (name.equals("headerField")) {
8126          this.headerField = castToString(value); // StringType
8127        } else if (name.equals("minimumId")) {
8128          this.minimumId = castToString(value); // StringType
8129        } else if (name.equals("navigationLinks")) {
8130          this.navigationLinks = castToBoolean(value); // BooleanType
8131        } else if (name.equals("operator")) {
8132          value = new AssertionOperatorTypeEnumFactory().fromType(castToCode(value));
8133          this.operator = (Enumeration) value; // Enumeration<AssertionOperatorType>
8134        } else if (name.equals("path")) {
8135          this.path = castToString(value); // StringType
8136        } else if (name.equals("requestMethod")) {
8137          value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value));
8138          this.requestMethod = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode>
8139        } else if (name.equals("requestURL")) {
8140          this.requestURL = castToString(value); // StringType
8141        } else if (name.equals("resource")) {
8142          this.resource = castToCode(value); // CodeType
8143        } else if (name.equals("response")) {
8144          value = new AssertionResponseTypesEnumFactory().fromType(castToCode(value));
8145          this.response = (Enumeration) value; // Enumeration<AssertionResponseTypes>
8146        } else if (name.equals("responseCode")) {
8147          this.responseCode = castToString(value); // StringType
8148        } else if (name.equals("rule")) {
8149          this.rule = (ActionAssertRuleComponent) value; // ActionAssertRuleComponent
8150        } else if (name.equals("ruleset")) {
8151          this.ruleset = (ActionAssertRulesetComponent) value; // ActionAssertRulesetComponent
8152        } else if (name.equals("sourceId")) {
8153          this.sourceId = castToId(value); // IdType
8154        } else if (name.equals("validateProfileId")) {
8155          this.validateProfileId = castToId(value); // IdType
8156        } else if (name.equals("value")) {
8157          this.value = castToString(value); // StringType
8158        } else if (name.equals("warningOnly")) {
8159          this.warningOnly = castToBoolean(value); // BooleanType
8160        } else
8161          return super.setProperty(name, value);
8162        return value;
8163      }
8164
8165      @Override
8166      public Base makeProperty(int hash, String name) throws FHIRException {
8167        switch (hash) {
8168        case 102727412:  return getLabelElement();
8169        case -1724546052:  return getDescriptionElement();
8170        case -962590849:  return getDirectionElement();
8171        case 2081856758:  return getCompareToSourceIdElement();
8172        case -1415702669:  return getCompareToSourceExpressionElement();
8173        case -790206144:  return getCompareToSourcePathElement();
8174        case -389131437:  return getContentTypeElement();
8175        case -1795452264:  return getExpressionElement();
8176        case 1160732269:  return getHeaderFieldElement();
8177        case 818925001:  return getMinimumIdElement();
8178        case 1001488901:  return getNavigationLinksElement();
8179        case -500553564:  return getOperatorElement();
8180        case 3433509:  return getPathElement();
8181        case 1217874000:  return getRequestMethodElement();
8182        case 37099616:  return getRequestURLElement();
8183        case -341064690:  return getResourceElement();
8184        case -340323263:  return getResponseElement();
8185        case 1438723534:  return getResponseCodeElement();
8186        case 3512060:  return getRule(); 
8187        case 1548678118:  return getRuleset(); 
8188        case 1746327190:  return getSourceIdElement();
8189        case 1555541038:  return getValidateProfileIdElement();
8190        case 111972721:  return getValueElement();
8191        case -481159832:  return getWarningOnlyElement();
8192        default: return super.makeProperty(hash, name);
8193        }
8194
8195      }
8196
8197      @Override
8198      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
8199        switch (hash) {
8200        case 102727412: /*label*/ return new String[] {"string"};
8201        case -1724546052: /*description*/ return new String[] {"string"};
8202        case -962590849: /*direction*/ return new String[] {"code"};
8203        case 2081856758: /*compareToSourceId*/ return new String[] {"string"};
8204        case -1415702669: /*compareToSourceExpression*/ return new String[] {"string"};
8205        case -790206144: /*compareToSourcePath*/ return new String[] {"string"};
8206        case -389131437: /*contentType*/ return new String[] {"code"};
8207        case -1795452264: /*expression*/ return new String[] {"string"};
8208        case 1160732269: /*headerField*/ return new String[] {"string"};
8209        case 818925001: /*minimumId*/ return new String[] {"string"};
8210        case 1001488901: /*navigationLinks*/ return new String[] {"boolean"};
8211        case -500553564: /*operator*/ return new String[] {"code"};
8212        case 3433509: /*path*/ return new String[] {"string"};
8213        case 1217874000: /*requestMethod*/ return new String[] {"code"};
8214        case 37099616: /*requestURL*/ return new String[] {"string"};
8215        case -341064690: /*resource*/ return new String[] {"code"};
8216        case -340323263: /*response*/ return new String[] {"code"};
8217        case 1438723534: /*responseCode*/ return new String[] {"string"};
8218        case 3512060: /*rule*/ return new String[] {};
8219        case 1548678118: /*ruleset*/ return new String[] {};
8220        case 1746327190: /*sourceId*/ return new String[] {"id"};
8221        case 1555541038: /*validateProfileId*/ return new String[] {"id"};
8222        case 111972721: /*value*/ return new String[] {"string"};
8223        case -481159832: /*warningOnly*/ return new String[] {"boolean"};
8224        default: return super.getTypesForProperty(hash, name);
8225        }
8226
8227      }
8228
8229      @Override
8230      public Base addChild(String name) throws FHIRException {
8231        if (name.equals("label")) {
8232          throw new FHIRException("Cannot call addChild on a singleton property TestScript.label");
8233        }
8234        else if (name.equals("description")) {
8235          throw new FHIRException("Cannot call addChild on a singleton property TestScript.description");
8236        }
8237        else if (name.equals("direction")) {
8238          throw new FHIRException("Cannot call addChild on a singleton property TestScript.direction");
8239        }
8240        else if (name.equals("compareToSourceId")) {
8241          throw new FHIRException("Cannot call addChild on a singleton property TestScript.compareToSourceId");
8242        }
8243        else if (name.equals("compareToSourceExpression")) {
8244          throw new FHIRException("Cannot call addChild on a singleton property TestScript.compareToSourceExpression");
8245        }
8246        else if (name.equals("compareToSourcePath")) {
8247          throw new FHIRException("Cannot call addChild on a singleton property TestScript.compareToSourcePath");
8248        }
8249        else if (name.equals("contentType")) {
8250          throw new FHIRException("Cannot call addChild on a singleton property TestScript.contentType");
8251        }
8252        else if (name.equals("expression")) {
8253          throw new FHIRException("Cannot call addChild on a singleton property TestScript.expression");
8254        }
8255        else if (name.equals("headerField")) {
8256          throw new FHIRException("Cannot call addChild on a singleton property TestScript.headerField");
8257        }
8258        else if (name.equals("minimumId")) {
8259          throw new FHIRException("Cannot call addChild on a singleton property TestScript.minimumId");
8260        }
8261        else if (name.equals("navigationLinks")) {
8262          throw new FHIRException("Cannot call addChild on a singleton property TestScript.navigationLinks");
8263        }
8264        else if (name.equals("operator")) {
8265          throw new FHIRException("Cannot call addChild on a singleton property TestScript.operator");
8266        }
8267        else if (name.equals("path")) {
8268          throw new FHIRException("Cannot call addChild on a singleton property TestScript.path");
8269        }
8270        else if (name.equals("requestMethod")) {
8271          throw new FHIRException("Cannot call addChild on a singleton property TestScript.requestMethod");
8272        }
8273        else if (name.equals("requestURL")) {
8274          throw new FHIRException("Cannot call addChild on a singleton property TestScript.requestURL");
8275        }
8276        else if (name.equals("resource")) {
8277          throw new FHIRException("Cannot call addChild on a singleton property TestScript.resource");
8278        }
8279        else if (name.equals("response")) {
8280          throw new FHIRException("Cannot call addChild on a singleton property TestScript.response");
8281        }
8282        else if (name.equals("responseCode")) {
8283          throw new FHIRException("Cannot call addChild on a singleton property TestScript.responseCode");
8284        }
8285        else if (name.equals("rule")) {
8286          this.rule = new ActionAssertRuleComponent();
8287          return this.rule;
8288        }
8289        else if (name.equals("ruleset")) {
8290          this.ruleset = new ActionAssertRulesetComponent();
8291          return this.ruleset;
8292        }
8293        else if (name.equals("sourceId")) {
8294          throw new FHIRException("Cannot call addChild on a singleton property TestScript.sourceId");
8295        }
8296        else if (name.equals("validateProfileId")) {
8297          throw new FHIRException("Cannot call addChild on a singleton property TestScript.validateProfileId");
8298        }
8299        else if (name.equals("value")) {
8300          throw new FHIRException("Cannot call addChild on a singleton property TestScript.value");
8301        }
8302        else if (name.equals("warningOnly")) {
8303          throw new FHIRException("Cannot call addChild on a singleton property TestScript.warningOnly");
8304        }
8305        else
8306          return super.addChild(name);
8307      }
8308
8309      public SetupActionAssertComponent copy() {
8310        SetupActionAssertComponent dst = new SetupActionAssertComponent();
8311        copyValues(dst);
8312        dst.label = label == null ? null : label.copy();
8313        dst.description = description == null ? null : description.copy();
8314        dst.direction = direction == null ? null : direction.copy();
8315        dst.compareToSourceId = compareToSourceId == null ? null : compareToSourceId.copy();
8316        dst.compareToSourceExpression = compareToSourceExpression == null ? null : compareToSourceExpression.copy();
8317        dst.compareToSourcePath = compareToSourcePath == null ? null : compareToSourcePath.copy();
8318        dst.contentType = contentType == null ? null : contentType.copy();
8319        dst.expression = expression == null ? null : expression.copy();
8320        dst.headerField = headerField == null ? null : headerField.copy();
8321        dst.minimumId = minimumId == null ? null : minimumId.copy();
8322        dst.navigationLinks = navigationLinks == null ? null : navigationLinks.copy();
8323        dst.operator = operator == null ? null : operator.copy();
8324        dst.path = path == null ? null : path.copy();
8325        dst.requestMethod = requestMethod == null ? null : requestMethod.copy();
8326        dst.requestURL = requestURL == null ? null : requestURL.copy();
8327        dst.resource = resource == null ? null : resource.copy();
8328        dst.response = response == null ? null : response.copy();
8329        dst.responseCode = responseCode == null ? null : responseCode.copy();
8330        dst.rule = rule == null ? null : rule.copy();
8331        dst.ruleset = ruleset == null ? null : ruleset.copy();
8332        dst.sourceId = sourceId == null ? null : sourceId.copy();
8333        dst.validateProfileId = validateProfileId == null ? null : validateProfileId.copy();
8334        dst.value = value == null ? null : value.copy();
8335        dst.warningOnly = warningOnly == null ? null : warningOnly.copy();
8336        return dst;
8337      }
8338
8339      @Override
8340      public boolean equalsDeep(Base other_) {
8341        if (!super.equalsDeep(other_))
8342          return false;
8343        if (!(other_ instanceof SetupActionAssertComponent))
8344          return false;
8345        SetupActionAssertComponent o = (SetupActionAssertComponent) other_;
8346        return compareDeep(label, o.label, true) && compareDeep(description, o.description, true) && compareDeep(direction, o.direction, true)
8347           && compareDeep(compareToSourceId, o.compareToSourceId, true) && compareDeep(compareToSourceExpression, o.compareToSourceExpression, true)
8348           && compareDeep(compareToSourcePath, o.compareToSourcePath, true) && compareDeep(contentType, o.contentType, true)
8349           && compareDeep(expression, o.expression, true) && compareDeep(headerField, o.headerField, true)
8350           && compareDeep(minimumId, o.minimumId, true) && compareDeep(navigationLinks, o.navigationLinks, true)
8351           && compareDeep(operator, o.operator, true) && compareDeep(path, o.path, true) && compareDeep(requestMethod, o.requestMethod, true)
8352           && compareDeep(requestURL, o.requestURL, true) && compareDeep(resource, o.resource, true) && compareDeep(response, o.response, true)
8353           && compareDeep(responseCode, o.responseCode, true) && compareDeep(rule, o.rule, true) && compareDeep(ruleset, o.ruleset, true)
8354           && compareDeep(sourceId, o.sourceId, true) && compareDeep(validateProfileId, o.validateProfileId, true)
8355           && compareDeep(value, o.value, true) && compareDeep(warningOnly, o.warningOnly, true);
8356      }
8357
8358      @Override
8359      public boolean equalsShallow(Base other_) {
8360        if (!super.equalsShallow(other_))
8361          return false;
8362        if (!(other_ instanceof SetupActionAssertComponent))
8363          return false;
8364        SetupActionAssertComponent o = (SetupActionAssertComponent) other_;
8365        return compareValues(label, o.label, true) && compareValues(description, o.description, true) && compareValues(direction, o.direction, true)
8366           && compareValues(compareToSourceId, o.compareToSourceId, true) && compareValues(compareToSourceExpression, o.compareToSourceExpression, true)
8367           && compareValues(compareToSourcePath, o.compareToSourcePath, true) && compareValues(contentType, o.contentType, true)
8368           && compareValues(expression, o.expression, true) && compareValues(headerField, o.headerField, true)
8369           && compareValues(minimumId, o.minimumId, true) && compareValues(navigationLinks, o.navigationLinks, true)
8370           && compareValues(operator, o.operator, true) && compareValues(path, o.path, true) && compareValues(requestMethod, o.requestMethod, true)
8371           && compareValues(requestURL, o.requestURL, true) && compareValues(resource, o.resource, true) && compareValues(response, o.response, true)
8372           && compareValues(responseCode, o.responseCode, true) && compareValues(sourceId, o.sourceId, true) && compareValues(validateProfileId, o.validateProfileId, true)
8373           && compareValues(value, o.value, true) && compareValues(warningOnly, o.warningOnly, true);
8374      }
8375
8376      public boolean isEmpty() {
8377        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(label, description, direction
8378          , compareToSourceId, compareToSourceExpression, compareToSourcePath, contentType, expression
8379          , headerField, minimumId, navigationLinks, operator, path, requestMethod, requestURL
8380          , resource, response, responseCode, rule, ruleset, sourceId, validateProfileId
8381          , value, warningOnly);
8382      }
8383
8384  public String fhirType() {
8385    return "TestScript.setup.action.assert";
8386
8387  }
8388
8389  }
8390
8391    @Block()
8392    public static class ActionAssertRuleComponent extends BackboneElement implements IBaseBackboneElement {
8393        /**
8394         * The TestScript.rule id value this assert will evaluate.
8395         */
8396        @Child(name = "ruleId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false)
8397        @Description(shortDefinition="Id of the TestScript.rule", formalDefinition="The TestScript.rule id value this assert will evaluate." )
8398        protected IdType ruleId;
8399
8400        /**
8401         * Each rule template can take one or more parameters for rule evaluation.
8402         */
8403        @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
8404        @Description(shortDefinition="Rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." )
8405        protected List<ActionAssertRuleParamComponent> param;
8406
8407        private static final long serialVersionUID = -1860715431L;
8408
8409    /**
8410     * Constructor
8411     */
8412      public ActionAssertRuleComponent() {
8413        super();
8414      }
8415
8416    /**
8417     * Constructor
8418     */
8419      public ActionAssertRuleComponent(IdType ruleId) {
8420        super();
8421        this.ruleId = ruleId;
8422      }
8423
8424        /**
8425         * @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
8426         */
8427        public IdType getRuleIdElement() { 
8428          if (this.ruleId == null)
8429            if (Configuration.errorOnAutoCreate())
8430              throw new Error("Attempt to auto-create ActionAssertRuleComponent.ruleId");
8431            else if (Configuration.doAutoCreate())
8432              this.ruleId = new IdType(); // bb
8433          return this.ruleId;
8434        }
8435
8436        public boolean hasRuleIdElement() { 
8437          return this.ruleId != null && !this.ruleId.isEmpty();
8438        }
8439
8440        public boolean hasRuleId() { 
8441          return this.ruleId != null && !this.ruleId.isEmpty();
8442        }
8443
8444        /**
8445         * @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
8446         */
8447        public ActionAssertRuleComponent setRuleIdElement(IdType value) { 
8448          this.ruleId = value;
8449          return this;
8450        }
8451
8452        /**
8453         * @return The TestScript.rule id value this assert will evaluate.
8454         */
8455        public String getRuleId() { 
8456          return this.ruleId == null ? null : this.ruleId.getValue();
8457        }
8458
8459        /**
8460         * @param value The TestScript.rule id value this assert will evaluate.
8461         */
8462        public ActionAssertRuleComponent setRuleId(String value) { 
8463            if (this.ruleId == null)
8464              this.ruleId = new IdType();
8465            this.ruleId.setValue(value);
8466          return this;
8467        }
8468
8469        /**
8470         * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.)
8471         */
8472        public List<ActionAssertRuleParamComponent> getParam() { 
8473          if (this.param == null)
8474            this.param = new ArrayList<ActionAssertRuleParamComponent>();
8475          return this.param;
8476        }
8477
8478        /**
8479         * @return Returns a reference to <code>this</code> for easy method chaining
8480         */
8481        public ActionAssertRuleComponent setParam(List<ActionAssertRuleParamComponent> theParam) { 
8482          this.param = theParam;
8483          return this;
8484        }
8485
8486        public boolean hasParam() { 
8487          if (this.param == null)
8488            return false;
8489          for (ActionAssertRuleParamComponent item : this.param)
8490            if (!item.isEmpty())
8491              return true;
8492          return false;
8493        }
8494
8495        public ActionAssertRuleParamComponent addParam() { //3
8496          ActionAssertRuleParamComponent t = new ActionAssertRuleParamComponent();
8497          if (this.param == null)
8498            this.param = new ArrayList<ActionAssertRuleParamComponent>();
8499          this.param.add(t);
8500          return t;
8501        }
8502
8503        public ActionAssertRuleComponent addParam(ActionAssertRuleParamComponent t) { //3
8504          if (t == null)
8505            return this;
8506          if (this.param == null)
8507            this.param = new ArrayList<ActionAssertRuleParamComponent>();
8508          this.param.add(t);
8509          return this;
8510        }
8511
8512        /**
8513         * @return The first repetition of repeating field {@link #param}, creating it if it does not already exist
8514         */
8515        public ActionAssertRuleParamComponent getParamFirstRep() { 
8516          if (getParam().isEmpty()) {
8517            addParam();
8518          }
8519          return getParam().get(0);
8520        }
8521
8522        protected void listChildren(List<Property> children) {
8523          super.listChildren(children);
8524          children.add(new Property("ruleId", "id", "The TestScript.rule id value this assert will evaluate.", 0, 1, ruleId));
8525          children.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param));
8526        }
8527
8528        @Override
8529        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
8530          switch (_hash) {
8531          case -919875273: /*ruleId*/  return new Property("ruleId", "id", "The TestScript.rule id value this assert will evaluate.", 0, 1, ruleId);
8532          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);
8533          default: return super.getNamedProperty(_hash, _name, _checkValid);
8534          }
8535
8536        }
8537
8538      @Override
8539      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
8540        switch (hash) {
8541        case -919875273: /*ruleId*/ return this.ruleId == null ? new Base[0] : new Base[] {this.ruleId}; // IdType
8542        case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // ActionAssertRuleParamComponent
8543        default: return super.getProperty(hash, name, checkValid);
8544        }
8545
8546      }
8547
8548      @Override
8549      public Base setProperty(int hash, String name, Base value) throws FHIRException {
8550        switch (hash) {
8551        case -919875273: // ruleId
8552          this.ruleId = castToId(value); // IdType
8553          return value;
8554        case 106436749: // param
8555          this.getParam().add((ActionAssertRuleParamComponent) value); // ActionAssertRuleParamComponent
8556          return value;
8557        default: return super.setProperty(hash, name, value);
8558        }
8559
8560      }
8561
8562      @Override
8563      public Base setProperty(String name, Base value) throws FHIRException {
8564        if (name.equals("ruleId")) {
8565          this.ruleId = castToId(value); // IdType
8566        } else if (name.equals("param")) {
8567          this.getParam().add((ActionAssertRuleParamComponent) value);
8568        } else
8569          return super.setProperty(name, value);
8570        return value;
8571      }
8572
8573      @Override
8574      public Base makeProperty(int hash, String name) throws FHIRException {
8575        switch (hash) {
8576        case -919875273:  return getRuleIdElement();
8577        case 106436749:  return addParam(); 
8578        default: return super.makeProperty(hash, name);
8579        }
8580
8581      }
8582
8583      @Override
8584      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
8585        switch (hash) {
8586        case -919875273: /*ruleId*/ return new String[] {"id"};
8587        case 106436749: /*param*/ return new String[] {};
8588        default: return super.getTypesForProperty(hash, name);
8589        }
8590
8591      }
8592
8593      @Override
8594      public Base addChild(String name) throws FHIRException {
8595        if (name.equals("ruleId")) {
8596          throw new FHIRException("Cannot call addChild on a singleton property TestScript.ruleId");
8597        }
8598        else if (name.equals("param")) {
8599          return addParam();
8600        }
8601        else
8602          return super.addChild(name);
8603      }
8604
8605      public ActionAssertRuleComponent copy() {
8606        ActionAssertRuleComponent dst = new ActionAssertRuleComponent();
8607        copyValues(dst);
8608        dst.ruleId = ruleId == null ? null : ruleId.copy();
8609        if (param != null) {
8610          dst.param = new ArrayList<ActionAssertRuleParamComponent>();
8611          for (ActionAssertRuleParamComponent i : param)
8612            dst.param.add(i.copy());
8613        };
8614        return dst;
8615      }
8616
8617      @Override
8618      public boolean equalsDeep(Base other_) {
8619        if (!super.equalsDeep(other_))
8620          return false;
8621        if (!(other_ instanceof ActionAssertRuleComponent))
8622          return false;
8623        ActionAssertRuleComponent o = (ActionAssertRuleComponent) other_;
8624        return compareDeep(ruleId, o.ruleId, true) && compareDeep(param, o.param, true);
8625      }
8626
8627      @Override
8628      public boolean equalsShallow(Base other_) {
8629        if (!super.equalsShallow(other_))
8630          return false;
8631        if (!(other_ instanceof ActionAssertRuleComponent))
8632          return false;
8633        ActionAssertRuleComponent o = (ActionAssertRuleComponent) other_;
8634        return compareValues(ruleId, o.ruleId, true);
8635      }
8636
8637      public boolean isEmpty() {
8638        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(ruleId, param);
8639      }
8640
8641  public String fhirType() {
8642    return "TestScript.setup.action.assert.rule";
8643
8644  }
8645
8646  }
8647
8648    @Block()
8649    public static class ActionAssertRuleParamComponent extends BackboneElement implements IBaseBackboneElement {
8650        /**
8651         * Descriptive name for this parameter that matches the external assert rule parameter name.
8652         */
8653        @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
8654        @Description(shortDefinition="Parameter name matching external assert rule parameter", formalDefinition="Descriptive name for this parameter that matches the external assert rule parameter name." )
8655        protected StringType name;
8656
8657        /**
8658         * The value for the parameter that will be passed on to the external rule template.
8659         */
8660        @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false)
8661        @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." )
8662        protected StringType value;
8663
8664        private static final long serialVersionUID = 395259392L;
8665
8666    /**
8667     * Constructor
8668     */
8669      public ActionAssertRuleParamComponent() {
8670        super();
8671      }
8672
8673    /**
8674     * Constructor
8675     */
8676      public ActionAssertRuleParamComponent(StringType name, StringType value) {
8677        super();
8678        this.name = name;
8679        this.value = value;
8680      }
8681
8682        /**
8683         * @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
8684         */
8685        public StringType getNameElement() { 
8686          if (this.name == null)
8687            if (Configuration.errorOnAutoCreate())
8688              throw new Error("Attempt to auto-create ActionAssertRuleParamComponent.name");
8689            else if (Configuration.doAutoCreate())
8690              this.name = new StringType(); // bb
8691          return this.name;
8692        }
8693
8694        public boolean hasNameElement() { 
8695          return this.name != null && !this.name.isEmpty();
8696        }
8697
8698        public boolean hasName() { 
8699          return this.name != null && !this.name.isEmpty();
8700        }
8701
8702        /**
8703         * @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
8704         */
8705        public ActionAssertRuleParamComponent setNameElement(StringType value) { 
8706          this.name = value;
8707          return this;
8708        }
8709
8710        /**
8711         * @return Descriptive name for this parameter that matches the external assert rule parameter name.
8712         */
8713        public String getName() { 
8714          return this.name == null ? null : this.name.getValue();
8715        }
8716
8717        /**
8718         * @param value Descriptive name for this parameter that matches the external assert rule parameter name.
8719         */
8720        public ActionAssertRuleParamComponent setName(String value) { 
8721            if (this.name == null)
8722              this.name = new StringType();
8723            this.name.setValue(value);
8724          return this;
8725        }
8726
8727        /**
8728         * @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
8729         */
8730        public StringType getValueElement() { 
8731          if (this.value == null)
8732            if (Configuration.errorOnAutoCreate())
8733              throw new Error("Attempt to auto-create ActionAssertRuleParamComponent.value");
8734            else if (Configuration.doAutoCreate())
8735              this.value = new StringType(); // bb
8736          return this.value;
8737        }
8738
8739        public boolean hasValueElement() { 
8740          return this.value != null && !this.value.isEmpty();
8741        }
8742
8743        public boolean hasValue() { 
8744          return this.value != null && !this.value.isEmpty();
8745        }
8746
8747        /**
8748         * @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
8749         */
8750        public ActionAssertRuleParamComponent setValueElement(StringType value) { 
8751          this.value = value;
8752          return this;
8753        }
8754
8755        /**
8756         * @return The value for the parameter that will be passed on to the external rule template.
8757         */
8758        public String getValue() { 
8759          return this.value == null ? null : this.value.getValue();
8760        }
8761
8762        /**
8763         * @param value The value for the parameter that will be passed on to the external rule template.
8764         */
8765        public ActionAssertRuleParamComponent setValue(String value) { 
8766            if (this.value == null)
8767              this.value = new StringType();
8768            this.value.setValue(value);
8769          return this;
8770        }
8771
8772        protected void listChildren(List<Property> children) {
8773          super.listChildren(children);
8774          children.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert rule parameter name.", 0, 1, name));
8775          children.add(new Property("value", "string", "The value for the parameter that will be passed on to the external rule template.", 0, 1, value));
8776        }
8777
8778        @Override
8779        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
8780          switch (_hash) {
8781          case 3373707: /*name*/  return new Property("name", "string", "Descriptive name for this parameter that matches the external assert rule parameter name.", 0, 1, name);
8782          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);
8783          default: return super.getNamedProperty(_hash, _name, _checkValid);
8784          }
8785
8786        }
8787
8788      @Override
8789      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
8790        switch (hash) {
8791        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
8792        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType
8793        default: return super.getProperty(hash, name, checkValid);
8794        }
8795
8796      }
8797
8798      @Override
8799      public Base setProperty(int hash, String name, Base value) throws FHIRException {
8800        switch (hash) {
8801        case 3373707: // name
8802          this.name = castToString(value); // StringType
8803          return value;
8804        case 111972721: // value
8805          this.value = castToString(value); // StringType
8806          return value;
8807        default: return super.setProperty(hash, name, value);
8808        }
8809
8810      }
8811
8812      @Override
8813      public Base setProperty(String name, Base value) throws FHIRException {
8814        if (name.equals("name")) {
8815          this.name = castToString(value); // StringType
8816        } else if (name.equals("value")) {
8817          this.value = castToString(value); // StringType
8818        } else
8819          return super.setProperty(name, value);
8820        return value;
8821      }
8822
8823      @Override
8824      public Base makeProperty(int hash, String name) throws FHIRException {
8825        switch (hash) {
8826        case 3373707:  return getNameElement();
8827        case 111972721:  return getValueElement();
8828        default: return super.makeProperty(hash, name);
8829        }
8830
8831      }
8832
8833      @Override
8834      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
8835        switch (hash) {
8836        case 3373707: /*name*/ return new String[] {"string"};
8837        case 111972721: /*value*/ return new String[] {"string"};
8838        default: return super.getTypesForProperty(hash, name);
8839        }
8840
8841      }
8842
8843      @Override
8844      public Base addChild(String name) throws FHIRException {
8845        if (name.equals("name")) {
8846          throw new FHIRException("Cannot call addChild on a singleton property TestScript.name");
8847        }
8848        else if (name.equals("value")) {
8849          throw new FHIRException("Cannot call addChild on a singleton property TestScript.value");
8850        }
8851        else
8852          return super.addChild(name);
8853      }
8854
8855      public ActionAssertRuleParamComponent copy() {
8856        ActionAssertRuleParamComponent dst = new ActionAssertRuleParamComponent();
8857        copyValues(dst);
8858        dst.name = name == null ? null : name.copy();
8859        dst.value = value == null ? null : value.copy();
8860        return dst;
8861      }
8862
8863      @Override
8864      public boolean equalsDeep(Base other_) {
8865        if (!super.equalsDeep(other_))
8866          return false;
8867        if (!(other_ instanceof ActionAssertRuleParamComponent))
8868          return false;
8869        ActionAssertRuleParamComponent o = (ActionAssertRuleParamComponent) other_;
8870        return compareDeep(name, o.name, true) && compareDeep(value, o.value, true);
8871      }
8872
8873      @Override
8874      public boolean equalsShallow(Base other_) {
8875        if (!super.equalsShallow(other_))
8876          return false;
8877        if (!(other_ instanceof ActionAssertRuleParamComponent))
8878          return false;
8879        ActionAssertRuleParamComponent o = (ActionAssertRuleParamComponent) other_;
8880        return compareValues(name, o.name, true) && compareValues(value, o.value, true);
8881      }
8882
8883      public boolean isEmpty() {
8884        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value);
8885      }
8886
8887  public String fhirType() {
8888    return "TestScript.setup.action.assert.rule.param";
8889
8890  }
8891
8892  }
8893
8894    @Block()
8895    public static class ActionAssertRulesetComponent extends BackboneElement implements IBaseBackboneElement {
8896        /**
8897         * The TestScript.ruleset id value this assert will evaluate.
8898         */
8899        @Child(name = "rulesetId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false)
8900        @Description(shortDefinition="Id of the TestScript.ruleset", formalDefinition="The TestScript.ruleset id value this assert will evaluate." )
8901        protected IdType rulesetId;
8902
8903        /**
8904         * The referenced rule within the external ruleset template.
8905         */
8906        @Child(name = "rule", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
8907        @Description(shortDefinition="The referenced rule within the ruleset", formalDefinition="The referenced rule within the external ruleset template." )
8908        protected List<ActionAssertRulesetRuleComponent> rule;
8909
8910        private static final long serialVersionUID = -976736025L;
8911
8912    /**
8913     * Constructor
8914     */
8915      public ActionAssertRulesetComponent() {
8916        super();
8917      }
8918
8919    /**
8920     * Constructor
8921     */
8922      public ActionAssertRulesetComponent(IdType rulesetId) {
8923        super();
8924        this.rulesetId = rulesetId;
8925      }
8926
8927        /**
8928         * @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
8929         */
8930        public IdType getRulesetIdElement() { 
8931          if (this.rulesetId == null)
8932            if (Configuration.errorOnAutoCreate())
8933              throw new Error("Attempt to auto-create ActionAssertRulesetComponent.rulesetId");
8934            else if (Configuration.doAutoCreate())
8935              this.rulesetId = new IdType(); // bb
8936          return this.rulesetId;
8937        }
8938
8939        public boolean hasRulesetIdElement() { 
8940          return this.rulesetId != null && !this.rulesetId.isEmpty();
8941        }
8942
8943        public boolean hasRulesetId() { 
8944          return this.rulesetId != null && !this.rulesetId.isEmpty();
8945        }
8946
8947        /**
8948         * @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
8949         */
8950        public ActionAssertRulesetComponent setRulesetIdElement(IdType value) { 
8951          this.rulesetId = value;
8952          return this;
8953        }
8954
8955        /**
8956         * @return The TestScript.ruleset id value this assert will evaluate.
8957         */
8958        public String getRulesetId() { 
8959          return this.rulesetId == null ? null : this.rulesetId.getValue();
8960        }
8961
8962        /**
8963         * @param value The TestScript.ruleset id value this assert will evaluate.
8964         */
8965        public ActionAssertRulesetComponent setRulesetId(String value) { 
8966            if (this.rulesetId == null)
8967              this.rulesetId = new IdType();
8968            this.rulesetId.setValue(value);
8969          return this;
8970        }
8971
8972        /**
8973         * @return {@link #rule} (The referenced rule within the external ruleset template.)
8974         */
8975        public List<ActionAssertRulesetRuleComponent> getRule() { 
8976          if (this.rule == null)
8977            this.rule = new ArrayList<ActionAssertRulesetRuleComponent>();
8978          return this.rule;
8979        }
8980
8981        /**
8982         * @return Returns a reference to <code>this</code> for easy method chaining
8983         */
8984        public ActionAssertRulesetComponent setRule(List<ActionAssertRulesetRuleComponent> theRule) { 
8985          this.rule = theRule;
8986          return this;
8987        }
8988
8989        public boolean hasRule() { 
8990          if (this.rule == null)
8991            return false;
8992          for (ActionAssertRulesetRuleComponent item : this.rule)
8993            if (!item.isEmpty())
8994              return true;
8995          return false;
8996        }
8997
8998        public ActionAssertRulesetRuleComponent addRule() { //3
8999          ActionAssertRulesetRuleComponent t = new ActionAssertRulesetRuleComponent();
9000          if (this.rule == null)
9001            this.rule = new ArrayList<ActionAssertRulesetRuleComponent>();
9002          this.rule.add(t);
9003          return t;
9004        }
9005
9006        public ActionAssertRulesetComponent addRule(ActionAssertRulesetRuleComponent t) { //3
9007          if (t == null)
9008            return this;
9009          if (this.rule == null)
9010            this.rule = new ArrayList<ActionAssertRulesetRuleComponent>();
9011          this.rule.add(t);
9012          return this;
9013        }
9014
9015        /**
9016         * @return The first repetition of repeating field {@link #rule}, creating it if it does not already exist
9017         */
9018        public ActionAssertRulesetRuleComponent getRuleFirstRep() { 
9019          if (getRule().isEmpty()) {
9020            addRule();
9021          }
9022          return getRule().get(0);
9023        }
9024
9025        protected void listChildren(List<Property> children) {
9026          super.listChildren(children);
9027          children.add(new Property("rulesetId", "id", "The TestScript.ruleset id value this assert will evaluate.", 0, 1, rulesetId));
9028          children.add(new Property("rule", "", "The referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, rule));
9029        }
9030
9031        @Override
9032        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
9033          switch (_hash) {
9034          case -2073977951: /*rulesetId*/  return new Property("rulesetId", "id", "The TestScript.ruleset id value this assert will evaluate.", 0, 1, rulesetId);
9035          case 3512060: /*rule*/  return new Property("rule", "", "The referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, rule);
9036          default: return super.getNamedProperty(_hash, _name, _checkValid);
9037          }
9038
9039        }
9040
9041      @Override
9042      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
9043        switch (hash) {
9044        case -2073977951: /*rulesetId*/ return this.rulesetId == null ? new Base[0] : new Base[] {this.rulesetId}; // IdType
9045        case 3512060: /*rule*/ return this.rule == null ? new Base[0] : this.rule.toArray(new Base[this.rule.size()]); // ActionAssertRulesetRuleComponent
9046        default: return super.getProperty(hash, name, checkValid);
9047        }
9048
9049      }
9050
9051      @Override
9052      public Base setProperty(int hash, String name, Base value) throws FHIRException {
9053        switch (hash) {
9054        case -2073977951: // rulesetId
9055          this.rulesetId = castToId(value); // IdType
9056          return value;
9057        case 3512060: // rule
9058          this.getRule().add((ActionAssertRulesetRuleComponent) value); // ActionAssertRulesetRuleComponent
9059          return value;
9060        default: return super.setProperty(hash, name, value);
9061        }
9062
9063      }
9064
9065      @Override
9066      public Base setProperty(String name, Base value) throws FHIRException {
9067        if (name.equals("rulesetId")) {
9068          this.rulesetId = castToId(value); // IdType
9069        } else if (name.equals("rule")) {
9070          this.getRule().add((ActionAssertRulesetRuleComponent) value);
9071        } else
9072          return super.setProperty(name, value);
9073        return value;
9074      }
9075
9076      @Override
9077      public Base makeProperty(int hash, String name) throws FHIRException {
9078        switch (hash) {
9079        case -2073977951:  return getRulesetIdElement();
9080        case 3512060:  return addRule(); 
9081        default: return super.makeProperty(hash, name);
9082        }
9083
9084      }
9085
9086      @Override
9087      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
9088        switch (hash) {
9089        case -2073977951: /*rulesetId*/ return new String[] {"id"};
9090        case 3512060: /*rule*/ return new String[] {};
9091        default: return super.getTypesForProperty(hash, name);
9092        }
9093
9094      }
9095
9096      @Override
9097      public Base addChild(String name) throws FHIRException {
9098        if (name.equals("rulesetId")) {
9099          throw new FHIRException("Cannot call addChild on a singleton property TestScript.rulesetId");
9100        }
9101        else if (name.equals("rule")) {
9102          return addRule();
9103        }
9104        else
9105          return super.addChild(name);
9106      }
9107
9108      public ActionAssertRulesetComponent copy() {
9109        ActionAssertRulesetComponent dst = new ActionAssertRulesetComponent();
9110        copyValues(dst);
9111        dst.rulesetId = rulesetId == null ? null : rulesetId.copy();
9112        if (rule != null) {
9113          dst.rule = new ArrayList<ActionAssertRulesetRuleComponent>();
9114          for (ActionAssertRulesetRuleComponent i : rule)
9115            dst.rule.add(i.copy());
9116        };
9117        return dst;
9118      }
9119
9120      @Override
9121      public boolean equalsDeep(Base other_) {
9122        if (!super.equalsDeep(other_))
9123          return false;
9124        if (!(other_ instanceof ActionAssertRulesetComponent))
9125          return false;
9126        ActionAssertRulesetComponent o = (ActionAssertRulesetComponent) other_;
9127        return compareDeep(rulesetId, o.rulesetId, true) && compareDeep(rule, o.rule, true);
9128      }
9129
9130      @Override
9131      public boolean equalsShallow(Base other_) {
9132        if (!super.equalsShallow(other_))
9133          return false;
9134        if (!(other_ instanceof ActionAssertRulesetComponent))
9135          return false;
9136        ActionAssertRulesetComponent o = (ActionAssertRulesetComponent) other_;
9137        return compareValues(rulesetId, o.rulesetId, true);
9138      }
9139
9140      public boolean isEmpty() {
9141        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(rulesetId, rule);
9142      }
9143
9144  public String fhirType() {
9145    return "TestScript.setup.action.assert.ruleset";
9146
9147  }
9148
9149  }
9150
9151    @Block()
9152    public static class ActionAssertRulesetRuleComponent extends BackboneElement implements IBaseBackboneElement {
9153        /**
9154         * Id of the referenced rule within the external ruleset template.
9155         */
9156        @Child(name = "ruleId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false)
9157        @Description(shortDefinition="Id of referenced rule within the ruleset", formalDefinition="Id of the referenced rule within the external ruleset template." )
9158        protected IdType ruleId;
9159
9160        /**
9161         * Each rule template can take one or more parameters for rule evaluation.
9162         */
9163        @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
9164        @Description(shortDefinition="Rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." )
9165        protected List<ActionAssertRulesetRuleParamComponent> param;
9166
9167        private static final long serialVersionUID = -1850698529L;
9168
9169    /**
9170     * Constructor
9171     */
9172      public ActionAssertRulesetRuleComponent() {
9173        super();
9174      }
9175
9176    /**
9177     * Constructor
9178     */
9179      public ActionAssertRulesetRuleComponent(IdType ruleId) {
9180        super();
9181        this.ruleId = ruleId;
9182      }
9183
9184        /**
9185         * @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
9186         */
9187        public IdType getRuleIdElement() { 
9188          if (this.ruleId == null)
9189            if (Configuration.errorOnAutoCreate())
9190              throw new Error("Attempt to auto-create ActionAssertRulesetRuleComponent.ruleId");
9191            else if (Configuration.doAutoCreate())
9192              this.ruleId = new IdType(); // bb
9193          return this.ruleId;
9194        }
9195
9196        public boolean hasRuleIdElement() { 
9197          return this.ruleId != null && !this.ruleId.isEmpty();
9198        }
9199
9200        public boolean hasRuleId() { 
9201          return this.ruleId != null && !this.ruleId.isEmpty();
9202        }
9203
9204        /**
9205         * @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
9206         */
9207        public ActionAssertRulesetRuleComponent setRuleIdElement(IdType value) { 
9208          this.ruleId = value;
9209          return this;
9210        }
9211
9212        /**
9213         * @return Id of the referenced rule within the external ruleset template.
9214         */
9215        public String getRuleId() { 
9216          return this.ruleId == null ? null : this.ruleId.getValue();
9217        }
9218
9219        /**
9220         * @param value Id of the referenced rule within the external ruleset template.
9221         */
9222        public ActionAssertRulesetRuleComponent setRuleId(String value) { 
9223            if (this.ruleId == null)
9224              this.ruleId = new IdType();
9225            this.ruleId.setValue(value);
9226          return this;
9227        }
9228
9229        /**
9230         * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.)
9231         */
9232        public List<ActionAssertRulesetRuleParamComponent> getParam() { 
9233          if (this.param == null)
9234            this.param = new ArrayList<ActionAssertRulesetRuleParamComponent>();
9235          return this.param;
9236        }
9237
9238        /**
9239         * @return Returns a reference to <code>this</code> for easy method chaining
9240         */
9241        public ActionAssertRulesetRuleComponent setParam(List<ActionAssertRulesetRuleParamComponent> theParam) { 
9242          this.param = theParam;
9243          return this;
9244        }
9245
9246        public boolean hasParam() { 
9247          if (this.param == null)
9248            return false;
9249          for (ActionAssertRulesetRuleParamComponent item : this.param)
9250            if (!item.isEmpty())
9251              return true;
9252          return false;
9253        }
9254
9255        public ActionAssertRulesetRuleParamComponent addParam() { //3
9256          ActionAssertRulesetRuleParamComponent t = new ActionAssertRulesetRuleParamComponent();
9257          if (this.param == null)
9258            this.param = new ArrayList<ActionAssertRulesetRuleParamComponent>();
9259          this.param.add(t);
9260          return t;
9261        }
9262
9263        public ActionAssertRulesetRuleComponent addParam(ActionAssertRulesetRuleParamComponent t) { //3
9264          if (t == null)
9265            return this;
9266          if (this.param == null)
9267            this.param = new ArrayList<ActionAssertRulesetRuleParamComponent>();
9268          this.param.add(t);
9269          return this;
9270        }
9271
9272        /**
9273         * @return The first repetition of repeating field {@link #param}, creating it if it does not already exist
9274         */
9275        public ActionAssertRulesetRuleParamComponent getParamFirstRep() { 
9276          if (getParam().isEmpty()) {
9277            addParam();
9278          }
9279          return getParam().get(0);
9280        }
9281
9282        protected void listChildren(List<Property> children) {
9283          super.listChildren(children);
9284          children.add(new Property("ruleId", "id", "Id of the referenced rule within the external ruleset template.", 0, 1, ruleId));
9285          children.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param));
9286        }
9287
9288        @Override
9289        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
9290          switch (_hash) {
9291          case -919875273: /*ruleId*/  return new Property("ruleId", "id", "Id of the referenced rule within the external ruleset template.", 0, 1, ruleId);
9292          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);
9293          default: return super.getNamedProperty(_hash, _name, _checkValid);
9294          }
9295
9296        }
9297
9298      @Override
9299      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
9300        switch (hash) {
9301        case -919875273: /*ruleId*/ return this.ruleId == null ? new Base[0] : new Base[] {this.ruleId}; // IdType
9302        case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // ActionAssertRulesetRuleParamComponent
9303        default: return super.getProperty(hash, name, checkValid);
9304        }
9305
9306      }
9307
9308      @Override
9309      public Base setProperty(int hash, String name, Base value) throws FHIRException {
9310        switch (hash) {
9311        case -919875273: // ruleId
9312          this.ruleId = castToId(value); // IdType
9313          return value;
9314        case 106436749: // param
9315          this.getParam().add((ActionAssertRulesetRuleParamComponent) value); // ActionAssertRulesetRuleParamComponent
9316          return value;
9317        default: return super.setProperty(hash, name, value);
9318        }
9319
9320      }
9321
9322      @Override
9323      public Base setProperty(String name, Base value) throws FHIRException {
9324        if (name.equals("ruleId")) {
9325          this.ruleId = castToId(value); // IdType
9326        } else if (name.equals("param")) {
9327          this.getParam().add((ActionAssertRulesetRuleParamComponent) value);
9328        } else
9329          return super.setProperty(name, value);
9330        return value;
9331      }
9332
9333      @Override
9334      public Base makeProperty(int hash, String name) throws FHIRException {
9335        switch (hash) {
9336        case -919875273:  return getRuleIdElement();
9337        case 106436749:  return addParam(); 
9338        default: return super.makeProperty(hash, name);
9339        }
9340
9341      }
9342
9343      @Override
9344      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
9345        switch (hash) {
9346        case -919875273: /*ruleId*/ return new String[] {"id"};
9347        case 106436749: /*param*/ return new String[] {};
9348        default: return super.getTypesForProperty(hash, name);
9349        }
9350
9351      }
9352
9353      @Override
9354      public Base addChild(String name) throws FHIRException {
9355        if (name.equals("ruleId")) {
9356          throw new FHIRException("Cannot call addChild on a singleton property TestScript.ruleId");
9357        }
9358        else if (name.equals("param")) {
9359          return addParam();
9360        }
9361        else
9362          return super.addChild(name);
9363      }
9364
9365      public ActionAssertRulesetRuleComponent copy() {
9366        ActionAssertRulesetRuleComponent dst = new ActionAssertRulesetRuleComponent();
9367        copyValues(dst);
9368        dst.ruleId = ruleId == null ? null : ruleId.copy();
9369        if (param != null) {
9370          dst.param = new ArrayList<ActionAssertRulesetRuleParamComponent>();
9371          for (ActionAssertRulesetRuleParamComponent i : param)
9372            dst.param.add(i.copy());
9373        };
9374        return dst;
9375      }
9376
9377      @Override
9378      public boolean equalsDeep(Base other_) {
9379        if (!super.equalsDeep(other_))
9380          return false;
9381        if (!(other_ instanceof ActionAssertRulesetRuleComponent))
9382          return false;
9383        ActionAssertRulesetRuleComponent o = (ActionAssertRulesetRuleComponent) other_;
9384        return compareDeep(ruleId, o.ruleId, true) && compareDeep(param, o.param, true);
9385      }
9386
9387      @Override
9388      public boolean equalsShallow(Base other_) {
9389        if (!super.equalsShallow(other_))
9390          return false;
9391        if (!(other_ instanceof ActionAssertRulesetRuleComponent))
9392          return false;
9393        ActionAssertRulesetRuleComponent o = (ActionAssertRulesetRuleComponent) other_;
9394        return compareValues(ruleId, o.ruleId, true);
9395      }
9396
9397      public boolean isEmpty() {
9398        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(ruleId, param);
9399      }
9400
9401  public String fhirType() {
9402    return "TestScript.setup.action.assert.ruleset.rule";
9403
9404  }
9405
9406  }
9407
9408    @Block()
9409    public static class ActionAssertRulesetRuleParamComponent extends BackboneElement implements IBaseBackboneElement {
9410        /**
9411         * Descriptive name for this parameter that matches the external assert ruleset rule parameter name.
9412         */
9413        @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
9414        @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." )
9415        protected StringType name;
9416
9417        /**
9418         * The value for the parameter that will be passed on to the external ruleset rule template.
9419         */
9420        @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false)
9421        @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." )
9422        protected StringType value;
9423
9424        private static final long serialVersionUID = 395259392L;
9425
9426    /**
9427     * Constructor
9428     */
9429      public ActionAssertRulesetRuleParamComponent() {
9430        super();
9431      }
9432
9433    /**
9434     * Constructor
9435     */
9436      public ActionAssertRulesetRuleParamComponent(StringType name, StringType value) {
9437        super();
9438        this.name = name;
9439        this.value = value;
9440      }
9441
9442        /**
9443         * @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
9444         */
9445        public StringType getNameElement() { 
9446          if (this.name == null)
9447            if (Configuration.errorOnAutoCreate())
9448              throw new Error("Attempt to auto-create ActionAssertRulesetRuleParamComponent.name");
9449            else if (Configuration.doAutoCreate())
9450              this.name = new StringType(); // bb
9451          return this.name;
9452        }
9453
9454        public boolean hasNameElement() { 
9455          return this.name != null && !this.name.isEmpty();
9456        }
9457
9458        public boolean hasName() { 
9459          return this.name != null && !this.name.isEmpty();
9460        }
9461
9462        /**
9463         * @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
9464         */
9465        public ActionAssertRulesetRuleParamComponent setNameElement(StringType value) { 
9466          this.name = value;
9467          return this;
9468        }
9469
9470        /**
9471         * @return Descriptive name for this parameter that matches the external assert ruleset rule parameter name.
9472         */
9473        public String getName() { 
9474          return this.name == null ? null : this.name.getValue();
9475        }
9476
9477        /**
9478         * @param value Descriptive name for this parameter that matches the external assert ruleset rule parameter name.
9479         */
9480        public ActionAssertRulesetRuleParamComponent setName(String value) { 
9481            if (this.name == null)
9482              this.name = new StringType();
9483            this.name.setValue(value);
9484          return this;
9485        }
9486
9487        /**
9488         * @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
9489         */
9490        public StringType getValueElement() { 
9491          if (this.value == null)
9492            if (Configuration.errorOnAutoCreate())
9493              throw new Error("Attempt to auto-create ActionAssertRulesetRuleParamComponent.value");
9494            else if (Configuration.doAutoCreate())
9495              this.value = new StringType(); // bb
9496          return this.value;
9497        }
9498
9499        public boolean hasValueElement() { 
9500          return this.value != null && !this.value.isEmpty();
9501        }
9502
9503        public boolean hasValue() { 
9504          return this.value != null && !this.value.isEmpty();
9505        }
9506
9507        /**
9508         * @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
9509         */
9510        public ActionAssertRulesetRuleParamComponent setValueElement(StringType value) { 
9511          this.value = value;
9512          return this;
9513        }
9514
9515        /**
9516         * @return The value for the parameter that will be passed on to the external ruleset rule template.
9517         */
9518        public String getValue() { 
9519          return this.value == null ? null : this.value.getValue();
9520        }
9521
9522        /**
9523         * @param value The value for the parameter that will be passed on to the external ruleset rule template.
9524         */
9525        public ActionAssertRulesetRuleParamComponent setValue(String value) { 
9526            if (this.value == null)
9527              this.value = new StringType();
9528            this.value.setValue(value);
9529          return this;
9530        }
9531
9532        protected void listChildren(List<Property> children) {
9533          super.listChildren(children);
9534          children.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", 0, 1, name));
9535          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));
9536        }
9537
9538        @Override
9539        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
9540          switch (_hash) {
9541          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);
9542          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);
9543          default: return super.getNamedProperty(_hash, _name, _checkValid);
9544          }
9545
9546        }
9547
9548      @Override
9549      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
9550        switch (hash) {
9551        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
9552        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType
9553        default: return super.getProperty(hash, name, checkValid);
9554        }
9555
9556      }
9557
9558      @Override
9559      public Base setProperty(int hash, String name, Base value) throws FHIRException {
9560        switch (hash) {
9561        case 3373707: // name
9562          this.name = castToString(value); // StringType
9563          return value;
9564        case 111972721: // value
9565          this.value = castToString(value); // StringType
9566          return value;
9567        default: return super.setProperty(hash, name, value);
9568        }
9569
9570      }
9571
9572      @Override
9573      public Base setProperty(String name, Base value) throws FHIRException {
9574        if (name.equals("name")) {
9575          this.name = castToString(value); // StringType
9576        } else if (name.equals("value")) {
9577          this.value = castToString(value); // StringType
9578        } else
9579          return super.setProperty(name, value);
9580        return value;
9581      }
9582
9583      @Override
9584      public Base makeProperty(int hash, String name) throws FHIRException {
9585        switch (hash) {
9586        case 3373707:  return getNameElement();
9587        case 111972721:  return getValueElement();
9588        default: return super.makeProperty(hash, name);
9589        }
9590
9591      }
9592
9593      @Override
9594      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
9595        switch (hash) {
9596        case 3373707: /*name*/ return new String[] {"string"};
9597        case 111972721: /*value*/ return new String[] {"string"};
9598        default: return super.getTypesForProperty(hash, name);
9599        }
9600
9601      }
9602
9603      @Override
9604      public Base addChild(String name) throws FHIRException {
9605        if (name.equals("name")) {
9606          throw new FHIRException("Cannot call addChild on a singleton property TestScript.name");
9607        }
9608        else if (name.equals("value")) {
9609          throw new FHIRException("Cannot call addChild on a singleton property TestScript.value");
9610        }
9611        else
9612          return super.addChild(name);
9613      }
9614
9615      public ActionAssertRulesetRuleParamComponent copy() {
9616        ActionAssertRulesetRuleParamComponent dst = new ActionAssertRulesetRuleParamComponent();
9617        copyValues(dst);
9618        dst.name = name == null ? null : name.copy();
9619        dst.value = value == null ? null : value.copy();
9620        return dst;
9621      }
9622
9623      @Override
9624      public boolean equalsDeep(Base other_) {
9625        if (!super.equalsDeep(other_))
9626          return false;
9627        if (!(other_ instanceof ActionAssertRulesetRuleParamComponent))
9628          return false;
9629        ActionAssertRulesetRuleParamComponent o = (ActionAssertRulesetRuleParamComponent) other_;
9630        return compareDeep(name, o.name, true) && compareDeep(value, o.value, true);
9631      }
9632
9633      @Override
9634      public boolean equalsShallow(Base other_) {
9635        if (!super.equalsShallow(other_))
9636          return false;
9637        if (!(other_ instanceof ActionAssertRulesetRuleParamComponent))
9638          return false;
9639        ActionAssertRulesetRuleParamComponent o = (ActionAssertRulesetRuleParamComponent) other_;
9640        return compareValues(name, o.name, true) && compareValues(value, o.value, true);
9641      }
9642
9643      public boolean isEmpty() {
9644        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value);
9645      }
9646
9647  public String fhirType() {
9648    return "TestScript.setup.action.assert.ruleset.rule.param";
9649
9650  }
9651
9652  }
9653
9654    @Block()
9655    public static class TestScriptTestComponent extends BackboneElement implements IBaseBackboneElement {
9656        /**
9657         * The name of this test used for tracking/logging purposes by test engines.
9658         */
9659        @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
9660        @Description(shortDefinition="Tracking/logging name of this test", formalDefinition="The name of this test used for tracking/logging purposes by test engines." )
9661        protected StringType name;
9662
9663        /**
9664         * A short description of the test used by test engines for tracking and reporting purposes.
9665         */
9666        @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
9667        @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." )
9668        protected StringType description;
9669
9670        /**
9671         * Action would contain either an operation or an assertion.
9672         */
9673        @Child(name = "action", type = {}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
9674        @Description(shortDefinition="A test operation or assert to perform", formalDefinition="Action would contain either an operation or an assertion." )
9675        protected List<TestActionComponent> action;
9676
9677        private static final long serialVersionUID = -865006110L;
9678
9679    /**
9680     * Constructor
9681     */
9682      public TestScriptTestComponent() {
9683        super();
9684      }
9685
9686        /**
9687         * @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
9688         */
9689        public StringType getNameElement() { 
9690          if (this.name == null)
9691            if (Configuration.errorOnAutoCreate())
9692              throw new Error("Attempt to auto-create TestScriptTestComponent.name");
9693            else if (Configuration.doAutoCreate())
9694              this.name = new StringType(); // bb
9695          return this.name;
9696        }
9697
9698        public boolean hasNameElement() { 
9699          return this.name != null && !this.name.isEmpty();
9700        }
9701
9702        public boolean hasName() { 
9703          return this.name != null && !this.name.isEmpty();
9704        }
9705
9706        /**
9707         * @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
9708         */
9709        public TestScriptTestComponent setNameElement(StringType value) { 
9710          this.name = value;
9711          return this;
9712        }
9713
9714        /**
9715         * @return The name of this test used for tracking/logging purposes by test engines.
9716         */
9717        public String getName() { 
9718          return this.name == null ? null : this.name.getValue();
9719        }
9720
9721        /**
9722         * @param value The name of this test used for tracking/logging purposes by test engines.
9723         */
9724        public TestScriptTestComponent setName(String value) { 
9725          if (Utilities.noString(value))
9726            this.name = null;
9727          else {
9728            if (this.name == null)
9729              this.name = new StringType();
9730            this.name.setValue(value);
9731          }
9732          return this;
9733        }
9734
9735        /**
9736         * @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
9737         */
9738        public StringType getDescriptionElement() { 
9739          if (this.description == null)
9740            if (Configuration.errorOnAutoCreate())
9741              throw new Error("Attempt to auto-create TestScriptTestComponent.description");
9742            else if (Configuration.doAutoCreate())
9743              this.description = new StringType(); // bb
9744          return this.description;
9745        }
9746
9747        public boolean hasDescriptionElement() { 
9748          return this.description != null && !this.description.isEmpty();
9749        }
9750
9751        public boolean hasDescription() { 
9752          return this.description != null && !this.description.isEmpty();
9753        }
9754
9755        /**
9756         * @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
9757         */
9758        public TestScriptTestComponent setDescriptionElement(StringType value) { 
9759          this.description = value;
9760          return this;
9761        }
9762
9763        /**
9764         * @return A short description of the test used by test engines for tracking and reporting purposes.
9765         */
9766        public String getDescription() { 
9767          return this.description == null ? null : this.description.getValue();
9768        }
9769
9770        /**
9771         * @param value A short description of the test used by test engines for tracking and reporting purposes.
9772         */
9773        public TestScriptTestComponent setDescription(String value) { 
9774          if (Utilities.noString(value))
9775            this.description = null;
9776          else {
9777            if (this.description == null)
9778              this.description = new StringType();
9779            this.description.setValue(value);
9780          }
9781          return this;
9782        }
9783
9784        /**
9785         * @return {@link #action} (Action would contain either an operation or an assertion.)
9786         */
9787        public List<TestActionComponent> getAction() { 
9788          if (this.action == null)
9789            this.action = new ArrayList<TestActionComponent>();
9790          return this.action;
9791        }
9792
9793        /**
9794         * @return Returns a reference to <code>this</code> for easy method chaining
9795         */
9796        public TestScriptTestComponent setAction(List<TestActionComponent> theAction) { 
9797          this.action = theAction;
9798          return this;
9799        }
9800
9801        public boolean hasAction() { 
9802          if (this.action == null)
9803            return false;
9804          for (TestActionComponent item : this.action)
9805            if (!item.isEmpty())
9806              return true;
9807          return false;
9808        }
9809
9810        public TestActionComponent addAction() { //3
9811          TestActionComponent t = new TestActionComponent();
9812          if (this.action == null)
9813            this.action = new ArrayList<TestActionComponent>();
9814          this.action.add(t);
9815          return t;
9816        }
9817
9818        public TestScriptTestComponent addAction(TestActionComponent t) { //3
9819          if (t == null)
9820            return this;
9821          if (this.action == null)
9822            this.action = new ArrayList<TestActionComponent>();
9823          this.action.add(t);
9824          return this;
9825        }
9826
9827        /**
9828         * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist
9829         */
9830        public TestActionComponent getActionFirstRep() { 
9831          if (getAction().isEmpty()) {
9832            addAction();
9833          }
9834          return getAction().get(0);
9835        }
9836
9837        protected void listChildren(List<Property> children) {
9838          super.listChildren(children);
9839          children.add(new Property("name", "string", "The name of this test used for tracking/logging purposes by test engines.", 0, 1, name));
9840          children.add(new Property("description", "string", "A short description of the test used by test engines for tracking and reporting purposes.", 0, 1, description));
9841          children.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action));
9842        }
9843
9844        @Override
9845        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
9846          switch (_hash) {
9847          case 3373707: /*name*/  return new Property("name", "string", "The name of this test used for tracking/logging purposes by test engines.", 0, 1, name);
9848          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);
9849          case -1422950858: /*action*/  return new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action);
9850          default: return super.getNamedProperty(_hash, _name, _checkValid);
9851          }
9852
9853        }
9854
9855      @Override
9856      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
9857        switch (hash) {
9858        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
9859        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
9860        case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // TestActionComponent
9861        default: return super.getProperty(hash, name, checkValid);
9862        }
9863
9864      }
9865
9866      @Override
9867      public Base setProperty(int hash, String name, Base value) throws FHIRException {
9868        switch (hash) {
9869        case 3373707: // name
9870          this.name = castToString(value); // StringType
9871          return value;
9872        case -1724546052: // description
9873          this.description = castToString(value); // StringType
9874          return value;
9875        case -1422950858: // action
9876          this.getAction().add((TestActionComponent) value); // TestActionComponent
9877          return value;
9878        default: return super.setProperty(hash, name, value);
9879        }
9880
9881      }
9882
9883      @Override
9884      public Base setProperty(String name, Base value) throws FHIRException {
9885        if (name.equals("name")) {
9886          this.name = castToString(value); // StringType
9887        } else if (name.equals("description")) {
9888          this.description = castToString(value); // StringType
9889        } else if (name.equals("action")) {
9890          this.getAction().add((TestActionComponent) value);
9891        } else
9892          return super.setProperty(name, value);
9893        return value;
9894      }
9895
9896      @Override
9897      public Base makeProperty(int hash, String name) throws FHIRException {
9898        switch (hash) {
9899        case 3373707:  return getNameElement();
9900        case -1724546052:  return getDescriptionElement();
9901        case -1422950858:  return addAction(); 
9902        default: return super.makeProperty(hash, name);
9903        }
9904
9905      }
9906
9907      @Override
9908      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
9909        switch (hash) {
9910        case 3373707: /*name*/ return new String[] {"string"};
9911        case -1724546052: /*description*/ return new String[] {"string"};
9912        case -1422950858: /*action*/ return new String[] {};
9913        default: return super.getTypesForProperty(hash, name);
9914        }
9915
9916      }
9917
9918      @Override
9919      public Base addChild(String name) throws FHIRException {
9920        if (name.equals("name")) {
9921          throw new FHIRException("Cannot call addChild on a singleton property TestScript.name");
9922        }
9923        else if (name.equals("description")) {
9924          throw new FHIRException("Cannot call addChild on a singleton property TestScript.description");
9925        }
9926        else if (name.equals("action")) {
9927          return addAction();
9928        }
9929        else
9930          return super.addChild(name);
9931      }
9932
9933      public TestScriptTestComponent copy() {
9934        TestScriptTestComponent dst = new TestScriptTestComponent();
9935        copyValues(dst);
9936        dst.name = name == null ? null : name.copy();
9937        dst.description = description == null ? null : description.copy();
9938        if (action != null) {
9939          dst.action = new ArrayList<TestActionComponent>();
9940          for (TestActionComponent i : action)
9941            dst.action.add(i.copy());
9942        };
9943        return dst;
9944      }
9945
9946      @Override
9947      public boolean equalsDeep(Base other_) {
9948        if (!super.equalsDeep(other_))
9949          return false;
9950        if (!(other_ instanceof TestScriptTestComponent))
9951          return false;
9952        TestScriptTestComponent o = (TestScriptTestComponent) other_;
9953        return compareDeep(name, o.name, true) && compareDeep(description, o.description, true) && compareDeep(action, o.action, true)
9954          ;
9955      }
9956
9957      @Override
9958      public boolean equalsShallow(Base other_) {
9959        if (!super.equalsShallow(other_))
9960          return false;
9961        if (!(other_ instanceof TestScriptTestComponent))
9962          return false;
9963        TestScriptTestComponent o = (TestScriptTestComponent) other_;
9964        return compareValues(name, o.name, true) && compareValues(description, o.description, true);
9965      }
9966
9967      public boolean isEmpty() {
9968        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, description, action
9969          );
9970      }
9971
9972  public String fhirType() {
9973    return "TestScript.test";
9974
9975  }
9976
9977  }
9978
9979    @Block()
9980    public static class TestActionComponent extends BackboneElement implements IBaseBackboneElement {
9981        /**
9982         * An operation would involve a REST request to a server.
9983         */
9984        @Child(name = "operation", type = {SetupActionOperationComponent.class}, order=1, min=0, max=1, modifier=false, summary=false)
9985        @Description(shortDefinition="The setup operation to perform", formalDefinition="An operation would involve a REST request to a server." )
9986        protected SetupActionOperationComponent operation;
9987
9988        /**
9989         * Evaluates the results of previous operations to determine if the server under test behaves appropriately.
9990         */
9991        @Child(name = "assert", type = {SetupActionAssertComponent.class}, order=2, min=0, max=1, modifier=false, summary=false)
9992        @Description(shortDefinition="The setup assertion to perform", formalDefinition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." )
9993        protected SetupActionAssertComponent assert_;
9994
9995        private static final long serialVersionUID = -252088305L;
9996
9997    /**
9998     * Constructor
9999     */
10000      public TestActionComponent() {
10001        super();
10002      }
10003
10004        /**
10005         * @return {@link #operation} (An operation would involve a REST request to a server.)
10006         */
10007        public SetupActionOperationComponent getOperation() { 
10008          if (this.operation == null)
10009            if (Configuration.errorOnAutoCreate())
10010              throw new Error("Attempt to auto-create TestActionComponent.operation");
10011            else if (Configuration.doAutoCreate())
10012              this.operation = new SetupActionOperationComponent(); // cc
10013          return this.operation;
10014        }
10015
10016        public boolean hasOperation() { 
10017          return this.operation != null && !this.operation.isEmpty();
10018        }
10019
10020        /**
10021         * @param value {@link #operation} (An operation would involve a REST request to a server.)
10022         */
10023        public TestActionComponent setOperation(SetupActionOperationComponent value)  { 
10024          this.operation = value;
10025          return this;
10026        }
10027
10028        /**
10029         * @return {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.)
10030         */
10031        public SetupActionAssertComponent getAssert() { 
10032          if (this.assert_ == null)
10033            if (Configuration.errorOnAutoCreate())
10034              throw new Error("Attempt to auto-create TestActionComponent.assert_");
10035            else if (Configuration.doAutoCreate())
10036              this.assert_ = new SetupActionAssertComponent(); // cc
10037          return this.assert_;
10038        }
10039
10040        public boolean hasAssert() { 
10041          return this.assert_ != null && !this.assert_.isEmpty();
10042        }
10043
10044        /**
10045         * @param value {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.)
10046         */
10047        public TestActionComponent setAssert(SetupActionAssertComponent value)  { 
10048          this.assert_ = value;
10049          return this;
10050        }
10051
10052        protected void listChildren(List<Property> children) {
10053          super.listChildren(children);
10054          children.add(new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation));
10055          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_));
10056        }
10057
10058        @Override
10059        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
10060          switch (_hash) {
10061          case 1662702951: /*operation*/  return new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation);
10062          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_);
10063          default: return super.getNamedProperty(_hash, _name, _checkValid);
10064          }
10065
10066        }
10067
10068      @Override
10069      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
10070        switch (hash) {
10071        case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent
10072        case -1408208058: /*assert*/ return this.assert_ == null ? new Base[0] : new Base[] {this.assert_}; // SetupActionAssertComponent
10073        default: return super.getProperty(hash, name, checkValid);
10074        }
10075
10076      }
10077
10078      @Override
10079      public Base setProperty(int hash, String name, Base value) throws FHIRException {
10080        switch (hash) {
10081        case 1662702951: // operation
10082          this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
10083          return value;
10084        case -1408208058: // assert
10085          this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
10086          return value;
10087        default: return super.setProperty(hash, name, value);
10088        }
10089
10090      }
10091
10092      @Override
10093      public Base setProperty(String name, Base value) throws FHIRException {
10094        if (name.equals("operation")) {
10095          this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
10096        } else if (name.equals("assert")) {
10097          this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent
10098        } else
10099          return super.setProperty(name, value);
10100        return value;
10101      }
10102
10103      @Override
10104      public Base makeProperty(int hash, String name) throws FHIRException {
10105        switch (hash) {
10106        case 1662702951:  return getOperation(); 
10107        case -1408208058:  return getAssert(); 
10108        default: return super.makeProperty(hash, name);
10109        }
10110
10111      }
10112
10113      @Override
10114      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
10115        switch (hash) {
10116        case 1662702951: /*operation*/ return new String[] {"@TestScript.setup.action.operation"};
10117        case -1408208058: /*assert*/ return new String[] {"@TestScript.setup.action.assert"};
10118        default: return super.getTypesForProperty(hash, name);
10119        }
10120
10121      }
10122
10123      @Override
10124      public Base addChild(String name) throws FHIRException {
10125        if (name.equals("operation")) {
10126          this.operation = new SetupActionOperationComponent();
10127          return this.operation;
10128        }
10129        else if (name.equals("assert")) {
10130          this.assert_ = new SetupActionAssertComponent();
10131          return this.assert_;
10132        }
10133        else
10134          return super.addChild(name);
10135      }
10136
10137      public TestActionComponent copy() {
10138        TestActionComponent dst = new TestActionComponent();
10139        copyValues(dst);
10140        dst.operation = operation == null ? null : operation.copy();
10141        dst.assert_ = assert_ == null ? null : assert_.copy();
10142        return dst;
10143      }
10144
10145      @Override
10146      public boolean equalsDeep(Base other_) {
10147        if (!super.equalsDeep(other_))
10148          return false;
10149        if (!(other_ instanceof TestActionComponent))
10150          return false;
10151        TestActionComponent o = (TestActionComponent) other_;
10152        return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true);
10153      }
10154
10155      @Override
10156      public boolean equalsShallow(Base other_) {
10157        if (!super.equalsShallow(other_))
10158          return false;
10159        if (!(other_ instanceof TestActionComponent))
10160          return false;
10161        TestActionComponent o = (TestActionComponent) other_;
10162        return true;
10163      }
10164
10165      public boolean isEmpty() {
10166        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation, assert_);
10167      }
10168
10169  public String fhirType() {
10170    return "TestScript.test.action";
10171
10172  }
10173
10174  }
10175
10176    @Block()
10177    public static class TestScriptTeardownComponent extends BackboneElement implements IBaseBackboneElement {
10178        /**
10179         * The teardown action will only contain an operation.
10180         */
10181        @Child(name = "action", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
10182        @Description(shortDefinition="One or more teardown operations to perform", formalDefinition="The teardown action will only contain an operation." )
10183        protected List<TeardownActionComponent> action;
10184
10185        private static final long serialVersionUID = 1168638089L;
10186
10187    /**
10188     * Constructor
10189     */
10190      public TestScriptTeardownComponent() {
10191        super();
10192      }
10193
10194        /**
10195         * @return {@link #action} (The teardown action will only contain an operation.)
10196         */
10197        public List<TeardownActionComponent> getAction() { 
10198          if (this.action == null)
10199            this.action = new ArrayList<TeardownActionComponent>();
10200          return this.action;
10201        }
10202
10203        /**
10204         * @return Returns a reference to <code>this</code> for easy method chaining
10205         */
10206        public TestScriptTeardownComponent setAction(List<TeardownActionComponent> theAction) { 
10207          this.action = theAction;
10208          return this;
10209        }
10210
10211        public boolean hasAction() { 
10212          if (this.action == null)
10213            return false;
10214          for (TeardownActionComponent item : this.action)
10215            if (!item.isEmpty())
10216              return true;
10217          return false;
10218        }
10219
10220        public TeardownActionComponent addAction() { //3
10221          TeardownActionComponent t = new TeardownActionComponent();
10222          if (this.action == null)
10223            this.action = new ArrayList<TeardownActionComponent>();
10224          this.action.add(t);
10225          return t;
10226        }
10227
10228        public TestScriptTeardownComponent addAction(TeardownActionComponent t) { //3
10229          if (t == null)
10230            return this;
10231          if (this.action == null)
10232            this.action = new ArrayList<TeardownActionComponent>();
10233          this.action.add(t);
10234          return this;
10235        }
10236
10237        /**
10238         * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist
10239         */
10240        public TeardownActionComponent getActionFirstRep() { 
10241          if (getAction().isEmpty()) {
10242            addAction();
10243          }
10244          return getAction().get(0);
10245        }
10246
10247        protected void listChildren(List<Property> children) {
10248          super.listChildren(children);
10249          children.add(new Property("action", "", "The teardown action will only contain an operation.", 0, java.lang.Integer.MAX_VALUE, action));
10250        }
10251
10252        @Override
10253        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
10254          switch (_hash) {
10255          case -1422950858: /*action*/  return new Property("action", "", "The teardown action will only contain an operation.", 0, java.lang.Integer.MAX_VALUE, action);
10256          default: return super.getNamedProperty(_hash, _name, _checkValid);
10257          }
10258
10259        }
10260
10261      @Override
10262      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
10263        switch (hash) {
10264        case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // TeardownActionComponent
10265        default: return super.getProperty(hash, name, checkValid);
10266        }
10267
10268      }
10269
10270      @Override
10271      public Base setProperty(int hash, String name, Base value) throws FHIRException {
10272        switch (hash) {
10273        case -1422950858: // action
10274          this.getAction().add((TeardownActionComponent) value); // TeardownActionComponent
10275          return value;
10276        default: return super.setProperty(hash, name, value);
10277        }
10278
10279      }
10280
10281      @Override
10282      public Base setProperty(String name, Base value) throws FHIRException {
10283        if (name.equals("action")) {
10284          this.getAction().add((TeardownActionComponent) value);
10285        } else
10286          return super.setProperty(name, value);
10287        return value;
10288      }
10289
10290      @Override
10291      public Base makeProperty(int hash, String name) throws FHIRException {
10292        switch (hash) {
10293        case -1422950858:  return addAction(); 
10294        default: return super.makeProperty(hash, name);
10295        }
10296
10297      }
10298
10299      @Override
10300      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
10301        switch (hash) {
10302        case -1422950858: /*action*/ return new String[] {};
10303        default: return super.getTypesForProperty(hash, name);
10304        }
10305
10306      }
10307
10308      @Override
10309      public Base addChild(String name) throws FHIRException {
10310        if (name.equals("action")) {
10311          return addAction();
10312        }
10313        else
10314          return super.addChild(name);
10315      }
10316
10317      public TestScriptTeardownComponent copy() {
10318        TestScriptTeardownComponent dst = new TestScriptTeardownComponent();
10319        copyValues(dst);
10320        if (action != null) {
10321          dst.action = new ArrayList<TeardownActionComponent>();
10322          for (TeardownActionComponent i : action)
10323            dst.action.add(i.copy());
10324        };
10325        return dst;
10326      }
10327
10328      @Override
10329      public boolean equalsDeep(Base other_) {
10330        if (!super.equalsDeep(other_))
10331          return false;
10332        if (!(other_ instanceof TestScriptTeardownComponent))
10333          return false;
10334        TestScriptTeardownComponent o = (TestScriptTeardownComponent) other_;
10335        return compareDeep(action, o.action, true);
10336      }
10337
10338      @Override
10339      public boolean equalsShallow(Base other_) {
10340        if (!super.equalsShallow(other_))
10341          return false;
10342        if (!(other_ instanceof TestScriptTeardownComponent))
10343          return false;
10344        TestScriptTeardownComponent o = (TestScriptTeardownComponent) other_;
10345        return true;
10346      }
10347
10348      public boolean isEmpty() {
10349        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(action);
10350      }
10351
10352  public String fhirType() {
10353    return "TestScript.teardown";
10354
10355  }
10356
10357  }
10358
10359    @Block()
10360    public static class TeardownActionComponent extends BackboneElement implements IBaseBackboneElement {
10361        /**
10362         * An operation would involve a REST request to a server.
10363         */
10364        @Child(name = "operation", type = {SetupActionOperationComponent.class}, order=1, min=1, max=1, modifier=false, summary=false)
10365        @Description(shortDefinition="The teardown operation to perform", formalDefinition="An operation would involve a REST request to a server." )
10366        protected SetupActionOperationComponent operation;
10367
10368        private static final long serialVersionUID = -1099598054L;
10369
10370    /**
10371     * Constructor
10372     */
10373      public TeardownActionComponent() {
10374        super();
10375      }
10376
10377    /**
10378     * Constructor
10379     */
10380      public TeardownActionComponent(SetupActionOperationComponent operation) {
10381        super();
10382        this.operation = operation;
10383      }
10384
10385        /**
10386         * @return {@link #operation} (An operation would involve a REST request to a server.)
10387         */
10388        public SetupActionOperationComponent getOperation() { 
10389          if (this.operation == null)
10390            if (Configuration.errorOnAutoCreate())
10391              throw new Error("Attempt to auto-create TeardownActionComponent.operation");
10392            else if (Configuration.doAutoCreate())
10393              this.operation = new SetupActionOperationComponent(); // cc
10394          return this.operation;
10395        }
10396
10397        public boolean hasOperation() { 
10398          return this.operation != null && !this.operation.isEmpty();
10399        }
10400
10401        /**
10402         * @param value {@link #operation} (An operation would involve a REST request to a server.)
10403         */
10404        public TeardownActionComponent setOperation(SetupActionOperationComponent value)  { 
10405          this.operation = value;
10406          return this;
10407        }
10408
10409        protected void listChildren(List<Property> children) {
10410          super.listChildren(children);
10411          children.add(new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation));
10412        }
10413
10414        @Override
10415        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
10416          switch (_hash) {
10417          case 1662702951: /*operation*/  return new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation);
10418          default: return super.getNamedProperty(_hash, _name, _checkValid);
10419          }
10420
10421        }
10422
10423      @Override
10424      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
10425        switch (hash) {
10426        case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent
10427        default: return super.getProperty(hash, name, checkValid);
10428        }
10429
10430      }
10431
10432      @Override
10433      public Base setProperty(int hash, String name, Base value) throws FHIRException {
10434        switch (hash) {
10435        case 1662702951: // operation
10436          this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
10437          return value;
10438        default: return super.setProperty(hash, name, value);
10439        }
10440
10441      }
10442
10443      @Override
10444      public Base setProperty(String name, Base value) throws FHIRException {
10445        if (name.equals("operation")) {
10446          this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent
10447        } else
10448          return super.setProperty(name, value);
10449        return value;
10450      }
10451
10452      @Override
10453      public Base makeProperty(int hash, String name) throws FHIRException {
10454        switch (hash) {
10455        case 1662702951:  return getOperation(); 
10456        default: return super.makeProperty(hash, name);
10457        }
10458
10459      }
10460
10461      @Override
10462      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
10463        switch (hash) {
10464        case 1662702951: /*operation*/ return new String[] {"@TestScript.setup.action.operation"};
10465        default: return super.getTypesForProperty(hash, name);
10466        }
10467
10468      }
10469
10470      @Override
10471      public Base addChild(String name) throws FHIRException {
10472        if (name.equals("operation")) {
10473          this.operation = new SetupActionOperationComponent();
10474          return this.operation;
10475        }
10476        else
10477          return super.addChild(name);
10478      }
10479
10480      public TeardownActionComponent copy() {
10481        TeardownActionComponent dst = new TeardownActionComponent();
10482        copyValues(dst);
10483        dst.operation = operation == null ? null : operation.copy();
10484        return dst;
10485      }
10486
10487      @Override
10488      public boolean equalsDeep(Base other_) {
10489        if (!super.equalsDeep(other_))
10490          return false;
10491        if (!(other_ instanceof TeardownActionComponent))
10492          return false;
10493        TeardownActionComponent o = (TeardownActionComponent) other_;
10494        return compareDeep(operation, o.operation, true);
10495      }
10496
10497      @Override
10498      public boolean equalsShallow(Base other_) {
10499        if (!super.equalsShallow(other_))
10500          return false;
10501        if (!(other_ instanceof TeardownActionComponent))
10502          return false;
10503        TeardownActionComponent o = (TeardownActionComponent) other_;
10504        return true;
10505      }
10506
10507      public boolean isEmpty() {
10508        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation);
10509      }
10510
10511  public String fhirType() {
10512    return "TestScript.teardown.action";
10513
10514  }
10515
10516  }
10517
10518    /**
10519     * 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.
10520     */
10521    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true)
10522    @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." )
10523    protected Identifier identifier;
10524
10525    /**
10526     * Explaination of why this test script is needed and why it has been designed as it has.
10527     */
10528    @Child(name = "purpose", type = {MarkdownType.class}, order=1, min=0, max=1, modifier=false, summary=false)
10529    @Description(shortDefinition="Why this test script is defined", formalDefinition="Explaination of why this test script is needed and why it has been designed as it has." )
10530    protected MarkdownType purpose;
10531
10532    /**
10533     * 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.
10534     */
10535    @Child(name = "copyright", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false)
10536    @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." )
10537    protected MarkdownType copyright;
10538
10539    /**
10540     * An abstract server used in operations within this test script in the origin element.
10541     */
10542    @Child(name = "origin", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
10543    @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." )
10544    protected List<TestScriptOriginComponent> origin;
10545
10546    /**
10547     * An abstract server used in operations within this test script in the destination element.
10548     */
10549    @Child(name = "destination", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
10550    @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." )
10551    protected List<TestScriptDestinationComponent> destination;
10552
10553    /**
10554     * The required capability must exist and are assumed to function correctly on the FHIR server being tested.
10555     */
10556    @Child(name = "metadata", type = {}, order=5, min=0, max=1, modifier=false, summary=false)
10557    @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." )
10558    protected TestScriptMetadataComponent metadata;
10559
10560    /**
10561     * Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.
10562     */
10563    @Child(name = "fixture", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
10564    @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." )
10565    protected List<TestScriptFixtureComponent> fixture;
10566
10567    /**
10568     * Reference to the profile to be used for validation.
10569     */
10570    @Child(name = "profile", type = {Reference.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
10571    @Description(shortDefinition="Reference of the validation profile", formalDefinition="Reference to the profile to be used for validation." )
10572    protected List<Reference> profile;
10573    /**
10574     * The actual objects that are the target of the reference (Reference to the profile to be used for validation.)
10575     */
10576    protected List<Resource> profileTarget;
10577
10578
10579    /**
10580     * Variable is set based either on element value in response body or on header field value in the response headers.
10581     */
10582    @Child(name = "variable", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
10583    @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." )
10584    protected List<TestScriptVariableComponent> variable;
10585
10586    /**
10587     * Assert rule to be used in one or more asserts within the test script.
10588     */
10589    @Child(name = "rule", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
10590    @Description(shortDefinition="Assert rule used within the test script", formalDefinition="Assert rule to be used in one or more asserts within the test script." )
10591    protected List<TestScriptRuleComponent> rule;
10592
10593    /**
10594     * Contains one or more rules.  Offers a way to group rules so assertions could reference the group of rules and have them all applied.
10595     */
10596    @Child(name = "ruleset", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
10597    @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." )
10598    protected List<TestScriptRulesetComponent> ruleset;
10599
10600    /**
10601     * A series of required setup operations before tests are executed.
10602     */
10603    @Child(name = "setup", type = {}, order=11, min=0, max=1, modifier=false, summary=false)
10604    @Description(shortDefinition="A series of required setup operations before tests are executed", formalDefinition="A series of required setup operations before tests are executed." )
10605    protected TestScriptSetupComponent setup;
10606
10607    /**
10608     * A test in this script.
10609     */
10610    @Child(name = "test", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
10611    @Description(shortDefinition="A test in this script", formalDefinition="A test in this script." )
10612    protected List<TestScriptTestComponent> test;
10613
10614    /**
10615     * A series of operations required to clean up after the all the tests are executed (successfully or otherwise).
10616     */
10617    @Child(name = "teardown", type = {}, order=13, min=0, max=1, modifier=false, summary=false)
10618    @Description(shortDefinition="A series of required clean up steps", formalDefinition="A series of operations required to clean up after the all the tests are executed (successfully or otherwise)." )
10619    protected TestScriptTeardownComponent teardown;
10620
10621    private static final long serialVersionUID = 1164952373L;
10622
10623  /**
10624   * Constructor
10625   */
10626    public TestScript() {
10627      super();
10628    }
10629
10630  /**
10631   * Constructor
10632   */
10633    public TestScript(UriType url, StringType name, Enumeration<PublicationStatus> status) {
10634      super();
10635      this.url = url;
10636      this.name = name;
10637      this.status = status;
10638    }
10639
10640    /**
10641     * @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. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
10642     */
10643    public UriType getUrlElement() { 
10644      if (this.url == null)
10645        if (Configuration.errorOnAutoCreate())
10646          throw new Error("Attempt to auto-create TestScript.url");
10647        else if (Configuration.doAutoCreate())
10648          this.url = new UriType(); // bb
10649      return this.url;
10650    }
10651
10652    public boolean hasUrlElement() { 
10653      return this.url != null && !this.url.isEmpty();
10654    }
10655
10656    public boolean hasUrl() { 
10657      return this.url != null && !this.url.isEmpty();
10658    }
10659
10660    /**
10661     * @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. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
10662     */
10663    public TestScript setUrlElement(UriType value) { 
10664      this.url = value;
10665      return this;
10666    }
10667
10668    /**
10669     * @return An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).
10670     */
10671    public String getUrl() { 
10672      return this.url == null ? null : this.url.getValue();
10673    }
10674
10675    /**
10676     * @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. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).
10677     */
10678    public TestScript setUrl(String value) { 
10679        if (this.url == null)
10680          this.url = new UriType();
10681        this.url.setValue(value);
10682      return this;
10683    }
10684
10685    /**
10686     * @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.)
10687     */
10688    public Identifier getIdentifier() { 
10689      if (this.identifier == null)
10690        if (Configuration.errorOnAutoCreate())
10691          throw new Error("Attempt to auto-create TestScript.identifier");
10692        else if (Configuration.doAutoCreate())
10693          this.identifier = new Identifier(); // cc
10694      return this.identifier;
10695    }
10696
10697    public boolean hasIdentifier() { 
10698      return this.identifier != null && !this.identifier.isEmpty();
10699    }
10700
10701    /**
10702     * @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.)
10703     */
10704    public TestScript setIdentifier(Identifier value)  { 
10705      this.identifier = value;
10706      return this;
10707    }
10708
10709    /**
10710     * @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
10711     */
10712    public StringType getVersionElement() { 
10713      if (this.version == null)
10714        if (Configuration.errorOnAutoCreate())
10715          throw new Error("Attempt to auto-create TestScript.version");
10716        else if (Configuration.doAutoCreate())
10717          this.version = new StringType(); // bb
10718      return this.version;
10719    }
10720
10721    public boolean hasVersionElement() { 
10722      return this.version != null && !this.version.isEmpty();
10723    }
10724
10725    public boolean hasVersion() { 
10726      return this.version != null && !this.version.isEmpty();
10727    }
10728
10729    /**
10730     * @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
10731     */
10732    public TestScript setVersionElement(StringType value) { 
10733      this.version = value;
10734      return this;
10735    }
10736
10737    /**
10738     * @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.
10739     */
10740    public String getVersion() { 
10741      return this.version == null ? null : this.version.getValue();
10742    }
10743
10744    /**
10745     * @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.
10746     */
10747    public TestScript setVersion(String value) { 
10748      if (Utilities.noString(value))
10749        this.version = null;
10750      else {
10751        if (this.version == null)
10752          this.version = new StringType();
10753        this.version.setValue(value);
10754      }
10755      return this;
10756    }
10757
10758    /**
10759     * @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
10760     */
10761    public StringType getNameElement() { 
10762      if (this.name == null)
10763        if (Configuration.errorOnAutoCreate())
10764          throw new Error("Attempt to auto-create TestScript.name");
10765        else if (Configuration.doAutoCreate())
10766          this.name = new StringType(); // bb
10767      return this.name;
10768    }
10769
10770    public boolean hasNameElement() { 
10771      return this.name != null && !this.name.isEmpty();
10772    }
10773
10774    public boolean hasName() { 
10775      return this.name != null && !this.name.isEmpty();
10776    }
10777
10778    /**
10779     * @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
10780     */
10781    public TestScript setNameElement(StringType value) { 
10782      this.name = value;
10783      return this;
10784    }
10785
10786    /**
10787     * @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.
10788     */
10789    public String getName() { 
10790      return this.name == null ? null : this.name.getValue();
10791    }
10792
10793    /**
10794     * @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.
10795     */
10796    public TestScript setName(String value) { 
10797        if (this.name == null)
10798          this.name = new StringType();
10799        this.name.setValue(value);
10800      return this;
10801    }
10802
10803    /**
10804     * @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
10805     */
10806    public StringType getTitleElement() { 
10807      if (this.title == null)
10808        if (Configuration.errorOnAutoCreate())
10809          throw new Error("Attempt to auto-create TestScript.title");
10810        else if (Configuration.doAutoCreate())
10811          this.title = new StringType(); // bb
10812      return this.title;
10813    }
10814
10815    public boolean hasTitleElement() { 
10816      return this.title != null && !this.title.isEmpty();
10817    }
10818
10819    public boolean hasTitle() { 
10820      return this.title != null && !this.title.isEmpty();
10821    }
10822
10823    /**
10824     * @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
10825     */
10826    public TestScript setTitleElement(StringType value) { 
10827      this.title = value;
10828      return this;
10829    }
10830
10831    /**
10832     * @return A short, descriptive, user-friendly title for the test script.
10833     */
10834    public String getTitle() { 
10835      return this.title == null ? null : this.title.getValue();
10836    }
10837
10838    /**
10839     * @param value A short, descriptive, user-friendly title for the test script.
10840     */
10841    public TestScript setTitle(String value) { 
10842      if (Utilities.noString(value))
10843        this.title = null;
10844      else {
10845        if (this.title == null)
10846          this.title = new StringType();
10847        this.title.setValue(value);
10848      }
10849      return this;
10850    }
10851
10852    /**
10853     * @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
10854     */
10855    public Enumeration<PublicationStatus> getStatusElement() { 
10856      if (this.status == null)
10857        if (Configuration.errorOnAutoCreate())
10858          throw new Error("Attempt to auto-create TestScript.status");
10859        else if (Configuration.doAutoCreate())
10860          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
10861      return this.status;
10862    }
10863
10864    public boolean hasStatusElement() { 
10865      return this.status != null && !this.status.isEmpty();
10866    }
10867
10868    public boolean hasStatus() { 
10869      return this.status != null && !this.status.isEmpty();
10870    }
10871
10872    /**
10873     * @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
10874     */
10875    public TestScript setStatusElement(Enumeration<PublicationStatus> value) { 
10876      this.status = value;
10877      return this;
10878    }
10879
10880    /**
10881     * @return The status of this test script. Enables tracking the life-cycle of the content.
10882     */
10883    public PublicationStatus getStatus() { 
10884      return this.status == null ? null : this.status.getValue();
10885    }
10886
10887    /**
10888     * @param value The status of this test script. Enables tracking the life-cycle of the content.
10889     */
10890    public TestScript setStatus(PublicationStatus value) { 
10891        if (this.status == null)
10892          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
10893        this.status.setValue(value);
10894      return this;
10895    }
10896
10897    /**
10898     * @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
10899     */
10900    public BooleanType getExperimentalElement() { 
10901      if (this.experimental == null)
10902        if (Configuration.errorOnAutoCreate())
10903          throw new Error("Attempt to auto-create TestScript.experimental");
10904        else if (Configuration.doAutoCreate())
10905          this.experimental = new BooleanType(); // bb
10906      return this.experimental;
10907    }
10908
10909    public boolean hasExperimentalElement() { 
10910      return this.experimental != null && !this.experimental.isEmpty();
10911    }
10912
10913    public boolean hasExperimental() { 
10914      return this.experimental != null && !this.experimental.isEmpty();
10915    }
10916
10917    /**
10918     * @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
10919     */
10920    public TestScript setExperimentalElement(BooleanType value) { 
10921      this.experimental = value;
10922      return this;
10923    }
10924
10925    /**
10926     * @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.
10927     */
10928    public boolean getExperimental() { 
10929      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
10930    }
10931
10932    /**
10933     * @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.
10934     */
10935    public TestScript setExperimental(boolean value) { 
10936        if (this.experimental == null)
10937          this.experimental = new BooleanType();
10938        this.experimental.setValue(value);
10939      return this;
10940    }
10941
10942    /**
10943     * @return {@link #date} (The date  (and optionally time) when the test script was published. The date must change if and 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
10944     */
10945    public DateTimeType getDateElement() { 
10946      if (this.date == null)
10947        if (Configuration.errorOnAutoCreate())
10948          throw new Error("Attempt to auto-create TestScript.date");
10949        else if (Configuration.doAutoCreate())
10950          this.date = new DateTimeType(); // bb
10951      return this.date;
10952    }
10953
10954    public boolean hasDateElement() { 
10955      return this.date != null && !this.date.isEmpty();
10956    }
10957
10958    public boolean hasDate() { 
10959      return this.date != null && !this.date.isEmpty();
10960    }
10961
10962    /**
10963     * @param value {@link #date} (The date  (and optionally time) when the test script was published. The date must change if and 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
10964     */
10965    public TestScript setDateElement(DateTimeType value) { 
10966      this.date = value;
10967      return this;
10968    }
10969
10970    /**
10971     * @return The date  (and optionally time) when the test script was published. The date must change if and 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.
10972     */
10973    public Date getDate() { 
10974      return this.date == null ? null : this.date.getValue();
10975    }
10976
10977    /**
10978     * @param value The date  (and optionally time) when the test script was published. The date must change if and 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.
10979     */
10980    public TestScript setDate(Date value) { 
10981      if (value == null)
10982        this.date = null;
10983      else {
10984        if (this.date == null)
10985          this.date = new DateTimeType();
10986        this.date.setValue(value);
10987      }
10988      return this;
10989    }
10990
10991    /**
10992     * @return {@link #publisher} (The name of the individual or organization that published the test script.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
10993     */
10994    public StringType getPublisherElement() { 
10995      if (this.publisher == null)
10996        if (Configuration.errorOnAutoCreate())
10997          throw new Error("Attempt to auto-create TestScript.publisher");
10998        else if (Configuration.doAutoCreate())
10999          this.publisher = new StringType(); // bb
11000      return this.publisher;
11001    }
11002
11003    public boolean hasPublisherElement() { 
11004      return this.publisher != null && !this.publisher.isEmpty();
11005    }
11006
11007    public boolean hasPublisher() { 
11008      return this.publisher != null && !this.publisher.isEmpty();
11009    }
11010
11011    /**
11012     * @param value {@link #publisher} (The name of the individual or organization that published the test script.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
11013     */
11014    public TestScript setPublisherElement(StringType value) { 
11015      this.publisher = value;
11016      return this;
11017    }
11018
11019    /**
11020     * @return The name of the individual or organization that published the test script.
11021     */
11022    public String getPublisher() { 
11023      return this.publisher == null ? null : this.publisher.getValue();
11024    }
11025
11026    /**
11027     * @param value The name of the individual or organization that published the test script.
11028     */
11029    public TestScript setPublisher(String value) { 
11030      if (Utilities.noString(value))
11031        this.publisher = null;
11032      else {
11033        if (this.publisher == null)
11034          this.publisher = new StringType();
11035        this.publisher.setValue(value);
11036      }
11037      return this;
11038    }
11039
11040    /**
11041     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
11042     */
11043    public List<ContactDetail> getContact() { 
11044      if (this.contact == null)
11045        this.contact = new ArrayList<ContactDetail>();
11046      return this.contact;
11047    }
11048
11049    /**
11050     * @return Returns a reference to <code>this</code> for easy method chaining
11051     */
11052    public TestScript setContact(List<ContactDetail> theContact) { 
11053      this.contact = theContact;
11054      return this;
11055    }
11056
11057    public boolean hasContact() { 
11058      if (this.contact == null)
11059        return false;
11060      for (ContactDetail item : this.contact)
11061        if (!item.isEmpty())
11062          return true;
11063      return false;
11064    }
11065
11066    public ContactDetail addContact() { //3
11067      ContactDetail t = new ContactDetail();
11068      if (this.contact == null)
11069        this.contact = new ArrayList<ContactDetail>();
11070      this.contact.add(t);
11071      return t;
11072    }
11073
11074    public TestScript addContact(ContactDetail t) { //3
11075      if (t == null)
11076        return this;
11077      if (this.contact == null)
11078        this.contact = new ArrayList<ContactDetail>();
11079      this.contact.add(t);
11080      return this;
11081    }
11082
11083    /**
11084     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
11085     */
11086    public ContactDetail getContactFirstRep() { 
11087      if (getContact().isEmpty()) {
11088        addContact();
11089      }
11090      return getContact().get(0);
11091    }
11092
11093    /**
11094     * @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
11095     */
11096    public MarkdownType getDescriptionElement() { 
11097      if (this.description == null)
11098        if (Configuration.errorOnAutoCreate())
11099          throw new Error("Attempt to auto-create TestScript.description");
11100        else if (Configuration.doAutoCreate())
11101          this.description = new MarkdownType(); // bb
11102      return this.description;
11103    }
11104
11105    public boolean hasDescriptionElement() { 
11106      return this.description != null && !this.description.isEmpty();
11107    }
11108
11109    public boolean hasDescription() { 
11110      return this.description != null && !this.description.isEmpty();
11111    }
11112
11113    /**
11114     * @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
11115     */
11116    public TestScript setDescriptionElement(MarkdownType value) { 
11117      this.description = value;
11118      return this;
11119    }
11120
11121    /**
11122     * @return A free text natural language description of the test script from a consumer's perspective.
11123     */
11124    public String getDescription() { 
11125      return this.description == null ? null : this.description.getValue();
11126    }
11127
11128    /**
11129     * @param value A free text natural language description of the test script from a consumer's perspective.
11130     */
11131    public TestScript setDescription(String value) { 
11132      if (value == null)
11133        this.description = null;
11134      else {
11135        if (this.description == null)
11136          this.description = new MarkdownType();
11137        this.description.setValue(value);
11138      }
11139      return this;
11140    }
11141
11142    /**
11143     * @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.)
11144     */
11145    public List<UsageContext> getUseContext() { 
11146      if (this.useContext == null)
11147        this.useContext = new ArrayList<UsageContext>();
11148      return this.useContext;
11149    }
11150
11151    /**
11152     * @return Returns a reference to <code>this</code> for easy method chaining
11153     */
11154    public TestScript setUseContext(List<UsageContext> theUseContext) { 
11155      this.useContext = theUseContext;
11156      return this;
11157    }
11158
11159    public boolean hasUseContext() { 
11160      if (this.useContext == null)
11161        return false;
11162      for (UsageContext item : this.useContext)
11163        if (!item.isEmpty())
11164          return true;
11165      return false;
11166    }
11167
11168    public UsageContext addUseContext() { //3
11169      UsageContext t = new UsageContext();
11170      if (this.useContext == null)
11171        this.useContext = new ArrayList<UsageContext>();
11172      this.useContext.add(t);
11173      return t;
11174    }
11175
11176    public TestScript addUseContext(UsageContext t) { //3
11177      if (t == null)
11178        return this;
11179      if (this.useContext == null)
11180        this.useContext = new ArrayList<UsageContext>();
11181      this.useContext.add(t);
11182      return this;
11183    }
11184
11185    /**
11186     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist
11187     */
11188    public UsageContext getUseContextFirstRep() { 
11189      if (getUseContext().isEmpty()) {
11190        addUseContext();
11191      }
11192      return getUseContext().get(0);
11193    }
11194
11195    /**
11196     * @return {@link #jurisdiction} (A legal or geographic region in which the test script is intended to be used.)
11197     */
11198    public List<CodeableConcept> getJurisdiction() { 
11199      if (this.jurisdiction == null)
11200        this.jurisdiction = new ArrayList<CodeableConcept>();
11201      return this.jurisdiction;
11202    }
11203
11204    /**
11205     * @return Returns a reference to <code>this</code> for easy method chaining
11206     */
11207    public TestScript setJurisdiction(List<CodeableConcept> theJurisdiction) { 
11208      this.jurisdiction = theJurisdiction;
11209      return this;
11210    }
11211
11212    public boolean hasJurisdiction() { 
11213      if (this.jurisdiction == null)
11214        return false;
11215      for (CodeableConcept item : this.jurisdiction)
11216        if (!item.isEmpty())
11217          return true;
11218      return false;
11219    }
11220
11221    public CodeableConcept addJurisdiction() { //3
11222      CodeableConcept t = new CodeableConcept();
11223      if (this.jurisdiction == null)
11224        this.jurisdiction = new ArrayList<CodeableConcept>();
11225      this.jurisdiction.add(t);
11226      return t;
11227    }
11228
11229    public TestScript addJurisdiction(CodeableConcept t) { //3
11230      if (t == null)
11231        return this;
11232      if (this.jurisdiction == null)
11233        this.jurisdiction = new ArrayList<CodeableConcept>();
11234      this.jurisdiction.add(t);
11235      return this;
11236    }
11237
11238    /**
11239     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist
11240     */
11241    public CodeableConcept getJurisdictionFirstRep() { 
11242      if (getJurisdiction().isEmpty()) {
11243        addJurisdiction();
11244      }
11245      return getJurisdiction().get(0);
11246    }
11247
11248    /**
11249     * @return {@link #purpose} (Explaination 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
11250     */
11251    public MarkdownType getPurposeElement() { 
11252      if (this.purpose == null)
11253        if (Configuration.errorOnAutoCreate())
11254          throw new Error("Attempt to auto-create TestScript.purpose");
11255        else if (Configuration.doAutoCreate())
11256          this.purpose = new MarkdownType(); // bb
11257      return this.purpose;
11258    }
11259
11260    public boolean hasPurposeElement() { 
11261      return this.purpose != null && !this.purpose.isEmpty();
11262    }
11263
11264    public boolean hasPurpose() { 
11265      return this.purpose != null && !this.purpose.isEmpty();
11266    }
11267
11268    /**
11269     * @param value {@link #purpose} (Explaination 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
11270     */
11271    public TestScript setPurposeElement(MarkdownType value) { 
11272      this.purpose = value;
11273      return this;
11274    }
11275
11276    /**
11277     * @return Explaination of why this test script is needed and why it has been designed as it has.
11278     */
11279    public String getPurpose() { 
11280      return this.purpose == null ? null : this.purpose.getValue();
11281    }
11282
11283    /**
11284     * @param value Explaination of why this test script is needed and why it has been designed as it has.
11285     */
11286    public TestScript setPurpose(String value) { 
11287      if (value == null)
11288        this.purpose = null;
11289      else {
11290        if (this.purpose == null)
11291          this.purpose = new MarkdownType();
11292        this.purpose.setValue(value);
11293      }
11294      return this;
11295    }
11296
11297    /**
11298     * @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
11299     */
11300    public MarkdownType getCopyrightElement() { 
11301      if (this.copyright == null)
11302        if (Configuration.errorOnAutoCreate())
11303          throw new Error("Attempt to auto-create TestScript.copyright");
11304        else if (Configuration.doAutoCreate())
11305          this.copyright = new MarkdownType(); // bb
11306      return this.copyright;
11307    }
11308
11309    public boolean hasCopyrightElement() { 
11310      return this.copyright != null && !this.copyright.isEmpty();
11311    }
11312
11313    public boolean hasCopyright() { 
11314      return this.copyright != null && !this.copyright.isEmpty();
11315    }
11316
11317    /**
11318     * @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
11319     */
11320    public TestScript setCopyrightElement(MarkdownType value) { 
11321      this.copyright = value;
11322      return this;
11323    }
11324
11325    /**
11326     * @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.
11327     */
11328    public String getCopyright() { 
11329      return this.copyright == null ? null : this.copyright.getValue();
11330    }
11331
11332    /**
11333     * @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.
11334     */
11335    public TestScript setCopyright(String value) { 
11336      if (value == null)
11337        this.copyright = null;
11338      else {
11339        if (this.copyright == null)
11340          this.copyright = new MarkdownType();
11341        this.copyright.setValue(value);
11342      }
11343      return this;
11344    }
11345
11346    /**
11347     * @return {@link #origin} (An abstract server used in operations within this test script in the origin element.)
11348     */
11349    public List<TestScriptOriginComponent> getOrigin() { 
11350      if (this.origin == null)
11351        this.origin = new ArrayList<TestScriptOriginComponent>();
11352      return this.origin;
11353    }
11354
11355    /**
11356     * @return Returns a reference to <code>this</code> for easy method chaining
11357     */
11358    public TestScript setOrigin(List<TestScriptOriginComponent> theOrigin) { 
11359      this.origin = theOrigin;
11360      return this;
11361    }
11362
11363    public boolean hasOrigin() { 
11364      if (this.origin == null)
11365        return false;
11366      for (TestScriptOriginComponent item : this.origin)
11367        if (!item.isEmpty())
11368          return true;
11369      return false;
11370    }
11371
11372    public TestScriptOriginComponent addOrigin() { //3
11373      TestScriptOriginComponent t = new TestScriptOriginComponent();
11374      if (this.origin == null)
11375        this.origin = new ArrayList<TestScriptOriginComponent>();
11376      this.origin.add(t);
11377      return t;
11378    }
11379
11380    public TestScript addOrigin(TestScriptOriginComponent t) { //3
11381      if (t == null)
11382        return this;
11383      if (this.origin == null)
11384        this.origin = new ArrayList<TestScriptOriginComponent>();
11385      this.origin.add(t);
11386      return this;
11387    }
11388
11389    /**
11390     * @return The first repetition of repeating field {@link #origin}, creating it if it does not already exist
11391     */
11392    public TestScriptOriginComponent getOriginFirstRep() { 
11393      if (getOrigin().isEmpty()) {
11394        addOrigin();
11395      }
11396      return getOrigin().get(0);
11397    }
11398
11399    /**
11400     * @return {@link #destination} (An abstract server used in operations within this test script in the destination element.)
11401     */
11402    public List<TestScriptDestinationComponent> getDestination() { 
11403      if (this.destination == null)
11404        this.destination = new ArrayList<TestScriptDestinationComponent>();
11405      return this.destination;
11406    }
11407
11408    /**
11409     * @return Returns a reference to <code>this</code> for easy method chaining
11410     */
11411    public TestScript setDestination(List<TestScriptDestinationComponent> theDestination) { 
11412      this.destination = theDestination;
11413      return this;
11414    }
11415
11416    public boolean hasDestination() { 
11417      if (this.destination == null)
11418        return false;
11419      for (TestScriptDestinationComponent item : this.destination)
11420        if (!item.isEmpty())
11421          return true;
11422      return false;
11423    }
11424
11425    public TestScriptDestinationComponent addDestination() { //3
11426      TestScriptDestinationComponent t = new TestScriptDestinationComponent();
11427      if (this.destination == null)
11428        this.destination = new ArrayList<TestScriptDestinationComponent>();
11429      this.destination.add(t);
11430      return t;
11431    }
11432
11433    public TestScript addDestination(TestScriptDestinationComponent t) { //3
11434      if (t == null)
11435        return this;
11436      if (this.destination == null)
11437        this.destination = new ArrayList<TestScriptDestinationComponent>();
11438      this.destination.add(t);
11439      return this;
11440    }
11441
11442    /**
11443     * @return The first repetition of repeating field {@link #destination}, creating it if it does not already exist
11444     */
11445    public TestScriptDestinationComponent getDestinationFirstRep() { 
11446      if (getDestination().isEmpty()) {
11447        addDestination();
11448      }
11449      return getDestination().get(0);
11450    }
11451
11452    /**
11453     * @return {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.)
11454     */
11455    public TestScriptMetadataComponent getMetadata() { 
11456      if (this.metadata == null)
11457        if (Configuration.errorOnAutoCreate())
11458          throw new Error("Attempt to auto-create TestScript.metadata");
11459        else if (Configuration.doAutoCreate())
11460          this.metadata = new TestScriptMetadataComponent(); // cc
11461      return this.metadata;
11462    }
11463
11464    public boolean hasMetadata() { 
11465      return this.metadata != null && !this.metadata.isEmpty();
11466    }
11467
11468    /**
11469     * @param value {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.)
11470     */
11471    public TestScript setMetadata(TestScriptMetadataComponent value)  { 
11472      this.metadata = value;
11473      return this;
11474    }
11475
11476    /**
11477     * @return {@link #fixture} (Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.)
11478     */
11479    public List<TestScriptFixtureComponent> getFixture() { 
11480      if (this.fixture == null)
11481        this.fixture = new ArrayList<TestScriptFixtureComponent>();
11482      return this.fixture;
11483    }
11484
11485    /**
11486     * @return Returns a reference to <code>this</code> for easy method chaining
11487     */
11488    public TestScript setFixture(List<TestScriptFixtureComponent> theFixture) { 
11489      this.fixture = theFixture;
11490      return this;
11491    }
11492
11493    public boolean hasFixture() { 
11494      if (this.fixture == null)
11495        return false;
11496      for (TestScriptFixtureComponent item : this.fixture)
11497        if (!item.isEmpty())
11498          return true;
11499      return false;
11500    }
11501
11502    public TestScriptFixtureComponent addFixture() { //3
11503      TestScriptFixtureComponent t = new TestScriptFixtureComponent();
11504      if (this.fixture == null)
11505        this.fixture = new ArrayList<TestScriptFixtureComponent>();
11506      this.fixture.add(t);
11507      return t;
11508    }
11509
11510    public TestScript addFixture(TestScriptFixtureComponent t) { //3
11511      if (t == null)
11512        return this;
11513      if (this.fixture == null)
11514        this.fixture = new ArrayList<TestScriptFixtureComponent>();
11515      this.fixture.add(t);
11516      return this;
11517    }
11518
11519    /**
11520     * @return The first repetition of repeating field {@link #fixture}, creating it if it does not already exist
11521     */
11522    public TestScriptFixtureComponent getFixtureFirstRep() { 
11523      if (getFixture().isEmpty()) {
11524        addFixture();
11525      }
11526      return getFixture().get(0);
11527    }
11528
11529    /**
11530     * @return {@link #profile} (Reference to the profile to be used for validation.)
11531     */
11532    public List<Reference> getProfile() { 
11533      if (this.profile == null)
11534        this.profile = new ArrayList<Reference>();
11535      return this.profile;
11536    }
11537
11538    /**
11539     * @return Returns a reference to <code>this</code> for easy method chaining
11540     */
11541    public TestScript setProfile(List<Reference> theProfile) { 
11542      this.profile = theProfile;
11543      return this;
11544    }
11545
11546    public boolean hasProfile() { 
11547      if (this.profile == null)
11548        return false;
11549      for (Reference item : this.profile)
11550        if (!item.isEmpty())
11551          return true;
11552      return false;
11553    }
11554
11555    public Reference addProfile() { //3
11556      Reference t = new Reference();
11557      if (this.profile == null)
11558        this.profile = new ArrayList<Reference>();
11559      this.profile.add(t);
11560      return t;
11561    }
11562
11563    public TestScript addProfile(Reference t) { //3
11564      if (t == null)
11565        return this;
11566      if (this.profile == null)
11567        this.profile = new ArrayList<Reference>();
11568      this.profile.add(t);
11569      return this;
11570    }
11571
11572    /**
11573     * @return The first repetition of repeating field {@link #profile}, creating it if it does not already exist
11574     */
11575    public Reference getProfileFirstRep() { 
11576      if (getProfile().isEmpty()) {
11577        addProfile();
11578      }
11579      return getProfile().get(0);
11580    }
11581
11582    /**
11583     * @deprecated Use Reference#setResource(IBaseResource) instead
11584     */
11585    @Deprecated
11586    public List<Resource> getProfileTarget() { 
11587      if (this.profileTarget == null)
11588        this.profileTarget = new ArrayList<Resource>();
11589      return this.profileTarget;
11590    }
11591
11592    /**
11593     * @return {@link #variable} (Variable is set based either on element value in response body or on header field value in the response headers.)
11594     */
11595    public List<TestScriptVariableComponent> getVariable() { 
11596      if (this.variable == null)
11597        this.variable = new ArrayList<TestScriptVariableComponent>();
11598      return this.variable;
11599    }
11600
11601    /**
11602     * @return Returns a reference to <code>this</code> for easy method chaining
11603     */
11604    public TestScript setVariable(List<TestScriptVariableComponent> theVariable) { 
11605      this.variable = theVariable;
11606      return this;
11607    }
11608
11609    public boolean hasVariable() { 
11610      if (this.variable == null)
11611        return false;
11612      for (TestScriptVariableComponent item : this.variable)
11613        if (!item.isEmpty())
11614          return true;
11615      return false;
11616    }
11617
11618    public TestScriptVariableComponent addVariable() { //3
11619      TestScriptVariableComponent t = new TestScriptVariableComponent();
11620      if (this.variable == null)
11621        this.variable = new ArrayList<TestScriptVariableComponent>();
11622      this.variable.add(t);
11623      return t;
11624    }
11625
11626    public TestScript addVariable(TestScriptVariableComponent t) { //3
11627      if (t == null)
11628        return this;
11629      if (this.variable == null)
11630        this.variable = new ArrayList<TestScriptVariableComponent>();
11631      this.variable.add(t);
11632      return this;
11633    }
11634
11635    /**
11636     * @return The first repetition of repeating field {@link #variable}, creating it if it does not already exist
11637     */
11638    public TestScriptVariableComponent getVariableFirstRep() { 
11639      if (getVariable().isEmpty()) {
11640        addVariable();
11641      }
11642      return getVariable().get(0);
11643    }
11644
11645    /**
11646     * @return {@link #rule} (Assert rule to be used in one or more asserts within the test script.)
11647     */
11648    public List<TestScriptRuleComponent> getRule() { 
11649      if (this.rule == null)
11650        this.rule = new ArrayList<TestScriptRuleComponent>();
11651      return this.rule;
11652    }
11653
11654    /**
11655     * @return Returns a reference to <code>this</code> for easy method chaining
11656     */
11657    public TestScript setRule(List<TestScriptRuleComponent> theRule) { 
11658      this.rule = theRule;
11659      return this;
11660    }
11661
11662    public boolean hasRule() { 
11663      if (this.rule == null)
11664        return false;
11665      for (TestScriptRuleComponent item : this.rule)
11666        if (!item.isEmpty())
11667          return true;
11668      return false;
11669    }
11670
11671    public TestScriptRuleComponent addRule() { //3
11672      TestScriptRuleComponent t = new TestScriptRuleComponent();
11673      if (this.rule == null)
11674        this.rule = new ArrayList<TestScriptRuleComponent>();
11675      this.rule.add(t);
11676      return t;
11677    }
11678
11679    public TestScript addRule(TestScriptRuleComponent t) { //3
11680      if (t == null)
11681        return this;
11682      if (this.rule == null)
11683        this.rule = new ArrayList<TestScriptRuleComponent>();
11684      this.rule.add(t);
11685      return this;
11686    }
11687
11688    /**
11689     * @return The first repetition of repeating field {@link #rule}, creating it if it does not already exist
11690     */
11691    public TestScriptRuleComponent getRuleFirstRep() { 
11692      if (getRule().isEmpty()) {
11693        addRule();
11694      }
11695      return getRule().get(0);
11696    }
11697
11698    /**
11699     * @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.)
11700     */
11701    public List<TestScriptRulesetComponent> getRuleset() { 
11702      if (this.ruleset == null)
11703        this.ruleset = new ArrayList<TestScriptRulesetComponent>();
11704      return this.ruleset;
11705    }
11706
11707    /**
11708     * @return Returns a reference to <code>this</code> for easy method chaining
11709     */
11710    public TestScript setRuleset(List<TestScriptRulesetComponent> theRuleset) { 
11711      this.ruleset = theRuleset;
11712      return this;
11713    }
11714
11715    public boolean hasRuleset() { 
11716      if (this.ruleset == null)
11717        return false;
11718      for (TestScriptRulesetComponent item : this.ruleset)
11719        if (!item.isEmpty())
11720          return true;
11721      return false;
11722    }
11723
11724    public TestScriptRulesetComponent addRuleset() { //3
11725      TestScriptRulesetComponent t = new TestScriptRulesetComponent();
11726      if (this.ruleset == null)
11727        this.ruleset = new ArrayList<TestScriptRulesetComponent>();
11728      this.ruleset.add(t);
11729      return t;
11730    }
11731
11732    public TestScript addRuleset(TestScriptRulesetComponent t) { //3
11733      if (t == null)
11734        return this;
11735      if (this.ruleset == null)
11736        this.ruleset = new ArrayList<TestScriptRulesetComponent>();
11737      this.ruleset.add(t);
11738      return this;
11739    }
11740
11741    /**
11742     * @return The first repetition of repeating field {@link #ruleset}, creating it if it does not already exist
11743     */
11744    public TestScriptRulesetComponent getRulesetFirstRep() { 
11745      if (getRuleset().isEmpty()) {
11746        addRuleset();
11747      }
11748      return getRuleset().get(0);
11749    }
11750
11751    /**
11752     * @return {@link #setup} (A series of required setup operations before tests are executed.)
11753     */
11754    public TestScriptSetupComponent getSetup() { 
11755      if (this.setup == null)
11756        if (Configuration.errorOnAutoCreate())
11757          throw new Error("Attempt to auto-create TestScript.setup");
11758        else if (Configuration.doAutoCreate())
11759          this.setup = new TestScriptSetupComponent(); // cc
11760      return this.setup;
11761    }
11762
11763    public boolean hasSetup() { 
11764      return this.setup != null && !this.setup.isEmpty();
11765    }
11766
11767    /**
11768     * @param value {@link #setup} (A series of required setup operations before tests are executed.)
11769     */
11770    public TestScript setSetup(TestScriptSetupComponent value)  { 
11771      this.setup = value;
11772      return this;
11773    }
11774
11775    /**
11776     * @return {@link #test} (A test in this script.)
11777     */
11778    public List<TestScriptTestComponent> getTest() { 
11779      if (this.test == null)
11780        this.test = new ArrayList<TestScriptTestComponent>();
11781      return this.test;
11782    }
11783
11784    /**
11785     * @return Returns a reference to <code>this</code> for easy method chaining
11786     */
11787    public TestScript setTest(List<TestScriptTestComponent> theTest) { 
11788      this.test = theTest;
11789      return this;
11790    }
11791
11792    public boolean hasTest() { 
11793      if (this.test == null)
11794        return false;
11795      for (TestScriptTestComponent item : this.test)
11796        if (!item.isEmpty())
11797          return true;
11798      return false;
11799    }
11800
11801    public TestScriptTestComponent addTest() { //3
11802      TestScriptTestComponent t = new TestScriptTestComponent();
11803      if (this.test == null)
11804        this.test = new ArrayList<TestScriptTestComponent>();
11805      this.test.add(t);
11806      return t;
11807    }
11808
11809    public TestScript addTest(TestScriptTestComponent t) { //3
11810      if (t == null)
11811        return this;
11812      if (this.test == null)
11813        this.test = new ArrayList<TestScriptTestComponent>();
11814      this.test.add(t);
11815      return this;
11816    }
11817
11818    /**
11819     * @return The first repetition of repeating field {@link #test}, creating it if it does not already exist
11820     */
11821    public TestScriptTestComponent getTestFirstRep() { 
11822      if (getTest().isEmpty()) {
11823        addTest();
11824      }
11825      return getTest().get(0);
11826    }
11827
11828    /**
11829     * @return {@link #teardown} (A series of operations required to clean up after the all the tests are executed (successfully or otherwise).)
11830     */
11831    public TestScriptTeardownComponent getTeardown() { 
11832      if (this.teardown == null)
11833        if (Configuration.errorOnAutoCreate())
11834          throw new Error("Attempt to auto-create TestScript.teardown");
11835        else if (Configuration.doAutoCreate())
11836          this.teardown = new TestScriptTeardownComponent(); // cc
11837      return this.teardown;
11838    }
11839
11840    public boolean hasTeardown() { 
11841      return this.teardown != null && !this.teardown.isEmpty();
11842    }
11843
11844    /**
11845     * @param value {@link #teardown} (A series of operations required to clean up after the all the tests are executed (successfully or otherwise).)
11846     */
11847    public TestScript setTeardown(TestScriptTeardownComponent value)  { 
11848      this.teardown = value;
11849      return this;
11850    }
11851
11852      protected void listChildren(List<Property> children) {
11853        super.listChildren(children);
11854        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. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).", 0, 1, url));
11855        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));
11856        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));
11857        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));
11858        children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the test script.", 0, 1, title));
11859        children.add(new Property("status", "code", "The status of this test script. Enables tracking the life-cycle of the content.", 0, 1, status));
11860        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));
11861        children.add(new Property("date", "dateTime", "The date  (and optionally time) when the test script was published. The date must change if and 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));
11862        children.add(new Property("publisher", "string", "The name of the individual or organization that published the test script.", 0, 1, publisher));
11863        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));
11864        children.add(new Property("description", "markdown", "A free text natural language description of the test script from a consumer's perspective.", 0, 1, description));
11865        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));
11866        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));
11867        children.add(new Property("purpose", "markdown", "Explaination of why this test script is needed and why it has been designed as it has.", 0, 1, purpose));
11868        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));
11869        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));
11870        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));
11871        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));
11872        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));
11873        children.add(new Property("profile", "Reference(Any)", "Reference to the profile to be used for validation.", 0, java.lang.Integer.MAX_VALUE, profile));
11874        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));
11875        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));
11876        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));
11877        children.add(new Property("setup", "", "A series of required setup operations before tests are executed.", 0, 1, setup));
11878        children.add(new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test));
11879        children.add(new Property("teardown", "", "A series of operations required to clean up after the all the tests are executed (successfully or otherwise).", 0, 1, teardown));
11880      }
11881
11882      @Override
11883      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
11884        switch (_hash) {
11885        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. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).", 0, 1, url);
11886        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);
11887        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);
11888        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);
11889        case 110371416: /*title*/  return new Property("title", "string", "A short, descriptive, user-friendly title for the test script.", 0, 1, title);
11890        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);
11891        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);
11892        case 3076014: /*date*/  return new Property("date", "dateTime", "The date  (and optionally time) when the test script was published. The date must change if and 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);
11893        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the individual or organization that published the test script.", 0, 1, publisher);
11894        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);
11895        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);
11896        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);
11897        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);
11898        case -220463842: /*purpose*/  return new Property("purpose", "markdown", "Explaination of why this test script is needed and why it has been designed as it has.", 0, 1, purpose);
11899        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);
11900        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);
11901        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);
11902        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);
11903        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);
11904        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);
11905        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);
11906        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);
11907        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);
11908        case 109329021: /*setup*/  return new Property("setup", "", "A series of required setup operations before tests are executed.", 0, 1, setup);
11909        case 3556498: /*test*/  return new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test);
11910        case -1663474172: /*teardown*/  return new Property("teardown", "", "A series of operations required to clean up after the all the tests are executed (successfully or otherwise).", 0, 1, teardown);
11911        default: return super.getNamedProperty(_hash, _name, _checkValid);
11912        }
11913
11914      }
11915
11916      @Override
11917      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
11918        switch (hash) {
11919        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
11920        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier
11921        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
11922        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
11923        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
11924        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
11925        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
11926        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
11927        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
11928        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
11929        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
11930        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
11931        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
11932        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
11933        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType
11934        case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // TestScriptOriginComponent
11935        case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : this.destination.toArray(new Base[this.destination.size()]); // TestScriptDestinationComponent
11936        case -450004177: /*metadata*/ return this.metadata == null ? new Base[0] : new Base[] {this.metadata}; // TestScriptMetadataComponent
11937        case -843449847: /*fixture*/ return this.fixture == null ? new Base[0] : this.fixture.toArray(new Base[this.fixture.size()]); // TestScriptFixtureComponent
11938        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : this.profile.toArray(new Base[this.profile.size()]); // Reference
11939        case -1249586564: /*variable*/ return this.variable == null ? new Base[0] : this.variable.toArray(new Base[this.variable.size()]); // TestScriptVariableComponent
11940        case 3512060: /*rule*/ return this.rule == null ? new Base[0] : this.rule.toArray(new Base[this.rule.size()]); // TestScriptRuleComponent
11941        case 1548678118: /*ruleset*/ return this.ruleset == null ? new Base[0] : this.ruleset.toArray(new Base[this.ruleset.size()]); // TestScriptRulesetComponent
11942        case 109329021: /*setup*/ return this.setup == null ? new Base[0] : new Base[] {this.setup}; // TestScriptSetupComponent
11943        case 3556498: /*test*/ return this.test == null ? new Base[0] : this.test.toArray(new Base[this.test.size()]); // TestScriptTestComponent
11944        case -1663474172: /*teardown*/ return this.teardown == null ? new Base[0] : new Base[] {this.teardown}; // TestScriptTeardownComponent
11945        default: return super.getProperty(hash, name, checkValid);
11946        }
11947
11948      }
11949
11950      @Override
11951      public Base setProperty(int hash, String name, Base value) throws FHIRException {
11952        switch (hash) {
11953        case 116079: // url
11954          this.url = castToUri(value); // UriType
11955          return value;
11956        case -1618432855: // identifier
11957          this.identifier = castToIdentifier(value); // Identifier
11958          return value;
11959        case 351608024: // version
11960          this.version = castToString(value); // StringType
11961          return value;
11962        case 3373707: // name
11963          this.name = castToString(value); // StringType
11964          return value;
11965        case 110371416: // title
11966          this.title = castToString(value); // StringType
11967          return value;
11968        case -892481550: // status
11969          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
11970          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
11971          return value;
11972        case -404562712: // experimental
11973          this.experimental = castToBoolean(value); // BooleanType
11974          return value;
11975        case 3076014: // date
11976          this.date = castToDateTime(value); // DateTimeType
11977          return value;
11978        case 1447404028: // publisher
11979          this.publisher = castToString(value); // StringType
11980          return value;
11981        case 951526432: // contact
11982          this.getContact().add(castToContactDetail(value)); // ContactDetail
11983          return value;
11984        case -1724546052: // description
11985          this.description = castToMarkdown(value); // MarkdownType
11986          return value;
11987        case -669707736: // useContext
11988          this.getUseContext().add(castToUsageContext(value)); // UsageContext
11989          return value;
11990        case -507075711: // jurisdiction
11991          this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept
11992          return value;
11993        case -220463842: // purpose
11994          this.purpose = castToMarkdown(value); // MarkdownType
11995          return value;
11996        case 1522889671: // copyright
11997          this.copyright = castToMarkdown(value); // MarkdownType
11998          return value;
11999        case -1008619738: // origin
12000          this.getOrigin().add((TestScriptOriginComponent) value); // TestScriptOriginComponent
12001          return value;
12002        case -1429847026: // destination
12003          this.getDestination().add((TestScriptDestinationComponent) value); // TestScriptDestinationComponent
12004          return value;
12005        case -450004177: // metadata
12006          this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent
12007          return value;
12008        case -843449847: // fixture
12009          this.getFixture().add((TestScriptFixtureComponent) value); // TestScriptFixtureComponent
12010          return value;
12011        case -309425751: // profile
12012          this.getProfile().add(castToReference(value)); // Reference
12013          return value;
12014        case -1249586564: // variable
12015          this.getVariable().add((TestScriptVariableComponent) value); // TestScriptVariableComponent
12016          return value;
12017        case 3512060: // rule
12018          this.getRule().add((TestScriptRuleComponent) value); // TestScriptRuleComponent
12019          return value;
12020        case 1548678118: // ruleset
12021          this.getRuleset().add((TestScriptRulesetComponent) value); // TestScriptRulesetComponent
12022          return value;
12023        case 109329021: // setup
12024          this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent
12025          return value;
12026        case 3556498: // test
12027          this.getTest().add((TestScriptTestComponent) value); // TestScriptTestComponent
12028          return value;
12029        case -1663474172: // teardown
12030          this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent
12031          return value;
12032        default: return super.setProperty(hash, name, value);
12033        }
12034
12035      }
12036
12037      @Override
12038      public Base setProperty(String name, Base value) throws FHIRException {
12039        if (name.equals("url")) {
12040          this.url = castToUri(value); // UriType
12041        } else if (name.equals("identifier")) {
12042          this.identifier = castToIdentifier(value); // Identifier
12043        } else if (name.equals("version")) {
12044          this.version = castToString(value); // StringType
12045        } else if (name.equals("name")) {
12046          this.name = castToString(value); // StringType
12047        } else if (name.equals("title")) {
12048          this.title = castToString(value); // StringType
12049        } else if (name.equals("status")) {
12050          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
12051          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
12052        } else if (name.equals("experimental")) {
12053          this.experimental = castToBoolean(value); // BooleanType
12054        } else if (name.equals("date")) {
12055          this.date = castToDateTime(value); // DateTimeType
12056        } else if (name.equals("publisher")) {
12057          this.publisher = castToString(value); // StringType
12058        } else if (name.equals("contact")) {
12059          this.getContact().add(castToContactDetail(value));
12060        } else if (name.equals("description")) {
12061          this.description = castToMarkdown(value); // MarkdownType
12062        } else if (name.equals("useContext")) {
12063          this.getUseContext().add(castToUsageContext(value));
12064        } else if (name.equals("jurisdiction")) {
12065          this.getJurisdiction().add(castToCodeableConcept(value));
12066        } else if (name.equals("purpose")) {
12067          this.purpose = castToMarkdown(value); // MarkdownType
12068        } else if (name.equals("copyright")) {
12069          this.copyright = castToMarkdown(value); // MarkdownType
12070        } else if (name.equals("origin")) {
12071          this.getOrigin().add((TestScriptOriginComponent) value);
12072        } else if (name.equals("destination")) {
12073          this.getDestination().add((TestScriptDestinationComponent) value);
12074        } else if (name.equals("metadata")) {
12075          this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent
12076        } else if (name.equals("fixture")) {
12077          this.getFixture().add((TestScriptFixtureComponent) value);
12078        } else if (name.equals("profile")) {
12079          this.getProfile().add(castToReference(value));
12080        } else if (name.equals("variable")) {
12081          this.getVariable().add((TestScriptVariableComponent) value);
12082        } else if (name.equals("rule")) {
12083          this.getRule().add((TestScriptRuleComponent) value);
12084        } else if (name.equals("ruleset")) {
12085          this.getRuleset().add((TestScriptRulesetComponent) value);
12086        } else if (name.equals("setup")) {
12087          this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent
12088        } else if (name.equals("test")) {
12089          this.getTest().add((TestScriptTestComponent) value);
12090        } else if (name.equals("teardown")) {
12091          this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent
12092        } else
12093          return super.setProperty(name, value);
12094        return value;
12095      }
12096
12097      @Override
12098      public Base makeProperty(int hash, String name) throws FHIRException {
12099        switch (hash) {
12100        case 116079:  return getUrlElement();
12101        case -1618432855:  return getIdentifier(); 
12102        case 351608024:  return getVersionElement();
12103        case 3373707:  return getNameElement();
12104        case 110371416:  return getTitleElement();
12105        case -892481550:  return getStatusElement();
12106        case -404562712:  return getExperimentalElement();
12107        case 3076014:  return getDateElement();
12108        case 1447404028:  return getPublisherElement();
12109        case 951526432:  return addContact(); 
12110        case -1724546052:  return getDescriptionElement();
12111        case -669707736:  return addUseContext(); 
12112        case -507075711:  return addJurisdiction(); 
12113        case -220463842:  return getPurposeElement();
12114        case 1522889671:  return getCopyrightElement();
12115        case -1008619738:  return addOrigin(); 
12116        case -1429847026:  return addDestination(); 
12117        case -450004177:  return getMetadata(); 
12118        case -843449847:  return addFixture(); 
12119        case -309425751:  return addProfile(); 
12120        case -1249586564:  return addVariable(); 
12121        case 3512060:  return addRule(); 
12122        case 1548678118:  return addRuleset(); 
12123        case 109329021:  return getSetup(); 
12124        case 3556498:  return addTest(); 
12125        case -1663474172:  return getTeardown(); 
12126        default: return super.makeProperty(hash, name);
12127        }
12128
12129      }
12130
12131      @Override
12132      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
12133        switch (hash) {
12134        case 116079: /*url*/ return new String[] {"uri"};
12135        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
12136        case 351608024: /*version*/ return new String[] {"string"};
12137        case 3373707: /*name*/ return new String[] {"string"};
12138        case 110371416: /*title*/ return new String[] {"string"};
12139        case -892481550: /*status*/ return new String[] {"code"};
12140        case -404562712: /*experimental*/ return new String[] {"boolean"};
12141        case 3076014: /*date*/ return new String[] {"dateTime"};
12142        case 1447404028: /*publisher*/ return new String[] {"string"};
12143        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
12144        case -1724546052: /*description*/ return new String[] {"markdown"};
12145        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
12146        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
12147        case -220463842: /*purpose*/ return new String[] {"markdown"};
12148        case 1522889671: /*copyright*/ return new String[] {"markdown"};
12149        case -1008619738: /*origin*/ return new String[] {};
12150        case -1429847026: /*destination*/ return new String[] {};
12151        case -450004177: /*metadata*/ return new String[] {};
12152        case -843449847: /*fixture*/ return new String[] {};
12153        case -309425751: /*profile*/ return new String[] {"Reference"};
12154        case -1249586564: /*variable*/ return new String[] {};
12155        case 3512060: /*rule*/ return new String[] {};
12156        case 1548678118: /*ruleset*/ return new String[] {};
12157        case 109329021: /*setup*/ return new String[] {};
12158        case 3556498: /*test*/ return new String[] {};
12159        case -1663474172: /*teardown*/ return new String[] {};
12160        default: return super.getTypesForProperty(hash, name);
12161        }
12162
12163      }
12164
12165      @Override
12166      public Base addChild(String name) throws FHIRException {
12167        if (name.equals("url")) {
12168          throw new FHIRException("Cannot call addChild on a singleton property TestScript.url");
12169        }
12170        else if (name.equals("identifier")) {
12171          this.identifier = new Identifier();
12172          return this.identifier;
12173        }
12174        else if (name.equals("version")) {
12175          throw new FHIRException("Cannot call addChild on a singleton property TestScript.version");
12176        }
12177        else if (name.equals("name")) {
12178          throw new FHIRException("Cannot call addChild on a singleton property TestScript.name");
12179        }
12180        else if (name.equals("title")) {
12181          throw new FHIRException("Cannot call addChild on a singleton property TestScript.title");
12182        }
12183        else if (name.equals("status")) {
12184          throw new FHIRException("Cannot call addChild on a singleton property TestScript.status");
12185        }
12186        else if (name.equals("experimental")) {
12187          throw new FHIRException("Cannot call addChild on a singleton property TestScript.experimental");
12188        }
12189        else if (name.equals("date")) {
12190          throw new FHIRException("Cannot call addChild on a singleton property TestScript.date");
12191        }
12192        else if (name.equals("publisher")) {
12193          throw new FHIRException("Cannot call addChild on a singleton property TestScript.publisher");
12194        }
12195        else if (name.equals("contact")) {
12196          return addContact();
12197        }
12198        else if (name.equals("description")) {
12199          throw new FHIRException("Cannot call addChild on a singleton property TestScript.description");
12200        }
12201        else if (name.equals("useContext")) {
12202          return addUseContext();
12203        }
12204        else if (name.equals("jurisdiction")) {
12205          return addJurisdiction();
12206        }
12207        else if (name.equals("purpose")) {
12208          throw new FHIRException("Cannot call addChild on a singleton property TestScript.purpose");
12209        }
12210        else if (name.equals("copyright")) {
12211          throw new FHIRException("Cannot call addChild on a singleton property TestScript.copyright");
12212        }
12213        else if (name.equals("origin")) {
12214          return addOrigin();
12215        }
12216        else if (name.equals("destination")) {
12217          return addDestination();
12218        }
12219        else if (name.equals("metadata")) {
12220          this.metadata = new TestScriptMetadataComponent();
12221          return this.metadata;
12222        }
12223        else if (name.equals("fixture")) {
12224          return addFixture();
12225        }
12226        else if (name.equals("profile")) {
12227          return addProfile();
12228        }
12229        else if (name.equals("variable")) {
12230          return addVariable();
12231        }
12232        else if (name.equals("rule")) {
12233          return addRule();
12234        }
12235        else if (name.equals("ruleset")) {
12236          return addRuleset();
12237        }
12238        else if (name.equals("setup")) {
12239          this.setup = new TestScriptSetupComponent();
12240          return this.setup;
12241        }
12242        else if (name.equals("test")) {
12243          return addTest();
12244        }
12245        else if (name.equals("teardown")) {
12246          this.teardown = new TestScriptTeardownComponent();
12247          return this.teardown;
12248        }
12249        else
12250          return super.addChild(name);
12251      }
12252
12253  public String fhirType() {
12254    return "TestScript";
12255
12256  }
12257
12258      public TestScript copy() {
12259        TestScript dst = new TestScript();
12260        copyValues(dst);
12261        dst.url = url == null ? null : url.copy();
12262        dst.identifier = identifier == null ? null : identifier.copy();
12263        dst.version = version == null ? null : version.copy();
12264        dst.name = name == null ? null : name.copy();
12265        dst.title = title == null ? null : title.copy();
12266        dst.status = status == null ? null : status.copy();
12267        dst.experimental = experimental == null ? null : experimental.copy();
12268        dst.date = date == null ? null : date.copy();
12269        dst.publisher = publisher == null ? null : publisher.copy();
12270        if (contact != null) {
12271          dst.contact = new ArrayList<ContactDetail>();
12272          for (ContactDetail i : contact)
12273            dst.contact.add(i.copy());
12274        };
12275        dst.description = description == null ? null : description.copy();
12276        if (useContext != null) {
12277          dst.useContext = new ArrayList<UsageContext>();
12278          for (UsageContext i : useContext)
12279            dst.useContext.add(i.copy());
12280        };
12281        if (jurisdiction != null) {
12282          dst.jurisdiction = new ArrayList<CodeableConcept>();
12283          for (CodeableConcept i : jurisdiction)
12284            dst.jurisdiction.add(i.copy());
12285        };
12286        dst.purpose = purpose == null ? null : purpose.copy();
12287        dst.copyright = copyright == null ? null : copyright.copy();
12288        if (origin != null) {
12289          dst.origin = new ArrayList<TestScriptOriginComponent>();
12290          for (TestScriptOriginComponent i : origin)
12291            dst.origin.add(i.copy());
12292        };
12293        if (destination != null) {
12294          dst.destination = new ArrayList<TestScriptDestinationComponent>();
12295          for (TestScriptDestinationComponent i : destination)
12296            dst.destination.add(i.copy());
12297        };
12298        dst.metadata = metadata == null ? null : metadata.copy();
12299        if (fixture != null) {
12300          dst.fixture = new ArrayList<TestScriptFixtureComponent>();
12301          for (TestScriptFixtureComponent i : fixture)
12302            dst.fixture.add(i.copy());
12303        };
12304        if (profile != null) {
12305          dst.profile = new ArrayList<Reference>();
12306          for (Reference i : profile)
12307            dst.profile.add(i.copy());
12308        };
12309        if (variable != null) {
12310          dst.variable = new ArrayList<TestScriptVariableComponent>();
12311          for (TestScriptVariableComponent i : variable)
12312            dst.variable.add(i.copy());
12313        };
12314        if (rule != null) {
12315          dst.rule = new ArrayList<TestScriptRuleComponent>();
12316          for (TestScriptRuleComponent i : rule)
12317            dst.rule.add(i.copy());
12318        };
12319        if (ruleset != null) {
12320          dst.ruleset = new ArrayList<TestScriptRulesetComponent>();
12321          for (TestScriptRulesetComponent i : ruleset)
12322            dst.ruleset.add(i.copy());
12323        };
12324        dst.setup = setup == null ? null : setup.copy();
12325        if (test != null) {
12326          dst.test = new ArrayList<TestScriptTestComponent>();
12327          for (TestScriptTestComponent i : test)
12328            dst.test.add(i.copy());
12329        };
12330        dst.teardown = teardown == null ? null : teardown.copy();
12331        return dst;
12332      }
12333
12334      protected TestScript typedCopy() {
12335        return copy();
12336      }
12337
12338      @Override
12339      public boolean equalsDeep(Base other_) {
12340        if (!super.equalsDeep(other_))
12341          return false;
12342        if (!(other_ instanceof TestScript))
12343          return false;
12344        TestScript o = (TestScript) other_;
12345        return compareDeep(identifier, o.identifier, true) && compareDeep(purpose, o.purpose, true) && compareDeep(copyright, o.copyright, true)
12346           && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) && compareDeep(metadata, o.metadata, true)
12347           && compareDeep(fixture, o.fixture, true) && compareDeep(profile, o.profile, true) && compareDeep(variable, o.variable, true)
12348           && compareDeep(rule, o.rule, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(setup, o.setup, true)
12349           && compareDeep(test, o.test, true) && compareDeep(teardown, o.teardown, true);
12350      }
12351
12352      @Override
12353      public boolean equalsShallow(Base other_) {
12354        if (!super.equalsShallow(other_))
12355          return false;
12356        if (!(other_ instanceof TestScript))
12357          return false;
12358        TestScript o = (TestScript) other_;
12359        return compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true);
12360      }
12361
12362      public boolean isEmpty() {
12363        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, purpose, copyright
12364          , origin, destination, metadata, fixture, profile, variable, rule, ruleset, setup
12365          , test, teardown);
12366      }
12367
12368  @Override
12369  public ResourceType getResourceType() {
12370    return ResourceType.TestScript;
12371   }
12372
12373 /**
12374   * Search parameter: <b>date</b>
12375   * <p>
12376   * Description: <b>The test script publication date</b><br>
12377   * Type: <b>date</b><br>
12378   * Path: <b>TestScript.date</b><br>
12379   * </p>
12380   */
12381  @SearchParamDefinition(name="date", path="TestScript.date", description="The test script publication date", type="date" )
12382  public static final String SP_DATE = "date";
12383 /**
12384   * <b>Fluent Client</b> search parameter constant for <b>date</b>
12385   * <p>
12386   * Description: <b>The test script publication date</b><br>
12387   * Type: <b>date</b><br>
12388   * Path: <b>TestScript.date</b><br>
12389   * </p>
12390   */
12391  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
12392
12393 /**
12394   * Search parameter: <b>identifier</b>
12395   * <p>
12396   * Description: <b>External identifier for the test script</b><br>
12397   * Type: <b>token</b><br>
12398   * Path: <b>TestScript.identifier</b><br>
12399   * </p>
12400   */
12401  @SearchParamDefinition(name="identifier", path="TestScript.identifier", description="External identifier for the test script", type="token" )
12402  public static final String SP_IDENTIFIER = "identifier";
12403 /**
12404   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
12405   * <p>
12406   * Description: <b>External identifier for the test script</b><br>
12407   * Type: <b>token</b><br>
12408   * Path: <b>TestScript.identifier</b><br>
12409   * </p>
12410   */
12411  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
12412
12413 /**
12414   * Search parameter: <b>jurisdiction</b>
12415   * <p>
12416   * Description: <b>Intended jurisdiction for the test script</b><br>
12417   * Type: <b>token</b><br>
12418   * Path: <b>TestScript.jurisdiction</b><br>
12419   * </p>
12420   */
12421  @SearchParamDefinition(name="jurisdiction", path="TestScript.jurisdiction", description="Intended jurisdiction for the test script", type="token" )
12422  public static final String SP_JURISDICTION = "jurisdiction";
12423 /**
12424   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
12425   * <p>
12426   * Description: <b>Intended jurisdiction for the test script</b><br>
12427   * Type: <b>token</b><br>
12428   * Path: <b>TestScript.jurisdiction</b><br>
12429   * </p>
12430   */
12431  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
12432
12433 /**
12434   * Search parameter: <b>name</b>
12435   * <p>
12436   * Description: <b>Computationally friendly name of the test script</b><br>
12437   * Type: <b>string</b><br>
12438   * Path: <b>TestScript.name</b><br>
12439   * </p>
12440   */
12441  @SearchParamDefinition(name="name", path="TestScript.name", description="Computationally friendly name of the test script", type="string" )
12442  public static final String SP_NAME = "name";
12443 /**
12444   * <b>Fluent Client</b> search parameter constant for <b>name</b>
12445   * <p>
12446   * Description: <b>Computationally friendly name of the test script</b><br>
12447   * Type: <b>string</b><br>
12448   * Path: <b>TestScript.name</b><br>
12449   * </p>
12450   */
12451  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
12452
12453 /**
12454   * Search parameter: <b>description</b>
12455   * <p>
12456   * Description: <b>The description of the test script</b><br>
12457   * Type: <b>string</b><br>
12458   * Path: <b>TestScript.description</b><br>
12459   * </p>
12460   */
12461  @SearchParamDefinition(name="description", path="TestScript.description", description="The description of the test script", type="string" )
12462  public static final String SP_DESCRIPTION = "description";
12463 /**
12464   * <b>Fluent Client</b> search parameter constant for <b>description</b>
12465   * <p>
12466   * Description: <b>The description of the test script</b><br>
12467   * Type: <b>string</b><br>
12468   * Path: <b>TestScript.description</b><br>
12469   * </p>
12470   */
12471  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
12472
12473 /**
12474   * Search parameter: <b>publisher</b>
12475   * <p>
12476   * Description: <b>Name of the publisher of the test script</b><br>
12477   * Type: <b>string</b><br>
12478   * Path: <b>TestScript.publisher</b><br>
12479   * </p>
12480   */
12481  @SearchParamDefinition(name="publisher", path="TestScript.publisher", description="Name of the publisher of the test script", type="string" )
12482  public static final String SP_PUBLISHER = "publisher";
12483 /**
12484   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
12485   * <p>
12486   * Description: <b>Name of the publisher of the test script</b><br>
12487   * Type: <b>string</b><br>
12488   * Path: <b>TestScript.publisher</b><br>
12489   * </p>
12490   */
12491  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
12492
12493 /**
12494   * Search parameter: <b>testscript-capability</b>
12495   * <p>
12496   * Description: <b>TestScript required and validated capability</b><br>
12497   * Type: <b>string</b><br>
12498   * Path: <b>TestScript.metadata.capability.description</b><br>
12499   * </p>
12500   */
12501  @SearchParamDefinition(name="testscript-capability", path="TestScript.metadata.capability.description", description="TestScript required and validated capability", type="string" )
12502  public static final String SP_TESTSCRIPT_CAPABILITY = "testscript-capability";
12503 /**
12504   * <b>Fluent Client</b> search parameter constant for <b>testscript-capability</b>
12505   * <p>
12506   * Description: <b>TestScript required and validated capability</b><br>
12507   * Type: <b>string</b><br>
12508   * Path: <b>TestScript.metadata.capability.description</b><br>
12509   * </p>
12510   */
12511  public static final ca.uhn.fhir.rest.gclient.StringClientParam TESTSCRIPT_CAPABILITY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TESTSCRIPT_CAPABILITY);
12512
12513 /**
12514   * Search parameter: <b>title</b>
12515   * <p>
12516   * Description: <b>The human-friendly name of the test script</b><br>
12517   * Type: <b>string</b><br>
12518   * Path: <b>TestScript.title</b><br>
12519   * </p>
12520   */
12521  @SearchParamDefinition(name="title", path="TestScript.title", description="The human-friendly name of the test script", type="string" )
12522  public static final String SP_TITLE = "title";
12523 /**
12524   * <b>Fluent Client</b> search parameter constant for <b>title</b>
12525   * <p>
12526   * Description: <b>The human-friendly name of the test script</b><br>
12527   * Type: <b>string</b><br>
12528   * Path: <b>TestScript.title</b><br>
12529   * </p>
12530   */
12531  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
12532
12533 /**
12534   * Search parameter: <b>version</b>
12535   * <p>
12536   * Description: <b>The business version of the test script</b><br>
12537   * Type: <b>token</b><br>
12538   * Path: <b>TestScript.version</b><br>
12539   * </p>
12540   */
12541  @SearchParamDefinition(name="version", path="TestScript.version", description="The business version of the test script", type="token" )
12542  public static final String SP_VERSION = "version";
12543 /**
12544   * <b>Fluent Client</b> search parameter constant for <b>version</b>
12545   * <p>
12546   * Description: <b>The business version of the test script</b><br>
12547   * Type: <b>token</b><br>
12548   * Path: <b>TestScript.version</b><br>
12549   * </p>
12550   */
12551  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
12552
12553 /**
12554   * Search parameter: <b>url</b>
12555   * <p>
12556   * Description: <b>The uri that identifies the test script</b><br>
12557   * Type: <b>uri</b><br>
12558   * Path: <b>TestScript.url</b><br>
12559   * </p>
12560   */
12561  @SearchParamDefinition(name="url", path="TestScript.url", description="The uri that identifies the test script", type="uri" )
12562  public static final String SP_URL = "url";
12563 /**
12564   * <b>Fluent Client</b> search parameter constant for <b>url</b>
12565   * <p>
12566   * Description: <b>The uri that identifies the test script</b><br>
12567   * Type: <b>uri</b><br>
12568   * Path: <b>TestScript.url</b><br>
12569   * </p>
12570   */
12571  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
12572
12573 /**
12574   * Search parameter: <b>status</b>
12575   * <p>
12576   * Description: <b>The current status of the test script</b><br>
12577   * Type: <b>token</b><br>
12578   * Path: <b>TestScript.status</b><br>
12579   * </p>
12580   */
12581  @SearchParamDefinition(name="status", path="TestScript.status", description="The current status of the test script", type="token" )
12582  public static final String SP_STATUS = "status";
12583 /**
12584   * <b>Fluent Client</b> search parameter constant for <b>status</b>
12585   * <p>
12586   * Description: <b>The current status of the test script</b><br>
12587   * Type: <b>token</b><br>
12588   * Path: <b>TestScript.status</b><br>
12589   * </p>
12590   */
12591  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
12592
12593
12594}