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