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