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