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 Tue, Dec 28, 2021 07:16+1100 for FHIR v5.0.0-snapshot1
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 * Example of workflow instance.
052 */
053@ResourceDef(name="ExampleScenario", profile="http://hl7.org/fhir/StructureDefinition/ExampleScenario")
054public class ExampleScenario extends CanonicalResource {
055
056    public enum ExampleScenarioActorType {
057        /**
058         * A person.
059         */
060        PERSON, 
061        /**
062         * A system.
063         */
064        ENTITY, 
065        /**
066         * added to help the parsers with the generic types
067         */
068        NULL;
069        public static ExampleScenarioActorType fromCode(String codeString) throws FHIRException {
070            if (codeString == null || "".equals(codeString))
071                return null;
072        if ("person".equals(codeString))
073          return PERSON;
074        if ("entity".equals(codeString))
075          return ENTITY;
076        if (Configuration.isAcceptInvalidEnums())
077          return null;
078        else
079          throw new FHIRException("Unknown ExampleScenarioActorType code '"+codeString+"'");
080        }
081        public String toCode() {
082          switch (this) {
083            case PERSON: return "person";
084            case ENTITY: return "entity";
085            default: return "?";
086          }
087        }
088        public String getSystem() {
089          switch (this) {
090            case PERSON: return "http://hl7.org/fhir/examplescenario-actor-type";
091            case ENTITY: return "http://hl7.org/fhir/examplescenario-actor-type";
092            default: return "?";
093          }
094        }
095        public String getDefinition() {
096          switch (this) {
097            case PERSON: return "A person.";
098            case ENTITY: return "A system.";
099            default: return "?";
100          }
101        }
102        public String getDisplay() {
103          switch (this) {
104            case PERSON: return "Person";
105            case ENTITY: return "System";
106            default: return "?";
107          }
108        }
109    }
110
111  public static class ExampleScenarioActorTypeEnumFactory implements EnumFactory<ExampleScenarioActorType> {
112    public ExampleScenarioActorType fromCode(String codeString) throws IllegalArgumentException {
113      if (codeString == null || "".equals(codeString))
114            if (codeString == null || "".equals(codeString))
115                return null;
116        if ("person".equals(codeString))
117          return ExampleScenarioActorType.PERSON;
118        if ("entity".equals(codeString))
119          return ExampleScenarioActorType.ENTITY;
120        throw new IllegalArgumentException("Unknown ExampleScenarioActorType code '"+codeString+"'");
121        }
122        public Enumeration<ExampleScenarioActorType> fromType(Base code) throws FHIRException {
123          if (code == null)
124            return null;
125          if (code.isEmpty())
126            return new Enumeration<ExampleScenarioActorType>(this);
127          String codeString = ((PrimitiveType) code).asStringValue();
128          if (codeString == null || "".equals(codeString))
129            return null;
130        if ("person".equals(codeString))
131          return new Enumeration<ExampleScenarioActorType>(this, ExampleScenarioActorType.PERSON);
132        if ("entity".equals(codeString))
133          return new Enumeration<ExampleScenarioActorType>(this, ExampleScenarioActorType.ENTITY);
134        throw new FHIRException("Unknown ExampleScenarioActorType code '"+codeString+"'");
135        }
136    public String toCode(ExampleScenarioActorType code) {
137      if (code == ExampleScenarioActorType.PERSON)
138        return "person";
139      if (code == ExampleScenarioActorType.ENTITY)
140        return "entity";
141      return "?";
142      }
143    public String toSystem(ExampleScenarioActorType code) {
144      return code.getSystem();
145      }
146    }
147
148    @Block()
149    public static class ExampleScenarioActorComponent extends BackboneElement implements IBaseBackboneElement {
150        /**
151         * ID or acronym of actor.
152         */
153        @Child(name = "actorId", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
154        @Description(shortDefinition="ID or acronym of the actor", formalDefinition="ID or acronym of actor." )
155        protected StringType actorId;
156
157        /**
158         * The type of actor - person or system.
159         */
160        @Child(name = "type", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false)
161        @Description(shortDefinition="person | entity", formalDefinition="The type of actor - person or system." )
162        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/examplescenario-actor-type")
163        protected Enumeration<ExampleScenarioActorType> type;
164
165        /**
166         * The name of the actor as shown in the page.
167         */
168        @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
169        @Description(shortDefinition="The name of the actor as shown in the page", formalDefinition="The name of the actor as shown in the page." )
170        protected StringType name;
171
172        /**
173         * The description of the actor.
174         */
175        @Child(name = "description", type = {MarkdownType.class}, order=4, min=0, max=1, modifier=false, summary=false)
176        @Description(shortDefinition="The description of the actor", formalDefinition="The description of the actor." )
177        protected MarkdownType description;
178
179        private static final long serialVersionUID = 1348364162L;
180
181    /**
182     * Constructor
183     */
184      public ExampleScenarioActorComponent() {
185        super();
186      }
187
188    /**
189     * Constructor
190     */
191      public ExampleScenarioActorComponent(String actorId, ExampleScenarioActorType type) {
192        super();
193        this.setActorId(actorId);
194        this.setType(type);
195      }
196
197        /**
198         * @return {@link #actorId} (ID or acronym of actor.). This is the underlying object with id, value and extensions. The accessor "getActorId" gives direct access to the value
199         */
200        public StringType getActorIdElement() { 
201          if (this.actorId == null)
202            if (Configuration.errorOnAutoCreate())
203              throw new Error("Attempt to auto-create ExampleScenarioActorComponent.actorId");
204            else if (Configuration.doAutoCreate())
205              this.actorId = new StringType(); // bb
206          return this.actorId;
207        }
208
209        public boolean hasActorIdElement() { 
210          return this.actorId != null && !this.actorId.isEmpty();
211        }
212
213        public boolean hasActorId() { 
214          return this.actorId != null && !this.actorId.isEmpty();
215        }
216
217        /**
218         * @param value {@link #actorId} (ID or acronym of actor.). This is the underlying object with id, value and extensions. The accessor "getActorId" gives direct access to the value
219         */
220        public ExampleScenarioActorComponent setActorIdElement(StringType value) { 
221          this.actorId = value;
222          return this;
223        }
224
225        /**
226         * @return ID or acronym of actor.
227         */
228        public String getActorId() { 
229          return this.actorId == null ? null : this.actorId.getValue();
230        }
231
232        /**
233         * @param value ID or acronym of actor.
234         */
235        public ExampleScenarioActorComponent setActorId(String value) { 
236            if (this.actorId == null)
237              this.actorId = new StringType();
238            this.actorId.setValue(value);
239          return this;
240        }
241
242        /**
243         * @return {@link #type} (The type of actor - person or system.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
244         */
245        public Enumeration<ExampleScenarioActorType> getTypeElement() { 
246          if (this.type == null)
247            if (Configuration.errorOnAutoCreate())
248              throw new Error("Attempt to auto-create ExampleScenarioActorComponent.type");
249            else if (Configuration.doAutoCreate())
250              this.type = new Enumeration<ExampleScenarioActorType>(new ExampleScenarioActorTypeEnumFactory()); // bb
251          return this.type;
252        }
253
254        public boolean hasTypeElement() { 
255          return this.type != null && !this.type.isEmpty();
256        }
257
258        public boolean hasType() { 
259          return this.type != null && !this.type.isEmpty();
260        }
261
262        /**
263         * @param value {@link #type} (The type of actor - person or system.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
264         */
265        public ExampleScenarioActorComponent setTypeElement(Enumeration<ExampleScenarioActorType> value) { 
266          this.type = value;
267          return this;
268        }
269
270        /**
271         * @return The type of actor - person or system.
272         */
273        public ExampleScenarioActorType getType() { 
274          return this.type == null ? null : this.type.getValue();
275        }
276
277        /**
278         * @param value The type of actor - person or system.
279         */
280        public ExampleScenarioActorComponent setType(ExampleScenarioActorType value) { 
281            if (this.type == null)
282              this.type = new Enumeration<ExampleScenarioActorType>(new ExampleScenarioActorTypeEnumFactory());
283            this.type.setValue(value);
284          return this;
285        }
286
287        /**
288         * @return {@link #name} (The name of the actor as shown in the page.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
289         */
290        public StringType getNameElement() { 
291          if (this.name == null)
292            if (Configuration.errorOnAutoCreate())
293              throw new Error("Attempt to auto-create ExampleScenarioActorComponent.name");
294            else if (Configuration.doAutoCreate())
295              this.name = new StringType(); // bb
296          return this.name;
297        }
298
299        public boolean hasNameElement() { 
300          return this.name != null && !this.name.isEmpty();
301        }
302
303        public boolean hasName() { 
304          return this.name != null && !this.name.isEmpty();
305        }
306
307        /**
308         * @param value {@link #name} (The name of the actor as shown in the page.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
309         */
310        public ExampleScenarioActorComponent setNameElement(StringType value) { 
311          this.name = value;
312          return this;
313        }
314
315        /**
316         * @return The name of the actor as shown in the page.
317         */
318        public String getName() { 
319          return this.name == null ? null : this.name.getValue();
320        }
321
322        /**
323         * @param value The name of the actor as shown in the page.
324         */
325        public ExampleScenarioActorComponent setName(String value) { 
326          if (Utilities.noString(value))
327            this.name = null;
328          else {
329            if (this.name == null)
330              this.name = new StringType();
331            this.name.setValue(value);
332          }
333          return this;
334        }
335
336        /**
337         * @return {@link #description} (The description of the actor.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
338         */
339        public MarkdownType getDescriptionElement() { 
340          if (this.description == null)
341            if (Configuration.errorOnAutoCreate())
342              throw new Error("Attempt to auto-create ExampleScenarioActorComponent.description");
343            else if (Configuration.doAutoCreate())
344              this.description = new MarkdownType(); // bb
345          return this.description;
346        }
347
348        public boolean hasDescriptionElement() { 
349          return this.description != null && !this.description.isEmpty();
350        }
351
352        public boolean hasDescription() { 
353          return this.description != null && !this.description.isEmpty();
354        }
355
356        /**
357         * @param value {@link #description} (The description of the actor.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
358         */
359        public ExampleScenarioActorComponent setDescriptionElement(MarkdownType value) { 
360          this.description = value;
361          return this;
362        }
363
364        /**
365         * @return The description of the actor.
366         */
367        public String getDescription() { 
368          return this.description == null ? null : this.description.getValue();
369        }
370
371        /**
372         * @param value The description of the actor.
373         */
374        public ExampleScenarioActorComponent setDescription(String value) { 
375          if (value == null)
376            this.description = null;
377          else {
378            if (this.description == null)
379              this.description = new MarkdownType();
380            this.description.setValue(value);
381          }
382          return this;
383        }
384
385        protected void listChildren(List<Property> children) {
386          super.listChildren(children);
387          children.add(new Property("actorId", "string", "ID or acronym of actor.", 0, 1, actorId));
388          children.add(new Property("type", "code", "The type of actor - person or system.", 0, 1, type));
389          children.add(new Property("name", "string", "The name of the actor as shown in the page.", 0, 1, name));
390          children.add(new Property("description", "markdown", "The description of the actor.", 0, 1, description));
391        }
392
393        @Override
394        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
395          switch (_hash) {
396          case -1161623056: /*actorId*/  return new Property("actorId", "string", "ID or acronym of actor.", 0, 1, actorId);
397          case 3575610: /*type*/  return new Property("type", "code", "The type of actor - person or system.", 0, 1, type);
398          case 3373707: /*name*/  return new Property("name", "string", "The name of the actor as shown in the page.", 0, 1, name);
399          case -1724546052: /*description*/  return new Property("description", "markdown", "The description of the actor.", 0, 1, description);
400          default: return super.getNamedProperty(_hash, _name, _checkValid);
401          }
402
403        }
404
405      @Override
406      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
407        switch (hash) {
408        case -1161623056: /*actorId*/ return this.actorId == null ? new Base[0] : new Base[] {this.actorId}; // StringType
409        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<ExampleScenarioActorType>
410        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
411        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
412        default: return super.getProperty(hash, name, checkValid);
413        }
414
415      }
416
417      @Override
418      public Base setProperty(int hash, String name, Base value) throws FHIRException {
419        switch (hash) {
420        case -1161623056: // actorId
421          this.actorId = TypeConvertor.castToString(value); // StringType
422          return value;
423        case 3575610: // type
424          value = new ExampleScenarioActorTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
425          this.type = (Enumeration) value; // Enumeration<ExampleScenarioActorType>
426          return value;
427        case 3373707: // name
428          this.name = TypeConvertor.castToString(value); // StringType
429          return value;
430        case -1724546052: // description
431          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
432          return value;
433        default: return super.setProperty(hash, name, value);
434        }
435
436      }
437
438      @Override
439      public Base setProperty(String name, Base value) throws FHIRException {
440        if (name.equals("actorId")) {
441          this.actorId = TypeConvertor.castToString(value); // StringType
442        } else if (name.equals("type")) {
443          value = new ExampleScenarioActorTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
444          this.type = (Enumeration) value; // Enumeration<ExampleScenarioActorType>
445        } else if (name.equals("name")) {
446          this.name = TypeConvertor.castToString(value); // StringType
447        } else if (name.equals("description")) {
448          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
449        } else
450          return super.setProperty(name, value);
451        return value;
452      }
453
454      @Override
455      public Base makeProperty(int hash, String name) throws FHIRException {
456        switch (hash) {
457        case -1161623056:  return getActorIdElement();
458        case 3575610:  return getTypeElement();
459        case 3373707:  return getNameElement();
460        case -1724546052:  return getDescriptionElement();
461        default: return super.makeProperty(hash, name);
462        }
463
464      }
465
466      @Override
467      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
468        switch (hash) {
469        case -1161623056: /*actorId*/ return new String[] {"string"};
470        case 3575610: /*type*/ return new String[] {"code"};
471        case 3373707: /*name*/ return new String[] {"string"};
472        case -1724546052: /*description*/ return new String[] {"markdown"};
473        default: return super.getTypesForProperty(hash, name);
474        }
475
476      }
477
478      @Override
479      public Base addChild(String name) throws FHIRException {
480        if (name.equals("actorId")) {
481          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.actor.actorId");
482        }
483        else if (name.equals("type")) {
484          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.actor.type");
485        }
486        else if (name.equals("name")) {
487          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.actor.name");
488        }
489        else if (name.equals("description")) {
490          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.actor.description");
491        }
492        else
493          return super.addChild(name);
494      }
495
496      public ExampleScenarioActorComponent copy() {
497        ExampleScenarioActorComponent dst = new ExampleScenarioActorComponent();
498        copyValues(dst);
499        return dst;
500      }
501
502      public void copyValues(ExampleScenarioActorComponent dst) {
503        super.copyValues(dst);
504        dst.actorId = actorId == null ? null : actorId.copy();
505        dst.type = type == null ? null : type.copy();
506        dst.name = name == null ? null : name.copy();
507        dst.description = description == null ? null : description.copy();
508      }
509
510      @Override
511      public boolean equalsDeep(Base other_) {
512        if (!super.equalsDeep(other_))
513          return false;
514        if (!(other_ instanceof ExampleScenarioActorComponent))
515          return false;
516        ExampleScenarioActorComponent o = (ExampleScenarioActorComponent) other_;
517        return compareDeep(actorId, o.actorId, true) && compareDeep(type, o.type, true) && compareDeep(name, o.name, true)
518           && compareDeep(description, o.description, true);
519      }
520
521      @Override
522      public boolean equalsShallow(Base other_) {
523        if (!super.equalsShallow(other_))
524          return false;
525        if (!(other_ instanceof ExampleScenarioActorComponent))
526          return false;
527        ExampleScenarioActorComponent o = (ExampleScenarioActorComponent) other_;
528        return compareValues(actorId, o.actorId, true) && compareValues(type, o.type, true) && compareValues(name, o.name, true)
529           && compareValues(description, o.description, true);
530      }
531
532      public boolean isEmpty() {
533        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(actorId, type, name, description
534          );
535      }
536
537  public String fhirType() {
538    return "ExampleScenario.actor";
539
540  }
541
542  }
543
544    @Block()
545    public static class ExampleScenarioInstanceComponent extends BackboneElement implements IBaseBackboneElement {
546        /**
547         * The id of the resource for referencing.
548         */
549        @Child(name = "resourceId", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
550        @Description(shortDefinition="The id of the resource for referencing", formalDefinition="The id of the resource for referencing." )
551        protected StringType resourceId;
552
553        /**
554         * The type of the resource.
555         */
556        @Child(name = "resourceType", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false)
557        @Description(shortDefinition="The type of the resource", formalDefinition="The type of the resource." )
558        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types")
559        protected CodeType resourceType;
560
561        /**
562         * A short name for the resource instance.
563         */
564        @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
565        @Description(shortDefinition="A short name for the resource instance", formalDefinition="A short name for the resource instance." )
566        protected StringType name;
567
568        /**
569         * Human-friendly description of the resource instance.
570         */
571        @Child(name = "description", type = {MarkdownType.class}, order=4, min=0, max=1, modifier=false, summary=false)
572        @Description(shortDefinition="Human-friendly description of the resource instance", formalDefinition="Human-friendly description of the resource instance." )
573        protected MarkdownType description;
574
575        /**
576         * A specific version of the resource.
577         */
578        @Child(name = "version", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
579        @Description(shortDefinition="A specific version of the resource", formalDefinition="A specific version of the resource." )
580        protected List<ExampleScenarioInstanceVersionComponent> version;
581
582        /**
583         * Resources contained in the instance (e.g. the observations contained in a bundle).
584         */
585        @Child(name = "containedInstance", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
586        @Description(shortDefinition="Resources contained in the instance", formalDefinition="Resources contained in the instance (e.g. the observations contained in a bundle)." )
587        protected List<ExampleScenarioInstanceContainedInstanceComponent> containedInstance;
588
589        private static final long serialVersionUID = -1928273130L;
590
591    /**
592     * Constructor
593     */
594      public ExampleScenarioInstanceComponent() {
595        super();
596      }
597
598    /**
599     * Constructor
600     */
601      public ExampleScenarioInstanceComponent(String resourceId, String resourceType) {
602        super();
603        this.setResourceId(resourceId);
604        this.setResourceType(resourceType);
605      }
606
607        /**
608         * @return {@link #resourceId} (The id of the resource for referencing.). This is the underlying object with id, value and extensions. The accessor "getResourceId" gives direct access to the value
609         */
610        public StringType getResourceIdElement() { 
611          if (this.resourceId == null)
612            if (Configuration.errorOnAutoCreate())
613              throw new Error("Attempt to auto-create ExampleScenarioInstanceComponent.resourceId");
614            else if (Configuration.doAutoCreate())
615              this.resourceId = new StringType(); // bb
616          return this.resourceId;
617        }
618
619        public boolean hasResourceIdElement() { 
620          return this.resourceId != null && !this.resourceId.isEmpty();
621        }
622
623        public boolean hasResourceId() { 
624          return this.resourceId != null && !this.resourceId.isEmpty();
625        }
626
627        /**
628         * @param value {@link #resourceId} (The id of the resource for referencing.). This is the underlying object with id, value and extensions. The accessor "getResourceId" gives direct access to the value
629         */
630        public ExampleScenarioInstanceComponent setResourceIdElement(StringType value) { 
631          this.resourceId = value;
632          return this;
633        }
634
635        /**
636         * @return The id of the resource for referencing.
637         */
638        public String getResourceId() { 
639          return this.resourceId == null ? null : this.resourceId.getValue();
640        }
641
642        /**
643         * @param value The id of the resource for referencing.
644         */
645        public ExampleScenarioInstanceComponent setResourceId(String value) { 
646            if (this.resourceId == null)
647              this.resourceId = new StringType();
648            this.resourceId.setValue(value);
649          return this;
650        }
651
652        /**
653         * @return {@link #resourceType} (The type of the resource.). This is the underlying object with id, value and extensions. The accessor "getResourceType" gives direct access to the value
654         */
655        public CodeType getResourceTypeElement() { 
656          if (this.resourceType == null)
657            if (Configuration.errorOnAutoCreate())
658              throw new Error("Attempt to auto-create ExampleScenarioInstanceComponent.resourceType");
659            else if (Configuration.doAutoCreate())
660              this.resourceType = new CodeType(); // bb
661          return this.resourceType;
662        }
663
664        public boolean hasResourceTypeElement() { 
665          return this.resourceType != null && !this.resourceType.isEmpty();
666        }
667
668        public boolean hasResourceType() { 
669          return this.resourceType != null && !this.resourceType.isEmpty();
670        }
671
672        /**
673         * @param value {@link #resourceType} (The type of the resource.). This is the underlying object with id, value and extensions. The accessor "getResourceType" gives direct access to the value
674         */
675        public ExampleScenarioInstanceComponent setResourceTypeElement(CodeType value) { 
676          this.resourceType = value;
677          return this;
678        }
679
680        /**
681         * @return The type of the resource.
682         */
683        public String getResourceType() { 
684          return this.resourceType == null ? null : this.resourceType.getValue();
685        }
686
687        /**
688         * @param value The type of the resource.
689         */
690        public ExampleScenarioInstanceComponent setResourceType(String value) { 
691            if (this.resourceType == null)
692              this.resourceType = new CodeType();
693            this.resourceType.setValue(value);
694          return this;
695        }
696
697        /**
698         * @return {@link #name} (A short name for the resource instance.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
699         */
700        public StringType getNameElement() { 
701          if (this.name == null)
702            if (Configuration.errorOnAutoCreate())
703              throw new Error("Attempt to auto-create ExampleScenarioInstanceComponent.name");
704            else if (Configuration.doAutoCreate())
705              this.name = new StringType(); // bb
706          return this.name;
707        }
708
709        public boolean hasNameElement() { 
710          return this.name != null && !this.name.isEmpty();
711        }
712
713        public boolean hasName() { 
714          return this.name != null && !this.name.isEmpty();
715        }
716
717        /**
718         * @param value {@link #name} (A short name for the resource instance.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
719         */
720        public ExampleScenarioInstanceComponent setNameElement(StringType value) { 
721          this.name = value;
722          return this;
723        }
724
725        /**
726         * @return A short name for the resource instance.
727         */
728        public String getName() { 
729          return this.name == null ? null : this.name.getValue();
730        }
731
732        /**
733         * @param value A short name for the resource instance.
734         */
735        public ExampleScenarioInstanceComponent setName(String value) { 
736          if (Utilities.noString(value))
737            this.name = null;
738          else {
739            if (this.name == null)
740              this.name = new StringType();
741            this.name.setValue(value);
742          }
743          return this;
744        }
745
746        /**
747         * @return {@link #description} (Human-friendly description of the resource instance.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
748         */
749        public MarkdownType getDescriptionElement() { 
750          if (this.description == null)
751            if (Configuration.errorOnAutoCreate())
752              throw new Error("Attempt to auto-create ExampleScenarioInstanceComponent.description");
753            else if (Configuration.doAutoCreate())
754              this.description = new MarkdownType(); // bb
755          return this.description;
756        }
757
758        public boolean hasDescriptionElement() { 
759          return this.description != null && !this.description.isEmpty();
760        }
761
762        public boolean hasDescription() { 
763          return this.description != null && !this.description.isEmpty();
764        }
765
766        /**
767         * @param value {@link #description} (Human-friendly description of the resource instance.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
768         */
769        public ExampleScenarioInstanceComponent setDescriptionElement(MarkdownType value) { 
770          this.description = value;
771          return this;
772        }
773
774        /**
775         * @return Human-friendly description of the resource instance.
776         */
777        public String getDescription() { 
778          return this.description == null ? null : this.description.getValue();
779        }
780
781        /**
782         * @param value Human-friendly description of the resource instance.
783         */
784        public ExampleScenarioInstanceComponent setDescription(String value) { 
785          if (value == null)
786            this.description = null;
787          else {
788            if (this.description == null)
789              this.description = new MarkdownType();
790            this.description.setValue(value);
791          }
792          return this;
793        }
794
795        /**
796         * @return {@link #version} (A specific version of the resource.)
797         */
798        public List<ExampleScenarioInstanceVersionComponent> getVersion() { 
799          if (this.version == null)
800            this.version = new ArrayList<ExampleScenarioInstanceVersionComponent>();
801          return this.version;
802        }
803
804        /**
805         * @return Returns a reference to <code>this</code> for easy method chaining
806         */
807        public ExampleScenarioInstanceComponent setVersion(List<ExampleScenarioInstanceVersionComponent> theVersion) { 
808          this.version = theVersion;
809          return this;
810        }
811
812        public boolean hasVersion() { 
813          if (this.version == null)
814            return false;
815          for (ExampleScenarioInstanceVersionComponent item : this.version)
816            if (!item.isEmpty())
817              return true;
818          return false;
819        }
820
821        public ExampleScenarioInstanceVersionComponent addVersion() { //3
822          ExampleScenarioInstanceVersionComponent t = new ExampleScenarioInstanceVersionComponent();
823          if (this.version == null)
824            this.version = new ArrayList<ExampleScenarioInstanceVersionComponent>();
825          this.version.add(t);
826          return t;
827        }
828
829        public ExampleScenarioInstanceComponent addVersion(ExampleScenarioInstanceVersionComponent t) { //3
830          if (t == null)
831            return this;
832          if (this.version == null)
833            this.version = new ArrayList<ExampleScenarioInstanceVersionComponent>();
834          this.version.add(t);
835          return this;
836        }
837
838        /**
839         * @return The first repetition of repeating field {@link #version}, creating it if it does not already exist {3}
840         */
841        public ExampleScenarioInstanceVersionComponent getVersionFirstRep() { 
842          if (getVersion().isEmpty()) {
843            addVersion();
844          }
845          return getVersion().get(0);
846        }
847
848        /**
849         * @return {@link #containedInstance} (Resources contained in the instance (e.g. the observations contained in a bundle).)
850         */
851        public List<ExampleScenarioInstanceContainedInstanceComponent> getContainedInstance() { 
852          if (this.containedInstance == null)
853            this.containedInstance = new ArrayList<ExampleScenarioInstanceContainedInstanceComponent>();
854          return this.containedInstance;
855        }
856
857        /**
858         * @return Returns a reference to <code>this</code> for easy method chaining
859         */
860        public ExampleScenarioInstanceComponent setContainedInstance(List<ExampleScenarioInstanceContainedInstanceComponent> theContainedInstance) { 
861          this.containedInstance = theContainedInstance;
862          return this;
863        }
864
865        public boolean hasContainedInstance() { 
866          if (this.containedInstance == null)
867            return false;
868          for (ExampleScenarioInstanceContainedInstanceComponent item : this.containedInstance)
869            if (!item.isEmpty())
870              return true;
871          return false;
872        }
873
874        public ExampleScenarioInstanceContainedInstanceComponent addContainedInstance() { //3
875          ExampleScenarioInstanceContainedInstanceComponent t = new ExampleScenarioInstanceContainedInstanceComponent();
876          if (this.containedInstance == null)
877            this.containedInstance = new ArrayList<ExampleScenarioInstanceContainedInstanceComponent>();
878          this.containedInstance.add(t);
879          return t;
880        }
881
882        public ExampleScenarioInstanceComponent addContainedInstance(ExampleScenarioInstanceContainedInstanceComponent t) { //3
883          if (t == null)
884            return this;
885          if (this.containedInstance == null)
886            this.containedInstance = new ArrayList<ExampleScenarioInstanceContainedInstanceComponent>();
887          this.containedInstance.add(t);
888          return this;
889        }
890
891        /**
892         * @return The first repetition of repeating field {@link #containedInstance}, creating it if it does not already exist {3}
893         */
894        public ExampleScenarioInstanceContainedInstanceComponent getContainedInstanceFirstRep() { 
895          if (getContainedInstance().isEmpty()) {
896            addContainedInstance();
897          }
898          return getContainedInstance().get(0);
899        }
900
901        protected void listChildren(List<Property> children) {
902          super.listChildren(children);
903          children.add(new Property("resourceId", "string", "The id of the resource for referencing.", 0, 1, resourceId));
904          children.add(new Property("resourceType", "code", "The type of the resource.", 0, 1, resourceType));
905          children.add(new Property("name", "string", "A short name for the resource instance.", 0, 1, name));
906          children.add(new Property("description", "markdown", "Human-friendly description of the resource instance.", 0, 1, description));
907          children.add(new Property("version", "", "A specific version of the resource.", 0, java.lang.Integer.MAX_VALUE, version));
908          children.add(new Property("containedInstance", "", "Resources contained in the instance (e.g. the observations contained in a bundle).", 0, java.lang.Integer.MAX_VALUE, containedInstance));
909        }
910
911        @Override
912        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
913          switch (_hash) {
914          case -1345650231: /*resourceId*/  return new Property("resourceId", "string", "The id of the resource for referencing.", 0, 1, resourceId);
915          case -384364440: /*resourceType*/  return new Property("resourceType", "code", "The type of the resource.", 0, 1, resourceType);
916          case 3373707: /*name*/  return new Property("name", "string", "A short name for the resource instance.", 0, 1, name);
917          case -1724546052: /*description*/  return new Property("description", "markdown", "Human-friendly description of the resource instance.", 0, 1, description);
918          case 351608024: /*version*/  return new Property("version", "", "A specific version of the resource.", 0, java.lang.Integer.MAX_VALUE, version);
919          case -417062360: /*containedInstance*/  return new Property("containedInstance", "", "Resources contained in the instance (e.g. the observations contained in a bundle).", 0, java.lang.Integer.MAX_VALUE, containedInstance);
920          default: return super.getNamedProperty(_hash, _name, _checkValid);
921          }
922
923        }
924
925      @Override
926      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
927        switch (hash) {
928        case -1345650231: /*resourceId*/ return this.resourceId == null ? new Base[0] : new Base[] {this.resourceId}; // StringType
929        case -384364440: /*resourceType*/ return this.resourceType == null ? new Base[0] : new Base[] {this.resourceType}; // CodeType
930        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
931        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
932        case 351608024: /*version*/ return this.version == null ? new Base[0] : this.version.toArray(new Base[this.version.size()]); // ExampleScenarioInstanceVersionComponent
933        case -417062360: /*containedInstance*/ return this.containedInstance == null ? new Base[0] : this.containedInstance.toArray(new Base[this.containedInstance.size()]); // ExampleScenarioInstanceContainedInstanceComponent
934        default: return super.getProperty(hash, name, checkValid);
935        }
936
937      }
938
939      @Override
940      public Base setProperty(int hash, String name, Base value) throws FHIRException {
941        switch (hash) {
942        case -1345650231: // resourceId
943          this.resourceId = TypeConvertor.castToString(value); // StringType
944          return value;
945        case -384364440: // resourceType
946          this.resourceType = TypeConvertor.castToCode(value); // CodeType
947          return value;
948        case 3373707: // name
949          this.name = TypeConvertor.castToString(value); // StringType
950          return value;
951        case -1724546052: // description
952          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
953          return value;
954        case 351608024: // version
955          this.getVersion().add((ExampleScenarioInstanceVersionComponent) value); // ExampleScenarioInstanceVersionComponent
956          return value;
957        case -417062360: // containedInstance
958          this.getContainedInstance().add((ExampleScenarioInstanceContainedInstanceComponent) value); // ExampleScenarioInstanceContainedInstanceComponent
959          return value;
960        default: return super.setProperty(hash, name, value);
961        }
962
963      }
964
965      @Override
966      public Base setProperty(String name, Base value) throws FHIRException {
967        if (name.equals("resourceId")) {
968          this.resourceId = TypeConvertor.castToString(value); // StringType
969        } else if (name.equals("resourceType")) {
970          this.resourceType = TypeConvertor.castToCode(value); // CodeType
971        } else if (name.equals("name")) {
972          this.name = TypeConvertor.castToString(value); // StringType
973        } else if (name.equals("description")) {
974          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
975        } else if (name.equals("version")) {
976          this.getVersion().add((ExampleScenarioInstanceVersionComponent) value);
977        } else if (name.equals("containedInstance")) {
978          this.getContainedInstance().add((ExampleScenarioInstanceContainedInstanceComponent) value);
979        } else
980          return super.setProperty(name, value);
981        return value;
982      }
983
984      @Override
985      public Base makeProperty(int hash, String name) throws FHIRException {
986        switch (hash) {
987        case -1345650231:  return getResourceIdElement();
988        case -384364440:  return getResourceTypeElement();
989        case 3373707:  return getNameElement();
990        case -1724546052:  return getDescriptionElement();
991        case 351608024:  return addVersion(); 
992        case -417062360:  return addContainedInstance(); 
993        default: return super.makeProperty(hash, name);
994        }
995
996      }
997
998      @Override
999      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1000        switch (hash) {
1001        case -1345650231: /*resourceId*/ return new String[] {"string"};
1002        case -384364440: /*resourceType*/ return new String[] {"code"};
1003        case 3373707: /*name*/ return new String[] {"string"};
1004        case -1724546052: /*description*/ return new String[] {"markdown"};
1005        case 351608024: /*version*/ return new String[] {};
1006        case -417062360: /*containedInstance*/ return new String[] {};
1007        default: return super.getTypesForProperty(hash, name);
1008        }
1009
1010      }
1011
1012      @Override
1013      public Base addChild(String name) throws FHIRException {
1014        if (name.equals("resourceId")) {
1015          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.instance.resourceId");
1016        }
1017        else if (name.equals("resourceType")) {
1018          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.instance.resourceType");
1019        }
1020        else if (name.equals("name")) {
1021          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.instance.name");
1022        }
1023        else if (name.equals("description")) {
1024          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.instance.description");
1025        }
1026        else if (name.equals("version")) {
1027          return addVersion();
1028        }
1029        else if (name.equals("containedInstance")) {
1030          return addContainedInstance();
1031        }
1032        else
1033          return super.addChild(name);
1034      }
1035
1036      public ExampleScenarioInstanceComponent copy() {
1037        ExampleScenarioInstanceComponent dst = new ExampleScenarioInstanceComponent();
1038        copyValues(dst);
1039        return dst;
1040      }
1041
1042      public void copyValues(ExampleScenarioInstanceComponent dst) {
1043        super.copyValues(dst);
1044        dst.resourceId = resourceId == null ? null : resourceId.copy();
1045        dst.resourceType = resourceType == null ? null : resourceType.copy();
1046        dst.name = name == null ? null : name.copy();
1047        dst.description = description == null ? null : description.copy();
1048        if (version != null) {
1049          dst.version = new ArrayList<ExampleScenarioInstanceVersionComponent>();
1050          for (ExampleScenarioInstanceVersionComponent i : version)
1051            dst.version.add(i.copy());
1052        };
1053        if (containedInstance != null) {
1054          dst.containedInstance = new ArrayList<ExampleScenarioInstanceContainedInstanceComponent>();
1055          for (ExampleScenarioInstanceContainedInstanceComponent i : containedInstance)
1056            dst.containedInstance.add(i.copy());
1057        };
1058      }
1059
1060      @Override
1061      public boolean equalsDeep(Base other_) {
1062        if (!super.equalsDeep(other_))
1063          return false;
1064        if (!(other_ instanceof ExampleScenarioInstanceComponent))
1065          return false;
1066        ExampleScenarioInstanceComponent o = (ExampleScenarioInstanceComponent) other_;
1067        return compareDeep(resourceId, o.resourceId, true) && compareDeep(resourceType, o.resourceType, true)
1068           && compareDeep(name, o.name, true) && compareDeep(description, o.description, true) && compareDeep(version, o.version, true)
1069           && compareDeep(containedInstance, o.containedInstance, true);
1070      }
1071
1072      @Override
1073      public boolean equalsShallow(Base other_) {
1074        if (!super.equalsShallow(other_))
1075          return false;
1076        if (!(other_ instanceof ExampleScenarioInstanceComponent))
1077          return false;
1078        ExampleScenarioInstanceComponent o = (ExampleScenarioInstanceComponent) other_;
1079        return compareValues(resourceId, o.resourceId, true) && compareValues(resourceType, o.resourceType, true)
1080           && compareValues(name, o.name, true) && compareValues(description, o.description, true);
1081      }
1082
1083      public boolean isEmpty() {
1084        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(resourceId, resourceType, name
1085          , description, version, containedInstance);
1086      }
1087
1088  public String fhirType() {
1089    return "ExampleScenario.instance";
1090
1091  }
1092
1093  }
1094
1095    @Block()
1096    public static class ExampleScenarioInstanceVersionComponent extends BackboneElement implements IBaseBackboneElement {
1097        /**
1098         * The identifier of a specific version of a resource.
1099         */
1100        @Child(name = "versionId", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1101        @Description(shortDefinition="The identifier of a specific version of a resource", formalDefinition="The identifier of a specific version of a resource." )
1102        protected StringType versionId;
1103
1104        /**
1105         * The description of the resource version.
1106         */
1107        @Child(name = "description", type = {MarkdownType.class}, order=2, min=1, max=1, modifier=false, summary=false)
1108        @Description(shortDefinition="The description of the resource version", formalDefinition="The description of the resource version." )
1109        protected MarkdownType description;
1110
1111        private static final long serialVersionUID = 960821913L;
1112
1113    /**
1114     * Constructor
1115     */
1116      public ExampleScenarioInstanceVersionComponent() {
1117        super();
1118      }
1119
1120    /**
1121     * Constructor
1122     */
1123      public ExampleScenarioInstanceVersionComponent(String versionId, String description) {
1124        super();
1125        this.setVersionId(versionId);
1126        this.setDescription(description);
1127      }
1128
1129        /**
1130         * @return {@link #versionId} (The identifier of a specific version of a resource.). This is the underlying object with id, value and extensions. The accessor "getVersionId" gives direct access to the value
1131         */
1132        public StringType getVersionIdElement() { 
1133          if (this.versionId == null)
1134            if (Configuration.errorOnAutoCreate())
1135              throw new Error("Attempt to auto-create ExampleScenarioInstanceVersionComponent.versionId");
1136            else if (Configuration.doAutoCreate())
1137              this.versionId = new StringType(); // bb
1138          return this.versionId;
1139        }
1140
1141        public boolean hasVersionIdElement() { 
1142          return this.versionId != null && !this.versionId.isEmpty();
1143        }
1144
1145        public boolean hasVersionId() { 
1146          return this.versionId != null && !this.versionId.isEmpty();
1147        }
1148
1149        /**
1150         * @param value {@link #versionId} (The identifier of a specific version of a resource.). This is the underlying object with id, value and extensions. The accessor "getVersionId" gives direct access to the value
1151         */
1152        public ExampleScenarioInstanceVersionComponent setVersionIdElement(StringType value) { 
1153          this.versionId = value;
1154          return this;
1155        }
1156
1157        /**
1158         * @return The identifier of a specific version of a resource.
1159         */
1160        public String getVersionId() { 
1161          return this.versionId == null ? null : this.versionId.getValue();
1162        }
1163
1164        /**
1165         * @param value The identifier of a specific version of a resource.
1166         */
1167        public ExampleScenarioInstanceVersionComponent setVersionId(String value) { 
1168            if (this.versionId == null)
1169              this.versionId = new StringType();
1170            this.versionId.setValue(value);
1171          return this;
1172        }
1173
1174        /**
1175         * @return {@link #description} (The description of the resource version.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1176         */
1177        public MarkdownType getDescriptionElement() { 
1178          if (this.description == null)
1179            if (Configuration.errorOnAutoCreate())
1180              throw new Error("Attempt to auto-create ExampleScenarioInstanceVersionComponent.description");
1181            else if (Configuration.doAutoCreate())
1182              this.description = new MarkdownType(); // bb
1183          return this.description;
1184        }
1185
1186        public boolean hasDescriptionElement() { 
1187          return this.description != null && !this.description.isEmpty();
1188        }
1189
1190        public boolean hasDescription() { 
1191          return this.description != null && !this.description.isEmpty();
1192        }
1193
1194        /**
1195         * @param value {@link #description} (The description of the resource version.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1196         */
1197        public ExampleScenarioInstanceVersionComponent setDescriptionElement(MarkdownType value) { 
1198          this.description = value;
1199          return this;
1200        }
1201
1202        /**
1203         * @return The description of the resource version.
1204         */
1205        public String getDescription() { 
1206          return this.description == null ? null : this.description.getValue();
1207        }
1208
1209        /**
1210         * @param value The description of the resource version.
1211         */
1212        public ExampleScenarioInstanceVersionComponent setDescription(String value) { 
1213            if (this.description == null)
1214              this.description = new MarkdownType();
1215            this.description.setValue(value);
1216          return this;
1217        }
1218
1219        protected void listChildren(List<Property> children) {
1220          super.listChildren(children);
1221          children.add(new Property("versionId", "string", "The identifier of a specific version of a resource.", 0, 1, versionId));
1222          children.add(new Property("description", "markdown", "The description of the resource version.", 0, 1, description));
1223        }
1224
1225        @Override
1226        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1227          switch (_hash) {
1228          case -1407102957: /*versionId*/  return new Property("versionId", "string", "The identifier of a specific version of a resource.", 0, 1, versionId);
1229          case -1724546052: /*description*/  return new Property("description", "markdown", "The description of the resource version.", 0, 1, description);
1230          default: return super.getNamedProperty(_hash, _name, _checkValid);
1231          }
1232
1233        }
1234
1235      @Override
1236      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1237        switch (hash) {
1238        case -1407102957: /*versionId*/ return this.versionId == null ? new Base[0] : new Base[] {this.versionId}; // StringType
1239        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
1240        default: return super.getProperty(hash, name, checkValid);
1241        }
1242
1243      }
1244
1245      @Override
1246      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1247        switch (hash) {
1248        case -1407102957: // versionId
1249          this.versionId = TypeConvertor.castToString(value); // StringType
1250          return value;
1251        case -1724546052: // description
1252          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
1253          return value;
1254        default: return super.setProperty(hash, name, value);
1255        }
1256
1257      }
1258
1259      @Override
1260      public Base setProperty(String name, Base value) throws FHIRException {
1261        if (name.equals("versionId")) {
1262          this.versionId = TypeConvertor.castToString(value); // StringType
1263        } else if (name.equals("description")) {
1264          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
1265        } else
1266          return super.setProperty(name, value);
1267        return value;
1268      }
1269
1270      @Override
1271      public Base makeProperty(int hash, String name) throws FHIRException {
1272        switch (hash) {
1273        case -1407102957:  return getVersionIdElement();
1274        case -1724546052:  return getDescriptionElement();
1275        default: return super.makeProperty(hash, name);
1276        }
1277
1278      }
1279
1280      @Override
1281      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1282        switch (hash) {
1283        case -1407102957: /*versionId*/ return new String[] {"string"};
1284        case -1724546052: /*description*/ return new String[] {"markdown"};
1285        default: return super.getTypesForProperty(hash, name);
1286        }
1287
1288      }
1289
1290      @Override
1291      public Base addChild(String name) throws FHIRException {
1292        if (name.equals("versionId")) {
1293          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.instance.version.versionId");
1294        }
1295        else if (name.equals("description")) {
1296          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.instance.version.description");
1297        }
1298        else
1299          return super.addChild(name);
1300      }
1301
1302      public ExampleScenarioInstanceVersionComponent copy() {
1303        ExampleScenarioInstanceVersionComponent dst = new ExampleScenarioInstanceVersionComponent();
1304        copyValues(dst);
1305        return dst;
1306      }
1307
1308      public void copyValues(ExampleScenarioInstanceVersionComponent dst) {
1309        super.copyValues(dst);
1310        dst.versionId = versionId == null ? null : versionId.copy();
1311        dst.description = description == null ? null : description.copy();
1312      }
1313
1314      @Override
1315      public boolean equalsDeep(Base other_) {
1316        if (!super.equalsDeep(other_))
1317          return false;
1318        if (!(other_ instanceof ExampleScenarioInstanceVersionComponent))
1319          return false;
1320        ExampleScenarioInstanceVersionComponent o = (ExampleScenarioInstanceVersionComponent) other_;
1321        return compareDeep(versionId, o.versionId, true) && compareDeep(description, o.description, true)
1322          ;
1323      }
1324
1325      @Override
1326      public boolean equalsShallow(Base other_) {
1327        if (!super.equalsShallow(other_))
1328          return false;
1329        if (!(other_ instanceof ExampleScenarioInstanceVersionComponent))
1330          return false;
1331        ExampleScenarioInstanceVersionComponent o = (ExampleScenarioInstanceVersionComponent) other_;
1332        return compareValues(versionId, o.versionId, true) && compareValues(description, o.description, true)
1333          ;
1334      }
1335
1336      public boolean isEmpty() {
1337        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(versionId, description);
1338      }
1339
1340  public String fhirType() {
1341    return "ExampleScenario.instance.version";
1342
1343  }
1344
1345  }
1346
1347    @Block()
1348    public static class ExampleScenarioInstanceContainedInstanceComponent extends BackboneElement implements IBaseBackboneElement {
1349        /**
1350         * Each resource contained in the instance.
1351         */
1352        @Child(name = "resourceId", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1353        @Description(shortDefinition="Each resource contained in the instance", formalDefinition="Each resource contained in the instance." )
1354        protected StringType resourceId;
1355
1356        /**
1357         * A specific version of a resource contained in the instance.
1358         */
1359        @Child(name = "versionId", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
1360        @Description(shortDefinition="A specific version of a resource contained in the instance", formalDefinition="A specific version of a resource contained in the instance." )
1361        protected StringType versionId;
1362
1363        private static final long serialVersionUID = 908084124L;
1364
1365    /**
1366     * Constructor
1367     */
1368      public ExampleScenarioInstanceContainedInstanceComponent() {
1369        super();
1370      }
1371
1372    /**
1373     * Constructor
1374     */
1375      public ExampleScenarioInstanceContainedInstanceComponent(String resourceId) {
1376        super();
1377        this.setResourceId(resourceId);
1378      }
1379
1380        /**
1381         * @return {@link #resourceId} (Each resource contained in the instance.). This is the underlying object with id, value and extensions. The accessor "getResourceId" gives direct access to the value
1382         */
1383        public StringType getResourceIdElement() { 
1384          if (this.resourceId == null)
1385            if (Configuration.errorOnAutoCreate())
1386              throw new Error("Attempt to auto-create ExampleScenarioInstanceContainedInstanceComponent.resourceId");
1387            else if (Configuration.doAutoCreate())
1388              this.resourceId = new StringType(); // bb
1389          return this.resourceId;
1390        }
1391
1392        public boolean hasResourceIdElement() { 
1393          return this.resourceId != null && !this.resourceId.isEmpty();
1394        }
1395
1396        public boolean hasResourceId() { 
1397          return this.resourceId != null && !this.resourceId.isEmpty();
1398        }
1399
1400        /**
1401         * @param value {@link #resourceId} (Each resource contained in the instance.). This is the underlying object with id, value and extensions. The accessor "getResourceId" gives direct access to the value
1402         */
1403        public ExampleScenarioInstanceContainedInstanceComponent setResourceIdElement(StringType value) { 
1404          this.resourceId = value;
1405          return this;
1406        }
1407
1408        /**
1409         * @return Each resource contained in the instance.
1410         */
1411        public String getResourceId() { 
1412          return this.resourceId == null ? null : this.resourceId.getValue();
1413        }
1414
1415        /**
1416         * @param value Each resource contained in the instance.
1417         */
1418        public ExampleScenarioInstanceContainedInstanceComponent setResourceId(String value) { 
1419            if (this.resourceId == null)
1420              this.resourceId = new StringType();
1421            this.resourceId.setValue(value);
1422          return this;
1423        }
1424
1425        /**
1426         * @return {@link #versionId} (A specific version of a resource contained in the instance.). This is the underlying object with id, value and extensions. The accessor "getVersionId" gives direct access to the value
1427         */
1428        public StringType getVersionIdElement() { 
1429          if (this.versionId == null)
1430            if (Configuration.errorOnAutoCreate())
1431              throw new Error("Attempt to auto-create ExampleScenarioInstanceContainedInstanceComponent.versionId");
1432            else if (Configuration.doAutoCreate())
1433              this.versionId = new StringType(); // bb
1434          return this.versionId;
1435        }
1436
1437        public boolean hasVersionIdElement() { 
1438          return this.versionId != null && !this.versionId.isEmpty();
1439        }
1440
1441        public boolean hasVersionId() { 
1442          return this.versionId != null && !this.versionId.isEmpty();
1443        }
1444
1445        /**
1446         * @param value {@link #versionId} (A specific version of a resource contained in the instance.). This is the underlying object with id, value and extensions. The accessor "getVersionId" gives direct access to the value
1447         */
1448        public ExampleScenarioInstanceContainedInstanceComponent setVersionIdElement(StringType value) { 
1449          this.versionId = value;
1450          return this;
1451        }
1452
1453        /**
1454         * @return A specific version of a resource contained in the instance.
1455         */
1456        public String getVersionId() { 
1457          return this.versionId == null ? null : this.versionId.getValue();
1458        }
1459
1460        /**
1461         * @param value A specific version of a resource contained in the instance.
1462         */
1463        public ExampleScenarioInstanceContainedInstanceComponent setVersionId(String value) { 
1464          if (Utilities.noString(value))
1465            this.versionId = null;
1466          else {
1467            if (this.versionId == null)
1468              this.versionId = new StringType();
1469            this.versionId.setValue(value);
1470          }
1471          return this;
1472        }
1473
1474        protected void listChildren(List<Property> children) {
1475          super.listChildren(children);
1476          children.add(new Property("resourceId", "string", "Each resource contained in the instance.", 0, 1, resourceId));
1477          children.add(new Property("versionId", "string", "A specific version of a resource contained in the instance.", 0, 1, versionId));
1478        }
1479
1480        @Override
1481        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1482          switch (_hash) {
1483          case -1345650231: /*resourceId*/  return new Property("resourceId", "string", "Each resource contained in the instance.", 0, 1, resourceId);
1484          case -1407102957: /*versionId*/  return new Property("versionId", "string", "A specific version of a resource contained in the instance.", 0, 1, versionId);
1485          default: return super.getNamedProperty(_hash, _name, _checkValid);
1486          }
1487
1488        }
1489
1490      @Override
1491      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1492        switch (hash) {
1493        case -1345650231: /*resourceId*/ return this.resourceId == null ? new Base[0] : new Base[] {this.resourceId}; // StringType
1494        case -1407102957: /*versionId*/ return this.versionId == null ? new Base[0] : new Base[] {this.versionId}; // StringType
1495        default: return super.getProperty(hash, name, checkValid);
1496        }
1497
1498      }
1499
1500      @Override
1501      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1502        switch (hash) {
1503        case -1345650231: // resourceId
1504          this.resourceId = TypeConvertor.castToString(value); // StringType
1505          return value;
1506        case -1407102957: // versionId
1507          this.versionId = TypeConvertor.castToString(value); // StringType
1508          return value;
1509        default: return super.setProperty(hash, name, value);
1510        }
1511
1512      }
1513
1514      @Override
1515      public Base setProperty(String name, Base value) throws FHIRException {
1516        if (name.equals("resourceId")) {
1517          this.resourceId = TypeConvertor.castToString(value); // StringType
1518        } else if (name.equals("versionId")) {
1519          this.versionId = TypeConvertor.castToString(value); // StringType
1520        } else
1521          return super.setProperty(name, value);
1522        return value;
1523      }
1524
1525      @Override
1526      public Base makeProperty(int hash, String name) throws FHIRException {
1527        switch (hash) {
1528        case -1345650231:  return getResourceIdElement();
1529        case -1407102957:  return getVersionIdElement();
1530        default: return super.makeProperty(hash, name);
1531        }
1532
1533      }
1534
1535      @Override
1536      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1537        switch (hash) {
1538        case -1345650231: /*resourceId*/ return new String[] {"string"};
1539        case -1407102957: /*versionId*/ return new String[] {"string"};
1540        default: return super.getTypesForProperty(hash, name);
1541        }
1542
1543      }
1544
1545      @Override
1546      public Base addChild(String name) throws FHIRException {
1547        if (name.equals("resourceId")) {
1548          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.instance.containedInstance.resourceId");
1549        }
1550        else if (name.equals("versionId")) {
1551          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.instance.containedInstance.versionId");
1552        }
1553        else
1554          return super.addChild(name);
1555      }
1556
1557      public ExampleScenarioInstanceContainedInstanceComponent copy() {
1558        ExampleScenarioInstanceContainedInstanceComponent dst = new ExampleScenarioInstanceContainedInstanceComponent();
1559        copyValues(dst);
1560        return dst;
1561      }
1562
1563      public void copyValues(ExampleScenarioInstanceContainedInstanceComponent dst) {
1564        super.copyValues(dst);
1565        dst.resourceId = resourceId == null ? null : resourceId.copy();
1566        dst.versionId = versionId == null ? null : versionId.copy();
1567      }
1568
1569      @Override
1570      public boolean equalsDeep(Base other_) {
1571        if (!super.equalsDeep(other_))
1572          return false;
1573        if (!(other_ instanceof ExampleScenarioInstanceContainedInstanceComponent))
1574          return false;
1575        ExampleScenarioInstanceContainedInstanceComponent o = (ExampleScenarioInstanceContainedInstanceComponent) other_;
1576        return compareDeep(resourceId, o.resourceId, true) && compareDeep(versionId, o.versionId, true)
1577          ;
1578      }
1579
1580      @Override
1581      public boolean equalsShallow(Base other_) {
1582        if (!super.equalsShallow(other_))
1583          return false;
1584        if (!(other_ instanceof ExampleScenarioInstanceContainedInstanceComponent))
1585          return false;
1586        ExampleScenarioInstanceContainedInstanceComponent o = (ExampleScenarioInstanceContainedInstanceComponent) other_;
1587        return compareValues(resourceId, o.resourceId, true) && compareValues(versionId, o.versionId, true)
1588          ;
1589      }
1590
1591      public boolean isEmpty() {
1592        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(resourceId, versionId);
1593      }
1594
1595  public String fhirType() {
1596    return "ExampleScenario.instance.containedInstance";
1597
1598  }
1599
1600  }
1601
1602    @Block()
1603    public static class ExampleScenarioProcessComponent extends BackboneElement implements IBaseBackboneElement {
1604        /**
1605         * The diagram title of the group of operations.
1606         */
1607        @Child(name = "title", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true)
1608        @Description(shortDefinition="The diagram title of the group of operations", formalDefinition="The diagram title of the group of operations." )
1609        protected StringType title;
1610
1611        /**
1612         * A longer description of the group of operations.
1613         */
1614        @Child(name = "description", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false)
1615        @Description(shortDefinition="A longer description of the group of operations", formalDefinition="A longer description of the group of operations." )
1616        protected MarkdownType description;
1617
1618        /**
1619         * Description of initial status before the process starts.
1620         */
1621        @Child(name = "preConditions", type = {MarkdownType.class}, order=3, min=0, max=1, modifier=false, summary=false)
1622        @Description(shortDefinition="Description of initial status before the process starts", formalDefinition="Description of initial status before the process starts." )
1623        protected MarkdownType preConditions;
1624
1625        /**
1626         * Description of final status after the process ends.
1627         */
1628        @Child(name = "postConditions", type = {MarkdownType.class}, order=4, min=0, max=1, modifier=false, summary=false)
1629        @Description(shortDefinition="Description of final status after the process ends", formalDefinition="Description of final status after the process ends." )
1630        protected MarkdownType postConditions;
1631
1632        /**
1633         * Each step of the process.
1634         */
1635        @Child(name = "step", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1636        @Description(shortDefinition="Each step of the process", formalDefinition="Each step of the process." )
1637        protected List<ExampleScenarioProcessStepComponent> step;
1638
1639        private static final long serialVersionUID = 325578043L;
1640
1641    /**
1642     * Constructor
1643     */
1644      public ExampleScenarioProcessComponent() {
1645        super();
1646      }
1647
1648    /**
1649     * Constructor
1650     */
1651      public ExampleScenarioProcessComponent(String title) {
1652        super();
1653        this.setTitle(title);
1654      }
1655
1656        /**
1657         * @return {@link #title} (The diagram title of the group of operations.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
1658         */
1659        public StringType getTitleElement() { 
1660          if (this.title == null)
1661            if (Configuration.errorOnAutoCreate())
1662              throw new Error("Attempt to auto-create ExampleScenarioProcessComponent.title");
1663            else if (Configuration.doAutoCreate())
1664              this.title = new StringType(); // bb
1665          return this.title;
1666        }
1667
1668        public boolean hasTitleElement() { 
1669          return this.title != null && !this.title.isEmpty();
1670        }
1671
1672        public boolean hasTitle() { 
1673          return this.title != null && !this.title.isEmpty();
1674        }
1675
1676        /**
1677         * @param value {@link #title} (The diagram title of the group of operations.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
1678         */
1679        public ExampleScenarioProcessComponent setTitleElement(StringType value) { 
1680          this.title = value;
1681          return this;
1682        }
1683
1684        /**
1685         * @return The diagram title of the group of operations.
1686         */
1687        public String getTitle() { 
1688          return this.title == null ? null : this.title.getValue();
1689        }
1690
1691        /**
1692         * @param value The diagram title of the group of operations.
1693         */
1694        public ExampleScenarioProcessComponent setTitle(String value) { 
1695            if (this.title == null)
1696              this.title = new StringType();
1697            this.title.setValue(value);
1698          return this;
1699        }
1700
1701        /**
1702         * @return {@link #description} (A longer description of the group of operations.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1703         */
1704        public MarkdownType getDescriptionElement() { 
1705          if (this.description == null)
1706            if (Configuration.errorOnAutoCreate())
1707              throw new Error("Attempt to auto-create ExampleScenarioProcessComponent.description");
1708            else if (Configuration.doAutoCreate())
1709              this.description = new MarkdownType(); // bb
1710          return this.description;
1711        }
1712
1713        public boolean hasDescriptionElement() { 
1714          return this.description != null && !this.description.isEmpty();
1715        }
1716
1717        public boolean hasDescription() { 
1718          return this.description != null && !this.description.isEmpty();
1719        }
1720
1721        /**
1722         * @param value {@link #description} (A longer description of the group of operations.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
1723         */
1724        public ExampleScenarioProcessComponent setDescriptionElement(MarkdownType value) { 
1725          this.description = value;
1726          return this;
1727        }
1728
1729        /**
1730         * @return A longer description of the group of operations.
1731         */
1732        public String getDescription() { 
1733          return this.description == null ? null : this.description.getValue();
1734        }
1735
1736        /**
1737         * @param value A longer description of the group of operations.
1738         */
1739        public ExampleScenarioProcessComponent setDescription(String value) { 
1740          if (value == null)
1741            this.description = null;
1742          else {
1743            if (this.description == null)
1744              this.description = new MarkdownType();
1745            this.description.setValue(value);
1746          }
1747          return this;
1748        }
1749
1750        /**
1751         * @return {@link #preConditions} (Description of initial status before the process starts.). This is the underlying object with id, value and extensions. The accessor "getPreConditions" gives direct access to the value
1752         */
1753        public MarkdownType getPreConditionsElement() { 
1754          if (this.preConditions == null)
1755            if (Configuration.errorOnAutoCreate())
1756              throw new Error("Attempt to auto-create ExampleScenarioProcessComponent.preConditions");
1757            else if (Configuration.doAutoCreate())
1758              this.preConditions = new MarkdownType(); // bb
1759          return this.preConditions;
1760        }
1761
1762        public boolean hasPreConditionsElement() { 
1763          return this.preConditions != null && !this.preConditions.isEmpty();
1764        }
1765
1766        public boolean hasPreConditions() { 
1767          return this.preConditions != null && !this.preConditions.isEmpty();
1768        }
1769
1770        /**
1771         * @param value {@link #preConditions} (Description of initial status before the process starts.). This is the underlying object with id, value and extensions. The accessor "getPreConditions" gives direct access to the value
1772         */
1773        public ExampleScenarioProcessComponent setPreConditionsElement(MarkdownType value) { 
1774          this.preConditions = value;
1775          return this;
1776        }
1777
1778        /**
1779         * @return Description of initial status before the process starts.
1780         */
1781        public String getPreConditions() { 
1782          return this.preConditions == null ? null : this.preConditions.getValue();
1783        }
1784
1785        /**
1786         * @param value Description of initial status before the process starts.
1787         */
1788        public ExampleScenarioProcessComponent setPreConditions(String value) { 
1789          if (value == null)
1790            this.preConditions = null;
1791          else {
1792            if (this.preConditions == null)
1793              this.preConditions = new MarkdownType();
1794            this.preConditions.setValue(value);
1795          }
1796          return this;
1797        }
1798
1799        /**
1800         * @return {@link #postConditions} (Description of final status after the process ends.). This is the underlying object with id, value and extensions. The accessor "getPostConditions" gives direct access to the value
1801         */
1802        public MarkdownType getPostConditionsElement() { 
1803          if (this.postConditions == null)
1804            if (Configuration.errorOnAutoCreate())
1805              throw new Error("Attempt to auto-create ExampleScenarioProcessComponent.postConditions");
1806            else if (Configuration.doAutoCreate())
1807              this.postConditions = new MarkdownType(); // bb
1808          return this.postConditions;
1809        }
1810
1811        public boolean hasPostConditionsElement() { 
1812          return this.postConditions != null && !this.postConditions.isEmpty();
1813        }
1814
1815        public boolean hasPostConditions() { 
1816          return this.postConditions != null && !this.postConditions.isEmpty();
1817        }
1818
1819        /**
1820         * @param value {@link #postConditions} (Description of final status after the process ends.). This is the underlying object with id, value and extensions. The accessor "getPostConditions" gives direct access to the value
1821         */
1822        public ExampleScenarioProcessComponent setPostConditionsElement(MarkdownType value) { 
1823          this.postConditions = value;
1824          return this;
1825        }
1826
1827        /**
1828         * @return Description of final status after the process ends.
1829         */
1830        public String getPostConditions() { 
1831          return this.postConditions == null ? null : this.postConditions.getValue();
1832        }
1833
1834        /**
1835         * @param value Description of final status after the process ends.
1836         */
1837        public ExampleScenarioProcessComponent setPostConditions(String value) { 
1838          if (value == null)
1839            this.postConditions = null;
1840          else {
1841            if (this.postConditions == null)
1842              this.postConditions = new MarkdownType();
1843            this.postConditions.setValue(value);
1844          }
1845          return this;
1846        }
1847
1848        /**
1849         * @return {@link #step} (Each step of the process.)
1850         */
1851        public List<ExampleScenarioProcessStepComponent> getStep() { 
1852          if (this.step == null)
1853            this.step = new ArrayList<ExampleScenarioProcessStepComponent>();
1854          return this.step;
1855        }
1856
1857        /**
1858         * @return Returns a reference to <code>this</code> for easy method chaining
1859         */
1860        public ExampleScenarioProcessComponent setStep(List<ExampleScenarioProcessStepComponent> theStep) { 
1861          this.step = theStep;
1862          return this;
1863        }
1864
1865        public boolean hasStep() { 
1866          if (this.step == null)
1867            return false;
1868          for (ExampleScenarioProcessStepComponent item : this.step)
1869            if (!item.isEmpty())
1870              return true;
1871          return false;
1872        }
1873
1874        public ExampleScenarioProcessStepComponent addStep() { //3
1875          ExampleScenarioProcessStepComponent t = new ExampleScenarioProcessStepComponent();
1876          if (this.step == null)
1877            this.step = new ArrayList<ExampleScenarioProcessStepComponent>();
1878          this.step.add(t);
1879          return t;
1880        }
1881
1882        public ExampleScenarioProcessComponent addStep(ExampleScenarioProcessStepComponent t) { //3
1883          if (t == null)
1884            return this;
1885          if (this.step == null)
1886            this.step = new ArrayList<ExampleScenarioProcessStepComponent>();
1887          this.step.add(t);
1888          return this;
1889        }
1890
1891        /**
1892         * @return The first repetition of repeating field {@link #step}, creating it if it does not already exist {3}
1893         */
1894        public ExampleScenarioProcessStepComponent getStepFirstRep() { 
1895          if (getStep().isEmpty()) {
1896            addStep();
1897          }
1898          return getStep().get(0);
1899        }
1900
1901        protected void listChildren(List<Property> children) {
1902          super.listChildren(children);
1903          children.add(new Property("title", "string", "The diagram title of the group of operations.", 0, 1, title));
1904          children.add(new Property("description", "markdown", "A longer description of the group of operations.", 0, 1, description));
1905          children.add(new Property("preConditions", "markdown", "Description of initial status before the process starts.", 0, 1, preConditions));
1906          children.add(new Property("postConditions", "markdown", "Description of final status after the process ends.", 0, 1, postConditions));
1907          children.add(new Property("step", "", "Each step of the process.", 0, java.lang.Integer.MAX_VALUE, step));
1908        }
1909
1910        @Override
1911        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1912          switch (_hash) {
1913          case 110371416: /*title*/  return new Property("title", "string", "The diagram title of the group of operations.", 0, 1, title);
1914          case -1724546052: /*description*/  return new Property("description", "markdown", "A longer description of the group of operations.", 0, 1, description);
1915          case -1006692933: /*preConditions*/  return new Property("preConditions", "markdown", "Description of initial status before the process starts.", 0, 1, preConditions);
1916          case 1738302328: /*postConditions*/  return new Property("postConditions", "markdown", "Description of final status after the process ends.", 0, 1, postConditions);
1917          case 3540684: /*step*/  return new Property("step", "", "Each step of the process.", 0, java.lang.Integer.MAX_VALUE, step);
1918          default: return super.getNamedProperty(_hash, _name, _checkValid);
1919          }
1920
1921        }
1922
1923      @Override
1924      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1925        switch (hash) {
1926        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
1927        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
1928        case -1006692933: /*preConditions*/ return this.preConditions == null ? new Base[0] : new Base[] {this.preConditions}; // MarkdownType
1929        case 1738302328: /*postConditions*/ return this.postConditions == null ? new Base[0] : new Base[] {this.postConditions}; // MarkdownType
1930        case 3540684: /*step*/ return this.step == null ? new Base[0] : this.step.toArray(new Base[this.step.size()]); // ExampleScenarioProcessStepComponent
1931        default: return super.getProperty(hash, name, checkValid);
1932        }
1933
1934      }
1935
1936      @Override
1937      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1938        switch (hash) {
1939        case 110371416: // title
1940          this.title = TypeConvertor.castToString(value); // StringType
1941          return value;
1942        case -1724546052: // description
1943          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
1944          return value;
1945        case -1006692933: // preConditions
1946          this.preConditions = TypeConvertor.castToMarkdown(value); // MarkdownType
1947          return value;
1948        case 1738302328: // postConditions
1949          this.postConditions = TypeConvertor.castToMarkdown(value); // MarkdownType
1950          return value;
1951        case 3540684: // step
1952          this.getStep().add((ExampleScenarioProcessStepComponent) value); // ExampleScenarioProcessStepComponent
1953          return value;
1954        default: return super.setProperty(hash, name, value);
1955        }
1956
1957      }
1958
1959      @Override
1960      public Base setProperty(String name, Base value) throws FHIRException {
1961        if (name.equals("title")) {
1962          this.title = TypeConvertor.castToString(value); // StringType
1963        } else if (name.equals("description")) {
1964          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
1965        } else if (name.equals("preConditions")) {
1966          this.preConditions = TypeConvertor.castToMarkdown(value); // MarkdownType
1967        } else if (name.equals("postConditions")) {
1968          this.postConditions = TypeConvertor.castToMarkdown(value); // MarkdownType
1969        } else if (name.equals("step")) {
1970          this.getStep().add((ExampleScenarioProcessStepComponent) value);
1971        } else
1972          return super.setProperty(name, value);
1973        return value;
1974      }
1975
1976      @Override
1977      public Base makeProperty(int hash, String name) throws FHIRException {
1978        switch (hash) {
1979        case 110371416:  return getTitleElement();
1980        case -1724546052:  return getDescriptionElement();
1981        case -1006692933:  return getPreConditionsElement();
1982        case 1738302328:  return getPostConditionsElement();
1983        case 3540684:  return addStep(); 
1984        default: return super.makeProperty(hash, name);
1985        }
1986
1987      }
1988
1989      @Override
1990      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1991        switch (hash) {
1992        case 110371416: /*title*/ return new String[] {"string"};
1993        case -1724546052: /*description*/ return new String[] {"markdown"};
1994        case -1006692933: /*preConditions*/ return new String[] {"markdown"};
1995        case 1738302328: /*postConditions*/ return new String[] {"markdown"};
1996        case 3540684: /*step*/ return new String[] {};
1997        default: return super.getTypesForProperty(hash, name);
1998        }
1999
2000      }
2001
2002      @Override
2003      public Base addChild(String name) throws FHIRException {
2004        if (name.equals("title")) {
2005          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.process.title");
2006        }
2007        else if (name.equals("description")) {
2008          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.process.description");
2009        }
2010        else if (name.equals("preConditions")) {
2011          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.process.preConditions");
2012        }
2013        else if (name.equals("postConditions")) {
2014          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.process.postConditions");
2015        }
2016        else if (name.equals("step")) {
2017          return addStep();
2018        }
2019        else
2020          return super.addChild(name);
2021      }
2022
2023      public ExampleScenarioProcessComponent copy() {
2024        ExampleScenarioProcessComponent dst = new ExampleScenarioProcessComponent();
2025        copyValues(dst);
2026        return dst;
2027      }
2028
2029      public void copyValues(ExampleScenarioProcessComponent dst) {
2030        super.copyValues(dst);
2031        dst.title = title == null ? null : title.copy();
2032        dst.description = description == null ? null : description.copy();
2033        dst.preConditions = preConditions == null ? null : preConditions.copy();
2034        dst.postConditions = postConditions == null ? null : postConditions.copy();
2035        if (step != null) {
2036          dst.step = new ArrayList<ExampleScenarioProcessStepComponent>();
2037          for (ExampleScenarioProcessStepComponent i : step)
2038            dst.step.add(i.copy());
2039        };
2040      }
2041
2042      @Override
2043      public boolean equalsDeep(Base other_) {
2044        if (!super.equalsDeep(other_))
2045          return false;
2046        if (!(other_ instanceof ExampleScenarioProcessComponent))
2047          return false;
2048        ExampleScenarioProcessComponent o = (ExampleScenarioProcessComponent) other_;
2049        return compareDeep(title, o.title, true) && compareDeep(description, o.description, true) && compareDeep(preConditions, o.preConditions, true)
2050           && compareDeep(postConditions, o.postConditions, true) && compareDeep(step, o.step, true);
2051      }
2052
2053      @Override
2054      public boolean equalsShallow(Base other_) {
2055        if (!super.equalsShallow(other_))
2056          return false;
2057        if (!(other_ instanceof ExampleScenarioProcessComponent))
2058          return false;
2059        ExampleScenarioProcessComponent o = (ExampleScenarioProcessComponent) other_;
2060        return compareValues(title, o.title, true) && compareValues(description, o.description, true) && compareValues(preConditions, o.preConditions, true)
2061           && compareValues(postConditions, o.postConditions, true);
2062      }
2063
2064      public boolean isEmpty() {
2065        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(title, description, preConditions
2066          , postConditions, step);
2067      }
2068
2069  public String fhirType() {
2070    return "ExampleScenario.process";
2071
2072  }
2073
2074  }
2075
2076    @Block()
2077    public static class ExampleScenarioProcessStepComponent extends BackboneElement implements IBaseBackboneElement {
2078        /**
2079         * Nested process.
2080         */
2081        @Child(name = "process", type = {ExampleScenarioProcessComponent.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2082        @Description(shortDefinition="Nested process", formalDefinition="Nested process." )
2083        protected List<ExampleScenarioProcessComponent> process;
2084
2085        /**
2086         * If there is a pause in the flow.
2087         */
2088        @Child(name = "pause", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false)
2089        @Description(shortDefinition="If there is a pause in the flow", formalDefinition="If there is a pause in the flow." )
2090        protected BooleanType pause;
2091
2092        /**
2093         * Each interaction or action.
2094         */
2095        @Child(name = "operation", type = {}, order=3, min=0, max=1, modifier=false, summary=false)
2096        @Description(shortDefinition="Each interaction or action", formalDefinition="Each interaction or action." )
2097        protected ExampleScenarioProcessStepOperationComponent operation;
2098
2099        /**
2100         * Indicates an alternative step that can be taken instead of the operations on the base step in exceptional/atypical circumstances.
2101         */
2102        @Child(name = "alternative", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2103        @Description(shortDefinition="Alternate non-typical step action", formalDefinition="Indicates an alternative step that can be taken instead of the operations on the base step in exceptional/atypical circumstances." )
2104        protected List<ExampleScenarioProcessStepAlternativeComponent> alternative;
2105
2106        private static final long serialVersionUID = -894029605L;
2107
2108    /**
2109     * Constructor
2110     */
2111      public ExampleScenarioProcessStepComponent() {
2112        super();
2113      }
2114
2115        /**
2116         * @return {@link #process} (Nested process.)
2117         */
2118        public List<ExampleScenarioProcessComponent> getProcess() { 
2119          if (this.process == null)
2120            this.process = new ArrayList<ExampleScenarioProcessComponent>();
2121          return this.process;
2122        }
2123
2124        /**
2125         * @return Returns a reference to <code>this</code> for easy method chaining
2126         */
2127        public ExampleScenarioProcessStepComponent setProcess(List<ExampleScenarioProcessComponent> theProcess) { 
2128          this.process = theProcess;
2129          return this;
2130        }
2131
2132        public boolean hasProcess() { 
2133          if (this.process == null)
2134            return false;
2135          for (ExampleScenarioProcessComponent item : this.process)
2136            if (!item.isEmpty())
2137              return true;
2138          return false;
2139        }
2140
2141        public ExampleScenarioProcessComponent addProcess() { //3
2142          ExampleScenarioProcessComponent t = new ExampleScenarioProcessComponent();
2143          if (this.process == null)
2144            this.process = new ArrayList<ExampleScenarioProcessComponent>();
2145          this.process.add(t);
2146          return t;
2147        }
2148
2149        public ExampleScenarioProcessStepComponent addProcess(ExampleScenarioProcessComponent t) { //3
2150          if (t == null)
2151            return this;
2152          if (this.process == null)
2153            this.process = new ArrayList<ExampleScenarioProcessComponent>();
2154          this.process.add(t);
2155          return this;
2156        }
2157
2158        /**
2159         * @return The first repetition of repeating field {@link #process}, creating it if it does not already exist {3}
2160         */
2161        public ExampleScenarioProcessComponent getProcessFirstRep() { 
2162          if (getProcess().isEmpty()) {
2163            addProcess();
2164          }
2165          return getProcess().get(0);
2166        }
2167
2168        /**
2169         * @return {@link #pause} (If there is a pause in the flow.). This is the underlying object with id, value and extensions. The accessor "getPause" gives direct access to the value
2170         */
2171        public BooleanType getPauseElement() { 
2172          if (this.pause == null)
2173            if (Configuration.errorOnAutoCreate())
2174              throw new Error("Attempt to auto-create ExampleScenarioProcessStepComponent.pause");
2175            else if (Configuration.doAutoCreate())
2176              this.pause = new BooleanType(); // bb
2177          return this.pause;
2178        }
2179
2180        public boolean hasPauseElement() { 
2181          return this.pause != null && !this.pause.isEmpty();
2182        }
2183
2184        public boolean hasPause() { 
2185          return this.pause != null && !this.pause.isEmpty();
2186        }
2187
2188        /**
2189         * @param value {@link #pause} (If there is a pause in the flow.). This is the underlying object with id, value and extensions. The accessor "getPause" gives direct access to the value
2190         */
2191        public ExampleScenarioProcessStepComponent setPauseElement(BooleanType value) { 
2192          this.pause = value;
2193          return this;
2194        }
2195
2196        /**
2197         * @return If there is a pause in the flow.
2198         */
2199        public boolean getPause() { 
2200          return this.pause == null || this.pause.isEmpty() ? false : this.pause.getValue();
2201        }
2202
2203        /**
2204         * @param value If there is a pause in the flow.
2205         */
2206        public ExampleScenarioProcessStepComponent setPause(boolean value) { 
2207            if (this.pause == null)
2208              this.pause = new BooleanType();
2209            this.pause.setValue(value);
2210          return this;
2211        }
2212
2213        /**
2214         * @return {@link #operation} (Each interaction or action.)
2215         */
2216        public ExampleScenarioProcessStepOperationComponent getOperation() { 
2217          if (this.operation == null)
2218            if (Configuration.errorOnAutoCreate())
2219              throw new Error("Attempt to auto-create ExampleScenarioProcessStepComponent.operation");
2220            else if (Configuration.doAutoCreate())
2221              this.operation = new ExampleScenarioProcessStepOperationComponent(); // cc
2222          return this.operation;
2223        }
2224
2225        public boolean hasOperation() { 
2226          return this.operation != null && !this.operation.isEmpty();
2227        }
2228
2229        /**
2230         * @param value {@link #operation} (Each interaction or action.)
2231         */
2232        public ExampleScenarioProcessStepComponent setOperation(ExampleScenarioProcessStepOperationComponent value) { 
2233          this.operation = value;
2234          return this;
2235        }
2236
2237        /**
2238         * @return {@link #alternative} (Indicates an alternative step that can be taken instead of the operations on the base step in exceptional/atypical circumstances.)
2239         */
2240        public List<ExampleScenarioProcessStepAlternativeComponent> getAlternative() { 
2241          if (this.alternative == null)
2242            this.alternative = new ArrayList<ExampleScenarioProcessStepAlternativeComponent>();
2243          return this.alternative;
2244        }
2245
2246        /**
2247         * @return Returns a reference to <code>this</code> for easy method chaining
2248         */
2249        public ExampleScenarioProcessStepComponent setAlternative(List<ExampleScenarioProcessStepAlternativeComponent> theAlternative) { 
2250          this.alternative = theAlternative;
2251          return this;
2252        }
2253
2254        public boolean hasAlternative() { 
2255          if (this.alternative == null)
2256            return false;
2257          for (ExampleScenarioProcessStepAlternativeComponent item : this.alternative)
2258            if (!item.isEmpty())
2259              return true;
2260          return false;
2261        }
2262
2263        public ExampleScenarioProcessStepAlternativeComponent addAlternative() { //3
2264          ExampleScenarioProcessStepAlternativeComponent t = new ExampleScenarioProcessStepAlternativeComponent();
2265          if (this.alternative == null)
2266            this.alternative = new ArrayList<ExampleScenarioProcessStepAlternativeComponent>();
2267          this.alternative.add(t);
2268          return t;
2269        }
2270
2271        public ExampleScenarioProcessStepComponent addAlternative(ExampleScenarioProcessStepAlternativeComponent t) { //3
2272          if (t == null)
2273            return this;
2274          if (this.alternative == null)
2275            this.alternative = new ArrayList<ExampleScenarioProcessStepAlternativeComponent>();
2276          this.alternative.add(t);
2277          return this;
2278        }
2279
2280        /**
2281         * @return The first repetition of repeating field {@link #alternative}, creating it if it does not already exist {3}
2282         */
2283        public ExampleScenarioProcessStepAlternativeComponent getAlternativeFirstRep() { 
2284          if (getAlternative().isEmpty()) {
2285            addAlternative();
2286          }
2287          return getAlternative().get(0);
2288        }
2289
2290        protected void listChildren(List<Property> children) {
2291          super.listChildren(children);
2292          children.add(new Property("process", "@ExampleScenario.process", "Nested process.", 0, java.lang.Integer.MAX_VALUE, process));
2293          children.add(new Property("pause", "boolean", "If there is a pause in the flow.", 0, 1, pause));
2294          children.add(new Property("operation", "", "Each interaction or action.", 0, 1, operation));
2295          children.add(new Property("alternative", "", "Indicates an alternative step that can be taken instead of the operations on the base step in exceptional/atypical circumstances.", 0, java.lang.Integer.MAX_VALUE, alternative));
2296        }
2297
2298        @Override
2299        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2300          switch (_hash) {
2301          case -309518737: /*process*/  return new Property("process", "@ExampleScenario.process", "Nested process.", 0, java.lang.Integer.MAX_VALUE, process);
2302          case 106440182: /*pause*/  return new Property("pause", "boolean", "If there is a pause in the flow.", 0, 1, pause);
2303          case 1662702951: /*operation*/  return new Property("operation", "", "Each interaction or action.", 0, 1, operation);
2304          case -196794451: /*alternative*/  return new Property("alternative", "", "Indicates an alternative step that can be taken instead of the operations on the base step in exceptional/atypical circumstances.", 0, java.lang.Integer.MAX_VALUE, alternative);
2305          default: return super.getNamedProperty(_hash, _name, _checkValid);
2306          }
2307
2308        }
2309
2310      @Override
2311      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2312        switch (hash) {
2313        case -309518737: /*process*/ return this.process == null ? new Base[0] : this.process.toArray(new Base[this.process.size()]); // ExampleScenarioProcessComponent
2314        case 106440182: /*pause*/ return this.pause == null ? new Base[0] : new Base[] {this.pause}; // BooleanType
2315        case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // ExampleScenarioProcessStepOperationComponent
2316        case -196794451: /*alternative*/ return this.alternative == null ? new Base[0] : this.alternative.toArray(new Base[this.alternative.size()]); // ExampleScenarioProcessStepAlternativeComponent
2317        default: return super.getProperty(hash, name, checkValid);
2318        }
2319
2320      }
2321
2322      @Override
2323      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2324        switch (hash) {
2325        case -309518737: // process
2326          this.getProcess().add((ExampleScenarioProcessComponent) value); // ExampleScenarioProcessComponent
2327          return value;
2328        case 106440182: // pause
2329          this.pause = TypeConvertor.castToBoolean(value); // BooleanType
2330          return value;
2331        case 1662702951: // operation
2332          this.operation = (ExampleScenarioProcessStepOperationComponent) value; // ExampleScenarioProcessStepOperationComponent
2333          return value;
2334        case -196794451: // alternative
2335          this.getAlternative().add((ExampleScenarioProcessStepAlternativeComponent) value); // ExampleScenarioProcessStepAlternativeComponent
2336          return value;
2337        default: return super.setProperty(hash, name, value);
2338        }
2339
2340      }
2341
2342      @Override
2343      public Base setProperty(String name, Base value) throws FHIRException {
2344        if (name.equals("process")) {
2345          this.getProcess().add((ExampleScenarioProcessComponent) value);
2346        } else if (name.equals("pause")) {
2347          this.pause = TypeConvertor.castToBoolean(value); // BooleanType
2348        } else if (name.equals("operation")) {
2349          this.operation = (ExampleScenarioProcessStepOperationComponent) value; // ExampleScenarioProcessStepOperationComponent
2350        } else if (name.equals("alternative")) {
2351          this.getAlternative().add((ExampleScenarioProcessStepAlternativeComponent) value);
2352        } else
2353          return super.setProperty(name, value);
2354        return value;
2355      }
2356
2357      @Override
2358      public Base makeProperty(int hash, String name) throws FHIRException {
2359        switch (hash) {
2360        case -309518737:  return addProcess(); 
2361        case 106440182:  return getPauseElement();
2362        case 1662702951:  return getOperation();
2363        case -196794451:  return addAlternative(); 
2364        default: return super.makeProperty(hash, name);
2365        }
2366
2367      }
2368
2369      @Override
2370      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2371        switch (hash) {
2372        case -309518737: /*process*/ return new String[] {"@ExampleScenario.process"};
2373        case 106440182: /*pause*/ return new String[] {"boolean"};
2374        case 1662702951: /*operation*/ return new String[] {};
2375        case -196794451: /*alternative*/ return new String[] {};
2376        default: return super.getTypesForProperty(hash, name);
2377        }
2378
2379      }
2380
2381      @Override
2382      public Base addChild(String name) throws FHIRException {
2383        if (name.equals("process")) {
2384          return addProcess();
2385        }
2386        else if (name.equals("pause")) {
2387          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.process.step.pause");
2388        }
2389        else if (name.equals("operation")) {
2390          this.operation = new ExampleScenarioProcessStepOperationComponent();
2391          return this.operation;
2392        }
2393        else if (name.equals("alternative")) {
2394          return addAlternative();
2395        }
2396        else
2397          return super.addChild(name);
2398      }
2399
2400      public ExampleScenarioProcessStepComponent copy() {
2401        ExampleScenarioProcessStepComponent dst = new ExampleScenarioProcessStepComponent();
2402        copyValues(dst);
2403        return dst;
2404      }
2405
2406      public void copyValues(ExampleScenarioProcessStepComponent dst) {
2407        super.copyValues(dst);
2408        if (process != null) {
2409          dst.process = new ArrayList<ExampleScenarioProcessComponent>();
2410          for (ExampleScenarioProcessComponent i : process)
2411            dst.process.add(i.copy());
2412        };
2413        dst.pause = pause == null ? null : pause.copy();
2414        dst.operation = operation == null ? null : operation.copy();
2415        if (alternative != null) {
2416          dst.alternative = new ArrayList<ExampleScenarioProcessStepAlternativeComponent>();
2417          for (ExampleScenarioProcessStepAlternativeComponent i : alternative)
2418            dst.alternative.add(i.copy());
2419        };
2420      }
2421
2422      @Override
2423      public boolean equalsDeep(Base other_) {
2424        if (!super.equalsDeep(other_))
2425          return false;
2426        if (!(other_ instanceof ExampleScenarioProcessStepComponent))
2427          return false;
2428        ExampleScenarioProcessStepComponent o = (ExampleScenarioProcessStepComponent) other_;
2429        return compareDeep(process, o.process, true) && compareDeep(pause, o.pause, true) && compareDeep(operation, o.operation, true)
2430           && compareDeep(alternative, o.alternative, true);
2431      }
2432
2433      @Override
2434      public boolean equalsShallow(Base other_) {
2435        if (!super.equalsShallow(other_))
2436          return false;
2437        if (!(other_ instanceof ExampleScenarioProcessStepComponent))
2438          return false;
2439        ExampleScenarioProcessStepComponent o = (ExampleScenarioProcessStepComponent) other_;
2440        return compareValues(pause, o.pause, true);
2441      }
2442
2443      public boolean isEmpty() {
2444        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(process, pause, operation
2445          , alternative);
2446      }
2447
2448  public String fhirType() {
2449    return "ExampleScenario.process.step";
2450
2451  }
2452
2453  }
2454
2455    @Block()
2456    public static class ExampleScenarioProcessStepOperationComponent extends BackboneElement implements IBaseBackboneElement {
2457        /**
2458         * The sequential number of the interaction, e.g. 1.2.5.
2459         */
2460        @Child(name = "number", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
2461        @Description(shortDefinition="The sequential number of the interaction", formalDefinition="The sequential number of the interaction, e.g. 1.2.5." )
2462        protected StringType number;
2463
2464        /**
2465         * The type of operation - CRUD.
2466         */
2467        @Child(name = "type", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
2468        @Description(shortDefinition="The type of operation - CRUD", formalDefinition="The type of operation - CRUD." )
2469        protected StringType type;
2470
2471        /**
2472         * The human-friendly name of the interaction.
2473         */
2474        @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
2475        @Description(shortDefinition="The human-friendly name of the interaction", formalDefinition="The human-friendly name of the interaction." )
2476        protected StringType name;
2477
2478        /**
2479         * Who starts the transaction.
2480         */
2481        @Child(name = "initiator", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
2482        @Description(shortDefinition="Who starts the transaction", formalDefinition="Who starts the transaction." )
2483        protected StringType initiator;
2484
2485        /**
2486         * Who receives the transaction.
2487         */
2488        @Child(name = "receiver", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
2489        @Description(shortDefinition="Who receives the transaction", formalDefinition="Who receives the transaction." )
2490        protected StringType receiver;
2491
2492        /**
2493         * A comment to be inserted in the diagram.
2494         */
2495        @Child(name = "description", type = {MarkdownType.class}, order=6, min=0, max=1, modifier=false, summary=false)
2496        @Description(shortDefinition="A comment to be inserted in the diagram", formalDefinition="A comment to be inserted in the diagram." )
2497        protected MarkdownType description;
2498
2499        /**
2500         * Whether the initiator is deactivated right after the transaction.
2501         */
2502        @Child(name = "initiatorActive", type = {BooleanType.class}, order=7, min=0, max=1, modifier=false, summary=false)
2503        @Description(shortDefinition="Whether the initiator is deactivated right after the transaction", formalDefinition="Whether the initiator is deactivated right after the transaction." )
2504        protected BooleanType initiatorActive;
2505
2506        /**
2507         * Whether the receiver is deactivated right after the transaction.
2508         */
2509        @Child(name = "receiverActive", type = {BooleanType.class}, order=8, min=0, max=1, modifier=false, summary=false)
2510        @Description(shortDefinition="Whether the receiver is deactivated right after the transaction", formalDefinition="Whether the receiver is deactivated right after the transaction." )
2511        protected BooleanType receiverActive;
2512
2513        /**
2514         * Each resource instance used by the initiator.
2515         */
2516        @Child(name = "request", type = {ExampleScenarioInstanceContainedInstanceComponent.class}, order=9, min=0, max=1, modifier=false, summary=false)
2517        @Description(shortDefinition="Each resource instance used by the initiator", formalDefinition="Each resource instance used by the initiator." )
2518        protected ExampleScenarioInstanceContainedInstanceComponent request;
2519
2520        /**
2521         * Each resource instance used by the responder.
2522         */
2523        @Child(name = "response", type = {ExampleScenarioInstanceContainedInstanceComponent.class}, order=10, min=0, max=1, modifier=false, summary=false)
2524        @Description(shortDefinition="Each resource instance used by the responder", formalDefinition="Each resource instance used by the responder." )
2525        protected ExampleScenarioInstanceContainedInstanceComponent response;
2526
2527        private static final long serialVersionUID = 911241906L;
2528
2529    /**
2530     * Constructor
2531     */
2532      public ExampleScenarioProcessStepOperationComponent() {
2533        super();
2534      }
2535
2536    /**
2537     * Constructor
2538     */
2539      public ExampleScenarioProcessStepOperationComponent(String number) {
2540        super();
2541        this.setNumber(number);
2542      }
2543
2544        /**
2545         * @return {@link #number} (The sequential number of the interaction, e.g. 1.2.5.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value
2546         */
2547        public StringType getNumberElement() { 
2548          if (this.number == null)
2549            if (Configuration.errorOnAutoCreate())
2550              throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.number");
2551            else if (Configuration.doAutoCreate())
2552              this.number = new StringType(); // bb
2553          return this.number;
2554        }
2555
2556        public boolean hasNumberElement() { 
2557          return this.number != null && !this.number.isEmpty();
2558        }
2559
2560        public boolean hasNumber() { 
2561          return this.number != null && !this.number.isEmpty();
2562        }
2563
2564        /**
2565         * @param value {@link #number} (The sequential number of the interaction, e.g. 1.2.5.). This is the underlying object with id, value and extensions. The accessor "getNumber" gives direct access to the value
2566         */
2567        public ExampleScenarioProcessStepOperationComponent setNumberElement(StringType value) { 
2568          this.number = value;
2569          return this;
2570        }
2571
2572        /**
2573         * @return The sequential number of the interaction, e.g. 1.2.5.
2574         */
2575        public String getNumber() { 
2576          return this.number == null ? null : this.number.getValue();
2577        }
2578
2579        /**
2580         * @param value The sequential number of the interaction, e.g. 1.2.5.
2581         */
2582        public ExampleScenarioProcessStepOperationComponent setNumber(String value) { 
2583            if (this.number == null)
2584              this.number = new StringType();
2585            this.number.setValue(value);
2586          return this;
2587        }
2588
2589        /**
2590         * @return {@link #type} (The type of operation - CRUD.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
2591         */
2592        public StringType getTypeElement() { 
2593          if (this.type == null)
2594            if (Configuration.errorOnAutoCreate())
2595              throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.type");
2596            else if (Configuration.doAutoCreate())
2597              this.type = new StringType(); // bb
2598          return this.type;
2599        }
2600
2601        public boolean hasTypeElement() { 
2602          return this.type != null && !this.type.isEmpty();
2603        }
2604
2605        public boolean hasType() { 
2606          return this.type != null && !this.type.isEmpty();
2607        }
2608
2609        /**
2610         * @param value {@link #type} (The type of operation - CRUD.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
2611         */
2612        public ExampleScenarioProcessStepOperationComponent setTypeElement(StringType value) { 
2613          this.type = value;
2614          return this;
2615        }
2616
2617        /**
2618         * @return The type of operation - CRUD.
2619         */
2620        public String getType() { 
2621          return this.type == null ? null : this.type.getValue();
2622        }
2623
2624        /**
2625         * @param value The type of operation - CRUD.
2626         */
2627        public ExampleScenarioProcessStepOperationComponent setType(String value) { 
2628          if (Utilities.noString(value))
2629            this.type = null;
2630          else {
2631            if (this.type == null)
2632              this.type = new StringType();
2633            this.type.setValue(value);
2634          }
2635          return this;
2636        }
2637
2638        /**
2639         * @return {@link #name} (The human-friendly name of the interaction.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
2640         */
2641        public StringType getNameElement() { 
2642          if (this.name == null)
2643            if (Configuration.errorOnAutoCreate())
2644              throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.name");
2645            else if (Configuration.doAutoCreate())
2646              this.name = new StringType(); // bb
2647          return this.name;
2648        }
2649
2650        public boolean hasNameElement() { 
2651          return this.name != null && !this.name.isEmpty();
2652        }
2653
2654        public boolean hasName() { 
2655          return this.name != null && !this.name.isEmpty();
2656        }
2657
2658        /**
2659         * @param value {@link #name} (The human-friendly name of the interaction.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
2660         */
2661        public ExampleScenarioProcessStepOperationComponent setNameElement(StringType value) { 
2662          this.name = value;
2663          return this;
2664        }
2665
2666        /**
2667         * @return The human-friendly name of the interaction.
2668         */
2669        public String getName() { 
2670          return this.name == null ? null : this.name.getValue();
2671        }
2672
2673        /**
2674         * @param value The human-friendly name of the interaction.
2675         */
2676        public ExampleScenarioProcessStepOperationComponent setName(String value) { 
2677          if (Utilities.noString(value))
2678            this.name = null;
2679          else {
2680            if (this.name == null)
2681              this.name = new StringType();
2682            this.name.setValue(value);
2683          }
2684          return this;
2685        }
2686
2687        /**
2688         * @return {@link #initiator} (Who starts the transaction.). This is the underlying object with id, value and extensions. The accessor "getInitiator" gives direct access to the value
2689         */
2690        public StringType getInitiatorElement() { 
2691          if (this.initiator == null)
2692            if (Configuration.errorOnAutoCreate())
2693              throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.initiator");
2694            else if (Configuration.doAutoCreate())
2695              this.initiator = new StringType(); // bb
2696          return this.initiator;
2697        }
2698
2699        public boolean hasInitiatorElement() { 
2700          return this.initiator != null && !this.initiator.isEmpty();
2701        }
2702
2703        public boolean hasInitiator() { 
2704          return this.initiator != null && !this.initiator.isEmpty();
2705        }
2706
2707        /**
2708         * @param value {@link #initiator} (Who starts the transaction.). This is the underlying object with id, value and extensions. The accessor "getInitiator" gives direct access to the value
2709         */
2710        public ExampleScenarioProcessStepOperationComponent setInitiatorElement(StringType value) { 
2711          this.initiator = value;
2712          return this;
2713        }
2714
2715        /**
2716         * @return Who starts the transaction.
2717         */
2718        public String getInitiator() { 
2719          return this.initiator == null ? null : this.initiator.getValue();
2720        }
2721
2722        /**
2723         * @param value Who starts the transaction.
2724         */
2725        public ExampleScenarioProcessStepOperationComponent setInitiator(String value) { 
2726          if (Utilities.noString(value))
2727            this.initiator = null;
2728          else {
2729            if (this.initiator == null)
2730              this.initiator = new StringType();
2731            this.initiator.setValue(value);
2732          }
2733          return this;
2734        }
2735
2736        /**
2737         * @return {@link #receiver} (Who receives the transaction.). This is the underlying object with id, value and extensions. The accessor "getReceiver" gives direct access to the value
2738         */
2739        public StringType getReceiverElement() { 
2740          if (this.receiver == null)
2741            if (Configuration.errorOnAutoCreate())
2742              throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.receiver");
2743            else if (Configuration.doAutoCreate())
2744              this.receiver = new StringType(); // bb
2745          return this.receiver;
2746        }
2747
2748        public boolean hasReceiverElement() { 
2749          return this.receiver != null && !this.receiver.isEmpty();
2750        }
2751
2752        public boolean hasReceiver() { 
2753          return this.receiver != null && !this.receiver.isEmpty();
2754        }
2755
2756        /**
2757         * @param value {@link #receiver} (Who receives the transaction.). This is the underlying object with id, value and extensions. The accessor "getReceiver" gives direct access to the value
2758         */
2759        public ExampleScenarioProcessStepOperationComponent setReceiverElement(StringType value) { 
2760          this.receiver = value;
2761          return this;
2762        }
2763
2764        /**
2765         * @return Who receives the transaction.
2766         */
2767        public String getReceiver() { 
2768          return this.receiver == null ? null : this.receiver.getValue();
2769        }
2770
2771        /**
2772         * @param value Who receives the transaction.
2773         */
2774        public ExampleScenarioProcessStepOperationComponent setReceiver(String value) { 
2775          if (Utilities.noString(value))
2776            this.receiver = null;
2777          else {
2778            if (this.receiver == null)
2779              this.receiver = new StringType();
2780            this.receiver.setValue(value);
2781          }
2782          return this;
2783        }
2784
2785        /**
2786         * @return {@link #description} (A comment to be inserted in the diagram.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2787         */
2788        public MarkdownType getDescriptionElement() { 
2789          if (this.description == null)
2790            if (Configuration.errorOnAutoCreate())
2791              throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.description");
2792            else if (Configuration.doAutoCreate())
2793              this.description = new MarkdownType(); // bb
2794          return this.description;
2795        }
2796
2797        public boolean hasDescriptionElement() { 
2798          return this.description != null && !this.description.isEmpty();
2799        }
2800
2801        public boolean hasDescription() { 
2802          return this.description != null && !this.description.isEmpty();
2803        }
2804
2805        /**
2806         * @param value {@link #description} (A comment to be inserted in the diagram.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2807         */
2808        public ExampleScenarioProcessStepOperationComponent setDescriptionElement(MarkdownType value) { 
2809          this.description = value;
2810          return this;
2811        }
2812
2813        /**
2814         * @return A comment to be inserted in the diagram.
2815         */
2816        public String getDescription() { 
2817          return this.description == null ? null : this.description.getValue();
2818        }
2819
2820        /**
2821         * @param value A comment to be inserted in the diagram.
2822         */
2823        public ExampleScenarioProcessStepOperationComponent setDescription(String value) { 
2824          if (value == null)
2825            this.description = null;
2826          else {
2827            if (this.description == null)
2828              this.description = new MarkdownType();
2829            this.description.setValue(value);
2830          }
2831          return this;
2832        }
2833
2834        /**
2835         * @return {@link #initiatorActive} (Whether the initiator is deactivated right after the transaction.). This is the underlying object with id, value and extensions. The accessor "getInitiatorActive" gives direct access to the value
2836         */
2837        public BooleanType getInitiatorActiveElement() { 
2838          if (this.initiatorActive == null)
2839            if (Configuration.errorOnAutoCreate())
2840              throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.initiatorActive");
2841            else if (Configuration.doAutoCreate())
2842              this.initiatorActive = new BooleanType(); // bb
2843          return this.initiatorActive;
2844        }
2845
2846        public boolean hasInitiatorActiveElement() { 
2847          return this.initiatorActive != null && !this.initiatorActive.isEmpty();
2848        }
2849
2850        public boolean hasInitiatorActive() { 
2851          return this.initiatorActive != null && !this.initiatorActive.isEmpty();
2852        }
2853
2854        /**
2855         * @param value {@link #initiatorActive} (Whether the initiator is deactivated right after the transaction.). This is the underlying object with id, value and extensions. The accessor "getInitiatorActive" gives direct access to the value
2856         */
2857        public ExampleScenarioProcessStepOperationComponent setInitiatorActiveElement(BooleanType value) { 
2858          this.initiatorActive = value;
2859          return this;
2860        }
2861
2862        /**
2863         * @return Whether the initiator is deactivated right after the transaction.
2864         */
2865        public boolean getInitiatorActive() { 
2866          return this.initiatorActive == null || this.initiatorActive.isEmpty() ? false : this.initiatorActive.getValue();
2867        }
2868
2869        /**
2870         * @param value Whether the initiator is deactivated right after the transaction.
2871         */
2872        public ExampleScenarioProcessStepOperationComponent setInitiatorActive(boolean value) { 
2873            if (this.initiatorActive == null)
2874              this.initiatorActive = new BooleanType();
2875            this.initiatorActive.setValue(value);
2876          return this;
2877        }
2878
2879        /**
2880         * @return {@link #receiverActive} (Whether the receiver is deactivated right after the transaction.). This is the underlying object with id, value and extensions. The accessor "getReceiverActive" gives direct access to the value
2881         */
2882        public BooleanType getReceiverActiveElement() { 
2883          if (this.receiverActive == null)
2884            if (Configuration.errorOnAutoCreate())
2885              throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.receiverActive");
2886            else if (Configuration.doAutoCreate())
2887              this.receiverActive = new BooleanType(); // bb
2888          return this.receiverActive;
2889        }
2890
2891        public boolean hasReceiverActiveElement() { 
2892          return this.receiverActive != null && !this.receiverActive.isEmpty();
2893        }
2894
2895        public boolean hasReceiverActive() { 
2896          return this.receiverActive != null && !this.receiverActive.isEmpty();
2897        }
2898
2899        /**
2900         * @param value {@link #receiverActive} (Whether the receiver is deactivated right after the transaction.). This is the underlying object with id, value and extensions. The accessor "getReceiverActive" gives direct access to the value
2901         */
2902        public ExampleScenarioProcessStepOperationComponent setReceiverActiveElement(BooleanType value) { 
2903          this.receiverActive = value;
2904          return this;
2905        }
2906
2907        /**
2908         * @return Whether the receiver is deactivated right after the transaction.
2909         */
2910        public boolean getReceiverActive() { 
2911          return this.receiverActive == null || this.receiverActive.isEmpty() ? false : this.receiverActive.getValue();
2912        }
2913
2914        /**
2915         * @param value Whether the receiver is deactivated right after the transaction.
2916         */
2917        public ExampleScenarioProcessStepOperationComponent setReceiverActive(boolean value) { 
2918            if (this.receiverActive == null)
2919              this.receiverActive = new BooleanType();
2920            this.receiverActive.setValue(value);
2921          return this;
2922        }
2923
2924        /**
2925         * @return {@link #request} (Each resource instance used by the initiator.)
2926         */
2927        public ExampleScenarioInstanceContainedInstanceComponent getRequest() { 
2928          if (this.request == null)
2929            if (Configuration.errorOnAutoCreate())
2930              throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.request");
2931            else if (Configuration.doAutoCreate())
2932              this.request = new ExampleScenarioInstanceContainedInstanceComponent(); // cc
2933          return this.request;
2934        }
2935
2936        public boolean hasRequest() { 
2937          return this.request != null && !this.request.isEmpty();
2938        }
2939
2940        /**
2941         * @param value {@link #request} (Each resource instance used by the initiator.)
2942         */
2943        public ExampleScenarioProcessStepOperationComponent setRequest(ExampleScenarioInstanceContainedInstanceComponent value) { 
2944          this.request = value;
2945          return this;
2946        }
2947
2948        /**
2949         * @return {@link #response} (Each resource instance used by the responder.)
2950         */
2951        public ExampleScenarioInstanceContainedInstanceComponent getResponse() { 
2952          if (this.response == null)
2953            if (Configuration.errorOnAutoCreate())
2954              throw new Error("Attempt to auto-create ExampleScenarioProcessStepOperationComponent.response");
2955            else if (Configuration.doAutoCreate())
2956              this.response = new ExampleScenarioInstanceContainedInstanceComponent(); // cc
2957          return this.response;
2958        }
2959
2960        public boolean hasResponse() { 
2961          return this.response != null && !this.response.isEmpty();
2962        }
2963
2964        /**
2965         * @param value {@link #response} (Each resource instance used by the responder.)
2966         */
2967        public ExampleScenarioProcessStepOperationComponent setResponse(ExampleScenarioInstanceContainedInstanceComponent value) { 
2968          this.response = value;
2969          return this;
2970        }
2971
2972        protected void listChildren(List<Property> children) {
2973          super.listChildren(children);
2974          children.add(new Property("number", "string", "The sequential number of the interaction, e.g. 1.2.5.", 0, 1, number));
2975          children.add(new Property("type", "string", "The type of operation - CRUD.", 0, 1, type));
2976          children.add(new Property("name", "string", "The human-friendly name of the interaction.", 0, 1, name));
2977          children.add(new Property("initiator", "string", "Who starts the transaction.", 0, 1, initiator));
2978          children.add(new Property("receiver", "string", "Who receives the transaction.", 0, 1, receiver));
2979          children.add(new Property("description", "markdown", "A comment to be inserted in the diagram.", 0, 1, description));
2980          children.add(new Property("initiatorActive", "boolean", "Whether the initiator is deactivated right after the transaction.", 0, 1, initiatorActive));
2981          children.add(new Property("receiverActive", "boolean", "Whether the receiver is deactivated right after the transaction.", 0, 1, receiverActive));
2982          children.add(new Property("request", "@ExampleScenario.instance.containedInstance", "Each resource instance used by the initiator.", 0, 1, request));
2983          children.add(new Property("response", "@ExampleScenario.instance.containedInstance", "Each resource instance used by the responder.", 0, 1, response));
2984        }
2985
2986        @Override
2987        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2988          switch (_hash) {
2989          case -1034364087: /*number*/  return new Property("number", "string", "The sequential number of the interaction, e.g. 1.2.5.", 0, 1, number);
2990          case 3575610: /*type*/  return new Property("type", "string", "The type of operation - CRUD.", 0, 1, type);
2991          case 3373707: /*name*/  return new Property("name", "string", "The human-friendly name of the interaction.", 0, 1, name);
2992          case -248987089: /*initiator*/  return new Property("initiator", "string", "Who starts the transaction.", 0, 1, initiator);
2993          case -808719889: /*receiver*/  return new Property("receiver", "string", "Who receives the transaction.", 0, 1, receiver);
2994          case -1724546052: /*description*/  return new Property("description", "markdown", "A comment to be inserted in the diagram.", 0, 1, description);
2995          case 384339477: /*initiatorActive*/  return new Property("initiatorActive", "boolean", "Whether the initiator is deactivated right after the transaction.", 0, 1, initiatorActive);
2996          case -285284907: /*receiverActive*/  return new Property("receiverActive", "boolean", "Whether the receiver is deactivated right after the transaction.", 0, 1, receiverActive);
2997          case 1095692943: /*request*/  return new Property("request", "@ExampleScenario.instance.containedInstance", "Each resource instance used by the initiator.", 0, 1, request);
2998          case -340323263: /*response*/  return new Property("response", "@ExampleScenario.instance.containedInstance", "Each resource instance used by the responder.", 0, 1, response);
2999          default: return super.getNamedProperty(_hash, _name, _checkValid);
3000          }
3001
3002        }
3003
3004      @Override
3005      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3006        switch (hash) {
3007        case -1034364087: /*number*/ return this.number == null ? new Base[0] : new Base[] {this.number}; // StringType
3008        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // StringType
3009        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
3010        case -248987089: /*initiator*/ return this.initiator == null ? new Base[0] : new Base[] {this.initiator}; // StringType
3011        case -808719889: /*receiver*/ return this.receiver == null ? new Base[0] : new Base[] {this.receiver}; // StringType
3012        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
3013        case 384339477: /*initiatorActive*/ return this.initiatorActive == null ? new Base[0] : new Base[] {this.initiatorActive}; // BooleanType
3014        case -285284907: /*receiverActive*/ return this.receiverActive == null ? new Base[0] : new Base[] {this.receiverActive}; // BooleanType
3015        case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // ExampleScenarioInstanceContainedInstanceComponent
3016        case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // ExampleScenarioInstanceContainedInstanceComponent
3017        default: return super.getProperty(hash, name, checkValid);
3018        }
3019
3020      }
3021
3022      @Override
3023      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3024        switch (hash) {
3025        case -1034364087: // number
3026          this.number = TypeConvertor.castToString(value); // StringType
3027          return value;
3028        case 3575610: // type
3029          this.type = TypeConvertor.castToString(value); // StringType
3030          return value;
3031        case 3373707: // name
3032          this.name = TypeConvertor.castToString(value); // StringType
3033          return value;
3034        case -248987089: // initiator
3035          this.initiator = TypeConvertor.castToString(value); // StringType
3036          return value;
3037        case -808719889: // receiver
3038          this.receiver = TypeConvertor.castToString(value); // StringType
3039          return value;
3040        case -1724546052: // description
3041          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
3042          return value;
3043        case 384339477: // initiatorActive
3044          this.initiatorActive = TypeConvertor.castToBoolean(value); // BooleanType
3045          return value;
3046        case -285284907: // receiverActive
3047          this.receiverActive = TypeConvertor.castToBoolean(value); // BooleanType
3048          return value;
3049        case 1095692943: // request
3050          this.request = (ExampleScenarioInstanceContainedInstanceComponent) value; // ExampleScenarioInstanceContainedInstanceComponent
3051          return value;
3052        case -340323263: // response
3053          this.response = (ExampleScenarioInstanceContainedInstanceComponent) value; // ExampleScenarioInstanceContainedInstanceComponent
3054          return value;
3055        default: return super.setProperty(hash, name, value);
3056        }
3057
3058      }
3059
3060      @Override
3061      public Base setProperty(String name, Base value) throws FHIRException {
3062        if (name.equals("number")) {
3063          this.number = TypeConvertor.castToString(value); // StringType
3064        } else if (name.equals("type")) {
3065          this.type = TypeConvertor.castToString(value); // StringType
3066        } else if (name.equals("name")) {
3067          this.name = TypeConvertor.castToString(value); // StringType
3068        } else if (name.equals("initiator")) {
3069          this.initiator = TypeConvertor.castToString(value); // StringType
3070        } else if (name.equals("receiver")) {
3071          this.receiver = TypeConvertor.castToString(value); // StringType
3072        } else if (name.equals("description")) {
3073          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
3074        } else if (name.equals("initiatorActive")) {
3075          this.initiatorActive = TypeConvertor.castToBoolean(value); // BooleanType
3076        } else if (name.equals("receiverActive")) {
3077          this.receiverActive = TypeConvertor.castToBoolean(value); // BooleanType
3078        } else if (name.equals("request")) {
3079          this.request = (ExampleScenarioInstanceContainedInstanceComponent) value; // ExampleScenarioInstanceContainedInstanceComponent
3080        } else if (name.equals("response")) {
3081          this.response = (ExampleScenarioInstanceContainedInstanceComponent) value; // ExampleScenarioInstanceContainedInstanceComponent
3082        } else
3083          return super.setProperty(name, value);
3084        return value;
3085      }
3086
3087      @Override
3088      public Base makeProperty(int hash, String name) throws FHIRException {
3089        switch (hash) {
3090        case -1034364087:  return getNumberElement();
3091        case 3575610:  return getTypeElement();
3092        case 3373707:  return getNameElement();
3093        case -248987089:  return getInitiatorElement();
3094        case -808719889:  return getReceiverElement();
3095        case -1724546052:  return getDescriptionElement();
3096        case 384339477:  return getInitiatorActiveElement();
3097        case -285284907:  return getReceiverActiveElement();
3098        case 1095692943:  return getRequest();
3099        case -340323263:  return getResponse();
3100        default: return super.makeProperty(hash, name);
3101        }
3102
3103      }
3104
3105      @Override
3106      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3107        switch (hash) {
3108        case -1034364087: /*number*/ return new String[] {"string"};
3109        case 3575610: /*type*/ return new String[] {"string"};
3110        case 3373707: /*name*/ return new String[] {"string"};
3111        case -248987089: /*initiator*/ return new String[] {"string"};
3112        case -808719889: /*receiver*/ return new String[] {"string"};
3113        case -1724546052: /*description*/ return new String[] {"markdown"};
3114        case 384339477: /*initiatorActive*/ return new String[] {"boolean"};
3115        case -285284907: /*receiverActive*/ return new String[] {"boolean"};
3116        case 1095692943: /*request*/ return new String[] {"@ExampleScenario.instance.containedInstance"};
3117        case -340323263: /*response*/ return new String[] {"@ExampleScenario.instance.containedInstance"};
3118        default: return super.getTypesForProperty(hash, name);
3119        }
3120
3121      }
3122
3123      @Override
3124      public Base addChild(String name) throws FHIRException {
3125        if (name.equals("number")) {
3126          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.process.step.operation.number");
3127        }
3128        else if (name.equals("type")) {
3129          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.process.step.operation.type");
3130        }
3131        else if (name.equals("name")) {
3132          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.process.step.operation.name");
3133        }
3134        else if (name.equals("initiator")) {
3135          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.process.step.operation.initiator");
3136        }
3137        else if (name.equals("receiver")) {
3138          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.process.step.operation.receiver");
3139        }
3140        else if (name.equals("description")) {
3141          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.process.step.operation.description");
3142        }
3143        else if (name.equals("initiatorActive")) {
3144          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.process.step.operation.initiatorActive");
3145        }
3146        else if (name.equals("receiverActive")) {
3147          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.process.step.operation.receiverActive");
3148        }
3149        else if (name.equals("request")) {
3150          this.request = new ExampleScenarioInstanceContainedInstanceComponent();
3151          return this.request;
3152        }
3153        else if (name.equals("response")) {
3154          this.response = new ExampleScenarioInstanceContainedInstanceComponent();
3155          return this.response;
3156        }
3157        else
3158          return super.addChild(name);
3159      }
3160
3161      public ExampleScenarioProcessStepOperationComponent copy() {
3162        ExampleScenarioProcessStepOperationComponent dst = new ExampleScenarioProcessStepOperationComponent();
3163        copyValues(dst);
3164        return dst;
3165      }
3166
3167      public void copyValues(ExampleScenarioProcessStepOperationComponent dst) {
3168        super.copyValues(dst);
3169        dst.number = number == null ? null : number.copy();
3170        dst.type = type == null ? null : type.copy();
3171        dst.name = name == null ? null : name.copy();
3172        dst.initiator = initiator == null ? null : initiator.copy();
3173        dst.receiver = receiver == null ? null : receiver.copy();
3174        dst.description = description == null ? null : description.copy();
3175        dst.initiatorActive = initiatorActive == null ? null : initiatorActive.copy();
3176        dst.receiverActive = receiverActive == null ? null : receiverActive.copy();
3177        dst.request = request == null ? null : request.copy();
3178        dst.response = response == null ? null : response.copy();
3179      }
3180
3181      @Override
3182      public boolean equalsDeep(Base other_) {
3183        if (!super.equalsDeep(other_))
3184          return false;
3185        if (!(other_ instanceof ExampleScenarioProcessStepOperationComponent))
3186          return false;
3187        ExampleScenarioProcessStepOperationComponent o = (ExampleScenarioProcessStepOperationComponent) other_;
3188        return compareDeep(number, o.number, true) && compareDeep(type, o.type, true) && compareDeep(name, o.name, true)
3189           && compareDeep(initiator, o.initiator, true) && compareDeep(receiver, o.receiver, true) && compareDeep(description, o.description, true)
3190           && compareDeep(initiatorActive, o.initiatorActive, true) && compareDeep(receiverActive, o.receiverActive, true)
3191           && compareDeep(request, o.request, true) && compareDeep(response, o.response, true);
3192      }
3193
3194      @Override
3195      public boolean equalsShallow(Base other_) {
3196        if (!super.equalsShallow(other_))
3197          return false;
3198        if (!(other_ instanceof ExampleScenarioProcessStepOperationComponent))
3199          return false;
3200        ExampleScenarioProcessStepOperationComponent o = (ExampleScenarioProcessStepOperationComponent) other_;
3201        return compareValues(number, o.number, true) && compareValues(type, o.type, true) && compareValues(name, o.name, true)
3202           && compareValues(initiator, o.initiator, true) && compareValues(receiver, o.receiver, true) && compareValues(description, o.description, true)
3203           && compareValues(initiatorActive, o.initiatorActive, true) && compareValues(receiverActive, o.receiverActive, true)
3204          ;
3205      }
3206
3207      public boolean isEmpty() {
3208        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(number, type, name, initiator
3209          , receiver, description, initiatorActive, receiverActive, request, response);
3210      }
3211
3212  public String fhirType() {
3213    return "ExampleScenario.process.step.operation";
3214
3215  }
3216
3217  }
3218
3219    @Block()
3220    public static class ExampleScenarioProcessStepAlternativeComponent extends BackboneElement implements IBaseBackboneElement {
3221        /**
3222         * The label to display for the alternative that gives a sense of the circumstance in which the alternative should be invoked.
3223         */
3224        @Child(name = "title", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
3225        @Description(shortDefinition="Label for alternative", formalDefinition="The label to display for the alternative that gives a sense of the circumstance in which the alternative should be invoked." )
3226        protected StringType title;
3227
3228        /**
3229         * A human-readable description of the alternative explaining when the alternative should occur rather than the base step.
3230         */
3231        @Child(name = "description", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false)
3232        @Description(shortDefinition="A human-readable description of each option", formalDefinition="A human-readable description of the alternative explaining when the alternative should occur rather than the base step." )
3233        protected MarkdownType description;
3234
3235        /**
3236         * What happens in each alternative option.
3237         */
3238        @Child(name = "step", type = {ExampleScenarioProcessStepComponent.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3239        @Description(shortDefinition="What happens in each alternative option", formalDefinition="What happens in each alternative option." )
3240        protected List<ExampleScenarioProcessStepComponent> step;
3241
3242        private static final long serialVersionUID = -254687460L;
3243
3244    /**
3245     * Constructor
3246     */
3247      public ExampleScenarioProcessStepAlternativeComponent() {
3248        super();
3249      }
3250
3251    /**
3252     * Constructor
3253     */
3254      public ExampleScenarioProcessStepAlternativeComponent(String title) {
3255        super();
3256        this.setTitle(title);
3257      }
3258
3259        /**
3260         * @return {@link #title} (The label to display for the alternative that gives a sense of the circumstance in which the alternative should be invoked.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
3261         */
3262        public StringType getTitleElement() { 
3263          if (this.title == null)
3264            if (Configuration.errorOnAutoCreate())
3265              throw new Error("Attempt to auto-create ExampleScenarioProcessStepAlternativeComponent.title");
3266            else if (Configuration.doAutoCreate())
3267              this.title = new StringType(); // bb
3268          return this.title;
3269        }
3270
3271        public boolean hasTitleElement() { 
3272          return this.title != null && !this.title.isEmpty();
3273        }
3274
3275        public boolean hasTitle() { 
3276          return this.title != null && !this.title.isEmpty();
3277        }
3278
3279        /**
3280         * @param value {@link #title} (The label to display for the alternative that gives a sense of the circumstance in which the alternative should be invoked.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
3281         */
3282        public ExampleScenarioProcessStepAlternativeComponent setTitleElement(StringType value) { 
3283          this.title = value;
3284          return this;
3285        }
3286
3287        /**
3288         * @return The label to display for the alternative that gives a sense of the circumstance in which the alternative should be invoked.
3289         */
3290        public String getTitle() { 
3291          return this.title == null ? null : this.title.getValue();
3292        }
3293
3294        /**
3295         * @param value The label to display for the alternative that gives a sense of the circumstance in which the alternative should be invoked.
3296         */
3297        public ExampleScenarioProcessStepAlternativeComponent setTitle(String value) { 
3298            if (this.title == null)
3299              this.title = new StringType();
3300            this.title.setValue(value);
3301          return this;
3302        }
3303
3304        /**
3305         * @return {@link #description} (A human-readable description of the alternative explaining when the alternative should occur rather than the base step.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
3306         */
3307        public MarkdownType getDescriptionElement() { 
3308          if (this.description == null)
3309            if (Configuration.errorOnAutoCreate())
3310              throw new Error("Attempt to auto-create ExampleScenarioProcessStepAlternativeComponent.description");
3311            else if (Configuration.doAutoCreate())
3312              this.description = new MarkdownType(); // bb
3313          return this.description;
3314        }
3315
3316        public boolean hasDescriptionElement() { 
3317          return this.description != null && !this.description.isEmpty();
3318        }
3319
3320        public boolean hasDescription() { 
3321          return this.description != null && !this.description.isEmpty();
3322        }
3323
3324        /**
3325         * @param value {@link #description} (A human-readable description of the alternative explaining when the alternative should occur rather than the base step.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
3326         */
3327        public ExampleScenarioProcessStepAlternativeComponent setDescriptionElement(MarkdownType value) { 
3328          this.description = value;
3329          return this;
3330        }
3331
3332        /**
3333         * @return A human-readable description of the alternative explaining when the alternative should occur rather than the base step.
3334         */
3335        public String getDescription() { 
3336          return this.description == null ? null : this.description.getValue();
3337        }
3338
3339        /**
3340         * @param value A human-readable description of the alternative explaining when the alternative should occur rather than the base step.
3341         */
3342        public ExampleScenarioProcessStepAlternativeComponent setDescription(String value) { 
3343          if (value == null)
3344            this.description = null;
3345          else {
3346            if (this.description == null)
3347              this.description = new MarkdownType();
3348            this.description.setValue(value);
3349          }
3350          return this;
3351        }
3352
3353        /**
3354         * @return {@link #step} (What happens in each alternative option.)
3355         */
3356        public List<ExampleScenarioProcessStepComponent> getStep() { 
3357          if (this.step == null)
3358            this.step = new ArrayList<ExampleScenarioProcessStepComponent>();
3359          return this.step;
3360        }
3361
3362        /**
3363         * @return Returns a reference to <code>this</code> for easy method chaining
3364         */
3365        public ExampleScenarioProcessStepAlternativeComponent setStep(List<ExampleScenarioProcessStepComponent> theStep) { 
3366          this.step = theStep;
3367          return this;
3368        }
3369
3370        public boolean hasStep() { 
3371          if (this.step == null)
3372            return false;
3373          for (ExampleScenarioProcessStepComponent item : this.step)
3374            if (!item.isEmpty())
3375              return true;
3376          return false;
3377        }
3378
3379        public ExampleScenarioProcessStepComponent addStep() { //3
3380          ExampleScenarioProcessStepComponent t = new ExampleScenarioProcessStepComponent();
3381          if (this.step == null)
3382            this.step = new ArrayList<ExampleScenarioProcessStepComponent>();
3383          this.step.add(t);
3384          return t;
3385        }
3386
3387        public ExampleScenarioProcessStepAlternativeComponent addStep(ExampleScenarioProcessStepComponent t) { //3
3388          if (t == null)
3389            return this;
3390          if (this.step == null)
3391            this.step = new ArrayList<ExampleScenarioProcessStepComponent>();
3392          this.step.add(t);
3393          return this;
3394        }
3395
3396        /**
3397         * @return The first repetition of repeating field {@link #step}, creating it if it does not already exist {3}
3398         */
3399        public ExampleScenarioProcessStepComponent getStepFirstRep() { 
3400          if (getStep().isEmpty()) {
3401            addStep();
3402          }
3403          return getStep().get(0);
3404        }
3405
3406        protected void listChildren(List<Property> children) {
3407          super.listChildren(children);
3408          children.add(new Property("title", "string", "The label to display for the alternative that gives a sense of the circumstance in which the alternative should be invoked.", 0, 1, title));
3409          children.add(new Property("description", "markdown", "A human-readable description of the alternative explaining when the alternative should occur rather than the base step.", 0, 1, description));
3410          children.add(new Property("step", "@ExampleScenario.process.step", "What happens in each alternative option.", 0, java.lang.Integer.MAX_VALUE, step));
3411        }
3412
3413        @Override
3414        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3415          switch (_hash) {
3416          case 110371416: /*title*/  return new Property("title", "string", "The label to display for the alternative that gives a sense of the circumstance in which the alternative should be invoked.", 0, 1, title);
3417          case -1724546052: /*description*/  return new Property("description", "markdown", "A human-readable description of the alternative explaining when the alternative should occur rather than the base step.", 0, 1, description);
3418          case 3540684: /*step*/  return new Property("step", "@ExampleScenario.process.step", "What happens in each alternative option.", 0, java.lang.Integer.MAX_VALUE, step);
3419          default: return super.getNamedProperty(_hash, _name, _checkValid);
3420          }
3421
3422        }
3423
3424      @Override
3425      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3426        switch (hash) {
3427        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
3428        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
3429        case 3540684: /*step*/ return this.step == null ? new Base[0] : this.step.toArray(new Base[this.step.size()]); // ExampleScenarioProcessStepComponent
3430        default: return super.getProperty(hash, name, checkValid);
3431        }
3432
3433      }
3434
3435      @Override
3436      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3437        switch (hash) {
3438        case 110371416: // title
3439          this.title = TypeConvertor.castToString(value); // StringType
3440          return value;
3441        case -1724546052: // description
3442          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
3443          return value;
3444        case 3540684: // step
3445          this.getStep().add((ExampleScenarioProcessStepComponent) value); // ExampleScenarioProcessStepComponent
3446          return value;
3447        default: return super.setProperty(hash, name, value);
3448        }
3449
3450      }
3451
3452      @Override
3453      public Base setProperty(String name, Base value) throws FHIRException {
3454        if (name.equals("title")) {
3455          this.title = TypeConvertor.castToString(value); // StringType
3456        } else if (name.equals("description")) {
3457          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
3458        } else if (name.equals("step")) {
3459          this.getStep().add((ExampleScenarioProcessStepComponent) value);
3460        } else
3461          return super.setProperty(name, value);
3462        return value;
3463      }
3464
3465      @Override
3466      public Base makeProperty(int hash, String name) throws FHIRException {
3467        switch (hash) {
3468        case 110371416:  return getTitleElement();
3469        case -1724546052:  return getDescriptionElement();
3470        case 3540684:  return addStep(); 
3471        default: return super.makeProperty(hash, name);
3472        }
3473
3474      }
3475
3476      @Override
3477      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3478        switch (hash) {
3479        case 110371416: /*title*/ return new String[] {"string"};
3480        case -1724546052: /*description*/ return new String[] {"markdown"};
3481        case 3540684: /*step*/ return new String[] {"@ExampleScenario.process.step"};
3482        default: return super.getTypesForProperty(hash, name);
3483        }
3484
3485      }
3486
3487      @Override
3488      public Base addChild(String name) throws FHIRException {
3489        if (name.equals("title")) {
3490          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.process.step.alternative.title");
3491        }
3492        else if (name.equals("description")) {
3493          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.process.step.alternative.description");
3494        }
3495        else if (name.equals("step")) {
3496          return addStep();
3497        }
3498        else
3499          return super.addChild(name);
3500      }
3501
3502      public ExampleScenarioProcessStepAlternativeComponent copy() {
3503        ExampleScenarioProcessStepAlternativeComponent dst = new ExampleScenarioProcessStepAlternativeComponent();
3504        copyValues(dst);
3505        return dst;
3506      }
3507
3508      public void copyValues(ExampleScenarioProcessStepAlternativeComponent dst) {
3509        super.copyValues(dst);
3510        dst.title = title == null ? null : title.copy();
3511        dst.description = description == null ? null : description.copy();
3512        if (step != null) {
3513          dst.step = new ArrayList<ExampleScenarioProcessStepComponent>();
3514          for (ExampleScenarioProcessStepComponent i : step)
3515            dst.step.add(i.copy());
3516        };
3517      }
3518
3519      @Override
3520      public boolean equalsDeep(Base other_) {
3521        if (!super.equalsDeep(other_))
3522          return false;
3523        if (!(other_ instanceof ExampleScenarioProcessStepAlternativeComponent))
3524          return false;
3525        ExampleScenarioProcessStepAlternativeComponent o = (ExampleScenarioProcessStepAlternativeComponent) other_;
3526        return compareDeep(title, o.title, true) && compareDeep(description, o.description, true) && compareDeep(step, o.step, true)
3527          ;
3528      }
3529
3530      @Override
3531      public boolean equalsShallow(Base other_) {
3532        if (!super.equalsShallow(other_))
3533          return false;
3534        if (!(other_ instanceof ExampleScenarioProcessStepAlternativeComponent))
3535          return false;
3536        ExampleScenarioProcessStepAlternativeComponent o = (ExampleScenarioProcessStepAlternativeComponent) other_;
3537        return compareValues(title, o.title, true) && compareValues(description, o.description, true);
3538      }
3539
3540      public boolean isEmpty() {
3541        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(title, description, step
3542          );
3543      }
3544
3545  public String fhirType() {
3546    return "ExampleScenario.process.step.alternative";
3547
3548  }
3549
3550  }
3551
3552    /**
3553     * An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers.
3554     */
3555    @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true)
3556    @Description(shortDefinition="Canonical identifier for this example scenario, represented as a URI (globally unique)", formalDefinition="An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers." )
3557    protected UriType url;
3558
3559    /**
3560     * A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance.
3561     */
3562    @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3563    @Description(shortDefinition="Additional identifier for the example scenario", formalDefinition="A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance." )
3564    protected List<Identifier> identifier;
3565
3566    /**
3567     * The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.
3568     */
3569    @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
3570    @Description(shortDefinition="Business version of the example scenario", formalDefinition="The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence." )
3571    protected StringType version;
3572
3573    /**
3574     * A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation.
3575     */
3576    @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
3577    @Description(shortDefinition="Name for this example scenario (computer friendly)", formalDefinition="A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation." )
3578    protected StringType name;
3579
3580    /**
3581     * The status of this example scenario. Enables tracking the life-cycle of the content.
3582     */
3583    @Child(name = "status", type = {CodeType.class}, order=4, min=1, max=1, modifier=true, summary=true)
3584    @Description(shortDefinition="draft | active | retired | unknown", formalDefinition="The status of this example scenario. Enables tracking the life-cycle of the content." )
3585    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/publication-status")
3586    protected Enumeration<PublicationStatus> status;
3587
3588    /**
3589     * A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
3590     */
3591    @Child(name = "experimental", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=true)
3592    @Description(shortDefinition="For testing purposes, not real usage", formalDefinition="A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage." )
3593    protected BooleanType experimental;
3594
3595    /**
3596     * The date  (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').
3597     */
3598    @Child(name = "date", type = {DateTimeType.class}, order=6, min=0, max=1, modifier=false, summary=true)
3599    @Description(shortDefinition="Date last changed", formalDefinition="The date  (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition')." )
3600    protected DateTimeType date;
3601
3602    /**
3603     * The name of the organization or individual that published the example scenario.
3604     */
3605    @Child(name = "publisher", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=true)
3606    @Description(shortDefinition="Name of the publisher (organization or individual)", formalDefinition="The name of the organization or individual that published the example scenario." )
3607    protected StringType publisher;
3608
3609    /**
3610     * Contact details to assist a user in finding and communicating with the publisher.
3611     */
3612    @Child(name = "contact", type = {ContactDetail.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3613    @Description(shortDefinition="Contact details for the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." )
3614    protected List<ContactDetail> contact;
3615
3616    /**
3617     * The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate example scenario instances.
3618     */
3619    @Child(name = "useContext", type = {UsageContext.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3620    @Description(shortDefinition="The context that the content is intended to support", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate example scenario instances." )
3621    protected List<UsageContext> useContext;
3622
3623    /**
3624     * A legal or geographic region in which the example scenario is intended to be used.
3625     */
3626    @Child(name = "jurisdiction", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
3627    @Description(shortDefinition="Intended jurisdiction for example scenario (if applicable)", formalDefinition="A legal or geographic region in which the example scenario is intended to be used." )
3628    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/jurisdiction")
3629    protected List<CodeableConcept> jurisdiction;
3630
3631    /**
3632     * What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.
3633     */
3634    @Child(name = "purpose", type = {MarkdownType.class}, order=11, min=0, max=1, modifier=false, summary=false)
3635    @Description(shortDefinition="The purpose of the example, e.g. to illustrate a scenario", formalDefinition="What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario." )
3636    protected MarkdownType purpose;
3637
3638    /**
3639     * A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.
3640     */
3641    @Child(name = "copyright", type = {MarkdownType.class}, order=12, min=0, max=1, modifier=false, summary=false)
3642    @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario." )
3643    protected MarkdownType copyright;
3644
3645    /**
3646     * Actor participating in the resource.
3647     */
3648    @Child(name = "actor", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3649    @Description(shortDefinition="Actor participating in the resource", formalDefinition="Actor participating in the resource." )
3650    protected List<ExampleScenarioActorComponent> actor;
3651
3652    /**
3653     * Each resource and each version that is present in the workflow.
3654     */
3655    @Child(name = "instance", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3656    @Description(shortDefinition="Each resource and each version that is present in the workflow", formalDefinition="Each resource and each version that is present in the workflow." )
3657    protected List<ExampleScenarioInstanceComponent> instance;
3658
3659    /**
3660     * Each major process - a group of operations.
3661     */
3662    @Child(name = "process", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3663    @Description(shortDefinition="Each major process - a group of operations", formalDefinition="Each major process - a group of operations." )
3664    protected List<ExampleScenarioProcessComponent> process;
3665
3666    /**
3667     * Another nested workflow.
3668     */
3669    @Child(name = "workflow", type = {CanonicalType.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3670    @Description(shortDefinition="Another nested workflow", formalDefinition="Another nested workflow." )
3671    protected List<CanonicalType> workflow;
3672
3673    private static final long serialVersionUID = 1725952195L;
3674
3675  /**
3676   * Constructor
3677   */
3678    public ExampleScenario() {
3679      super();
3680    }
3681
3682  /**
3683   * Constructor
3684   */
3685    public ExampleScenario(PublicationStatus status) {
3686      super();
3687      this.setStatus(status);
3688    }
3689
3690    /**
3691     * @return {@link #url} (An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
3692     */
3693    public UriType getUrlElement() { 
3694      if (this.url == null)
3695        if (Configuration.errorOnAutoCreate())
3696          throw new Error("Attempt to auto-create ExampleScenario.url");
3697        else if (Configuration.doAutoCreate())
3698          this.url = new UriType(); // bb
3699      return this.url;
3700    }
3701
3702    public boolean hasUrlElement() { 
3703      return this.url != null && !this.url.isEmpty();
3704    }
3705
3706    public boolean hasUrl() { 
3707      return this.url != null && !this.url.isEmpty();
3708    }
3709
3710    /**
3711     * @param value {@link #url} (An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
3712     */
3713    public ExampleScenario setUrlElement(UriType value) { 
3714      this.url = value;
3715      return this;
3716    }
3717
3718    /**
3719     * @return An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers.
3720     */
3721    public String getUrl() { 
3722      return this.url == null ? null : this.url.getValue();
3723    }
3724
3725    /**
3726     * @param value An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers.
3727     */
3728    public ExampleScenario setUrl(String value) { 
3729      if (Utilities.noString(value))
3730        this.url = null;
3731      else {
3732        if (this.url == null)
3733          this.url = new UriType();
3734        this.url.setValue(value);
3735      }
3736      return this;
3737    }
3738
3739    /**
3740     * @return {@link #identifier} (A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance.)
3741     */
3742    public List<Identifier> getIdentifier() { 
3743      if (this.identifier == null)
3744        this.identifier = new ArrayList<Identifier>();
3745      return this.identifier;
3746    }
3747
3748    /**
3749     * @return Returns a reference to <code>this</code> for easy method chaining
3750     */
3751    public ExampleScenario setIdentifier(List<Identifier> theIdentifier) { 
3752      this.identifier = theIdentifier;
3753      return this;
3754    }
3755
3756    public boolean hasIdentifier() { 
3757      if (this.identifier == null)
3758        return false;
3759      for (Identifier item : this.identifier)
3760        if (!item.isEmpty())
3761          return true;
3762      return false;
3763    }
3764
3765    public Identifier addIdentifier() { //3
3766      Identifier t = new Identifier();
3767      if (this.identifier == null)
3768        this.identifier = new ArrayList<Identifier>();
3769      this.identifier.add(t);
3770      return t;
3771    }
3772
3773    public ExampleScenario addIdentifier(Identifier t) { //3
3774      if (t == null)
3775        return this;
3776      if (this.identifier == null)
3777        this.identifier = new ArrayList<Identifier>();
3778      this.identifier.add(t);
3779      return this;
3780    }
3781
3782    /**
3783     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
3784     */
3785    public Identifier getIdentifierFirstRep() { 
3786      if (getIdentifier().isEmpty()) {
3787        addIdentifier();
3788      }
3789      return getIdentifier().get(0);
3790    }
3791
3792    /**
3793     * @return {@link #version} (The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
3794     */
3795    public StringType getVersionElement() { 
3796      if (this.version == null)
3797        if (Configuration.errorOnAutoCreate())
3798          throw new Error("Attempt to auto-create ExampleScenario.version");
3799        else if (Configuration.doAutoCreate())
3800          this.version = new StringType(); // bb
3801      return this.version;
3802    }
3803
3804    public boolean hasVersionElement() { 
3805      return this.version != null && !this.version.isEmpty();
3806    }
3807
3808    public boolean hasVersion() { 
3809      return this.version != null && !this.version.isEmpty();
3810    }
3811
3812    /**
3813     * @param value {@link #version} (The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
3814     */
3815    public ExampleScenario setVersionElement(StringType value) { 
3816      this.version = value;
3817      return this;
3818    }
3819
3820    /**
3821     * @return The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.
3822     */
3823    public String getVersion() { 
3824      return this.version == null ? null : this.version.getValue();
3825    }
3826
3827    /**
3828     * @param value The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.
3829     */
3830    public ExampleScenario setVersion(String value) { 
3831      if (Utilities.noString(value))
3832        this.version = null;
3833      else {
3834        if (this.version == null)
3835          this.version = new StringType();
3836        this.version.setValue(value);
3837      }
3838      return this;
3839    }
3840
3841    /**
3842     * @return {@link #name} (A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
3843     */
3844    public StringType getNameElement() { 
3845      if (this.name == null)
3846        if (Configuration.errorOnAutoCreate())
3847          throw new Error("Attempt to auto-create ExampleScenario.name");
3848        else if (Configuration.doAutoCreate())
3849          this.name = new StringType(); // bb
3850      return this.name;
3851    }
3852
3853    public boolean hasNameElement() { 
3854      return this.name != null && !this.name.isEmpty();
3855    }
3856
3857    public boolean hasName() { 
3858      return this.name != null && !this.name.isEmpty();
3859    }
3860
3861    /**
3862     * @param value {@link #name} (A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
3863     */
3864    public ExampleScenario setNameElement(StringType value) { 
3865      this.name = value;
3866      return this;
3867    }
3868
3869    /**
3870     * @return A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation.
3871     */
3872    public String getName() { 
3873      return this.name == null ? null : this.name.getValue();
3874    }
3875
3876    /**
3877     * @param value A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation.
3878     */
3879    public ExampleScenario setName(String value) { 
3880      if (Utilities.noString(value))
3881        this.name = null;
3882      else {
3883        if (this.name == null)
3884          this.name = new StringType();
3885        this.name.setValue(value);
3886      }
3887      return this;
3888    }
3889
3890    /**
3891     * @return {@link #status} (The status of this example scenario. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
3892     */
3893    public Enumeration<PublicationStatus> getStatusElement() { 
3894      if (this.status == null)
3895        if (Configuration.errorOnAutoCreate())
3896          throw new Error("Attempt to auto-create ExampleScenario.status");
3897        else if (Configuration.doAutoCreate())
3898          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
3899      return this.status;
3900    }
3901
3902    public boolean hasStatusElement() { 
3903      return this.status != null && !this.status.isEmpty();
3904    }
3905
3906    public boolean hasStatus() { 
3907      return this.status != null && !this.status.isEmpty();
3908    }
3909
3910    /**
3911     * @param value {@link #status} (The status of this example scenario. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
3912     */
3913    public ExampleScenario setStatusElement(Enumeration<PublicationStatus> value) { 
3914      this.status = value;
3915      return this;
3916    }
3917
3918    /**
3919     * @return The status of this example scenario. Enables tracking the life-cycle of the content.
3920     */
3921    public PublicationStatus getStatus() { 
3922      return this.status == null ? null : this.status.getValue();
3923    }
3924
3925    /**
3926     * @param value The status of this example scenario. Enables tracking the life-cycle of the content.
3927     */
3928    public ExampleScenario setStatus(PublicationStatus value) { 
3929        if (this.status == null)
3930          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
3931        this.status.setValue(value);
3932      return this;
3933    }
3934
3935    /**
3936     * @return {@link #experimental} (A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
3937     */
3938    public BooleanType getExperimentalElement() { 
3939      if (this.experimental == null)
3940        if (Configuration.errorOnAutoCreate())
3941          throw new Error("Attempt to auto-create ExampleScenario.experimental");
3942        else if (Configuration.doAutoCreate())
3943          this.experimental = new BooleanType(); // bb
3944      return this.experimental;
3945    }
3946
3947    public boolean hasExperimentalElement() { 
3948      return this.experimental != null && !this.experimental.isEmpty();
3949    }
3950
3951    public boolean hasExperimental() { 
3952      return this.experimental != null && !this.experimental.isEmpty();
3953    }
3954
3955    /**
3956     * @param value {@link #experimental} (A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
3957     */
3958    public ExampleScenario setExperimentalElement(BooleanType value) { 
3959      this.experimental = value;
3960      return this;
3961    }
3962
3963    /**
3964     * @return A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
3965     */
3966    public boolean getExperimental() { 
3967      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
3968    }
3969
3970    /**
3971     * @param value A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
3972     */
3973    public ExampleScenario setExperimental(boolean value) { 
3974        if (this.experimental == null)
3975          this.experimental = new BooleanType();
3976        this.experimental.setValue(value);
3977      return this;
3978    }
3979
3980    /**
3981     * @return {@link #date} (The date  (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
3982     */
3983    public DateTimeType getDateElement() { 
3984      if (this.date == null)
3985        if (Configuration.errorOnAutoCreate())
3986          throw new Error("Attempt to auto-create ExampleScenario.date");
3987        else if (Configuration.doAutoCreate())
3988          this.date = new DateTimeType(); // bb
3989      return this.date;
3990    }
3991
3992    public boolean hasDateElement() { 
3993      return this.date != null && !this.date.isEmpty();
3994    }
3995
3996    public boolean hasDate() { 
3997      return this.date != null && !this.date.isEmpty();
3998    }
3999
4000    /**
4001     * @param value {@link #date} (The date  (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
4002     */
4003    public ExampleScenario setDateElement(DateTimeType value) { 
4004      this.date = value;
4005      return this;
4006    }
4007
4008    /**
4009     * @return The date  (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').
4010     */
4011    public Date getDate() { 
4012      return this.date == null ? null : this.date.getValue();
4013    }
4014
4015    /**
4016     * @param value The date  (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').
4017     */
4018    public ExampleScenario setDate(Date value) { 
4019      if (value == null)
4020        this.date = null;
4021      else {
4022        if (this.date == null)
4023          this.date = new DateTimeType();
4024        this.date.setValue(value);
4025      }
4026      return this;
4027    }
4028
4029    /**
4030     * @return {@link #publisher} (The name of the organization or individual that published the example scenario.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
4031     */
4032    public StringType getPublisherElement() { 
4033      if (this.publisher == null)
4034        if (Configuration.errorOnAutoCreate())
4035          throw new Error("Attempt to auto-create ExampleScenario.publisher");
4036        else if (Configuration.doAutoCreate())
4037          this.publisher = new StringType(); // bb
4038      return this.publisher;
4039    }
4040
4041    public boolean hasPublisherElement() { 
4042      return this.publisher != null && !this.publisher.isEmpty();
4043    }
4044
4045    public boolean hasPublisher() { 
4046      return this.publisher != null && !this.publisher.isEmpty();
4047    }
4048
4049    /**
4050     * @param value {@link #publisher} (The name of the organization or individual that published the example scenario.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
4051     */
4052    public ExampleScenario setPublisherElement(StringType value) { 
4053      this.publisher = value;
4054      return this;
4055    }
4056
4057    /**
4058     * @return The name of the organization or individual that published the example scenario.
4059     */
4060    public String getPublisher() { 
4061      return this.publisher == null ? null : this.publisher.getValue();
4062    }
4063
4064    /**
4065     * @param value The name of the organization or individual that published the example scenario.
4066     */
4067    public ExampleScenario setPublisher(String value) { 
4068      if (Utilities.noString(value))
4069        this.publisher = null;
4070      else {
4071        if (this.publisher == null)
4072          this.publisher = new StringType();
4073        this.publisher.setValue(value);
4074      }
4075      return this;
4076    }
4077
4078    /**
4079     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
4080     */
4081    public List<ContactDetail> getContact() { 
4082      if (this.contact == null)
4083        this.contact = new ArrayList<ContactDetail>();
4084      return this.contact;
4085    }
4086
4087    /**
4088     * @return Returns a reference to <code>this</code> for easy method chaining
4089     */
4090    public ExampleScenario setContact(List<ContactDetail> theContact) { 
4091      this.contact = theContact;
4092      return this;
4093    }
4094
4095    public boolean hasContact() { 
4096      if (this.contact == null)
4097        return false;
4098      for (ContactDetail item : this.contact)
4099        if (!item.isEmpty())
4100          return true;
4101      return false;
4102    }
4103
4104    public ContactDetail addContact() { //3
4105      ContactDetail t = new ContactDetail();
4106      if (this.contact == null)
4107        this.contact = new ArrayList<ContactDetail>();
4108      this.contact.add(t);
4109      return t;
4110    }
4111
4112    public ExampleScenario addContact(ContactDetail t) { //3
4113      if (t == null)
4114        return this;
4115      if (this.contact == null)
4116        this.contact = new ArrayList<ContactDetail>();
4117      this.contact.add(t);
4118      return this;
4119    }
4120
4121    /**
4122     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {3}
4123     */
4124    public ContactDetail getContactFirstRep() { 
4125      if (getContact().isEmpty()) {
4126        addContact();
4127      }
4128      return getContact().get(0);
4129    }
4130
4131    /**
4132     * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate example scenario instances.)
4133     */
4134    public List<UsageContext> getUseContext() { 
4135      if (this.useContext == null)
4136        this.useContext = new ArrayList<UsageContext>();
4137      return this.useContext;
4138    }
4139
4140    /**
4141     * @return Returns a reference to <code>this</code> for easy method chaining
4142     */
4143    public ExampleScenario setUseContext(List<UsageContext> theUseContext) { 
4144      this.useContext = theUseContext;
4145      return this;
4146    }
4147
4148    public boolean hasUseContext() { 
4149      if (this.useContext == null)
4150        return false;
4151      for (UsageContext item : this.useContext)
4152        if (!item.isEmpty())
4153          return true;
4154      return false;
4155    }
4156
4157    public UsageContext addUseContext() { //3
4158      UsageContext t = new UsageContext();
4159      if (this.useContext == null)
4160        this.useContext = new ArrayList<UsageContext>();
4161      this.useContext.add(t);
4162      return t;
4163    }
4164
4165    public ExampleScenario addUseContext(UsageContext t) { //3
4166      if (t == null)
4167        return this;
4168      if (this.useContext == null)
4169        this.useContext = new ArrayList<UsageContext>();
4170      this.useContext.add(t);
4171      return this;
4172    }
4173
4174    /**
4175     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist {3}
4176     */
4177    public UsageContext getUseContextFirstRep() { 
4178      if (getUseContext().isEmpty()) {
4179        addUseContext();
4180      }
4181      return getUseContext().get(0);
4182    }
4183
4184    /**
4185     * @return {@link #jurisdiction} (A legal or geographic region in which the example scenario is intended to be used.)
4186     */
4187    public List<CodeableConcept> getJurisdiction() { 
4188      if (this.jurisdiction == null)
4189        this.jurisdiction = new ArrayList<CodeableConcept>();
4190      return this.jurisdiction;
4191    }
4192
4193    /**
4194     * @return Returns a reference to <code>this</code> for easy method chaining
4195     */
4196    public ExampleScenario setJurisdiction(List<CodeableConcept> theJurisdiction) { 
4197      this.jurisdiction = theJurisdiction;
4198      return this;
4199    }
4200
4201    public boolean hasJurisdiction() { 
4202      if (this.jurisdiction == null)
4203        return false;
4204      for (CodeableConcept item : this.jurisdiction)
4205        if (!item.isEmpty())
4206          return true;
4207      return false;
4208    }
4209
4210    public CodeableConcept addJurisdiction() { //3
4211      CodeableConcept t = new CodeableConcept();
4212      if (this.jurisdiction == null)
4213        this.jurisdiction = new ArrayList<CodeableConcept>();
4214      this.jurisdiction.add(t);
4215      return t;
4216    }
4217
4218    public ExampleScenario addJurisdiction(CodeableConcept t) { //3
4219      if (t == null)
4220        return this;
4221      if (this.jurisdiction == null)
4222        this.jurisdiction = new ArrayList<CodeableConcept>();
4223      this.jurisdiction.add(t);
4224      return this;
4225    }
4226
4227    /**
4228     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist {3}
4229     */
4230    public CodeableConcept getJurisdictionFirstRep() { 
4231      if (getJurisdiction().isEmpty()) {
4232        addJurisdiction();
4233      }
4234      return getJurisdiction().get(0);
4235    }
4236
4237    /**
4238     * @return {@link #purpose} (What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
4239     */
4240    public MarkdownType getPurposeElement() { 
4241      if (this.purpose == null)
4242        if (Configuration.errorOnAutoCreate())
4243          throw new Error("Attempt to auto-create ExampleScenario.purpose");
4244        else if (Configuration.doAutoCreate())
4245          this.purpose = new MarkdownType(); // bb
4246      return this.purpose;
4247    }
4248
4249    public boolean hasPurposeElement() { 
4250      return this.purpose != null && !this.purpose.isEmpty();
4251    }
4252
4253    public boolean hasPurpose() { 
4254      return this.purpose != null && !this.purpose.isEmpty();
4255    }
4256
4257    /**
4258     * @param value {@link #purpose} (What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
4259     */
4260    public ExampleScenario setPurposeElement(MarkdownType value) { 
4261      this.purpose = value;
4262      return this;
4263    }
4264
4265    /**
4266     * @return What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.
4267     */
4268    public String getPurpose() { 
4269      return this.purpose == null ? null : this.purpose.getValue();
4270    }
4271
4272    /**
4273     * @param value What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.
4274     */
4275    public ExampleScenario setPurpose(String value) { 
4276      if (value == null)
4277        this.purpose = null;
4278      else {
4279        if (this.purpose == null)
4280          this.purpose = new MarkdownType();
4281        this.purpose.setValue(value);
4282      }
4283      return this;
4284    }
4285
4286    /**
4287     * @return {@link #copyright} (A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
4288     */
4289    public MarkdownType getCopyrightElement() { 
4290      if (this.copyright == null)
4291        if (Configuration.errorOnAutoCreate())
4292          throw new Error("Attempt to auto-create ExampleScenario.copyright");
4293        else if (Configuration.doAutoCreate())
4294          this.copyright = new MarkdownType(); // bb
4295      return this.copyright;
4296    }
4297
4298    public boolean hasCopyrightElement() { 
4299      return this.copyright != null && !this.copyright.isEmpty();
4300    }
4301
4302    public boolean hasCopyright() { 
4303      return this.copyright != null && !this.copyright.isEmpty();
4304    }
4305
4306    /**
4307     * @param value {@link #copyright} (A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
4308     */
4309    public ExampleScenario setCopyrightElement(MarkdownType value) { 
4310      this.copyright = value;
4311      return this;
4312    }
4313
4314    /**
4315     * @return A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.
4316     */
4317    public String getCopyright() { 
4318      return this.copyright == null ? null : this.copyright.getValue();
4319    }
4320
4321    /**
4322     * @param value A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.
4323     */
4324    public ExampleScenario setCopyright(String value) { 
4325      if (value == null)
4326        this.copyright = null;
4327      else {
4328        if (this.copyright == null)
4329          this.copyright = new MarkdownType();
4330        this.copyright.setValue(value);
4331      }
4332      return this;
4333    }
4334
4335    /**
4336     * @return {@link #actor} (Actor participating in the resource.)
4337     */
4338    public List<ExampleScenarioActorComponent> getActor() { 
4339      if (this.actor == null)
4340        this.actor = new ArrayList<ExampleScenarioActorComponent>();
4341      return this.actor;
4342    }
4343
4344    /**
4345     * @return Returns a reference to <code>this</code> for easy method chaining
4346     */
4347    public ExampleScenario setActor(List<ExampleScenarioActorComponent> theActor) { 
4348      this.actor = theActor;
4349      return this;
4350    }
4351
4352    public boolean hasActor() { 
4353      if (this.actor == null)
4354        return false;
4355      for (ExampleScenarioActorComponent item : this.actor)
4356        if (!item.isEmpty())
4357          return true;
4358      return false;
4359    }
4360
4361    public ExampleScenarioActorComponent addActor() { //3
4362      ExampleScenarioActorComponent t = new ExampleScenarioActorComponent();
4363      if (this.actor == null)
4364        this.actor = new ArrayList<ExampleScenarioActorComponent>();
4365      this.actor.add(t);
4366      return t;
4367    }
4368
4369    public ExampleScenario addActor(ExampleScenarioActorComponent t) { //3
4370      if (t == null)
4371        return this;
4372      if (this.actor == null)
4373        this.actor = new ArrayList<ExampleScenarioActorComponent>();
4374      this.actor.add(t);
4375      return this;
4376    }
4377
4378    /**
4379     * @return The first repetition of repeating field {@link #actor}, creating it if it does not already exist {3}
4380     */
4381    public ExampleScenarioActorComponent getActorFirstRep() { 
4382      if (getActor().isEmpty()) {
4383        addActor();
4384      }
4385      return getActor().get(0);
4386    }
4387
4388    /**
4389     * @return {@link #instance} (Each resource and each version that is present in the workflow.)
4390     */
4391    public List<ExampleScenarioInstanceComponent> getInstance() { 
4392      if (this.instance == null)
4393        this.instance = new ArrayList<ExampleScenarioInstanceComponent>();
4394      return this.instance;
4395    }
4396
4397    /**
4398     * @return Returns a reference to <code>this</code> for easy method chaining
4399     */
4400    public ExampleScenario setInstance(List<ExampleScenarioInstanceComponent> theInstance) { 
4401      this.instance = theInstance;
4402      return this;
4403    }
4404
4405    public boolean hasInstance() { 
4406      if (this.instance == null)
4407        return false;
4408      for (ExampleScenarioInstanceComponent item : this.instance)
4409        if (!item.isEmpty())
4410          return true;
4411      return false;
4412    }
4413
4414    public ExampleScenarioInstanceComponent addInstance() { //3
4415      ExampleScenarioInstanceComponent t = new ExampleScenarioInstanceComponent();
4416      if (this.instance == null)
4417        this.instance = new ArrayList<ExampleScenarioInstanceComponent>();
4418      this.instance.add(t);
4419      return t;
4420    }
4421
4422    public ExampleScenario addInstance(ExampleScenarioInstanceComponent t) { //3
4423      if (t == null)
4424        return this;
4425      if (this.instance == null)
4426        this.instance = new ArrayList<ExampleScenarioInstanceComponent>();
4427      this.instance.add(t);
4428      return this;
4429    }
4430
4431    /**
4432     * @return The first repetition of repeating field {@link #instance}, creating it if it does not already exist {3}
4433     */
4434    public ExampleScenarioInstanceComponent getInstanceFirstRep() { 
4435      if (getInstance().isEmpty()) {
4436        addInstance();
4437      }
4438      return getInstance().get(0);
4439    }
4440
4441    /**
4442     * @return {@link #process} (Each major process - a group of operations.)
4443     */
4444    public List<ExampleScenarioProcessComponent> getProcess() { 
4445      if (this.process == null)
4446        this.process = new ArrayList<ExampleScenarioProcessComponent>();
4447      return this.process;
4448    }
4449
4450    /**
4451     * @return Returns a reference to <code>this</code> for easy method chaining
4452     */
4453    public ExampleScenario setProcess(List<ExampleScenarioProcessComponent> theProcess) { 
4454      this.process = theProcess;
4455      return this;
4456    }
4457
4458    public boolean hasProcess() { 
4459      if (this.process == null)
4460        return false;
4461      for (ExampleScenarioProcessComponent item : this.process)
4462        if (!item.isEmpty())
4463          return true;
4464      return false;
4465    }
4466
4467    public ExampleScenarioProcessComponent addProcess() { //3
4468      ExampleScenarioProcessComponent t = new ExampleScenarioProcessComponent();
4469      if (this.process == null)
4470        this.process = new ArrayList<ExampleScenarioProcessComponent>();
4471      this.process.add(t);
4472      return t;
4473    }
4474
4475    public ExampleScenario addProcess(ExampleScenarioProcessComponent t) { //3
4476      if (t == null)
4477        return this;
4478      if (this.process == null)
4479        this.process = new ArrayList<ExampleScenarioProcessComponent>();
4480      this.process.add(t);
4481      return this;
4482    }
4483
4484    /**
4485     * @return The first repetition of repeating field {@link #process}, creating it if it does not already exist {3}
4486     */
4487    public ExampleScenarioProcessComponent getProcessFirstRep() { 
4488      if (getProcess().isEmpty()) {
4489        addProcess();
4490      }
4491      return getProcess().get(0);
4492    }
4493
4494    /**
4495     * @return {@link #workflow} (Another nested workflow.)
4496     */
4497    public List<CanonicalType> getWorkflow() { 
4498      if (this.workflow == null)
4499        this.workflow = new ArrayList<CanonicalType>();
4500      return this.workflow;
4501    }
4502
4503    /**
4504     * @return Returns a reference to <code>this</code> for easy method chaining
4505     */
4506    public ExampleScenario setWorkflow(List<CanonicalType> theWorkflow) { 
4507      this.workflow = theWorkflow;
4508      return this;
4509    }
4510
4511    public boolean hasWorkflow() { 
4512      if (this.workflow == null)
4513        return false;
4514      for (CanonicalType item : this.workflow)
4515        if (!item.isEmpty())
4516          return true;
4517      return false;
4518    }
4519
4520    /**
4521     * @return {@link #workflow} (Another nested workflow.)
4522     */
4523    public CanonicalType addWorkflowElement() {//2 
4524      CanonicalType t = new CanonicalType();
4525      if (this.workflow == null)
4526        this.workflow = new ArrayList<CanonicalType>();
4527      this.workflow.add(t);
4528      return t;
4529    }
4530
4531    /**
4532     * @param value {@link #workflow} (Another nested workflow.)
4533     */
4534    public ExampleScenario addWorkflow(String value) { //1
4535      CanonicalType t = new CanonicalType();
4536      t.setValue(value);
4537      if (this.workflow == null)
4538        this.workflow = new ArrayList<CanonicalType>();
4539      this.workflow.add(t);
4540      return this;
4541    }
4542
4543    /**
4544     * @param value {@link #workflow} (Another nested workflow.)
4545     */
4546    public boolean hasWorkflow(String value) { 
4547      if (this.workflow == null)
4548        return false;
4549      for (CanonicalType v : this.workflow)
4550        if (v.getValue().equals(value)) // canonical
4551          return true;
4552      return false;
4553    }
4554
4555    /**
4556     * not supported on this implementation
4557     */
4558    @Override
4559    public int getTitleMax() { 
4560      return 0;
4561    }
4562    /**
4563     * @return {@link #title} (A short, descriptive, user-friendly title for the example scenario.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
4564     */
4565    public StringType getTitleElement() { 
4566      throw new Error("The resource type \"ExampleScenario\" does not implement the property \"title\"");
4567    }
4568
4569    public boolean hasTitleElement() { 
4570      return false;
4571    }
4572    public boolean hasTitle() {
4573      return false;
4574    }
4575
4576    /**
4577     * @param value {@link #title} (A short, descriptive, user-friendly title for the example scenario.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
4578     */
4579    public ExampleScenario setTitleElement(StringType value) { 
4580      throw new Error("The resource type \"ExampleScenario\" does not implement the property \"title\"");
4581    }
4582    public String getTitle() { 
4583      throw new Error("The resource type \"ExampleScenario\" does not implement the property \"title\"");
4584    }
4585    /**
4586     * @param value A short, descriptive, user-friendly title for the example scenario.
4587     */
4588    public ExampleScenario setTitle(String value) { 
4589      throw new Error("The resource type \"ExampleScenario\" does not implement the property \"title\"");
4590    }
4591    /**
4592     * not supported on this implementation
4593     */
4594    @Override
4595    public int getDescriptionMax() { 
4596      return 0;
4597    }
4598    /**
4599     * @return {@link #description} (A free text natural language description of the example scenario from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
4600     */
4601    public MarkdownType getDescriptionElement() { 
4602      throw new Error("The resource type \"ExampleScenario\" does not implement the property \"description\"");
4603    }
4604
4605    public boolean hasDescriptionElement() { 
4606      return false;
4607    }
4608    public boolean hasDescription() {
4609      return false;
4610    }
4611
4612    /**
4613     * @param value {@link #description} (A free text natural language description of the example scenario from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
4614     */
4615    public ExampleScenario setDescriptionElement(MarkdownType value) { 
4616      throw new Error("The resource type \"ExampleScenario\" does not implement the property \"description\"");
4617    }
4618    public String getDescription() { 
4619      throw new Error("The resource type \"ExampleScenario\" does not implement the property \"description\"");
4620    }
4621    /**
4622     * @param value A free text natural language description of the example scenario from a consumer's perspective.
4623     */
4624    public ExampleScenario setDescription(String value) { 
4625      throw new Error("The resource type \"ExampleScenario\" does not implement the property \"description\"");
4626    }
4627      protected void listChildren(List<Property> children) {
4628        super.listChildren(children);
4629        children.add(new Property("url", "uri", "An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers.", 0, 1, url));
4630        children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier));
4631        children.add(new Property("version", "string", "The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version));
4632        children.add(new Property("name", "string", "A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name));
4633        children.add(new Property("status", "code", "The status of this example scenario. Enables tracking the life-cycle of the content.", 0, 1, status));
4634        children.add(new Property("experimental", "boolean", "A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental));
4635        children.add(new Property("date", "dateTime", "The date  (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').", 0, 1, date));
4636        children.add(new Property("publisher", "string", "The name of the organization or individual that published the example scenario.", 0, 1, publisher));
4637        children.add(new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact));
4638        children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate example scenario instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
4639        children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the example scenario is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction));
4640        children.add(new Property("purpose", "markdown", "What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.", 0, 1, purpose));
4641        children.add(new Property("copyright", "markdown", "A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.", 0, 1, copyright));
4642        children.add(new Property("actor", "", "Actor participating in the resource.", 0, java.lang.Integer.MAX_VALUE, actor));
4643        children.add(new Property("instance", "", "Each resource and each version that is present in the workflow.", 0, java.lang.Integer.MAX_VALUE, instance));
4644        children.add(new Property("process", "", "Each major process - a group of operations.", 0, java.lang.Integer.MAX_VALUE, process));
4645        children.add(new Property("workflow", "canonical(ExampleScenario)", "Another nested workflow.", 0, java.lang.Integer.MAX_VALUE, workflow));
4646      }
4647
4648      @Override
4649      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4650        switch (_hash) {
4651        case 116079: /*url*/  return new Property("url", "uri", "An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers.", 0, 1, url);
4652        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A formal identifier that is used to identify this example scenario when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier);
4653        case 351608024: /*version*/  return new Property("version", "string", "The identifier that is used to identify this version of the example scenario when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the example scenario author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version);
4654        case 3373707: /*name*/  return new Property("name", "string", "A natural language name identifying the example scenario. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name);
4655        case -892481550: /*status*/  return new Property("status", "code", "The status of this example scenario. Enables tracking the life-cycle of the content.", 0, 1, status);
4656        case -404562712: /*experimental*/  return new Property("experimental", "boolean", "A Boolean value to indicate that this example scenario is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental);
4657        case 3076014: /*date*/  return new Property("date", "dateTime", "The date  (and optionally time) when the example scenario was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the example scenario changes. (e.g. the 'content logical definition').", 0, 1, date);
4658        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the organization or individual that published the example scenario.", 0, 1, publisher);
4659        case 951526432: /*contact*/  return new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact);
4660        case -669707736: /*useContext*/  return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate example scenario instances.", 0, java.lang.Integer.MAX_VALUE, useContext);
4661        case -507075711: /*jurisdiction*/  return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the example scenario is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction);
4662        case -220463842: /*purpose*/  return new Property("purpose", "markdown", "What the example scenario resource is created for. This should not be used to show the business purpose of the scenario itself, but the purpose of documenting a scenario.", 0, 1, purpose);
4663        case 1522889671: /*copyright*/  return new Property("copyright", "markdown", "A copyright statement relating to the example scenario and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the example scenario.", 0, 1, copyright);
4664        case 92645877: /*actor*/  return new Property("actor", "", "Actor participating in the resource.", 0, java.lang.Integer.MAX_VALUE, actor);
4665        case 555127957: /*instance*/  return new Property("instance", "", "Each resource and each version that is present in the workflow.", 0, java.lang.Integer.MAX_VALUE, instance);
4666        case -309518737: /*process*/  return new Property("process", "", "Each major process - a group of operations.", 0, java.lang.Integer.MAX_VALUE, process);
4667        case 35379135: /*workflow*/  return new Property("workflow", "canonical(ExampleScenario)", "Another nested workflow.", 0, java.lang.Integer.MAX_VALUE, workflow);
4668        default: return super.getNamedProperty(_hash, _name, _checkValid);
4669        }
4670
4671      }
4672
4673      @Override
4674      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4675        switch (hash) {
4676        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
4677        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
4678        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
4679        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
4680        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
4681        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
4682        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
4683        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
4684        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
4685        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
4686        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
4687        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
4688        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType
4689        case 92645877: /*actor*/ return this.actor == null ? new Base[0] : this.actor.toArray(new Base[this.actor.size()]); // ExampleScenarioActorComponent
4690        case 555127957: /*instance*/ return this.instance == null ? new Base[0] : this.instance.toArray(new Base[this.instance.size()]); // ExampleScenarioInstanceComponent
4691        case -309518737: /*process*/ return this.process == null ? new Base[0] : this.process.toArray(new Base[this.process.size()]); // ExampleScenarioProcessComponent
4692        case 35379135: /*workflow*/ return this.workflow == null ? new Base[0] : this.workflow.toArray(new Base[this.workflow.size()]); // CanonicalType
4693        default: return super.getProperty(hash, name, checkValid);
4694        }
4695
4696      }
4697
4698      @Override
4699      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4700        switch (hash) {
4701        case 116079: // url
4702          this.url = TypeConvertor.castToUri(value); // UriType
4703          return value;
4704        case -1618432855: // identifier
4705          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
4706          return value;
4707        case 351608024: // version
4708          this.version = TypeConvertor.castToString(value); // StringType
4709          return value;
4710        case 3373707: // name
4711          this.name = TypeConvertor.castToString(value); // StringType
4712          return value;
4713        case -892481550: // status
4714          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
4715          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
4716          return value;
4717        case -404562712: // experimental
4718          this.experimental = TypeConvertor.castToBoolean(value); // BooleanType
4719          return value;
4720        case 3076014: // date
4721          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
4722          return value;
4723        case 1447404028: // publisher
4724          this.publisher = TypeConvertor.castToString(value); // StringType
4725          return value;
4726        case 951526432: // contact
4727          this.getContact().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
4728          return value;
4729        case -669707736: // useContext
4730          this.getUseContext().add(TypeConvertor.castToUsageContext(value)); // UsageContext
4731          return value;
4732        case -507075711: // jurisdiction
4733          this.getJurisdiction().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
4734          return value;
4735        case -220463842: // purpose
4736          this.purpose = TypeConvertor.castToMarkdown(value); // MarkdownType
4737          return value;
4738        case 1522889671: // copyright
4739          this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType
4740          return value;
4741        case 92645877: // actor
4742          this.getActor().add((ExampleScenarioActorComponent) value); // ExampleScenarioActorComponent
4743          return value;
4744        case 555127957: // instance
4745          this.getInstance().add((ExampleScenarioInstanceComponent) value); // ExampleScenarioInstanceComponent
4746          return value;
4747        case -309518737: // process
4748          this.getProcess().add((ExampleScenarioProcessComponent) value); // ExampleScenarioProcessComponent
4749          return value;
4750        case 35379135: // workflow
4751          this.getWorkflow().add(TypeConvertor.castToCanonical(value)); // CanonicalType
4752          return value;
4753        default: return super.setProperty(hash, name, value);
4754        }
4755
4756      }
4757
4758      @Override
4759      public Base setProperty(String name, Base value) throws FHIRException {
4760        if (name.equals("url")) {
4761          this.url = TypeConvertor.castToUri(value); // UriType
4762        } else if (name.equals("identifier")) {
4763          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
4764        } else if (name.equals("version")) {
4765          this.version = TypeConvertor.castToString(value); // StringType
4766        } else if (name.equals("name")) {
4767          this.name = TypeConvertor.castToString(value); // StringType
4768        } else if (name.equals("status")) {
4769          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
4770          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
4771        } else if (name.equals("experimental")) {
4772          this.experimental = TypeConvertor.castToBoolean(value); // BooleanType
4773        } else if (name.equals("date")) {
4774          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
4775        } else if (name.equals("publisher")) {
4776          this.publisher = TypeConvertor.castToString(value); // StringType
4777        } else if (name.equals("contact")) {
4778          this.getContact().add(TypeConvertor.castToContactDetail(value));
4779        } else if (name.equals("useContext")) {
4780          this.getUseContext().add(TypeConvertor.castToUsageContext(value));
4781        } else if (name.equals("jurisdiction")) {
4782          this.getJurisdiction().add(TypeConvertor.castToCodeableConcept(value));
4783        } else if (name.equals("purpose")) {
4784          this.purpose = TypeConvertor.castToMarkdown(value); // MarkdownType
4785        } else if (name.equals("copyright")) {
4786          this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType
4787        } else if (name.equals("actor")) {
4788          this.getActor().add((ExampleScenarioActorComponent) value);
4789        } else if (name.equals("instance")) {
4790          this.getInstance().add((ExampleScenarioInstanceComponent) value);
4791        } else if (name.equals("process")) {
4792          this.getProcess().add((ExampleScenarioProcessComponent) value);
4793        } else if (name.equals("workflow")) {
4794          this.getWorkflow().add(TypeConvertor.castToCanonical(value));
4795        } else
4796          return super.setProperty(name, value);
4797        return value;
4798      }
4799
4800      @Override
4801      public Base makeProperty(int hash, String name) throws FHIRException {
4802        switch (hash) {
4803        case 116079:  return getUrlElement();
4804        case -1618432855:  return addIdentifier(); 
4805        case 351608024:  return getVersionElement();
4806        case 3373707:  return getNameElement();
4807        case -892481550:  return getStatusElement();
4808        case -404562712:  return getExperimentalElement();
4809        case 3076014:  return getDateElement();
4810        case 1447404028:  return getPublisherElement();
4811        case 951526432:  return addContact(); 
4812        case -669707736:  return addUseContext(); 
4813        case -507075711:  return addJurisdiction(); 
4814        case -220463842:  return getPurposeElement();
4815        case 1522889671:  return getCopyrightElement();
4816        case 92645877:  return addActor(); 
4817        case 555127957:  return addInstance(); 
4818        case -309518737:  return addProcess(); 
4819        case 35379135:  return addWorkflowElement();
4820        default: return super.makeProperty(hash, name);
4821        }
4822
4823      }
4824
4825      @Override
4826      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4827        switch (hash) {
4828        case 116079: /*url*/ return new String[] {"uri"};
4829        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
4830        case 351608024: /*version*/ return new String[] {"string"};
4831        case 3373707: /*name*/ return new String[] {"string"};
4832        case -892481550: /*status*/ return new String[] {"code"};
4833        case -404562712: /*experimental*/ return new String[] {"boolean"};
4834        case 3076014: /*date*/ return new String[] {"dateTime"};
4835        case 1447404028: /*publisher*/ return new String[] {"string"};
4836        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
4837        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
4838        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
4839        case -220463842: /*purpose*/ return new String[] {"markdown"};
4840        case 1522889671: /*copyright*/ return new String[] {"markdown"};
4841        case 92645877: /*actor*/ return new String[] {};
4842        case 555127957: /*instance*/ return new String[] {};
4843        case -309518737: /*process*/ return new String[] {};
4844        case 35379135: /*workflow*/ return new String[] {"canonical"};
4845        default: return super.getTypesForProperty(hash, name);
4846        }
4847
4848      }
4849
4850      @Override
4851      public Base addChild(String name) throws FHIRException {
4852        if (name.equals("url")) {
4853          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.url");
4854        }
4855        else if (name.equals("identifier")) {
4856          return addIdentifier();
4857        }
4858        else if (name.equals("version")) {
4859          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.version");
4860        }
4861        else if (name.equals("name")) {
4862          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.name");
4863        }
4864        else if (name.equals("status")) {
4865          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.status");
4866        }
4867        else if (name.equals("experimental")) {
4868          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.experimental");
4869        }
4870        else if (name.equals("date")) {
4871          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.date");
4872        }
4873        else if (name.equals("publisher")) {
4874          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.publisher");
4875        }
4876        else if (name.equals("contact")) {
4877          return addContact();
4878        }
4879        else if (name.equals("useContext")) {
4880          return addUseContext();
4881        }
4882        else if (name.equals("jurisdiction")) {
4883          return addJurisdiction();
4884        }
4885        else if (name.equals("purpose")) {
4886          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.purpose");
4887        }
4888        else if (name.equals("copyright")) {
4889          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.copyright");
4890        }
4891        else if (name.equals("actor")) {
4892          return addActor();
4893        }
4894        else if (name.equals("instance")) {
4895          return addInstance();
4896        }
4897        else if (name.equals("process")) {
4898          return addProcess();
4899        }
4900        else if (name.equals("workflow")) {
4901          throw new FHIRException("Cannot call addChild on a primitive type ExampleScenario.workflow");
4902        }
4903        else
4904          return super.addChild(name);
4905      }
4906
4907  public String fhirType() {
4908    return "ExampleScenario";
4909
4910  }
4911
4912      public ExampleScenario copy() {
4913        ExampleScenario dst = new ExampleScenario();
4914        copyValues(dst);
4915        return dst;
4916      }
4917
4918      public void copyValues(ExampleScenario dst) {
4919        super.copyValues(dst);
4920        dst.url = url == null ? null : url.copy();
4921        if (identifier != null) {
4922          dst.identifier = new ArrayList<Identifier>();
4923          for (Identifier i : identifier)
4924            dst.identifier.add(i.copy());
4925        };
4926        dst.version = version == null ? null : version.copy();
4927        dst.name = name == null ? null : name.copy();
4928        dst.status = status == null ? null : status.copy();
4929        dst.experimental = experimental == null ? null : experimental.copy();
4930        dst.date = date == null ? null : date.copy();
4931        dst.publisher = publisher == null ? null : publisher.copy();
4932        if (contact != null) {
4933          dst.contact = new ArrayList<ContactDetail>();
4934          for (ContactDetail i : contact)
4935            dst.contact.add(i.copy());
4936        };
4937        if (useContext != null) {
4938          dst.useContext = new ArrayList<UsageContext>();
4939          for (UsageContext i : useContext)
4940            dst.useContext.add(i.copy());
4941        };
4942        if (jurisdiction != null) {
4943          dst.jurisdiction = new ArrayList<CodeableConcept>();
4944          for (CodeableConcept i : jurisdiction)
4945            dst.jurisdiction.add(i.copy());
4946        };
4947        dst.purpose = purpose == null ? null : purpose.copy();
4948        dst.copyright = copyright == null ? null : copyright.copy();
4949        if (actor != null) {
4950          dst.actor = new ArrayList<ExampleScenarioActorComponent>();
4951          for (ExampleScenarioActorComponent i : actor)
4952            dst.actor.add(i.copy());
4953        };
4954        if (instance != null) {
4955          dst.instance = new ArrayList<ExampleScenarioInstanceComponent>();
4956          for (ExampleScenarioInstanceComponent i : instance)
4957            dst.instance.add(i.copy());
4958        };
4959        if (process != null) {
4960          dst.process = new ArrayList<ExampleScenarioProcessComponent>();
4961          for (ExampleScenarioProcessComponent i : process)
4962            dst.process.add(i.copy());
4963        };
4964        if (workflow != null) {
4965          dst.workflow = new ArrayList<CanonicalType>();
4966          for (CanonicalType i : workflow)
4967            dst.workflow.add(i.copy());
4968        };
4969      }
4970
4971      protected ExampleScenario typedCopy() {
4972        return copy();
4973      }
4974
4975      @Override
4976      public boolean equalsDeep(Base other_) {
4977        if (!super.equalsDeep(other_))
4978          return false;
4979        if (!(other_ instanceof ExampleScenario))
4980          return false;
4981        ExampleScenario o = (ExampleScenario) other_;
4982        return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true)
4983           && compareDeep(name, o.name, true) && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true)
4984           && compareDeep(date, o.date, true) && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true)
4985           && compareDeep(useContext, o.useContext, true) && compareDeep(jurisdiction, o.jurisdiction, true)
4986           && compareDeep(purpose, o.purpose, true) && compareDeep(copyright, o.copyright, true) && compareDeep(actor, o.actor, true)
4987           && compareDeep(instance, o.instance, true) && compareDeep(process, o.process, true) && compareDeep(workflow, o.workflow, true)
4988          ;
4989      }
4990
4991      @Override
4992      public boolean equalsShallow(Base other_) {
4993        if (!super.equalsShallow(other_))
4994          return false;
4995        if (!(other_ instanceof ExampleScenario))
4996          return false;
4997        ExampleScenario o = (ExampleScenario) other_;
4998        return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true)
4999           && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(date, o.date, true)
5000           && compareValues(publisher, o.publisher, true) && compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true)
5001           && compareValues(workflow, o.workflow, true);
5002      }
5003
5004      public boolean isEmpty() {
5005        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, identifier, version
5006          , name, status, experimental, date, publisher, contact, useContext, jurisdiction
5007          , purpose, copyright, actor, instance, process, workflow);
5008      }
5009
5010  @Override
5011  public ResourceType getResourceType() {
5012    return ResourceType.ExampleScenario;
5013   }
5014
5015 /**
5016   * Search parameter: <b>context-quantity</b>
5017   * <p>
5018   * Description: <b>A quantity- or range-valued use context assigned to the example scenario</b><br>
5019   * Type: <b>quantity</b><br>
5020   * Path: <b>(ExampleScenario.useContext.value as Quantity) | (ExampleScenario.useContext.value as Range)</b><br>
5021   * </p>
5022   */
5023  @SearchParamDefinition(name="context-quantity", path="(ExampleScenario.useContext.value as Quantity) | (ExampleScenario.useContext.value as Range)", description="A quantity- or range-valued use context assigned to the example scenario", type="quantity" )
5024  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
5025 /**
5026   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
5027   * <p>
5028   * Description: <b>A quantity- or range-valued use context assigned to the example scenario</b><br>
5029   * Type: <b>quantity</b><br>
5030   * Path: <b>(ExampleScenario.useContext.value as Quantity) | (ExampleScenario.useContext.value as Range)</b><br>
5031   * </p>
5032   */
5033  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY);
5034
5035 /**
5036   * Search parameter: <b>context-type-quantity</b>
5037   * <p>
5038   * Description: <b>A use context type and quantity- or range-based value assigned to the example scenario</b><br>
5039   * Type: <b>composite</b><br>
5040   * Path: <b>ExampleScenario.useContext</b><br>
5041   * </p>
5042   */
5043  @SearchParamDefinition(name="context-type-quantity", path="ExampleScenario.useContext", description="A use context type and quantity- or range-based value assigned to the example scenario", type="composite", compositeOf={"context-type", "context-quantity"} )
5044  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
5045 /**
5046   * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b>
5047   * <p>
5048   * Description: <b>A use context type and quantity- or range-based value assigned to the example scenario</b><br>
5049   * Type: <b>composite</b><br>
5050   * Path: <b>ExampleScenario.useContext</b><br>
5051   * </p>
5052   */
5053  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> CONTEXT_TYPE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(SP_CONTEXT_TYPE_QUANTITY);
5054
5055 /**
5056   * Search parameter: <b>context-type-value</b>
5057   * <p>
5058   * Description: <b>A use context type and value assigned to the example scenario</b><br>
5059   * Type: <b>composite</b><br>
5060   * Path: <b>ExampleScenario.useContext</b><br>
5061   * </p>
5062   */
5063  @SearchParamDefinition(name="context-type-value", path="ExampleScenario.useContext", description="A use context type and value assigned to the example scenario", type="composite", compositeOf={"context-type", "context"} )
5064  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
5065 /**
5066   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
5067   * <p>
5068   * Description: <b>A use context type and value assigned to the example scenario</b><br>
5069   * Type: <b>composite</b><br>
5070   * Path: <b>ExampleScenario.useContext</b><br>
5071   * </p>
5072   */
5073  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CONTEXT_TYPE_VALUE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_CONTEXT_TYPE_VALUE);
5074
5075 /**
5076   * Search parameter: <b>context-type</b>
5077   * <p>
5078   * Description: <b>A type of use context assigned to the example scenario</b><br>
5079   * Type: <b>token</b><br>
5080   * Path: <b>ExampleScenario.useContext.code</b><br>
5081   * </p>
5082   */
5083  @SearchParamDefinition(name="context-type", path="ExampleScenario.useContext.code", description="A type of use context assigned to the example scenario", type="token" )
5084  public static final String SP_CONTEXT_TYPE = "context-type";
5085 /**
5086   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
5087   * <p>
5088   * Description: <b>A type of use context assigned to the example scenario</b><br>
5089   * Type: <b>token</b><br>
5090   * Path: <b>ExampleScenario.useContext.code</b><br>
5091   * </p>
5092   */
5093  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE);
5094
5095 /**
5096   * Search parameter: <b>context</b>
5097   * <p>
5098   * Description: <b>A use context assigned to the example scenario</b><br>
5099   * Type: <b>token</b><br>
5100   * Path: <b>(ExampleScenario.useContext.value as CodeableConcept)</b><br>
5101   * </p>
5102   */
5103  @SearchParamDefinition(name="context", path="(ExampleScenario.useContext.value as CodeableConcept)", description="A use context assigned to the example scenario", type="token" )
5104  public static final String SP_CONTEXT = "context";
5105 /**
5106   * <b>Fluent Client</b> search parameter constant for <b>context</b>
5107   * <p>
5108   * Description: <b>A use context assigned to the example scenario</b><br>
5109   * Type: <b>token</b><br>
5110   * Path: <b>(ExampleScenario.useContext.value as CodeableConcept)</b><br>
5111   * </p>
5112   */
5113  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
5114
5115 /**
5116   * Search parameter: <b>date</b>
5117   * <p>
5118   * Description: <b>The example scenario publication date</b><br>
5119   * Type: <b>date</b><br>
5120   * Path: <b>ExampleScenario.date</b><br>
5121   * </p>
5122   */
5123  @SearchParamDefinition(name="date", path="ExampleScenario.date", description="The example scenario publication date", type="date" )
5124  public static final String SP_DATE = "date";
5125 /**
5126   * <b>Fluent Client</b> search parameter constant for <b>date</b>
5127   * <p>
5128   * Description: <b>The example scenario publication date</b><br>
5129   * Type: <b>date</b><br>
5130   * Path: <b>ExampleScenario.date</b><br>
5131   * </p>
5132   */
5133  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
5134
5135 /**
5136   * Search parameter: <b>identifier</b>
5137   * <p>
5138   * Description: <b>External identifier for the example scenario</b><br>
5139   * Type: <b>token</b><br>
5140   * Path: <b>ExampleScenario.identifier</b><br>
5141   * </p>
5142   */
5143  @SearchParamDefinition(name="identifier", path="ExampleScenario.identifier", description="External identifier for the example scenario", type="token" )
5144  public static final String SP_IDENTIFIER = "identifier";
5145 /**
5146   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
5147   * <p>
5148   * Description: <b>External identifier for the example scenario</b><br>
5149   * Type: <b>token</b><br>
5150   * Path: <b>ExampleScenario.identifier</b><br>
5151   * </p>
5152   */
5153  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
5154
5155 /**
5156   * Search parameter: <b>jurisdiction</b>
5157   * <p>
5158   * Description: <b>Intended jurisdiction for the example scenario</b><br>
5159   * Type: <b>token</b><br>
5160   * Path: <b>ExampleScenario.jurisdiction</b><br>
5161   * </p>
5162   */
5163  @SearchParamDefinition(name="jurisdiction", path="ExampleScenario.jurisdiction", description="Intended jurisdiction for the example scenario", type="token" )
5164  public static final String SP_JURISDICTION = "jurisdiction";
5165 /**
5166   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
5167   * <p>
5168   * Description: <b>Intended jurisdiction for the example scenario</b><br>
5169   * Type: <b>token</b><br>
5170   * Path: <b>ExampleScenario.jurisdiction</b><br>
5171   * </p>
5172   */
5173  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
5174
5175 /**
5176   * Search parameter: <b>name</b>
5177   * <p>
5178   * Description: <b>Computationally friendly name of the example scenario</b><br>
5179   * Type: <b>string</b><br>
5180   * Path: <b>ExampleScenario.name</b><br>
5181   * </p>
5182   */
5183  @SearchParamDefinition(name="name", path="ExampleScenario.name", description="Computationally friendly name of the example scenario", type="string" )
5184  public static final String SP_NAME = "name";
5185 /**
5186   * <b>Fluent Client</b> search parameter constant for <b>name</b>
5187   * <p>
5188   * Description: <b>Computationally friendly name of the example scenario</b><br>
5189   * Type: <b>string</b><br>
5190   * Path: <b>ExampleScenario.name</b><br>
5191   * </p>
5192   */
5193  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
5194
5195 /**
5196   * Search parameter: <b>publisher</b>
5197   * <p>
5198   * Description: <b>Name of the publisher of the example scenario</b><br>
5199   * Type: <b>string</b><br>
5200   * Path: <b>ExampleScenario.publisher</b><br>
5201   * </p>
5202   */
5203  @SearchParamDefinition(name="publisher", path="ExampleScenario.publisher", description="Name of the publisher of the example scenario", type="string" )
5204  public static final String SP_PUBLISHER = "publisher";
5205 /**
5206   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
5207   * <p>
5208   * Description: <b>Name of the publisher of the example scenario</b><br>
5209   * Type: <b>string</b><br>
5210   * Path: <b>ExampleScenario.publisher</b><br>
5211   * </p>
5212   */
5213  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
5214
5215 /**
5216   * Search parameter: <b>status</b>
5217   * <p>
5218   * Description: <b>The current status of the example scenario</b><br>
5219   * Type: <b>token</b><br>
5220   * Path: <b>ExampleScenario.status</b><br>
5221   * </p>
5222   */
5223  @SearchParamDefinition(name="status", path="ExampleScenario.status", description="The current status of the example scenario", type="token" )
5224  public static final String SP_STATUS = "status";
5225 /**
5226   * <b>Fluent Client</b> search parameter constant for <b>status</b>
5227   * <p>
5228   * Description: <b>The current status of the example scenario</b><br>
5229   * Type: <b>token</b><br>
5230   * Path: <b>ExampleScenario.status</b><br>
5231   * </p>
5232   */
5233  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
5234
5235 /**
5236   * Search parameter: <b>url</b>
5237   * <p>
5238   * Description: <b>The uri that identifies the example scenario</b><br>
5239   * Type: <b>uri</b><br>
5240   * Path: <b>ExampleScenario.url</b><br>
5241   * </p>
5242   */
5243  @SearchParamDefinition(name="url", path="ExampleScenario.url", description="The uri that identifies the example scenario", type="uri" )
5244  public static final String SP_URL = "url";
5245 /**
5246   * <b>Fluent Client</b> search parameter constant for <b>url</b>
5247   * <p>
5248   * Description: <b>The uri that identifies the example scenario</b><br>
5249   * Type: <b>uri</b><br>
5250   * Path: <b>ExampleScenario.url</b><br>
5251   * </p>
5252   */
5253  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
5254
5255 /**
5256   * Search parameter: <b>version</b>
5257   * <p>
5258   * Description: <b>The business version of the example scenario</b><br>
5259   * Type: <b>token</b><br>
5260   * Path: <b>ExampleScenario.version</b><br>
5261   * </p>
5262   */
5263  @SearchParamDefinition(name="version", path="ExampleScenario.version", description="The business version of the example scenario", type="token" )
5264  public static final String SP_VERSION = "version";
5265 /**
5266   * <b>Fluent Client</b> search parameter constant for <b>version</b>
5267   * <p>
5268   * Description: <b>The business version of the example scenario</b><br>
5269   * Type: <b>token</b><br>
5270   * Path: <b>ExampleScenario.version</b><br>
5271   * </p>
5272   */
5273  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
5274
5275
5276}
5277