001package org.hl7.fhir.r5.model;
002
003/*-
004 * #%L
005 * org.hl7.fhir.r5
006 * %%
007 * Copyright (C) 2014 - 2019 Health Level 7
008 * %%
009 * Licensed under the Apache License, Version 2.0 (the "License");
010 * you may not use this file except in compliance with the License.
011 * You may obtain a copy of the License at
012 * 
013 *      http://www.apache.org/licenses/LICENSE-2.0
014 * 
015 * Unless required by applicable law or agreed to in writing, software
016 * distributed under the License is distributed on an "AS IS" BASIS,
017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018 * See the License for the specific language governing permissions and
019 * limitations under the License.
020 * #L%
021 */
022
023/*
024  Copyright (c) 2011+, HL7, Inc.
025  All rights reserved.
026  
027  Redistribution and use in source and binary forms, with or without modification, 
028  are permitted provided that the following conditions are met:
029  
030   * Redistributions of source code must retain the above copyright notice, this 
031     list of conditions and the following disclaimer.
032   * Redistributions in binary form must reproduce the above copyright notice, 
033     this list of conditions and the following disclaimer in the documentation 
034     and/or other materials provided with the distribution.
035   * Neither the name of HL7 nor the names of its contributors may be used to 
036     endorse or promote products derived from this software without specific 
037     prior written permission.
038  
039  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
040  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
041  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
042  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
043  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
044  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
045  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
046  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
047  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
048  POSSIBILITY OF SUCH DAMAGE.
049  
050*/
051
052// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
053import java.util.ArrayList;
054import java.util.Date;
055import java.util.List;
056import org.hl7.fhir.exceptions.FHIRException;
057import org.hl7.fhir.instance.model.api.ICompositeType;
058
059import org.hl7.fhir.instance.model.api.IBaseDatatypeElement;
060import org.hl7.fhir.utilities.Utilities;
061import org.hl7.fhir.r5.model.Enumerations.*;
062import ca.uhn.fhir.model.api.annotation.ResourceDef;
063import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
064import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
065import ca.uhn.fhir.model.api.annotation.Child;
066import ca.uhn.fhir.model.api.annotation.ChildOrder;
067import ca.uhn.fhir.model.api.annotation.Description;
068import ca.uhn.fhir.model.api.annotation.Block;
069/**
070 * A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification.
071 */
072@ResourceDef(name="TestScript", profile="http://hl7.org/fhir/StructureDefinition/TestScript")
073@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"})
074public class TestScript extends MetadataResource {
075
076    public enum TestScriptRequestMethodCode {
077        /**
078         * HTTP DELETE operation.
079         */
080        DELETE, 
081        /**
082         * HTTP GET operation.
083         */
084        GET, 
085        /**
086         * HTTP OPTIONS operation.
087         */
088        OPTIONS, 
089        /**
090         * HTTP PATCH operation.
091         */
092        PATCH, 
093        /**
094         * HTTP POST operation.
095         */
096        POST, 
097        /**
098         * HTTP PUT operation.
099         */
100        PUT, 
101        /**
102         * HTTP HEAD operation.
103         */
104        HEAD, 
105        /**
106         * added to help the parsers with the generic types
107         */
108        NULL;
109        public static TestScriptRequestMethodCode fromCode(String codeString) throws FHIRException {
110            if (codeString == null || "".equals(codeString))
111                return null;
112        if ("delete".equals(codeString))
113          return DELETE;
114        if ("get".equals(codeString))
115          return GET;
116        if ("options".equals(codeString))
117          return OPTIONS;
118        if ("patch".equals(codeString))
119          return PATCH;
120        if ("post".equals(codeString))
121          return POST;
122        if ("put".equals(codeString))
123          return PUT;
124        if ("head".equals(codeString))
125          return HEAD;
126        if (Configuration.isAcceptInvalidEnums())
127          return null;
128        else
129          throw new FHIRException("Unknown TestScriptRequestMethodCode code '"+codeString+"'");
130        }
131        public String toCode() {
132          switch (this) {
133            case DELETE: return "delete";
134            case GET: return "get";
135            case OPTIONS: return "options";
136            case PATCH: return "patch";
137            case POST: return "post";
138            case PUT: return "put";
139            case HEAD: return "head";
140            default: return "?";
141          }
142        }
143        public String getSystem() {
144          switch (this) {
145            case DELETE: return "http://hl7.org/fhir/http-operations";
146            case GET: return "http://hl7.org/fhir/http-operations";
147            case OPTIONS: return "http://hl7.org/fhir/http-operations";
148            case PATCH: return "http://hl7.org/fhir/http-operations";
149            case POST: return "http://hl7.org/fhir/http-operations";
150            case PUT: return "http://hl7.org/fhir/http-operations";
151            case HEAD: return "http://hl7.org/fhir/http-operations";
152            default: return "?";
153          }
154        }
155        public String getDefinition() {
156          switch (this) {
157            case DELETE: return "HTTP DELETE operation.";
158            case GET: return "HTTP GET operation.";
159            case OPTIONS: return "HTTP OPTIONS operation.";
160            case PATCH: return "HTTP PATCH operation.";
161            case POST: return "HTTP POST operation.";
162            case PUT: return "HTTP PUT operation.";
163            case HEAD: return "HTTP HEAD operation.";
164            default: return "?";
165          }
166        }
167        public String getDisplay() {
168          switch (this) {
169            case DELETE: return "DELETE";
170            case GET: return "GET";
171            case OPTIONS: return "OPTIONS";
172            case PATCH: return "PATCH";
173            case POST: return "POST";
174            case PUT: return "PUT";
175            case HEAD: return "HEAD";
176            default: return "?";
177          }
178        }
179    }
180
181  public static class TestScriptRequestMethodCodeEnumFactory implements EnumFactory<TestScriptRequestMethodCode> {
182    public TestScriptRequestMethodCode fromCode(String codeString) throws IllegalArgumentException {
183      if (codeString == null || "".equals(codeString))
184            if (codeString == null || "".equals(codeString))
185                return null;
186        if ("delete".equals(codeString))
187          return TestScriptRequestMethodCode.DELETE;
188        if ("get".equals(codeString))
189          return TestScriptRequestMethodCode.GET;
190        if ("options".equals(codeString))
191          return TestScriptRequestMethodCode.OPTIONS;
192        if ("patch".equals(codeString))
193          return TestScriptRequestMethodCode.PATCH;
194        if ("post".equals(codeString))
195          return TestScriptRequestMethodCode.POST;
196        if ("put".equals(codeString))
197          return TestScriptRequestMethodCode.PUT;
198        if ("head".equals(codeString))
199          return TestScriptRequestMethodCode.HEAD;
200        throw new IllegalArgumentException("Unknown TestScriptRequestMethodCode code '"+codeString+"'");
201        }
202        public Enumeration<TestScriptRequestMethodCode> fromType(Base code) throws FHIRException {
203          if (code == null)
204            return null;
205          if (code.isEmpty())
206            return new Enumeration<TestScriptRequestMethodCode>(this);
207          String codeString = ((PrimitiveType) code).asStringValue();
208          if (codeString == null || "".equals(codeString))
209            return null;
210        if ("delete".equals(codeString))
211          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.DELETE);
212        if ("get".equals(codeString))
213          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.GET);
214        if ("options".equals(codeString))
215          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.OPTIONS);
216        if ("patch".equals(codeString))
217          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.PATCH);
218        if ("post".equals(codeString))
219          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.POST);
220        if ("put".equals(codeString))
221          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.PUT);
222        if ("head".equals(codeString))
223          return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.HEAD);
224        throw new FHIRException("Unknown TestScriptRequestMethodCode code '"+codeString+"'");
225        }
226    public String toCode(TestScriptRequestMethodCode code) {
227      if (code == TestScriptRequestMethodCode.DELETE)
228        return "delete";
229      if (code == TestScriptRequestMethodCode.GET)
230        return "get";
231      if (code == TestScriptRequestMethodCode.OPTIONS)
232        return "options";
233      if (code == TestScriptRequestMethodCode.PATCH)
234        return "patch";
235      if (code == TestScriptRequestMethodCode.POST)
236        return "post";
237      if (code == TestScriptRequestMethodCode.PUT)
238        return "put";
239      if (code == TestScriptRequestMethodCode.HEAD)
240        return "head";
241      return "?";
242      }
243    public String toSystem(TestScriptRequestMethodCode code) {
244      return code.getSystem();
245      }
246    }
247
248    public enum AssertionDirectionType {
249        /**
250         * The assertion is evaluated on the response. This is the default value.
251         */
252        RESPONSE, 
253        /**
254         * The assertion is evaluated on the request.
255         */
256        REQUEST, 
257        /**
258         * added to help the parsers with the generic types
259         */
260        NULL;
261        public static AssertionDirectionType fromCode(String codeString) throws FHIRException {
262            if (codeString == null || "".equals(codeString))
263                return null;
264        if ("response".equals(codeString))
265          return RESPONSE;
266        if ("request".equals(codeString))
267          return REQUEST;
268        if (Configuration.isAcceptInvalidEnums())
269          return null;
270        else
271          throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'");
272        }
273        public String toCode() {
274          switch (this) {
275            case RESPONSE: return "response";
276            case REQUEST: return "request";
277            default: return "?";
278          }
279        }
280        public String getSystem() {
281          switch (this) {
282            case RESPONSE: return "http://hl7.org/fhir/assert-direction-codes";
283            case REQUEST: return "http://hl7.org/fhir/assert-direction-codes";
284            default: return "?";
285          }
286        }
287        public String getDefinition() {
288          switch (this) {
289            case RESPONSE: return "The assertion is evaluated on the response. This is the default value.";
290            case REQUEST: return "The assertion is evaluated on the request.";
291            default: return "?";
292          }
293        }
294        public String getDisplay() {
295          switch (this) {
296            case RESPONSE: return "response";
297            case REQUEST: return "request";
298            default: return "?";
299          }
300        }
301    }
302
303  public static class AssertionDirectionTypeEnumFactory implements EnumFactory<AssertionDirectionType> {
304    public AssertionDirectionType fromCode(String codeString) throws IllegalArgumentException {
305      if (codeString == null || "".equals(codeString))
306            if (codeString == null || "".equals(codeString))
307                return null;
308        if ("response".equals(codeString))
309          return AssertionDirectionType.RESPONSE;
310        if ("request".equals(codeString))
311          return AssertionDirectionType.REQUEST;
312        throw new IllegalArgumentException("Unknown AssertionDirectionType code '"+codeString+"'");
313        }
314        public Enumeration<AssertionDirectionType> fromType(Base code) throws FHIRException {
315          if (code == null)
316            return null;
317          if (code.isEmpty())
318            return new Enumeration<AssertionDirectionType>(this);
319          String codeString = ((PrimitiveType) code).asStringValue();
320          if (codeString == null || "".equals(codeString))
321            return null;
322        if ("response".equals(codeString))
323          return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.RESPONSE);
324        if ("request".equals(codeString))
325          return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.REQUEST);
326        throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'");
327        }
328    public String toCode(AssertionDirectionType code) {
329      if (code == AssertionDirectionType.RESPONSE)
330        return "response";
331      if (code == AssertionDirectionType.REQUEST)
332        return "request";
333      return "?";
334      }
335    public String toSystem(AssertionDirectionType code) {
336      return code.getSystem();
337      }
338    }
339
340    public enum AssertionOperatorType {
341        /**
342         * Default value. Equals comparison.
343         */
344        EQUALS, 
345        /**
346         * Not equals comparison.
347         */
348        NOTEQUALS, 
349        /**
350         * Compare value within a known set of values.
351         */
352        IN, 
353        /**
354         * Compare value not within a known set of values.
355         */
356        NOTIN, 
357        /**
358         * Compare value to be greater than a known value.
359         */
360        GREATERTHAN, 
361        /**
362         * Compare value to be less than a known value.
363         */
364        LESSTHAN, 
365        /**
366         * Compare value is empty.
367         */
368        EMPTY, 
369        /**
370         * Compare value is not empty.
371         */
372        NOTEMPTY, 
373        /**
374         * Compare value string contains a known value.
375         */
376        CONTAINS, 
377        /**
378         * Compare value string does not contain a known value.
379         */
380        NOTCONTAINS, 
381        /**
382         * Evaluate the FHIRPath expression as a boolean condition.
383         */
384        EVAL, 
385        /**
386         * added to help the parsers with the generic types
387         */
388        NULL;
389        public static AssertionOperatorType fromCode(String codeString) throws FHIRException {
390            if (codeString == null || "".equals(codeString))
391                return null;
392        if ("equals".equals(codeString))
393          return EQUALS;
394        if ("notEquals".equals(codeString))
395          return NOTEQUALS;
396        if ("in".equals(codeString))
397          return IN;
398        if ("notIn".equals(codeString))
399          return NOTIN;
400        if ("greaterThan".equals(codeString))
401          return GREATERTHAN;
402        if ("lessThan".equals(codeString))
403          return LESSTHAN;
404        if ("empty".equals(codeString))
405          return EMPTY;
406        if ("notEmpty".equals(codeString))
407          return NOTEMPTY;
408        if ("contains".equals(codeString))
409          return CONTAINS;
410        if ("notContains".equals(codeString))
411          return NOTCONTAINS;
412        if ("eval".equals(codeString))
413          return EVAL;
414        if (Configuration.isAcceptInvalidEnums())
415          return null;
416        else
417          throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'");
418        }
419        public String toCode() {
420          switch (this) {
421            case EQUALS: return "equals";
422            case NOTEQUALS: return "notEquals";
423            case IN: return "in";
424            case NOTIN: return "notIn";
425            case GREATERTHAN: return "greaterThan";
426            case LESSTHAN: return "lessThan";
427            case EMPTY: return "empty";
428            case NOTEMPTY: return "notEmpty";
429            case CONTAINS: return "contains";
430            case NOTCONTAINS: return "notContains";
431            case EVAL: return "eval";
432            default: return "?";
433          }
434        }
435        public String getSystem() {
436          switch (this) {
437            case EQUALS: return "http://hl7.org/fhir/assert-operator-codes";
438            case NOTEQUALS: return "http://hl7.org/fhir/assert-operator-codes";
439            case IN: return "http://hl7.org/fhir/assert-operator-codes";
440            case NOTIN: return "http://hl7.org/fhir/assert-operator-codes";
441            case GREATERTHAN: return "http://hl7.org/fhir/assert-operator-codes";
442            case LESSTHAN: return "http://hl7.org/fhir/assert-operator-codes";
443            case EMPTY: return "http://hl7.org/fhir/assert-operator-codes";
444            case NOTEMPTY: return "http://hl7.org/fhir/assert-operator-codes";
445            case CONTAINS: return "http://hl7.org/fhir/assert-operator-codes";
446            case NOTCONTAINS: return "http://hl7.org/fhir/assert-operator-codes";
447            case EVAL: return "http://hl7.org/fhir/assert-operator-codes";
448            default: return "?";
449          }
450        }
451        public String getDefinition() {
452          switch (this) {
453            case EQUALS: return "Default value. Equals comparison.";
454            case NOTEQUALS: return "Not equals comparison.";
455            case IN: return "Compare value within a known set of values.";
456            case NOTIN: return "Compare value not within a known set of values.";
457            case GREATERTHAN: return "Compare value to be greater than a known value.";
458            case LESSTHAN: return "Compare value to be less than a known value.";
459            case EMPTY: return "Compare value is empty.";
460            case NOTEMPTY: return "Compare value is not empty.";
461            case CONTAINS: return "Compare value string contains a known value.";
462            case NOTCONTAINS: return "Compare value string does not contain a known value.";
463            case EVAL: return "Evaluate the FHIRPath expression as a boolean condition.";
464            default: return "?";
465          }
466        }
467        public String getDisplay() {
468          switch (this) {
469            case EQUALS: return "equals";
470            case NOTEQUALS: return "notEquals";
471            case IN: return "in";
472            case NOTIN: return "notIn";
473            case GREATERTHAN: return "greaterThan";
474            case LESSTHAN: return "lessThan";
475            case EMPTY: return "empty";
476            case NOTEMPTY: return "notEmpty";
477            case CONTAINS: return "contains";
478            case NOTCONTAINS: return "notContains";
479            case EVAL: return "evaluate";
480            default: return "?";
481          }
482        }
483    }
484
485  public static class AssertionOperatorTypeEnumFactory implements EnumFactory<AssertionOperatorType> {
486    public AssertionOperatorType fromCode(String codeString) throws IllegalArgumentException {
487      if (codeString == null || "".equals(codeString))
488            if (codeString == null || "".equals(codeString))
489                return null;
490        if ("equals".equals(codeString))
491          return AssertionOperatorType.EQUALS;
492        if ("notEquals".equals(codeString))
493          return AssertionOperatorType.NOTEQUALS;
494        if ("in".equals(codeString))
495          return AssertionOperatorType.IN;
496        if ("notIn".equals(codeString))
497          return AssertionOperatorType.NOTIN;
498        if ("greaterThan".equals(codeString))
499          return AssertionOperatorType.GREATERTHAN;
500        if ("lessThan".equals(codeString))
501          return AssertionOperatorType.LESSTHAN;
502        if ("empty".equals(codeString))
503          return AssertionOperatorType.EMPTY;
504        if ("notEmpty".equals(codeString))
505          return AssertionOperatorType.NOTEMPTY;
506        if ("contains".equals(codeString))
507          return AssertionOperatorType.CONTAINS;
508        if ("notContains".equals(codeString))
509          return AssertionOperatorType.NOTCONTAINS;
510        if ("eval".equals(codeString))
511          return AssertionOperatorType.EVAL;
512        throw new IllegalArgumentException("Unknown AssertionOperatorType code '"+codeString+"'");
513        }
514        public Enumeration<AssertionOperatorType> fromType(Base code) throws FHIRException {
515          if (code == null)
516            return null;
517          if (code.isEmpty())
518            return new Enumeration<AssertionOperatorType>(this);
519          String codeString = ((PrimitiveType) code).asStringValue();
520          if (codeString == null || "".equals(codeString))
521            return null;
522        if ("equals".equals(codeString))
523          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EQUALS);
524        if ("notEquals".equals(codeString))
525          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEQUALS);
526        if ("in".equals(codeString))
527          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.IN);
528        if ("notIn".equals(codeString))
529          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTIN);
530        if ("greaterThan".equals(codeString))
531          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.GREATERTHAN);
532        if ("lessThan".equals(codeString))
533          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.LESSTHAN);
534        if ("empty".equals(codeString))
535          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EMPTY);
536        if ("notEmpty".equals(codeString))
537          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEMPTY);
538        if ("contains".equals(codeString))
539          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.CONTAINS);
540        if ("notContains".equals(codeString))
541          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTCONTAINS);
542        if ("eval".equals(codeString))
543          return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EVAL);
544        throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'");
545        }
546    public String toCode(AssertionOperatorType code) {
547      if (code == AssertionOperatorType.EQUALS)
548        return "equals";
549      if (code == AssertionOperatorType.NOTEQUALS)
550        return "notEquals";
551      if (code == AssertionOperatorType.IN)
552        return "in";
553      if (code == AssertionOperatorType.NOTIN)
554        return "notIn";
555      if (code == AssertionOperatorType.GREATERTHAN)
556        return "greaterThan";
557      if (code == AssertionOperatorType.LESSTHAN)
558        return "lessThan";
559      if (code == AssertionOperatorType.EMPTY)
560        return "empty";
561      if (code == AssertionOperatorType.NOTEMPTY)
562        return "notEmpty";
563      if (code == AssertionOperatorType.CONTAINS)
564        return "contains";
565      if (code == AssertionOperatorType.NOTCONTAINS)
566        return "notContains";
567      if (code == AssertionOperatorType.EVAL)
568        return "eval";
569      return "?";
570      }
571    public String toSystem(AssertionOperatorType code) {
572      return code.getSystem();
573      }
574    }
575
576    public enum AssertionResponseTypes {
577        /**
578         * Response code is 200.
579         */
580        OKAY, 
581        /**
582         * Response code is 201.
583         */
584        CREATED, 
585        /**
586         * Response code is 204.
587         */
588        NOCONTENT, 
589        /**
590         * Response code is 304.
591         */
592        NOTMODIFIED, 
593        /**
594         * Response code is 400.
595         */
596        BAD, 
597        /**
598         * Response code is 403.
599         */
600        FORBIDDEN, 
601        /**
602         * Response code is 404.
603         */
604        NOTFOUND, 
605        /**
606         * Response code is 405.
607         */
608        METHODNOTALLOWED, 
609        /**
610         * Response code is 409.
611         */
612        CONFLICT, 
613        /**
614         * Response code is 410.
615         */
616        GONE, 
617        /**
618         * Response code is 412.
619         */
620        PRECONDITIONFAILED, 
621        /**
622         * Response code is 422.
623         */
624        UNPROCESSABLE, 
625        /**
626         * added to help the parsers with the generic types
627         */
628        NULL;
629        public static AssertionResponseTypes fromCode(String codeString) throws FHIRException {
630            if (codeString == null || "".equals(codeString))
631                return null;
632        if ("okay".equals(codeString))
633          return OKAY;
634        if ("created".equals(codeString))
635          return CREATED;
636        if ("noContent".equals(codeString))
637          return NOCONTENT;
638        if ("notModified".equals(codeString))
639          return NOTMODIFIED;
640        if ("bad".equals(codeString))
641          return BAD;
642        if ("forbidden".equals(codeString))
643          return FORBIDDEN;
644        if ("notFound".equals(codeString))
645          return NOTFOUND;
646        if ("methodNotAllowed".equals(codeString))
647          return METHODNOTALLOWED;
648        if ("conflict".equals(codeString))
649          return CONFLICT;
650        if ("gone".equals(codeString))
651          return GONE;
652        if ("preconditionFailed".equals(codeString))
653          return PRECONDITIONFAILED;
654        if ("unprocessable".equals(codeString))
655          return UNPROCESSABLE;
656        if (Configuration.isAcceptInvalidEnums())
657          return null;
658        else
659          throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'");
660        }
661        public String toCode() {
662          switch (this) {
663            case OKAY: return "okay";
664            case CREATED: return "created";
665            case NOCONTENT: return "noContent";
666            case NOTMODIFIED: return "notModified";
667            case BAD: return "bad";
668            case FORBIDDEN: return "forbidden";
669            case NOTFOUND: return "notFound";
670            case METHODNOTALLOWED: return "methodNotAllowed";
671            case CONFLICT: return "conflict";
672            case GONE: return "gone";
673            case PRECONDITIONFAILED: return "preconditionFailed";
674            case UNPROCESSABLE: return "unprocessable";
675            default: return "?";
676          }
677        }
678        public String getSystem() {
679          switch (this) {
680            case OKAY: return "http://hl7.org/fhir/assert-response-code-types";
681            case CREATED: return "http://hl7.org/fhir/assert-response-code-types";
682            case NOCONTENT: return "http://hl7.org/fhir/assert-response-code-types";
683            case NOTMODIFIED: return "http://hl7.org/fhir/assert-response-code-types";
684            case BAD: return "http://hl7.org/fhir/assert-response-code-types";
685            case FORBIDDEN: return "http://hl7.org/fhir/assert-response-code-types";
686            case NOTFOUND: return "http://hl7.org/fhir/assert-response-code-types";
687            case METHODNOTALLOWED: return "http://hl7.org/fhir/assert-response-code-types";
688            case CONFLICT: return "http://hl7.org/fhir/assert-response-code-types";
689            case GONE: return "http://hl7.org/fhir/assert-response-code-types";
690            case PRECONDITIONFAILED: return "http://hl7.org/fhir/assert-response-code-types";
691            case UNPROCESSABLE: return "http://hl7.org/fhir/assert-response-code-types";
692            default: return "?";
693          }
694        }
695        public String getDefinition() {
696          switch (this) {
697            case OKAY: return "Response code is 200.";
698            case CREATED: return "Response code is 201.";
699            case NOCONTENT: return "Response code is 204.";
700            case NOTMODIFIED: return "Response code is 304.";
701            case BAD: return "Response code is 400.";
702            case FORBIDDEN: return "Response code is 403.";
703            case NOTFOUND: return "Response code is 404.";
704            case METHODNOTALLOWED: return "Response code is 405.";
705            case CONFLICT: return "Response code is 409.";
706            case GONE: return "Response code is 410.";
707            case PRECONDITIONFAILED: return "Response code is 412.";
708            case UNPROCESSABLE: return "Response code is 422.";
709            default: return "?";
710          }
711        }
712        public String getDisplay() {
713          switch (this) {
714            case OKAY: return "okay";
715            case CREATED: return "created";
716            case NOCONTENT: return "noContent";
717            case NOTMODIFIED: return "notModified";
718            case BAD: return "bad";
719            case FORBIDDEN: return "forbidden";
720            case NOTFOUND: return "notFound";
721            case METHODNOTALLOWED: return "methodNotAllowed";
722            case CONFLICT: return "conflict";
723            case GONE: return "gone";
724            case PRECONDITIONFAILED: return "preconditionFailed";
725            case UNPROCESSABLE: return "unprocessable";
726            default: return "?";
727          }
728        }
729    }
730
731  public static class AssertionResponseTypesEnumFactory implements EnumFactory<AssertionResponseTypes> {
732    public AssertionResponseTypes fromCode(String codeString) throws IllegalArgumentException {
733      if (codeString == null || "".equals(codeString))
734            if (codeString == null || "".equals(codeString))
735                return null;
736        if ("okay".equals(codeString))
737          return AssertionResponseTypes.OKAY;
738        if ("created".equals(codeString))
739          return AssertionResponseTypes.CREATED;
740        if ("noContent".equals(codeString))
741          return AssertionResponseTypes.NOCONTENT;
742        if ("notModified".equals(codeString))
743          return AssertionResponseTypes.NOTMODIFIED;
744        if ("bad".equals(codeString))
745          return AssertionResponseTypes.BAD;
746        if ("forbidden".equals(codeString))
747          return AssertionResponseTypes.FORBIDDEN;
748        if ("notFound".equals(codeString))
749          return AssertionResponseTypes.NOTFOUND;
750        if ("methodNotAllowed".equals(codeString))
751          return AssertionResponseTypes.METHODNOTALLOWED;
752        if ("conflict".equals(codeString))
753          return AssertionResponseTypes.CONFLICT;
754        if ("gone".equals(codeString))
755          return AssertionResponseTypes.GONE;
756        if ("preconditionFailed".equals(codeString))
757          return AssertionResponseTypes.PRECONDITIONFAILED;
758        if ("unprocessable".equals(codeString))
759          return AssertionResponseTypes.UNPROCESSABLE;
760        throw new IllegalArgumentException("Unknown AssertionResponseTypes code '"+codeString+"'");
761        }
762        public Enumeration<AssertionResponseTypes> fromType(Base code) throws FHIRException {
763          if (code == null)
764            return null;
765          if (code.isEmpty())
766            return new Enumeration<AssertionResponseTypes>(this);
767          String codeString = ((PrimitiveType) code).asStringValue();
768          if (codeString == null || "".equals(codeString))
769            return null;
770        if ("okay".equals(codeString))
771          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.OKAY);
772        if ("created".equals(codeString))
773          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CREATED);
774        if ("noContent".equals(codeString))
775          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOCONTENT);
776        if ("notModified".equals(codeString))
777          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTMODIFIED);
778        if ("bad".equals(codeString))
779          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.BAD);
780        if ("forbidden".equals(codeString))
781          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.FORBIDDEN);
782        if ("notFound".equals(codeString))
783          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTFOUND);
784        if ("methodNotAllowed".equals(codeString))
785          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.METHODNOTALLOWED);
786        if ("conflict".equals(codeString))
787          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CONFLICT);
788        if ("gone".equals(codeString))
789          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.GONE);
790        if ("preconditionFailed".equals(codeString))
791          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.PRECONDITIONFAILED);
792        if ("unprocessable".equals(codeString))
793          return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.UNPROCESSABLE);
794        throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'");
795        }
796    public String toCode(AssertionResponseTypes code) {
797      if (code == AssertionResponseTypes.OKAY)
798        return "okay";
799      if (code == AssertionResponseTypes.CREATED)
800        return "created";
801      if (code == AssertionResponseTypes.NOCONTENT)
802        return "noContent";
803      if (code == AssertionResponseTypes.NOTMODIFIED)
804        return "notModified";
805      if (code == AssertionResponseTypes.BAD)
806        return "bad";
807      if (code == AssertionResponseTypes.FORBIDDEN)
808        return "forbidden";
809      if (code == AssertionResponseTypes.NOTFOUND)
810        return "notFound";
811      if (code == AssertionResponseTypes.METHODNOTALLOWED)
812        return "methodNotAllowed";
813      if (code == AssertionResponseTypes.CONFLICT)
814        return "conflict";
815      if (code == AssertionResponseTypes.GONE)
816        return "gone";
817      if (code == AssertionResponseTypes.PRECONDITIONFAILED)
818        return "preconditionFailed";
819      if (code == AssertionResponseTypes.UNPROCESSABLE)
820        return "unprocessable";
821      return "?";
822      }
823    public String toSystem(AssertionResponseTypes code) {
824      return code.getSystem();
825      }
826    }
827
828    @Block()
829    public static class TestScriptOriginComponent extends BackboneElement implements IBaseBackboneElement {
830        /**
831         * Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.
832         */
833        @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false)
834        @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." )
835        protected IntegerType index;
836
837        /**
838         * The type of origin profile the test system supports.
839         */
840        @Child(name = "profile", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false)
841        @Description(shortDefinition="FHIR-Client | FHIR-SDC-FormFiller", formalDefinition="The type of origin profile the test system supports." )
842        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-profile-origin-types")
843        protected Coding profile;
844
845        private static final long serialVersionUID = -1239935149L;
846
847    /**
848     * Constructor
849     */
850      public TestScriptOriginComponent() {
851        super();
852      }
853
854    /**
855     * Constructor
856     */
857      public TestScriptOriginComponent(IntegerType index, Coding profile) {
858        super();
859        this.index = index;
860        this.profile = profile;
861      }
862
863        /**
864         * @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
865         */
866        public IntegerType getIndexElement() { 
867          if (this.index == null)
868            if (Configuration.errorOnAutoCreate())
869              throw new Error("Attempt to auto-create TestScriptOriginComponent.index");
870            else if (Configuration.doAutoCreate())
871              this.index = new IntegerType(); // bb
872          return this.index;
873        }
874
875        public boolean hasIndexElement() { 
876          return this.index != null && !this.index.isEmpty();
877        }
878
879        public boolean hasIndex() { 
880          return this.index != null && !this.index.isEmpty();
881        }
882
883        /**
884         * @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
885         */
886        public TestScriptOriginComponent setIndexElement(IntegerType value) { 
887          this.index = value;
888          return this;
889        }
890
891        /**
892         * @return Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.
893         */
894        public int getIndex() { 
895          return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue();
896        }
897
898        /**
899         * @param value Abstract name given to an origin server in this test script.  The name is provided as a number starting at 1.
900         */
901        public TestScriptOriginComponent setIndex(int value) { 
902            if (this.index == null)
903              this.index = new IntegerType();
904            this.index.setValue(value);
905          return this;
906        }
907
908        /**
909         * @return {@link #profile} (The type of origin profile the test system supports.)
910         */
911        public Coding getProfile() { 
912          if (this.profile == null)
913            if (Configuration.errorOnAutoCreate())
914              throw new Error("Attempt to auto-create TestScriptOriginComponent.profile");
915            else if (Configuration.doAutoCreate())
916              this.profile = new Coding(); // cc
917          return this.profile;
918        }
919
920        public boolean hasProfile() { 
921          return this.profile != null && !this.profile.isEmpty();
922        }
923
924        /**
925         * @param value {@link #profile} (The type of origin profile the test system supports.)
926         */
927        public TestScriptOriginComponent setProfile(Coding value) { 
928          this.profile = value;
929          return this;
930        }
931
932        protected void listChildren(List<Property> children) {
933          super.listChildren(children);
934          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));
935          children.add(new Property("profile", "Coding", "The type of origin profile the test system supports.", 0, 1, profile));
936        }
937
938        @Override
939        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
940          switch (_hash) {
941          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);
942          case -309425751: /*profile*/  return new Property("profile", "Coding", "The type of origin profile the test system supports.", 0, 1, profile);
943          default: return super.getNamedProperty(_hash, _name, _checkValid);
944          }
945
946        }
947
948      @Override
949      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
950        switch (hash) {
951        case 100346066: /*index*/ return this.index == null ? new Base[0] : new Base[] {this.index}; // IntegerType
952        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Coding
953        default: return super.getProperty(hash, name, checkValid);
954        }
955
956      }
957
958      @Override
959      public Base setProperty(int hash, String name, Base value) throws FHIRException {
960        switch (hash) {
961        case 100346066: // index
962          this.index = castToInteger(value); // IntegerType
963          return value;
964        case -309425751: // profile
965          this.profile = castToCoding(value); // Coding
966          return value;
967        default: return super.setProperty(hash, name, value);
968        }
969
970      }
971
972      @Override
973      public Base setProperty(String name, Base value) throws FHIRException {
974        if (name.equals("index")) {
975          this.index = castToInteger(value); // IntegerType
976        } else if (name.equals("profile")) {
977          this.profile = castToCoding(value); // Coding
978        } else
979          return super.setProperty(name, value);
980        return value;
981      }
982
983      @Override
984      public Base makeProperty(int hash, String name) throws FHIRException {
985        switch (hash) {
986        case 100346066:  return getIndexElement();
987        case -309425751:  return getProfile();
988        default: return super.makeProperty(hash, name);
989        }
990
991      }
992
993      @Override
994      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
995        switch (hash) {
996        case 100346066: /*index*/ return new String[] {"integer"};
997        case -309425751: /*profile*/ return new String[] {"Coding"};
998        default: return super.getTypesForProperty(hash, name);
999        }
1000
1001      }
1002
1003      @Override
1004      public Base addChild(String name) throws FHIRException {
1005        if (name.equals("index")) {
1006          throw new FHIRException("Cannot call addChild on a primitive type TestScript.index");
1007        }
1008        else if (name.equals("profile")) {
1009          this.profile = new Coding();
1010          return this.profile;
1011        }
1012        else
1013          return super.addChild(name);
1014      }
1015
1016      public TestScriptOriginComponent copy() {
1017        TestScriptOriginComponent dst = new TestScriptOriginComponent();
1018        copyValues(dst);
1019        return dst;
1020      }
1021
1022      public void copyValues(TestScriptOriginComponent dst) {
1023        super.copyValues(dst);
1024        dst.index = index == null ? null : index.copy();
1025        dst.profile = profile == null ? null : profile.copy();
1026      }
1027
1028      @Override
1029      public boolean equalsDeep(Base other_) {
1030        if (!super.equalsDeep(other_))
1031          return false;
1032        if (!(other_ instanceof TestScriptOriginComponent))
1033          return false;
1034        TestScriptOriginComponent o = (TestScriptOriginComponent) other_;
1035        return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true);
1036      }
1037
1038      @Override
1039      public boolean equalsShallow(Base other_) {
1040        if (!super.equalsShallow(other_))
1041          return false;
1042        if (!(other_ instanceof TestScriptOriginComponent))
1043          return false;
1044        TestScriptOriginComponent o = (TestScriptOriginComponent) other_;
1045        return compareValues(index, o.index, true);
1046      }
1047
1048      public boolean isEmpty() {
1049        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(index, profile);
1050      }
1051
1052  public String fhirType() {
1053    return "TestScript.origin";
1054
1055  }
1056
1057  }
1058
1059    @Block()
1060    public static class TestScriptDestinationComponent extends BackboneElement implements IBaseBackboneElement {
1061        /**
1062         * Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.
1063         */
1064        @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1065        @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." )
1066        protected IntegerType index;
1067
1068        /**
1069         * The type of destination profile the test system supports.
1070         */
1071        @Child(name = "profile", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false)
1072        @Description(shortDefinition="FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor", formalDefinition="The type of destination profile the test system supports." )
1073        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-profile-destination-types")
1074        protected Coding profile;
1075
1076        private static final long serialVersionUID = -1239935149L;
1077
1078    /**
1079     * Constructor
1080     */
1081      public TestScriptDestinationComponent() {
1082        super();
1083      }
1084
1085    /**
1086     * Constructor
1087     */
1088      public TestScriptDestinationComponent(IntegerType index, Coding profile) {
1089        super();
1090        this.index = index;
1091        this.profile = profile;
1092      }
1093
1094        /**
1095         * @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
1096         */
1097        public IntegerType getIndexElement() { 
1098          if (this.index == null)
1099            if (Configuration.errorOnAutoCreate())
1100              throw new Error("Attempt to auto-create TestScriptDestinationComponent.index");
1101            else if (Configuration.doAutoCreate())
1102              this.index = new IntegerType(); // bb
1103          return this.index;
1104        }
1105
1106        public boolean hasIndexElement() { 
1107          return this.index != null && !this.index.isEmpty();
1108        }
1109
1110        public boolean hasIndex() { 
1111          return this.index != null && !this.index.isEmpty();
1112        }
1113
1114        /**
1115         * @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
1116         */
1117        public TestScriptDestinationComponent setIndexElement(IntegerType value) { 
1118          this.index = value;
1119          return this;
1120        }
1121
1122        /**
1123         * @return Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.
1124         */
1125        public int getIndex() { 
1126          return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue();
1127        }
1128
1129        /**
1130         * @param value Abstract name given to a destination server in this test script.  The name is provided as a number starting at 1.
1131         */
1132        public TestScriptDestinationComponent setIndex(int value) { 
1133            if (this.index == null)
1134              this.index = new IntegerType();
1135            this.index.setValue(value);
1136          return this;
1137        }
1138
1139        /**
1140         * @return {@link #profile} (The type of destination profile the test system supports.)
1141         */
1142        public Coding getProfile() { 
1143          if (this.profile == null)
1144            if (Configuration.errorOnAutoCreate())
1145              throw new Error("Attempt to auto-create TestScriptDestinationComponent.profile");
1146            else if (Configuration.doAutoCreate())
1147              this.profile = new Coding(); // cc
1148          return this.profile;
1149        }
1150
1151        public boolean hasProfile() { 
1152          return this.profile != null && !this.profile.isEmpty();
1153        }
1154
1155        /**
1156         * @param value {@link #profile} (The type of destination profile the test system supports.)
1157         */
1158        public TestScriptDestinationComponent setProfile(Coding value) { 
1159          this.profile = value;
1160          return this;
1161        }
1162
1163        protected void listChildren(List<Property> children) {
1164          super.listChildren(children);
1165          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));
1166          children.add(new Property("profile", "Coding", "The type of destination profile the test system supports.", 0, 1, profile));
1167        }
1168
1169        @Override
1170        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1171          switch (_hash) {
1172          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);
1173          case -309425751: /*profile*/  return new Property("profile", "Coding", "The type of destination profile the test system supports.", 0, 1, profile);
1174          default: return super.getNamedProperty(_hash, _name, _checkValid);
1175          }
1176
1177        }
1178
1179      @Override
1180      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1181        switch (hash) {
1182        case 100346066: /*index*/ return this.index == null ? new Base[0] : new Base[] {this.index}; // IntegerType
1183        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Coding
1184        default: return super.getProperty(hash, name, checkValid);
1185        }
1186
1187      }
1188
1189      @Override
1190      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1191        switch (hash) {
1192        case 100346066: // index
1193          this.index = castToInteger(value); // IntegerType
1194          return value;
1195        case -309425751: // profile
1196          this.profile = castToCoding(value); // Coding
1197          return value;
1198        default: return super.setProperty(hash, name, value);
1199        }
1200
1201      }
1202
1203      @Override
1204      public Base setProperty(String name, Base value) throws FHIRException {
1205        if (name.equals("index")) {
1206          this.index = castToInteger(value); // IntegerType
1207        } else if (name.equals("profile")) {
1208          this.profile = castToCoding(value); // Coding
1209        } else
1210          return super.setProperty(name, value);
1211        return value;
1212      }
1213
1214      @Override
1215      public Base makeProperty(int hash, String name) throws FHIRException {
1216        switch (hash) {
1217        case 100346066:  return getIndexElement();
1218        case -309425751:  return getProfile();
1219        default: return super.makeProperty(hash, name);
1220        }
1221
1222      }
1223
1224      @Override
1225      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1226        switch (hash) {
1227        case 100346066: /*index*/ return new String[] {"integer"};
1228        case -309425751: /*profile*/ return new String[] {"Coding"};
1229        default: return super.getTypesForProperty(hash, name);
1230        }
1231
1232      }
1233
1234      @Override
1235      public Base addChild(String name) throws FHIRException {
1236        if (name.equals("index")) {
1237          throw new FHIRException("Cannot call addChild on a primitive type TestScript.index");
1238        }
1239        else if (name.equals("profile")) {
1240          this.profile = new Coding();
1241          return this.profile;
1242        }
1243        else
1244          return super.addChild(name);
1245      }
1246
1247      public TestScriptDestinationComponent copy() {
1248        TestScriptDestinationComponent dst = new TestScriptDestinationComponent();
1249        copyValues(dst);
1250        return dst;
1251      }
1252
1253      public void copyValues(TestScriptDestinationComponent dst) {
1254        super.copyValues(dst);
1255        dst.index = index == null ? null : index.copy();
1256        dst.profile = profile == null ? null : profile.copy();
1257      }
1258
1259      @Override
1260      public boolean equalsDeep(Base other_) {
1261        if (!super.equalsDeep(other_))
1262          return false;
1263        if (!(other_ instanceof TestScriptDestinationComponent))
1264          return false;
1265        TestScriptDestinationComponent o = (TestScriptDestinationComponent) other_;
1266        return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true);
1267      }
1268
1269      @Override
1270      public boolean equalsShallow(Base other_) {
1271        if (!super.equalsShallow(other_))
1272          return false;
1273        if (!(other_ instanceof TestScriptDestinationComponent))
1274          return false;
1275        TestScriptDestinationComponent o = (TestScriptDestinationComponent) other_;
1276        return compareValues(index, o.index, true);
1277      }
1278
1279      public boolean isEmpty() {
1280        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(index, profile);
1281      }
1282
1283  public String fhirType() {
1284    return "TestScript.destination";
1285
1286  }
1287
1288  }
1289
1290    @Block()
1291    public static class TestScriptMetadataComponent extends BackboneElement implements IBaseBackboneElement {
1292        /**
1293         * A link to the FHIR specification that this test is covering.
1294         */
1295        @Child(name = "link", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1296        @Description(shortDefinition="Links to the FHIR specification", formalDefinition="A link to the FHIR specification that this test is covering." )
1297        protected List<TestScriptMetadataLinkComponent> link;
1298
1299        /**
1300         * Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.
1301         */
1302        @Child(name = "capability", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1303        @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." )
1304        protected List<TestScriptMetadataCapabilityComponent> capability;
1305
1306        private static final long serialVersionUID = 745183328L;
1307
1308    /**
1309     * Constructor
1310     */
1311      public TestScriptMetadataComponent() {
1312        super();
1313      }
1314
1315        /**
1316         * @return {@link #link} (A link to the FHIR specification that this test is covering.)
1317         */
1318        public List<TestScriptMetadataLinkComponent> getLink() { 
1319          if (this.link == null)
1320            this.link = new ArrayList<TestScriptMetadataLinkComponent>();
1321          return this.link;
1322        }
1323
1324        /**
1325         * @return Returns a reference to <code>this</code> for easy method chaining
1326         */
1327        public TestScriptMetadataComponent setLink(List<TestScriptMetadataLinkComponent> theLink) { 
1328          this.link = theLink;
1329          return this;
1330        }
1331
1332        public boolean hasLink() { 
1333          if (this.link == null)
1334            return false;
1335          for (TestScriptMetadataLinkComponent item : this.link)
1336            if (!item.isEmpty())
1337              return true;
1338          return false;
1339        }
1340
1341        public TestScriptMetadataLinkComponent addLink() { //3
1342          TestScriptMetadataLinkComponent t = new TestScriptMetadataLinkComponent();
1343          if (this.link == null)
1344            this.link = new ArrayList<TestScriptMetadataLinkComponent>();
1345          this.link.add(t);
1346          return t;
1347        }
1348
1349        public TestScriptMetadataComponent addLink(TestScriptMetadataLinkComponent t) { //3
1350          if (t == null)
1351            return this;
1352          if (this.link == null)
1353            this.link = new ArrayList<TestScriptMetadataLinkComponent>();
1354          this.link.add(t);
1355          return this;
1356        }
1357
1358        /**
1359         * @return The first repetition of repeating field {@link #link}, creating it if it does not already exist
1360         */
1361        public TestScriptMetadataLinkComponent getLinkFirstRep() { 
1362          if (getLink().isEmpty()) {
1363            addLink();
1364          }
1365          return getLink().get(0);
1366        }
1367
1368        /**
1369         * @return {@link #capability} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.)
1370         */
1371        public List<TestScriptMetadataCapabilityComponent> getCapability() { 
1372          if (this.capability == null)
1373            this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1374          return this.capability;
1375        }
1376
1377        /**
1378         * @return Returns a reference to <code>this</code> for easy method chaining
1379         */
1380        public TestScriptMetadataComponent setCapability(List<TestScriptMetadataCapabilityComponent> theCapability) { 
1381          this.capability = theCapability;
1382          return this;
1383        }
1384
1385        public boolean hasCapability() { 
1386          if (this.capability == null)
1387            return false;
1388          for (TestScriptMetadataCapabilityComponent item : this.capability)
1389            if (!item.isEmpty())
1390              return true;
1391          return false;
1392        }
1393
1394        public TestScriptMetadataCapabilityComponent addCapability() { //3
1395          TestScriptMetadataCapabilityComponent t = new TestScriptMetadataCapabilityComponent();
1396          if (this.capability == null)
1397            this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1398          this.capability.add(t);
1399          return t;
1400        }
1401
1402        public TestScriptMetadataComponent addCapability(TestScriptMetadataCapabilityComponent t) { //3
1403          if (t == null)
1404            return this;
1405          if (this.capability == null)
1406            this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1407          this.capability.add(t);
1408          return this;
1409        }
1410
1411        /**
1412         * @return The first repetition of repeating field {@link #capability}, creating it if it does not already exist
1413         */
1414        public TestScriptMetadataCapabilityComponent getCapabilityFirstRep() { 
1415          if (getCapability().isEmpty()) {
1416            addCapability();
1417          }
1418          return getCapability().get(0);
1419        }
1420
1421        protected void listChildren(List<Property> children) {
1422          super.listChildren(children);
1423          children.add(new Property("link", "", "A link to the FHIR specification that this test is covering.", 0, java.lang.Integer.MAX_VALUE, link));
1424          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));
1425        }
1426
1427        @Override
1428        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1429          switch (_hash) {
1430          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);
1431          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);
1432          default: return super.getNamedProperty(_hash, _name, _checkValid);
1433          }
1434
1435        }
1436
1437      @Override
1438      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1439        switch (hash) {
1440        case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // TestScriptMetadataLinkComponent
1441        case -783669992: /*capability*/ return this.capability == null ? new Base[0] : this.capability.toArray(new Base[this.capability.size()]); // TestScriptMetadataCapabilityComponent
1442        default: return super.getProperty(hash, name, checkValid);
1443        }
1444
1445      }
1446
1447      @Override
1448      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1449        switch (hash) {
1450        case 3321850: // link
1451          this.getLink().add((TestScriptMetadataLinkComponent) value); // TestScriptMetadataLinkComponent
1452          return value;
1453        case -783669992: // capability
1454          this.getCapability().add((TestScriptMetadataCapabilityComponent) value); // TestScriptMetadataCapabilityComponent
1455          return value;
1456        default: return super.setProperty(hash, name, value);
1457        }
1458
1459      }
1460
1461      @Override
1462      public Base setProperty(String name, Base value) throws FHIRException {
1463        if (name.equals("link")) {
1464          this.getLink().add((TestScriptMetadataLinkComponent) value);
1465        } else if (name.equals("capability")) {
1466          this.getCapability().add((TestScriptMetadataCapabilityComponent) value);
1467        } else
1468          return super.setProperty(name, value);
1469        return value;
1470      }
1471
1472      @Override
1473      public Base makeProperty(int hash, String name) throws FHIRException {
1474        switch (hash) {
1475        case 3321850:  return addLink(); 
1476        case -783669992:  return addCapability(); 
1477        default: return super.makeProperty(hash, name);
1478        }
1479
1480      }
1481
1482      @Override
1483      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1484        switch (hash) {
1485        case 3321850: /*link*/ return new String[] {};
1486        case -783669992: /*capability*/ return new String[] {};
1487        default: return super.getTypesForProperty(hash, name);
1488        }
1489
1490      }
1491
1492      @Override
1493      public Base addChild(String name) throws FHIRException {
1494        if (name.equals("link")) {
1495          return addLink();
1496        }
1497        else if (name.equals("capability")) {
1498          return addCapability();
1499        }
1500        else
1501          return super.addChild(name);
1502      }
1503
1504      public TestScriptMetadataComponent copy() {
1505        TestScriptMetadataComponent dst = new TestScriptMetadataComponent();
1506        copyValues(dst);
1507        return dst;
1508      }
1509
1510      public void copyValues(TestScriptMetadataComponent dst) {
1511        super.copyValues(dst);
1512        if (link != null) {
1513          dst.link = new ArrayList<TestScriptMetadataLinkComponent>();
1514          for (TestScriptMetadataLinkComponent i : link)
1515            dst.link.add(i.copy());
1516        };
1517        if (capability != null) {
1518          dst.capability = new ArrayList<TestScriptMetadataCapabilityComponent>();
1519          for (TestScriptMetadataCapabilityComponent i : capability)
1520            dst.capability.add(i.copy());
1521        };
1522      }
1523
1524      @Override
1525      public boolean equalsDeep(Base other_) {
1526        if (!super.equalsDeep(other_))
1527          return false;
1528        if (!(other_ instanceof TestScriptMetadataComponent))
1529          return false;
1530        TestScriptMetadataComponent o = (TestScriptMetadataComponent) other_;
1531        return compareDeep(link, o.link, true) && compareDeep(capability, o.capability, true);
1532      }
1533
1534      @Override
1535      public boolean equalsShallow(Base other_) {
1536        if (!super.equalsShallow(other_))
1537          return false;
1538        if (!(other_ instanceof TestScriptMetadataComponent))
1539          return false;
1540        TestScriptMetadataComponent o = (TestScriptMetadataComponent) other_;
1541        return true;
1542      }
1543
1544      public boolean isEmpty() {
1545        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(link, capability);
1546      }
1547
1548  public String fhirType() {
1549    return "TestScript.metadata";
1550
1551  }
1552
1553  }
1554
1555    @Block()
1556    public static class TestScriptMetadataLinkComponent extends BackboneElement implements IBaseBackboneElement {
1557        /**
1558         * URL to a particular requirement or feature within the FHIR specification.
1559         */
1560        @Child(name = "url", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1561        @Description(shortDefinition="URL to the specification", formalDefinition="URL to a particular requirement or feature within the FHIR specification." )
1562        protected UriType url;
1563
1564        /**
1565         * Short description of the link.
1566         */
1567        @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
1568        @Description(shortDefinition="Short description", formalDefinition="Short description of the link." )
1569        protected StringType description;
1570
1571        private static final long serialVersionUID = 213372298L;
1572
1573    /**
1574     * Constructor
1575     */
1576      public TestScriptMetadataLinkComponent() {
1577        super();
1578      }
1579
1580    /**
1581     * Constructor
1582     */
1583      public TestScriptMetadataLinkComponent(UriType url) {
1584        super();
1585        this.url = url;
1586      }
1587
1588        /**
1589         * @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
1590         */
1591        public UriType getUrlElement() { 
1592          if (this.url == null)
1593            if (Configuration.errorOnAutoCreate())
1594              throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.url");
1595            else if (Configuration.doAutoCreate())
1596              this.url = new UriType(); // bb
1597          return this.url;
1598        }
1599
1600        public boolean hasUrlElement() { 
1601          return this.url != null && !this.url.isEmpty();
1602        }
1603
1604        public boolean hasUrl() { 
1605          return this.url != null && !this.url.isEmpty();
1606        }
1607
1608        /**
1609         * @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
1610         */
1611        public TestScriptMetadataLinkComponent setUrlElement(UriType value) { 
1612          this.url = value;
1613          return this;
1614        }
1615
1616        /**
1617         * @return URL to a particular requirement or feature within the FHIR specification.
1618         */
1619        public String getUrl() { 
1620          return this.url == null ? null : this.url.getValue();
1621        }
1622
1623        /**
1624         * @param value URL to a particular requirement or feature within the FHIR specification.
1625         */
1626        public TestScriptMetadataLinkComponent setUrl(String value) { 
1627            if (this.url == null)
1628              this.url = new UriType();
1629            this.url.setValue(value);
1630          return this;
1631        }
1632
1633        /**
1634         * @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
1635         */
1636        public StringType getDescriptionElement() { 
1637          if (this.description == null)
1638            if (Configuration.errorOnAutoCreate())
1639              throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.description");
1640            else if (Configuration.doAutoCreate())
1641              this.description = new StringType(); // bb
1642          return this.description;
1643        }
1644
1645        public boolean hasDescriptionElement() { 
1646          return this.description != null && !this.description.isEmpty();
1647        }
1648
1649        public boolean hasDescription() { 
1650          return this.description != null && !this.description.isEmpty();
1651        }
1652
1653        /**
1654         * @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
1655         */
1656        public TestScriptMetadataLinkComponent setDescriptionElement(StringType value) { 
1657          this.description = value;
1658          return this;
1659        }
1660
1661        /**
1662         * @return Short description of the link.
1663         */
1664        public String getDescription() { 
1665          return this.description == null ? null : this.description.getValue();
1666        }
1667
1668        /**
1669         * @param value Short description of the link.
1670         */
1671        public TestScriptMetadataLinkComponent setDescription(String value) { 
1672          if (Utilities.noString(value))
1673            this.description = null;
1674          else {
1675            if (this.description == null)
1676              this.description = new StringType();
1677            this.description.setValue(value);
1678          }
1679          return this;
1680        }
1681
1682        protected void listChildren(List<Property> children) {
1683          super.listChildren(children);
1684          children.add(new Property("url", "uri", "URL to a particular requirement or feature within the FHIR specification.", 0, 1, url));
1685          children.add(new Property("description", "string", "Short description of the link.", 0, 1, description));
1686        }
1687
1688        @Override
1689        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1690          switch (_hash) {
1691          case 116079: /*url*/  return new Property("url", "uri", "URL to a particular requirement or feature within the FHIR specification.", 0, 1, url);
1692          case -1724546052: /*description*/  return new Property("description", "string", "Short description of the link.", 0, 1, description);
1693          default: return super.getNamedProperty(_hash, _name, _checkValid);
1694          }
1695
1696        }
1697
1698      @Override
1699      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1700        switch (hash) {
1701        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
1702        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
1703        default: return super.getProperty(hash, name, checkValid);
1704        }
1705
1706      }
1707
1708      @Override
1709      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1710        switch (hash) {
1711        case 116079: // url
1712          this.url = castToUri(value); // UriType
1713          return value;
1714        case -1724546052: // description
1715          this.description = castToString(value); // StringType
1716          return value;
1717        default: return super.setProperty(hash, name, value);
1718        }
1719
1720      }
1721
1722      @Override
1723      public Base setProperty(String name, Base value) throws FHIRException {
1724        if (name.equals("url")) {
1725          this.url = castToUri(value); // UriType
1726        } else if (name.equals("description")) {
1727          this.description = castToString(value); // StringType
1728        } else
1729          return super.setProperty(name, value);
1730        return value;
1731      }
1732
1733      @Override
1734      public Base makeProperty(int hash, String name) throws FHIRException {
1735        switch (hash) {
1736        case 116079:  return getUrlElement();
1737        case -1724546052:  return getDescriptionElement();
1738        default: return super.makeProperty(hash, name);
1739        }
1740
1741      }
1742
1743      @Override
1744      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1745        switch (hash) {
1746        case 116079: /*url*/ return new String[] {"uri"};
1747        case -1724546052: /*description*/ return new String[] {"string"};
1748        default: return super.getTypesForProperty(hash, name);
1749        }
1750
1751      }
1752
1753      @Override
1754      public Base addChild(String name) throws FHIRException {
1755        if (name.equals("url")) {
1756          throw new FHIRException("Cannot call addChild on a primitive type TestScript.url");
1757        }
1758        else if (name.equals("description")) {
1759          throw new FHIRException("Cannot call addChild on a primitive type TestScript.description");
1760        }
1761        else
1762          return super.addChild(name);
1763      }
1764
1765      public TestScriptMetadataLinkComponent copy() {
1766        TestScriptMetadataLinkComponent dst = new TestScriptMetadataLinkComponent();
1767        copyValues(dst);
1768        return dst;
1769      }
1770
1771      public void copyValues(TestScriptMetadataLinkComponent dst) {
1772        super.copyValues(dst);
1773        dst.url = url == null ? null : url.copy();
1774        dst.description = description == null ? null : description.copy();
1775      }
1776
1777      @Override
1778      public boolean equalsDeep(Base other_) {
1779        if (!super.equalsDeep(other_))
1780          return false;
1781        if (!(other_ instanceof TestScriptMetadataLinkComponent))
1782          return false;
1783        TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other_;
1784        return compareDeep(url, o.url, true) && compareDeep(description, o.description, true);
1785      }
1786
1787      @Override
1788      public boolean equalsShallow(Base other_) {
1789        if (!super.equalsShallow(other_))
1790          return false;
1791        if (!(other_ instanceof TestScriptMetadataLinkComponent))
1792          return false;
1793        TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other_;
1794        return compareValues(url, o.url, true) && compareValues(description, o.description, true);
1795      }
1796
1797      public boolean isEmpty() {
1798        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, description);
1799      }
1800
1801  public String fhirType() {
1802    return "TestScript.metadata.link";
1803
1804  }
1805
1806  }
1807
1808    @Block()
1809    public static class TestScriptMetadataCapabilityComponent extends BackboneElement implements IBaseBackboneElement {
1810        /**
1811         * Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.
1812         */
1813        @Child(name = "required", type = {BooleanType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1814        @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." )
1815        protected BooleanType required;
1816
1817        /**
1818         * Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.
1819         */
1820        @Child(name = "validated", type = {BooleanType.class}, order=2, min=1, max=1, modifier=false, summary=false)
1821        @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." )
1822        protected BooleanType validated;
1823
1824        /**
1825         * Description of the capabilities that this test script is requiring the server to support.
1826         */
1827        @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
1828        @Description(shortDefinition="The expected capabilities of the server", formalDefinition="Description of the capabilities that this test script is requiring the server to support." )
1829        protected StringType description;
1830
1831        /**
1832         * Which origin server these requirements apply to.
1833         */
1834        @Child(name = "origin", type = {IntegerType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1835        @Description(shortDefinition="Which origin server these requirements apply to", formalDefinition="Which origin server these requirements apply to." )
1836        protected List<IntegerType> origin;
1837
1838        /**
1839         * Which server these requirements apply to.
1840         */
1841        @Child(name = "destination", type = {IntegerType.class}, order=5, min=0, max=1, modifier=false, summary=false)
1842        @Description(shortDefinition="Which server these requirements apply to", formalDefinition="Which server these requirements apply to." )
1843        protected IntegerType destination;
1844
1845        /**
1846         * Links to the FHIR specification that describes this interaction and the resources involved in more detail.
1847         */
1848        @Child(name = "link", type = {UriType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1849        @Description(shortDefinition="Links to the FHIR specification", formalDefinition="Links to the FHIR specification that describes this interaction and the resources involved in more detail." )
1850        protected List<UriType> link;
1851
1852        /**
1853         * 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.
1854         */
1855        @Child(name = "capabilities", type = {CanonicalType.class}, order=7, min=1, max=1, modifier=false, summary=false)
1856        @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." )
1857        protected CanonicalType capabilities;
1858
1859        private static final long serialVersionUID = -1368199288L;
1860
1861    /**
1862     * Constructor
1863     */
1864      public TestScriptMetadataCapabilityComponent() {
1865        super();
1866      }
1867
1868    /**
1869     * Constructor
1870     */
1871      public TestScriptMetadataCapabilityComponent(BooleanType required, BooleanType validated, CanonicalType capabilities) {
1872        super();
1873        this.required = required;
1874        this.validated = validated;
1875        this.capabilities = capabilities;
1876      }
1877
1878        /**
1879         * @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
1880         */
1881        public BooleanType getRequiredElement() { 
1882          if (this.required == null)
1883            if (Configuration.errorOnAutoCreate())
1884              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.required");
1885            else if (Configuration.doAutoCreate())
1886              this.required = new BooleanType(); // bb
1887          return this.required;
1888        }
1889
1890        public boolean hasRequiredElement() { 
1891          return this.required != null && !this.required.isEmpty();
1892        }
1893
1894        public boolean hasRequired() { 
1895          return this.required != null && !this.required.isEmpty();
1896        }
1897
1898        /**
1899         * @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
1900         */
1901        public TestScriptMetadataCapabilityComponent setRequiredElement(BooleanType value) { 
1902          this.required = value;
1903          return this;
1904        }
1905
1906        /**
1907         * @return Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.
1908         */
1909        public boolean getRequired() { 
1910          return this.required == null || this.required.isEmpty() ? false : this.required.getValue();
1911        }
1912
1913        /**
1914         * @param value Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.
1915         */
1916        public TestScriptMetadataCapabilityComponent setRequired(boolean value) { 
1917            if (this.required == null)
1918              this.required = new BooleanType();
1919            this.required.setValue(value);
1920          return this;
1921        }
1922
1923        /**
1924         * @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
1925         */
1926        public BooleanType getValidatedElement() { 
1927          if (this.validated == null)
1928            if (Configuration.errorOnAutoCreate())
1929              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.validated");
1930            else if (Configuration.doAutoCreate())
1931              this.validated = new BooleanType(); // bb
1932          return this.validated;
1933        }
1934
1935        public boolean hasValidatedElement() { 
1936          return this.validated != null && !this.validated.isEmpty();
1937        }
1938
1939        public boolean hasValidated() { 
1940          return this.validated != null && !this.validated.isEmpty();
1941        }
1942
1943        /**
1944         * @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
1945         */
1946        public TestScriptMetadataCapabilityComponent setValidatedElement(BooleanType value) { 
1947          this.validated = value;
1948          return this;
1949        }
1950
1951        /**
1952         * @return Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.
1953         */
1954        public boolean getValidated() { 
1955          return this.validated == null || this.validated.isEmpty() ? false : this.validated.getValue();
1956        }
1957
1958        /**
1959         * @param value Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.
1960         */
1961        public TestScriptMetadataCapabilityComponent setValidated(boolean value) { 
1962            if (this.validated == null)
1963              this.validated = new BooleanType();
1964            this.validated.setValue(value);
1965          return this;
1966        }
1967
1968        /**
1969         * @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
1970         */
1971        public StringType getDescriptionElement() { 
1972          if (this.description == null)
1973            if (Configuration.errorOnAutoCreate())
1974              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.description");
1975            else if (Configuration.doAutoCreate())
1976              this.description = new StringType(); // bb
1977          return this.description;
1978        }
1979
1980        public boolean hasDescriptionElement() { 
1981          return this.description != null && !this.description.isEmpty();
1982        }
1983
1984        public boolean hasDescription() { 
1985          return this.description != null && !this.description.isEmpty();
1986        }
1987
1988        /**
1989         * @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
1990         */
1991        public TestScriptMetadataCapabilityComponent setDescriptionElement(StringType value) { 
1992          this.description = value;
1993          return this;
1994        }
1995
1996        /**
1997         * @return Description of the capabilities that this test script is requiring the server to support.
1998         */
1999        public String getDescription() { 
2000          return this.description == null ? null : this.description.getValue();
2001        }
2002
2003        /**
2004         * @param value Description of the capabilities that this test script is requiring the server to support.
2005         */
2006        public TestScriptMetadataCapabilityComponent setDescription(String value) { 
2007          if (Utilities.noString(value))
2008            this.description = null;
2009          else {
2010            if (this.description == null)
2011              this.description = new StringType();
2012            this.description.setValue(value);
2013          }
2014          return this;
2015        }
2016
2017        /**
2018         * @return {@link #origin} (Which origin server these requirements apply to.)
2019         */
2020        public List<IntegerType> getOrigin() { 
2021          if (this.origin == null)
2022            this.origin = new ArrayList<IntegerType>();
2023          return this.origin;
2024        }
2025
2026        /**
2027         * @return Returns a reference to <code>this</code> for easy method chaining
2028         */
2029        public TestScriptMetadataCapabilityComponent setOrigin(List<IntegerType> theOrigin) { 
2030          this.origin = theOrigin;
2031          return this;
2032        }
2033
2034        public boolean hasOrigin() { 
2035          if (this.origin == null)
2036            return false;
2037          for (IntegerType item : this.origin)
2038            if (!item.isEmpty())
2039              return true;
2040          return false;
2041        }
2042
2043        /**
2044         * @return {@link #origin} (Which origin server these requirements apply to.)
2045         */
2046        public IntegerType addOriginElement() {//2 
2047          IntegerType t = new IntegerType();
2048          if (this.origin == null)
2049            this.origin = new ArrayList<IntegerType>();
2050          this.origin.add(t);
2051          return t;
2052        }
2053
2054        /**
2055         * @param value {@link #origin} (Which origin server these requirements apply to.)
2056         */
2057        public TestScriptMetadataCapabilityComponent addOrigin(int value) { //1
2058          IntegerType t = new IntegerType();
2059          t.setValue(value);
2060          if (this.origin == null)
2061            this.origin = new ArrayList<IntegerType>();
2062          this.origin.add(t);
2063          return this;
2064        }
2065
2066        /**
2067         * @param value {@link #origin} (Which origin server these requirements apply to.)
2068         */
2069        public boolean hasOrigin(int value) { 
2070          if (this.origin == null)
2071            return false;
2072          for (IntegerType v : this.origin)
2073            if (v.getValue().equals(value)) // integer
2074              return true;
2075          return false;
2076        }
2077
2078        /**
2079         * @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
2080         */
2081        public IntegerType getDestinationElement() { 
2082          if (this.destination == null)
2083            if (Configuration.errorOnAutoCreate())
2084              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.destination");
2085            else if (Configuration.doAutoCreate())
2086              this.destination = new IntegerType(); // bb
2087          return this.destination;
2088        }
2089
2090        public boolean hasDestinationElement() { 
2091          return this.destination != null && !this.destination.isEmpty();
2092        }
2093
2094        public boolean hasDestination() { 
2095          return this.destination != null && !this.destination.isEmpty();
2096        }
2097
2098        /**
2099         * @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
2100         */
2101        public TestScriptMetadataCapabilityComponent setDestinationElement(IntegerType value) { 
2102          this.destination = value;
2103          return this;
2104        }
2105
2106        /**
2107         * @return Which server these requirements apply to.
2108         */
2109        public int getDestination() { 
2110          return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue();
2111        }
2112
2113        /**
2114         * @param value Which server these requirements apply to.
2115         */
2116        public TestScriptMetadataCapabilityComponent setDestination(int value) { 
2117            if (this.destination == null)
2118              this.destination = new IntegerType();
2119            this.destination.setValue(value);
2120          return this;
2121        }
2122
2123        /**
2124         * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.)
2125         */
2126        public List<UriType> getLink() { 
2127          if (this.link == null)
2128            this.link = new ArrayList<UriType>();
2129          return this.link;
2130        }
2131
2132        /**
2133         * @return Returns a reference to <code>this</code> for easy method chaining
2134         */
2135        public TestScriptMetadataCapabilityComponent setLink(List<UriType> theLink) { 
2136          this.link = theLink;
2137          return this;
2138        }
2139
2140        public boolean hasLink() { 
2141          if (this.link == null)
2142            return false;
2143          for (UriType item : this.link)
2144            if (!item.isEmpty())
2145              return true;
2146          return false;
2147        }
2148
2149        /**
2150         * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.)
2151         */
2152        public UriType addLinkElement() {//2 
2153          UriType t = new UriType();
2154          if (this.link == null)
2155            this.link = new ArrayList<UriType>();
2156          this.link.add(t);
2157          return t;
2158        }
2159
2160        /**
2161         * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.)
2162         */
2163        public TestScriptMetadataCapabilityComponent addLink(String value) { //1
2164          UriType t = new UriType();
2165          t.setValue(value);
2166          if (this.link == null)
2167            this.link = new ArrayList<UriType>();
2168          this.link.add(t);
2169          return this;
2170        }
2171
2172        /**
2173         * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.)
2174         */
2175        public boolean hasLink(String value) { 
2176          if (this.link == null)
2177            return false;
2178          for (UriType v : this.link)
2179            if (v.getValue().equals(value)) // uri
2180              return true;
2181          return false;
2182        }
2183
2184        /**
2185         * @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
2186         */
2187        public CanonicalType getCapabilitiesElement() { 
2188          if (this.capabilities == null)
2189            if (Configuration.errorOnAutoCreate())
2190              throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.capabilities");
2191            else if (Configuration.doAutoCreate())
2192              this.capabilities = new CanonicalType(); // bb
2193          return this.capabilities;
2194        }
2195
2196        public boolean hasCapabilitiesElement() { 
2197          return this.capabilities != null && !this.capabilities.isEmpty();
2198        }
2199
2200        public boolean hasCapabilities() { 
2201          return this.capabilities != null && !this.capabilities.isEmpty();
2202        }
2203
2204        /**
2205         * @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
2206         */
2207        public TestScriptMetadataCapabilityComponent setCapabilitiesElement(CanonicalType value) { 
2208          this.capabilities = value;
2209          return this;
2210        }
2211
2212        /**
2213         * @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.
2214         */
2215        public String getCapabilities() { 
2216          return this.capabilities == null ? null : this.capabilities.getValue();
2217        }
2218
2219        /**
2220         * @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.
2221         */
2222        public TestScriptMetadataCapabilityComponent setCapabilities(String value) { 
2223            if (this.capabilities == null)
2224              this.capabilities = new CanonicalType();
2225            this.capabilities.setValue(value);
2226          return this;
2227        }
2228
2229        protected void listChildren(List<Property> children) {
2230          super.listChildren(children);
2231          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));
2232          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));
2233          children.add(new Property("description", "string", "Description of the capabilities that this test script is requiring the server to support.", 0, 1, description));
2234          children.add(new Property("origin", "integer", "Which origin server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, origin));
2235          children.add(new Property("destination", "integer", "Which server these requirements apply to.", 0, 1, destination));
2236          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));
2237          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));
2238        }
2239
2240        @Override
2241        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2242          switch (_hash) {
2243          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);
2244          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);
2245          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);
2246          case -1008619738: /*origin*/  return new Property("origin", "integer", "Which origin server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, origin);
2247          case -1429847026: /*destination*/  return new Property("destination", "integer", "Which server these requirements apply to.", 0, 1, destination);
2248          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);
2249          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);
2250          default: return super.getNamedProperty(_hash, _name, _checkValid);
2251          }
2252
2253        }
2254
2255      @Override
2256      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2257        switch (hash) {
2258        case -393139297: /*required*/ return this.required == null ? new Base[0] : new Base[] {this.required}; // BooleanType
2259        case -1109784050: /*validated*/ return this.validated == null ? new Base[0] : new Base[] {this.validated}; // BooleanType
2260        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
2261        case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // IntegerType
2262        case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // IntegerType
2263        case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // UriType
2264        case -1487597642: /*capabilities*/ return this.capabilities == null ? new Base[0] : new Base[] {this.capabilities}; // CanonicalType
2265        default: return super.getProperty(hash, name, checkValid);
2266        }
2267
2268      }
2269
2270      @Override
2271      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2272        switch (hash) {
2273        case -393139297: // required
2274          this.required = castToBoolean(value); // BooleanType
2275          return value;
2276        case -1109784050: // validated
2277          this.validated = castToBoolean(value); // BooleanType
2278          return value;
2279        case -1724546052: // description
2280          this.description = castToString(value); // StringType
2281          return value;
2282        case -1008619738: // origin
2283          this.getOrigin().add(castToInteger(value)); // IntegerType
2284          return value;
2285        case -1429847026: // destination
2286          this.destination = castToInteger(value); // IntegerType
2287          return value;
2288        case 3321850: // link
2289          this.getLink().add(castToUri(value)); // UriType
2290          return value;
2291        case -1487597642: // capabilities
2292          this.capabilities = castToCanonical(value); // CanonicalType
2293          return value;
2294        default: return super.setProperty(hash, name, value);
2295        }
2296
2297      }
2298
2299      @Override
2300      public Base setProperty(String name, Base value) throws FHIRException {
2301        if (name.equals("required")) {
2302          this.required = castToBoolean(value); // BooleanType
2303        } else if (name.equals("validated")) {
2304          this.validated = castToBoolean(value); // BooleanType
2305        } else if (name.equals("description")) {
2306          this.description = castToString(value); // StringType
2307        } else if (name.equals("origin")) {
2308          this.getOrigin().add(castToInteger(value));
2309        } else if (name.equals("destination")) {
2310          this.destination = castToInteger(value); // IntegerType
2311        } else if (name.equals("link")) {
2312          this.getLink().add(castToUri(value));
2313        } else if (name.equals("capabilities")) {
2314          this.capabilities = castToCanonical(value); // CanonicalType
2315        } else
2316          return super.setProperty(name, value);
2317        return value;
2318      }
2319
2320      @Override
2321      public Base makeProperty(int hash, String name) throws FHIRException {
2322        switch (hash) {
2323        case -393139297:  return getRequiredElement();
2324        case -1109784050:  return getValidatedElement();
2325        case -1724546052:  return getDescriptionElement();
2326        case -1008619738:  return addOriginElement();
2327        case -1429847026:  return getDestinationElement();
2328        case 3321850:  return addLinkElement();
2329        case -1487597642:  return getCapabilitiesElement();
2330        default: return super.makeProperty(hash, name);
2331        }
2332
2333      }
2334
2335      @Override
2336      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2337        switch (hash) {
2338        case -393139297: /*required*/ return new String[] {"boolean"};
2339        case -1109784050: /*validated*/ return new String[] {"boolean"};
2340        case -1724546052: /*description*/ return new String[] {"string"};
2341        case -1008619738: /*origin*/ return new String[] {"integer"};
2342        case -1429847026: /*destination*/ return new String[] {"integer"};
2343        case 3321850: /*link*/ return new String[] {"uri"};
2344        case -1487597642: /*capabilities*/ return new String[] {"canonical"};
2345        default: return super.getTypesForProperty(hash, name);
2346        }
2347
2348      }
2349
2350      @Override
2351      public Base addChild(String name) throws FHIRException {
2352        if (name.equals("required")) {
2353          throw new FHIRException("Cannot call addChild on a primitive type TestScript.required");
2354        }
2355        else if (name.equals("validated")) {
2356          throw new FHIRException("Cannot call addChild on a primitive type TestScript.validated");
2357        }
2358        else if (name.equals("description")) {
2359          throw new FHIRException("Cannot call addChild on a primitive type TestScript.description");
2360        }
2361        else if (name.equals("origin")) {
2362          throw new FHIRException("Cannot call addChild on a primitive type TestScript.origin");
2363        }
2364        else if (name.equals("destination")) {
2365          throw new FHIRException("Cannot call addChild on a primitive type TestScript.destination");
2366        }
2367        else if (name.equals("link")) {
2368          throw new FHIRException("Cannot call addChild on a primitive type TestScript.link");
2369        }
2370        else if (name.equals("capabilities")) {
2371          throw new FHIRException("Cannot call addChild on a primitive type TestScript.capabilities");
2372        }
2373        else
2374          return super.addChild(name);
2375      }
2376
2377      public TestScriptMetadataCapabilityComponent copy() {
2378        TestScriptMetadataCapabilityComponent dst = new TestScriptMetadataCapabilityComponent();
2379        copyValues(dst);
2380        return dst;
2381      }
2382
2383      public void copyValues(TestScriptMetadataCapabilityComponent dst) {
2384        super.copyValues(dst);
2385        dst.required = required == null ? null : required.copy();
2386        dst.validated = validated == null ? null : validated.copy();
2387        dst.description = description == null ? null : description.copy();
2388        if (origin != null) {
2389          dst.origin = new ArrayList<IntegerType>();
2390          for (IntegerType i : origin)
2391            dst.origin.add(i.copy());
2392        };
2393        dst.destination = destination == null ? null : destination.copy();
2394        if (link != null) {
2395          dst.link = new ArrayList<UriType>();
2396          for (UriType i : link)
2397            dst.link.add(i.copy());
2398        };
2399        dst.capabilities = capabilities == null ? null : capabilities.copy();
2400      }
2401
2402      @Override
2403      public boolean equalsDeep(Base other_) {
2404        if (!super.equalsDeep(other_))
2405          return false;
2406        if (!(other_ instanceof TestScriptMetadataCapabilityComponent))
2407          return false;
2408        TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other_;
2409        return compareDeep(required, o.required, true) && compareDeep(validated, o.validated, true) && compareDeep(description, o.description, true)
2410           && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) && compareDeep(link, o.link, true)
2411           && compareDeep(capabilities, o.capabilities, true);
2412      }
2413
2414      @Override
2415      public boolean equalsShallow(Base other_) {
2416        if (!super.equalsShallow(other_))
2417          return false;
2418        if (!(other_ instanceof TestScriptMetadataCapabilityComponent))
2419          return false;
2420        TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other_;
2421        return compareValues(required, o.required, true) && compareValues(validated, o.validated, true) && compareValues(description, o.description, true)
2422           && compareValues(origin, o.origin, true) && compareValues(destination, o.destination, true) && compareValues(link, o.link, true)
2423          ;
2424      }
2425
2426      public boolean isEmpty() {
2427        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(required, validated, description
2428          , origin, destination, link, capabilities);
2429      }
2430
2431  public String fhirType() {
2432    return "TestScript.metadata.capability";
2433
2434  }
2435
2436  }
2437
2438    @Block()
2439    public static class TestScriptFixtureComponent extends BackboneElement implements IBaseBackboneElement {
2440        /**
2441         * 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.
2442         */
2443        @Child(name = "autocreate", type = {BooleanType.class}, order=1, min=1, max=1, modifier=false, summary=false)
2444        @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." )
2445        protected BooleanType autocreate;
2446
2447        /**
2448         * 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.
2449         */
2450        @Child(name = "autodelete", type = {BooleanType.class}, order=2, min=1, max=1, modifier=false, summary=false)
2451        @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." )
2452        protected BooleanType autodelete;
2453
2454        /**
2455         * Reference to the resource (containing the contents of the resource needed for operations).
2456         */
2457        @Child(name = "resource", type = {Reference.class}, order=3, min=0, max=1, modifier=false, summary=false)
2458        @Description(shortDefinition="Reference of the resource", formalDefinition="Reference to the resource (containing the contents of the resource needed for operations)." )
2459        protected Reference resource;
2460
2461        private static final long serialVersionUID = 672117234L;
2462
2463    /**
2464     * Constructor
2465     */
2466      public TestScriptFixtureComponent() {
2467        super();
2468      }
2469
2470    /**
2471     * Constructor
2472     */
2473      public TestScriptFixtureComponent(BooleanType autocreate, BooleanType autodelete) {
2474        super();
2475        this.autocreate = autocreate;
2476        this.autodelete = autodelete;
2477      }
2478
2479        /**
2480         * @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
2481         */
2482        public BooleanType getAutocreateElement() { 
2483          if (this.autocreate == null)
2484            if (Configuration.errorOnAutoCreate())
2485              throw new Error("Attempt to auto-create TestScriptFixtureComponent.autocreate");
2486            else if (Configuration.doAutoCreate())
2487              this.autocreate = new BooleanType(); // bb
2488          return this.autocreate;
2489        }
2490
2491        public boolean hasAutocreateElement() { 
2492          return this.autocreate != null && !this.autocreate.isEmpty();
2493        }
2494
2495        public boolean hasAutocreate() { 
2496          return this.autocreate != null && !this.autocreate.isEmpty();
2497        }
2498
2499        /**
2500         * @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
2501         */
2502        public TestScriptFixtureComponent setAutocreateElement(BooleanType value) { 
2503          this.autocreate = value;
2504          return this;
2505        }
2506
2507        /**
2508         * @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.
2509         */
2510        public boolean getAutocreate() { 
2511          return this.autocreate == null || this.autocreate.isEmpty() ? false : this.autocreate.getValue();
2512        }
2513
2514        /**
2515         * @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.
2516         */
2517        public TestScriptFixtureComponent setAutocreate(boolean value) { 
2518            if (this.autocreate == null)
2519              this.autocreate = new BooleanType();
2520            this.autocreate.setValue(value);
2521          return this;
2522        }
2523
2524        /**
2525         * @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
2526         */
2527        public BooleanType getAutodeleteElement() { 
2528          if (this.autodelete == null)
2529            if (Configuration.errorOnAutoCreate())
2530              throw new Error("Attempt to auto-create TestScriptFixtureComponent.autodelete");
2531            else if (Configuration.doAutoCreate())
2532              this.autodelete = new BooleanType(); // bb
2533          return this.autodelete;
2534        }
2535
2536        public boolean hasAutodeleteElement() { 
2537          return this.autodelete != null && !this.autodelete.isEmpty();
2538        }
2539
2540        public boolean hasAutodelete() { 
2541          return this.autodelete != null && !this.autodelete.isEmpty();
2542        }
2543
2544        /**
2545         * @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
2546         */
2547        public TestScriptFixtureComponent setAutodeleteElement(BooleanType value) { 
2548          this.autodelete = value;
2549          return this;
2550        }
2551
2552        /**
2553         * @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.
2554         */
2555        public boolean getAutodelete() { 
2556          return this.autodelete == null || this.autodelete.isEmpty() ? false : this.autodelete.getValue();
2557        }
2558
2559        /**
2560         * @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.
2561         */
2562        public TestScriptFixtureComponent setAutodelete(boolean value) { 
2563            if (this.autodelete == null)
2564              this.autodelete = new BooleanType();
2565            this.autodelete.setValue(value);
2566          return this;
2567        }
2568
2569        /**
2570         * @return {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).)
2571         */
2572        public Reference getResource() { 
2573          if (this.resource == null)
2574            if (Configuration.errorOnAutoCreate())
2575              throw new Error("Attempt to auto-create TestScriptFixtureComponent.resource");
2576            else if (Configuration.doAutoCreate())
2577              this.resource = new Reference(); // cc
2578          return this.resource;
2579        }
2580
2581        public boolean hasResource() { 
2582          return this.resource != null && !this.resource.isEmpty();
2583        }
2584
2585        /**
2586         * @param value {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).)
2587         */
2588        public TestScriptFixtureComponent setResource(Reference value) { 
2589          this.resource = 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    /**
7974     * Variable is set based either on element value in response body or on header field value in the response headers.
7975     */
7976    @Child(name = "variable", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
7977    @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." )
7978    protected List<TestScriptVariableComponent> variable;
7979
7980    /**
7981     * A series of required setup operations before tests are executed.
7982     */
7983    @Child(name = "setup", type = {}, order=9, min=0, max=1, modifier=false, summary=false)
7984    @Description(shortDefinition="A series of required setup operations before tests are executed", formalDefinition="A series of required setup operations before tests are executed." )
7985    protected TestScriptSetupComponent setup;
7986
7987    /**
7988     * A test in this script.
7989     */
7990    @Child(name = "test", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
7991    @Description(shortDefinition="A test in this script", formalDefinition="A test in this script." )
7992    protected List<TestScriptTestComponent> test;
7993
7994    /**
7995     * A series of operations required to clean up after all the tests are executed (successfully or otherwise).
7996     */
7997    @Child(name = "teardown", type = {}, order=11, min=0, max=1, modifier=false, summary=false)
7998    @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)." )
7999    protected TestScriptTeardownComponent teardown;
8000
8001    private static final long serialVersionUID = -19449153L;
8002
8003  /**
8004   * Constructor
8005   */
8006    public TestScript() {
8007      super();
8008    }
8009
8010  /**
8011   * Constructor
8012   */
8013    public TestScript(UriType url, StringType name, Enumeration<PublicationStatus> status) {
8014      super();
8015      this.url = url;
8016      this.name = name;
8017      this.status = status;
8018    }
8019
8020    /**
8021     * @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
8022     */
8023    public UriType getUrlElement() { 
8024      if (this.url == null)
8025        if (Configuration.errorOnAutoCreate())
8026          throw new Error("Attempt to auto-create TestScript.url");
8027        else if (Configuration.doAutoCreate())
8028          this.url = new UriType(); // bb
8029      return this.url;
8030    }
8031
8032    public boolean hasUrlElement() { 
8033      return this.url != null && !this.url.isEmpty();
8034    }
8035
8036    public boolean hasUrl() { 
8037      return this.url != null && !this.url.isEmpty();
8038    }
8039
8040    /**
8041     * @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
8042     */
8043    public TestScript setUrlElement(UriType value) { 
8044      this.url = value;
8045      return this;
8046    }
8047
8048    /**
8049     * @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.
8050     */
8051    public String getUrl() { 
8052      return this.url == null ? null : this.url.getValue();
8053    }
8054
8055    /**
8056     * @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.
8057     */
8058    public TestScript setUrl(String value) { 
8059        if (this.url == null)
8060          this.url = new UriType();
8061        this.url.setValue(value);
8062      return this;
8063    }
8064
8065    /**
8066     * @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.)
8067     */
8068    public Identifier getIdentifier() { 
8069      if (this.identifier == null)
8070        if (Configuration.errorOnAutoCreate())
8071          throw new Error("Attempt to auto-create TestScript.identifier");
8072        else if (Configuration.doAutoCreate())
8073          this.identifier = new Identifier(); // cc
8074      return this.identifier;
8075    }
8076
8077    public boolean hasIdentifier() { 
8078      return this.identifier != null && !this.identifier.isEmpty();
8079    }
8080
8081    /**
8082     * @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.)
8083     */
8084    public TestScript setIdentifier(Identifier value) { 
8085      this.identifier = value;
8086      return this;
8087    }
8088
8089    /**
8090     * @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
8091     */
8092    public StringType getVersionElement() { 
8093      if (this.version == null)
8094        if (Configuration.errorOnAutoCreate())
8095          throw new Error("Attempt to auto-create TestScript.version");
8096        else if (Configuration.doAutoCreate())
8097          this.version = new StringType(); // bb
8098      return this.version;
8099    }
8100
8101    public boolean hasVersionElement() { 
8102      return this.version != null && !this.version.isEmpty();
8103    }
8104
8105    public boolean hasVersion() { 
8106      return this.version != null && !this.version.isEmpty();
8107    }
8108
8109    /**
8110     * @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
8111     */
8112    public TestScript setVersionElement(StringType value) { 
8113      this.version = value;
8114      return this;
8115    }
8116
8117    /**
8118     * @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.
8119     */
8120    public String getVersion() { 
8121      return this.version == null ? null : this.version.getValue();
8122    }
8123
8124    /**
8125     * @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.
8126     */
8127    public TestScript setVersion(String value) { 
8128      if (Utilities.noString(value))
8129        this.version = null;
8130      else {
8131        if (this.version == null)
8132          this.version = new StringType();
8133        this.version.setValue(value);
8134      }
8135      return this;
8136    }
8137
8138    /**
8139     * @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
8140     */
8141    public StringType getNameElement() { 
8142      if (this.name == null)
8143        if (Configuration.errorOnAutoCreate())
8144          throw new Error("Attempt to auto-create TestScript.name");
8145        else if (Configuration.doAutoCreate())
8146          this.name = new StringType(); // bb
8147      return this.name;
8148    }
8149
8150    public boolean hasNameElement() { 
8151      return this.name != null && !this.name.isEmpty();
8152    }
8153
8154    public boolean hasName() { 
8155      return this.name != null && !this.name.isEmpty();
8156    }
8157
8158    /**
8159     * @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
8160     */
8161    public TestScript setNameElement(StringType value) { 
8162      this.name = value;
8163      return this;
8164    }
8165
8166    /**
8167     * @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.
8168     */
8169    public String getName() { 
8170      return this.name == null ? null : this.name.getValue();
8171    }
8172
8173    /**
8174     * @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.
8175     */
8176    public TestScript setName(String value) { 
8177        if (this.name == null)
8178          this.name = new StringType();
8179        this.name.setValue(value);
8180      return this;
8181    }
8182
8183    /**
8184     * @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
8185     */
8186    public StringType getTitleElement() { 
8187      if (this.title == null)
8188        if (Configuration.errorOnAutoCreate())
8189          throw new Error("Attempt to auto-create TestScript.title");
8190        else if (Configuration.doAutoCreate())
8191          this.title = new StringType(); // bb
8192      return this.title;
8193    }
8194
8195    public boolean hasTitleElement() { 
8196      return this.title != null && !this.title.isEmpty();
8197    }
8198
8199    public boolean hasTitle() { 
8200      return this.title != null && !this.title.isEmpty();
8201    }
8202
8203    /**
8204     * @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
8205     */
8206    public TestScript setTitleElement(StringType value) { 
8207      this.title = value;
8208      return this;
8209    }
8210
8211    /**
8212     * @return A short, descriptive, user-friendly title for the test script.
8213     */
8214    public String getTitle() { 
8215      return this.title == null ? null : this.title.getValue();
8216    }
8217
8218    /**
8219     * @param value A short, descriptive, user-friendly title for the test script.
8220     */
8221    public TestScript setTitle(String value) { 
8222      if (Utilities.noString(value))
8223        this.title = null;
8224      else {
8225        if (this.title == null)
8226          this.title = new StringType();
8227        this.title.setValue(value);
8228      }
8229      return this;
8230    }
8231
8232    /**
8233     * @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
8234     */
8235    public Enumeration<PublicationStatus> getStatusElement() { 
8236      if (this.status == null)
8237        if (Configuration.errorOnAutoCreate())
8238          throw new Error("Attempt to auto-create TestScript.status");
8239        else if (Configuration.doAutoCreate())
8240          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
8241      return this.status;
8242    }
8243
8244    public boolean hasStatusElement() { 
8245      return this.status != null && !this.status.isEmpty();
8246    }
8247
8248    public boolean hasStatus() { 
8249      return this.status != null && !this.status.isEmpty();
8250    }
8251
8252    /**
8253     * @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
8254     */
8255    public TestScript setStatusElement(Enumeration<PublicationStatus> value) { 
8256      this.status = value;
8257      return this;
8258    }
8259
8260    /**
8261     * @return The status of this test script. Enables tracking the life-cycle of the content.
8262     */
8263    public PublicationStatus getStatus() { 
8264      return this.status == null ? null : this.status.getValue();
8265    }
8266
8267    /**
8268     * @param value The status of this test script. Enables tracking the life-cycle of the content.
8269     */
8270    public TestScript setStatus(PublicationStatus value) { 
8271        if (this.status == null)
8272          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
8273        this.status.setValue(value);
8274      return this;
8275    }
8276
8277    /**
8278     * @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
8279     */
8280    public BooleanType getExperimentalElement() { 
8281      if (this.experimental == null)
8282        if (Configuration.errorOnAutoCreate())
8283          throw new Error("Attempt to auto-create TestScript.experimental");
8284        else if (Configuration.doAutoCreate())
8285          this.experimental = new BooleanType(); // bb
8286      return this.experimental;
8287    }
8288
8289    public boolean hasExperimentalElement() { 
8290      return this.experimental != null && !this.experimental.isEmpty();
8291    }
8292
8293    public boolean hasExperimental() { 
8294      return this.experimental != null && !this.experimental.isEmpty();
8295    }
8296
8297    /**
8298     * @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
8299     */
8300    public TestScript setExperimentalElement(BooleanType value) { 
8301      this.experimental = value;
8302      return this;
8303    }
8304
8305    /**
8306     * @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.
8307     */
8308    public boolean getExperimental() { 
8309      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
8310    }
8311
8312    /**
8313     * @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.
8314     */
8315    public TestScript setExperimental(boolean value) { 
8316        if (this.experimental == null)
8317          this.experimental = new BooleanType();
8318        this.experimental.setValue(value);
8319      return this;
8320    }
8321
8322    /**
8323     * @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
8324     */
8325    public DateTimeType getDateElement() { 
8326      if (this.date == null)
8327        if (Configuration.errorOnAutoCreate())
8328          throw new Error("Attempt to auto-create TestScript.date");
8329        else if (Configuration.doAutoCreate())
8330          this.date = new DateTimeType(); // bb
8331      return this.date;
8332    }
8333
8334    public boolean hasDateElement() { 
8335      return this.date != null && !this.date.isEmpty();
8336    }
8337
8338    public boolean hasDate() { 
8339      return this.date != null && !this.date.isEmpty();
8340    }
8341
8342    /**
8343     * @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
8344     */
8345    public TestScript setDateElement(DateTimeType value) { 
8346      this.date = value;
8347      return this;
8348    }
8349
8350    /**
8351     * @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.
8352     */
8353    public Date getDate() { 
8354      return this.date == null ? null : this.date.getValue();
8355    }
8356
8357    /**
8358     * @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.
8359     */
8360    public TestScript setDate(Date value) { 
8361      if (value == null)
8362        this.date = null;
8363      else {
8364        if (this.date == null)
8365          this.date = new DateTimeType();
8366        this.date.setValue(value);
8367      }
8368      return this;
8369    }
8370
8371    /**
8372     * @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
8373     */
8374    public StringType getPublisherElement() { 
8375      if (this.publisher == null)
8376        if (Configuration.errorOnAutoCreate())
8377          throw new Error("Attempt to auto-create TestScript.publisher");
8378        else if (Configuration.doAutoCreate())
8379          this.publisher = new StringType(); // bb
8380      return this.publisher;
8381    }
8382
8383    public boolean hasPublisherElement() { 
8384      return this.publisher != null && !this.publisher.isEmpty();
8385    }
8386
8387    public boolean hasPublisher() { 
8388      return this.publisher != null && !this.publisher.isEmpty();
8389    }
8390
8391    /**
8392     * @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
8393     */
8394    public TestScript setPublisherElement(StringType value) { 
8395      this.publisher = value;
8396      return this;
8397    }
8398
8399    /**
8400     * @return The name of the organization or individual that published the test script.
8401     */
8402    public String getPublisher() { 
8403      return this.publisher == null ? null : this.publisher.getValue();
8404    }
8405
8406    /**
8407     * @param value The name of the organization or individual that published the test script.
8408     */
8409    public TestScript setPublisher(String value) { 
8410      if (Utilities.noString(value))
8411        this.publisher = null;
8412      else {
8413        if (this.publisher == null)
8414          this.publisher = new StringType();
8415        this.publisher.setValue(value);
8416      }
8417      return this;
8418    }
8419
8420    /**
8421     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
8422     */
8423    public List<ContactDetail> getContact() { 
8424      if (this.contact == null)
8425        this.contact = new ArrayList<ContactDetail>();
8426      return this.contact;
8427    }
8428
8429    /**
8430     * @return Returns a reference to <code>this</code> for easy method chaining
8431     */
8432    public TestScript setContact(List<ContactDetail> theContact) { 
8433      this.contact = theContact;
8434      return this;
8435    }
8436
8437    public boolean hasContact() { 
8438      if (this.contact == null)
8439        return false;
8440      for (ContactDetail item : this.contact)
8441        if (!item.isEmpty())
8442          return true;
8443      return false;
8444    }
8445
8446    public ContactDetail addContact() { //3
8447      ContactDetail t = new ContactDetail();
8448      if (this.contact == null)
8449        this.contact = new ArrayList<ContactDetail>();
8450      this.contact.add(t);
8451      return t;
8452    }
8453
8454    public TestScript addContact(ContactDetail t) { //3
8455      if (t == null)
8456        return this;
8457      if (this.contact == null)
8458        this.contact = new ArrayList<ContactDetail>();
8459      this.contact.add(t);
8460      return this;
8461    }
8462
8463    /**
8464     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
8465     */
8466    public ContactDetail getContactFirstRep() { 
8467      if (getContact().isEmpty()) {
8468        addContact();
8469      }
8470      return getContact().get(0);
8471    }
8472
8473    /**
8474     * @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
8475     */
8476    public MarkdownType getDescriptionElement() { 
8477      if (this.description == null)
8478        if (Configuration.errorOnAutoCreate())
8479          throw new Error("Attempt to auto-create TestScript.description");
8480        else if (Configuration.doAutoCreate())
8481          this.description = new MarkdownType(); // bb
8482      return this.description;
8483    }
8484
8485    public boolean hasDescriptionElement() { 
8486      return this.description != null && !this.description.isEmpty();
8487    }
8488
8489    public boolean hasDescription() { 
8490      return this.description != null && !this.description.isEmpty();
8491    }
8492
8493    /**
8494     * @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
8495     */
8496    public TestScript setDescriptionElement(MarkdownType value) { 
8497      this.description = value;
8498      return this;
8499    }
8500
8501    /**
8502     * @return A free text natural language description of the test script from a consumer's perspective.
8503     */
8504    public String getDescription() { 
8505      return this.description == null ? null : this.description.getValue();
8506    }
8507
8508    /**
8509     * @param value A free text natural language description of the test script from a consumer's perspective.
8510     */
8511    public TestScript setDescription(String value) { 
8512      if (value == null)
8513        this.description = null;
8514      else {
8515        if (this.description == null)
8516          this.description = new MarkdownType();
8517        this.description.setValue(value);
8518      }
8519      return this;
8520    }
8521
8522    /**
8523     * @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.)
8524     */
8525    public List<UsageContext> getUseContext() { 
8526      if (this.useContext == null)
8527        this.useContext = new ArrayList<UsageContext>();
8528      return this.useContext;
8529    }
8530
8531    /**
8532     * @return Returns a reference to <code>this</code> for easy method chaining
8533     */
8534    public TestScript setUseContext(List<UsageContext> theUseContext) { 
8535      this.useContext = theUseContext;
8536      return this;
8537    }
8538
8539    public boolean hasUseContext() { 
8540      if (this.useContext == null)
8541        return false;
8542      for (UsageContext item : this.useContext)
8543        if (!item.isEmpty())
8544          return true;
8545      return false;
8546    }
8547
8548    public UsageContext addUseContext() { //3
8549      UsageContext t = new UsageContext();
8550      if (this.useContext == null)
8551        this.useContext = new ArrayList<UsageContext>();
8552      this.useContext.add(t);
8553      return t;
8554    }
8555
8556    public TestScript addUseContext(UsageContext t) { //3
8557      if (t == null)
8558        return this;
8559      if (this.useContext == null)
8560        this.useContext = new ArrayList<UsageContext>();
8561      this.useContext.add(t);
8562      return this;
8563    }
8564
8565    /**
8566     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist
8567     */
8568    public UsageContext getUseContextFirstRep() { 
8569      if (getUseContext().isEmpty()) {
8570        addUseContext();
8571      }
8572      return getUseContext().get(0);
8573    }
8574
8575    /**
8576     * @return {@link #jurisdiction} (A legal or geographic region in which the test script is intended to be used.)
8577     */
8578    public List<CodeableConcept> getJurisdiction() { 
8579      if (this.jurisdiction == null)
8580        this.jurisdiction = new ArrayList<CodeableConcept>();
8581      return this.jurisdiction;
8582    }
8583
8584    /**
8585     * @return Returns a reference to <code>this</code> for easy method chaining
8586     */
8587    public TestScript setJurisdiction(List<CodeableConcept> theJurisdiction) { 
8588      this.jurisdiction = theJurisdiction;
8589      return this;
8590    }
8591
8592    public boolean hasJurisdiction() { 
8593      if (this.jurisdiction == null)
8594        return false;
8595      for (CodeableConcept item : this.jurisdiction)
8596        if (!item.isEmpty())
8597          return true;
8598      return false;
8599    }
8600
8601    public CodeableConcept addJurisdiction() { //3
8602      CodeableConcept t = new CodeableConcept();
8603      if (this.jurisdiction == null)
8604        this.jurisdiction = new ArrayList<CodeableConcept>();
8605      this.jurisdiction.add(t);
8606      return t;
8607    }
8608
8609    public TestScript addJurisdiction(CodeableConcept t) { //3
8610      if (t == null)
8611        return this;
8612      if (this.jurisdiction == null)
8613        this.jurisdiction = new ArrayList<CodeableConcept>();
8614      this.jurisdiction.add(t);
8615      return this;
8616    }
8617
8618    /**
8619     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist
8620     */
8621    public CodeableConcept getJurisdictionFirstRep() { 
8622      if (getJurisdiction().isEmpty()) {
8623        addJurisdiction();
8624      }
8625      return getJurisdiction().get(0);
8626    }
8627
8628    /**
8629     * @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
8630     */
8631    public MarkdownType getPurposeElement() { 
8632      if (this.purpose == null)
8633        if (Configuration.errorOnAutoCreate())
8634          throw new Error("Attempt to auto-create TestScript.purpose");
8635        else if (Configuration.doAutoCreate())
8636          this.purpose = new MarkdownType(); // bb
8637      return this.purpose;
8638    }
8639
8640    public boolean hasPurposeElement() { 
8641      return this.purpose != null && !this.purpose.isEmpty();
8642    }
8643
8644    public boolean hasPurpose() { 
8645      return this.purpose != null && !this.purpose.isEmpty();
8646    }
8647
8648    /**
8649     * @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
8650     */
8651    public TestScript setPurposeElement(MarkdownType value) { 
8652      this.purpose = value;
8653      return this;
8654    }
8655
8656    /**
8657     * @return Explanation of why this test script is needed and why it has been designed as it has.
8658     */
8659    public String getPurpose() { 
8660      return this.purpose == null ? null : this.purpose.getValue();
8661    }
8662
8663    /**
8664     * @param value Explanation of why this test script is needed and why it has been designed as it has.
8665     */
8666    public TestScript setPurpose(String value) { 
8667      if (value == null)
8668        this.purpose = null;
8669      else {
8670        if (this.purpose == null)
8671          this.purpose = new MarkdownType();
8672        this.purpose.setValue(value);
8673      }
8674      return this;
8675    }
8676
8677    /**
8678     * @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
8679     */
8680    public MarkdownType getCopyrightElement() { 
8681      if (this.copyright == null)
8682        if (Configuration.errorOnAutoCreate())
8683          throw new Error("Attempt to auto-create TestScript.copyright");
8684        else if (Configuration.doAutoCreate())
8685          this.copyright = new MarkdownType(); // bb
8686      return this.copyright;
8687    }
8688
8689    public boolean hasCopyrightElement() { 
8690      return this.copyright != null && !this.copyright.isEmpty();
8691    }
8692
8693    public boolean hasCopyright() { 
8694      return this.copyright != null && !this.copyright.isEmpty();
8695    }
8696
8697    /**
8698     * @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
8699     */
8700    public TestScript setCopyrightElement(MarkdownType value) { 
8701      this.copyright = value;
8702      return this;
8703    }
8704
8705    /**
8706     * @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.
8707     */
8708    public String getCopyright() { 
8709      return this.copyright == null ? null : this.copyright.getValue();
8710    }
8711
8712    /**
8713     * @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.
8714     */
8715    public TestScript setCopyright(String value) { 
8716      if (value == null)
8717        this.copyright = null;
8718      else {
8719        if (this.copyright == null)
8720          this.copyright = new MarkdownType();
8721        this.copyright.setValue(value);
8722      }
8723      return this;
8724    }
8725
8726    /**
8727     * @return {@link #origin} (An abstract server used in operations within this test script in the origin element.)
8728     */
8729    public List<TestScriptOriginComponent> getOrigin() { 
8730      if (this.origin == null)
8731        this.origin = new ArrayList<TestScriptOriginComponent>();
8732      return this.origin;
8733    }
8734
8735    /**
8736     * @return Returns a reference to <code>this</code> for easy method chaining
8737     */
8738    public TestScript setOrigin(List<TestScriptOriginComponent> theOrigin) { 
8739      this.origin = theOrigin;
8740      return this;
8741    }
8742
8743    public boolean hasOrigin() { 
8744      if (this.origin == null)
8745        return false;
8746      for (TestScriptOriginComponent item : this.origin)
8747        if (!item.isEmpty())
8748          return true;
8749      return false;
8750    }
8751
8752    public TestScriptOriginComponent addOrigin() { //3
8753      TestScriptOriginComponent t = new TestScriptOriginComponent();
8754      if (this.origin == null)
8755        this.origin = new ArrayList<TestScriptOriginComponent>();
8756      this.origin.add(t);
8757      return t;
8758    }
8759
8760    public TestScript addOrigin(TestScriptOriginComponent t) { //3
8761      if (t == null)
8762        return this;
8763      if (this.origin == null)
8764        this.origin = new ArrayList<TestScriptOriginComponent>();
8765      this.origin.add(t);
8766      return this;
8767    }
8768
8769    /**
8770     * @return The first repetition of repeating field {@link #origin}, creating it if it does not already exist
8771     */
8772    public TestScriptOriginComponent getOriginFirstRep() { 
8773      if (getOrigin().isEmpty()) {
8774        addOrigin();
8775      }
8776      return getOrigin().get(0);
8777    }
8778
8779    /**
8780     * @return {@link #destination} (An abstract server used in operations within this test script in the destination element.)
8781     */
8782    public List<TestScriptDestinationComponent> getDestination() { 
8783      if (this.destination == null)
8784        this.destination = new ArrayList<TestScriptDestinationComponent>();
8785      return this.destination;
8786    }
8787
8788    /**
8789     * @return Returns a reference to <code>this</code> for easy method chaining
8790     */
8791    public TestScript setDestination(List<TestScriptDestinationComponent> theDestination) { 
8792      this.destination = theDestination;
8793      return this;
8794    }
8795
8796    public boolean hasDestination() { 
8797      if (this.destination == null)
8798        return false;
8799      for (TestScriptDestinationComponent item : this.destination)
8800        if (!item.isEmpty())
8801          return true;
8802      return false;
8803    }
8804
8805    public TestScriptDestinationComponent addDestination() { //3
8806      TestScriptDestinationComponent t = new TestScriptDestinationComponent();
8807      if (this.destination == null)
8808        this.destination = new ArrayList<TestScriptDestinationComponent>();
8809      this.destination.add(t);
8810      return t;
8811    }
8812
8813    public TestScript addDestination(TestScriptDestinationComponent t) { //3
8814      if (t == null)
8815        return this;
8816      if (this.destination == null)
8817        this.destination = new ArrayList<TestScriptDestinationComponent>();
8818      this.destination.add(t);
8819      return this;
8820    }
8821
8822    /**
8823     * @return The first repetition of repeating field {@link #destination}, creating it if it does not already exist
8824     */
8825    public TestScriptDestinationComponent getDestinationFirstRep() { 
8826      if (getDestination().isEmpty()) {
8827        addDestination();
8828      }
8829      return getDestination().get(0);
8830    }
8831
8832    /**
8833     * @return {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.)
8834     */
8835    public TestScriptMetadataComponent getMetadata() { 
8836      if (this.metadata == null)
8837        if (Configuration.errorOnAutoCreate())
8838          throw new Error("Attempt to auto-create TestScript.metadata");
8839        else if (Configuration.doAutoCreate())
8840          this.metadata = new TestScriptMetadataComponent(); // cc
8841      return this.metadata;
8842    }
8843
8844    public boolean hasMetadata() { 
8845      return this.metadata != null && !this.metadata.isEmpty();
8846    }
8847
8848    /**
8849     * @param value {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.)
8850     */
8851    public TestScript setMetadata(TestScriptMetadataComponent value) { 
8852      this.metadata = value;
8853      return this;
8854    }
8855
8856    /**
8857     * @return {@link #fixture} (Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.)
8858     */
8859    public List<TestScriptFixtureComponent> getFixture() { 
8860      if (this.fixture == null)
8861        this.fixture = new ArrayList<TestScriptFixtureComponent>();
8862      return this.fixture;
8863    }
8864
8865    /**
8866     * @return Returns a reference to <code>this</code> for easy method chaining
8867     */
8868    public TestScript setFixture(List<TestScriptFixtureComponent> theFixture) { 
8869      this.fixture = theFixture;
8870      return this;
8871    }
8872
8873    public boolean hasFixture() { 
8874      if (this.fixture == null)
8875        return false;
8876      for (TestScriptFixtureComponent item : this.fixture)
8877        if (!item.isEmpty())
8878          return true;
8879      return false;
8880    }
8881
8882    public TestScriptFixtureComponent addFixture() { //3
8883      TestScriptFixtureComponent t = new TestScriptFixtureComponent();
8884      if (this.fixture == null)
8885        this.fixture = new ArrayList<TestScriptFixtureComponent>();
8886      this.fixture.add(t);
8887      return t;
8888    }
8889
8890    public TestScript addFixture(TestScriptFixtureComponent t) { //3
8891      if (t == null)
8892        return this;
8893      if (this.fixture == null)
8894        this.fixture = new ArrayList<TestScriptFixtureComponent>();
8895      this.fixture.add(t);
8896      return this;
8897    }
8898
8899    /**
8900     * @return The first repetition of repeating field {@link #fixture}, creating it if it does not already exist
8901     */
8902    public TestScriptFixtureComponent getFixtureFirstRep() { 
8903      if (getFixture().isEmpty()) {
8904        addFixture();
8905      }
8906      return getFixture().get(0);
8907    }
8908
8909    /**
8910     * @return {@link #profile} (Reference to the profile to be used for validation.)
8911     */
8912    public List<Reference> getProfile() { 
8913      if (this.profile == null)
8914        this.profile = new ArrayList<Reference>();
8915      return this.profile;
8916    }
8917
8918    /**
8919     * @return Returns a reference to <code>this</code> for easy method chaining
8920     */
8921    public TestScript setProfile(List<Reference> theProfile) { 
8922      this.profile = theProfile;
8923      return this;
8924    }
8925
8926    public boolean hasProfile() { 
8927      if (this.profile == null)
8928        return false;
8929      for (Reference item : this.profile)
8930        if (!item.isEmpty())
8931          return true;
8932      return false;
8933    }
8934
8935    public Reference addProfile() { //3
8936      Reference t = new Reference();
8937      if (this.profile == null)
8938        this.profile = new ArrayList<Reference>();
8939      this.profile.add(t);
8940      return t;
8941    }
8942
8943    public TestScript addProfile(Reference t) { //3
8944      if (t == null)
8945        return this;
8946      if (this.profile == null)
8947        this.profile = new ArrayList<Reference>();
8948      this.profile.add(t);
8949      return this;
8950    }
8951
8952    /**
8953     * @return The first repetition of repeating field {@link #profile}, creating it if it does not already exist
8954     */
8955    public Reference getProfileFirstRep() { 
8956      if (getProfile().isEmpty()) {
8957        addProfile();
8958      }
8959      return getProfile().get(0);
8960    }
8961
8962    /**
8963     * @return {@link #variable} (Variable is set based either on element value in response body or on header field value in the response headers.)
8964     */
8965    public List<TestScriptVariableComponent> getVariable() { 
8966      if (this.variable == null)
8967        this.variable = new ArrayList<TestScriptVariableComponent>();
8968      return this.variable;
8969    }
8970
8971    /**
8972     * @return Returns a reference to <code>this</code> for easy method chaining
8973     */
8974    public TestScript setVariable(List<TestScriptVariableComponent> theVariable) { 
8975      this.variable = theVariable;
8976      return this;
8977    }
8978
8979    public boolean hasVariable() { 
8980      if (this.variable == null)
8981        return false;
8982      for (TestScriptVariableComponent item : this.variable)
8983        if (!item.isEmpty())
8984          return true;
8985      return false;
8986    }
8987
8988    public TestScriptVariableComponent addVariable() { //3
8989      TestScriptVariableComponent t = new TestScriptVariableComponent();
8990      if (this.variable == null)
8991        this.variable = new ArrayList<TestScriptVariableComponent>();
8992      this.variable.add(t);
8993      return t;
8994    }
8995
8996    public TestScript addVariable(TestScriptVariableComponent t) { //3
8997      if (t == null)
8998        return this;
8999      if (this.variable == null)
9000        this.variable = new ArrayList<TestScriptVariableComponent>();
9001      this.variable.add(t);
9002      return this;
9003    }
9004
9005    /**
9006     * @return The first repetition of repeating field {@link #variable}, creating it if it does not already exist
9007     */
9008    public TestScriptVariableComponent getVariableFirstRep() { 
9009      if (getVariable().isEmpty()) {
9010        addVariable();
9011      }
9012      return getVariable().get(0);
9013    }
9014
9015    /**
9016     * @return {@link #setup} (A series of required setup operations before tests are executed.)
9017     */
9018    public TestScriptSetupComponent getSetup() { 
9019      if (this.setup == null)
9020        if (Configuration.errorOnAutoCreate())
9021          throw new Error("Attempt to auto-create TestScript.setup");
9022        else if (Configuration.doAutoCreate())
9023          this.setup = new TestScriptSetupComponent(); // cc
9024      return this.setup;
9025    }
9026
9027    public boolean hasSetup() { 
9028      return this.setup != null && !this.setup.isEmpty();
9029    }
9030
9031    /**
9032     * @param value {@link #setup} (A series of required setup operations before tests are executed.)
9033     */
9034    public TestScript setSetup(TestScriptSetupComponent value) { 
9035      this.setup = value;
9036      return this;
9037    }
9038
9039    /**
9040     * @return {@link #test} (A test in this script.)
9041     */
9042    public List<TestScriptTestComponent> getTest() { 
9043      if (this.test == null)
9044        this.test = new ArrayList<TestScriptTestComponent>();
9045      return this.test;
9046    }
9047
9048    /**
9049     * @return Returns a reference to <code>this</code> for easy method chaining
9050     */
9051    public TestScript setTest(List<TestScriptTestComponent> theTest) { 
9052      this.test = theTest;
9053      return this;
9054    }
9055
9056    public boolean hasTest() { 
9057      if (this.test == null)
9058        return false;
9059      for (TestScriptTestComponent item : this.test)
9060        if (!item.isEmpty())
9061          return true;
9062      return false;
9063    }
9064
9065    public TestScriptTestComponent addTest() { //3
9066      TestScriptTestComponent t = new TestScriptTestComponent();
9067      if (this.test == null)
9068        this.test = new ArrayList<TestScriptTestComponent>();
9069      this.test.add(t);
9070      return t;
9071    }
9072
9073    public TestScript addTest(TestScriptTestComponent t) { //3
9074      if (t == null)
9075        return this;
9076      if (this.test == null)
9077        this.test = new ArrayList<TestScriptTestComponent>();
9078      this.test.add(t);
9079      return this;
9080    }
9081
9082    /**
9083     * @return The first repetition of repeating field {@link #test}, creating it if it does not already exist
9084     */
9085    public TestScriptTestComponent getTestFirstRep() { 
9086      if (getTest().isEmpty()) {
9087        addTest();
9088      }
9089      return getTest().get(0);
9090    }
9091
9092    /**
9093     * @return {@link #teardown} (A series of operations required to clean up after all the tests are executed (successfully or otherwise).)
9094     */
9095    public TestScriptTeardownComponent getTeardown() { 
9096      if (this.teardown == null)
9097        if (Configuration.errorOnAutoCreate())
9098          throw new Error("Attempt to auto-create TestScript.teardown");
9099        else if (Configuration.doAutoCreate())
9100          this.teardown = new TestScriptTeardownComponent(); // cc
9101      return this.teardown;
9102    }
9103
9104    public boolean hasTeardown() { 
9105      return this.teardown != null && !this.teardown.isEmpty();
9106    }
9107
9108    /**
9109     * @param value {@link #teardown} (A series of operations required to clean up after all the tests are executed (successfully or otherwise).)
9110     */
9111    public TestScript setTeardown(TestScriptTeardownComponent value) { 
9112      this.teardown = value;
9113      return this;
9114    }
9115
9116      protected void listChildren(List<Property> children) {
9117        super.listChildren(children);
9118        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));
9119        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));
9120        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));
9121        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));
9122        children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the test script.", 0, 1, title));
9123        children.add(new Property("status", "code", "The status of this test script. Enables tracking the life-cycle of the content.", 0, 1, status));
9124        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));
9125        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));
9126        children.add(new Property("publisher", "string", "The name of the organization or individual that published the test script.", 0, 1, publisher));
9127        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));
9128        children.add(new Property("description", "markdown", "A free text natural language description of the test script from a consumer's perspective.", 0, 1, description));
9129        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));
9130        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));
9131        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));
9132        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));
9133        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));
9134        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));
9135        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));
9136        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));
9137        children.add(new Property("profile", "Reference(Any)", "Reference to the profile to be used for validation.", 0, java.lang.Integer.MAX_VALUE, profile));
9138        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));
9139        children.add(new Property("setup", "", "A series of required setup operations before tests are executed.", 0, 1, setup));
9140        children.add(new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test));
9141        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));
9142      }
9143
9144      @Override
9145      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
9146        switch (_hash) {
9147        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);
9148        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);
9149        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);
9150        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);
9151        case 110371416: /*title*/  return new Property("title", "string", "A short, descriptive, user-friendly title for the test script.", 0, 1, title);
9152        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);
9153        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);
9154        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);
9155        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the organization or individual that published the test script.", 0, 1, publisher);
9156        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);
9157        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);
9158        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);
9159        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);
9160        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);
9161        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);
9162        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);
9163        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);
9164        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);
9165        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);
9166        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);
9167        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);
9168        case 109329021: /*setup*/  return new Property("setup", "", "A series of required setup operations before tests are executed.", 0, 1, setup);
9169        case 3556498: /*test*/  return new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test);
9170        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);
9171        default: return super.getNamedProperty(_hash, _name, _checkValid);
9172        }
9173
9174      }
9175
9176      @Override
9177      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
9178        switch (hash) {
9179        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
9180        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier
9181        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
9182        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
9183        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
9184        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
9185        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
9186        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
9187        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
9188        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
9189        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
9190        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
9191        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
9192        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
9193        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType
9194        case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // TestScriptOriginComponent
9195        case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : this.destination.toArray(new Base[this.destination.size()]); // TestScriptDestinationComponent
9196        case -450004177: /*metadata*/ return this.metadata == null ? new Base[0] : new Base[] {this.metadata}; // TestScriptMetadataComponent
9197        case -843449847: /*fixture*/ return this.fixture == null ? new Base[0] : this.fixture.toArray(new Base[this.fixture.size()]); // TestScriptFixtureComponent
9198        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : this.profile.toArray(new Base[this.profile.size()]); // Reference
9199        case -1249586564: /*variable*/ return this.variable == null ? new Base[0] : this.variable.toArray(new Base[this.variable.size()]); // TestScriptVariableComponent
9200        case 109329021: /*setup*/ return this.setup == null ? new Base[0] : new Base[] {this.setup}; // TestScriptSetupComponent
9201        case 3556498: /*test*/ return this.test == null ? new Base[0] : this.test.toArray(new Base[this.test.size()]); // TestScriptTestComponent
9202        case -1663474172: /*teardown*/ return this.teardown == null ? new Base[0] : new Base[] {this.teardown}; // TestScriptTeardownComponent
9203        default: return super.getProperty(hash, name, checkValid);
9204        }
9205
9206      }
9207
9208      @Override
9209      public Base setProperty(int hash, String name, Base value) throws FHIRException {
9210        switch (hash) {
9211        case 116079: // url
9212          this.url = castToUri(value); // UriType
9213          return value;
9214        case -1618432855: // identifier
9215          this.identifier = castToIdentifier(value); // Identifier
9216          return value;
9217        case 351608024: // version
9218          this.version = castToString(value); // StringType
9219          return value;
9220        case 3373707: // name
9221          this.name = castToString(value); // StringType
9222          return value;
9223        case 110371416: // title
9224          this.title = castToString(value); // StringType
9225          return value;
9226        case -892481550: // status
9227          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
9228          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
9229          return value;
9230        case -404562712: // experimental
9231          this.experimental = castToBoolean(value); // BooleanType
9232          return value;
9233        case 3076014: // date
9234          this.date = castToDateTime(value); // DateTimeType
9235          return value;
9236        case 1447404028: // publisher
9237          this.publisher = castToString(value); // StringType
9238          return value;
9239        case 951526432: // contact
9240          this.getContact().add(castToContactDetail(value)); // ContactDetail
9241          return value;
9242        case -1724546052: // description
9243          this.description = castToMarkdown(value); // MarkdownType
9244          return value;
9245        case -669707736: // useContext
9246          this.getUseContext().add(castToUsageContext(value)); // UsageContext
9247          return value;
9248        case -507075711: // jurisdiction
9249          this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept
9250          return value;
9251        case -220463842: // purpose
9252          this.purpose = castToMarkdown(value); // MarkdownType
9253          return value;
9254        case 1522889671: // copyright
9255          this.copyright = castToMarkdown(value); // MarkdownType
9256          return value;
9257        case -1008619738: // origin
9258          this.getOrigin().add((TestScriptOriginComponent) value); // TestScriptOriginComponent
9259          return value;
9260        case -1429847026: // destination
9261          this.getDestination().add((TestScriptDestinationComponent) value); // TestScriptDestinationComponent
9262          return value;
9263        case -450004177: // metadata
9264          this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent
9265          return value;
9266        case -843449847: // fixture
9267          this.getFixture().add((TestScriptFixtureComponent) value); // TestScriptFixtureComponent
9268          return value;
9269        case -309425751: // profile
9270          this.getProfile().add(castToReference(value)); // Reference
9271          return value;
9272        case -1249586564: // variable
9273          this.getVariable().add((TestScriptVariableComponent) value); // TestScriptVariableComponent
9274          return value;
9275        case 109329021: // setup
9276          this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent
9277          return value;
9278        case 3556498: // test
9279          this.getTest().add((TestScriptTestComponent) value); // TestScriptTestComponent
9280          return value;
9281        case -1663474172: // teardown
9282          this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent
9283          return value;
9284        default: return super.setProperty(hash, name, value);
9285        }
9286
9287      }
9288
9289      @Override
9290      public Base setProperty(String name, Base value) throws FHIRException {
9291        if (name.equals("url")) {
9292          this.url = castToUri(value); // UriType
9293        } else if (name.equals("identifier")) {
9294          this.identifier = castToIdentifier(value); // Identifier
9295        } else if (name.equals("version")) {
9296          this.version = castToString(value); // StringType
9297        } else if (name.equals("name")) {
9298          this.name = castToString(value); // StringType
9299        } else if (name.equals("title")) {
9300          this.title = castToString(value); // StringType
9301        } else if (name.equals("status")) {
9302          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
9303          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
9304        } else if (name.equals("experimental")) {
9305          this.experimental = castToBoolean(value); // BooleanType
9306        } else if (name.equals("date")) {
9307          this.date = castToDateTime(value); // DateTimeType
9308        } else if (name.equals("publisher")) {
9309          this.publisher = castToString(value); // StringType
9310        } else if (name.equals("contact")) {
9311          this.getContact().add(castToContactDetail(value));
9312        } else if (name.equals("description")) {
9313          this.description = castToMarkdown(value); // MarkdownType
9314        } else if (name.equals("useContext")) {
9315          this.getUseContext().add(castToUsageContext(value));
9316        } else if (name.equals("jurisdiction")) {
9317          this.getJurisdiction().add(castToCodeableConcept(value));
9318        } else if (name.equals("purpose")) {
9319          this.purpose = castToMarkdown(value); // MarkdownType
9320        } else if (name.equals("copyright")) {
9321          this.copyright = castToMarkdown(value); // MarkdownType
9322        } else if (name.equals("origin")) {
9323          this.getOrigin().add((TestScriptOriginComponent) value);
9324        } else if (name.equals("destination")) {
9325          this.getDestination().add((TestScriptDestinationComponent) value);
9326        } else if (name.equals("metadata")) {
9327          this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent
9328        } else if (name.equals("fixture")) {
9329          this.getFixture().add((TestScriptFixtureComponent) value);
9330        } else if (name.equals("profile")) {
9331          this.getProfile().add(castToReference(value));
9332        } else if (name.equals("variable")) {
9333          this.getVariable().add((TestScriptVariableComponent) value);
9334        } else if (name.equals("setup")) {
9335          this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent
9336        } else if (name.equals("test")) {
9337          this.getTest().add((TestScriptTestComponent) value);
9338        } else if (name.equals("teardown")) {
9339          this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent
9340        } else
9341          return super.setProperty(name, value);
9342        return value;
9343      }
9344
9345      @Override
9346      public Base makeProperty(int hash, String name) throws FHIRException {
9347        switch (hash) {
9348        case 116079:  return getUrlElement();
9349        case -1618432855:  return getIdentifier();
9350        case 351608024:  return getVersionElement();
9351        case 3373707:  return getNameElement();
9352        case 110371416:  return getTitleElement();
9353        case -892481550:  return getStatusElement();
9354        case -404562712:  return getExperimentalElement();
9355        case 3076014:  return getDateElement();
9356        case 1447404028:  return getPublisherElement();
9357        case 951526432:  return addContact(); 
9358        case -1724546052:  return getDescriptionElement();
9359        case -669707736:  return addUseContext(); 
9360        case -507075711:  return addJurisdiction(); 
9361        case -220463842:  return getPurposeElement();
9362        case 1522889671:  return getCopyrightElement();
9363        case -1008619738:  return addOrigin(); 
9364        case -1429847026:  return addDestination(); 
9365        case -450004177:  return getMetadata();
9366        case -843449847:  return addFixture(); 
9367        case -309425751:  return addProfile(); 
9368        case -1249586564:  return addVariable(); 
9369        case 109329021:  return getSetup();
9370        case 3556498:  return addTest(); 
9371        case -1663474172:  return getTeardown();
9372        default: return super.makeProperty(hash, name);
9373        }
9374
9375      }
9376
9377      @Override
9378      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
9379        switch (hash) {
9380        case 116079: /*url*/ return new String[] {"uri"};
9381        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
9382        case 351608024: /*version*/ return new String[] {"string"};
9383        case 3373707: /*name*/ return new String[] {"string"};
9384        case 110371416: /*title*/ return new String[] {"string"};
9385        case -892481550: /*status*/ return new String[] {"code"};
9386        case -404562712: /*experimental*/ return new String[] {"boolean"};
9387        case 3076014: /*date*/ return new String[] {"dateTime"};
9388        case 1447404028: /*publisher*/ return new String[] {"string"};
9389        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
9390        case -1724546052: /*description*/ return new String[] {"markdown"};
9391        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
9392        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
9393        case -220463842: /*purpose*/ return new String[] {"markdown"};
9394        case 1522889671: /*copyright*/ return new String[] {"markdown"};
9395        case -1008619738: /*origin*/ return new String[] {};
9396        case -1429847026: /*destination*/ return new String[] {};
9397        case -450004177: /*metadata*/ return new String[] {};
9398        case -843449847: /*fixture*/ return new String[] {};
9399        case -309425751: /*profile*/ return new String[] {"Reference"};
9400        case -1249586564: /*variable*/ return new String[] {};
9401        case 109329021: /*setup*/ return new String[] {};
9402        case 3556498: /*test*/ return new String[] {};
9403        case -1663474172: /*teardown*/ return new String[] {};
9404        default: return super.getTypesForProperty(hash, name);
9405        }
9406
9407      }
9408
9409      @Override
9410      public Base addChild(String name) throws FHIRException {
9411        if (name.equals("url")) {
9412          throw new FHIRException("Cannot call addChild on a primitive type TestScript.url");
9413        }
9414        else if (name.equals("identifier")) {
9415          this.identifier = new Identifier();
9416          return this.identifier;
9417        }
9418        else if (name.equals("version")) {
9419          throw new FHIRException("Cannot call addChild on a primitive type TestScript.version");
9420        }
9421        else if (name.equals("name")) {
9422          throw new FHIRException("Cannot call addChild on a primitive type TestScript.name");
9423        }
9424        else if (name.equals("title")) {
9425          throw new FHIRException("Cannot call addChild on a primitive type TestScript.title");
9426        }
9427        else if (name.equals("status")) {
9428          throw new FHIRException("Cannot call addChild on a primitive type TestScript.status");
9429        }
9430        else if (name.equals("experimental")) {
9431          throw new FHIRException("Cannot call addChild on a primitive type TestScript.experimental");
9432        }
9433        else if (name.equals("date")) {
9434          throw new FHIRException("Cannot call addChild on a primitive type TestScript.date");
9435        }
9436        else if (name.equals("publisher")) {
9437          throw new FHIRException("Cannot call addChild on a primitive type TestScript.publisher");
9438        }
9439        else if (name.equals("contact")) {
9440          return addContact();
9441        }
9442        else if (name.equals("description")) {
9443          throw new FHIRException("Cannot call addChild on a primitive type TestScript.description");
9444        }
9445        else if (name.equals("useContext")) {
9446          return addUseContext();
9447        }
9448        else if (name.equals("jurisdiction")) {
9449          return addJurisdiction();
9450        }
9451        else if (name.equals("purpose")) {
9452          throw new FHIRException("Cannot call addChild on a primitive type TestScript.purpose");
9453        }
9454        else if (name.equals("copyright")) {
9455          throw new FHIRException("Cannot call addChild on a primitive type TestScript.copyright");
9456        }
9457        else if (name.equals("origin")) {
9458          return addOrigin();
9459        }
9460        else if (name.equals("destination")) {
9461          return addDestination();
9462        }
9463        else if (name.equals("metadata")) {
9464          this.metadata = new TestScriptMetadataComponent();
9465          return this.metadata;
9466        }
9467        else if (name.equals("fixture")) {
9468          return addFixture();
9469        }
9470        else if (name.equals("profile")) {
9471          return addProfile();
9472        }
9473        else if (name.equals("variable")) {
9474          return addVariable();
9475        }
9476        else if (name.equals("setup")) {
9477          this.setup = new TestScriptSetupComponent();
9478          return this.setup;
9479        }
9480        else if (name.equals("test")) {
9481          return addTest();
9482        }
9483        else if (name.equals("teardown")) {
9484          this.teardown = new TestScriptTeardownComponent();
9485          return this.teardown;
9486        }
9487        else
9488          return super.addChild(name);
9489      }
9490
9491  public String fhirType() {
9492    return "TestScript";
9493
9494  }
9495
9496      public TestScript copy() {
9497        TestScript dst = new TestScript();
9498        copyValues(dst);
9499        return dst;
9500      }
9501
9502      public void copyValues(TestScript dst) {
9503        super.copyValues(dst);
9504        dst.url = url == null ? null : url.copy();
9505        dst.identifier = identifier == null ? null : identifier.copy();
9506        dst.version = version == null ? null : version.copy();
9507        dst.name = name == null ? null : name.copy();
9508        dst.title = title == null ? null : title.copy();
9509        dst.status = status == null ? null : status.copy();
9510        dst.experimental = experimental == null ? null : experimental.copy();
9511        dst.date = date == null ? null : date.copy();
9512        dst.publisher = publisher == null ? null : publisher.copy();
9513        if (contact != null) {
9514          dst.contact = new ArrayList<ContactDetail>();
9515          for (ContactDetail i : contact)
9516            dst.contact.add(i.copy());
9517        };
9518        dst.description = description == null ? null : description.copy();
9519        if (useContext != null) {
9520          dst.useContext = new ArrayList<UsageContext>();
9521          for (UsageContext i : useContext)
9522            dst.useContext.add(i.copy());
9523        };
9524        if (jurisdiction != null) {
9525          dst.jurisdiction = new ArrayList<CodeableConcept>();
9526          for (CodeableConcept i : jurisdiction)
9527            dst.jurisdiction.add(i.copy());
9528        };
9529        dst.purpose = purpose == null ? null : purpose.copy();
9530        dst.copyright = copyright == null ? null : copyright.copy();
9531        if (origin != null) {
9532          dst.origin = new ArrayList<TestScriptOriginComponent>();
9533          for (TestScriptOriginComponent i : origin)
9534            dst.origin.add(i.copy());
9535        };
9536        if (destination != null) {
9537          dst.destination = new ArrayList<TestScriptDestinationComponent>();
9538          for (TestScriptDestinationComponent i : destination)
9539            dst.destination.add(i.copy());
9540        };
9541        dst.metadata = metadata == null ? null : metadata.copy();
9542        if (fixture != null) {
9543          dst.fixture = new ArrayList<TestScriptFixtureComponent>();
9544          for (TestScriptFixtureComponent i : fixture)
9545            dst.fixture.add(i.copy());
9546        };
9547        if (profile != null) {
9548          dst.profile = new ArrayList<Reference>();
9549          for (Reference i : profile)
9550            dst.profile.add(i.copy());
9551        };
9552        if (variable != null) {
9553          dst.variable = new ArrayList<TestScriptVariableComponent>();
9554          for (TestScriptVariableComponent i : variable)
9555            dst.variable.add(i.copy());
9556        };
9557        dst.setup = setup == null ? null : setup.copy();
9558        if (test != null) {
9559          dst.test = new ArrayList<TestScriptTestComponent>();
9560          for (TestScriptTestComponent i : test)
9561            dst.test.add(i.copy());
9562        };
9563        dst.teardown = teardown == null ? null : teardown.copy();
9564      }
9565
9566      protected TestScript typedCopy() {
9567        return copy();
9568      }
9569
9570      @Override
9571      public boolean equalsDeep(Base other_) {
9572        if (!super.equalsDeep(other_))
9573          return false;
9574        if (!(other_ instanceof TestScript))
9575          return false;
9576        TestScript o = (TestScript) other_;
9577        return compareDeep(identifier, o.identifier, true) && compareDeep(purpose, o.purpose, true) && compareDeep(copyright, o.copyright, true)
9578           && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) && compareDeep(metadata, o.metadata, true)
9579           && compareDeep(fixture, o.fixture, true) && compareDeep(profile, o.profile, true) && compareDeep(variable, o.variable, true)
9580           && compareDeep(setup, o.setup, true) && compareDeep(test, o.test, true) && compareDeep(teardown, o.teardown, true)
9581          ;
9582      }
9583
9584      @Override
9585      public boolean equalsShallow(Base other_) {
9586        if (!super.equalsShallow(other_))
9587          return false;
9588        if (!(other_ instanceof TestScript))
9589          return false;
9590        TestScript o = (TestScript) other_;
9591        return compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true);
9592      }
9593
9594      public boolean isEmpty() {
9595        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, purpose, copyright
9596          , origin, destination, metadata, fixture, profile, variable, setup, test, teardown
9597          );
9598      }
9599
9600  @Override
9601  public ResourceType getResourceType() {
9602    return ResourceType.TestScript;
9603   }
9604
9605 /**
9606   * Search parameter: <b>date</b>
9607   * <p>
9608   * Description: <b>The test script publication date</b><br>
9609   * Type: <b>date</b><br>
9610   * Path: <b>TestScript.date</b><br>
9611   * </p>
9612   */
9613  @SearchParamDefinition(name="date", path="TestScript.date", description="The test script publication date", type="date" )
9614  public static final String SP_DATE = "date";
9615 /**
9616   * <b>Fluent Client</b> search parameter constant for <b>date</b>
9617   * <p>
9618   * Description: <b>The test script publication date</b><br>
9619   * Type: <b>date</b><br>
9620   * Path: <b>TestScript.date</b><br>
9621   * </p>
9622   */
9623  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
9624
9625 /**
9626   * Search parameter: <b>identifier</b>
9627   * <p>
9628   * Description: <b>External identifier for the test script</b><br>
9629   * Type: <b>token</b><br>
9630   * Path: <b>TestScript.identifier</b><br>
9631   * </p>
9632   */
9633  @SearchParamDefinition(name="identifier", path="TestScript.identifier", description="External identifier for the test script", type="token" )
9634  public static final String SP_IDENTIFIER = "identifier";
9635 /**
9636   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
9637   * <p>
9638   * Description: <b>External identifier for the test script</b><br>
9639   * Type: <b>token</b><br>
9640   * Path: <b>TestScript.identifier</b><br>
9641   * </p>
9642   */
9643  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
9644
9645 /**
9646   * Search parameter: <b>context-type-value</b>
9647   * <p>
9648   * Description: <b>A use context type and value assigned to the test script</b><br>
9649   * Type: <b>composite</b><br>
9650   * Path: <b></b><br>
9651   * </p>
9652   */
9653  @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"} )
9654  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
9655 /**
9656   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
9657   * <p>
9658   * Description: <b>A use context type and value assigned to the test script</b><br>
9659   * Type: <b>composite</b><br>
9660   * Path: <b></b><br>
9661   * </p>
9662   */
9663  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);
9664
9665 /**
9666   * Search parameter: <b>jurisdiction</b>
9667   * <p>
9668   * Description: <b>Intended jurisdiction for the test script</b><br>
9669   * Type: <b>token</b><br>
9670   * Path: <b>TestScript.jurisdiction</b><br>
9671   * </p>
9672   */
9673  @SearchParamDefinition(name="jurisdiction", path="TestScript.jurisdiction", description="Intended jurisdiction for the test script", type="token" )
9674  public static final String SP_JURISDICTION = "jurisdiction";
9675 /**
9676   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
9677   * <p>
9678   * Description: <b>Intended jurisdiction for the test script</b><br>
9679   * Type: <b>token</b><br>
9680   * Path: <b>TestScript.jurisdiction</b><br>
9681   * </p>
9682   */
9683  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
9684
9685 /**
9686   * Search parameter: <b>description</b>
9687   * <p>
9688   * Description: <b>The description of the test script</b><br>
9689   * Type: <b>string</b><br>
9690   * Path: <b>TestScript.description</b><br>
9691   * </p>
9692   */
9693  @SearchParamDefinition(name="description", path="TestScript.description", description="The description of the test script", type="string" )
9694  public static final String SP_DESCRIPTION = "description";
9695 /**
9696   * <b>Fluent Client</b> search parameter constant for <b>description</b>
9697   * <p>
9698   * Description: <b>The description of the test script</b><br>
9699   * Type: <b>string</b><br>
9700   * Path: <b>TestScript.description</b><br>
9701   * </p>
9702   */
9703  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
9704
9705 /**
9706   * Search parameter: <b>testscript-capability</b>
9707   * <p>
9708   * Description: <b>TestScript required and validated capability</b><br>
9709   * Type: <b>string</b><br>
9710   * Path: <b>TestScript.metadata.capability.description</b><br>
9711   * </p>
9712   */
9713  @SearchParamDefinition(name="testscript-capability", path="TestScript.metadata.capability.description", description="TestScript required and validated capability", type="string" )
9714  public static final String SP_TESTSCRIPT_CAPABILITY = "testscript-capability";
9715 /**
9716   * <b>Fluent Client</b> search parameter constant for <b>testscript-capability</b>
9717   * <p>
9718   * Description: <b>TestScript required and validated capability</b><br>
9719   * Type: <b>string</b><br>
9720   * Path: <b>TestScript.metadata.capability.description</b><br>
9721   * </p>
9722   */
9723  public static final ca.uhn.fhir.rest.gclient.StringClientParam TESTSCRIPT_CAPABILITY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TESTSCRIPT_CAPABILITY);
9724
9725 /**
9726   * Search parameter: <b>context-type</b>
9727   * <p>
9728   * Description: <b>A type of use context assigned to the test script</b><br>
9729   * Type: <b>token</b><br>
9730   * Path: <b>TestScript.useContext.code</b><br>
9731   * </p>
9732   */
9733  @SearchParamDefinition(name="context-type", path="TestScript.useContext.code", description="A type of use context assigned to the test script", type="token" )
9734  public static final String SP_CONTEXT_TYPE = "context-type";
9735 /**
9736   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
9737   * <p>
9738   * Description: <b>A type of use context assigned to the test script</b><br>
9739   * Type: <b>token</b><br>
9740   * Path: <b>TestScript.useContext.code</b><br>
9741   * </p>
9742   */
9743  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE);
9744
9745 /**
9746   * Search parameter: <b>title</b>
9747   * <p>
9748   * Description: <b>The human-friendly name of the test script</b><br>
9749   * Type: <b>string</b><br>
9750   * Path: <b>TestScript.title</b><br>
9751   * </p>
9752   */
9753  @SearchParamDefinition(name="title", path="TestScript.title", description="The human-friendly name of the test script", type="string" )
9754  public static final String SP_TITLE = "title";
9755 /**
9756   * <b>Fluent Client</b> search parameter constant for <b>title</b>
9757   * <p>
9758   * Description: <b>The human-friendly name of the test script</b><br>
9759   * Type: <b>string</b><br>
9760   * Path: <b>TestScript.title</b><br>
9761   * </p>
9762   */
9763  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
9764
9765 /**
9766   * Search parameter: <b>version</b>
9767   * <p>
9768   * Description: <b>The business version of the test script</b><br>
9769   * Type: <b>token</b><br>
9770   * Path: <b>TestScript.version</b><br>
9771   * </p>
9772   */
9773  @SearchParamDefinition(name="version", path="TestScript.version", description="The business version of the test script", type="token" )
9774  public static final String SP_VERSION = "version";
9775 /**
9776   * <b>Fluent Client</b> search parameter constant for <b>version</b>
9777   * <p>
9778   * Description: <b>The business version of the test script</b><br>
9779   * Type: <b>token</b><br>
9780   * Path: <b>TestScript.version</b><br>
9781   * </p>
9782   */
9783  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
9784
9785 /**
9786   * Search parameter: <b>url</b>
9787   * <p>
9788   * Description: <b>The uri that identifies the test script</b><br>
9789   * Type: <b>uri</b><br>
9790   * Path: <b>TestScript.url</b><br>
9791   * </p>
9792   */
9793  @SearchParamDefinition(name="url", path="TestScript.url", description="The uri that identifies the test script", type="uri" )
9794  public static final String SP_URL = "url";
9795 /**
9796   * <b>Fluent Client</b> search parameter constant for <b>url</b>
9797   * <p>
9798   * Description: <b>The uri that identifies the test script</b><br>
9799   * Type: <b>uri</b><br>
9800   * Path: <b>TestScript.url</b><br>
9801   * </p>
9802   */
9803  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
9804
9805 /**
9806   * Search parameter: <b>context-quantity</b>
9807   * <p>
9808   * Description: <b>A quantity- or range-valued use context assigned to the test script</b><br>
9809   * Type: <b>quantity</b><br>
9810   * Path: <b>TestScript.useContext.valueQuantity, TestScript.useContext.valueRange</b><br>
9811   * </p>
9812   */
9813  @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" )
9814  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
9815 /**
9816   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
9817   * <p>
9818   * Description: <b>A quantity- or range-valued use context assigned to the test script</b><br>
9819   * Type: <b>quantity</b><br>
9820   * Path: <b>TestScript.useContext.valueQuantity, TestScript.useContext.valueRange</b><br>
9821   * </p>
9822   */
9823  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY);
9824
9825 /**
9826   * Search parameter: <b>name</b>
9827   * <p>
9828   * Description: <b>Computationally friendly name of the test script</b><br>
9829   * Type: <b>string</b><br>
9830   * Path: <b>TestScript.name</b><br>
9831   * </p>
9832   */
9833  @SearchParamDefinition(name="name", path="TestScript.name", description="Computationally friendly name of the test script", type="string" )
9834  public static final String SP_NAME = "name";
9835 /**
9836   * <b>Fluent Client</b> search parameter constant for <b>name</b>
9837   * <p>
9838   * Description: <b>Computationally friendly name of the test script</b><br>
9839   * Type: <b>string</b><br>
9840   * Path: <b>TestScript.name</b><br>
9841   * </p>
9842   */
9843  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
9844
9845 /**
9846   * Search parameter: <b>context</b>
9847   * <p>
9848   * Description: <b>A use context assigned to the test script</b><br>
9849   * Type: <b>token</b><br>
9850   * Path: <b>TestScript.useContext.valueCodeableConcept</b><br>
9851   * </p>
9852   */
9853  @SearchParamDefinition(name="context", path="(TestScript.useContext.value as CodeableConcept)", description="A use context assigned to the test script", type="token" )
9854  public static final String SP_CONTEXT = "context";
9855 /**
9856   * <b>Fluent Client</b> search parameter constant for <b>context</b>
9857   * <p>
9858   * Description: <b>A use context assigned to the test script</b><br>
9859   * Type: <b>token</b><br>
9860   * Path: <b>TestScript.useContext.valueCodeableConcept</b><br>
9861   * </p>
9862   */
9863  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
9864
9865 /**
9866   * Search parameter: <b>publisher</b>
9867   * <p>
9868   * Description: <b>Name of the publisher of the test script</b><br>
9869   * Type: <b>string</b><br>
9870   * Path: <b>TestScript.publisher</b><br>
9871   * </p>
9872   */
9873  @SearchParamDefinition(name="publisher", path="TestScript.publisher", description="Name of the publisher of the test script", type="string" )
9874  public static final String SP_PUBLISHER = "publisher";
9875 /**
9876   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
9877   * <p>
9878   * Description: <b>Name of the publisher of the test script</b><br>
9879   * Type: <b>string</b><br>
9880   * Path: <b>TestScript.publisher</b><br>
9881   * </p>
9882   */
9883  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
9884
9885 /**
9886   * Search parameter: <b>context-type-quantity</b>
9887   * <p>
9888   * Description: <b>A use context type and quantity- or range-based value assigned to the test script</b><br>
9889   * Type: <b>composite</b><br>
9890   * Path: <b></b><br>
9891   * </p>
9892   */
9893  @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"} )
9894  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
9895 /**
9896   * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b>
9897   * <p>
9898   * Description: <b>A use context type and quantity- or range-based value assigned to the test script</b><br>
9899   * Type: <b>composite</b><br>
9900   * Path: <b></b><br>
9901   * </p>
9902   */
9903  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);
9904
9905 /**
9906   * Search parameter: <b>status</b>
9907   * <p>
9908   * Description: <b>The current status of the test script</b><br>
9909   * Type: <b>token</b><br>
9910   * Path: <b>TestScript.status</b><br>
9911   * </p>
9912   */
9913  @SearchParamDefinition(name="status", path="TestScript.status", description="The current status of the test script", type="token" )
9914  public static final String SP_STATUS = "status";
9915 /**
9916   * <b>Fluent Client</b> search parameter constant for <b>status</b>
9917   * <p>
9918   * Description: <b>The current status of the test script</b><br>
9919   * Type: <b>token</b><br>
9920   * Path: <b>TestScript.status</b><br>
9921   * </p>
9922   */
9923  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
9924
9925
9926}
9927