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