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