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