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