001package org.hl7.fhir.r5.model;
002
003/*-
004 * #%L
005 * org.hl7.fhir.r5
006 * %%
007 * Copyright (C) 2014 - 2019 Health Level 7
008 * %%
009 * Licensed under the Apache License, Version 2.0 (the "License");
010 * you may not use this file except in compliance with the License.
011 * You may obtain a copy of the License at
012 * 
013 *      http://www.apache.org/licenses/LICENSE-2.0
014 * 
015 * Unless required by applicable law or agreed to in writing, software
016 * distributed under the License is distributed on an "AS IS" BASIS,
017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
018 * See the License for the specific language governing permissions and
019 * limitations under the License.
020 * #L%
021 */
022
023/*
024  Copyright (c) 2011+, HL7, Inc.
025  All rights reserved.
026  
027  Redistribution and use in source and binary forms, with or without modification, 
028  are permitted provided that the following conditions are met:
029  
030   * Redistributions of source code must retain the above copyright notice, this 
031     list of conditions and the following disclaimer.
032   * Redistributions in binary form must reproduce the above copyright notice, 
033     this list of conditions and the following disclaimer in the documentation 
034     and/or other materials provided with the distribution.
035   * Neither the name of HL7 nor the names of its contributors may be used to 
036     endorse or promote products derived from this software without specific 
037     prior written permission.
038  
039  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
040  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
041  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
042  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
043  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
044  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
045  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
046  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
047  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
048  POSSIBILITY OF SUCH DAMAGE.
049  
050*/
051
052// Generated on Thu, Dec 13, 2018 14:07+1100 for FHIR v4.0.0
053import java.util.ArrayList;
054import java.util.Date;
055import java.util.List;
056import org.hl7.fhir.exceptions.FHIRException;
057import org.hl7.fhir.instance.model.api.ICompositeType;
058
059import org.hl7.fhir.instance.model.api.IBaseDatatypeElement;
060import org.hl7.fhir.utilities.Utilities;
061import org.hl7.fhir.r5.model.Enumerations.*;
062import ca.uhn.fhir.model.api.annotation.ResourceDef;
063import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
064import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
065import ca.uhn.fhir.model.api.annotation.Child;
066import ca.uhn.fhir.model.api.annotation.ChildOrder;
067import ca.uhn.fhir.model.api.annotation.Description;
068import ca.uhn.fhir.model.api.annotation.Block;
069/**
070 * A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [[[CodeSystem]]] definitions and their use in [coded elements](terminologies.html).
071 */
072@ResourceDef(name="ValueSet", profile="http://hl7.org/fhir/StructureDefinition/ValueSet")
073@ChildOrder(names={"url", "identifier", "version", "name", "title", "status", "experimental", "date", "publisher", "contact", "description", "useContext", "jurisdiction", "immutable", "purpose", "copyright", "compose", "expansion"})
074public class ValueSet extends MetadataResource {
075
076    public enum FilterOperator {
077        /**
078         * The specified property of the code equals the provided value.
079         */
080        EQUAL, 
081        /**
082         * Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value, including the provided concept itself (include descendant codes and self).
083         */
084        ISA, 
085        /**
086         * Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value, excluding the provided concept itself i.e. include descendant codes only).
087         */
088        DESCENDENTOF, 
089        /**
090         * The specified property of the code does not have an is-a relationship with the provided value.
091         */
092        ISNOTA, 
093        /**
094         * The specified property of the code  matches the regex specified in the provided value.
095         */
096        REGEX, 
097        /**
098         * The specified property of the code is in the set of codes or concepts specified in the provided value (comma separated list).
099         */
100        IN, 
101        /**
102         * The specified property of the code is not in the set of codes or concepts specified in the provided value (comma separated list).
103         */
104        NOTIN, 
105        /**
106         * Includes all concept ids that have a transitive is-a relationship from the concept Id provided as the value, including the provided concept itself (i.e. include ancestor codes and self).
107         */
108        GENERALIZES, 
109        /**
110         * The specified property of the code has at least one value (if the specified value is true; if the specified value is false, then matches when the specified property of the code has no values).
111         */
112        EXISTS, 
113        /**
114         * added to help the parsers with the generic types
115         */
116        NULL;
117        public static FilterOperator fromCode(String codeString) throws FHIRException {
118            if (codeString == null || "".equals(codeString))
119                return null;
120        if ("=".equals(codeString))
121          return EQUAL;
122        if ("is-a".equals(codeString))
123          return ISA;
124        if ("descendent-of".equals(codeString))
125          return DESCENDENTOF;
126        if ("is-not-a".equals(codeString))
127          return ISNOTA;
128        if ("regex".equals(codeString))
129          return REGEX;
130        if ("in".equals(codeString))
131          return IN;
132        if ("not-in".equals(codeString))
133          return NOTIN;
134        if ("generalizes".equals(codeString))
135          return GENERALIZES;
136        if ("exists".equals(codeString))
137          return EXISTS;
138        if (Configuration.isAcceptInvalidEnums())
139          return null;
140        else
141          throw new FHIRException("Unknown FilterOperator code '"+codeString+"'");
142        }
143        public String toCode() {
144          switch (this) {
145            case EQUAL: return "=";
146            case ISA: return "is-a";
147            case DESCENDENTOF: return "descendent-of";
148            case ISNOTA: return "is-not-a";
149            case REGEX: return "regex";
150            case IN: return "in";
151            case NOTIN: return "not-in";
152            case GENERALIZES: return "generalizes";
153            case EXISTS: return "exists";
154            default: return "?";
155          }
156        }
157        public String getSystem() {
158          switch (this) {
159            case EQUAL: return "http://hl7.org/fhir/filter-operator";
160            case ISA: return "http://hl7.org/fhir/filter-operator";
161            case DESCENDENTOF: return "http://hl7.org/fhir/filter-operator";
162            case ISNOTA: return "http://hl7.org/fhir/filter-operator";
163            case REGEX: return "http://hl7.org/fhir/filter-operator";
164            case IN: return "http://hl7.org/fhir/filter-operator";
165            case NOTIN: return "http://hl7.org/fhir/filter-operator";
166            case GENERALIZES: return "http://hl7.org/fhir/filter-operator";
167            case EXISTS: return "http://hl7.org/fhir/filter-operator";
168            default: return "?";
169          }
170        }
171        public String getDefinition() {
172          switch (this) {
173            case EQUAL: return "The specified property of the code equals the provided value.";
174            case ISA: return "Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value, including the provided concept itself (include descendant codes and self).";
175            case DESCENDENTOF: return "Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value, excluding the provided concept itself i.e. include descendant codes only).";
176            case ISNOTA: return "The specified property of the code does not have an is-a relationship with the provided value.";
177            case REGEX: return "The specified property of the code  matches the regex specified in the provided value.";
178            case IN: return "The specified property of the code is in the set of codes or concepts specified in the provided value (comma separated list).";
179            case NOTIN: return "The specified property of the code is not in the set of codes or concepts specified in the provided value (comma separated list).";
180            case GENERALIZES: return "Includes all concept ids that have a transitive is-a relationship from the concept Id provided as the value, including the provided concept itself (i.e. include ancestor codes and self).";
181            case EXISTS: return "The specified property of the code has at least one value (if the specified value is true; if the specified value is false, then matches when the specified property of the code has no values).";
182            default: return "?";
183          }
184        }
185        public String getDisplay() {
186          switch (this) {
187            case EQUAL: return "Equals";
188            case ISA: return "Is A (by subsumption)";
189            case DESCENDENTOF: return "Descendent Of (by subsumption)";
190            case ISNOTA: return "Not (Is A) (by subsumption)";
191            case REGEX: return "Regular Expression";
192            case IN: return "In Set";
193            case NOTIN: return "Not in Set";
194            case GENERALIZES: return "Generalizes (by Subsumption)";
195            case EXISTS: return "Exists";
196            default: return "?";
197          }
198        }
199    }
200
201  public static class FilterOperatorEnumFactory implements EnumFactory<FilterOperator> {
202    public FilterOperator fromCode(String codeString) throws IllegalArgumentException {
203      if (codeString == null || "".equals(codeString))
204            if (codeString == null || "".equals(codeString))
205                return null;
206        if ("=".equals(codeString))
207          return FilterOperator.EQUAL;
208        if ("is-a".equals(codeString))
209          return FilterOperator.ISA;
210        if ("descendent-of".equals(codeString))
211          return FilterOperator.DESCENDENTOF;
212        if ("is-not-a".equals(codeString))
213          return FilterOperator.ISNOTA;
214        if ("regex".equals(codeString))
215          return FilterOperator.REGEX;
216        if ("in".equals(codeString))
217          return FilterOperator.IN;
218        if ("not-in".equals(codeString))
219          return FilterOperator.NOTIN;
220        if ("generalizes".equals(codeString))
221          return FilterOperator.GENERALIZES;
222        if ("exists".equals(codeString))
223          return FilterOperator.EXISTS;
224        throw new IllegalArgumentException("Unknown FilterOperator code '"+codeString+"'");
225        }
226        public Enumeration<FilterOperator> fromType(Base code) throws FHIRException {
227          if (code == null)
228            return null;
229          if (code.isEmpty())
230            return new Enumeration<FilterOperator>(this);
231          String codeString = ((PrimitiveType) code).asStringValue();
232          if (codeString == null || "".equals(codeString))
233            return null;
234        if ("=".equals(codeString))
235          return new Enumeration<FilterOperator>(this, FilterOperator.EQUAL);
236        if ("is-a".equals(codeString))
237          return new Enumeration<FilterOperator>(this, FilterOperator.ISA);
238        if ("descendent-of".equals(codeString))
239          return new Enumeration<FilterOperator>(this, FilterOperator.DESCENDENTOF);
240        if ("is-not-a".equals(codeString))
241          return new Enumeration<FilterOperator>(this, FilterOperator.ISNOTA);
242        if ("regex".equals(codeString))
243          return new Enumeration<FilterOperator>(this, FilterOperator.REGEX);
244        if ("in".equals(codeString))
245          return new Enumeration<FilterOperator>(this, FilterOperator.IN);
246        if ("not-in".equals(codeString))
247          return new Enumeration<FilterOperator>(this, FilterOperator.NOTIN);
248        if ("generalizes".equals(codeString))
249          return new Enumeration<FilterOperator>(this, FilterOperator.GENERALIZES);
250        if ("exists".equals(codeString))
251          return new Enumeration<FilterOperator>(this, FilterOperator.EXISTS);
252        throw new FHIRException("Unknown FilterOperator code '"+codeString+"'");
253        }
254    public String toCode(FilterOperator code) {
255      if (code == FilterOperator.EQUAL)
256        return "=";
257      if (code == FilterOperator.ISA)
258        return "is-a";
259      if (code == FilterOperator.DESCENDENTOF)
260        return "descendent-of";
261      if (code == FilterOperator.ISNOTA)
262        return "is-not-a";
263      if (code == FilterOperator.REGEX)
264        return "regex";
265      if (code == FilterOperator.IN)
266        return "in";
267      if (code == FilterOperator.NOTIN)
268        return "not-in";
269      if (code == FilterOperator.GENERALIZES)
270        return "generalizes";
271      if (code == FilterOperator.EXISTS)
272        return "exists";
273      return "?";
274      }
275    public String toSystem(FilterOperator code) {
276      return code.getSystem();
277      }
278    }
279
280    @Block()
281    public static class ValueSetComposeComponent extends BackboneElement implements IBaseBackboneElement {
282        /**
283         * The Locked Date is  the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version.
284         */
285        @Child(name = "lockedDate", type = {DateType.class}, order=1, min=0, max=1, modifier=false, summary=true)
286        @Description(shortDefinition="Fixed date for references with no specified version (transitive)", formalDefinition="The Locked Date is  the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version." )
287        protected DateType lockedDate;
288
289        /**
290         * Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included).
291         */
292        @Child(name = "inactive", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=true)
293        @Description(shortDefinition="Whether inactive codes are in the value set", formalDefinition="Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included)." )
294        protected BooleanType inactive;
295
296        /**
297         * Include one or more codes from a code system or other value set(s).
298         */
299        @Child(name = "include", type = {}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
300        @Description(shortDefinition="Include one or more codes from a code system or other value set(s)", formalDefinition="Include one or more codes from a code system or other value set(s)." )
301        protected List<ConceptSetComponent> include;
302
303        /**
304         * Exclude one or more codes from the value set based on code system filters and/or other value sets.
305         */
306        @Child(name = "exclude", type = {ConceptSetComponent.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
307        @Description(shortDefinition="Explicitly exclude codes from a code system or other value sets", formalDefinition="Exclude one or more codes from the value set based on code system filters and/or other value sets." )
308        protected List<ConceptSetComponent> exclude;
309
310        /**
311         * A property to return in the expansion, if the client doesn't ask for any particular properties. May be either a code from the code system definition (convenient) or a the formal URI that refers to the property. The special value '*' means all properties known to the server.
312         */
313        @Child(name = "property", type = {StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
314        @Description(shortDefinition="Property to return if client doesn't override", formalDefinition="A property to return in the expansion, if the client doesn't ask for any particular properties. May be either a code from the code system definition (convenient) or a the formal URI that refers to the property. The special value '*' means all properties known to the server." )
315        protected List<StringType> property;
316
317        private static final long serialVersionUID = -15414259L;
318
319    /**
320     * Constructor
321     */
322      public ValueSetComposeComponent() {
323        super();
324      }
325
326        /**
327         * @return {@link #lockedDate} (The Locked Date is  the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version.). This is the underlying object with id, value and extensions. The accessor "getLockedDate" gives direct access to the value
328         */
329        public DateType getLockedDateElement() { 
330          if (this.lockedDate == null)
331            if (Configuration.errorOnAutoCreate())
332              throw new Error("Attempt to auto-create ValueSetComposeComponent.lockedDate");
333            else if (Configuration.doAutoCreate())
334              this.lockedDate = new DateType(); // bb
335          return this.lockedDate;
336        }
337
338        public boolean hasLockedDateElement() { 
339          return this.lockedDate != null && !this.lockedDate.isEmpty();
340        }
341
342        public boolean hasLockedDate() { 
343          return this.lockedDate != null && !this.lockedDate.isEmpty();
344        }
345
346        /**
347         * @param value {@link #lockedDate} (The Locked Date is  the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version.). This is the underlying object with id, value and extensions. The accessor "getLockedDate" gives direct access to the value
348         */
349        public ValueSetComposeComponent setLockedDateElement(DateType value) { 
350          this.lockedDate = value;
351          return this;
352        }
353
354        /**
355         * @return The Locked Date is  the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version.
356         */
357        public Date getLockedDate() { 
358          return this.lockedDate == null ? null : this.lockedDate.getValue();
359        }
360
361        /**
362         * @param value The Locked Date is  the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version.
363         */
364        public ValueSetComposeComponent setLockedDate(Date value) { 
365          if (value == null)
366            this.lockedDate = null;
367          else {
368            if (this.lockedDate == null)
369              this.lockedDate = new DateType();
370            this.lockedDate.setValue(value);
371          }
372          return this;
373        }
374
375        /**
376         * @return {@link #inactive} (Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included).). This is the underlying object with id, value and extensions. The accessor "getInactive" gives direct access to the value
377         */
378        public BooleanType getInactiveElement() { 
379          if (this.inactive == null)
380            if (Configuration.errorOnAutoCreate())
381              throw new Error("Attempt to auto-create ValueSetComposeComponent.inactive");
382            else if (Configuration.doAutoCreate())
383              this.inactive = new BooleanType(); // bb
384          return this.inactive;
385        }
386
387        public boolean hasInactiveElement() { 
388          return this.inactive != null && !this.inactive.isEmpty();
389        }
390
391        public boolean hasInactive() { 
392          return this.inactive != null && !this.inactive.isEmpty();
393        }
394
395        /**
396         * @param value {@link #inactive} (Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included).). This is the underlying object with id, value and extensions. The accessor "getInactive" gives direct access to the value
397         */
398        public ValueSetComposeComponent setInactiveElement(BooleanType value) { 
399          this.inactive = value;
400          return this;
401        }
402
403        /**
404         * @return Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included).
405         */
406        public boolean getInactive() { 
407          return this.inactive == null || this.inactive.isEmpty() ? false : this.inactive.getValue();
408        }
409
410        /**
411         * @param value Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included).
412         */
413        public ValueSetComposeComponent setInactive(boolean value) { 
414            if (this.inactive == null)
415              this.inactive = new BooleanType();
416            this.inactive.setValue(value);
417          return this;
418        }
419
420        /**
421         * @return {@link #include} (Include one or more codes from a code system or other value set(s).)
422         */
423        public List<ConceptSetComponent> getInclude() { 
424          if (this.include == null)
425            this.include = new ArrayList<ConceptSetComponent>();
426          return this.include;
427        }
428
429        /**
430         * @return Returns a reference to <code>this</code> for easy method chaining
431         */
432        public ValueSetComposeComponent setInclude(List<ConceptSetComponent> theInclude) { 
433          this.include = theInclude;
434          return this;
435        }
436
437        public boolean hasInclude() { 
438          if (this.include == null)
439            return false;
440          for (ConceptSetComponent item : this.include)
441            if (!item.isEmpty())
442              return true;
443          return false;
444        }
445
446        public ConceptSetComponent addInclude() { //3
447          ConceptSetComponent t = new ConceptSetComponent();
448          if (this.include == null)
449            this.include = new ArrayList<ConceptSetComponent>();
450          this.include.add(t);
451          return t;
452        }
453
454        public ValueSetComposeComponent addInclude(ConceptSetComponent t) { //3
455          if (t == null)
456            return this;
457          if (this.include == null)
458            this.include = new ArrayList<ConceptSetComponent>();
459          this.include.add(t);
460          return this;
461        }
462
463        /**
464         * @return The first repetition of repeating field {@link #include}, creating it if it does not already exist
465         */
466        public ConceptSetComponent getIncludeFirstRep() { 
467          if (getInclude().isEmpty()) {
468            addInclude();
469          }
470          return getInclude().get(0);
471        }
472
473        /**
474         * @return {@link #exclude} (Exclude one or more codes from the value set based on code system filters and/or other value sets.)
475         */
476        public List<ConceptSetComponent> getExclude() { 
477          if (this.exclude == null)
478            this.exclude = new ArrayList<ConceptSetComponent>();
479          return this.exclude;
480        }
481
482        /**
483         * @return Returns a reference to <code>this</code> for easy method chaining
484         */
485        public ValueSetComposeComponent setExclude(List<ConceptSetComponent> theExclude) { 
486          this.exclude = theExclude;
487          return this;
488        }
489
490        public boolean hasExclude() { 
491          if (this.exclude == null)
492            return false;
493          for (ConceptSetComponent item : this.exclude)
494            if (!item.isEmpty())
495              return true;
496          return false;
497        }
498
499        public ConceptSetComponent addExclude() { //3
500          ConceptSetComponent t = new ConceptSetComponent();
501          if (this.exclude == null)
502            this.exclude = new ArrayList<ConceptSetComponent>();
503          this.exclude.add(t);
504          return t;
505        }
506
507        public ValueSetComposeComponent addExclude(ConceptSetComponent t) { //3
508          if (t == null)
509            return this;
510          if (this.exclude == null)
511            this.exclude = new ArrayList<ConceptSetComponent>();
512          this.exclude.add(t);
513          return this;
514        }
515
516        /**
517         * @return The first repetition of repeating field {@link #exclude}, creating it if it does not already exist
518         */
519        public ConceptSetComponent getExcludeFirstRep() { 
520          if (getExclude().isEmpty()) {
521            addExclude();
522          }
523          return getExclude().get(0);
524        }
525
526        /**
527         * @return {@link #property} (A property to return in the expansion, if the client doesn't ask for any particular properties. May be either a code from the code system definition (convenient) or a the formal URI that refers to the property. The special value '*' means all properties known to the server.)
528         */
529        public List<StringType> getProperty() { 
530          if (this.property == null)
531            this.property = new ArrayList<StringType>();
532          return this.property;
533        }
534
535        /**
536         * @return Returns a reference to <code>this</code> for easy method chaining
537         */
538        public ValueSetComposeComponent setProperty(List<StringType> theProperty) { 
539          this.property = theProperty;
540          return this;
541        }
542
543        public boolean hasProperty() { 
544          if (this.property == null)
545            return false;
546          for (StringType item : this.property)
547            if (!item.isEmpty())
548              return true;
549          return false;
550        }
551
552        /**
553         * @return {@link #property} (A property to return in the expansion, if the client doesn't ask for any particular properties. May be either a code from the code system definition (convenient) or a the formal URI that refers to the property. The special value '*' means all properties known to the server.)
554         */
555        public StringType addPropertyElement() {//2 
556          StringType t = new StringType();
557          if (this.property == null)
558            this.property = new ArrayList<StringType>();
559          this.property.add(t);
560          return t;
561        }
562
563        /**
564         * @param value {@link #property} (A property to return in the expansion, if the client doesn't ask for any particular properties. May be either a code from the code system definition (convenient) or a the formal URI that refers to the property. The special value '*' means all properties known to the server.)
565         */
566        public ValueSetComposeComponent addProperty(String value) { //1
567          StringType t = new StringType();
568          t.setValue(value);
569          if (this.property == null)
570            this.property = new ArrayList<StringType>();
571          this.property.add(t);
572          return this;
573        }
574
575        /**
576         * @param value {@link #property} (A property to return in the expansion, if the client doesn't ask for any particular properties. May be either a code from the code system definition (convenient) or a the formal URI that refers to the property. The special value '*' means all properties known to the server.)
577         */
578        public boolean hasProperty(String value) { 
579          if (this.property == null)
580            return false;
581          for (StringType v : this.property)
582            if (v.getValue().equals(value)) // string
583              return true;
584          return false;
585        }
586
587        protected void listChildren(List<Property> children) {
588          super.listChildren(children);
589          children.add(new Property("lockedDate", "date", "The Locked Date is  the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version.", 0, 1, lockedDate));
590          children.add(new Property("inactive", "boolean", "Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included).", 0, 1, inactive));
591          children.add(new Property("include", "", "Include one or more codes from a code system or other value set(s).", 0, java.lang.Integer.MAX_VALUE, include));
592          children.add(new Property("exclude", "@ValueSet.compose.include", "Exclude one or more codes from the value set based on code system filters and/or other value sets.", 0, java.lang.Integer.MAX_VALUE, exclude));
593          children.add(new Property("property", "string", "A property to return in the expansion, if the client doesn't ask for any particular properties. May be either a code from the code system definition (convenient) or a the formal URI that refers to the property. The special value '*' means all properties known to the server.", 0, java.lang.Integer.MAX_VALUE, property));
594        }
595
596        @Override
597        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
598          switch (_hash) {
599          case 1391591896: /*lockedDate*/  return new Property("lockedDate", "date", "The Locked Date is  the effective date that is used to determine the version of all referenced Code Systems and Value Set Definitions included in the compose that are not already tied to a specific version.", 0, 1, lockedDate);
600          case 24665195: /*inactive*/  return new Property("inactive", "boolean", "Whether inactive codes - codes that are not approved for current use - are in the value set. If inactive = true, inactive codes are to be included in the expansion, if inactive = false, the inactive codes will not be included in the expansion. If absent, the behavior is determined by the implementation, or by the applicable $expand parameters (but generally, inactive codes would be expected to be included).", 0, 1, inactive);
601          case 1942574248: /*include*/  return new Property("include", "", "Include one or more codes from a code system or other value set(s).", 0, java.lang.Integer.MAX_VALUE, include);
602          case -1321148966: /*exclude*/  return new Property("exclude", "@ValueSet.compose.include", "Exclude one or more codes from the value set based on code system filters and/or other value sets.", 0, java.lang.Integer.MAX_VALUE, exclude);
603          case -993141291: /*property*/  return new Property("property", "string", "A property to return in the expansion, if the client doesn't ask for any particular properties. May be either a code from the code system definition (convenient) or a the formal URI that refers to the property. The special value '*' means all properties known to the server.", 0, java.lang.Integer.MAX_VALUE, property);
604          default: return super.getNamedProperty(_hash, _name, _checkValid);
605          }
606
607        }
608
609      @Override
610      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
611        switch (hash) {
612        case 1391591896: /*lockedDate*/ return this.lockedDate == null ? new Base[0] : new Base[] {this.lockedDate}; // DateType
613        case 24665195: /*inactive*/ return this.inactive == null ? new Base[0] : new Base[] {this.inactive}; // BooleanType
614        case 1942574248: /*include*/ return this.include == null ? new Base[0] : this.include.toArray(new Base[this.include.size()]); // ConceptSetComponent
615        case -1321148966: /*exclude*/ return this.exclude == null ? new Base[0] : this.exclude.toArray(new Base[this.exclude.size()]); // ConceptSetComponent
616        case -993141291: /*property*/ return this.property == null ? new Base[0] : this.property.toArray(new Base[this.property.size()]); // StringType
617        default: return super.getProperty(hash, name, checkValid);
618        }
619
620      }
621
622      @Override
623      public Base setProperty(int hash, String name, Base value) throws FHIRException {
624        switch (hash) {
625        case 1391591896: // lockedDate
626          this.lockedDate = castToDate(value); // DateType
627          return value;
628        case 24665195: // inactive
629          this.inactive = castToBoolean(value); // BooleanType
630          return value;
631        case 1942574248: // include
632          this.getInclude().add((ConceptSetComponent) value); // ConceptSetComponent
633          return value;
634        case -1321148966: // exclude
635          this.getExclude().add((ConceptSetComponent) value); // ConceptSetComponent
636          return value;
637        case -993141291: // property
638          this.getProperty().add(castToString(value)); // StringType
639          return value;
640        default: return super.setProperty(hash, name, value);
641        }
642
643      }
644
645      @Override
646      public Base setProperty(String name, Base value) throws FHIRException {
647        if (name.equals("lockedDate")) {
648          this.lockedDate = castToDate(value); // DateType
649        } else if (name.equals("inactive")) {
650          this.inactive = castToBoolean(value); // BooleanType
651        } else if (name.equals("include")) {
652          this.getInclude().add((ConceptSetComponent) value);
653        } else if (name.equals("exclude")) {
654          this.getExclude().add((ConceptSetComponent) value);
655        } else if (name.equals("property")) {
656          this.getProperty().add(castToString(value));
657        } else
658          return super.setProperty(name, value);
659        return value;
660      }
661
662      @Override
663      public Base makeProperty(int hash, String name) throws FHIRException {
664        switch (hash) {
665        case 1391591896:  return getLockedDateElement();
666        case 24665195:  return getInactiveElement();
667        case 1942574248:  return addInclude(); 
668        case -1321148966:  return addExclude(); 
669        case -993141291:  return addPropertyElement();
670        default: return super.makeProperty(hash, name);
671        }
672
673      }
674
675      @Override
676      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
677        switch (hash) {
678        case 1391591896: /*lockedDate*/ return new String[] {"date"};
679        case 24665195: /*inactive*/ return new String[] {"boolean"};
680        case 1942574248: /*include*/ return new String[] {};
681        case -1321148966: /*exclude*/ return new String[] {"@ValueSet.compose.include"};
682        case -993141291: /*property*/ return new String[] {"string"};
683        default: return super.getTypesForProperty(hash, name);
684        }
685
686      }
687
688      @Override
689      public Base addChild(String name) throws FHIRException {
690        if (name.equals("lockedDate")) {
691          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.lockedDate");
692        }
693        else if (name.equals("inactive")) {
694          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.inactive");
695        }
696        else if (name.equals("include")) {
697          return addInclude();
698        }
699        else if (name.equals("exclude")) {
700          return addExclude();
701        }
702        else if (name.equals("property")) {
703          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.property");
704        }
705        else
706          return super.addChild(name);
707      }
708
709      public ValueSetComposeComponent copy() {
710        ValueSetComposeComponent dst = new ValueSetComposeComponent();
711        copyValues(dst);
712        return dst;
713      }
714
715      public void copyValues(ValueSetComposeComponent dst) {
716        super.copyValues(dst);
717        dst.lockedDate = lockedDate == null ? null : lockedDate.copy();
718        dst.inactive = inactive == null ? null : inactive.copy();
719        if (include != null) {
720          dst.include = new ArrayList<ConceptSetComponent>();
721          for (ConceptSetComponent i : include)
722            dst.include.add(i.copy());
723        };
724        if (exclude != null) {
725          dst.exclude = new ArrayList<ConceptSetComponent>();
726          for (ConceptSetComponent i : exclude)
727            dst.exclude.add(i.copy());
728        };
729        if (property != null) {
730          dst.property = new ArrayList<StringType>();
731          for (StringType i : property)
732            dst.property.add(i.copy());
733        };
734      }
735
736      @Override
737      public boolean equalsDeep(Base other_) {
738        if (!super.equalsDeep(other_))
739          return false;
740        if (!(other_ instanceof ValueSetComposeComponent))
741          return false;
742        ValueSetComposeComponent o = (ValueSetComposeComponent) other_;
743        return compareDeep(lockedDate, o.lockedDate, true) && compareDeep(inactive, o.inactive, true) && compareDeep(include, o.include, true)
744           && compareDeep(exclude, o.exclude, true) && compareDeep(property, o.property, true);
745      }
746
747      @Override
748      public boolean equalsShallow(Base other_) {
749        if (!super.equalsShallow(other_))
750          return false;
751        if (!(other_ instanceof ValueSetComposeComponent))
752          return false;
753        ValueSetComposeComponent o = (ValueSetComposeComponent) other_;
754        return compareValues(lockedDate, o.lockedDate, true) && compareValues(inactive, o.inactive, true) && compareValues(property, o.property, true)
755          ;
756      }
757
758      public boolean isEmpty() {
759        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(lockedDate, inactive, include
760          , exclude, property);
761      }
762
763  public String fhirType() {
764    return "ValueSet.compose";
765
766  }
767
768  }
769
770    @Block()
771    public static class ConceptSetComponent extends BackboneElement implements IBaseBackboneElement {
772        /**
773         * An absolute URI which is the code system from which the selected codes come from.
774         */
775        @Child(name = "system", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=true)
776        @Description(shortDefinition="The system the codes come from", formalDefinition="An absolute URI which is the code system from which the selected codes come from." )
777        protected UriType system;
778
779        /**
780         * The version of the code system that the codes are selected from, or the special version '*' for all versions.
781         */
782        @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
783        @Description(shortDefinition="Specific version of the code system referred to", formalDefinition="The version of the code system that the codes are selected from, or the special version '*' for all versions." )
784        protected StringType version;
785
786        /**
787         * Specifies a concept to be included or excluded.
788         */
789        @Child(name = "concept", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
790        @Description(shortDefinition="A concept defined in the system", formalDefinition="Specifies a concept to be included or excluded." )
791        protected List<ConceptReferenceComponent> concept;
792
793        /**
794         * Select concepts by specify a matching criterion based on the properties (including relationships) defined by the system, or on filters defined by the system. If multiple filters are specified, they SHALL all be true.
795         */
796        @Child(name = "filter", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
797        @Description(shortDefinition="Select codes/concepts by their properties (including relationships)", formalDefinition="Select concepts by specify a matching criterion based on the properties (including relationships) defined by the system, or on filters defined by the system. If multiple filters are specified, they SHALL all be true." )
798        protected List<ConceptSetFilterComponent> filter;
799
800        /**
801         * Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url.  If multiple value sets are specified this includes the union of the contents of all of the referenced value sets.
802         */
803        @Child(name = "valueSet", type = {CanonicalType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
804        @Description(shortDefinition="Select the contents included in this value set", formalDefinition="Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url.  If multiple value sets are specified this includes the union of the contents of all of the referenced value sets." )
805        protected List<CanonicalType> valueSet;
806
807        private static final long serialVersionUID = 969391146L;
808
809    /**
810     * Constructor
811     */
812      public ConceptSetComponent() {
813        super();
814      }
815
816        /**
817         * @return {@link #system} (An absolute URI which is the code system from which the selected codes come from.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value
818         */
819        public UriType getSystemElement() { 
820          if (this.system == null)
821            if (Configuration.errorOnAutoCreate())
822              throw new Error("Attempt to auto-create ConceptSetComponent.system");
823            else if (Configuration.doAutoCreate())
824              this.system = new UriType(); // bb
825          return this.system;
826        }
827
828        public boolean hasSystemElement() { 
829          return this.system != null && !this.system.isEmpty();
830        }
831
832        public boolean hasSystem() { 
833          return this.system != null && !this.system.isEmpty();
834        }
835
836        /**
837         * @param value {@link #system} (An absolute URI which is the code system from which the selected codes come from.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value
838         */
839        public ConceptSetComponent setSystemElement(UriType value) { 
840          this.system = value;
841          return this;
842        }
843
844        /**
845         * @return An absolute URI which is the code system from which the selected codes come from.
846         */
847        public String getSystem() { 
848          return this.system == null ? null : this.system.getValue();
849        }
850
851        /**
852         * @param value An absolute URI which is the code system from which the selected codes come from.
853         */
854        public ConceptSetComponent setSystem(String value) { 
855          if (Utilities.noString(value))
856            this.system = null;
857          else {
858            if (this.system == null)
859              this.system = new UriType();
860            this.system.setValue(value);
861          }
862          return this;
863        }
864
865        /**
866         * @return {@link #version} (The version of the code system that the codes are selected from, or the special version '*' for all versions.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
867         */
868        public StringType getVersionElement() { 
869          if (this.version == null)
870            if (Configuration.errorOnAutoCreate())
871              throw new Error("Attempt to auto-create ConceptSetComponent.version");
872            else if (Configuration.doAutoCreate())
873              this.version = new StringType(); // bb
874          return this.version;
875        }
876
877        public boolean hasVersionElement() { 
878          return this.version != null && !this.version.isEmpty();
879        }
880
881        public boolean hasVersion() { 
882          return this.version != null && !this.version.isEmpty();
883        }
884
885        /**
886         * @param value {@link #version} (The version of the code system that the codes are selected from, or the special version '*' for all versions.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
887         */
888        public ConceptSetComponent setVersionElement(StringType value) { 
889          this.version = value;
890          return this;
891        }
892
893        /**
894         * @return The version of the code system that the codes are selected from, or the special version '*' for all versions.
895         */
896        public String getVersion() { 
897          return this.version == null ? null : this.version.getValue();
898        }
899
900        /**
901         * @param value The version of the code system that the codes are selected from, or the special version '*' for all versions.
902         */
903        public ConceptSetComponent setVersion(String value) { 
904          if (Utilities.noString(value))
905            this.version = null;
906          else {
907            if (this.version == null)
908              this.version = new StringType();
909            this.version.setValue(value);
910          }
911          return this;
912        }
913
914        /**
915         * @return {@link #concept} (Specifies a concept to be included or excluded.)
916         */
917        public List<ConceptReferenceComponent> getConcept() { 
918          if (this.concept == null)
919            this.concept = new ArrayList<ConceptReferenceComponent>();
920          return this.concept;
921        }
922
923        /**
924         * @return Returns a reference to <code>this</code> for easy method chaining
925         */
926        public ConceptSetComponent setConcept(List<ConceptReferenceComponent> theConcept) { 
927          this.concept = theConcept;
928          return this;
929        }
930
931        public boolean hasConcept() { 
932          if (this.concept == null)
933            return false;
934          for (ConceptReferenceComponent item : this.concept)
935            if (!item.isEmpty())
936              return true;
937          return false;
938        }
939
940        public ConceptReferenceComponent addConcept() { //3
941          ConceptReferenceComponent t = new ConceptReferenceComponent();
942          if (this.concept == null)
943            this.concept = new ArrayList<ConceptReferenceComponent>();
944          this.concept.add(t);
945          return t;
946        }
947
948        public ConceptSetComponent addConcept(ConceptReferenceComponent t) { //3
949          if (t == null)
950            return this;
951          if (this.concept == null)
952            this.concept = new ArrayList<ConceptReferenceComponent>();
953          this.concept.add(t);
954          return this;
955        }
956
957        /**
958         * @return The first repetition of repeating field {@link #concept}, creating it if it does not already exist
959         */
960        public ConceptReferenceComponent getConceptFirstRep() { 
961          if (getConcept().isEmpty()) {
962            addConcept();
963          }
964          return getConcept().get(0);
965        }
966
967        /**
968         * @return {@link #filter} (Select concepts by specify a matching criterion based on the properties (including relationships) defined by the system, or on filters defined by the system. If multiple filters are specified, they SHALL all be true.)
969         */
970        public List<ConceptSetFilterComponent> getFilter() { 
971          if (this.filter == null)
972            this.filter = new ArrayList<ConceptSetFilterComponent>();
973          return this.filter;
974        }
975
976        /**
977         * @return Returns a reference to <code>this</code> for easy method chaining
978         */
979        public ConceptSetComponent setFilter(List<ConceptSetFilterComponent> theFilter) { 
980          this.filter = theFilter;
981          return this;
982        }
983
984        public boolean hasFilter() { 
985          if (this.filter == null)
986            return false;
987          for (ConceptSetFilterComponent item : this.filter)
988            if (!item.isEmpty())
989              return true;
990          return false;
991        }
992
993        public ConceptSetFilterComponent addFilter() { //3
994          ConceptSetFilterComponent t = new ConceptSetFilterComponent();
995          if (this.filter == null)
996            this.filter = new ArrayList<ConceptSetFilterComponent>();
997          this.filter.add(t);
998          return t;
999        }
1000
1001        public ConceptSetComponent addFilter(ConceptSetFilterComponent t) { //3
1002          if (t == null)
1003            return this;
1004          if (this.filter == null)
1005            this.filter = new ArrayList<ConceptSetFilterComponent>();
1006          this.filter.add(t);
1007          return this;
1008        }
1009
1010        /**
1011         * @return The first repetition of repeating field {@link #filter}, creating it if it does not already exist
1012         */
1013        public ConceptSetFilterComponent getFilterFirstRep() { 
1014          if (getFilter().isEmpty()) {
1015            addFilter();
1016          }
1017          return getFilter().get(0);
1018        }
1019
1020        /**
1021         * @return {@link #valueSet} (Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url.  If multiple value sets are specified this includes the union of the contents of all of the referenced value sets.)
1022         */
1023        public List<CanonicalType> getValueSet() { 
1024          if (this.valueSet == null)
1025            this.valueSet = new ArrayList<CanonicalType>();
1026          return this.valueSet;
1027        }
1028
1029        /**
1030         * @return Returns a reference to <code>this</code> for easy method chaining
1031         */
1032        public ConceptSetComponent setValueSet(List<CanonicalType> theValueSet) { 
1033          this.valueSet = theValueSet;
1034          return this;
1035        }
1036
1037        public boolean hasValueSet() { 
1038          if (this.valueSet == null)
1039            return false;
1040          for (CanonicalType item : this.valueSet)
1041            if (!item.isEmpty())
1042              return true;
1043          return false;
1044        }
1045
1046        /**
1047         * @return {@link #valueSet} (Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url.  If multiple value sets are specified this includes the union of the contents of all of the referenced value sets.)
1048         */
1049        public CanonicalType addValueSetElement() {//2 
1050          CanonicalType t = new CanonicalType();
1051          if (this.valueSet == null)
1052            this.valueSet = new ArrayList<CanonicalType>();
1053          this.valueSet.add(t);
1054          return t;
1055        }
1056
1057        /**
1058         * @param value {@link #valueSet} (Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url.  If multiple value sets are specified this includes the union of the contents of all of the referenced value sets.)
1059         */
1060        public ConceptSetComponent addValueSet(String value) { //1
1061          CanonicalType t = new CanonicalType();
1062          t.setValue(value);
1063          if (this.valueSet == null)
1064            this.valueSet = new ArrayList<CanonicalType>();
1065          this.valueSet.add(t);
1066          return this;
1067        }
1068
1069        /**
1070         * @param value {@link #valueSet} (Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url.  If multiple value sets are specified this includes the union of the contents of all of the referenced value sets.)
1071         */
1072        public boolean hasValueSet(String value) { 
1073          if (this.valueSet == null)
1074            return false;
1075          for (CanonicalType v : this.valueSet)
1076            if (v.getValue().equals(value)) // canonical(ValueSet)
1077              return true;
1078          return false;
1079        }
1080
1081        protected void listChildren(List<Property> children) {
1082          super.listChildren(children);
1083          children.add(new Property("system", "uri", "An absolute URI which is the code system from which the selected codes come from.", 0, 1, system));
1084          children.add(new Property("version", "string", "The version of the code system that the codes are selected from, or the special version '*' for all versions.", 0, 1, version));
1085          children.add(new Property("concept", "", "Specifies a concept to be included or excluded.", 0, java.lang.Integer.MAX_VALUE, concept));
1086          children.add(new Property("filter", "", "Select concepts by specify a matching criterion based on the properties (including relationships) defined by the system, or on filters defined by the system. If multiple filters are specified, they SHALL all be true.", 0, java.lang.Integer.MAX_VALUE, filter));
1087          children.add(new Property("valueSet", "canonical(ValueSet)", "Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url.  If multiple value sets are specified this includes the union of the contents of all of the referenced value sets.", 0, java.lang.Integer.MAX_VALUE, valueSet));
1088        }
1089
1090        @Override
1091        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1092          switch (_hash) {
1093          case -887328209: /*system*/  return new Property("system", "uri", "An absolute URI which is the code system from which the selected codes come from.", 0, 1, system);
1094          case 351608024: /*version*/  return new Property("version", "string", "The version of the code system that the codes are selected from, or the special version '*' for all versions.", 0, 1, version);
1095          case 951024232: /*concept*/  return new Property("concept", "", "Specifies a concept to be included or excluded.", 0, java.lang.Integer.MAX_VALUE, concept);
1096          case -1274492040: /*filter*/  return new Property("filter", "", "Select concepts by specify a matching criterion based on the properties (including relationships) defined by the system, or on filters defined by the system. If multiple filters are specified, they SHALL all be true.", 0, java.lang.Integer.MAX_VALUE, filter);
1097          case -1410174671: /*valueSet*/  return new Property("valueSet", "canonical(ValueSet)", "Selects the concepts found in this value set (based on its value set definition). This is an absolute URI that is a reference to ValueSet.url.  If multiple value sets are specified this includes the union of the contents of all of the referenced value sets.", 0, java.lang.Integer.MAX_VALUE, valueSet);
1098          default: return super.getNamedProperty(_hash, _name, _checkValid);
1099          }
1100
1101        }
1102
1103      @Override
1104      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1105        switch (hash) {
1106        case -887328209: /*system*/ return this.system == null ? new Base[0] : new Base[] {this.system}; // UriType
1107        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
1108        case 951024232: /*concept*/ return this.concept == null ? new Base[0] : this.concept.toArray(new Base[this.concept.size()]); // ConceptReferenceComponent
1109        case -1274492040: /*filter*/ return this.filter == null ? new Base[0] : this.filter.toArray(new Base[this.filter.size()]); // ConceptSetFilterComponent
1110        case -1410174671: /*valueSet*/ return this.valueSet == null ? new Base[0] : this.valueSet.toArray(new Base[this.valueSet.size()]); // CanonicalType
1111        default: return super.getProperty(hash, name, checkValid);
1112        }
1113
1114      }
1115
1116      @Override
1117      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1118        switch (hash) {
1119        case -887328209: // system
1120          this.system = castToUri(value); // UriType
1121          return value;
1122        case 351608024: // version
1123          this.version = castToString(value); // StringType
1124          return value;
1125        case 951024232: // concept
1126          this.getConcept().add((ConceptReferenceComponent) value); // ConceptReferenceComponent
1127          return value;
1128        case -1274492040: // filter
1129          this.getFilter().add((ConceptSetFilterComponent) value); // ConceptSetFilterComponent
1130          return value;
1131        case -1410174671: // valueSet
1132          this.getValueSet().add(castToCanonical(value)); // CanonicalType
1133          return value;
1134        default: return super.setProperty(hash, name, value);
1135        }
1136
1137      }
1138
1139      @Override
1140      public Base setProperty(String name, Base value) throws FHIRException {
1141        if (name.equals("system")) {
1142          this.system = castToUri(value); // UriType
1143        } else if (name.equals("version")) {
1144          this.version = castToString(value); // StringType
1145        } else if (name.equals("concept")) {
1146          this.getConcept().add((ConceptReferenceComponent) value);
1147        } else if (name.equals("filter")) {
1148          this.getFilter().add((ConceptSetFilterComponent) value);
1149        } else if (name.equals("valueSet")) {
1150          this.getValueSet().add(castToCanonical(value));
1151        } else
1152          return super.setProperty(name, value);
1153        return value;
1154      }
1155
1156      @Override
1157      public Base makeProperty(int hash, String name) throws FHIRException {
1158        switch (hash) {
1159        case -887328209:  return getSystemElement();
1160        case 351608024:  return getVersionElement();
1161        case 951024232:  return addConcept(); 
1162        case -1274492040:  return addFilter(); 
1163        case -1410174671:  return addValueSetElement();
1164        default: return super.makeProperty(hash, name);
1165        }
1166
1167      }
1168
1169      @Override
1170      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1171        switch (hash) {
1172        case -887328209: /*system*/ return new String[] {"uri"};
1173        case 351608024: /*version*/ return new String[] {"string"};
1174        case 951024232: /*concept*/ return new String[] {};
1175        case -1274492040: /*filter*/ return new String[] {};
1176        case -1410174671: /*valueSet*/ return new String[] {"canonical"};
1177        default: return super.getTypesForProperty(hash, name);
1178        }
1179
1180      }
1181
1182      @Override
1183      public Base addChild(String name) throws FHIRException {
1184        if (name.equals("system")) {
1185          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.system");
1186        }
1187        else if (name.equals("version")) {
1188          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.version");
1189        }
1190        else if (name.equals("concept")) {
1191          return addConcept();
1192        }
1193        else if (name.equals("filter")) {
1194          return addFilter();
1195        }
1196        else if (name.equals("valueSet")) {
1197          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.valueSet");
1198        }
1199        else
1200          return super.addChild(name);
1201      }
1202
1203      public ConceptSetComponent copy() {
1204        ConceptSetComponent dst = new ConceptSetComponent();
1205        copyValues(dst);
1206        return dst;
1207      }
1208
1209      public void copyValues(ConceptSetComponent dst) {
1210        super.copyValues(dst);
1211        dst.system = system == null ? null : system.copy();
1212        dst.version = version == null ? null : version.copy();
1213        if (concept != null) {
1214          dst.concept = new ArrayList<ConceptReferenceComponent>();
1215          for (ConceptReferenceComponent i : concept)
1216            dst.concept.add(i.copy());
1217        };
1218        if (filter != null) {
1219          dst.filter = new ArrayList<ConceptSetFilterComponent>();
1220          for (ConceptSetFilterComponent i : filter)
1221            dst.filter.add(i.copy());
1222        };
1223        if (valueSet != null) {
1224          dst.valueSet = new ArrayList<CanonicalType>();
1225          for (CanonicalType i : valueSet)
1226            dst.valueSet.add(i.copy());
1227        };
1228      }
1229
1230      @Override
1231      public boolean equalsDeep(Base other_) {
1232        if (!super.equalsDeep(other_))
1233          return false;
1234        if (!(other_ instanceof ConceptSetComponent))
1235          return false;
1236        ConceptSetComponent o = (ConceptSetComponent) other_;
1237        return compareDeep(system, o.system, true) && compareDeep(version, o.version, true) && compareDeep(concept, o.concept, true)
1238           && compareDeep(filter, o.filter, true) && compareDeep(valueSet, o.valueSet, true);
1239      }
1240
1241      @Override
1242      public boolean equalsShallow(Base other_) {
1243        if (!super.equalsShallow(other_))
1244          return false;
1245        if (!(other_ instanceof ConceptSetComponent))
1246          return false;
1247        ConceptSetComponent o = (ConceptSetComponent) other_;
1248        return compareValues(system, o.system, true) && compareValues(version, o.version, true);
1249      }
1250
1251      public boolean isEmpty() {
1252        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(system, version, concept
1253          , filter, valueSet);
1254      }
1255
1256  public String fhirType() {
1257    return "ValueSet.compose.include";
1258
1259  }
1260
1261  }
1262
1263    @Block()
1264    public static class ConceptReferenceComponent extends BackboneElement implements IBaseBackboneElement {
1265        /**
1266         * Specifies a code for the concept to be included or excluded.
1267         */
1268        @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1269        @Description(shortDefinition="Code or expression from system", formalDefinition="Specifies a code for the concept to be included or excluded." )
1270        protected CodeType code;
1271
1272        /**
1273         * The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.
1274         */
1275        @Child(name = "display", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
1276        @Description(shortDefinition="Text to display for this code for this value set in this valueset", formalDefinition="The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system." )
1277        protected StringType display;
1278
1279        /**
1280         * Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.
1281         */
1282        @Child(name = "designation", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1283        @Description(shortDefinition="Additional representations for this concept", formalDefinition="Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc." )
1284        protected List<ConceptReferenceDesignationComponent> designation;
1285
1286        private static final long serialVersionUID = 260579971L;
1287
1288    /**
1289     * Constructor
1290     */
1291      public ConceptReferenceComponent() {
1292        super();
1293      }
1294
1295    /**
1296     * Constructor
1297     */
1298      public ConceptReferenceComponent(CodeType code) {
1299        super();
1300        this.code = code;
1301      }
1302
1303        /**
1304         * @return {@link #code} (Specifies a code for the concept to be included or excluded.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
1305         */
1306        public CodeType getCodeElement() { 
1307          if (this.code == null)
1308            if (Configuration.errorOnAutoCreate())
1309              throw new Error("Attempt to auto-create ConceptReferenceComponent.code");
1310            else if (Configuration.doAutoCreate())
1311              this.code = new CodeType(); // bb
1312          return this.code;
1313        }
1314
1315        public boolean hasCodeElement() { 
1316          return this.code != null && !this.code.isEmpty();
1317        }
1318
1319        public boolean hasCode() { 
1320          return this.code != null && !this.code.isEmpty();
1321        }
1322
1323        /**
1324         * @param value {@link #code} (Specifies a code for the concept to be included or excluded.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
1325         */
1326        public ConceptReferenceComponent setCodeElement(CodeType value) { 
1327          this.code = value;
1328          return this;
1329        }
1330
1331        /**
1332         * @return Specifies a code for the concept to be included or excluded.
1333         */
1334        public String getCode() { 
1335          return this.code == null ? null : this.code.getValue();
1336        }
1337
1338        /**
1339         * @param value Specifies a code for the concept to be included or excluded.
1340         */
1341        public ConceptReferenceComponent setCode(String value) { 
1342            if (this.code == null)
1343              this.code = new CodeType();
1344            this.code.setValue(value);
1345          return this;
1346        }
1347
1348        /**
1349         * @return {@link #display} (The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value
1350         */
1351        public StringType getDisplayElement() { 
1352          if (this.display == null)
1353            if (Configuration.errorOnAutoCreate())
1354              throw new Error("Attempt to auto-create ConceptReferenceComponent.display");
1355            else if (Configuration.doAutoCreate())
1356              this.display = new StringType(); // bb
1357          return this.display;
1358        }
1359
1360        public boolean hasDisplayElement() { 
1361          return this.display != null && !this.display.isEmpty();
1362        }
1363
1364        public boolean hasDisplay() { 
1365          return this.display != null && !this.display.isEmpty();
1366        }
1367
1368        /**
1369         * @param value {@link #display} (The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value
1370         */
1371        public ConceptReferenceComponent setDisplayElement(StringType value) { 
1372          this.display = value;
1373          return this;
1374        }
1375
1376        /**
1377         * @return The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.
1378         */
1379        public String getDisplay() { 
1380          return this.display == null ? null : this.display.getValue();
1381        }
1382
1383        /**
1384         * @param value The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.
1385         */
1386        public ConceptReferenceComponent setDisplay(String value) { 
1387          if (Utilities.noString(value))
1388            this.display = null;
1389          else {
1390            if (this.display == null)
1391              this.display = new StringType();
1392            this.display.setValue(value);
1393          }
1394          return this;
1395        }
1396
1397        /**
1398         * @return {@link #designation} (Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.)
1399         */
1400        public List<ConceptReferenceDesignationComponent> getDesignation() { 
1401          if (this.designation == null)
1402            this.designation = new ArrayList<ConceptReferenceDesignationComponent>();
1403          return this.designation;
1404        }
1405
1406        /**
1407         * @return Returns a reference to <code>this</code> for easy method chaining
1408         */
1409        public ConceptReferenceComponent setDesignation(List<ConceptReferenceDesignationComponent> theDesignation) { 
1410          this.designation = theDesignation;
1411          return this;
1412        }
1413
1414        public boolean hasDesignation() { 
1415          if (this.designation == null)
1416            return false;
1417          for (ConceptReferenceDesignationComponent item : this.designation)
1418            if (!item.isEmpty())
1419              return true;
1420          return false;
1421        }
1422
1423        public ConceptReferenceDesignationComponent addDesignation() { //3
1424          ConceptReferenceDesignationComponent t = new ConceptReferenceDesignationComponent();
1425          if (this.designation == null)
1426            this.designation = new ArrayList<ConceptReferenceDesignationComponent>();
1427          this.designation.add(t);
1428          return t;
1429        }
1430
1431        public ConceptReferenceComponent addDesignation(ConceptReferenceDesignationComponent t) { //3
1432          if (t == null)
1433            return this;
1434          if (this.designation == null)
1435            this.designation = new ArrayList<ConceptReferenceDesignationComponent>();
1436          this.designation.add(t);
1437          return this;
1438        }
1439
1440        /**
1441         * @return The first repetition of repeating field {@link #designation}, creating it if it does not already exist
1442         */
1443        public ConceptReferenceDesignationComponent getDesignationFirstRep() { 
1444          if (getDesignation().isEmpty()) {
1445            addDesignation();
1446          }
1447          return getDesignation().get(0);
1448        }
1449
1450        protected void listChildren(List<Property> children) {
1451          super.listChildren(children);
1452          children.add(new Property("code", "code", "Specifies a code for the concept to be included or excluded.", 0, 1, code));
1453          children.add(new Property("display", "string", "The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.", 0, 1, display));
1454          children.add(new Property("designation", "", "Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.", 0, java.lang.Integer.MAX_VALUE, designation));
1455        }
1456
1457        @Override
1458        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1459          switch (_hash) {
1460          case 3059181: /*code*/  return new Property("code", "code", "Specifies a code for the concept to be included or excluded.", 0, 1, code);
1461          case 1671764162: /*display*/  return new Property("display", "string", "The text to display to the user for this concept in the context of this valueset. If no display is provided, then applications using the value set use the display specified for the code by the system.", 0, 1, display);
1462          case -900931593: /*designation*/  return new Property("designation", "", "Additional representations for this concept when used in this value set - other languages, aliases, specialized purposes, used for particular purposes, etc.", 0, java.lang.Integer.MAX_VALUE, designation);
1463          default: return super.getNamedProperty(_hash, _name, _checkValid);
1464          }
1465
1466        }
1467
1468      @Override
1469      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1470        switch (hash) {
1471        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType
1472        case 1671764162: /*display*/ return this.display == null ? new Base[0] : new Base[] {this.display}; // StringType
1473        case -900931593: /*designation*/ return this.designation == null ? new Base[0] : this.designation.toArray(new Base[this.designation.size()]); // ConceptReferenceDesignationComponent
1474        default: return super.getProperty(hash, name, checkValid);
1475        }
1476
1477      }
1478
1479      @Override
1480      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1481        switch (hash) {
1482        case 3059181: // code
1483          this.code = castToCode(value); // CodeType
1484          return value;
1485        case 1671764162: // display
1486          this.display = castToString(value); // StringType
1487          return value;
1488        case -900931593: // designation
1489          this.getDesignation().add((ConceptReferenceDesignationComponent) value); // ConceptReferenceDesignationComponent
1490          return value;
1491        default: return super.setProperty(hash, name, value);
1492        }
1493
1494      }
1495
1496      @Override
1497      public Base setProperty(String name, Base value) throws FHIRException {
1498        if (name.equals("code")) {
1499          this.code = castToCode(value); // CodeType
1500        } else if (name.equals("display")) {
1501          this.display = castToString(value); // StringType
1502        } else if (name.equals("designation")) {
1503          this.getDesignation().add((ConceptReferenceDesignationComponent) value);
1504        } else
1505          return super.setProperty(name, value);
1506        return value;
1507      }
1508
1509      @Override
1510      public Base makeProperty(int hash, String name) throws FHIRException {
1511        switch (hash) {
1512        case 3059181:  return getCodeElement();
1513        case 1671764162:  return getDisplayElement();
1514        case -900931593:  return addDesignation(); 
1515        default: return super.makeProperty(hash, name);
1516        }
1517
1518      }
1519
1520      @Override
1521      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1522        switch (hash) {
1523        case 3059181: /*code*/ return new String[] {"code"};
1524        case 1671764162: /*display*/ return new String[] {"string"};
1525        case -900931593: /*designation*/ return new String[] {};
1526        default: return super.getTypesForProperty(hash, name);
1527        }
1528
1529      }
1530
1531      @Override
1532      public Base addChild(String name) throws FHIRException {
1533        if (name.equals("code")) {
1534          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.code");
1535        }
1536        else if (name.equals("display")) {
1537          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.display");
1538        }
1539        else if (name.equals("designation")) {
1540          return addDesignation();
1541        }
1542        else
1543          return super.addChild(name);
1544      }
1545
1546      public ConceptReferenceComponent copy() {
1547        ConceptReferenceComponent dst = new ConceptReferenceComponent();
1548        copyValues(dst);
1549        return dst;
1550      }
1551
1552      public void copyValues(ConceptReferenceComponent dst) {
1553        super.copyValues(dst);
1554        dst.code = code == null ? null : code.copy();
1555        dst.display = display == null ? null : display.copy();
1556        if (designation != null) {
1557          dst.designation = new ArrayList<ConceptReferenceDesignationComponent>();
1558          for (ConceptReferenceDesignationComponent i : designation)
1559            dst.designation.add(i.copy());
1560        };
1561      }
1562
1563      @Override
1564      public boolean equalsDeep(Base other_) {
1565        if (!super.equalsDeep(other_))
1566          return false;
1567        if (!(other_ instanceof ConceptReferenceComponent))
1568          return false;
1569        ConceptReferenceComponent o = (ConceptReferenceComponent) other_;
1570        return compareDeep(code, o.code, true) && compareDeep(display, o.display, true) && compareDeep(designation, o.designation, true)
1571          ;
1572      }
1573
1574      @Override
1575      public boolean equalsShallow(Base other_) {
1576        if (!super.equalsShallow(other_))
1577          return false;
1578        if (!(other_ instanceof ConceptReferenceComponent))
1579          return false;
1580        ConceptReferenceComponent o = (ConceptReferenceComponent) other_;
1581        return compareValues(code, o.code, true) && compareValues(display, o.display, true);
1582      }
1583
1584      public boolean isEmpty() {
1585        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, display, designation
1586          );
1587      }
1588
1589  public String fhirType() {
1590    return "ValueSet.compose.include.concept";
1591
1592  }
1593
1594  }
1595
1596    @Block()
1597    public static class ConceptReferenceDesignationComponent extends BackboneElement implements IBaseBackboneElement {
1598        /**
1599         * The language this designation is defined for.
1600         */
1601        @Child(name = "language", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=false)
1602        @Description(shortDefinition="Human language of the designation", formalDefinition="The language this designation is defined for." )
1603        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/languages")
1604        protected CodeType language;
1605
1606        /**
1607         * A code that represents types of uses of designations.
1608         */
1609        @Child(name = "use", type = {Coding.class}, order=2, min=0, max=1, modifier=false, summary=false)
1610        @Description(shortDefinition="Types of uses of designations", formalDefinition="A code that represents types of uses of designations." )
1611        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/designation-use")
1612        protected Coding use;
1613
1614        /**
1615         * The text value for this designation.
1616         */
1617        @Child(name = "value", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=false)
1618        @Description(shortDefinition="The text value for this designation", formalDefinition="The text value for this designation." )
1619        protected StringType value;
1620
1621        private static final long serialVersionUID = 1515662414L;
1622
1623    /**
1624     * Constructor
1625     */
1626      public ConceptReferenceDesignationComponent() {
1627        super();
1628      }
1629
1630    /**
1631     * Constructor
1632     */
1633      public ConceptReferenceDesignationComponent(StringType value) {
1634        super();
1635        this.value = value;
1636      }
1637
1638        /**
1639         * @return {@link #language} (The language this designation is defined for.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value
1640         */
1641        public CodeType getLanguageElement() { 
1642          if (this.language == null)
1643            if (Configuration.errorOnAutoCreate())
1644              throw new Error("Attempt to auto-create ConceptReferenceDesignationComponent.language");
1645            else if (Configuration.doAutoCreate())
1646              this.language = new CodeType(); // bb
1647          return this.language;
1648        }
1649
1650        public boolean hasLanguageElement() { 
1651          return this.language != null && !this.language.isEmpty();
1652        }
1653
1654        public boolean hasLanguage() { 
1655          return this.language != null && !this.language.isEmpty();
1656        }
1657
1658        /**
1659         * @param value {@link #language} (The language this designation is defined for.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value
1660         */
1661        public ConceptReferenceDesignationComponent setLanguageElement(CodeType value) { 
1662          this.language = value;
1663          return this;
1664        }
1665
1666        /**
1667         * @return The language this designation is defined for.
1668         */
1669        public String getLanguage() { 
1670          return this.language == null ? null : this.language.getValue();
1671        }
1672
1673        /**
1674         * @param value The language this designation is defined for.
1675         */
1676        public ConceptReferenceDesignationComponent setLanguage(String value) { 
1677          if (Utilities.noString(value))
1678            this.language = null;
1679          else {
1680            if (this.language == null)
1681              this.language = new CodeType();
1682            this.language.setValue(value);
1683          }
1684          return this;
1685        }
1686
1687        /**
1688         * @return {@link #use} (A code that represents types of uses of designations.)
1689         */
1690        public Coding getUse() { 
1691          if (this.use == null)
1692            if (Configuration.errorOnAutoCreate())
1693              throw new Error("Attempt to auto-create ConceptReferenceDesignationComponent.use");
1694            else if (Configuration.doAutoCreate())
1695              this.use = new Coding(); // cc
1696          return this.use;
1697        }
1698
1699        public boolean hasUse() { 
1700          return this.use != null && !this.use.isEmpty();
1701        }
1702
1703        /**
1704         * @param value {@link #use} (A code that represents types of uses of designations.)
1705         */
1706        public ConceptReferenceDesignationComponent setUse(Coding value) { 
1707          this.use = value;
1708          return this;
1709        }
1710
1711        /**
1712         * @return {@link #value} (The text value for this designation.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
1713         */
1714        public StringType getValueElement() { 
1715          if (this.value == null)
1716            if (Configuration.errorOnAutoCreate())
1717              throw new Error("Attempt to auto-create ConceptReferenceDesignationComponent.value");
1718            else if (Configuration.doAutoCreate())
1719              this.value = new StringType(); // bb
1720          return this.value;
1721        }
1722
1723        public boolean hasValueElement() { 
1724          return this.value != null && !this.value.isEmpty();
1725        }
1726
1727        public boolean hasValue() { 
1728          return this.value != null && !this.value.isEmpty();
1729        }
1730
1731        /**
1732         * @param value {@link #value} (The text value for this designation.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
1733         */
1734        public ConceptReferenceDesignationComponent setValueElement(StringType value) { 
1735          this.value = value;
1736          return this;
1737        }
1738
1739        /**
1740         * @return The text value for this designation.
1741         */
1742        public String getValue() { 
1743          return this.value == null ? null : this.value.getValue();
1744        }
1745
1746        /**
1747         * @param value The text value for this designation.
1748         */
1749        public ConceptReferenceDesignationComponent setValue(String value) { 
1750            if (this.value == null)
1751              this.value = new StringType();
1752            this.value.setValue(value);
1753          return this;
1754        }
1755
1756        protected void listChildren(List<Property> children) {
1757          super.listChildren(children);
1758          children.add(new Property("language", "code", "The language this designation is defined for.", 0, 1, language));
1759          children.add(new Property("use", "Coding", "A code that represents types of uses of designations.", 0, 1, use));
1760          children.add(new Property("value", "string", "The text value for this designation.", 0, 1, value));
1761        }
1762
1763        @Override
1764        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1765          switch (_hash) {
1766          case -1613589672: /*language*/  return new Property("language", "code", "The language this designation is defined for.", 0, 1, language);
1767          case 116103: /*use*/  return new Property("use", "Coding", "A code that represents types of uses of designations.", 0, 1, use);
1768          case 111972721: /*value*/  return new Property("value", "string", "The text value for this designation.", 0, 1, value);
1769          default: return super.getNamedProperty(_hash, _name, _checkValid);
1770          }
1771
1772        }
1773
1774      @Override
1775      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1776        switch (hash) {
1777        case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // CodeType
1778        case 116103: /*use*/ return this.use == null ? new Base[0] : new Base[] {this.use}; // Coding
1779        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType
1780        default: return super.getProperty(hash, name, checkValid);
1781        }
1782
1783      }
1784
1785      @Override
1786      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1787        switch (hash) {
1788        case -1613589672: // language
1789          this.language = castToCode(value); // CodeType
1790          return value;
1791        case 116103: // use
1792          this.use = castToCoding(value); // Coding
1793          return value;
1794        case 111972721: // value
1795          this.value = castToString(value); // StringType
1796          return value;
1797        default: return super.setProperty(hash, name, value);
1798        }
1799
1800      }
1801
1802      @Override
1803      public Base setProperty(String name, Base value) throws FHIRException {
1804        if (name.equals("language")) {
1805          this.language = castToCode(value); // CodeType
1806        } else if (name.equals("use")) {
1807          this.use = castToCoding(value); // Coding
1808        } else if (name.equals("value")) {
1809          this.value = castToString(value); // StringType
1810        } else
1811          return super.setProperty(name, value);
1812        return value;
1813      }
1814
1815      @Override
1816      public Base makeProperty(int hash, String name) throws FHIRException {
1817        switch (hash) {
1818        case -1613589672:  return getLanguageElement();
1819        case 116103:  return getUse();
1820        case 111972721:  return getValueElement();
1821        default: return super.makeProperty(hash, name);
1822        }
1823
1824      }
1825
1826      @Override
1827      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1828        switch (hash) {
1829        case -1613589672: /*language*/ return new String[] {"code"};
1830        case 116103: /*use*/ return new String[] {"Coding"};
1831        case 111972721: /*value*/ return new String[] {"string"};
1832        default: return super.getTypesForProperty(hash, name);
1833        }
1834
1835      }
1836
1837      @Override
1838      public Base addChild(String name) throws FHIRException {
1839        if (name.equals("language")) {
1840          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.language");
1841        }
1842        else if (name.equals("use")) {
1843          this.use = new Coding();
1844          return this.use;
1845        }
1846        else if (name.equals("value")) {
1847          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.value");
1848        }
1849        else
1850          return super.addChild(name);
1851      }
1852
1853      public ConceptReferenceDesignationComponent copy() {
1854        ConceptReferenceDesignationComponent dst = new ConceptReferenceDesignationComponent();
1855        copyValues(dst);
1856        return dst;
1857      }
1858
1859      public void copyValues(ConceptReferenceDesignationComponent dst) {
1860        super.copyValues(dst);
1861        dst.language = language == null ? null : language.copy();
1862        dst.use = use == null ? null : use.copy();
1863        dst.value = value == null ? null : value.copy();
1864      }
1865
1866      @Override
1867      public boolean equalsDeep(Base other_) {
1868        if (!super.equalsDeep(other_))
1869          return false;
1870        if (!(other_ instanceof ConceptReferenceDesignationComponent))
1871          return false;
1872        ConceptReferenceDesignationComponent o = (ConceptReferenceDesignationComponent) other_;
1873        return compareDeep(language, o.language, true) && compareDeep(use, o.use, true) && compareDeep(value, o.value, true)
1874          ;
1875      }
1876
1877      @Override
1878      public boolean equalsShallow(Base other_) {
1879        if (!super.equalsShallow(other_))
1880          return false;
1881        if (!(other_ instanceof ConceptReferenceDesignationComponent))
1882          return false;
1883        ConceptReferenceDesignationComponent o = (ConceptReferenceDesignationComponent) other_;
1884        return compareValues(language, o.language, true) && compareValues(value, o.value, true);
1885      }
1886
1887      public boolean isEmpty() {
1888        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(language, use, value);
1889      }
1890
1891  public String fhirType() {
1892    return "ValueSet.compose.include.concept.designation";
1893
1894  }
1895
1896  }
1897
1898    @Block()
1899    public static class ConceptSetFilterComponent extends BackboneElement implements IBaseBackboneElement {
1900        /**
1901         * A code that identifies a property or a filter defined in the code system.
1902         */
1903        @Child(name = "property", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true)
1904        @Description(shortDefinition="A property/filter defined by the code system", formalDefinition="A code that identifies a property or a filter defined in the code system." )
1905        protected CodeType property;
1906
1907        /**
1908         * The kind of operation to perform as a part of the filter criteria.
1909         */
1910        @Child(name = "op", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=true)
1911        @Description(shortDefinition="= | is-a | descendent-of | is-not-a | regex | in | not-in | generalizes | exists", formalDefinition="The kind of operation to perform as a part of the filter criteria." )
1912        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/filter-operator")
1913        protected Enumeration<FilterOperator> op;
1914
1915        /**
1916         * The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value  (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.
1917         */
1918        @Child(name = "value", type = {StringType.class}, order=3, min=1, max=1, modifier=false, summary=true)
1919        @Description(shortDefinition="Code from the system, or regex criteria, or boolean value for exists", formalDefinition="The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value  (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'." )
1920        protected StringType value;
1921
1922        private static final long serialVersionUID = 1259153492L;
1923
1924    /**
1925     * Constructor
1926     */
1927      public ConceptSetFilterComponent() {
1928        super();
1929      }
1930
1931    /**
1932     * Constructor
1933     */
1934      public ConceptSetFilterComponent(CodeType property, Enumeration<FilterOperator> op, StringType value) {
1935        super();
1936        this.property = property;
1937        this.op = op;
1938        this.value = value;
1939      }
1940
1941        /**
1942         * @return {@link #property} (A code that identifies a property or a filter defined in the code system.). This is the underlying object with id, value and extensions. The accessor "getProperty" gives direct access to the value
1943         */
1944        public CodeType getPropertyElement() { 
1945          if (this.property == null)
1946            if (Configuration.errorOnAutoCreate())
1947              throw new Error("Attempt to auto-create ConceptSetFilterComponent.property");
1948            else if (Configuration.doAutoCreate())
1949              this.property = new CodeType(); // bb
1950          return this.property;
1951        }
1952
1953        public boolean hasPropertyElement() { 
1954          return this.property != null && !this.property.isEmpty();
1955        }
1956
1957        public boolean hasProperty() { 
1958          return this.property != null && !this.property.isEmpty();
1959        }
1960
1961        /**
1962         * @param value {@link #property} (A code that identifies a property or a filter defined in the code system.). This is the underlying object with id, value and extensions. The accessor "getProperty" gives direct access to the value
1963         */
1964        public ConceptSetFilterComponent setPropertyElement(CodeType value) { 
1965          this.property = value;
1966          return this;
1967        }
1968
1969        /**
1970         * @return A code that identifies a property or a filter defined in the code system.
1971         */
1972        public String getProperty() { 
1973          return this.property == null ? null : this.property.getValue();
1974        }
1975
1976        /**
1977         * @param value A code that identifies a property or a filter defined in the code system.
1978         */
1979        public ConceptSetFilterComponent setProperty(String value) { 
1980            if (this.property == null)
1981              this.property = new CodeType();
1982            this.property.setValue(value);
1983          return this;
1984        }
1985
1986        /**
1987         * @return {@link #op} (The kind of operation to perform as a part of the filter criteria.). This is the underlying object with id, value and extensions. The accessor "getOp" gives direct access to the value
1988         */
1989        public Enumeration<FilterOperator> getOpElement() { 
1990          if (this.op == null)
1991            if (Configuration.errorOnAutoCreate())
1992              throw new Error("Attempt to auto-create ConceptSetFilterComponent.op");
1993            else if (Configuration.doAutoCreate())
1994              this.op = new Enumeration<FilterOperator>(new FilterOperatorEnumFactory()); // bb
1995          return this.op;
1996        }
1997
1998        public boolean hasOpElement() { 
1999          return this.op != null && !this.op.isEmpty();
2000        }
2001
2002        public boolean hasOp() { 
2003          return this.op != null && !this.op.isEmpty();
2004        }
2005
2006        /**
2007         * @param value {@link #op} (The kind of operation to perform as a part of the filter criteria.). This is the underlying object with id, value and extensions. The accessor "getOp" gives direct access to the value
2008         */
2009        public ConceptSetFilterComponent setOpElement(Enumeration<FilterOperator> value) { 
2010          this.op = value;
2011          return this;
2012        }
2013
2014        /**
2015         * @return The kind of operation to perform as a part of the filter criteria.
2016         */
2017        public FilterOperator getOp() { 
2018          return this.op == null ? null : this.op.getValue();
2019        }
2020
2021        /**
2022         * @param value The kind of operation to perform as a part of the filter criteria.
2023         */
2024        public ConceptSetFilterComponent setOp(FilterOperator value) { 
2025            if (this.op == null)
2026              this.op = new Enumeration<FilterOperator>(new FilterOperatorEnumFactory());
2027            this.op.setValue(value);
2028          return this;
2029        }
2030
2031        /**
2032         * @return {@link #value} (The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value  (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
2033         */
2034        public StringType getValueElement() { 
2035          if (this.value == null)
2036            if (Configuration.errorOnAutoCreate())
2037              throw new Error("Attempt to auto-create ConceptSetFilterComponent.value");
2038            else if (Configuration.doAutoCreate())
2039              this.value = new StringType(); // bb
2040          return this.value;
2041        }
2042
2043        public boolean hasValueElement() { 
2044          return this.value != null && !this.value.isEmpty();
2045        }
2046
2047        public boolean hasValue() { 
2048          return this.value != null && !this.value.isEmpty();
2049        }
2050
2051        /**
2052         * @param value {@link #value} (The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value  (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
2053         */
2054        public ConceptSetFilterComponent setValueElement(StringType value) { 
2055          this.value = value;
2056          return this;
2057        }
2058
2059        /**
2060         * @return The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value  (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.
2061         */
2062        public String getValue() { 
2063          return this.value == null ? null : this.value.getValue();
2064        }
2065
2066        /**
2067         * @param value The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value  (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.
2068         */
2069        public ConceptSetFilterComponent setValue(String value) { 
2070            if (this.value == null)
2071              this.value = new StringType();
2072            this.value.setValue(value);
2073          return this;
2074        }
2075
2076        protected void listChildren(List<Property> children) {
2077          super.listChildren(children);
2078          children.add(new Property("property", "code", "A code that identifies a property or a filter defined in the code system.", 0, 1, property));
2079          children.add(new Property("op", "code", "The kind of operation to perform as a part of the filter criteria.", 0, 1, op));
2080          children.add(new Property("value", "string", "The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value  (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.", 0, 1, value));
2081        }
2082
2083        @Override
2084        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2085          switch (_hash) {
2086          case -993141291: /*property*/  return new Property("property", "code", "A code that identifies a property or a filter defined in the code system.", 0, 1, property);
2087          case 3553: /*op*/  return new Property("op", "code", "The kind of operation to perform as a part of the filter criteria.", 0, 1, op);
2088          case 111972721: /*value*/  return new Property("value", "string", "The match value may be either a code defined by the system, or a string value, which is a regex match on the literal string of the property value  (if the filter represents a property defined in CodeSystem) or of the system filter value (if the filter represents a filter defined in CodeSystem) when the operation is 'regex', or one of the values (true and false), when the operation is 'exists'.", 0, 1, value);
2089          default: return super.getNamedProperty(_hash, _name, _checkValid);
2090          }
2091
2092        }
2093
2094      @Override
2095      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2096        switch (hash) {
2097        case -993141291: /*property*/ return this.property == null ? new Base[0] : new Base[] {this.property}; // CodeType
2098        case 3553: /*op*/ return this.op == null ? new Base[0] : new Base[] {this.op}; // Enumeration<FilterOperator>
2099        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType
2100        default: return super.getProperty(hash, name, checkValid);
2101        }
2102
2103      }
2104
2105      @Override
2106      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2107        switch (hash) {
2108        case -993141291: // property
2109          this.property = castToCode(value); // CodeType
2110          return value;
2111        case 3553: // op
2112          value = new FilterOperatorEnumFactory().fromType(castToCode(value));
2113          this.op = (Enumeration) value; // Enumeration<FilterOperator>
2114          return value;
2115        case 111972721: // value
2116          this.value = castToString(value); // StringType
2117          return value;
2118        default: return super.setProperty(hash, name, value);
2119        }
2120
2121      }
2122
2123      @Override
2124      public Base setProperty(String name, Base value) throws FHIRException {
2125        if (name.equals("property")) {
2126          this.property = castToCode(value); // CodeType
2127        } else if (name.equals("op")) {
2128          value = new FilterOperatorEnumFactory().fromType(castToCode(value));
2129          this.op = (Enumeration) value; // Enumeration<FilterOperator>
2130        } else if (name.equals("value")) {
2131          this.value = castToString(value); // StringType
2132        } else
2133          return super.setProperty(name, value);
2134        return value;
2135      }
2136
2137      @Override
2138      public Base makeProperty(int hash, String name) throws FHIRException {
2139        switch (hash) {
2140        case -993141291:  return getPropertyElement();
2141        case 3553:  return getOpElement();
2142        case 111972721:  return getValueElement();
2143        default: return super.makeProperty(hash, name);
2144        }
2145
2146      }
2147
2148      @Override
2149      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2150        switch (hash) {
2151        case -993141291: /*property*/ return new String[] {"code"};
2152        case 3553: /*op*/ return new String[] {"code"};
2153        case 111972721: /*value*/ return new String[] {"string"};
2154        default: return super.getTypesForProperty(hash, name);
2155        }
2156
2157      }
2158
2159      @Override
2160      public Base addChild(String name) throws FHIRException {
2161        if (name.equals("property")) {
2162          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.property");
2163        }
2164        else if (name.equals("op")) {
2165          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.op");
2166        }
2167        else if (name.equals("value")) {
2168          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.value");
2169        }
2170        else
2171          return super.addChild(name);
2172      }
2173
2174      public ConceptSetFilterComponent copy() {
2175        ConceptSetFilterComponent dst = new ConceptSetFilterComponent();
2176        copyValues(dst);
2177        return dst;
2178      }
2179
2180      public void copyValues(ConceptSetFilterComponent dst) {
2181        super.copyValues(dst);
2182        dst.property = property == null ? null : property.copy();
2183        dst.op = op == null ? null : op.copy();
2184        dst.value = value == null ? null : value.copy();
2185      }
2186
2187      @Override
2188      public boolean equalsDeep(Base other_) {
2189        if (!super.equalsDeep(other_))
2190          return false;
2191        if (!(other_ instanceof ConceptSetFilterComponent))
2192          return false;
2193        ConceptSetFilterComponent o = (ConceptSetFilterComponent) other_;
2194        return compareDeep(property, o.property, true) && compareDeep(op, o.op, true) && compareDeep(value, o.value, true)
2195          ;
2196      }
2197
2198      @Override
2199      public boolean equalsShallow(Base other_) {
2200        if (!super.equalsShallow(other_))
2201          return false;
2202        if (!(other_ instanceof ConceptSetFilterComponent))
2203          return false;
2204        ConceptSetFilterComponent o = (ConceptSetFilterComponent) other_;
2205        return compareValues(property, o.property, true) && compareValues(op, o.op, true) && compareValues(value, o.value, true)
2206          ;
2207      }
2208
2209      public boolean isEmpty() {
2210        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(property, op, value);
2211      }
2212
2213  public String fhirType() {
2214    return "ValueSet.compose.include.filter";
2215
2216  }
2217
2218  }
2219
2220    @Block()
2221    public static class ValueSetExpansionComponent extends BackboneElement implements IBaseBackboneElement {
2222        /**
2223         * An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier.
2224         */
2225        @Child(name = "identifier", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=false)
2226        @Description(shortDefinition="Identifies the value set expansion (business identifier)", formalDefinition="An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier." )
2227        protected UriType identifier;
2228
2229        /**
2230         * The time at which the expansion was produced by the expanding system.
2231         */
2232        @Child(name = "timestamp", type = {DateTimeType.class}, order=2, min=1, max=1, modifier=false, summary=false)
2233        @Description(shortDefinition="Time ValueSet expansion happened", formalDefinition="The time at which the expansion was produced by the expanding system." )
2234        protected DateTimeType timestamp;
2235
2236        /**
2237         * The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.
2238         */
2239        @Child(name = "total", type = {IntegerType.class}, order=3, min=0, max=1, modifier=false, summary=false)
2240        @Description(shortDefinition="Total number of codes in the expansion", formalDefinition="The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter." )
2241        protected IntegerType total;
2242
2243        /**
2244         * If paging is being used, the offset at which this resource starts.  I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present.
2245         */
2246        @Child(name = "offset", type = {IntegerType.class}, order=4, min=0, max=1, modifier=false, summary=false)
2247        @Description(shortDefinition="Offset at which this resource starts", formalDefinition="If paging is being used, the offset at which this resource starts.  I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present." )
2248        protected IntegerType offset;
2249
2250        /**
2251         * A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.
2252         */
2253        @Child(name = "parameter", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2254        @Description(shortDefinition="Parameter that controlled the expansion process", formalDefinition="A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion." )
2255        protected List<ValueSetExpansionParameterComponent> parameter;
2256
2257        /**
2258         * A property defines an additional slot through which additional information can be provided about a concept.
2259         */
2260        @Child(name = "property", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2261        @Description(shortDefinition="Additional information supplied about each concept", formalDefinition="A property defines an additional slot through which additional information can be provided about a concept." )
2262        protected List<ValueSetExpansionPropertyComponent> property;
2263
2264        /**
2265         * The codes that are contained in the value set expansion.
2266         */
2267        @Child(name = "contains", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2268        @Description(shortDefinition="Codes in the value set", formalDefinition="The codes that are contained in the value set expansion." )
2269        protected List<ValueSetExpansionContainsComponent> contains;
2270
2271        private static final long serialVersionUID = 12372258L;
2272
2273    /**
2274     * Constructor
2275     */
2276      public ValueSetExpansionComponent() {
2277        super();
2278      }
2279
2280    /**
2281     * Constructor
2282     */
2283      public ValueSetExpansionComponent(DateTimeType timestamp) {
2284        super();
2285        this.timestamp = timestamp;
2286      }
2287
2288        /**
2289         * @return {@link #identifier} (An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value
2290         */
2291        public UriType getIdentifierElement() { 
2292          if (this.identifier == null)
2293            if (Configuration.errorOnAutoCreate())
2294              throw new Error("Attempt to auto-create ValueSetExpansionComponent.identifier");
2295            else if (Configuration.doAutoCreate())
2296              this.identifier = new UriType(); // bb
2297          return this.identifier;
2298        }
2299
2300        public boolean hasIdentifierElement() { 
2301          return this.identifier != null && !this.identifier.isEmpty();
2302        }
2303
2304        public boolean hasIdentifier() { 
2305          return this.identifier != null && !this.identifier.isEmpty();
2306        }
2307
2308        /**
2309         * @param value {@link #identifier} (An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier.). This is the underlying object with id, value and extensions. The accessor "getIdentifier" gives direct access to the value
2310         */
2311        public ValueSetExpansionComponent setIdentifierElement(UriType value) { 
2312          this.identifier = value;
2313          return this;
2314        }
2315
2316        /**
2317         * @return An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier.
2318         */
2319        public String getIdentifier() { 
2320          return this.identifier == null ? null : this.identifier.getValue();
2321        }
2322
2323        /**
2324         * @param value An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier.
2325         */
2326        public ValueSetExpansionComponent setIdentifier(String value) { 
2327          if (Utilities.noString(value))
2328            this.identifier = null;
2329          else {
2330            if (this.identifier == null)
2331              this.identifier = new UriType();
2332            this.identifier.setValue(value);
2333          }
2334          return this;
2335        }
2336
2337        /**
2338         * @return {@link #timestamp} (The time at which the expansion was produced by the expanding system.). This is the underlying object with id, value and extensions. The accessor "getTimestamp" gives direct access to the value
2339         */
2340        public DateTimeType getTimestampElement() { 
2341          if (this.timestamp == null)
2342            if (Configuration.errorOnAutoCreate())
2343              throw new Error("Attempt to auto-create ValueSetExpansionComponent.timestamp");
2344            else if (Configuration.doAutoCreate())
2345              this.timestamp = new DateTimeType(); // bb
2346          return this.timestamp;
2347        }
2348
2349        public boolean hasTimestampElement() { 
2350          return this.timestamp != null && !this.timestamp.isEmpty();
2351        }
2352
2353        public boolean hasTimestamp() { 
2354          return this.timestamp != null && !this.timestamp.isEmpty();
2355        }
2356
2357        /**
2358         * @param value {@link #timestamp} (The time at which the expansion was produced by the expanding system.). This is the underlying object with id, value and extensions. The accessor "getTimestamp" gives direct access to the value
2359         */
2360        public ValueSetExpansionComponent setTimestampElement(DateTimeType value) { 
2361          this.timestamp = value;
2362          return this;
2363        }
2364
2365        /**
2366         * @return The time at which the expansion was produced by the expanding system.
2367         */
2368        public Date getTimestamp() { 
2369          return this.timestamp == null ? null : this.timestamp.getValue();
2370        }
2371
2372        /**
2373         * @param value The time at which the expansion was produced by the expanding system.
2374         */
2375        public ValueSetExpansionComponent setTimestamp(Date value) { 
2376            if (this.timestamp == null)
2377              this.timestamp = new DateTimeType();
2378            this.timestamp.setValue(value);
2379          return this;
2380        }
2381
2382        /**
2383         * @return {@link #total} (The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.). This is the underlying object with id, value and extensions. The accessor "getTotal" gives direct access to the value
2384         */
2385        public IntegerType getTotalElement() { 
2386          if (this.total == null)
2387            if (Configuration.errorOnAutoCreate())
2388              throw new Error("Attempt to auto-create ValueSetExpansionComponent.total");
2389            else if (Configuration.doAutoCreate())
2390              this.total = new IntegerType(); // bb
2391          return this.total;
2392        }
2393
2394        public boolean hasTotalElement() { 
2395          return this.total != null && !this.total.isEmpty();
2396        }
2397
2398        public boolean hasTotal() { 
2399          return this.total != null && !this.total.isEmpty();
2400        }
2401
2402        /**
2403         * @param value {@link #total} (The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.). This is the underlying object with id, value and extensions. The accessor "getTotal" gives direct access to the value
2404         */
2405        public ValueSetExpansionComponent setTotalElement(IntegerType value) { 
2406          this.total = value;
2407          return this;
2408        }
2409
2410        /**
2411         * @return The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.
2412         */
2413        public int getTotal() { 
2414          return this.total == null || this.total.isEmpty() ? 0 : this.total.getValue();
2415        }
2416
2417        /**
2418         * @param value The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.
2419         */
2420        public ValueSetExpansionComponent setTotal(int value) { 
2421            if (this.total == null)
2422              this.total = new IntegerType();
2423            this.total.setValue(value);
2424          return this;
2425        }
2426
2427        /**
2428         * @return {@link #offset} (If paging is being used, the offset at which this resource starts.  I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present.). This is the underlying object with id, value and extensions. The accessor "getOffset" gives direct access to the value
2429         */
2430        public IntegerType getOffsetElement() { 
2431          if (this.offset == null)
2432            if (Configuration.errorOnAutoCreate())
2433              throw new Error("Attempt to auto-create ValueSetExpansionComponent.offset");
2434            else if (Configuration.doAutoCreate())
2435              this.offset = new IntegerType(); // bb
2436          return this.offset;
2437        }
2438
2439        public boolean hasOffsetElement() { 
2440          return this.offset != null && !this.offset.isEmpty();
2441        }
2442
2443        public boolean hasOffset() { 
2444          return this.offset != null && !this.offset.isEmpty();
2445        }
2446
2447        /**
2448         * @param value {@link #offset} (If paging is being used, the offset at which this resource starts.  I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present.). This is the underlying object with id, value and extensions. The accessor "getOffset" gives direct access to the value
2449         */
2450        public ValueSetExpansionComponent setOffsetElement(IntegerType value) { 
2451          this.offset = value;
2452          return this;
2453        }
2454
2455        /**
2456         * @return If paging is being used, the offset at which this resource starts.  I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present.
2457         */
2458        public int getOffset() { 
2459          return this.offset == null || this.offset.isEmpty() ? 0 : this.offset.getValue();
2460        }
2461
2462        /**
2463         * @param value If paging is being used, the offset at which this resource starts.  I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present.
2464         */
2465        public ValueSetExpansionComponent setOffset(int value) { 
2466            if (this.offset == null)
2467              this.offset = new IntegerType();
2468            this.offset.setValue(value);
2469          return this;
2470        }
2471
2472        /**
2473         * @return {@link #parameter} (A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.)
2474         */
2475        public List<ValueSetExpansionParameterComponent> getParameter() { 
2476          if (this.parameter == null)
2477            this.parameter = new ArrayList<ValueSetExpansionParameterComponent>();
2478          return this.parameter;
2479        }
2480
2481        /**
2482         * @return Returns a reference to <code>this</code> for easy method chaining
2483         */
2484        public ValueSetExpansionComponent setParameter(List<ValueSetExpansionParameterComponent> theParameter) { 
2485          this.parameter = theParameter;
2486          return this;
2487        }
2488
2489        public boolean hasParameter() { 
2490          if (this.parameter == null)
2491            return false;
2492          for (ValueSetExpansionParameterComponent item : this.parameter)
2493            if (!item.isEmpty())
2494              return true;
2495          return false;
2496        }
2497
2498        public ValueSetExpansionParameterComponent addParameter() { //3
2499          ValueSetExpansionParameterComponent t = new ValueSetExpansionParameterComponent();
2500          if (this.parameter == null)
2501            this.parameter = new ArrayList<ValueSetExpansionParameterComponent>();
2502          this.parameter.add(t);
2503          return t;
2504        }
2505
2506        public ValueSetExpansionComponent addParameter(ValueSetExpansionParameterComponent t) { //3
2507          if (t == null)
2508            return this;
2509          if (this.parameter == null)
2510            this.parameter = new ArrayList<ValueSetExpansionParameterComponent>();
2511          this.parameter.add(t);
2512          return this;
2513        }
2514
2515        /**
2516         * @return The first repetition of repeating field {@link #parameter}, creating it if it does not already exist
2517         */
2518        public ValueSetExpansionParameterComponent getParameterFirstRep() { 
2519          if (getParameter().isEmpty()) {
2520            addParameter();
2521          }
2522          return getParameter().get(0);
2523        }
2524
2525        /**
2526         * @return {@link #property} (A property defines an additional slot through which additional information can be provided about a concept.)
2527         */
2528        public List<ValueSetExpansionPropertyComponent> getProperty() { 
2529          if (this.property == null)
2530            this.property = new ArrayList<ValueSetExpansionPropertyComponent>();
2531          return this.property;
2532        }
2533
2534        /**
2535         * @return Returns a reference to <code>this</code> for easy method chaining
2536         */
2537        public ValueSetExpansionComponent setProperty(List<ValueSetExpansionPropertyComponent> theProperty) { 
2538          this.property = theProperty;
2539          return this;
2540        }
2541
2542        public boolean hasProperty() { 
2543          if (this.property == null)
2544            return false;
2545          for (ValueSetExpansionPropertyComponent item : this.property)
2546            if (!item.isEmpty())
2547              return true;
2548          return false;
2549        }
2550
2551        public ValueSetExpansionPropertyComponent addProperty() { //3
2552          ValueSetExpansionPropertyComponent t = new ValueSetExpansionPropertyComponent();
2553          if (this.property == null)
2554            this.property = new ArrayList<ValueSetExpansionPropertyComponent>();
2555          this.property.add(t);
2556          return t;
2557        }
2558
2559        public ValueSetExpansionComponent addProperty(ValueSetExpansionPropertyComponent t) { //3
2560          if (t == null)
2561            return this;
2562          if (this.property == null)
2563            this.property = new ArrayList<ValueSetExpansionPropertyComponent>();
2564          this.property.add(t);
2565          return this;
2566        }
2567
2568        /**
2569         * @return The first repetition of repeating field {@link #property}, creating it if it does not already exist
2570         */
2571        public ValueSetExpansionPropertyComponent getPropertyFirstRep() { 
2572          if (getProperty().isEmpty()) {
2573            addProperty();
2574          }
2575          return getProperty().get(0);
2576        }
2577
2578        /**
2579         * @return {@link #contains} (The codes that are contained in the value set expansion.)
2580         */
2581        public List<ValueSetExpansionContainsComponent> getContains() { 
2582          if (this.contains == null)
2583            this.contains = new ArrayList<ValueSetExpansionContainsComponent>();
2584          return this.contains;
2585        }
2586
2587        /**
2588         * @return Returns a reference to <code>this</code> for easy method chaining
2589         */
2590        public ValueSetExpansionComponent setContains(List<ValueSetExpansionContainsComponent> theContains) { 
2591          this.contains = theContains;
2592          return this;
2593        }
2594
2595        public boolean hasContains() { 
2596          if (this.contains == null)
2597            return false;
2598          for (ValueSetExpansionContainsComponent item : this.contains)
2599            if (!item.isEmpty())
2600              return true;
2601          return false;
2602        }
2603
2604        public ValueSetExpansionContainsComponent addContains() { //3
2605          ValueSetExpansionContainsComponent t = new ValueSetExpansionContainsComponent();
2606          if (this.contains == null)
2607            this.contains = new ArrayList<ValueSetExpansionContainsComponent>();
2608          this.contains.add(t);
2609          return t;
2610        }
2611
2612        public ValueSetExpansionComponent addContains(ValueSetExpansionContainsComponent t) { //3
2613          if (t == null)
2614            return this;
2615          if (this.contains == null)
2616            this.contains = new ArrayList<ValueSetExpansionContainsComponent>();
2617          this.contains.add(t);
2618          return this;
2619        }
2620
2621        /**
2622         * @return The first repetition of repeating field {@link #contains}, creating it if it does not already exist
2623         */
2624        public ValueSetExpansionContainsComponent getContainsFirstRep() { 
2625          if (getContains().isEmpty()) {
2626            addContains();
2627          }
2628          return getContains().get(0);
2629        }
2630
2631        protected void listChildren(List<Property> children) {
2632          super.listChildren(children);
2633          children.add(new Property("identifier", "uri", "An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier.", 0, 1, identifier));
2634          children.add(new Property("timestamp", "dateTime", "The time at which the expansion was produced by the expanding system.", 0, 1, timestamp));
2635          children.add(new Property("total", "integer", "The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.", 0, 1, total));
2636          children.add(new Property("offset", "integer", "If paging is being used, the offset at which this resource starts.  I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present.", 0, 1, offset));
2637          children.add(new Property("parameter", "", "A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.", 0, java.lang.Integer.MAX_VALUE, parameter));
2638          children.add(new Property("property", "", "A property defines an additional slot through which additional information can be provided about a concept.", 0, java.lang.Integer.MAX_VALUE, property));
2639          children.add(new Property("contains", "", "The codes that are contained in the value set expansion.", 0, java.lang.Integer.MAX_VALUE, contains));
2640        }
2641
2642        @Override
2643        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2644          switch (_hash) {
2645          case -1618432855: /*identifier*/  return new Property("identifier", "uri", "An identifier that uniquely identifies this expansion of the valueset, based on a unique combination of the provided parameters, the system default parameters, and the underlying system code system versions etc. Systems may re-use the same identifier as long as those factors remain the same, and the expansion is the same, but are not required to do so. This is a business identifier.", 0, 1, identifier);
2646          case 55126294: /*timestamp*/  return new Property("timestamp", "dateTime", "The time at which the expansion was produced by the expanding system.", 0, 1, timestamp);
2647          case 110549828: /*total*/  return new Property("total", "integer", "The total number of concepts in the expansion. If the number of concept nodes in this resource is less than the stated number, then the server can return more using the offset parameter.", 0, 1, total);
2648          case -1019779949: /*offset*/  return new Property("offset", "integer", "If paging is being used, the offset at which this resource starts.  I.e. this resource is a partial view into the expansion. If paging is not being used, this element SHALL NOT be present.", 0, 1, offset);
2649          case 1954460585: /*parameter*/  return new Property("parameter", "", "A parameter that controlled the expansion process. These parameters may be used by users of expanded value sets to check whether the expansion is suitable for a particular purpose, or to pick the correct expansion.", 0, java.lang.Integer.MAX_VALUE, parameter);
2650          case -993141291: /*property*/  return new Property("property", "", "A property defines an additional slot through which additional information can be provided about a concept.", 0, java.lang.Integer.MAX_VALUE, property);
2651          case -567445985: /*contains*/  return new Property("contains", "", "The codes that are contained in the value set expansion.", 0, java.lang.Integer.MAX_VALUE, contains);
2652          default: return super.getNamedProperty(_hash, _name, _checkValid);
2653          }
2654
2655        }
2656
2657      @Override
2658      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2659        switch (hash) {
2660        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // UriType
2661        case 55126294: /*timestamp*/ return this.timestamp == null ? new Base[0] : new Base[] {this.timestamp}; // DateTimeType
2662        case 110549828: /*total*/ return this.total == null ? new Base[0] : new Base[] {this.total}; // IntegerType
2663        case -1019779949: /*offset*/ return this.offset == null ? new Base[0] : new Base[] {this.offset}; // IntegerType
2664        case 1954460585: /*parameter*/ return this.parameter == null ? new Base[0] : this.parameter.toArray(new Base[this.parameter.size()]); // ValueSetExpansionParameterComponent
2665        case -993141291: /*property*/ return this.property == null ? new Base[0] : this.property.toArray(new Base[this.property.size()]); // ValueSetExpansionPropertyComponent
2666        case -567445985: /*contains*/ return this.contains == null ? new Base[0] : this.contains.toArray(new Base[this.contains.size()]); // ValueSetExpansionContainsComponent
2667        default: return super.getProperty(hash, name, checkValid);
2668        }
2669
2670      }
2671
2672      @Override
2673      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2674        switch (hash) {
2675        case -1618432855: // identifier
2676          this.identifier = castToUri(value); // UriType
2677          return value;
2678        case 55126294: // timestamp
2679          this.timestamp = castToDateTime(value); // DateTimeType
2680          return value;
2681        case 110549828: // total
2682          this.total = castToInteger(value); // IntegerType
2683          return value;
2684        case -1019779949: // offset
2685          this.offset = castToInteger(value); // IntegerType
2686          return value;
2687        case 1954460585: // parameter
2688          this.getParameter().add((ValueSetExpansionParameterComponent) value); // ValueSetExpansionParameterComponent
2689          return value;
2690        case -993141291: // property
2691          this.getProperty().add((ValueSetExpansionPropertyComponent) value); // ValueSetExpansionPropertyComponent
2692          return value;
2693        case -567445985: // contains
2694          this.getContains().add((ValueSetExpansionContainsComponent) value); // ValueSetExpansionContainsComponent
2695          return value;
2696        default: return super.setProperty(hash, name, value);
2697        }
2698
2699      }
2700
2701      @Override
2702      public Base setProperty(String name, Base value) throws FHIRException {
2703        if (name.equals("identifier")) {
2704          this.identifier = castToUri(value); // UriType
2705        } else if (name.equals("timestamp")) {
2706          this.timestamp = castToDateTime(value); // DateTimeType
2707        } else if (name.equals("total")) {
2708          this.total = castToInteger(value); // IntegerType
2709        } else if (name.equals("offset")) {
2710          this.offset = castToInteger(value); // IntegerType
2711        } else if (name.equals("parameter")) {
2712          this.getParameter().add((ValueSetExpansionParameterComponent) value);
2713        } else if (name.equals("property")) {
2714          this.getProperty().add((ValueSetExpansionPropertyComponent) value);
2715        } else if (name.equals("contains")) {
2716          this.getContains().add((ValueSetExpansionContainsComponent) value);
2717        } else
2718          return super.setProperty(name, value);
2719        return value;
2720      }
2721
2722      @Override
2723      public Base makeProperty(int hash, String name) throws FHIRException {
2724        switch (hash) {
2725        case -1618432855:  return getIdentifierElement();
2726        case 55126294:  return getTimestampElement();
2727        case 110549828:  return getTotalElement();
2728        case -1019779949:  return getOffsetElement();
2729        case 1954460585:  return addParameter(); 
2730        case -993141291:  return addProperty(); 
2731        case -567445985:  return addContains(); 
2732        default: return super.makeProperty(hash, name);
2733        }
2734
2735      }
2736
2737      @Override
2738      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2739        switch (hash) {
2740        case -1618432855: /*identifier*/ return new String[] {"uri"};
2741        case 55126294: /*timestamp*/ return new String[] {"dateTime"};
2742        case 110549828: /*total*/ return new String[] {"integer"};
2743        case -1019779949: /*offset*/ return new String[] {"integer"};
2744        case 1954460585: /*parameter*/ return new String[] {};
2745        case -993141291: /*property*/ return new String[] {};
2746        case -567445985: /*contains*/ return new String[] {};
2747        default: return super.getTypesForProperty(hash, name);
2748        }
2749
2750      }
2751
2752      @Override
2753      public Base addChild(String name) throws FHIRException {
2754        if (name.equals("identifier")) {
2755          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.identifier");
2756        }
2757        else if (name.equals("timestamp")) {
2758          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.timestamp");
2759        }
2760        else if (name.equals("total")) {
2761          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.total");
2762        }
2763        else if (name.equals("offset")) {
2764          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.offset");
2765        }
2766        else if (name.equals("parameter")) {
2767          return addParameter();
2768        }
2769        else if (name.equals("property")) {
2770          return addProperty();
2771        }
2772        else if (name.equals("contains")) {
2773          return addContains();
2774        }
2775        else
2776          return super.addChild(name);
2777      }
2778
2779      public ValueSetExpansionComponent copy() {
2780        ValueSetExpansionComponent dst = new ValueSetExpansionComponent();
2781        copyValues(dst);
2782        return dst;
2783      }
2784
2785      public void copyValues(ValueSetExpansionComponent dst) {
2786        super.copyValues(dst);
2787        dst.identifier = identifier == null ? null : identifier.copy();
2788        dst.timestamp = timestamp == null ? null : timestamp.copy();
2789        dst.total = total == null ? null : total.copy();
2790        dst.offset = offset == null ? null : offset.copy();
2791        if (parameter != null) {
2792          dst.parameter = new ArrayList<ValueSetExpansionParameterComponent>();
2793          for (ValueSetExpansionParameterComponent i : parameter)
2794            dst.parameter.add(i.copy());
2795        };
2796        if (property != null) {
2797          dst.property = new ArrayList<ValueSetExpansionPropertyComponent>();
2798          for (ValueSetExpansionPropertyComponent i : property)
2799            dst.property.add(i.copy());
2800        };
2801        if (contains != null) {
2802          dst.contains = new ArrayList<ValueSetExpansionContainsComponent>();
2803          for (ValueSetExpansionContainsComponent i : contains)
2804            dst.contains.add(i.copy());
2805        };
2806      }
2807
2808      @Override
2809      public boolean equalsDeep(Base other_) {
2810        if (!super.equalsDeep(other_))
2811          return false;
2812        if (!(other_ instanceof ValueSetExpansionComponent))
2813          return false;
2814        ValueSetExpansionComponent o = (ValueSetExpansionComponent) other_;
2815        return compareDeep(identifier, o.identifier, true) && compareDeep(timestamp, o.timestamp, true)
2816           && compareDeep(total, o.total, true) && compareDeep(offset, o.offset, true) && compareDeep(parameter, o.parameter, true)
2817           && compareDeep(property, o.property, true) && compareDeep(contains, o.contains, true);
2818      }
2819
2820      @Override
2821      public boolean equalsShallow(Base other_) {
2822        if (!super.equalsShallow(other_))
2823          return false;
2824        if (!(other_ instanceof ValueSetExpansionComponent))
2825          return false;
2826        ValueSetExpansionComponent o = (ValueSetExpansionComponent) other_;
2827        return compareValues(identifier, o.identifier, true) && compareValues(timestamp, o.timestamp, true)
2828           && compareValues(total, o.total, true) && compareValues(offset, o.offset, true);
2829      }
2830
2831      public boolean isEmpty() {
2832        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, timestamp, total
2833          , offset, parameter, property, contains);
2834      }
2835
2836  public String fhirType() {
2837    return "ValueSet.expansion";
2838
2839  }
2840
2841  }
2842
2843    @Block()
2844    public static class ValueSetExpansionParameterComponent extends BackboneElement implements IBaseBackboneElement {
2845        /**
2846         * Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process.
2847         */
2848        @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
2849        @Description(shortDefinition="Name as assigned by the client or server", formalDefinition="Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process." )
2850        protected StringType name;
2851
2852        /**
2853         * The value of the parameter.
2854         */
2855        @Child(name = "value", type = {StringType.class, BooleanType.class, IntegerType.class, DecimalType.class, UriType.class, CodeType.class, DateTimeType.class}, order=2, min=0, max=1, modifier=false, summary=false)
2856        @Description(shortDefinition="Value of the named parameter", formalDefinition="The value of the parameter." )
2857        protected Type value;
2858
2859        private static final long serialVersionUID = 1172641169L;
2860
2861    /**
2862     * Constructor
2863     */
2864      public ValueSetExpansionParameterComponent() {
2865        super();
2866      }
2867
2868    /**
2869     * Constructor
2870     */
2871      public ValueSetExpansionParameterComponent(StringType name) {
2872        super();
2873        this.name = name;
2874      }
2875
2876        /**
2877         * @return {@link #name} (Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
2878         */
2879        public StringType getNameElement() { 
2880          if (this.name == null)
2881            if (Configuration.errorOnAutoCreate())
2882              throw new Error("Attempt to auto-create ValueSetExpansionParameterComponent.name");
2883            else if (Configuration.doAutoCreate())
2884              this.name = new StringType(); // bb
2885          return this.name;
2886        }
2887
2888        public boolean hasNameElement() { 
2889          return this.name != null && !this.name.isEmpty();
2890        }
2891
2892        public boolean hasName() { 
2893          return this.name != null && !this.name.isEmpty();
2894        }
2895
2896        /**
2897         * @param value {@link #name} (Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
2898         */
2899        public ValueSetExpansionParameterComponent setNameElement(StringType value) { 
2900          this.name = value;
2901          return this;
2902        }
2903
2904        /**
2905         * @return Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process.
2906         */
2907        public String getName() { 
2908          return this.name == null ? null : this.name.getValue();
2909        }
2910
2911        /**
2912         * @param value Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process.
2913         */
2914        public ValueSetExpansionParameterComponent setName(String value) { 
2915            if (this.name == null)
2916              this.name = new StringType();
2917            this.name.setValue(value);
2918          return this;
2919        }
2920
2921        /**
2922         * @return {@link #value} (The value of the parameter.)
2923         */
2924        public Type getValue() { 
2925          return this.value;
2926        }
2927
2928        /**
2929         * @return {@link #value} (The value of the parameter.)
2930         */
2931        public StringType getValueStringType() throws FHIRException { 
2932          if (this.value == null)
2933            this.value = new StringType();
2934          if (!(this.value instanceof StringType))
2935            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered");
2936          return (StringType) this.value;
2937        }
2938
2939        public boolean hasValueStringType() { 
2940          return this != null && this.value instanceof StringType;
2941        }
2942
2943        /**
2944         * @return {@link #value} (The value of the parameter.)
2945         */
2946        public BooleanType getValueBooleanType() throws FHIRException { 
2947          if (this.value == null)
2948            this.value = new BooleanType();
2949          if (!(this.value instanceof BooleanType))
2950            throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered");
2951          return (BooleanType) this.value;
2952        }
2953
2954        public boolean hasValueBooleanType() { 
2955          return this != null && this.value instanceof BooleanType;
2956        }
2957
2958        /**
2959         * @return {@link #value} (The value of the parameter.)
2960         */
2961        public IntegerType getValueIntegerType() throws FHIRException { 
2962          if (this.value == null)
2963            this.value = new IntegerType();
2964          if (!(this.value instanceof IntegerType))
2965            throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered");
2966          return (IntegerType) this.value;
2967        }
2968
2969        public boolean hasValueIntegerType() { 
2970          return this != null && this.value instanceof IntegerType;
2971        }
2972
2973        /**
2974         * @return {@link #value} (The value of the parameter.)
2975         */
2976        public DecimalType getValueDecimalType() throws FHIRException { 
2977          if (this.value == null)
2978            this.value = new DecimalType();
2979          if (!(this.value instanceof DecimalType))
2980            throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.value.getClass().getName()+" was encountered");
2981          return (DecimalType) this.value;
2982        }
2983
2984        public boolean hasValueDecimalType() { 
2985          return this != null && this.value instanceof DecimalType;
2986        }
2987
2988        /**
2989         * @return {@link #value} (The value of the parameter.)
2990         */
2991        public UriType getValueUriType() throws FHIRException { 
2992          if (this.value == null)
2993            this.value = new UriType();
2994          if (!(this.value instanceof UriType))
2995            throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.value.getClass().getName()+" was encountered");
2996          return (UriType) this.value;
2997        }
2998
2999        public boolean hasValueUriType() { 
3000          return this != null && this.value instanceof UriType;
3001        }
3002
3003        /**
3004         * @return {@link #value} (The value of the parameter.)
3005         */
3006        public CodeType getValueCodeType() throws FHIRException { 
3007          if (this.value == null)
3008            this.value = new CodeType();
3009          if (!(this.value instanceof CodeType))
3010            throw new FHIRException("Type mismatch: the type CodeType was expected, but "+this.value.getClass().getName()+" was encountered");
3011          return (CodeType) this.value;
3012        }
3013
3014        public boolean hasValueCodeType() { 
3015          return this != null && this.value instanceof CodeType;
3016        }
3017
3018        /**
3019         * @return {@link #value} (The value of the parameter.)
3020         */
3021        public DateTimeType getValueDateTimeType() throws FHIRException { 
3022          if (this.value == null)
3023            this.value = new DateTimeType();
3024          if (!(this.value instanceof DateTimeType))
3025            throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered");
3026          return (DateTimeType) this.value;
3027        }
3028
3029        public boolean hasValueDateTimeType() { 
3030          return this != null && this.value instanceof DateTimeType;
3031        }
3032
3033        public boolean hasValue() { 
3034          return this.value != null && !this.value.isEmpty();
3035        }
3036
3037        /**
3038         * @param value {@link #value} (The value of the parameter.)
3039         */
3040        public ValueSetExpansionParameterComponent setValue(Type value) { 
3041          if (value != null && !(value instanceof StringType || value instanceof BooleanType || value instanceof IntegerType || value instanceof DecimalType || value instanceof UriType || value instanceof CodeType || value instanceof DateTimeType))
3042            throw new Error("Not the right type for ValueSet.expansion.parameter.value[x]: "+value.fhirType());
3043          this.value = value;
3044          return this;
3045        }
3046
3047        protected void listChildren(List<Property> children) {
3048          super.listChildren(children);
3049          children.add(new Property("name", "string", "Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process.", 0, 1, name));
3050          children.add(new Property("value[x]", "string|boolean|integer|decimal|uri|code|dateTime", "The value of the parameter.", 0, 1, value));
3051        }
3052
3053        @Override
3054        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3055          switch (_hash) {
3056          case 3373707: /*name*/  return new Property("name", "string", "Name of the input parameter to the $expand operation; may be a server-assigned name for additional default or other server-supplied parameters used to control the expansion process.", 0, 1, name);
3057          case -1410166417: /*value[x]*/  return new Property("value[x]", "string|boolean|integer|decimal|uri|code|dateTime", "The value of the parameter.", 0, 1, value);
3058          case 111972721: /*value*/  return new Property("value[x]", "string|boolean|integer|decimal|uri|code|dateTime", "The value of the parameter.", 0, 1, value);
3059          case -1424603934: /*valueString*/  return new Property("value[x]", "string|boolean|integer|decimal|uri|code|dateTime", "The value of the parameter.", 0, 1, value);
3060          case 733421943: /*valueBoolean*/  return new Property("value[x]", "string|boolean|integer|decimal|uri|code|dateTime", "The value of the parameter.", 0, 1, value);
3061          case -1668204915: /*valueInteger*/  return new Property("value[x]", "string|boolean|integer|decimal|uri|code|dateTime", "The value of the parameter.", 0, 1, value);
3062          case -2083993440: /*valueDecimal*/  return new Property("value[x]", "string|boolean|integer|decimal|uri|code|dateTime", "The value of the parameter.", 0, 1, value);
3063          case -1410172357: /*valueUri*/  return new Property("value[x]", "string|boolean|integer|decimal|uri|code|dateTime", "The value of the parameter.", 0, 1, value);
3064          case -766209282: /*valueCode*/  return new Property("value[x]", "string|boolean|integer|decimal|uri|code|dateTime", "The value of the parameter.", 0, 1, value);
3065          case 1047929900: /*valueDateTime*/  return new Property("value[x]", "string|boolean|integer|decimal|uri|code|dateTime", "The value of the parameter.", 0, 1, value);
3066          default: return super.getNamedProperty(_hash, _name, _checkValid);
3067          }
3068
3069        }
3070
3071      @Override
3072      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3073        switch (hash) {
3074        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
3075        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Type
3076        default: return super.getProperty(hash, name, checkValid);
3077        }
3078
3079      }
3080
3081      @Override
3082      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3083        switch (hash) {
3084        case 3373707: // name
3085          this.name = castToString(value); // StringType
3086          return value;
3087        case 111972721: // value
3088          this.value = castToType(value); // Type
3089          return value;
3090        default: return super.setProperty(hash, name, value);
3091        }
3092
3093      }
3094
3095      @Override
3096      public Base setProperty(String name, Base value) throws FHIRException {
3097        if (name.equals("name")) {
3098          this.name = castToString(value); // StringType
3099        } else if (name.equals("value[x]")) {
3100          this.value = castToType(value); // Type
3101        } else
3102          return super.setProperty(name, value);
3103        return value;
3104      }
3105
3106      @Override
3107      public Base makeProperty(int hash, String name) throws FHIRException {
3108        switch (hash) {
3109        case 3373707:  return getNameElement();
3110        case -1410166417:  return getValue();
3111        case 111972721:  return getValue();
3112        default: return super.makeProperty(hash, name);
3113        }
3114
3115      }
3116
3117      @Override
3118      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3119        switch (hash) {
3120        case 3373707: /*name*/ return new String[] {"string"};
3121        case 111972721: /*value*/ return new String[] {"string", "boolean", "integer", "decimal", "uri", "code", "dateTime"};
3122        default: return super.getTypesForProperty(hash, name);
3123        }
3124
3125      }
3126
3127      @Override
3128      public Base addChild(String name) throws FHIRException {
3129        if (name.equals("name")) {
3130          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.name");
3131        }
3132        else if (name.equals("valueString")) {
3133          this.value = new StringType();
3134          return this.value;
3135        }
3136        else if (name.equals("valueBoolean")) {
3137          this.value = new BooleanType();
3138          return this.value;
3139        }
3140        else if (name.equals("valueInteger")) {
3141          this.value = new IntegerType();
3142          return this.value;
3143        }
3144        else if (name.equals("valueDecimal")) {
3145          this.value = new DecimalType();
3146          return this.value;
3147        }
3148        else if (name.equals("valueUri")) {
3149          this.value = new UriType();
3150          return this.value;
3151        }
3152        else if (name.equals("valueCode")) {
3153          this.value = new CodeType();
3154          return this.value;
3155        }
3156        else if (name.equals("valueDateTime")) {
3157          this.value = new DateTimeType();
3158          return this.value;
3159        }
3160        else
3161          return super.addChild(name);
3162      }
3163
3164      public ValueSetExpansionParameterComponent copy() {
3165        ValueSetExpansionParameterComponent dst = new ValueSetExpansionParameterComponent();
3166        copyValues(dst);
3167        return dst;
3168      }
3169
3170      public void copyValues(ValueSetExpansionParameterComponent dst) {
3171        super.copyValues(dst);
3172        dst.name = name == null ? null : name.copy();
3173        dst.value = value == null ? null : value.copy();
3174      }
3175
3176      @Override
3177      public boolean equalsDeep(Base other_) {
3178        if (!super.equalsDeep(other_))
3179          return false;
3180        if (!(other_ instanceof ValueSetExpansionParameterComponent))
3181          return false;
3182        ValueSetExpansionParameterComponent o = (ValueSetExpansionParameterComponent) other_;
3183        return compareDeep(name, o.name, true) && compareDeep(value, o.value, true);
3184      }
3185
3186      @Override
3187      public boolean equalsShallow(Base other_) {
3188        if (!super.equalsShallow(other_))
3189          return false;
3190        if (!(other_ instanceof ValueSetExpansionParameterComponent))
3191          return false;
3192        ValueSetExpansionParameterComponent o = (ValueSetExpansionParameterComponent) other_;
3193        return compareValues(name, o.name, true);
3194      }
3195
3196      public boolean isEmpty() {
3197        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value);
3198      }
3199
3200  public String fhirType() {
3201    return "ValueSet.expansion.parameter";
3202
3203  }
3204
3205  }
3206
3207    @Block()
3208    public static class ValueSetExpansionPropertyComponent extends BackboneElement implements IBaseBackboneElement {
3209        /**
3210         * A code that is used to identify the property. The code is used in ValueSet.expansion.contains.property.code.
3211         */
3212        @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
3213        @Description(shortDefinition="Identifies the property on the concepts, and when referred to in operations", formalDefinition="A code that is used to identify the property. The code is used in ValueSet.expansion.contains.property.code." )
3214        protected CodeType code;
3215
3216        /**
3217         * Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.
3218         */
3219        @Child(name = "uri", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=false)
3220        @Description(shortDefinition="Formal identifier for the property", formalDefinition="Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system." )
3221        protected UriType uri;
3222
3223        private static final long serialVersionUID = 929575836L;
3224
3225    /**
3226     * Constructor
3227     */
3228      public ValueSetExpansionPropertyComponent() {
3229        super();
3230      }
3231
3232    /**
3233     * Constructor
3234     */
3235      public ValueSetExpansionPropertyComponent(CodeType code) {
3236        super();
3237        this.code = code;
3238      }
3239
3240        /**
3241         * @return {@link #code} (A code that is used to identify the property. The code is used in ValueSet.expansion.contains.property.code.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
3242         */
3243        public CodeType getCodeElement() { 
3244          if (this.code == null)
3245            if (Configuration.errorOnAutoCreate())
3246              throw new Error("Attempt to auto-create ValueSetExpansionPropertyComponent.code");
3247            else if (Configuration.doAutoCreate())
3248              this.code = new CodeType(); // bb
3249          return this.code;
3250        }
3251
3252        public boolean hasCodeElement() { 
3253          return this.code != null && !this.code.isEmpty();
3254        }
3255
3256        public boolean hasCode() { 
3257          return this.code != null && !this.code.isEmpty();
3258        }
3259
3260        /**
3261         * @param value {@link #code} (A code that is used to identify the property. The code is used in ValueSet.expansion.contains.property.code.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
3262         */
3263        public ValueSetExpansionPropertyComponent setCodeElement(CodeType value) { 
3264          this.code = value;
3265          return this;
3266        }
3267
3268        /**
3269         * @return A code that is used to identify the property. The code is used in ValueSet.expansion.contains.property.code.
3270         */
3271        public String getCode() { 
3272          return this.code == null ? null : this.code.getValue();
3273        }
3274
3275        /**
3276         * @param value A code that is used to identify the property. The code is used in ValueSet.expansion.contains.property.code.
3277         */
3278        public ValueSetExpansionPropertyComponent setCode(String value) { 
3279            if (this.code == null)
3280              this.code = new CodeType();
3281            this.code.setValue(value);
3282          return this;
3283        }
3284
3285        /**
3286         * @return {@link #uri} (Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value
3287         */
3288        public UriType getUriElement() { 
3289          if (this.uri == null)
3290            if (Configuration.errorOnAutoCreate())
3291              throw new Error("Attempt to auto-create ValueSetExpansionPropertyComponent.uri");
3292            else if (Configuration.doAutoCreate())
3293              this.uri = new UriType(); // bb
3294          return this.uri;
3295        }
3296
3297        public boolean hasUriElement() { 
3298          return this.uri != null && !this.uri.isEmpty();
3299        }
3300
3301        public boolean hasUri() { 
3302          return this.uri != null && !this.uri.isEmpty();
3303        }
3304
3305        /**
3306         * @param value {@link #uri} (Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value
3307         */
3308        public ValueSetExpansionPropertyComponent setUriElement(UriType value) { 
3309          this.uri = value;
3310          return this;
3311        }
3312
3313        /**
3314         * @return Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.
3315         */
3316        public String getUri() { 
3317          return this.uri == null ? null : this.uri.getValue();
3318        }
3319
3320        /**
3321         * @param value Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.
3322         */
3323        public ValueSetExpansionPropertyComponent setUri(String value) { 
3324          if (Utilities.noString(value))
3325            this.uri = null;
3326          else {
3327            if (this.uri == null)
3328              this.uri = new UriType();
3329            this.uri.setValue(value);
3330          }
3331          return this;
3332        }
3333
3334        protected void listChildren(List<Property> children) {
3335          super.listChildren(children);
3336          children.add(new Property("code", "code", "A code that is used to identify the property. The code is used in ValueSet.expansion.contains.property.code.", 0, 1, code));
3337          children.add(new Property("uri", "uri", "Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.", 0, 1, uri));
3338        }
3339
3340        @Override
3341        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3342          switch (_hash) {
3343          case 3059181: /*code*/  return new Property("code", "code", "A code that is used to identify the property. The code is used in ValueSet.expansion.contains.property.code.", 0, 1, code);
3344          case 116076: /*uri*/  return new Property("uri", "uri", "Reference to the formal meaning of the property. One possible source of meaning is the [Concept Properties](codesystem-concept-properties.html) code system.", 0, 1, uri);
3345          default: return super.getNamedProperty(_hash, _name, _checkValid);
3346          }
3347
3348        }
3349
3350      @Override
3351      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3352        switch (hash) {
3353        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType
3354        case 116076: /*uri*/ return this.uri == null ? new Base[0] : new Base[] {this.uri}; // UriType
3355        default: return super.getProperty(hash, name, checkValid);
3356        }
3357
3358      }
3359
3360      @Override
3361      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3362        switch (hash) {
3363        case 3059181: // code
3364          this.code = castToCode(value); // CodeType
3365          return value;
3366        case 116076: // uri
3367          this.uri = castToUri(value); // UriType
3368          return value;
3369        default: return super.setProperty(hash, name, value);
3370        }
3371
3372      }
3373
3374      @Override
3375      public Base setProperty(String name, Base value) throws FHIRException {
3376        if (name.equals("code")) {
3377          this.code = castToCode(value); // CodeType
3378        } else if (name.equals("uri")) {
3379          this.uri = castToUri(value); // UriType
3380        } else
3381          return super.setProperty(name, value);
3382        return value;
3383      }
3384
3385      @Override
3386      public Base makeProperty(int hash, String name) throws FHIRException {
3387        switch (hash) {
3388        case 3059181:  return getCodeElement();
3389        case 116076:  return getUriElement();
3390        default: return super.makeProperty(hash, name);
3391        }
3392
3393      }
3394
3395      @Override
3396      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3397        switch (hash) {
3398        case 3059181: /*code*/ return new String[] {"code"};
3399        case 116076: /*uri*/ return new String[] {"uri"};
3400        default: return super.getTypesForProperty(hash, name);
3401        }
3402
3403      }
3404
3405      @Override
3406      public Base addChild(String name) throws FHIRException {
3407        if (name.equals("code")) {
3408          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.code");
3409        }
3410        else if (name.equals("uri")) {
3411          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.uri");
3412        }
3413        else
3414          return super.addChild(name);
3415      }
3416
3417      public ValueSetExpansionPropertyComponent copy() {
3418        ValueSetExpansionPropertyComponent dst = new ValueSetExpansionPropertyComponent();
3419        copyValues(dst);
3420        return dst;
3421      }
3422
3423      public void copyValues(ValueSetExpansionPropertyComponent dst) {
3424        super.copyValues(dst);
3425        dst.code = code == null ? null : code.copy();
3426        dst.uri = uri == null ? null : uri.copy();
3427      }
3428
3429      @Override
3430      public boolean equalsDeep(Base other_) {
3431        if (!super.equalsDeep(other_))
3432          return false;
3433        if (!(other_ instanceof ValueSetExpansionPropertyComponent))
3434          return false;
3435        ValueSetExpansionPropertyComponent o = (ValueSetExpansionPropertyComponent) other_;
3436        return compareDeep(code, o.code, true) && compareDeep(uri, o.uri, true);
3437      }
3438
3439      @Override
3440      public boolean equalsShallow(Base other_) {
3441        if (!super.equalsShallow(other_))
3442          return false;
3443        if (!(other_ instanceof ValueSetExpansionPropertyComponent))
3444          return false;
3445        ValueSetExpansionPropertyComponent o = (ValueSetExpansionPropertyComponent) other_;
3446        return compareValues(code, o.code, true) && compareValues(uri, o.uri, true);
3447      }
3448
3449      public boolean isEmpty() {
3450        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, uri);
3451      }
3452
3453  public String fhirType() {
3454    return "ValueSet.expansion.property";
3455
3456  }
3457
3458  }
3459
3460    @Block()
3461    public static class ValueSetExpansionContainsComponent extends BackboneElement implements IBaseBackboneElement {
3462        /**
3463         * An absolute URI which is the code system in which the code for this item in the expansion is defined.
3464         */
3465        @Child(name = "system", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=false)
3466        @Description(shortDefinition="System value for the code", formalDefinition="An absolute URI which is the code system in which the code for this item in the expansion is defined." )
3467        protected UriType system;
3468
3469        /**
3470         * If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.
3471         */
3472        @Child(name = "abstract", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false)
3473        @Description(shortDefinition="If user cannot select this entry", formalDefinition="If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value." )
3474        protected BooleanType abstract_;
3475
3476        /**
3477         * If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use).
3478         */
3479        @Child(name = "inactive", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=false)
3480        @Description(shortDefinition="If concept is inactive in the code system", formalDefinition="If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use)." )
3481        protected BooleanType inactive;
3482
3483        /**
3484         * The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.
3485         */
3486        @Child(name = "version", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
3487        @Description(shortDefinition="Version in which this code/display is defined", formalDefinition="The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged." )
3488        protected StringType version;
3489
3490        /**
3491         * The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.
3492         */
3493        @Child(name = "code", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=false)
3494        @Description(shortDefinition="Code - if blank, this is not a selectable code", formalDefinition="The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set." )
3495        protected CodeType code;
3496
3497        /**
3498         * The recommended display for this item in the expansion.
3499         */
3500        @Child(name = "display", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false)
3501        @Description(shortDefinition="User display for the concept", formalDefinition="The recommended display for this item in the expansion." )
3502        protected StringType display;
3503
3504        /**
3505         * Additional representations for this item - other languages, aliases, specialized purposes, used for particular purposes, etc. These are relevant when the conditions of the expansion do not fix to a single correct representation.
3506         */
3507        @Child(name = "designation", type = {ConceptReferenceDesignationComponent.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3508        @Description(shortDefinition="Additional representations for this item", formalDefinition="Additional representations for this item - other languages, aliases, specialized purposes, used for particular purposes, etc. These are relevant when the conditions of the expansion do not fix to a single correct representation." )
3509        protected List<ConceptReferenceDesignationComponent> designation;
3510
3511        /**
3512         * A property value for this concept.
3513         */
3514        @Child(name = "property", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3515        @Description(shortDefinition="Property value for the concept", formalDefinition="A property value for this concept." )
3516        protected List<ConceptPropertyComponent> property;
3517
3518        /**
3519         * Other codes and entries contained under this entry in the hierarchy.
3520         */
3521        @Child(name = "contains", type = {ValueSetExpansionContainsComponent.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
3522        @Description(shortDefinition="Codes contained under this entry", formalDefinition="Other codes and entries contained under this entry in the hierarchy." )
3523        protected List<ValueSetExpansionContainsComponent> contains;
3524
3525        private static final long serialVersionUID = -1370569439L;
3526
3527    /**
3528     * Constructor
3529     */
3530      public ValueSetExpansionContainsComponent() {
3531        super();
3532      }
3533
3534        /**
3535         * @return {@link #system} (An absolute URI which is the code system in which the code for this item in the expansion is defined.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value
3536         */
3537        public UriType getSystemElement() { 
3538          if (this.system == null)
3539            if (Configuration.errorOnAutoCreate())
3540              throw new Error("Attempt to auto-create ValueSetExpansionContainsComponent.system");
3541            else if (Configuration.doAutoCreate())
3542              this.system = new UriType(); // bb
3543          return this.system;
3544        }
3545
3546        public boolean hasSystemElement() { 
3547          return this.system != null && !this.system.isEmpty();
3548        }
3549
3550        public boolean hasSystem() { 
3551          return this.system != null && !this.system.isEmpty();
3552        }
3553
3554        /**
3555         * @param value {@link #system} (An absolute URI which is the code system in which the code for this item in the expansion is defined.). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value
3556         */
3557        public ValueSetExpansionContainsComponent setSystemElement(UriType value) { 
3558          this.system = value;
3559          return this;
3560        }
3561
3562        /**
3563         * @return An absolute URI which is the code system in which the code for this item in the expansion is defined.
3564         */
3565        public String getSystem() { 
3566          return this.system == null ? null : this.system.getValue();
3567        }
3568
3569        /**
3570         * @param value An absolute URI which is the code system in which the code for this item in the expansion is defined.
3571         */
3572        public ValueSetExpansionContainsComponent setSystem(String value) { 
3573          if (Utilities.noString(value))
3574            this.system = null;
3575          else {
3576            if (this.system == null)
3577              this.system = new UriType();
3578            this.system.setValue(value);
3579          }
3580          return this;
3581        }
3582
3583        /**
3584         * @return {@link #abstract_} (If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.). This is the underlying object with id, value and extensions. The accessor "getAbstract" gives direct access to the value
3585         */
3586        public BooleanType getAbstractElement() { 
3587          if (this.abstract_ == null)
3588            if (Configuration.errorOnAutoCreate())
3589              throw new Error("Attempt to auto-create ValueSetExpansionContainsComponent.abstract_");
3590            else if (Configuration.doAutoCreate())
3591              this.abstract_ = new BooleanType(); // bb
3592          return this.abstract_;
3593        }
3594
3595        public boolean hasAbstractElement() { 
3596          return this.abstract_ != null && !this.abstract_.isEmpty();
3597        }
3598
3599        public boolean hasAbstract() { 
3600          return this.abstract_ != null && !this.abstract_.isEmpty();
3601        }
3602
3603        /**
3604         * @param value {@link #abstract_} (If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.). This is the underlying object with id, value and extensions. The accessor "getAbstract" gives direct access to the value
3605         */
3606        public ValueSetExpansionContainsComponent setAbstractElement(BooleanType value) { 
3607          this.abstract_ = value;
3608          return this;
3609        }
3610
3611        /**
3612         * @return If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.
3613         */
3614        public boolean getAbstract() { 
3615          return this.abstract_ == null || this.abstract_.isEmpty() ? false : this.abstract_.getValue();
3616        }
3617
3618        /**
3619         * @param value If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.
3620         */
3621        public ValueSetExpansionContainsComponent setAbstract(boolean value) { 
3622            if (this.abstract_ == null)
3623              this.abstract_ = new BooleanType();
3624            this.abstract_.setValue(value);
3625          return this;
3626        }
3627
3628        /**
3629         * @return {@link #inactive} (If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use).). This is the underlying object with id, value and extensions. The accessor "getInactive" gives direct access to the value
3630         */
3631        public BooleanType getInactiveElement() { 
3632          if (this.inactive == null)
3633            if (Configuration.errorOnAutoCreate())
3634              throw new Error("Attempt to auto-create ValueSetExpansionContainsComponent.inactive");
3635            else if (Configuration.doAutoCreate())
3636              this.inactive = new BooleanType(); // bb
3637          return this.inactive;
3638        }
3639
3640        public boolean hasInactiveElement() { 
3641          return this.inactive != null && !this.inactive.isEmpty();
3642        }
3643
3644        public boolean hasInactive() { 
3645          return this.inactive != null && !this.inactive.isEmpty();
3646        }
3647
3648        /**
3649         * @param value {@link #inactive} (If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use).). This is the underlying object with id, value and extensions. The accessor "getInactive" gives direct access to the value
3650         */
3651        public ValueSetExpansionContainsComponent setInactiveElement(BooleanType value) { 
3652          this.inactive = value;
3653          return this;
3654        }
3655
3656        /**
3657         * @return If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use).
3658         */
3659        public boolean getInactive() { 
3660          return this.inactive == null || this.inactive.isEmpty() ? false : this.inactive.getValue();
3661        }
3662
3663        /**
3664         * @param value If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use).
3665         */
3666        public ValueSetExpansionContainsComponent setInactive(boolean value) { 
3667            if (this.inactive == null)
3668              this.inactive = new BooleanType();
3669            this.inactive.setValue(value);
3670          return this;
3671        }
3672
3673        /**
3674         * @return {@link #version} (The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
3675         */
3676        public StringType getVersionElement() { 
3677          if (this.version == null)
3678            if (Configuration.errorOnAutoCreate())
3679              throw new Error("Attempt to auto-create ValueSetExpansionContainsComponent.version");
3680            else if (Configuration.doAutoCreate())
3681              this.version = new StringType(); // bb
3682          return this.version;
3683        }
3684
3685        public boolean hasVersionElement() { 
3686          return this.version != null && !this.version.isEmpty();
3687        }
3688
3689        public boolean hasVersion() { 
3690          return this.version != null && !this.version.isEmpty();
3691        }
3692
3693        /**
3694         * @param value {@link #version} (The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
3695         */
3696        public ValueSetExpansionContainsComponent setVersionElement(StringType value) { 
3697          this.version = value;
3698          return this;
3699        }
3700
3701        /**
3702         * @return The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.
3703         */
3704        public String getVersion() { 
3705          return this.version == null ? null : this.version.getValue();
3706        }
3707
3708        /**
3709         * @param value The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.
3710         */
3711        public ValueSetExpansionContainsComponent setVersion(String value) { 
3712          if (Utilities.noString(value))
3713            this.version = null;
3714          else {
3715            if (this.version == null)
3716              this.version = new StringType();
3717            this.version.setValue(value);
3718          }
3719          return this;
3720        }
3721
3722        /**
3723         * @return {@link #code} (The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
3724         */
3725        public CodeType getCodeElement() { 
3726          if (this.code == null)
3727            if (Configuration.errorOnAutoCreate())
3728              throw new Error("Attempt to auto-create ValueSetExpansionContainsComponent.code");
3729            else if (Configuration.doAutoCreate())
3730              this.code = new CodeType(); // bb
3731          return this.code;
3732        }
3733
3734        public boolean hasCodeElement() { 
3735          return this.code != null && !this.code.isEmpty();
3736        }
3737
3738        public boolean hasCode() { 
3739          return this.code != null && !this.code.isEmpty();
3740        }
3741
3742        /**
3743         * @param value {@link #code} (The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
3744         */
3745        public ValueSetExpansionContainsComponent setCodeElement(CodeType value) { 
3746          this.code = value;
3747          return this;
3748        }
3749
3750        /**
3751         * @return The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.
3752         */
3753        public String getCode() { 
3754          return this.code == null ? null : this.code.getValue();
3755        }
3756
3757        /**
3758         * @param value The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.
3759         */
3760        public ValueSetExpansionContainsComponent setCode(String value) { 
3761          if (Utilities.noString(value))
3762            this.code = null;
3763          else {
3764            if (this.code == null)
3765              this.code = new CodeType();
3766            this.code.setValue(value);
3767          }
3768          return this;
3769        }
3770
3771        /**
3772         * @return {@link #display} (The recommended display for this item in the expansion.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value
3773         */
3774        public StringType getDisplayElement() { 
3775          if (this.display == null)
3776            if (Configuration.errorOnAutoCreate())
3777              throw new Error("Attempt to auto-create ValueSetExpansionContainsComponent.display");
3778            else if (Configuration.doAutoCreate())
3779              this.display = new StringType(); // bb
3780          return this.display;
3781        }
3782
3783        public boolean hasDisplayElement() { 
3784          return this.display != null && !this.display.isEmpty();
3785        }
3786
3787        public boolean hasDisplay() { 
3788          return this.display != null && !this.display.isEmpty();
3789        }
3790
3791        /**
3792         * @param value {@link #display} (The recommended display for this item in the expansion.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value
3793         */
3794        public ValueSetExpansionContainsComponent setDisplayElement(StringType value) { 
3795          this.display = value;
3796          return this;
3797        }
3798
3799        /**
3800         * @return The recommended display for this item in the expansion.
3801         */
3802        public String getDisplay() { 
3803          return this.display == null ? null : this.display.getValue();
3804        }
3805
3806        /**
3807         * @param value The recommended display for this item in the expansion.
3808         */
3809        public ValueSetExpansionContainsComponent setDisplay(String value) { 
3810          if (Utilities.noString(value))
3811            this.display = null;
3812          else {
3813            if (this.display == null)
3814              this.display = new StringType();
3815            this.display.setValue(value);
3816          }
3817          return this;
3818        }
3819
3820        /**
3821         * @return {@link #designation} (Additional representations for this item - other languages, aliases, specialized purposes, used for particular purposes, etc. These are relevant when the conditions of the expansion do not fix to a single correct representation.)
3822         */
3823        public List<ConceptReferenceDesignationComponent> getDesignation() { 
3824          if (this.designation == null)
3825            this.designation = new ArrayList<ConceptReferenceDesignationComponent>();
3826          return this.designation;
3827        }
3828
3829        /**
3830         * @return Returns a reference to <code>this</code> for easy method chaining
3831         */
3832        public ValueSetExpansionContainsComponent setDesignation(List<ConceptReferenceDesignationComponent> theDesignation) { 
3833          this.designation = theDesignation;
3834          return this;
3835        }
3836
3837        public boolean hasDesignation() { 
3838          if (this.designation == null)
3839            return false;
3840          for (ConceptReferenceDesignationComponent item : this.designation)
3841            if (!item.isEmpty())
3842              return true;
3843          return false;
3844        }
3845
3846        public ConceptReferenceDesignationComponent addDesignation() { //3
3847          ConceptReferenceDesignationComponent t = new ConceptReferenceDesignationComponent();
3848          if (this.designation == null)
3849            this.designation = new ArrayList<ConceptReferenceDesignationComponent>();
3850          this.designation.add(t);
3851          return t;
3852        }
3853
3854        public ValueSetExpansionContainsComponent addDesignation(ConceptReferenceDesignationComponent t) { //3
3855          if (t == null)
3856            return this;
3857          if (this.designation == null)
3858            this.designation = new ArrayList<ConceptReferenceDesignationComponent>();
3859          this.designation.add(t);
3860          return this;
3861        }
3862
3863        /**
3864         * @return The first repetition of repeating field {@link #designation}, creating it if it does not already exist
3865         */
3866        public ConceptReferenceDesignationComponent getDesignationFirstRep() { 
3867          if (getDesignation().isEmpty()) {
3868            addDesignation();
3869          }
3870          return getDesignation().get(0);
3871        }
3872
3873        /**
3874         * @return {@link #property} (A property value for this concept.)
3875         */
3876        public List<ConceptPropertyComponent> getProperty() { 
3877          if (this.property == null)
3878            this.property = new ArrayList<ConceptPropertyComponent>();
3879          return this.property;
3880        }
3881
3882        /**
3883         * @return Returns a reference to <code>this</code> for easy method chaining
3884         */
3885        public ValueSetExpansionContainsComponent setProperty(List<ConceptPropertyComponent> theProperty) { 
3886          this.property = theProperty;
3887          return this;
3888        }
3889
3890        public boolean hasProperty() { 
3891          if (this.property == null)
3892            return false;
3893          for (ConceptPropertyComponent item : this.property)
3894            if (!item.isEmpty())
3895              return true;
3896          return false;
3897        }
3898
3899        public ConceptPropertyComponent addProperty() { //3
3900          ConceptPropertyComponent t = new ConceptPropertyComponent();
3901          if (this.property == null)
3902            this.property = new ArrayList<ConceptPropertyComponent>();
3903          this.property.add(t);
3904          return t;
3905        }
3906
3907        public ValueSetExpansionContainsComponent addProperty(ConceptPropertyComponent t) { //3
3908          if (t == null)
3909            return this;
3910          if (this.property == null)
3911            this.property = new ArrayList<ConceptPropertyComponent>();
3912          this.property.add(t);
3913          return this;
3914        }
3915
3916        /**
3917         * @return The first repetition of repeating field {@link #property}, creating it if it does not already exist
3918         */
3919        public ConceptPropertyComponent getPropertyFirstRep() { 
3920          if (getProperty().isEmpty()) {
3921            addProperty();
3922          }
3923          return getProperty().get(0);
3924        }
3925
3926        /**
3927         * @return {@link #contains} (Other codes and entries contained under this entry in the hierarchy.)
3928         */
3929        public List<ValueSetExpansionContainsComponent> getContains() { 
3930          if (this.contains == null)
3931            this.contains = new ArrayList<ValueSetExpansionContainsComponent>();
3932          return this.contains;
3933        }
3934
3935        /**
3936         * @return Returns a reference to <code>this</code> for easy method chaining
3937         */
3938        public ValueSetExpansionContainsComponent setContains(List<ValueSetExpansionContainsComponent> theContains) { 
3939          this.contains = theContains;
3940          return this;
3941        }
3942
3943        public boolean hasContains() { 
3944          if (this.contains == null)
3945            return false;
3946          for (ValueSetExpansionContainsComponent item : this.contains)
3947            if (!item.isEmpty())
3948              return true;
3949          return false;
3950        }
3951
3952        public ValueSetExpansionContainsComponent addContains() { //3
3953          ValueSetExpansionContainsComponent t = new ValueSetExpansionContainsComponent();
3954          if (this.contains == null)
3955            this.contains = new ArrayList<ValueSetExpansionContainsComponent>();
3956          this.contains.add(t);
3957          return t;
3958        }
3959
3960        public ValueSetExpansionContainsComponent addContains(ValueSetExpansionContainsComponent t) { //3
3961          if (t == null)
3962            return this;
3963          if (this.contains == null)
3964            this.contains = new ArrayList<ValueSetExpansionContainsComponent>();
3965          this.contains.add(t);
3966          return this;
3967        }
3968
3969        /**
3970         * @return The first repetition of repeating field {@link #contains}, creating it if it does not already exist
3971         */
3972        public ValueSetExpansionContainsComponent getContainsFirstRep() { 
3973          if (getContains().isEmpty()) {
3974            addContains();
3975          }
3976          return getContains().get(0);
3977        }
3978
3979        protected void listChildren(List<Property> children) {
3980          super.listChildren(children);
3981          children.add(new Property("system", "uri", "An absolute URI which is the code system in which the code for this item in the expansion is defined.", 0, 1, system));
3982          children.add(new Property("abstract", "boolean", "If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.", 0, 1, abstract_));
3983          children.add(new Property("inactive", "boolean", "If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use).", 0, 1, inactive));
3984          children.add(new Property("version", "string", "The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", 0, 1, version));
3985          children.add(new Property("code", "code", "The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.", 0, 1, code));
3986          children.add(new Property("display", "string", "The recommended display for this item in the expansion.", 0, 1, display));
3987          children.add(new Property("designation", "@ValueSet.compose.include.concept.designation", "Additional representations for this item - other languages, aliases, specialized purposes, used for particular purposes, etc. These are relevant when the conditions of the expansion do not fix to a single correct representation.", 0, java.lang.Integer.MAX_VALUE, designation));
3988          children.add(new Property("property", "", "A property value for this concept.", 0, java.lang.Integer.MAX_VALUE, property));
3989          children.add(new Property("contains", "@ValueSet.expansion.contains", "Other codes and entries contained under this entry in the hierarchy.", 0, java.lang.Integer.MAX_VALUE, contains));
3990        }
3991
3992        @Override
3993        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3994          switch (_hash) {
3995          case -887328209: /*system*/  return new Property("system", "uri", "An absolute URI which is the code system in which the code for this item in the expansion is defined.", 0, 1, system);
3996          case 1732898850: /*abstract*/  return new Property("abstract", "boolean", "If true, this entry is included in the expansion for navigational purposes, and the user cannot select the code directly as a proper value.", 0, 1, abstract_);
3997          case 24665195: /*inactive*/  return new Property("inactive", "boolean", "If the concept is inactive in the code system that defines it. Inactive codes are those that are no longer to be used, but are maintained by the code system for understanding legacy data. It might not be known or specified whether an concept is inactive (and it may depend on the context of use).", 0, 1, inactive);
3998          case 351608024: /*version*/  return new Property("version", "string", "The version of the code system from this code was taken. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.", 0, 1, version);
3999          case 3059181: /*code*/  return new Property("code", "code", "The code for this item in the expansion hierarchy. If this code is missing the entry in the hierarchy is a place holder (abstract) and does not represent a valid code in the value set.", 0, 1, code);
4000          case 1671764162: /*display*/  return new Property("display", "string", "The recommended display for this item in the expansion.", 0, 1, display);
4001          case -900931593: /*designation*/  return new Property("designation", "@ValueSet.compose.include.concept.designation", "Additional representations for this item - other languages, aliases, specialized purposes, used for particular purposes, etc. These are relevant when the conditions of the expansion do not fix to a single correct representation.", 0, java.lang.Integer.MAX_VALUE, designation);
4002          case -993141291: /*property*/  return new Property("property", "", "A property value for this concept.", 0, java.lang.Integer.MAX_VALUE, property);
4003          case -567445985: /*contains*/  return new Property("contains", "@ValueSet.expansion.contains", "Other codes and entries contained under this entry in the hierarchy.", 0, java.lang.Integer.MAX_VALUE, contains);
4004          default: return super.getNamedProperty(_hash, _name, _checkValid);
4005          }
4006
4007        }
4008
4009      @Override
4010      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4011        switch (hash) {
4012        case -887328209: /*system*/ return this.system == null ? new Base[0] : new Base[] {this.system}; // UriType
4013        case 1732898850: /*abstract*/ return this.abstract_ == null ? new Base[0] : new Base[] {this.abstract_}; // BooleanType
4014        case 24665195: /*inactive*/ return this.inactive == null ? new Base[0] : new Base[] {this.inactive}; // BooleanType
4015        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
4016        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType
4017        case 1671764162: /*display*/ return this.display == null ? new Base[0] : new Base[] {this.display}; // StringType
4018        case -900931593: /*designation*/ return this.designation == null ? new Base[0] : this.designation.toArray(new Base[this.designation.size()]); // ConceptReferenceDesignationComponent
4019        case -993141291: /*property*/ return this.property == null ? new Base[0] : this.property.toArray(new Base[this.property.size()]); // ConceptPropertyComponent
4020        case -567445985: /*contains*/ return this.contains == null ? new Base[0] : this.contains.toArray(new Base[this.contains.size()]); // ValueSetExpansionContainsComponent
4021        default: return super.getProperty(hash, name, checkValid);
4022        }
4023
4024      }
4025
4026      @Override
4027      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4028        switch (hash) {
4029        case -887328209: // system
4030          this.system = castToUri(value); // UriType
4031          return value;
4032        case 1732898850: // abstract
4033          this.abstract_ = castToBoolean(value); // BooleanType
4034          return value;
4035        case 24665195: // inactive
4036          this.inactive = castToBoolean(value); // BooleanType
4037          return value;
4038        case 351608024: // version
4039          this.version = castToString(value); // StringType
4040          return value;
4041        case 3059181: // code
4042          this.code = castToCode(value); // CodeType
4043          return value;
4044        case 1671764162: // display
4045          this.display = castToString(value); // StringType
4046          return value;
4047        case -900931593: // designation
4048          this.getDesignation().add((ConceptReferenceDesignationComponent) value); // ConceptReferenceDesignationComponent
4049          return value;
4050        case -993141291: // property
4051          this.getProperty().add((ConceptPropertyComponent) value); // ConceptPropertyComponent
4052          return value;
4053        case -567445985: // contains
4054          this.getContains().add((ValueSetExpansionContainsComponent) value); // ValueSetExpansionContainsComponent
4055          return value;
4056        default: return super.setProperty(hash, name, value);
4057        }
4058
4059      }
4060
4061      @Override
4062      public Base setProperty(String name, Base value) throws FHIRException {
4063        if (name.equals("system")) {
4064          this.system = castToUri(value); // UriType
4065        } else if (name.equals("abstract")) {
4066          this.abstract_ = castToBoolean(value); // BooleanType
4067        } else if (name.equals("inactive")) {
4068          this.inactive = castToBoolean(value); // BooleanType
4069        } else if (name.equals("version")) {
4070          this.version = castToString(value); // StringType
4071        } else if (name.equals("code")) {
4072          this.code = castToCode(value); // CodeType
4073        } else if (name.equals("display")) {
4074          this.display = castToString(value); // StringType
4075        } else if (name.equals("designation")) {
4076          this.getDesignation().add((ConceptReferenceDesignationComponent) value);
4077        } else if (name.equals("property")) {
4078          this.getProperty().add((ConceptPropertyComponent) value);
4079        } else if (name.equals("contains")) {
4080          this.getContains().add((ValueSetExpansionContainsComponent) value);
4081        } else
4082          return super.setProperty(name, value);
4083        return value;
4084      }
4085
4086      @Override
4087      public Base makeProperty(int hash, String name) throws FHIRException {
4088        switch (hash) {
4089        case -887328209:  return getSystemElement();
4090        case 1732898850:  return getAbstractElement();
4091        case 24665195:  return getInactiveElement();
4092        case 351608024:  return getVersionElement();
4093        case 3059181:  return getCodeElement();
4094        case 1671764162:  return getDisplayElement();
4095        case -900931593:  return addDesignation(); 
4096        case -993141291:  return addProperty(); 
4097        case -567445985:  return addContains(); 
4098        default: return super.makeProperty(hash, name);
4099        }
4100
4101      }
4102
4103      @Override
4104      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4105        switch (hash) {
4106        case -887328209: /*system*/ return new String[] {"uri"};
4107        case 1732898850: /*abstract*/ return new String[] {"boolean"};
4108        case 24665195: /*inactive*/ return new String[] {"boolean"};
4109        case 351608024: /*version*/ return new String[] {"string"};
4110        case 3059181: /*code*/ return new String[] {"code"};
4111        case 1671764162: /*display*/ return new String[] {"string"};
4112        case -900931593: /*designation*/ return new String[] {"@ValueSet.compose.include.concept.designation"};
4113        case -993141291: /*property*/ return new String[] {};
4114        case -567445985: /*contains*/ return new String[] {"@ValueSet.expansion.contains"};
4115        default: return super.getTypesForProperty(hash, name);
4116        }
4117
4118      }
4119
4120      @Override
4121      public Base addChild(String name) throws FHIRException {
4122        if (name.equals("system")) {
4123          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.system");
4124        }
4125        else if (name.equals("abstract")) {
4126          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.abstract");
4127        }
4128        else if (name.equals("inactive")) {
4129          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.inactive");
4130        }
4131        else if (name.equals("version")) {
4132          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.version");
4133        }
4134        else if (name.equals("code")) {
4135          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.code");
4136        }
4137        else if (name.equals("display")) {
4138          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.display");
4139        }
4140        else if (name.equals("designation")) {
4141          return addDesignation();
4142        }
4143        else if (name.equals("property")) {
4144          return addProperty();
4145        }
4146        else if (name.equals("contains")) {
4147          return addContains();
4148        }
4149        else
4150          return super.addChild(name);
4151      }
4152
4153      public ValueSetExpansionContainsComponent copy() {
4154        ValueSetExpansionContainsComponent dst = new ValueSetExpansionContainsComponent();
4155        copyValues(dst);
4156        return dst;
4157      }
4158
4159      public void copyValues(ValueSetExpansionContainsComponent dst) {
4160        super.copyValues(dst);
4161        dst.system = system == null ? null : system.copy();
4162        dst.abstract_ = abstract_ == null ? null : abstract_.copy();
4163        dst.inactive = inactive == null ? null : inactive.copy();
4164        dst.version = version == null ? null : version.copy();
4165        dst.code = code == null ? null : code.copy();
4166        dst.display = display == null ? null : display.copy();
4167        if (designation != null) {
4168          dst.designation = new ArrayList<ConceptReferenceDesignationComponent>();
4169          for (ConceptReferenceDesignationComponent i : designation)
4170            dst.designation.add(i.copy());
4171        };
4172        if (property != null) {
4173          dst.property = new ArrayList<ConceptPropertyComponent>();
4174          for (ConceptPropertyComponent i : property)
4175            dst.property.add(i.copy());
4176        };
4177        if (contains != null) {
4178          dst.contains = new ArrayList<ValueSetExpansionContainsComponent>();
4179          for (ValueSetExpansionContainsComponent i : contains)
4180            dst.contains.add(i.copy());
4181        };
4182      }
4183
4184      @Override
4185      public boolean equalsDeep(Base other_) {
4186        if (!super.equalsDeep(other_))
4187          return false;
4188        if (!(other_ instanceof ValueSetExpansionContainsComponent))
4189          return false;
4190        ValueSetExpansionContainsComponent o = (ValueSetExpansionContainsComponent) other_;
4191        return compareDeep(system, o.system, true) && compareDeep(abstract_, o.abstract_, true) && compareDeep(inactive, o.inactive, true)
4192           && compareDeep(version, o.version, true) && compareDeep(code, o.code, true) && compareDeep(display, o.display, true)
4193           && compareDeep(designation, o.designation, true) && compareDeep(property, o.property, true) && compareDeep(contains, o.contains, true)
4194          ;
4195      }
4196
4197      @Override
4198      public boolean equalsShallow(Base other_) {
4199        if (!super.equalsShallow(other_))
4200          return false;
4201        if (!(other_ instanceof ValueSetExpansionContainsComponent))
4202          return false;
4203        ValueSetExpansionContainsComponent o = (ValueSetExpansionContainsComponent) other_;
4204        return compareValues(system, o.system, true) && compareValues(abstract_, o.abstract_, true) && compareValues(inactive, o.inactive, true)
4205           && compareValues(version, o.version, true) && compareValues(code, o.code, true) && compareValues(display, o.display, true)
4206          ;
4207      }
4208
4209      public boolean isEmpty() {
4210        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(system, abstract_, inactive
4211          , version, code, display, designation, property, contains);
4212      }
4213
4214  public String fhirType() {
4215    return "ValueSet.expansion.contains";
4216
4217  }
4218
4219  }
4220
4221    @Block()
4222    public static class ConceptPropertyComponent extends BackboneElement implements IBaseBackboneElement {
4223        /**
4224         * A code that is a reference to ValueSet.expansion.property.code.
4225         */
4226        @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
4227        @Description(shortDefinition="Reference to ValueSet.expansion.property.code", formalDefinition="A code that is a reference to ValueSet.expansion.property.code." )
4228        protected CodeType code;
4229
4230        /**
4231         * The value of this property.
4232         */
4233        @Child(name = "value", type = {CodeType.class, Coding.class, StringType.class, IntegerType.class, BooleanType.class, DateTimeType.class, DecimalType.class}, order=2, min=1, max=1, modifier=false, summary=false)
4234        @Description(shortDefinition="Value of the property for this concept", formalDefinition="The value of this property." )
4235        protected Type value;
4236
4237        private static final long serialVersionUID = 1742812311L;
4238
4239    /**
4240     * Constructor
4241     */
4242      public ConceptPropertyComponent() {
4243        super();
4244      }
4245
4246    /**
4247     * Constructor
4248     */
4249      public ConceptPropertyComponent(CodeType code, Type value) {
4250        super();
4251        this.code = code;
4252        this.value = value;
4253      }
4254
4255        /**
4256         * @return {@link #code} (A code that is a reference to ValueSet.expansion.property.code.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
4257         */
4258        public CodeType getCodeElement() { 
4259          if (this.code == null)
4260            if (Configuration.errorOnAutoCreate())
4261              throw new Error("Attempt to auto-create ConceptPropertyComponent.code");
4262            else if (Configuration.doAutoCreate())
4263              this.code = new CodeType(); // bb
4264          return this.code;
4265        }
4266
4267        public boolean hasCodeElement() { 
4268          return this.code != null && !this.code.isEmpty();
4269        }
4270
4271        public boolean hasCode() { 
4272          return this.code != null && !this.code.isEmpty();
4273        }
4274
4275        /**
4276         * @param value {@link #code} (A code that is a reference to ValueSet.expansion.property.code.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
4277         */
4278        public ConceptPropertyComponent setCodeElement(CodeType value) { 
4279          this.code = value;
4280          return this;
4281        }
4282
4283        /**
4284         * @return A code that is a reference to ValueSet.expansion.property.code.
4285         */
4286        public String getCode() { 
4287          return this.code == null ? null : this.code.getValue();
4288        }
4289
4290        /**
4291         * @param value A code that is a reference to ValueSet.expansion.property.code.
4292         */
4293        public ConceptPropertyComponent setCode(String value) { 
4294            if (this.code == null)
4295              this.code = new CodeType();
4296            this.code.setValue(value);
4297          return this;
4298        }
4299
4300        /**
4301         * @return {@link #value} (The value of this property.)
4302         */
4303        public Type getValue() { 
4304          return this.value;
4305        }
4306
4307        /**
4308         * @return {@link #value} (The value of this property.)
4309         */
4310        public CodeType getValueCodeType() throws FHIRException { 
4311          if (this.value == null)
4312            this.value = new CodeType();
4313          if (!(this.value instanceof CodeType))
4314            throw new FHIRException("Type mismatch: the type CodeType was expected, but "+this.value.getClass().getName()+" was encountered");
4315          return (CodeType) this.value;
4316        }
4317
4318        public boolean hasValueCodeType() { 
4319          return this != null && this.value instanceof CodeType;
4320        }
4321
4322        /**
4323         * @return {@link #value} (The value of this property.)
4324         */
4325        public Coding getValueCoding() throws FHIRException { 
4326          if (this.value == null)
4327            this.value = new Coding();
4328          if (!(this.value instanceof Coding))
4329            throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.value.getClass().getName()+" was encountered");
4330          return (Coding) this.value;
4331        }
4332
4333        public boolean hasValueCoding() { 
4334          return this != null && this.value instanceof Coding;
4335        }
4336
4337        /**
4338         * @return {@link #value} (The value of this property.)
4339         */
4340        public StringType getValueStringType() throws FHIRException { 
4341          if (this.value == null)
4342            this.value = new StringType();
4343          if (!(this.value instanceof StringType))
4344            throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered");
4345          return (StringType) this.value;
4346        }
4347
4348        public boolean hasValueStringType() { 
4349          return this != null && this.value instanceof StringType;
4350        }
4351
4352        /**
4353         * @return {@link #value} (The value of this property.)
4354         */
4355        public IntegerType getValueIntegerType() throws FHIRException { 
4356          if (this.value == null)
4357            this.value = new IntegerType();
4358          if (!(this.value instanceof IntegerType))
4359            throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered");
4360          return (IntegerType) this.value;
4361        }
4362
4363        public boolean hasValueIntegerType() { 
4364          return this != null && this.value instanceof IntegerType;
4365        }
4366
4367        /**
4368         * @return {@link #value} (The value of this property.)
4369         */
4370        public BooleanType getValueBooleanType() throws FHIRException { 
4371          if (this.value == null)
4372            this.value = new BooleanType();
4373          if (!(this.value instanceof BooleanType))
4374            throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered");
4375          return (BooleanType) this.value;
4376        }
4377
4378        public boolean hasValueBooleanType() { 
4379          return this != null && this.value instanceof BooleanType;
4380        }
4381
4382        /**
4383         * @return {@link #value} (The value of this property.)
4384         */
4385        public DateTimeType getValueDateTimeType() throws FHIRException { 
4386          if (this.value == null)
4387            this.value = new DateTimeType();
4388          if (!(this.value instanceof DateTimeType))
4389            throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered");
4390          return (DateTimeType) this.value;
4391        }
4392
4393        public boolean hasValueDateTimeType() { 
4394          return this != null && this.value instanceof DateTimeType;
4395        }
4396
4397        /**
4398         * @return {@link #value} (The value of this property.)
4399         */
4400        public DecimalType getValueDecimalType() throws FHIRException { 
4401          if (this.value == null)
4402            this.value = new DecimalType();
4403          if (!(this.value instanceof DecimalType))
4404            throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.value.getClass().getName()+" was encountered");
4405          return (DecimalType) this.value;
4406        }
4407
4408        public boolean hasValueDecimalType() { 
4409          return this != null && this.value instanceof DecimalType;
4410        }
4411
4412        public boolean hasValue() { 
4413          return this.value != null && !this.value.isEmpty();
4414        }
4415
4416        /**
4417         * @param value {@link #value} (The value of this property.)
4418         */
4419        public ConceptPropertyComponent setValue(Type value) { 
4420          if (value != null && !(value instanceof CodeType || value instanceof Coding || value instanceof StringType || value instanceof IntegerType || value instanceof BooleanType || value instanceof DateTimeType || value instanceof DecimalType))
4421            throw new Error("Not the right type for ValueSet.expansion.contains.property.value[x]: "+value.fhirType());
4422          this.value = value;
4423          return this;
4424        }
4425
4426        protected void listChildren(List<Property> children) {
4427          super.listChildren(children);
4428          children.add(new Property("code", "code", "A code that is a reference to ValueSet.expansion.property.code.", 0, 1, code));
4429          children.add(new Property("value[x]", "code|Coding|string|integer|boolean|dateTime|decimal", "The value of this property.", 0, 1, value));
4430        }
4431
4432        @Override
4433        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
4434          switch (_hash) {
4435          case 3059181: /*code*/  return new Property("code", "code", "A code that is a reference to ValueSet.expansion.property.code.", 0, 1, code);
4436          case -1410166417: /*value[x]*/  return new Property("value[x]", "code|Coding|string|integer|boolean|dateTime|decimal", "The value of this property.", 0, 1, value);
4437          case 111972721: /*value*/  return new Property("value[x]", "code|Coding|string|integer|boolean|dateTime|decimal", "The value of this property.", 0, 1, value);
4438          case -766209282: /*valueCode*/  return new Property("value[x]", "code|Coding|string|integer|boolean|dateTime|decimal", "The value of this property.", 0, 1, value);
4439          case -1887705029: /*valueCoding*/  return new Property("value[x]", "code|Coding|string|integer|boolean|dateTime|decimal", "The value of this property.", 0, 1, value);
4440          case -1424603934: /*valueString*/  return new Property("value[x]", "code|Coding|string|integer|boolean|dateTime|decimal", "The value of this property.", 0, 1, value);
4441          case -1668204915: /*valueInteger*/  return new Property("value[x]", "code|Coding|string|integer|boolean|dateTime|decimal", "The value of this property.", 0, 1, value);
4442          case 733421943: /*valueBoolean*/  return new Property("value[x]", "code|Coding|string|integer|boolean|dateTime|decimal", "The value of this property.", 0, 1, value);
4443          case 1047929900: /*valueDateTime*/  return new Property("value[x]", "code|Coding|string|integer|boolean|dateTime|decimal", "The value of this property.", 0, 1, value);
4444          case -2083993440: /*valueDecimal*/  return new Property("value[x]", "code|Coding|string|integer|boolean|dateTime|decimal", "The value of this property.", 0, 1, value);
4445          default: return super.getNamedProperty(_hash, _name, _checkValid);
4446          }
4447
4448        }
4449
4450      @Override
4451      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
4452        switch (hash) {
4453        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType
4454        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Type
4455        default: return super.getProperty(hash, name, checkValid);
4456        }
4457
4458      }
4459
4460      @Override
4461      public Base setProperty(int hash, String name, Base value) throws FHIRException {
4462        switch (hash) {
4463        case 3059181: // code
4464          this.code = castToCode(value); // CodeType
4465          return value;
4466        case 111972721: // value
4467          this.value = castToType(value); // Type
4468          return value;
4469        default: return super.setProperty(hash, name, value);
4470        }
4471
4472      }
4473
4474      @Override
4475      public Base setProperty(String name, Base value) throws FHIRException {
4476        if (name.equals("code")) {
4477          this.code = castToCode(value); // CodeType
4478        } else if (name.equals("value[x]")) {
4479          this.value = castToType(value); // Type
4480        } else
4481          return super.setProperty(name, value);
4482        return value;
4483      }
4484
4485      @Override
4486      public Base makeProperty(int hash, String name) throws FHIRException {
4487        switch (hash) {
4488        case 3059181:  return getCodeElement();
4489        case -1410166417:  return getValue();
4490        case 111972721:  return getValue();
4491        default: return super.makeProperty(hash, name);
4492        }
4493
4494      }
4495
4496      @Override
4497      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
4498        switch (hash) {
4499        case 3059181: /*code*/ return new String[] {"code"};
4500        case 111972721: /*value*/ return new String[] {"code", "Coding", "string", "integer", "boolean", "dateTime", "decimal"};
4501        default: return super.getTypesForProperty(hash, name);
4502        }
4503
4504      }
4505
4506      @Override
4507      public Base addChild(String name) throws FHIRException {
4508        if (name.equals("code")) {
4509          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.code");
4510        }
4511        else if (name.equals("valueCode")) {
4512          this.value = new CodeType();
4513          return this.value;
4514        }
4515        else if (name.equals("valueCoding")) {
4516          this.value = new Coding();
4517          return this.value;
4518        }
4519        else if (name.equals("valueString")) {
4520          this.value = new StringType();
4521          return this.value;
4522        }
4523        else if (name.equals("valueInteger")) {
4524          this.value = new IntegerType();
4525          return this.value;
4526        }
4527        else if (name.equals("valueBoolean")) {
4528          this.value = new BooleanType();
4529          return this.value;
4530        }
4531        else if (name.equals("valueDateTime")) {
4532          this.value = new DateTimeType();
4533          return this.value;
4534        }
4535        else if (name.equals("valueDecimal")) {
4536          this.value = new DecimalType();
4537          return this.value;
4538        }
4539        else
4540          return super.addChild(name);
4541      }
4542
4543      public ConceptPropertyComponent copy() {
4544        ConceptPropertyComponent dst = new ConceptPropertyComponent();
4545        copyValues(dst);
4546        return dst;
4547      }
4548
4549      public void copyValues(ConceptPropertyComponent dst) {
4550        super.copyValues(dst);
4551        dst.code = code == null ? null : code.copy();
4552        dst.value = value == null ? null : value.copy();
4553      }
4554
4555      @Override
4556      public boolean equalsDeep(Base other_) {
4557        if (!super.equalsDeep(other_))
4558          return false;
4559        if (!(other_ instanceof ConceptPropertyComponent))
4560          return false;
4561        ConceptPropertyComponent o = (ConceptPropertyComponent) other_;
4562        return compareDeep(code, o.code, true) && compareDeep(value, o.value, true);
4563      }
4564
4565      @Override
4566      public boolean equalsShallow(Base other_) {
4567        if (!super.equalsShallow(other_))
4568          return false;
4569        if (!(other_ instanceof ConceptPropertyComponent))
4570          return false;
4571        ConceptPropertyComponent o = (ConceptPropertyComponent) other_;
4572        return compareValues(code, o.code, true);
4573      }
4574
4575      public boolean isEmpty() {
4576        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, value);
4577      }
4578
4579  public String fhirType() {
4580    return "ValueSet.expansion.contains.property";
4581
4582  }
4583
4584  }
4585
4586    /**
4587     * A formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.
4588     */
4589    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
4590    @Description(shortDefinition="Additional identifier for the value set (business identifier)", formalDefinition="A formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance." )
4591    protected List<Identifier> identifier;
4592
4593    /**
4594     * If this is set to 'true', then no new versions of the content logical definition can be created.  Note: Other metadata might still change.
4595     */
4596    @Child(name = "immutable", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=true)
4597    @Description(shortDefinition="Indicates whether or not any change to the content logical definition may occur", formalDefinition="If this is set to 'true', then no new versions of the content logical definition can be created.  Note: Other metadata might still change." )
4598    protected BooleanType immutable;
4599
4600    /**
4601     * Explanation of why this value set is needed and why it has been designed as it has.
4602     */
4603    @Child(name = "purpose", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false)
4604    @Description(shortDefinition="Why this value set is defined", formalDefinition="Explanation of why this value set is needed and why it has been designed as it has." )
4605    protected MarkdownType purpose;
4606
4607    /**
4608     * A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.
4609     */
4610    @Child(name = "copyright", type = {MarkdownType.class}, order=3, min=0, max=1, modifier=false, summary=false)
4611    @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set." )
4612    protected MarkdownType copyright;
4613
4614    /**
4615     * A set of criteria that define the contents of the value set by including or excluding codes selected from the specified code system(s) that the value set draws from. This is also known as the Content Logical Definition (CLD).
4616     */
4617    @Child(name = "compose", type = {}, order=4, min=0, max=1, modifier=false, summary=false)
4618    @Description(shortDefinition="Content logical definition of the value set (CLD)", formalDefinition="A set of criteria that define the contents of the value set by including or excluding codes selected from the specified code system(s) that the value set draws from. This is also known as the Content Logical Definition (CLD)." )
4619    protected ValueSetComposeComponent compose;
4620
4621    /**
4622     * A value set can also be "expanded", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.
4623     */
4624    @Child(name = "expansion", type = {}, order=5, min=0, max=1, modifier=false, summary=false)
4625    @Description(shortDefinition="Used when the value set is \"expanded\"", formalDefinition="A value set can also be \"expanded\", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed." )
4626    protected ValueSetExpansionComponent expansion;
4627
4628    private static final long serialVersionUID = 786712949L;
4629
4630  /**
4631   * Constructor
4632   */
4633    public ValueSet() {
4634      super();
4635    }
4636
4637  /**
4638   * Constructor
4639   */
4640    public ValueSet(Enumeration<PublicationStatus> status) {
4641      super();
4642      this.status = status;
4643    }
4644
4645    /**
4646     * @return {@link #url} (An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this value set is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the value set is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
4647     */
4648    public UriType getUrlElement() { 
4649      if (this.url == null)
4650        if (Configuration.errorOnAutoCreate())
4651          throw new Error("Attempt to auto-create ValueSet.url");
4652        else if (Configuration.doAutoCreate())
4653          this.url = new UriType(); // bb
4654      return this.url;
4655    }
4656
4657    public boolean hasUrlElement() { 
4658      return this.url != null && !this.url.isEmpty();
4659    }
4660
4661    public boolean hasUrl() { 
4662      return this.url != null && !this.url.isEmpty();
4663    }
4664
4665    /**
4666     * @param value {@link #url} (An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this value set is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the value set is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
4667     */
4668    public ValueSet setUrlElement(UriType value) { 
4669      this.url = value;
4670      return this;
4671    }
4672
4673    /**
4674     * @return An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this value set is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the value set is stored on different servers.
4675     */
4676    public String getUrl() { 
4677      return this.url == null ? null : this.url.getValue();
4678    }
4679
4680    /**
4681     * @param value An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this value set is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the value set is stored on different servers.
4682     */
4683    public ValueSet setUrl(String value) { 
4684      if (Utilities.noString(value))
4685        this.url = null;
4686      else {
4687        if (this.url == null)
4688          this.url = new UriType();
4689        this.url.setValue(value);
4690      }
4691      return this;
4692    }
4693
4694    /**
4695     * @return {@link #identifier} (A formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.)
4696     */
4697    public List<Identifier> getIdentifier() { 
4698      if (this.identifier == null)
4699        this.identifier = new ArrayList<Identifier>();
4700      return this.identifier;
4701    }
4702
4703    /**
4704     * @return Returns a reference to <code>this</code> for easy method chaining
4705     */
4706    public ValueSet setIdentifier(List<Identifier> theIdentifier) { 
4707      this.identifier = theIdentifier;
4708      return this;
4709    }
4710
4711    public boolean hasIdentifier() { 
4712      if (this.identifier == null)
4713        return false;
4714      for (Identifier item : this.identifier)
4715        if (!item.isEmpty())
4716          return true;
4717      return false;
4718    }
4719
4720    public Identifier addIdentifier() { //3
4721      Identifier t = new Identifier();
4722      if (this.identifier == null)
4723        this.identifier = new ArrayList<Identifier>();
4724      this.identifier.add(t);
4725      return t;
4726    }
4727
4728    public ValueSet addIdentifier(Identifier t) { //3
4729      if (t == null)
4730        return this;
4731      if (this.identifier == null)
4732        this.identifier = new ArrayList<Identifier>();
4733      this.identifier.add(t);
4734      return this;
4735    }
4736
4737    /**
4738     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
4739     */
4740    public Identifier getIdentifierFirstRep() { 
4741      if (getIdentifier().isEmpty()) {
4742        addIdentifier();
4743      }
4744      return getIdentifier().get(0);
4745    }
4746
4747    /**
4748     * @return {@link #version} (The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
4749     */
4750    public StringType getVersionElement() { 
4751      if (this.version == null)
4752        if (Configuration.errorOnAutoCreate())
4753          throw new Error("Attempt to auto-create ValueSet.version");
4754        else if (Configuration.doAutoCreate())
4755          this.version = new StringType(); // bb
4756      return this.version;
4757    }
4758
4759    public boolean hasVersionElement() { 
4760      return this.version != null && !this.version.isEmpty();
4761    }
4762
4763    public boolean hasVersion() { 
4764      return this.version != null && !this.version.isEmpty();
4765    }
4766
4767    /**
4768     * @param value {@link #version} (The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
4769     */
4770    public ValueSet setVersionElement(StringType value) { 
4771      this.version = value;
4772      return this;
4773    }
4774
4775    /**
4776     * @return The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.
4777     */
4778    public String getVersion() { 
4779      return this.version == null ? null : this.version.getValue();
4780    }
4781
4782    /**
4783     * @param value The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.
4784     */
4785    public ValueSet setVersion(String value) { 
4786      if (Utilities.noString(value))
4787        this.version = null;
4788      else {
4789        if (this.version == null)
4790          this.version = new StringType();
4791        this.version.setValue(value);
4792      }
4793      return this;
4794    }
4795
4796    /**
4797     * @return {@link #name} (A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
4798     */
4799    public StringType getNameElement() { 
4800      if (this.name == null)
4801        if (Configuration.errorOnAutoCreate())
4802          throw new Error("Attempt to auto-create ValueSet.name");
4803        else if (Configuration.doAutoCreate())
4804          this.name = new StringType(); // bb
4805      return this.name;
4806    }
4807
4808    public boolean hasNameElement() { 
4809      return this.name != null && !this.name.isEmpty();
4810    }
4811
4812    public boolean hasName() { 
4813      return this.name != null && !this.name.isEmpty();
4814    }
4815
4816    /**
4817     * @param value {@link #name} (A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
4818     */
4819    public ValueSet setNameElement(StringType value) { 
4820      this.name = value;
4821      return this;
4822    }
4823
4824    /**
4825     * @return A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.
4826     */
4827    public String getName() { 
4828      return this.name == null ? null : this.name.getValue();
4829    }
4830
4831    /**
4832     * @param value A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.
4833     */
4834    public ValueSet setName(String value) { 
4835      if (Utilities.noString(value))
4836        this.name = null;
4837      else {
4838        if (this.name == null)
4839          this.name = new StringType();
4840        this.name.setValue(value);
4841      }
4842      return this;
4843    }
4844
4845    /**
4846     * @return {@link #title} (A short, descriptive, user-friendly title for the value set.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
4847     */
4848    public StringType getTitleElement() { 
4849      if (this.title == null)
4850        if (Configuration.errorOnAutoCreate())
4851          throw new Error("Attempt to auto-create ValueSet.title");
4852        else if (Configuration.doAutoCreate())
4853          this.title = new StringType(); // bb
4854      return this.title;
4855    }
4856
4857    public boolean hasTitleElement() { 
4858      return this.title != null && !this.title.isEmpty();
4859    }
4860
4861    public boolean hasTitle() { 
4862      return this.title != null && !this.title.isEmpty();
4863    }
4864
4865    /**
4866     * @param value {@link #title} (A short, descriptive, user-friendly title for the value set.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
4867     */
4868    public ValueSet setTitleElement(StringType value) { 
4869      this.title = value;
4870      return this;
4871    }
4872
4873    /**
4874     * @return A short, descriptive, user-friendly title for the value set.
4875     */
4876    public String getTitle() { 
4877      return this.title == null ? null : this.title.getValue();
4878    }
4879
4880    /**
4881     * @param value A short, descriptive, user-friendly title for the value set.
4882     */
4883    public ValueSet setTitle(String value) { 
4884      if (Utilities.noString(value))
4885        this.title = null;
4886      else {
4887        if (this.title == null)
4888          this.title = new StringType();
4889        this.title.setValue(value);
4890      }
4891      return this;
4892    }
4893
4894    /**
4895     * @return {@link #status} (The status of this value set. Enables tracking the life-cycle of the content. The status of the value set applies to the value set definition (ValueSet.compose) and the associated ValueSet metadata. Expansions do not have a state.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
4896     */
4897    public Enumeration<PublicationStatus> getStatusElement() { 
4898      if (this.status == null)
4899        if (Configuration.errorOnAutoCreate())
4900          throw new Error("Attempt to auto-create ValueSet.status");
4901        else if (Configuration.doAutoCreate())
4902          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
4903      return this.status;
4904    }
4905
4906    public boolean hasStatusElement() { 
4907      return this.status != null && !this.status.isEmpty();
4908    }
4909
4910    public boolean hasStatus() { 
4911      return this.status != null && !this.status.isEmpty();
4912    }
4913
4914    /**
4915     * @param value {@link #status} (The status of this value set. Enables tracking the life-cycle of the content. The status of the value set applies to the value set definition (ValueSet.compose) and the associated ValueSet metadata. Expansions do not have a state.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
4916     */
4917    public ValueSet setStatusElement(Enumeration<PublicationStatus> value) { 
4918      this.status = value;
4919      return this;
4920    }
4921
4922    /**
4923     * @return The status of this value set. Enables tracking the life-cycle of the content. The status of the value set applies to the value set definition (ValueSet.compose) and the associated ValueSet metadata. Expansions do not have a state.
4924     */
4925    public PublicationStatus getStatus() { 
4926      return this.status == null ? null : this.status.getValue();
4927    }
4928
4929    /**
4930     * @param value The status of this value set. Enables tracking the life-cycle of the content. The status of the value set applies to the value set definition (ValueSet.compose) and the associated ValueSet metadata. Expansions do not have a state.
4931     */
4932    public ValueSet setStatus(PublicationStatus value) { 
4933        if (this.status == null)
4934          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
4935        this.status.setValue(value);
4936      return this;
4937    }
4938
4939    /**
4940     * @return {@link #experimental} (A Boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
4941     */
4942    public BooleanType getExperimentalElement() { 
4943      if (this.experimental == null)
4944        if (Configuration.errorOnAutoCreate())
4945          throw new Error("Attempt to auto-create ValueSet.experimental");
4946        else if (Configuration.doAutoCreate())
4947          this.experimental = new BooleanType(); // bb
4948      return this.experimental;
4949    }
4950
4951    public boolean hasExperimentalElement() { 
4952      return this.experimental != null && !this.experimental.isEmpty();
4953    }
4954
4955    public boolean hasExperimental() { 
4956      return this.experimental != null && !this.experimental.isEmpty();
4957    }
4958
4959    /**
4960     * @param value {@link #experimental} (A Boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
4961     */
4962    public ValueSet setExperimentalElement(BooleanType value) { 
4963      this.experimental = value;
4964      return this;
4965    }
4966
4967    /**
4968     * @return A Boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
4969     */
4970    public boolean getExperimental() { 
4971      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
4972    }
4973
4974    /**
4975     * @param value A Boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.
4976     */
4977    public ValueSet setExperimental(boolean value) { 
4978        if (this.experimental == null)
4979          this.experimental = new BooleanType();
4980        this.experimental.setValue(value);
4981      return this;
4982    }
4983
4984    /**
4985     * @return {@link #date} (The date (and optionally time) when the value set was created or revised (e.g. the 'content logical definition').). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
4986     */
4987    public DateTimeType getDateElement() { 
4988      if (this.date == null)
4989        if (Configuration.errorOnAutoCreate())
4990          throw new Error("Attempt to auto-create ValueSet.date");
4991        else if (Configuration.doAutoCreate())
4992          this.date = new DateTimeType(); // bb
4993      return this.date;
4994    }
4995
4996    public boolean hasDateElement() { 
4997      return this.date != null && !this.date.isEmpty();
4998    }
4999
5000    public boolean hasDate() { 
5001      return this.date != null && !this.date.isEmpty();
5002    }
5003
5004    /**
5005     * @param value {@link #date} (The date (and optionally time) when the value set was created or revised (e.g. the 'content logical definition').). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
5006     */
5007    public ValueSet setDateElement(DateTimeType value) { 
5008      this.date = value;
5009      return this;
5010    }
5011
5012    /**
5013     * @return The date (and optionally time) when the value set was created or revised (e.g. the 'content logical definition').
5014     */
5015    public Date getDate() { 
5016      return this.date == null ? null : this.date.getValue();
5017    }
5018
5019    /**
5020     * @param value The date (and optionally time) when the value set was created or revised (e.g. the 'content logical definition').
5021     */
5022    public ValueSet setDate(Date value) { 
5023      if (value == null)
5024        this.date = null;
5025      else {
5026        if (this.date == null)
5027          this.date = new DateTimeType();
5028        this.date.setValue(value);
5029      }
5030      return this;
5031    }
5032
5033    /**
5034     * @return {@link #publisher} (The name of the organization or individual that published the value set.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
5035     */
5036    public StringType getPublisherElement() { 
5037      if (this.publisher == null)
5038        if (Configuration.errorOnAutoCreate())
5039          throw new Error("Attempt to auto-create ValueSet.publisher");
5040        else if (Configuration.doAutoCreate())
5041          this.publisher = new StringType(); // bb
5042      return this.publisher;
5043    }
5044
5045    public boolean hasPublisherElement() { 
5046      return this.publisher != null && !this.publisher.isEmpty();
5047    }
5048
5049    public boolean hasPublisher() { 
5050      return this.publisher != null && !this.publisher.isEmpty();
5051    }
5052
5053    /**
5054     * @param value {@link #publisher} (The name of the organization or individual that published the value set.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
5055     */
5056    public ValueSet setPublisherElement(StringType value) { 
5057      this.publisher = value;
5058      return this;
5059    }
5060
5061    /**
5062     * @return The name of the organization or individual that published the value set.
5063     */
5064    public String getPublisher() { 
5065      return this.publisher == null ? null : this.publisher.getValue();
5066    }
5067
5068    /**
5069     * @param value The name of the organization or individual that published the value set.
5070     */
5071    public ValueSet setPublisher(String value) { 
5072      if (Utilities.noString(value))
5073        this.publisher = null;
5074      else {
5075        if (this.publisher == null)
5076          this.publisher = new StringType();
5077        this.publisher.setValue(value);
5078      }
5079      return this;
5080    }
5081
5082    /**
5083     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
5084     */
5085    public List<ContactDetail> getContact() { 
5086      if (this.contact == null)
5087        this.contact = new ArrayList<ContactDetail>();
5088      return this.contact;
5089    }
5090
5091    /**
5092     * @return Returns a reference to <code>this</code> for easy method chaining
5093     */
5094    public ValueSet setContact(List<ContactDetail> theContact) { 
5095      this.contact = theContact;
5096      return this;
5097    }
5098
5099    public boolean hasContact() { 
5100      if (this.contact == null)
5101        return false;
5102      for (ContactDetail item : this.contact)
5103        if (!item.isEmpty())
5104          return true;
5105      return false;
5106    }
5107
5108    public ContactDetail addContact() { //3
5109      ContactDetail t = new ContactDetail();
5110      if (this.contact == null)
5111        this.contact = new ArrayList<ContactDetail>();
5112      this.contact.add(t);
5113      return t;
5114    }
5115
5116    public ValueSet addContact(ContactDetail t) { //3
5117      if (t == null)
5118        return this;
5119      if (this.contact == null)
5120        this.contact = new ArrayList<ContactDetail>();
5121      this.contact.add(t);
5122      return this;
5123    }
5124
5125    /**
5126     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
5127     */
5128    public ContactDetail getContactFirstRep() { 
5129      if (getContact().isEmpty()) {
5130        addContact();
5131      }
5132      return getContact().get(0);
5133    }
5134
5135    /**
5136     * @return {@link #description} (A free text natural language description of the value set from a consumer's perspective. The textual description specifies the span of meanings for concepts to be included within the Value Set Expansion, and also may specify the intended use and limitations of the Value Set.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
5137     */
5138    public MarkdownType getDescriptionElement() { 
5139      if (this.description == null)
5140        if (Configuration.errorOnAutoCreate())
5141          throw new Error("Attempt to auto-create ValueSet.description");
5142        else if (Configuration.doAutoCreate())
5143          this.description = new MarkdownType(); // bb
5144      return this.description;
5145    }
5146
5147    public boolean hasDescriptionElement() { 
5148      return this.description != null && !this.description.isEmpty();
5149    }
5150
5151    public boolean hasDescription() { 
5152      return this.description != null && !this.description.isEmpty();
5153    }
5154
5155    /**
5156     * @param value {@link #description} (A free text natural language description of the value set from a consumer's perspective. The textual description specifies the span of meanings for concepts to be included within the Value Set Expansion, and also may specify the intended use and limitations of the Value Set.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
5157     */
5158    public ValueSet setDescriptionElement(MarkdownType value) { 
5159      this.description = value;
5160      return this;
5161    }
5162
5163    /**
5164     * @return A free text natural language description of the value set from a consumer's perspective. The textual description specifies the span of meanings for concepts to be included within the Value Set Expansion, and also may specify the intended use and limitations of the Value Set.
5165     */
5166    public String getDescription() { 
5167      return this.description == null ? null : this.description.getValue();
5168    }
5169
5170    /**
5171     * @param value A free text natural language description of the value set from a consumer's perspective. The textual description specifies the span of meanings for concepts to be included within the Value Set Expansion, and also may specify the intended use and limitations of the Value Set.
5172     */
5173    public ValueSet setDescription(String value) { 
5174      if (value == null)
5175        this.description = null;
5176      else {
5177        if (this.description == null)
5178          this.description = new MarkdownType();
5179        this.description.setValue(value);
5180      }
5181      return this;
5182    }
5183
5184    /**
5185     * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate value set instances.)
5186     */
5187    public List<UsageContext> getUseContext() { 
5188      if (this.useContext == null)
5189        this.useContext = new ArrayList<UsageContext>();
5190      return this.useContext;
5191    }
5192
5193    /**
5194     * @return Returns a reference to <code>this</code> for easy method chaining
5195     */
5196    public ValueSet setUseContext(List<UsageContext> theUseContext) { 
5197      this.useContext = theUseContext;
5198      return this;
5199    }
5200
5201    public boolean hasUseContext() { 
5202      if (this.useContext == null)
5203        return false;
5204      for (UsageContext item : this.useContext)
5205        if (!item.isEmpty())
5206          return true;
5207      return false;
5208    }
5209
5210    public UsageContext addUseContext() { //3
5211      UsageContext t = new UsageContext();
5212      if (this.useContext == null)
5213        this.useContext = new ArrayList<UsageContext>();
5214      this.useContext.add(t);
5215      return t;
5216    }
5217
5218    public ValueSet addUseContext(UsageContext t) { //3
5219      if (t == null)
5220        return this;
5221      if (this.useContext == null)
5222        this.useContext = new ArrayList<UsageContext>();
5223      this.useContext.add(t);
5224      return this;
5225    }
5226
5227    /**
5228     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist
5229     */
5230    public UsageContext getUseContextFirstRep() { 
5231      if (getUseContext().isEmpty()) {
5232        addUseContext();
5233      }
5234      return getUseContext().get(0);
5235    }
5236
5237    /**
5238     * @return {@link #jurisdiction} (A legal or geographic region in which the value set is intended to be used.)
5239     */
5240    public List<CodeableConcept> getJurisdiction() { 
5241      if (this.jurisdiction == null)
5242        this.jurisdiction = new ArrayList<CodeableConcept>();
5243      return this.jurisdiction;
5244    }
5245
5246    /**
5247     * @return Returns a reference to <code>this</code> for easy method chaining
5248     */
5249    public ValueSet setJurisdiction(List<CodeableConcept> theJurisdiction) { 
5250      this.jurisdiction = theJurisdiction;
5251      return this;
5252    }
5253
5254    public boolean hasJurisdiction() { 
5255      if (this.jurisdiction == null)
5256        return false;
5257      for (CodeableConcept item : this.jurisdiction)
5258        if (!item.isEmpty())
5259          return true;
5260      return false;
5261    }
5262
5263    public CodeableConcept addJurisdiction() { //3
5264      CodeableConcept t = new CodeableConcept();
5265      if (this.jurisdiction == null)
5266        this.jurisdiction = new ArrayList<CodeableConcept>();
5267      this.jurisdiction.add(t);
5268      return t;
5269    }
5270
5271    public ValueSet addJurisdiction(CodeableConcept t) { //3
5272      if (t == null)
5273        return this;
5274      if (this.jurisdiction == null)
5275        this.jurisdiction = new ArrayList<CodeableConcept>();
5276      this.jurisdiction.add(t);
5277      return this;
5278    }
5279
5280    /**
5281     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist
5282     */
5283    public CodeableConcept getJurisdictionFirstRep() { 
5284      if (getJurisdiction().isEmpty()) {
5285        addJurisdiction();
5286      }
5287      return getJurisdiction().get(0);
5288    }
5289
5290    /**
5291     * @return {@link #immutable} (If this is set to 'true', then no new versions of the content logical definition can be created.  Note: Other metadata might still change.). This is the underlying object with id, value and extensions. The accessor "getImmutable" gives direct access to the value
5292     */
5293    public BooleanType getImmutableElement() { 
5294      if (this.immutable == null)
5295        if (Configuration.errorOnAutoCreate())
5296          throw new Error("Attempt to auto-create ValueSet.immutable");
5297        else if (Configuration.doAutoCreate())
5298          this.immutable = new BooleanType(); // bb
5299      return this.immutable;
5300    }
5301
5302    public boolean hasImmutableElement() { 
5303      return this.immutable != null && !this.immutable.isEmpty();
5304    }
5305
5306    public boolean hasImmutable() { 
5307      return this.immutable != null && !this.immutable.isEmpty();
5308    }
5309
5310    /**
5311     * @param value {@link #immutable} (If this is set to 'true', then no new versions of the content logical definition can be created.  Note: Other metadata might still change.). This is the underlying object with id, value and extensions. The accessor "getImmutable" gives direct access to the value
5312     */
5313    public ValueSet setImmutableElement(BooleanType value) { 
5314      this.immutable = value;
5315      return this;
5316    }
5317
5318    /**
5319     * @return If this is set to 'true', then no new versions of the content logical definition can be created.  Note: Other metadata might still change.
5320     */
5321    public boolean getImmutable() { 
5322      return this.immutable == null || this.immutable.isEmpty() ? false : this.immutable.getValue();
5323    }
5324
5325    /**
5326     * @param value If this is set to 'true', then no new versions of the content logical definition can be created.  Note: Other metadata might still change.
5327     */
5328    public ValueSet setImmutable(boolean value) { 
5329        if (this.immutable == null)
5330          this.immutable = new BooleanType();
5331        this.immutable.setValue(value);
5332      return this;
5333    }
5334
5335    /**
5336     * @return {@link #purpose} (Explanation of why this value set is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
5337     */
5338    public MarkdownType getPurposeElement() { 
5339      if (this.purpose == null)
5340        if (Configuration.errorOnAutoCreate())
5341          throw new Error("Attempt to auto-create ValueSet.purpose");
5342        else if (Configuration.doAutoCreate())
5343          this.purpose = new MarkdownType(); // bb
5344      return this.purpose;
5345    }
5346
5347    public boolean hasPurposeElement() { 
5348      return this.purpose != null && !this.purpose.isEmpty();
5349    }
5350
5351    public boolean hasPurpose() { 
5352      return this.purpose != null && !this.purpose.isEmpty();
5353    }
5354
5355    /**
5356     * @param value {@link #purpose} (Explanation of why this value set is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
5357     */
5358    public ValueSet setPurposeElement(MarkdownType value) { 
5359      this.purpose = value;
5360      return this;
5361    }
5362
5363    /**
5364     * @return Explanation of why this value set is needed and why it has been designed as it has.
5365     */
5366    public String getPurpose() { 
5367      return this.purpose == null ? null : this.purpose.getValue();
5368    }
5369
5370    /**
5371     * @param value Explanation of why this value set is needed and why it has been designed as it has.
5372     */
5373    public ValueSet setPurpose(String value) { 
5374      if (value == null)
5375        this.purpose = null;
5376      else {
5377        if (this.purpose == null)
5378          this.purpose = new MarkdownType();
5379        this.purpose.setValue(value);
5380      }
5381      return this;
5382    }
5383
5384    /**
5385     * @return {@link #copyright} (A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
5386     */
5387    public MarkdownType getCopyrightElement() { 
5388      if (this.copyright == null)
5389        if (Configuration.errorOnAutoCreate())
5390          throw new Error("Attempt to auto-create ValueSet.copyright");
5391        else if (Configuration.doAutoCreate())
5392          this.copyright = new MarkdownType(); // bb
5393      return this.copyright;
5394    }
5395
5396    public boolean hasCopyrightElement() { 
5397      return this.copyright != null && !this.copyright.isEmpty();
5398    }
5399
5400    public boolean hasCopyright() { 
5401      return this.copyright != null && !this.copyright.isEmpty();
5402    }
5403
5404    /**
5405     * @param value {@link #copyright} (A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
5406     */
5407    public ValueSet setCopyrightElement(MarkdownType value) { 
5408      this.copyright = value;
5409      return this;
5410    }
5411
5412    /**
5413     * @return A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.
5414     */
5415    public String getCopyright() { 
5416      return this.copyright == null ? null : this.copyright.getValue();
5417    }
5418
5419    /**
5420     * @param value A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.
5421     */
5422    public ValueSet setCopyright(String value) { 
5423      if (value == null)
5424        this.copyright = null;
5425      else {
5426        if (this.copyright == null)
5427          this.copyright = new MarkdownType();
5428        this.copyright.setValue(value);
5429      }
5430      return this;
5431    }
5432
5433    /**
5434     * @return {@link #compose} (A set of criteria that define the contents of the value set by including or excluding codes selected from the specified code system(s) that the value set draws from. This is also known as the Content Logical Definition (CLD).)
5435     */
5436    public ValueSetComposeComponent getCompose() { 
5437      if (this.compose == null)
5438        if (Configuration.errorOnAutoCreate())
5439          throw new Error("Attempt to auto-create ValueSet.compose");
5440        else if (Configuration.doAutoCreate())
5441          this.compose = new ValueSetComposeComponent(); // cc
5442      return this.compose;
5443    }
5444
5445    public boolean hasCompose() { 
5446      return this.compose != null && !this.compose.isEmpty();
5447    }
5448
5449    /**
5450     * @param value {@link #compose} (A set of criteria that define the contents of the value set by including or excluding codes selected from the specified code system(s) that the value set draws from. This is also known as the Content Logical Definition (CLD).)
5451     */
5452    public ValueSet setCompose(ValueSetComposeComponent value) { 
5453      this.compose = value;
5454      return this;
5455    }
5456
5457    /**
5458     * @return {@link #expansion} (A value set can also be "expanded", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.)
5459     */
5460    public ValueSetExpansionComponent getExpansion() { 
5461      if (this.expansion == null)
5462        if (Configuration.errorOnAutoCreate())
5463          throw new Error("Attempt to auto-create ValueSet.expansion");
5464        else if (Configuration.doAutoCreate())
5465          this.expansion = new ValueSetExpansionComponent(); // cc
5466      return this.expansion;
5467    }
5468
5469    public boolean hasExpansion() { 
5470      return this.expansion != null && !this.expansion.isEmpty();
5471    }
5472
5473    /**
5474     * @param value {@link #expansion} (A value set can also be "expanded", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.)
5475     */
5476    public ValueSet setExpansion(ValueSetExpansionComponent value) { 
5477      this.expansion = value;
5478      return this;
5479    }
5480
5481      protected void listChildren(List<Property> children) {
5482        super.listChildren(children);
5483        children.add(new Property("url", "uri", "An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this value set is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the value set is stored on different servers.", 0, 1, url));
5484        children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier));
5485        children.add(new Property("version", "string", "The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version));
5486        children.add(new Property("name", "string", "A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name));
5487        children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the value set.", 0, 1, title));
5488        children.add(new Property("status", "code", "The status of this value set. Enables tracking the life-cycle of the content. The status of the value set applies to the value set definition (ValueSet.compose) and the associated ValueSet metadata. Expansions do not have a state.", 0, 1, status));
5489        children.add(new Property("experimental", "boolean", "A Boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental));
5490        children.add(new Property("date", "dateTime", "The date (and optionally time) when the value set was created or revised (e.g. the 'content logical definition').", 0, 1, date));
5491        children.add(new Property("publisher", "string", "The name of the organization or individual that published the value set.", 0, 1, publisher));
5492        children.add(new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact));
5493        children.add(new Property("description", "markdown", "A free text natural language description of the value set from a consumer's perspective. The textual description specifies the span of meanings for concepts to be included within the Value Set Expansion, and also may specify the intended use and limitations of the Value Set.", 0, 1, description));
5494        children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate value set instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
5495        children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the value set is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction));
5496        children.add(new Property("immutable", "boolean", "If this is set to 'true', then no new versions of the content logical definition can be created.  Note: Other metadata might still change.", 0, 1, immutable));
5497        children.add(new Property("purpose", "markdown", "Explanation of why this value set is needed and why it has been designed as it has.", 0, 1, purpose));
5498        children.add(new Property("copyright", "markdown", "A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.", 0, 1, copyright));
5499        children.add(new Property("compose", "", "A set of criteria that define the contents of the value set by including or excluding codes selected from the specified code system(s) that the value set draws from. This is also known as the Content Logical Definition (CLD).", 0, 1, compose));
5500        children.add(new Property("expansion", "", "A value set can also be \"expanded\", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.", 0, 1, expansion));
5501      }
5502
5503      @Override
5504      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
5505        switch (_hash) {
5506        case 116079: /*url*/  return new Property("url", "uri", "An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this value set is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the value set is stored on different servers.", 0, 1, url);
5507        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A formal identifier that is used to identify this value set when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier);
5508        case 351608024: /*version*/  return new Property("version", "string", "The identifier that is used to identify this version of the value set when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the value set author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version);
5509        case 3373707: /*name*/  return new Property("name", "string", "A natural language name identifying the value set. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name);
5510        case 110371416: /*title*/  return new Property("title", "string", "A short, descriptive, user-friendly title for the value set.", 0, 1, title);
5511        case -892481550: /*status*/  return new Property("status", "code", "The status of this value set. Enables tracking the life-cycle of the content. The status of the value set applies to the value set definition (ValueSet.compose) and the associated ValueSet metadata. Expansions do not have a state.", 0, 1, status);
5512        case -404562712: /*experimental*/  return new Property("experimental", "boolean", "A Boolean value to indicate that this value set is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage.", 0, 1, experimental);
5513        case 3076014: /*date*/  return new Property("date", "dateTime", "The date (and optionally time) when the value set was created or revised (e.g. the 'content logical definition').", 0, 1, date);
5514        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the organization or individual that published the value set.", 0, 1, publisher);
5515        case 951526432: /*contact*/  return new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact);
5516        case -1724546052: /*description*/  return new Property("description", "markdown", "A free text natural language description of the value set from a consumer's perspective. The textual description specifies the span of meanings for concepts to be included within the Value Set Expansion, and also may specify the intended use and limitations of the Value Set.", 0, 1, description);
5517        case -669707736: /*useContext*/  return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate value set instances.", 0, java.lang.Integer.MAX_VALUE, useContext);
5518        case -507075711: /*jurisdiction*/  return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the value set is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction);
5519        case 1596987778: /*immutable*/  return new Property("immutable", "boolean", "If this is set to 'true', then no new versions of the content logical definition can be created.  Note: Other metadata might still change.", 0, 1, immutable);
5520        case -220463842: /*purpose*/  return new Property("purpose", "markdown", "Explanation of why this value set is needed and why it has been designed as it has.", 0, 1, purpose);
5521        case 1522889671: /*copyright*/  return new Property("copyright", "markdown", "A copyright statement relating to the value set and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the value set.", 0, 1, copyright);
5522        case 950497682: /*compose*/  return new Property("compose", "", "A set of criteria that define the contents of the value set by including or excluding codes selected from the specified code system(s) that the value set draws from. This is also known as the Content Logical Definition (CLD).", 0, 1, compose);
5523        case 17878207: /*expansion*/  return new Property("expansion", "", "A value set can also be \"expanded\", where the value set is turned into a simple collection of enumerated codes. This element holds the expansion, if it has been performed.", 0, 1, expansion);
5524        default: return super.getNamedProperty(_hash, _name, _checkValid);
5525        }
5526
5527      }
5528
5529      @Override
5530      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
5531        switch (hash) {
5532        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
5533        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
5534        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
5535        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
5536        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
5537        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
5538        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
5539        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
5540        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
5541        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
5542        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
5543        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
5544        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
5545        case 1596987778: /*immutable*/ return this.immutable == null ? new Base[0] : new Base[] {this.immutable}; // BooleanType
5546        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
5547        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType
5548        case 950497682: /*compose*/ return this.compose == null ? new Base[0] : new Base[] {this.compose}; // ValueSetComposeComponent
5549        case 17878207: /*expansion*/ return this.expansion == null ? new Base[0] : new Base[] {this.expansion}; // ValueSetExpansionComponent
5550        default: return super.getProperty(hash, name, checkValid);
5551        }
5552
5553      }
5554
5555      @Override
5556      public Base setProperty(int hash, String name, Base value) throws FHIRException {
5557        switch (hash) {
5558        case 116079: // url
5559          this.url = castToUri(value); // UriType
5560          return value;
5561        case -1618432855: // identifier
5562          this.getIdentifier().add(castToIdentifier(value)); // Identifier
5563          return value;
5564        case 351608024: // version
5565          this.version = castToString(value); // StringType
5566          return value;
5567        case 3373707: // name
5568          this.name = castToString(value); // StringType
5569          return value;
5570        case 110371416: // title
5571          this.title = castToString(value); // StringType
5572          return value;
5573        case -892481550: // status
5574          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
5575          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
5576          return value;
5577        case -404562712: // experimental
5578          this.experimental = castToBoolean(value); // BooleanType
5579          return value;
5580        case 3076014: // date
5581          this.date = castToDateTime(value); // DateTimeType
5582          return value;
5583        case 1447404028: // publisher
5584          this.publisher = castToString(value); // StringType
5585          return value;
5586        case 951526432: // contact
5587          this.getContact().add(castToContactDetail(value)); // ContactDetail
5588          return value;
5589        case -1724546052: // description
5590          this.description = castToMarkdown(value); // MarkdownType
5591          return value;
5592        case -669707736: // useContext
5593          this.getUseContext().add(castToUsageContext(value)); // UsageContext
5594          return value;
5595        case -507075711: // jurisdiction
5596          this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept
5597          return value;
5598        case 1596987778: // immutable
5599          this.immutable = castToBoolean(value); // BooleanType
5600          return value;
5601        case -220463842: // purpose
5602          this.purpose = castToMarkdown(value); // MarkdownType
5603          return value;
5604        case 1522889671: // copyright
5605          this.copyright = castToMarkdown(value); // MarkdownType
5606          return value;
5607        case 950497682: // compose
5608          this.compose = (ValueSetComposeComponent) value; // ValueSetComposeComponent
5609          return value;
5610        case 17878207: // expansion
5611          this.expansion = (ValueSetExpansionComponent) value; // ValueSetExpansionComponent
5612          return value;
5613        default: return super.setProperty(hash, name, value);
5614        }
5615
5616      }
5617
5618      @Override
5619      public Base setProperty(String name, Base value) throws FHIRException {
5620        if (name.equals("url")) {
5621          this.url = castToUri(value); // UriType
5622        } else if (name.equals("identifier")) {
5623          this.getIdentifier().add(castToIdentifier(value));
5624        } else if (name.equals("version")) {
5625          this.version = castToString(value); // StringType
5626        } else if (name.equals("name")) {
5627          this.name = castToString(value); // StringType
5628        } else if (name.equals("title")) {
5629          this.title = castToString(value); // StringType
5630        } else if (name.equals("status")) {
5631          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
5632          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
5633        } else if (name.equals("experimental")) {
5634          this.experimental = castToBoolean(value); // BooleanType
5635        } else if (name.equals("date")) {
5636          this.date = castToDateTime(value); // DateTimeType
5637        } else if (name.equals("publisher")) {
5638          this.publisher = castToString(value); // StringType
5639        } else if (name.equals("contact")) {
5640          this.getContact().add(castToContactDetail(value));
5641        } else if (name.equals("description")) {
5642          this.description = castToMarkdown(value); // MarkdownType
5643        } else if (name.equals("useContext")) {
5644          this.getUseContext().add(castToUsageContext(value));
5645        } else if (name.equals("jurisdiction")) {
5646          this.getJurisdiction().add(castToCodeableConcept(value));
5647        } else if (name.equals("immutable")) {
5648          this.immutable = castToBoolean(value); // BooleanType
5649        } else if (name.equals("purpose")) {
5650          this.purpose = castToMarkdown(value); // MarkdownType
5651        } else if (name.equals("copyright")) {
5652          this.copyright = castToMarkdown(value); // MarkdownType
5653        } else if (name.equals("compose")) {
5654          this.compose = (ValueSetComposeComponent) value; // ValueSetComposeComponent
5655        } else if (name.equals("expansion")) {
5656          this.expansion = (ValueSetExpansionComponent) value; // ValueSetExpansionComponent
5657        } else
5658          return super.setProperty(name, value);
5659        return value;
5660      }
5661
5662      @Override
5663      public Base makeProperty(int hash, String name) throws FHIRException {
5664        switch (hash) {
5665        case 116079:  return getUrlElement();
5666        case -1618432855:  return addIdentifier(); 
5667        case 351608024:  return getVersionElement();
5668        case 3373707:  return getNameElement();
5669        case 110371416:  return getTitleElement();
5670        case -892481550:  return getStatusElement();
5671        case -404562712:  return getExperimentalElement();
5672        case 3076014:  return getDateElement();
5673        case 1447404028:  return getPublisherElement();
5674        case 951526432:  return addContact(); 
5675        case -1724546052:  return getDescriptionElement();
5676        case -669707736:  return addUseContext(); 
5677        case -507075711:  return addJurisdiction(); 
5678        case 1596987778:  return getImmutableElement();
5679        case -220463842:  return getPurposeElement();
5680        case 1522889671:  return getCopyrightElement();
5681        case 950497682:  return getCompose();
5682        case 17878207:  return getExpansion();
5683        default: return super.makeProperty(hash, name);
5684        }
5685
5686      }
5687
5688      @Override
5689      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
5690        switch (hash) {
5691        case 116079: /*url*/ return new String[] {"uri"};
5692        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
5693        case 351608024: /*version*/ return new String[] {"string"};
5694        case 3373707: /*name*/ return new String[] {"string"};
5695        case 110371416: /*title*/ return new String[] {"string"};
5696        case -892481550: /*status*/ return new String[] {"code"};
5697        case -404562712: /*experimental*/ return new String[] {"boolean"};
5698        case 3076014: /*date*/ return new String[] {"dateTime"};
5699        case 1447404028: /*publisher*/ return new String[] {"string"};
5700        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
5701        case -1724546052: /*description*/ return new String[] {"markdown"};
5702        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
5703        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
5704        case 1596987778: /*immutable*/ return new String[] {"boolean"};
5705        case -220463842: /*purpose*/ return new String[] {"markdown"};
5706        case 1522889671: /*copyright*/ return new String[] {"markdown"};
5707        case 950497682: /*compose*/ return new String[] {};
5708        case 17878207: /*expansion*/ return new String[] {};
5709        default: return super.getTypesForProperty(hash, name);
5710        }
5711
5712      }
5713
5714      @Override
5715      public Base addChild(String name) throws FHIRException {
5716        if (name.equals("url")) {
5717          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.url");
5718        }
5719        else if (name.equals("identifier")) {
5720          return addIdentifier();
5721        }
5722        else if (name.equals("version")) {
5723          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.version");
5724        }
5725        else if (name.equals("name")) {
5726          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.name");
5727        }
5728        else if (name.equals("title")) {
5729          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.title");
5730        }
5731        else if (name.equals("status")) {
5732          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.status");
5733        }
5734        else if (name.equals("experimental")) {
5735          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.experimental");
5736        }
5737        else if (name.equals("date")) {
5738          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.date");
5739        }
5740        else if (name.equals("publisher")) {
5741          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.publisher");
5742        }
5743        else if (name.equals("contact")) {
5744          return addContact();
5745        }
5746        else if (name.equals("description")) {
5747          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.description");
5748        }
5749        else if (name.equals("useContext")) {
5750          return addUseContext();
5751        }
5752        else if (name.equals("jurisdiction")) {
5753          return addJurisdiction();
5754        }
5755        else if (name.equals("immutable")) {
5756          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.immutable");
5757        }
5758        else if (name.equals("purpose")) {
5759          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.purpose");
5760        }
5761        else if (name.equals("copyright")) {
5762          throw new FHIRException("Cannot call addChild on a primitive type ValueSet.copyright");
5763        }
5764        else if (name.equals("compose")) {
5765          this.compose = new ValueSetComposeComponent();
5766          return this.compose;
5767        }
5768        else if (name.equals("expansion")) {
5769          this.expansion = new ValueSetExpansionComponent();
5770          return this.expansion;
5771        }
5772        else
5773          return super.addChild(name);
5774      }
5775
5776  public String fhirType() {
5777    return "ValueSet";
5778
5779  }
5780
5781      public ValueSet copy() {
5782        ValueSet dst = new ValueSet();
5783        copyValues(dst);
5784        return dst;
5785      }
5786
5787      public void copyValues(ValueSet dst) {
5788        super.copyValues(dst);
5789        dst.url = url == null ? null : url.copy();
5790        if (identifier != null) {
5791          dst.identifier = new ArrayList<Identifier>();
5792          for (Identifier i : identifier)
5793            dst.identifier.add(i.copy());
5794        };
5795        dst.version = version == null ? null : version.copy();
5796        dst.name = name == null ? null : name.copy();
5797        dst.title = title == null ? null : title.copy();
5798        dst.status = status == null ? null : status.copy();
5799        dst.experimental = experimental == null ? null : experimental.copy();
5800        dst.date = date == null ? null : date.copy();
5801        dst.publisher = publisher == null ? null : publisher.copy();
5802        if (contact != null) {
5803          dst.contact = new ArrayList<ContactDetail>();
5804          for (ContactDetail i : contact)
5805            dst.contact.add(i.copy());
5806        };
5807        dst.description = description == null ? null : description.copy();
5808        if (useContext != null) {
5809          dst.useContext = new ArrayList<UsageContext>();
5810          for (UsageContext i : useContext)
5811            dst.useContext.add(i.copy());
5812        };
5813        if (jurisdiction != null) {
5814          dst.jurisdiction = new ArrayList<CodeableConcept>();
5815          for (CodeableConcept i : jurisdiction)
5816            dst.jurisdiction.add(i.copy());
5817        };
5818        dst.immutable = immutable == null ? null : immutable.copy();
5819        dst.purpose = purpose == null ? null : purpose.copy();
5820        dst.copyright = copyright == null ? null : copyright.copy();
5821        dst.compose = compose == null ? null : compose.copy();
5822        dst.expansion = expansion == null ? null : expansion.copy();
5823      }
5824
5825      protected ValueSet typedCopy() {
5826        return copy();
5827      }
5828
5829      @Override
5830      public boolean equalsDeep(Base other_) {
5831        if (!super.equalsDeep(other_))
5832          return false;
5833        if (!(other_ instanceof ValueSet))
5834          return false;
5835        ValueSet o = (ValueSet) other_;
5836        return compareDeep(identifier, o.identifier, true) && compareDeep(immutable, o.immutable, true)
5837           && compareDeep(purpose, o.purpose, true) && compareDeep(copyright, o.copyright, true) && compareDeep(compose, o.compose, true)
5838           && compareDeep(expansion, o.expansion, true);
5839      }
5840
5841      @Override
5842      public boolean equalsShallow(Base other_) {
5843        if (!super.equalsShallow(other_))
5844          return false;
5845        if (!(other_ instanceof ValueSet))
5846          return false;
5847        ValueSet o = (ValueSet) other_;
5848        return compareValues(immutable, o.immutable, true) && compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true)
5849          ;
5850      }
5851
5852      public boolean isEmpty() {
5853        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, immutable, purpose
5854          , copyright, compose, expansion);
5855      }
5856
5857  @Override
5858  public ResourceType getResourceType() {
5859    return ResourceType.ValueSet;
5860   }
5861
5862 /**
5863   * Search parameter: <b>date</b>
5864   * <p>
5865   * Description: <b>The value set publication date</b><br>
5866   * Type: <b>date</b><br>
5867   * Path: <b>ValueSet.date</b><br>
5868   * </p>
5869   */
5870  @SearchParamDefinition(name="date", path="ValueSet.date", description="The value set publication date", type="date" )
5871  public static final String SP_DATE = "date";
5872 /**
5873   * <b>Fluent Client</b> search parameter constant for <b>date</b>
5874   * <p>
5875   * Description: <b>The value set publication date</b><br>
5876   * Type: <b>date</b><br>
5877   * Path: <b>ValueSet.date</b><br>
5878   * </p>
5879   */
5880  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
5881
5882 /**
5883   * Search parameter: <b>identifier</b>
5884   * <p>
5885   * Description: <b>External identifier for the value set</b><br>
5886   * Type: <b>token</b><br>
5887   * Path: <b>ValueSet.identifier</b><br>
5888   * </p>
5889   */
5890  @SearchParamDefinition(name="identifier", path="ValueSet.identifier", description="External identifier for the value set", type="token" )
5891  public static final String SP_IDENTIFIER = "identifier";
5892 /**
5893   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
5894   * <p>
5895   * Description: <b>External identifier for the value set</b><br>
5896   * Type: <b>token</b><br>
5897   * Path: <b>ValueSet.identifier</b><br>
5898   * </p>
5899   */
5900  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
5901
5902 /**
5903   * Search parameter: <b>code</b>
5904   * <p>
5905   * Description: <b>This special parameter searches for codes in the value set. See additional notes on the ValueSet resource</b><br>
5906   * Type: <b>token</b><br>
5907   * Path: <b>ValueSet.expansion.contains.code, ValueSet.compose.include.concept.code</b><br>
5908   * </p>
5909   */
5910  @SearchParamDefinition(name="code", path="ValueSet.expansion.contains.code | ValueSet.compose.include.concept.code", description="This special parameter searches for codes in the value set. See additional notes on the ValueSet resource", type="token" )
5911  public static final String SP_CODE = "code";
5912 /**
5913   * <b>Fluent Client</b> search parameter constant for <b>code</b>
5914   * <p>
5915   * Description: <b>This special parameter searches for codes in the value set. See additional notes on the ValueSet resource</b><br>
5916   * Type: <b>token</b><br>
5917   * Path: <b>ValueSet.expansion.contains.code, ValueSet.compose.include.concept.code</b><br>
5918   * </p>
5919   */
5920  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE);
5921
5922 /**
5923   * Search parameter: <b>context-type-value</b>
5924   * <p>
5925   * Description: <b>A use context type and value assigned to the value set</b><br>
5926   * Type: <b>composite</b><br>
5927   * Path: <b></b><br>
5928   * </p>
5929   */
5930  @SearchParamDefinition(name="context-type-value", path="ValueSet.useContext", description="A use context type and value assigned to the value set", type="composite", compositeOf={"context-type", "context"} )
5931  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
5932 /**
5933   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
5934   * <p>
5935   * Description: <b>A use context type and value assigned to the value set</b><br>
5936   * Type: <b>composite</b><br>
5937   * Path: <b></b><br>
5938   * </p>
5939   */
5940  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CONTEXT_TYPE_VALUE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_CONTEXT_TYPE_VALUE);
5941
5942 /**
5943   * Search parameter: <b>jurisdiction</b>
5944   * <p>
5945   * Description: <b>Intended jurisdiction for the value set</b><br>
5946   * Type: <b>token</b><br>
5947   * Path: <b>ValueSet.jurisdiction</b><br>
5948   * </p>
5949   */
5950  @SearchParamDefinition(name="jurisdiction", path="ValueSet.jurisdiction", description="Intended jurisdiction for the value set", type="token" )
5951  public static final String SP_JURISDICTION = "jurisdiction";
5952 /**
5953   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
5954   * <p>
5955   * Description: <b>Intended jurisdiction for the value set</b><br>
5956   * Type: <b>token</b><br>
5957   * Path: <b>ValueSet.jurisdiction</b><br>
5958   * </p>
5959   */
5960  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
5961
5962 /**
5963   * Search parameter: <b>description</b>
5964   * <p>
5965   * Description: <b>The description of the value set</b><br>
5966   * Type: <b>string</b><br>
5967   * Path: <b>ValueSet.description</b><br>
5968   * </p>
5969   */
5970  @SearchParamDefinition(name="description", path="ValueSet.description", description="The description of the value set", type="string" )
5971  public static final String SP_DESCRIPTION = "description";
5972 /**
5973   * <b>Fluent Client</b> search parameter constant for <b>description</b>
5974   * <p>
5975   * Description: <b>The description of the value set</b><br>
5976   * Type: <b>string</b><br>
5977   * Path: <b>ValueSet.description</b><br>
5978   * </p>
5979   */
5980  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
5981
5982 /**
5983   * Search parameter: <b>context-type</b>
5984   * <p>
5985   * Description: <b>A type of use context assigned to the value set</b><br>
5986   * Type: <b>token</b><br>
5987   * Path: <b>ValueSet.useContext.code</b><br>
5988   * </p>
5989   */
5990  @SearchParamDefinition(name="context-type", path="ValueSet.useContext.code", description="A type of use context assigned to the value set", type="token" )
5991  public static final String SP_CONTEXT_TYPE = "context-type";
5992 /**
5993   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
5994   * <p>
5995   * Description: <b>A type of use context assigned to the value set</b><br>
5996   * Type: <b>token</b><br>
5997   * Path: <b>ValueSet.useContext.code</b><br>
5998   * </p>
5999   */
6000  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE);
6001
6002 /**
6003   * Search parameter: <b>title</b>
6004   * <p>
6005   * Description: <b>The human-friendly name of the value set</b><br>
6006   * Type: <b>string</b><br>
6007   * Path: <b>ValueSet.title</b><br>
6008   * </p>
6009   */
6010  @SearchParamDefinition(name="title", path="ValueSet.title", description="The human-friendly name of the value set", type="string" )
6011  public static final String SP_TITLE = "title";
6012 /**
6013   * <b>Fluent Client</b> search parameter constant for <b>title</b>
6014   * <p>
6015   * Description: <b>The human-friendly name of the value set</b><br>
6016   * Type: <b>string</b><br>
6017   * Path: <b>ValueSet.title</b><br>
6018   * </p>
6019   */
6020  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
6021
6022 /**
6023   * Search parameter: <b>version</b>
6024   * <p>
6025   * Description: <b>The business version of the value set</b><br>
6026   * Type: <b>token</b><br>
6027   * Path: <b>ValueSet.version</b><br>
6028   * </p>
6029   */
6030  @SearchParamDefinition(name="version", path="ValueSet.version", description="The business version of the value set", type="token" )
6031  public static final String SP_VERSION = "version";
6032 /**
6033   * <b>Fluent Client</b> search parameter constant for <b>version</b>
6034   * <p>
6035   * Description: <b>The business version of the value set</b><br>
6036   * Type: <b>token</b><br>
6037   * Path: <b>ValueSet.version</b><br>
6038   * </p>
6039   */
6040  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
6041
6042 /**
6043   * Search parameter: <b>url</b>
6044   * <p>
6045   * Description: <b>The uri that identifies the value set</b><br>
6046   * Type: <b>uri</b><br>
6047   * Path: <b>ValueSet.url</b><br>
6048   * </p>
6049   */
6050  @SearchParamDefinition(name="url", path="ValueSet.url", description="The uri that identifies the value set", type="uri" )
6051  public static final String SP_URL = "url";
6052 /**
6053   * <b>Fluent Client</b> search parameter constant for <b>url</b>
6054   * <p>
6055   * Description: <b>The uri that identifies the value set</b><br>
6056   * Type: <b>uri</b><br>
6057   * Path: <b>ValueSet.url</b><br>
6058   * </p>
6059   */
6060  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
6061
6062 /**
6063   * Search parameter: <b>expansion</b>
6064   * <p>
6065   * Description: <b>Identifies the value set expansion (business identifier)</b><br>
6066   * Type: <b>uri</b><br>
6067   * Path: <b>ValueSet.expansion.identifier</b><br>
6068   * </p>
6069   */
6070  @SearchParamDefinition(name="expansion", path="ValueSet.expansion.identifier", description="Identifies the value set expansion (business identifier)", type="uri" )
6071  public static final String SP_EXPANSION = "expansion";
6072 /**
6073   * <b>Fluent Client</b> search parameter constant for <b>expansion</b>
6074   * <p>
6075   * Description: <b>Identifies the value set expansion (business identifier)</b><br>
6076   * Type: <b>uri</b><br>
6077   * Path: <b>ValueSet.expansion.identifier</b><br>
6078   * </p>
6079   */
6080  public static final ca.uhn.fhir.rest.gclient.UriClientParam EXPANSION = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_EXPANSION);
6081
6082 /**
6083   * Search parameter: <b>reference</b>
6084   * <p>
6085   * Description: <b>A code system included or excluded in the value set or an imported value set</b><br>
6086   * Type: <b>uri</b><br>
6087   * Path: <b>ValueSet.compose.include.system</b><br>
6088   * </p>
6089   */
6090  @SearchParamDefinition(name="reference", path="ValueSet.compose.include.system", description="A code system included or excluded in the value set or an imported value set", type="uri" )
6091  public static final String SP_REFERENCE = "reference";
6092 /**
6093   * <b>Fluent Client</b> search parameter constant for <b>reference</b>
6094   * <p>
6095   * Description: <b>A code system included or excluded in the value set or an imported value set</b><br>
6096   * Type: <b>uri</b><br>
6097   * Path: <b>ValueSet.compose.include.system</b><br>
6098   * </p>
6099   */
6100  public static final ca.uhn.fhir.rest.gclient.UriClientParam REFERENCE = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_REFERENCE);
6101
6102 /**
6103   * Search parameter: <b>context-quantity</b>
6104   * <p>
6105   * Description: <b>A quantity- or range-valued use context assigned to the value set</b><br>
6106   * Type: <b>quantity</b><br>
6107   * Path: <b>ValueSet.useContext.valueQuantity, ValueSet.useContext.valueRange</b><br>
6108   * </p>
6109   */
6110  @SearchParamDefinition(name="context-quantity", path="(ValueSet.useContext.value as Quantity) | (ValueSet.useContext.value as Range)", description="A quantity- or range-valued use context assigned to the value set", type="quantity" )
6111  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
6112 /**
6113   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
6114   * <p>
6115   * Description: <b>A quantity- or range-valued use context assigned to the value set</b><br>
6116   * Type: <b>quantity</b><br>
6117   * Path: <b>ValueSet.useContext.valueQuantity, ValueSet.useContext.valueRange</b><br>
6118   * </p>
6119   */
6120  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY);
6121
6122 /**
6123   * Search parameter: <b>name</b>
6124   * <p>
6125   * Description: <b>Computationally friendly name of the value set</b><br>
6126   * Type: <b>string</b><br>
6127   * Path: <b>ValueSet.name</b><br>
6128   * </p>
6129   */
6130  @SearchParamDefinition(name="name", path="ValueSet.name", description="Computationally friendly name of the value set", type="string" )
6131  public static final String SP_NAME = "name";
6132 /**
6133   * <b>Fluent Client</b> search parameter constant for <b>name</b>
6134   * <p>
6135   * Description: <b>Computationally friendly name of the value set</b><br>
6136   * Type: <b>string</b><br>
6137   * Path: <b>ValueSet.name</b><br>
6138   * </p>
6139   */
6140  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
6141
6142 /**
6143   * Search parameter: <b>context</b>
6144   * <p>
6145   * Description: <b>A use context assigned to the value set</b><br>
6146   * Type: <b>token</b><br>
6147   * Path: <b>ValueSet.useContext.valueCodeableConcept</b><br>
6148   * </p>
6149   */
6150  @SearchParamDefinition(name="context", path="(ValueSet.useContext.value as CodeableConcept)", description="A use context assigned to the value set", type="token" )
6151  public static final String SP_CONTEXT = "context";
6152 /**
6153   * <b>Fluent Client</b> search parameter constant for <b>context</b>
6154   * <p>
6155   * Description: <b>A use context assigned to the value set</b><br>
6156   * Type: <b>token</b><br>
6157   * Path: <b>ValueSet.useContext.valueCodeableConcept</b><br>
6158   * </p>
6159   */
6160  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
6161
6162 /**
6163   * Search parameter: <b>publisher</b>
6164   * <p>
6165   * Description: <b>Name of the publisher of the value set</b><br>
6166   * Type: <b>string</b><br>
6167   * Path: <b>ValueSet.publisher</b><br>
6168   * </p>
6169   */
6170  @SearchParamDefinition(name="publisher", path="ValueSet.publisher", description="Name of the publisher of the value set", type="string" )
6171  public static final String SP_PUBLISHER = "publisher";
6172 /**
6173   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
6174   * <p>
6175   * Description: <b>Name of the publisher of the value set</b><br>
6176   * Type: <b>string</b><br>
6177   * Path: <b>ValueSet.publisher</b><br>
6178   * </p>
6179   */
6180  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
6181
6182 /**
6183   * Search parameter: <b>context-type-quantity</b>
6184   * <p>
6185   * Description: <b>A use context type and quantity- or range-based value assigned to the value set</b><br>
6186   * Type: <b>composite</b><br>
6187   * Path: <b></b><br>
6188   * </p>
6189   */
6190  @SearchParamDefinition(name="context-type-quantity", path="ValueSet.useContext", description="A use context type and quantity- or range-based value assigned to the value set", type="composite", compositeOf={"context-type", "context-quantity"} )
6191  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
6192 /**
6193   * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b>
6194   * <p>
6195   * Description: <b>A use context type and quantity- or range-based value assigned to the value set</b><br>
6196   * Type: <b>composite</b><br>
6197   * Path: <b></b><br>
6198   * </p>
6199   */
6200  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> CONTEXT_TYPE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(SP_CONTEXT_TYPE_QUANTITY);
6201
6202 /**
6203   * Search parameter: <b>status</b>
6204   * <p>
6205   * Description: <b>The current status of the value set</b><br>
6206   * Type: <b>token</b><br>
6207   * Path: <b>ValueSet.status</b><br>
6208   * </p>
6209   */
6210  @SearchParamDefinition(name="status", path="ValueSet.status", description="The current status of the value set", type="token" )
6211  public static final String SP_STATUS = "status";
6212 /**
6213   * <b>Fluent Client</b> search parameter constant for <b>status</b>
6214   * <p>
6215   * Description: <b>The current status of the value set</b><br>
6216   * Type: <b>token</b><br>
6217   * Path: <b>ValueSet.status</b><br>
6218   * </p>
6219   */
6220  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
6221
6222
6223}
6224