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